|
|
|
@ -24,7 +24,12 @@ import { |
|
|
|
Validator, |
|
|
|
Validators |
|
|
|
} from '@angular/forms'; |
|
|
|
import { CustomMobilePage, MobilePageType, mobilePageTypeTranslations } from '@shared/models/mobile-app.models'; |
|
|
|
import { |
|
|
|
CustomMobilePage, |
|
|
|
MobilePageType, |
|
|
|
mobilePageTypeTranslations, |
|
|
|
WEB_URL_REGEX |
|
|
|
} from '@shared/models/mobile-app.models'; |
|
|
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; |
|
|
|
import { getCurrentAuthUser } from '@core/auth/auth.selectors'; |
|
|
|
import { Authority } from '@shared/models/authority.enum'; |
|
|
|
@ -63,8 +68,8 @@ export class CustomMobilePageComponent implements ControlValueAccessor, Validato |
|
|
|
label: ['', [Validators.required, Validators.pattern(/\S/)]], |
|
|
|
type: [MobilePageType.DASHBOARD], |
|
|
|
dashboardId: this.fb.control<string>(null, Validators.required), |
|
|
|
url: [{value:'', disabled: true}, [Validators.required, Validators.pattern(/^(https?:\/\/)?(localhost|([\w\-]+\.)+[\w\-]+)(:\d+)?(\/[\w\-._~:\/?#[\]@!$&'()*+,;=%]*)?$/)]], |
|
|
|
path: [{value:'', disabled: true}, [Validators.required, Validators.pattern(/^(\/[\w\-._~:\/?#[\]@!$&'()*+,;=%]*)?$/)]] |
|
|
|
url: [{value:'', disabled: true}, [Validators.required, Validators.pattern(WEB_URL_REGEX)]], |
|
|
|
path: [{value:'', disabled: true}, [Validators.required, Validators.pattern(/^(\/[\w\-._~:/?#[\]@!$&'()*+,;=%]*)?$/)]] |
|
|
|
}); |
|
|
|
|
|
|
|
private propagateChange = (_val: any) => {}; |
|
|
|
|