@softpak/components 18.6.11 → 18.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/spx-app-update/spx-app-update.component.mjs +2 -2
- package/esm2022/spx-check-digit/spx-check-digit.component.mjs +1 -1
- package/esm2022/spx-form-view/spx-autocomplete-search.component.mjs +1 -1
- package/esm2022/spx-form-view/spx-form-view.component.mjs +2 -2
- package/esm2022/spx-inputs/spx-input.component.mjs +6 -2
- package/esm2022/spx-update/src/spx-update-info.component.mjs +1 -1
- package/fesm2022/softpak-components-spx-app-update.mjs +1 -1
- package/fesm2022/softpak-components-spx-app-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +2 -2
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +5 -1
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +1 -1
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/package.json +46 -46
- package/spx-inputs/spx-input.component.d.ts +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-app-update.mjs","sources":["../../../../projects/softpak/components/spx-app-update/spx-app-update.component.ts","../../../../projects/softpak/components/spx-app-update/softpak-components-spx-app-update.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { ApplicationRef, ChangeDetectorRef, Component, Input } from '@angular/core';\r\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\r\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\r\nimport { SpxInputComponent } from '@softpak/components/spx-inputs';\r\nimport { SpxProgressBarComponent } from '@softpak/components/spx-progress-bar';\r\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\r\nimport { Device } from '@capacitor/device';\r\nimport { Deploy } from 'cordova-plugin-ionic/dist/ngx';\r\nimport { getCurrentScope } from '@sentry/angular';\r\nimport { IonicModule, NavController } from '@ionic/angular';\r\n\r\nconst ctrlNextVersionNumber = 'ctrlNextVersionNumber';\r\nconst ctrlVersionNumber = 'ctrlVersionNumber';\r\nconst ctrlConfiguredChannel = 'ctrlConfiguredChannel';\r\nconst ctrlAppStoreVersion = 'ctrlAppStoreVersion';\r\n\r\n@Component({\r\n selector: 'spx-app-update',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n IonicModule,\r\n ReactiveFormsModule,\r\n SpxCapitalizePipe,\r\n SpxInputComponent,\r\n SpxProgressBarComponent,\r\n TranslateModule\r\n],\r\n template: `<ion-header>\r\n <ion-toolbar>\r\n <ion-title>\r\n {{ txtUpdate | translate | capitalize }}\r\n </ion-title>\r\n </ion-toolbar>\r\n </ion-header>\r\n \r\n <ion-content class=\"ion-content--upd\" [fullscreen]=\"true\">\r\n <div class=\"ion-padding\">\r\n <spx-progress-bar [spxPercentage]=\"delayedPercentage\" [spxTitle]=\"updateStatus | capitalize\">\r\n </spx-progress-bar>\r\n <form [formGroup]=\"form\" class=\"mt-3\">\r\n @if (ctrlAppStoreVersion.value && ctrlAppStoreVersion.value.value) {\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\r\n <spx-input [formControl]=\"ctrlAppStoreVersion\" [spxLabel]=\"txtAppStoreVersion | translate | capitalize\"\r\n [spxReadonly]=\"true\"></spx-input>\r\n <spx-input [formControl]=\"ctrlConfiguredChannel\" [spxLabel]=\"txtChannel | translate | capitalize\"\r\n [spxReadonly]=\"true\"></spx-input>\r\n <spx-input [formControl]=\"ctrlVersionNumber\" [spxLabel]=\"txtVersion | translate | capitalize\"\r\n [spxReadonly]=\"true\"></spx-input>\r\n @if (ctrlNextVersionNumber.value && ctrlNextVersionNumber.value.value) {\r\n <spx-input [formControl]=\"ctrlNextVersionNumber\" [spxLabel]=\"txtNextVersion | translate | capitalize\"\r\n [spxReadonly]=\"true\"></spx-input>\r\n }\r\n </div>\r\n }\r\n </form>\r\n </div>\r\n </ion-content>`,\r\n})\r\nexport class SpxAppUpdateComponent {\r\n @Input() spxHomeUrl!: string;\r\n @Input() spxIsSignedIn!: boolean;\r\n @Input() textCheckingForUpdates!: string;\r\n @Input() textDownloadingUpdate!: string;\r\n @Input() textErrorWhileUpdatingApp!: string;\r\n @Input() textFinishedUpdating!: string;\r\n @Input() textNoUpdatesAvailable!: string;\r\n @Input() textUnexpectedError!: string;\r\n @Input() txtAppStoreVersion!: string;\r\n @Input() txtChannel!: string;\r\n @Input() txtNextVersion!: string;\r\n @Input() txtUpdate!: string;\r\n @Input() txtVersion!: string;\r\n @Input() spxAppId!: string;\r\n\r\n form: FormGroup;\r\n\r\n delayedPercentage: number = 0;\r\n percentage: number = 0;\r\n syncTruckInterval: any | null = null;\r\n updateStatus: string = this.textCheckingForUpdates;\r\n\r\n constructor(\r\n private readonly deploy: Deploy,\r\n private readonly changeDetector: ChangeDetectorRef,\r\n private readonly applicationRef: ApplicationRef,\r\n private readonly translateService: TranslateService,\r\n private readonly formBuilder: FormBuilder,\r\n private readonly navController: NavController,\r\n ) {\r\n this.form = this.formBuilder.group({\r\n [ctrlNextVersionNumber]: [null, []],\r\n [ctrlVersionNumber]: [null, []],\r\n [ctrlConfiguredChannel]: [null, []],\r\n [ctrlAppStoreVersion]: [null, []],\r\n });\r\n }\r\n\r\n get ctrlVersionNumber(): FormControl { return this.form.get(ctrlVersionNumber) as FormControl; }\r\n get ctrlNextVersionNumber(): FormControl { return this.form.get(ctrlNextVersionNumber) as FormControl; }\r\n get ctrlConfiguredChannel(): FormControl { return this.form.get(ctrlConfiguredChannel) as FormControl; }\r\n get ctrlAppStoreVersion(): FormControl { return this.form.get(ctrlAppStoreVersion) as FormControl; }\r\n\r\n init() {\r\n this.delayedPercentage = 0;\r\n this.percentage = 0;\r\n this.performAutomaticUpdate().then(() => { });\r\n this.startLoaderSync();\r\n this.changeStatus({\r\n percentage: 0,\r\n text: this.translateService.instant(this.textCheckingForUpdates),\r\n });\r\n }\r\n\r\n destroy() {\r\n this.stopLoaderSync();\r\n }\r\n\r\n async performAutomaticUpdate() {\r\n const deviceInfo = await Device.getInfo();\r\n\r\n if (deviceInfo?.platform === 'web') {\r\n // Local? Skip the update page.\r\n this.closeUpdateScreen();\r\n }\r\n try {\r\n this.updateInfo();\r\n\r\n // Start upgrade\r\n const currentVersion = await this.deploy.getCurrentVersion();\r\n if (currentVersion?.binaryVersionName) {\r\n const binaryGroup = currentVersion.binaryVersionName.substring(0, 3); // e.g. \"1.4\"\r\n const channelGroup = currentVersion.channel.split('-')[1].substring(0, 3); // e.g. \"1.4\"\r\n const channelType = currentVersion.channel.split('-')[0];\r\n\r\n if (binaryGroup != channelGroup) {\r\n await this.deploy.configure({\r\n appId: this.spxAppId,\r\n channel: `${channelType}-${binaryGroup}.x`\r\n }).then(() => {\r\n this.sync().then(() => { });\r\n });\r\n } else {\r\n this.sync().then(() => { });\r\n }\r\n } else {\r\n this.sync().then(() => { });\r\n }\r\n // End upgrade\r\n } catch (error: any) {\r\n this.changeStatus({\r\n closeScreen: true,\r\n error,\r\n percentage: 100,\r\n text: this.translateService.instant(this.textUnexpectedError)\r\n });\r\n }\r\n }\r\n\r\n private async sync() {\r\n try {\r\n this.updateInfo();\r\n\r\n const updateAvailableInfo = await this.deploy.checkForUpdate();\r\n if (!updateAvailableInfo.available) {\r\n // No update available\r\n this.changeStatus({\r\n closeScreen: true,\r\n percentage: 0,\r\n text: this.translateService.instant(this.textNoUpdatesAvailable),\r\n });\r\n } else {\r\n // Download update\r\n await this.deploy.sync({ updateMethod: 'auto' }, (percentage) => {\r\n this.changeStatus({\r\n percentage: percentage ?? 0,\r\n text: this.translateService.instant(this.textDownloadingUpdate, { percentage, version: updateAvailableInfo.build }),\r\n });\r\n }).catch((error) => {\r\n this.changeStatus({\r\n closeScreen: true,\r\n error,\r\n percentage: 100,\r\n text: this.translateService.instant(this.textErrorWhileUpdatingApp),\r\n });\r\n });\r\n\r\n this.changeStatus({\r\n closeScreen: true,\r\n percentage: 100,\r\n text: this.translateService.instant(this.textFinishedUpdating, { version: updateAvailableInfo.build })\r\n });\r\n }\r\n } catch (error: any) {\r\n // Catch unexpected plug-in errors\r\n this.changeStatus({\r\n closeScreen: true,\r\n error,\r\n percentage: 100,\r\n text: this.translateService.instant(this.textUnexpectedError)\r\n });\r\n }\r\n }\r\n\r\n private async updateInfo(): Promise<void> {\r\n const currentVersion = await this.deploy.getCurrentVersion();\r\n const configuration = await this.deploy.getConfiguration();\r\n const updateAvailableInfo = await this.deploy.checkForUpdate();\r\n\r\n if (currentVersion) {\r\n this.ctrlVersionNumber.setValue({\r\n value: configuration?.currentBuildId,\r\n });\r\n this.ctrlNextVersionNumber.setValue({\r\n value: updateAvailableInfo?.build\r\n });\r\n this.ctrlConfiguredChannel.setValue({\r\n value: configuration ? configuration.channel : null\r\n });\r\n this.ctrlAppStoreVersion.setValue({\r\n value: configuration ? configuration.binaryVersionName : null\r\n });\r\n\r\n {\r\n const scope = getCurrentScope();\r\n scope.setTag('version_binary_code', currentVersion?.binaryVersionCode);\r\n scope.setTag('version_binary_name', currentVersion?.binaryVersionName);\r\n scope.setTag('version_build_id', currentVersion?.buildId);\r\n scope.setTag('channel_type', currentVersion?.channel);\r\n scope.setTag('version_snapshot_id', currentVersion?.versionId);\r\n };\r\n\r\n this.changeDetector.markForCheck();\r\n this.applicationRef.tick();\r\n }\r\n }\r\n\r\n private changeStatus(status: {\r\n error?: string;\r\n text: string;\r\n closeScreen?: boolean;\r\n percentage: number;\r\n }) {\r\n this.updateStatus = status.text;\r\n this.percentage = status.percentage;\r\n if (status.closeScreen) {\r\n this.closeUpdateScreen();\r\n }\r\n if (status.error) {\r\n // this.appStore.dispatch(\r\n // sharedToasterActions.CREATE_ERROR({\r\n // messageText: status.error,\r\n // })\r\n // );\r\n }\r\n this.changeDetector.markForCheck();\r\n this.applicationRef.tick();\r\n }\r\n\r\n private closeUpdateScreen() {\r\n // Allowing some time to make a screenshot of version info\r\n SpxStorage.clearSetting<any>(SpxStorageKeyEnum.updateInProgress);\r\n setTimeout(() => {\r\n if (\r\n SpxStorage.getSetting<any>(SpxStorageKeyEnum.afterSignIn) &&\r\n this.spxIsSignedIn\r\n ) {\r\n this.navController.navigateRoot([SpxStorage.getSetting<any>(SpxStorageKeyEnum.afterSignIn)]);\r\n SpxStorage.clearSetting<any>(SpxStorageKeyEnum.afterSignIn)\r\n } else {\r\n this.navController.navigateRoot([this.spxHomeUrl]);\r\n }\r\n }, 0);\r\n }\r\n\r\n private startLoaderSync() {\r\n SpxStorage.setSetting<any>(SpxStorageKeyEnum.updateInProgress, '1');\r\n if (this.syncTruckInterval === null) {\r\n this.syncTruckInterval = setInterval(() => {\r\n this.delayedPercentage = this.percentage;\r\n }, 200);\r\n }\r\n }\r\n\r\n private stopLoaderSync() {\r\n if (this.syncTruckInterval !== null) {\r\n clearInterval(this.syncTruckInterval);\r\n this.syncTruckInterval = null;\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAaA,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAC9C,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;MA6CrC,qBAAqB,CAAA;IAuBhC,WACmB,CAAA,MAAc,EACd,cAAiC,EACjC,cAA8B,EAC9B,gBAAkC,EAClC,WAAwB,EACxB,aAA4B,EAAA;QAL5B,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAc,CAAA,cAAA,GAAd,cAAc,CAAmB;QACjC,IAAc,CAAA,cAAA,GAA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AAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAiCN,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBA3CjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,WAAW;wBACX,WAAW;wBACX,mBAAmB;wBACnB,iBAAiB;wBACjB,iBAAiB;wBACjB,uBAAuB;wBACvB,eAAe;AAClB,qBAAA;AACC,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BK,gBAAA,CAAA;AAChB,iBAAA,CAAA;6NAEU,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,sBAAsB,EAAA,CAAA;sBAA9B,KAAK;gBACG,qBAAqB,EAAA,CAAA;sBAA7B,KAAK;gBACG,yBAAyB,EAAA,CAAA;sBAAjC,KAAK;gBACG,oBAAoB,EAAA,CAAA;sBAA5B,KAAK;gBACG,sBAAsB,EAAA,CAAA;sBAA9B,KAAK;gBACG,mBAAmB,EAAA,CAAA;sBAA3B,KAAK;gBACG,kBAAkB,EAAA,CAAA;sBAA1B,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;;;AC3ER;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-app-update.mjs","sources":["../../../../projects/softpak/components/spx-app-update/spx-app-update.component.ts","../../../../projects/softpak/components/spx-app-update/softpak-components-spx-app-update.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { ApplicationRef, ChangeDetectorRef, Component, Input } from '@angular/core';\r\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\r\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\r\nimport { SpxInputComponent } from '@softpak/components/spx-inputs';\r\nimport { SpxProgressBarComponent } from '@softpak/components/spx-progress-bar';\r\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\r\nimport { Device } from '@capacitor/device';\r\nimport { Deploy } from 'cordova-plugin-ionic/dist/ngx';\r\nimport { getCurrentScope } from '@sentry/angular';\r\nimport { IonicModule, NavController } from '@ionic/angular';\r\n\r\nconst ctrlNextVersionNumber = 'ctrlNextVersionNumber';\r\nconst ctrlVersionNumber = 'ctrlVersionNumber';\r\nconst ctrlConfiguredChannel = 'ctrlConfiguredChannel';\r\nconst ctrlAppStoreVersion = 'ctrlAppStoreVersion';\r\n\r\n@Component({\r\n selector: 'spx-app-update',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n IonicModule,\r\n ReactiveFormsModule,\r\n SpxCapitalizePipe,\r\n SpxInputComponent,\r\n SpxProgressBarComponent,\r\n TranslateModule\r\n],\r\n template: `<ion-header>\r\n <ion-toolbar>\r\n <ion-title>\r\n {{ txtUpdate | translate | capitalize }}\r\n </ion-title>\r\n </ion-toolbar>\r\n </ion-header>\r\n \r\n <ion-content class=\"ion-content--upd\" [fullscreen]=\"true\">\r\n <div class=\"ion-padding\">\r\n <spx-progress-bar [spxPercentage]=\"delayedPercentage\" [spxTitle]=\"updateStatus | capitalize\">\r\n </spx-progress-bar>\r\n <form [formGroup]=\"form\" class=\"mt-3\">\r\n @if (ctrlAppStoreVersion.value && ctrlAppStoreVersion.value.value) {\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\r\n <spx-input [formControl]=\"ctrlAppStoreVersion\" [spxLabel]=\"txtAppStoreVersion | translate | capitalize\"\r\n [spxReadonly]=\"true\"></spx-input>\r\n <spx-input [formControl]=\"ctrlConfiguredChannel\" [spxLabel]=\"txtChannel | translate | capitalize\"\r\n [spxReadonly]=\"true\"></spx-input>\r\n <spx-input [formControl]=\"ctrlVersionNumber\" [spxLabel]=\"txtVersion | translate | capitalize\"\r\n [spxReadonly]=\"true\"></spx-input>\r\n @if (ctrlNextVersionNumber.value && ctrlNextVersionNumber.value.value) {\r\n <spx-input [formControl]=\"ctrlNextVersionNumber\" [spxLabel]=\"txtNextVersion | translate | capitalize\"\r\n [spxReadonly]=\"true\"></spx-input>\r\n }\r\n </div>\r\n }\r\n </form>\r\n </div>\r\n </ion-content>`,\r\n})\r\nexport class SpxAppUpdateComponent {\r\n @Input() spxHomeUrl!: string;\r\n @Input() spxIsSignedIn!: boolean;\r\n @Input() textCheckingForUpdates!: string;\r\n @Input() textDownloadingUpdate!: string;\r\n @Input() textErrorWhileUpdatingApp!: string;\r\n @Input() textFinishedUpdating!: string;\r\n @Input() textNoUpdatesAvailable!: string;\r\n @Input() textUnexpectedError!: string;\r\n @Input() txtAppStoreVersion!: string;\r\n @Input() txtChannel!: string;\r\n @Input() txtNextVersion!: string;\r\n @Input() txtUpdate!: string;\r\n @Input() txtVersion!: string;\r\n @Input() spxAppId!: string;\r\n\r\n form: FormGroup;\r\n\r\n delayedPercentage: number = 0;\r\n percentage: number = 0;\r\n syncTruckInterval: any | null = null;\r\n updateStatus: string = this.textCheckingForUpdates;\r\n\r\n constructor(\r\n private readonly deploy: Deploy,\r\n private readonly changeDetector: ChangeDetectorRef,\r\n private readonly applicationRef: ApplicationRef,\r\n private readonly translateService: TranslateService,\r\n private readonly formBuilder: FormBuilder,\r\n private readonly navController: NavController,\r\n ) {\r\n this.form = this.formBuilder.group({\r\n [ctrlNextVersionNumber]: [null, []],\r\n [ctrlVersionNumber]: [null, []],\r\n [ctrlConfiguredChannel]: [null, []],\r\n [ctrlAppStoreVersion]: [null, []],\r\n });\r\n }\r\n\r\n get ctrlVersionNumber(): FormControl { return this.form.get(ctrlVersionNumber) as FormControl; }\r\n get ctrlNextVersionNumber(): FormControl { return this.form.get(ctrlNextVersionNumber) as FormControl; }\r\n get ctrlConfiguredChannel(): FormControl { return this.form.get(ctrlConfiguredChannel) as FormControl; }\r\n get ctrlAppStoreVersion(): FormControl { return this.form.get(ctrlAppStoreVersion) as FormControl; }\r\n\r\n init() {\r\n this.delayedPercentage = 0;\r\n this.percentage = 0;\r\n this.performAutomaticUpdate().then(() => { });\r\n this.startLoaderSync();\r\n this.changeStatus({\r\n percentage: 0,\r\n text: this.translateService.instant(this.textCheckingForUpdates),\r\n });\r\n }\r\n\r\n destroy() {\r\n this.stopLoaderSync();\r\n }\r\n\r\n async performAutomaticUpdate() {\r\n const deviceInfo = await Device.getInfo();\r\n\r\n if (deviceInfo?.platform === 'web') {\r\n // Local? Skip the update page.\r\n this.closeUpdateScreen();\r\n }\r\n try {\r\n this.updateInfo();\r\n\r\n // Start upgrade\r\n const currentVersion = await this.deploy.getCurrentVersion();\r\n if (currentVersion?.binaryVersionName) {\r\n const binaryGroup = currentVersion.binaryVersionName.substring(0, 3); // e.g. \"1.4\"\r\n const channelGroup = currentVersion.channel.split('-')[1].substring(0, 3); // e.g. \"1.4\"\r\n const channelType = currentVersion.channel.split('-')[0];\r\n\r\n if (binaryGroup != channelGroup) {\r\n await this.deploy.configure({\r\n appId: this.spxAppId,\r\n channel: `${channelType}-${binaryGroup}.x`\r\n }).then(() => {\r\n this.sync().then(() => { });\r\n });\r\n } else {\r\n this.sync().then(() => { });\r\n }\r\n } else {\r\n this.sync().then(() => { });\r\n }\r\n // End upgrade\r\n } catch (error: any) {\r\n this.changeStatus({\r\n closeScreen: true,\r\n error,\r\n percentage: 100,\r\n text: this.translateService.instant(this.textUnexpectedError)\r\n });\r\n }\r\n }\r\n\r\n private async sync() {\r\n try {\r\n this.updateInfo();\r\n\r\n const updateAvailableInfo = await this.deploy.checkForUpdate();\r\n if (!updateAvailableInfo.available) {\r\n // No update available\r\n this.changeStatus({\r\n closeScreen: true,\r\n percentage: 0,\r\n text: this.translateService.instant(this.textNoUpdatesAvailable),\r\n });\r\n } else {\r\n // Download update\r\n await this.deploy.sync({ updateMethod: 'auto' }, (percentage) => {\r\n this.changeStatus({\r\n percentage: percentage ?? 0,\r\n text: this.translateService.instant(this.textDownloadingUpdate, { percentage, version: updateAvailableInfo.build }),\r\n });\r\n }).catch((error) => {\r\n this.changeStatus({\r\n closeScreen: true,\r\n error,\r\n percentage: 100,\r\n text: this.translateService.instant(this.textErrorWhileUpdatingApp),\r\n });\r\n });\r\n\r\n this.changeStatus({\r\n closeScreen: true,\r\n percentage: 100,\r\n text: this.translateService.instant(this.textFinishedUpdating, { version: updateAvailableInfo.build })\r\n });\r\n }\r\n } catch (error: any) {\r\n // Catch unexpected plug-in errors\r\n this.changeStatus({\r\n closeScreen: true,\r\n error,\r\n percentage: 100,\r\n text: this.translateService.instant(this.textUnexpectedError)\r\n });\r\n }\r\n }\r\n\r\n private async updateInfo(): Promise<void> {\r\n const currentVersion = await this.deploy.getCurrentVersion();\r\n const configuration = await this.deploy.getConfiguration();\r\n const updateAvailableInfo = await this.deploy.checkForUpdate();\r\n\r\n if (currentVersion) {\r\n this.ctrlVersionNumber.setValue({\r\n value: configuration?.currentBuildId,\r\n });\r\n this.ctrlNextVersionNumber.setValue({\r\n value: updateAvailableInfo?.build\r\n });\r\n this.ctrlConfiguredChannel.setValue({\r\n value: configuration ? configuration.channel : null\r\n });\r\n this.ctrlAppStoreVersion.setValue({\r\n value: configuration ? configuration.binaryVersionName : null\r\n });\r\n\r\n {\r\n const scope = getCurrentScope();\r\n scope.setTag('version_binary_code', currentVersion?.binaryVersionCode);\r\n scope.setTag('version_binary_name', currentVersion?.binaryVersionName);\r\n scope.setTag('version_build_id', currentVersion?.buildId);\r\n scope.setTag('channel_type', currentVersion?.channel);\r\n scope.setTag('version_snapshot_id', currentVersion?.versionId);\r\n };\r\n\r\n this.changeDetector.markForCheck();\r\n this.applicationRef.tick();\r\n }\r\n }\r\n\r\n private changeStatus(status: {\r\n error?: string;\r\n text: string;\r\n closeScreen?: boolean;\r\n percentage: number;\r\n }) {\r\n this.updateStatus = status.text;\r\n this.percentage = status.percentage;\r\n if (status.closeScreen) {\r\n this.closeUpdateScreen();\r\n }\r\n if (status.error) {\r\n // this.appStore.dispatch(\r\n // sharedToasterActions.CREATE_ERROR({\r\n // messageText: status.error,\r\n // })\r\n // );\r\n }\r\n this.changeDetector.markForCheck();\r\n this.applicationRef.tick();\r\n }\r\n\r\n private closeUpdateScreen() {\r\n // Allowing some time to make a screenshot of version info\r\n SpxStorage.clearSetting<any>(SpxStorageKeyEnum.updateInProgress);\r\n setTimeout(() => {\r\n if (\r\n SpxStorage.getSetting<any>(SpxStorageKeyEnum.afterSignIn) &&\r\n this.spxIsSignedIn\r\n ) {\r\n this.navController.navigateRoot([SpxStorage.getSetting<any>(SpxStorageKeyEnum.afterSignIn)]);\r\n SpxStorage.clearSetting<any>(SpxStorageKeyEnum.afterSignIn)\r\n } else {\r\n this.navController.navigateRoot([this.spxHomeUrl]);\r\n }\r\n }, 0);\r\n }\r\n\r\n private startLoaderSync() {\r\n SpxStorage.setSetting<any>(SpxStorageKeyEnum.updateInProgress, '1');\r\n if (this.syncTruckInterval === null) {\r\n this.syncTruckInterval = setInterval(() => {\r\n this.delayedPercentage = this.percentage;\r\n }, 200);\r\n }\r\n }\r\n\r\n private stopLoaderSync() {\r\n if (this.syncTruckInterval !== null) {\r\n clearInterval(this.syncTruckInterval);\r\n this.syncTruckInterval = null;\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAaA,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAC9C,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,mBAAm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BACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;;;AC3ER;;AAEG;;;;"}
|
|
@@ -69,7 +69,7 @@ class SpxCheckDigitComponent {
|
|
|
69
69
|
return formControl._rawValidators;
|
|
70
70
|
}
|
|
71
71
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxCheckDigitComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
72
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SpxCheckDigitComponent, isStandalone: true, selector: "spx-check-digit", inputs: { txtCheckDigit: "txtCheckDigit", txtContainer: "txtContainer", txtPrefix: "txtPrefix" }, viewQueries: [{ propertyName: "ctrlContainerNumberRef", first: true, predicate: ["ctrlContainerNumberRef"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\r\n <spx-input\r\n #ctrlContainerNumberRef\r\n [formControl]=\"ctrlContainerNumber\"\r\n [spxAutofocus]=\"true\"\r\n [spxCapitalize]=\"true\"\r\n [spxLabel]=\"txtContainer\"\r\n [spxPattern]=\"'[0-9]*'\"\r\n [spxRequired]=\"true\"\r\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\r\n [spxType]=\"inputTypeOverlayNumber\"\r\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\r\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\r\n </spx-input>\r\n <spx-input\r\n [formControl]=\"ctrlContainerPrefix\"\r\n [spxCapitalize]=\"true\"\r\n [spxLabel]=\"txtPrefix\"\r\n [spxRequired]=\"true\"\r\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\r\n [spxType]=\"inputTypeText\"\r\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\r\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\r\n </spx-input>\r\n @if (ctrlCheckDigit.value) {\r\n <spx-input\r\n [formControl]=\"ctrlCheckDigit\"\r\n [spxLabel]=\"txtCheckDigit\"\r\n [spxReadonly]=\"true\"\r\n [spxType]=\"inputTypeText\">\r\n </spx-input>\r\n }\r\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxValidateControlComponent, selector: "spx-validate-control", inputs: ["control", "label", "submitTried"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
|
|
72
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SpxCheckDigitComponent, isStandalone: true, selector: "spx-check-digit", inputs: { txtCheckDigit: "txtCheckDigit", txtContainer: "txtContainer", txtPrefix: "txtPrefix" }, viewQueries: [{ propertyName: "ctrlContainerNumberRef", first: true, predicate: ["ctrlContainerNumberRef"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\r\n <spx-input\r\n #ctrlContainerNumberRef\r\n [formControl]=\"ctrlContainerNumber\"\r\n [spxAutofocus]=\"true\"\r\n [spxCapitalize]=\"true\"\r\n [spxLabel]=\"txtContainer\"\r\n [spxPattern]=\"'[0-9]*'\"\r\n [spxRequired]=\"true\"\r\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\r\n [spxType]=\"inputTypeOverlayNumber\"\r\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\r\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\r\n </spx-input>\r\n <spx-input\r\n [formControl]=\"ctrlContainerPrefix\"\r\n [spxCapitalize]=\"true\"\r\n [spxLabel]=\"txtPrefix\"\r\n [spxRequired]=\"true\"\r\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\r\n [spxType]=\"inputTypeText\"\r\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\r\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\r\n </spx-input>\r\n @if (ctrlCheckDigit.value) {\r\n <spx-input\r\n [formControl]=\"ctrlCheckDigit\"\r\n [spxLabel]=\"txtCheckDigit\"\r\n [spxReadonly]=\"true\"\r\n [spxType]=\"inputTypeText\">\r\n </spx-input>\r\n }\r\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxValidateControlComponent, selector: "spx-validate-control", inputs: ["control", "label", "submitTried"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxAlertMessageSeverity", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
|
|
73
73
|
}
|
|
74
74
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxCheckDigitComponent, decorators: [{
|
|
75
75
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-check-digit.mjs","sources":["../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.ts","../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.html","../../../../projects/softpak/components/spx-check-digit/softpak-components-spx-check-digit.ts"],"sourcesContent":["import { Component, Input, ViewChild } from '@angular/core';\r\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { Subscription, combineLatest, map, startWith } from 'rxjs';\r\nimport { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spxValidatorPattern, SpxValidateControlComponent } from '@softpak/components/spx-validation';\r\nimport { calcCheckDigit, valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nimport { SpxInputComponent, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\r\n\r\nconst ctrlCheckDigit = 'checkDigit';\r\nconst ctrlContainerNumber = 'containerNumber';\r\nconst ctrlPrefix = 'prefix';\r\n\r\n@Component({\r\n selector: 'spx-check-digit',\r\n templateUrl: './spx-check-digit.component.html',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n SpxValidateControlComponent,\r\n SpxInputComponent\r\n]\r\n})\r\nexport class SpxCheckDigitComponent {\r\n @Input() txtCheckDigit!: string;\r\n @Input() txtContainer!: string;\r\n @Input() txtPrefix!: string;\r\n @ViewChild('ctrlContainerNumberRef') ctrlContainerNumberRef?: SpxInputComponent;\r\n inputTypeOverlayNumber = SpxInputTypeEnum.overlayNumber;\r\n inputTypeText = SpxInputTypeEnum.text;\r\n formGroup: FormGroup;\r\n\r\n get ctrlCheckDigit(): FormControl { return this.formGroup.get(ctrlCheckDigit) as FormControl; }\r\n get ctrlContainerNumber(): FormControl { return this.formGroup.get(ctrlContainerNumber) as FormControl; }\r\n get ctrlContainerPrefix(): FormControl { return this.formGroup.get(ctrlPrefix) as FormControl; }\r\n\r\n private inputChanges?: Subscription;\r\n\r\n constructor(\r\n private readonly formBuilder: FormBuilder,\r\n ) {\r\n this.formGroup = this.formBuilder.group({\r\n [ctrlCheckDigit]: [null, []],\r\n [ctrlContainerNumber]: [null, [\r\n spxValidatorRequired(),\r\n spxValidatorMaxLength(6),\r\n spxValidatorMinLength(6),\r\n spxValidatorPattern(/[0-9]{6}/),\r\n ]],\r\n [ctrlPrefix]: [null, [\r\n spxValidatorRequired(),\r\n spxValidatorMaxLength(4),\r\n spxValidatorMinLength(4),\r\n spxValidatorPattern(/[a-zA-Z]{4}/),\r\n ]],\r\n })\r\n }\r\n\r\n ngOnInit(): void {\r\n this.inputChanges = combineLatest([\r\n this.ctrlContainerNumber.valueChanges.pipe(startWith(this.ctrlContainerNumber.value)),\r\n this.ctrlContainerPrefix.valueChanges.pipe(startWith(this.ctrlContainerPrefix.value)),\r\n ])\r\n .pipe(map(([containerNumber$, prefix$]) => ({\r\n containerNumber: containerNumber$,\r\n prefix: prefix$\r\n })))\r\n .subscribe((v) => {\r\n if (this.ctrlContainerNumber.invalid || this.ctrlContainerPrefix.invalid) {\r\n this.ctrlCheckDigit.setValue(null, { emitEvent: false });\r\n } else {\r\n const prefix = valuePairToValue(this.ctrlContainerPrefix.value);\r\n const containerNumber = valuePairToValue(this.ctrlContainerNumber.value);\r\n const checkDigit = calcCheckDigit(`${prefix}${containerNumber}`);\r\n this.ctrlCheckDigit.setValue({ value: checkDigit }, { emitEvent: false });\r\n }\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n setTimeout(() => {\r\n this.ctrlContainerNumberRef?.setFocusIn(); \r\n }, 250);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.inputChanges) {\r\n this.inputChanges.unsubscribe();\r\n }\r\n }\r\n\r\n getRawValidators(formControl: FormControl) {\r\n return (formControl as any)._rawValidators;\r\n }\r\n}\r\n","<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\r\n <spx-input\r\n #ctrlContainerNumberRef\r\n [formControl]=\"ctrlContainerNumber\"\r\n [spxAutofocus]=\"true\"\r\n [spxCapitalize]=\"true\"\r\n [spxLabel]=\"txtContainer\"\r\n [spxPattern]=\"'[0-9]*'\"\r\n [spxRequired]=\"true\"\r\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\r\n [spxType]=\"inputTypeOverlayNumber\"\r\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\r\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\r\n </spx-input>\r\n <spx-input\r\n [formControl]=\"ctrlContainerPrefix\"\r\n [spxCapitalize]=\"true\"\r\n [spxLabel]=\"txtPrefix\"\r\n [spxRequired]=\"true\"\r\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\r\n [spxType]=\"inputTypeText\"\r\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\r\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\r\n </spx-input>\r\n @if (ctrlCheckDigit.value) {\r\n <spx-input\r\n [formControl]=\"ctrlCheckDigit\"\r\n [spxLabel]=\"txtCheckDigit\"\r\n [spxReadonly]=\"true\"\r\n [spxType]=\"inputTypeText\">\r\n </spx-input>\r\n }\r\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAQA,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAC9C,MAAM,UAAU,GAAG,QAAQ,CAAC;MAaf,sBAAsB,CAAA;AASjC,IAAA,IAAI,cAAc,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAgB,CAAC,EAAE;AAC/F,IAAA,IAAI,mBAAmB,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAgB,CAAC,EAAE;AACzG,IAAA,IAAI,mBAAmB,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAgB,CAAC,EAAE;AAIhG,IAAA,WAAA,CACmB,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;AAX3C,QAAA,IAAA,CA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AA,EAAA,gBAAA,EAAA,SAAA,EAAA,eAAA,EAAA,OAAA,EAAA,eAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,UAAA,EAAA,WAAA,EAAA,UAAA,EAAA,SAAA,EAAA,SAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGR,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;+BACE,iBAAiB,EAAA,UAAA,EAEf,IAAI,EACP,OAAA,EAAA;wBACP,WAAW;wBACX,mBAAmB;wBACnB,2BAA2B;wBAC3B,iBAAiB;AACpB,qBAAA,EAAA,QAAA,EAAA,65CAAA,EAAA,CAAA;gFAGU,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBAC+B,sBAAsB,EAAA,CAAA;sBAA1D,SAAS;uBAAC,wBAAwB,CAAA;;;AE3BrC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-check-digit.mjs","sources":["../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.ts","../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.html","../../../../projects/softpak/components/spx-check-digit/softpak-components-spx-check-digit.ts"],"sourcesContent":["import { Component, Input, ViewChild } from '@angular/core';\r\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { Subscription, combineLatest, map, startWith } from 'rxjs';\r\nimport { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spxValidatorPattern, SpxValidateControlComponent } from '@softpak/components/spx-validation';\r\nimport { calcCheckDigit, valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nimport { SpxInputComponent, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\r\n\r\nconst ctrlCheckDigit = 'checkDigit';\r\nconst ctrlContainerNumber = 'containerNumber';\r\nconst ctrlPrefix = 'prefix';\r\n\r\n@Component({\r\n selector: 'spx-check-digit',\r\n templateUrl: './spx-check-digit.component.html',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n SpxValidateControlComponent,\r\n SpxInputComponent\r\n]\r\n})\r\nexport class SpxCheckDigitComponent {\r\n @Input() txtCheckDigit!: string;\r\n @Input() txtContainer!: string;\r\n @Input() txtPrefix!: string;\r\n @ViewChild('ctrlContainerNumberRef') ctrlContainerNumberRef?: SpxInputComponent;\r\n inputTypeOverlayNumber = SpxInputTypeEnum.overlayNumber;\r\n inputTypeText = SpxInputTypeEnum.text;\r\n formGroup: FormGroup;\r\n\r\n get ctrlCheckDigit(): FormControl { return this.formGroup.get(ctrlCheckDigit) as FormControl; }\r\n get ctrlContainerNumber(): FormControl { return this.formGroup.get(ctrlContainerNumber) as FormControl; }\r\n get ctrlContainerPrefix(): FormControl { return this.formGroup.get(ctrlPrefix) as FormControl; }\r\n\r\n private inputChanges?: Subscription;\r\n\r\n constructor(\r\n private readonly formBuilder: FormBuilder,\r\n ) {\r\n this.formGroup = this.formBuilder.group({\r\n [ctrlCheckDigit]: [null, []],\r\n [ctrlContainerNumber]: [null, [\r\n spxValidatorRequired(),\r\n spxValidatorMaxLength(6),\r\n spxValidatorMinLength(6),\r\n spxValidatorPattern(/[0-9]{6}/),\r\n ]],\r\n [ctrlPrefix]: [null, [\r\n spxValidatorRequired(),\r\n spxValidatorMaxLength(4),\r\n spxValidatorMinLength(4),\r\n spxValidatorPattern(/[a-zA-Z]{4}/),\r\n ]],\r\n })\r\n }\r\n\r\n ngOnInit(): void {\r\n this.inputChanges = combineLatest([\r\n this.ctrlContainerNumber.valueChanges.pipe(startWith(this.ctrlContainerNumber.value)),\r\n this.ctrlContainerPrefix.valueChanges.pipe(startWith(this.ctrlContainerPrefix.value)),\r\n ])\r\n .pipe(map(([containerNumber$, prefix$]) => ({\r\n containerNumber: containerNumber$,\r\n prefix: prefix$\r\n })))\r\n .subscribe((v) => {\r\n if (this.ctrlContainerNumber.invalid || this.ctrlContainerPrefix.invalid) {\r\n this.ctrlCheckDigit.setValue(null, { emitEvent: false });\r\n } else {\r\n const prefix = valuePairToValue(this.ctrlContainerPrefix.value);\r\n const containerNumber = valuePairToValue(this.ctrlContainerNumber.value);\r\n const checkDigit = calcCheckDigit(`${prefix}${containerNumber}`);\r\n this.ctrlCheckDigit.setValue({ value: checkDigit }, { emitEvent: false });\r\n }\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n setTimeout(() => {\r\n this.ctrlContainerNumberRef?.setFocusIn(); \r\n }, 250);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.inputChanges) {\r\n this.inputChanges.unsubscribe();\r\n }\r\n }\r\n\r\n getRawValidators(formControl: FormControl) {\r\n return (formControl as any)._rawValidators;\r\n }\r\n}\r\n","<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\r\n <spx-input\r\n #ctrlContainerNumberRef\r\n [formControl]=\"ctrlContainerNumber\"\r\n [spxAutofocus]=\"true\"\r\n [spxCapitalize]=\"true\"\r\n [spxLabel]=\"txtContainer\"\r\n [spxPattern]=\"'[0-9]*'\"\r\n [spxRequired]=\"true\"\r\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\r\n [spxType]=\"inputTypeOverlayNumber\"\r\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\r\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\r\n </spx-input>\r\n <spx-input\r\n [formControl]=\"ctrlContainerPrefix\"\r\n [spxCapitalize]=\"true\"\r\n [spxLabel]=\"txtPrefix\"\r\n [spxRequired]=\"true\"\r\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\r\n [spxType]=\"inputTypeText\"\r\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\r\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\r\n </spx-input>\r\n @if (ctrlCheckDigit.value) {\r\n <spx-input\r\n [formControl]=\"ctrlCheckDigit\"\r\n [spxLabel]=\"txtCheckDigit\"\r\n [spxReadonly]=\"true\"\r\n [spxType]=\"inputTypeText\">\r\n </spx-input>\r\n }\r\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAQA,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAC9C,MAAM,UAAU,GAAG,QAAQ,CAAC;MAaf,sBAAsB,CAAA;AASjC,IAAA,IAAI,cAAc,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAgB,CAAC,EAAE;AAC/F,IAAA,IAAI,mBAAmB,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAgB,CAAC,EAAE;AACzG,IAAA,IAAI,mBAAmB,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAgB,CAAC,EAAE;AAIhG,IAAA,WAAA,CACmB,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;AAX3C,QAAA,IAAA,CAAA,sBAAsB,GAAG,gBAAgB,CAAC,aAAa,CAAC;AACxD,QAAA,IAAA,CAAA,aAAa,GAAG,gBAAgB,CAAC,IAAI,CAAC;QAYpC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AACtC,YAAA,CAAC,cAAc,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;AAC5B,YAAA,CAAC,mBAAmB,GAAG,CAAC,IAAI,EAAE;AAC5B,oBAAA,oBAAoB,EAAE;oBACtB,qBAAqB,CAAC,CA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OAAA,EAAA;wBACP,WAAW;wBACX,mBAAmB;wBACnB,2BAA2B;wBAC3B,iBAAiB;AACpB,qBAAA,EAAA,QAAA,EAAA,65CAAA,EAAA,CAAA;gFAGU,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBAC+B,sBAAsB,EAAA,CAAA;sBAA1D,SAAS;uBAAC,wBAAwB,CAAA;;;AE3BrC;;AAEG;;;;"}
|
|
@@ -95,7 +95,7 @@ class SpxAutocompleteSearchComponent {
|
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxAutocompleteSearchComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
98
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SpxAutocompleteSearchComponent, isStandalone: true, selector: "spx-autocomplete-search", inputs: { spxSuggestions: "spxSuggestions", spxField: "spxField", txtOptions: "txtOptions", txtQuery: "txtQuery", txtSubmit: "txtSubmit", spxValuePair: "spxValuePair" }, outputs: { spxCancel: "spxCancel", spxSearch: "spxSearch", spxSubmit: "spxSubmit" }, ngImport: i0, template: "<form class=\"bg-black fixed pt-16 z-50 top-0 left-0 right-0 bottom-0\" [formGroup]=\"formGroup\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"h-full w-full px-3 flex flex-col gap-3\">\r\n <div class=\"grow flex flex-col gap-3 overflow-y-auto\">\r\n <spx-input [formControl]=\"ctrlQuery\" [spxLabel]=\"txtQuery\" [spxType]=\"inputTypeText\">\r\n </spx-input>\r\n <spx-input [formControl]=\"ctrlOptions\" [spxLabel]=\"txtOptions\" [spxSuggestions]=\"spxSuggestions\"\r\n [spxType]=\"inputTypeRadio\">\r\n </spx-input>\r\n </div>\r\n <div class=\"py-3 flex flex-col gap-3\">\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severitySuccess\">\r\n Save\r\n </spx-button>\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severityError\" [spxType]=\"'button'\" (spxClick)=\"onCancel()\">\r\n Cancel\r\n </spx-button>\r\n </div>\r\n </div>\r\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
|
|
98
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SpxAutocompleteSearchComponent, isStandalone: true, selector: "spx-autocomplete-search", inputs: { spxSuggestions: "spxSuggestions", spxField: "spxField", txtOptions: "txtOptions", txtQuery: "txtQuery", txtSubmit: "txtSubmit", spxValuePair: "spxValuePair" }, outputs: { spxCancel: "spxCancel", spxSearch: "spxSearch", spxSubmit: "spxSubmit" }, ngImport: i0, template: "<form class=\"bg-black fixed pt-16 z-50 top-0 left-0 right-0 bottom-0\" [formGroup]=\"formGroup\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"h-full w-full px-3 flex flex-col gap-3\">\r\n <div class=\"grow flex flex-col gap-3 overflow-y-auto\">\r\n <spx-input [formControl]=\"ctrlQuery\" [spxLabel]=\"txtQuery\" [spxType]=\"inputTypeText\">\r\n </spx-input>\r\n <spx-input [formControl]=\"ctrlOptions\" [spxLabel]=\"txtOptions\" [spxSuggestions]=\"spxSuggestions\"\r\n [spxType]=\"inputTypeRadio\">\r\n </spx-input>\r\n </div>\r\n <div class=\"py-3 flex flex-col gap-3\">\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severitySuccess\">\r\n Save\r\n </spx-button>\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severityError\" [spxType]=\"'button'\" (spxClick)=\"onCancel()\">\r\n Cancel\r\n </spx-button>\r\n </div>\r\n </div>\r\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxAlertMessageSeverity", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
|
|
99
99
|
}
|
|
100
100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxAutocompleteSearchComponent, decorators: [{
|
|
101
101
|
type: Component,
|
|
@@ -293,7 +293,7 @@ class SpxFormViewComponent {
|
|
|
293
293
|
</spx-button>
|
|
294
294
|
}
|
|
295
295
|
</div>
|
|
296
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SpxAutocompleteSearchComponent, selector: "spx-autocomplete-search", inputs: ["spxSuggestions", "spxField", "txtOptions", "txtQuery", "txtSubmit", "spxValuePair"], outputs: ["spxCancel", "spxSearch", "spxSubmit"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "component", type: SpxFormSectionComponent, selector: "spx-form-section", inputs: ["spxIndex", "spxIndexSecondary", "spxTitle", "spxShowTitle"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }, { kind: "component", type: SpxValidateControlComponent, selector: "spx-validate-control", inputs: ["control", "label", "submitTried"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
296
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SpxAutocompleteSearchComponent, selector: "spx-autocomplete-search", inputs: ["spxSuggestions", "spxField", "txtOptions", "txtQuery", "txtSubmit", "spxValuePair"], outputs: ["spxCancel", "spxSearch", "spxSubmit"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "component", type: SpxFormSectionComponent, selector: "spx-form-section", inputs: ["spxIndex", "spxIndexSecondary", "spxTitle", "spxShowTitle"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxAlertMessageSeverity", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }, { kind: "component", type: SpxValidateControlComponent, selector: "spx-validate-control", inputs: ["control", "label", "submitTried"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
297
297
|
}
|
|
298
298
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxFormViewComponent, decorators: [{
|
|
299
299
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-form-view.mjs","sources":["../../../../projects/softpak/components/spx-form-view/spx-form-button-type.enum.ts","../../../../projects/softpak/components/spx-form-view/spx-autocomplete-search.component.ts","../../../../projects/softpak/components/spx-form-view/spx-autocomplete-search.component.html","../../../../projects/softpak/components/spx-form-view/spx-form-view.component.ts","../../../../projects/softpak/components/spx-form-view/softpak-components-spx-form-view.ts"],"sourcesContent":["export enum SpxFormButtonTypeEnum {\r\n button = 'button',\r\n submit = 'submit',\r\n}\r\n","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { Subscription, debounceTime } from 'rxjs';\r\n\r\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\r\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\r\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\r\nimport { SpxFormFieldI } from './spx-form-field.interface';\r\nimport { SpxFormSectionI } from './spx-form-section.interface';\r\nimport { SpxValidateControlComponent } from '@softpak/components/spx-validation';\r\n\r\nexport const sectionAutocompleteSearch = 'autocompleteSearch';\r\nexport const ctrlQuery = 'query';\r\nexport const ctrlOptions = 'options';\r\n\r\n@Component({\r\n selector: 'spx-autocomplete-search',\r\n templateUrl: './spx-autocomplete-search.component.html',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n SpxButtonComponent,\r\n SpxInputComponent,\r\n SpxValidateControlComponent\r\n]\r\n})\r\nexport class SpxAutocompleteSearchComponent implements OnInit, OnDestroy {\r\n formGroup!: FormGroup;\r\n @Input() spxSuggestions: SpxValuePair<any>[] = [];\r\n @Input() spxField!: SpxFormFieldI;\r\n @Input() txtOptions!: string;\r\n @Input() txtQuery!: string;\r\n @Input() txtSubmit!: string;\r\n @Input() spxValuePair!: SpxValuePair<any>;\r\n @Output() spxCancel: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() spxSearch: EventEmitter<SpxValuePair<any>> = new EventEmitter<SpxValuePair<any>>(); \r\n @Output() spxSubmit: EventEmitter<SpxValuePair<any>> = new EventEmitter<SpxValuePair<any>>();\r\n inputTypeRadio = SpxInputTypeEnum.radio;\r\n inputTypeText = SpxInputTypeEnum.text;\r\n severityError = SpxSeverityEnum.error;\r\n severitySuccess = SpxSeverityEnum.success;\r\n \r\n sections: SpxFormSectionI[] = [\r\n {\r\n key: sectionAutocompleteSearch,\r\n showTitle: () => false,\r\n fields: [\r\n {\r\n key: ctrlQuery,\r\n type: () => SpxInputTypeEnum.text,\r\n label: () => this.txtQuery,\r\n capitalize: () => true,\r\n },\r\n {\r\n key: ctrlOptions,\r\n type: () => SpxInputTypeEnum.radio,\r\n label: () => this.txtOptions,\r\n },\r\n ]\r\n }\r\n ];\r\n\r\n get ctrlQuery(): FormControl { return this.formGroup.get(ctrlQuery) as FormControl; }\r\n get ctrlOptions(): FormControl { return this.formGroup.get(ctrlOptions) as FormControl; }\r\n\r\n private subSelection?: Subscription;\r\n private subQuery?: Subscription;\r\n\r\n constructor(readonly formBuilder: FormBuilder) {\r\n this.createForm();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.listenToSelection();\r\n this.listenToQuery();\r\n this.ctrlQuery.setValue(this.spxValuePair, { emitEvent: false });\r\n this.spxSearch.emit(this.spxValuePair);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.subSelection) {\r\n this.subSelection.unsubscribe();\r\n }\r\n if (this.subQuery) {\r\n this.subQuery.unsubscribe();\r\n }\r\n }\r\n\r\n private createForm(): void {\r\n this.formGroup = this.formBuilder.group({\r\n [ctrlQuery]: [null],\r\n [ctrlOptions]: [null],\r\n });\r\n }\r\n\r\n getRawValidators(formControl: FormControl) {\r\n return (formControl as any)._rawValidators;\r\n }\r\n\r\n onCancel(): void {\r\n this.spxCancel.emit();\r\n }\r\n \r\n onSubmit(): void {\r\n this.spxSubmit.emit(this.ctrlQuery.value);\r\n }\r\n\r\n private listenToQuery(): void {\r\n this.subQuery = this.ctrlQuery.valueChanges.pipe(debounceTime(500)).subscribe(valuePair => {\r\n this.spxSearch.emit(valuePair);\r\n });\r\n }\r\n\r\n private listenToSelection(): void {\r\n this.subSelection = this.ctrlOptions.valueChanges.subscribe(valuePair => {\r\n this.ctrlQuery.setValue(valuePair);\r\n });\r\n }\r\n}\r\n","<form class=\"bg-black fixed pt-16 z-50 top-0 left-0 right-0 bottom-0\" [formGroup]=\"formGroup\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"h-full w-full px-3 flex flex-col gap-3\">\r\n <div class=\"grow flex flex-col gap-3 overflow-y-auto\">\r\n <spx-input [formControl]=\"ctrlQuery\" [spxLabel]=\"txtQuery\" [spxType]=\"inputTypeText\">\r\n </spx-input>\r\n <spx-input [formControl]=\"ctrlOptions\" [spxLabel]=\"txtOptions\" [spxSuggestions]=\"spxSuggestions\"\r\n [spxType]=\"inputTypeRadio\">\r\n </spx-input>\r\n </div>\r\n <div class=\"py-3 flex flex-col gap-3\">\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severitySuccess\">\r\n Save\r\n </spx-button>\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severityError\" [spxType]=\"'button'\" (spxClick)=\"onCancel()\">\r\n Cancel\r\n </spx-button>\r\n </div>\r\n </div>\r\n</form>","import { JsonPipe } from '@angular/common';\r\nimport { Component, EventEmitter, Input, Output, QueryList, ViewChild, ViewChildren } from '@angular/core';\r\nimport { SpxFormSectionI } from './spx-form-section.interface';\r\nimport { SpxFormSectionComponent } from '@softpak/components/spx-form-section';\r\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\r\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\r\nimport { AbstractControl, FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { SpxFormFieldI } from './spx-form-field.interface';\r\nimport { SpxAutocompleteSearchComponent } from './spx-autocomplete-search.component';\r\nimport { SpxValidateControlComponent } from '@softpak/components/spx-validation';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\r\nimport { SpxFormI } from './spx-form.interface';\r\n\r\n@Component({\r\n selector: 'spx-form-view',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n SpxAutocompleteSearchComponent,\r\n SpxButtonComponent,\r\n SpxCapitalizePipe,\r\n SpxFormSectionComponent,\r\n SpxInputComponent,\r\n SpxValidateControlComponent,\r\n TranslateModule\r\n],\r\n template: `@if (autocompleteField) {\r\n <spx-autocomplete-search\r\n [spxField]=\"autocompleteField\"\r\n [spxSuggestions]=\"this.spxSuggestions[autocompleteField.key]\"\r\n [spxValuePair]=\"$any(this.spxFormGroup.get(autocompleteField.key)).value\"\r\n [txtOptions]=\"'Options'\"\r\n [txtQuery]=\"'Query'\"\r\n [txtSubmit]=\"'Save'\"\r\n (spxCancel)=\"onAutocompleteCancel()\"\r\n (spxSearch)=\"onAutocompleteSearch($event)\"\r\n (spxSubmit)=\"onAutocompleteSave($event)\">\r\n </spx-autocomplete-search>\r\n}\r\n<div class=\"flex flex-col gap-3\">\r\n @for (spxSection of spxForm.sections; track spxSection; let spxSectionIndex = $index) {\r\n <spx-form-section\r\n [spxShowTitle]=\"!spxSection.showTitle || spxSection.showTitle()\"\r\n [spxIndex]=\"spxSectionIndex + 1\"\r\n [spxTitle]=\"spxSection.title ? (spxSection.title() | translate | capitalize) : undefined\">\r\n @for (spxField of spxSection.fields; track spxField; let spxFieldIndex = $index) {\r\n @if (spxField.show === undefined || spxField.show()) {\r\n @if (spxField.type() === typeButton) {\r\n <spx-button\r\n [spxFullWidth]=\"true\"\r\n [spxSeverity]=\"spxField.severity ? spxField.severity() : undefined\"\r\n [spxType]=\"'button'\"\r\n (spxClick)=\"onClick(spxField)\"\r\n >{{ (spxField.label ? spxField.label() : spxField.key) | translate | capitalize }}</spx-button>\r\n }\r\n @if (spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard) {\r\n <spx-input\r\n [formControl]=\"$any(this.spxFormGroup.get(spxField.key))\"\r\n [spxAutofocus]=\"spxField.autofocus ? spxField.autofocus() : false\"\r\n [spxCapitalize]=\"spxField.capitalize ? spxField.capitalize() : false\"\r\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\r\n [spxName]=\"spxField.key\"\r\n [spxPattern]=\"spxField.type() === typeNumericKeyboard ? '\\\\d*' : undefined\"\r\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\r\n [spxRequired]=\"hasRequiredField(this.spxFormGroup.get(spxField.key)!)\"\r\n [spxShowSearch]=\"spxField.type() === typeAutocomplete\"\r\n [spxShowHelp]=\"false\"\r\n [spxShowValidationMessages]=\"this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched\"\r\n [spxStep]=\"spxField.step ? spxField.step() : undefined\"\r\n [spxType]=\"spxField.type()\"\r\n [spxValidators]=\"getRawValidators(this.spxFormGroup.get(spxField.key)!)\"\r\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]\"\r\n (spxBlur)=\"onBlur(spxField)\"\r\n (spxSearch)=\"onSearch(spxField)\">\r\n <spx-validate-control [control]=\"$any(this.spxFormGroup.get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key)| translate | capitalize\"></spx-validate-control>\r\n </spx-input>\r\n }\r\n @if (spxField.type() === typeRadio) {\r\n <spx-input\r\n [formControl]=\"$any(this.spxFormGroup.get(spxField.key))\"\r\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\r\n [spxName]=\"spxField.key\"\r\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\r\n [spxRequired]=\"hasRequiredField(this.spxFormGroup.get(spxField.key)!)\"\r\n [spxShowHelp]=\"false\"\r\n [spxShowValidationMessages]=\"this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched\"\r\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]\"\r\n [spxType]=\"typeRadio\"\r\n [spxValidators]=\"getRawValidators(this.spxFormGroup.get(spxField.key)!)\">\r\n <spx-validate-control [control]=\"$any(this.spxFormGroup.get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"></spx-validate-control>\r\n </spx-input>\r\n }\r\n }\r\n }\r\n </spx-form-section>\r\n }\r\n\r\n @for (spxButton of spxForm.buttons; track spxButton) {\r\n <spx-button\r\n [spxFullWidth]=\"true\"\r\n [spxSeverity]=\"spxButton.severity\"\r\n [spxType]=\"spxButton.type\"\r\n (spxClick)=\"spxButton.onClick ? spxButton.onClick() : undefined\">\r\n {{ ((spxButton && spxButton.label) ? spxButton.label() : '') | translate | capitalize }}\r\n </spx-button>\r\n }\r\n</div>\r\n`,\r\n})\r\nexport class SpxFormViewComponent {\r\n @Input() spxFormGroup!: FormGroup;\r\n @Input() spxForm!: SpxFormI;\r\n @Input() spxSuggestions!: any;\r\n @Output() spxBlur: EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }> = new EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }>();\r\n @Output() spxClick: EventEmitter<{ field: SpxFormFieldI }> = new EventEmitter<{ field: SpxFormFieldI }>();\r\n @Output() spxSearch: EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }> = new EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }>();\r\n @ViewChildren(SpxInputComponent) spxInputs!: QueryList<SpxInputComponent>;\r\n autocompleteField?: SpxFormFieldI;\r\n\r\n typeAutocomplete = SpxInputTypeEnum.autocomplete;\r\n typeButton = SpxInputTypeEnum.button;\r\n typeFloat = SpxInputTypeEnum.float;\r\n typeNumber = SpxInputTypeEnum.number;\r\n typeRadio = SpxInputTypeEnum.radio;\r\n typeText = SpxInputTypeEnum.text;\r\n typeNumericKeyboard = SpxInputTypeEnum.textNumericKeyboard;\r\n typeOverlay = SpxInputTypeEnum.overlay;\r\n typeOverlayNumber = SpxInputTypeEnum.overlayNumber;\r\n\r\n setAutofocus(key: string): void {\r\n const field = this.spxInputs.find(input => input.spxName === key);\r\n if (field) {\r\n field.setFocusIn();\r\n }\r\n }\r\n\r\n onBlur(field: SpxFormFieldI) {\r\n this.spxBlur.emit({\r\n field,\r\n valuePair: this.spxFormGroup.get(field.key)!.value,\r\n });\r\n }\r\n\r\n onClick(field: SpxFormFieldI) {\r\n this.spxClick.emit({\r\n field,\r\n });\r\n }\r\n\r\n onAutocompleteCancel(): void {\r\n this.autocompleteField = undefined;\r\n }\r\n\r\n onAutocompleteSearch(valuePair: SpxValuePair<any>): void {\r\n if (this.autocompleteField) {\r\n this.spxSearch.emit({\r\n field: this.autocompleteField,\r\n valuePair,\r\n });\r\n }\r\n }\r\n\r\n onAutocompleteSave(valuePair: SpxValuePair<any>) {\r\n this.spxFormGroup.get(this.autocompleteField!.key)?.setValue(valuePair);\r\n this.autocompleteField = undefined;\r\n }\r\n\r\n onSearch(field: SpxFormFieldI) {\r\n this.autocompleteField = field;\r\n }\r\n\r\n getRawValidators(formControl: AbstractControl) {\r\n // eslint-disable-next-line no-underscore-dangle\r\n return (formControl as any)._rawValidators;\r\n }\r\n\r\n hasRequiredField(abstractControl: AbstractControl): boolean {\r\n if (abstractControl.validator) {\r\n const validator = abstractControl.validator({} as AbstractControl);\r\n if (validator && validator['required']) {\r\n return true;\r\n }\r\n }\r\n if ((abstractControl as any)['controls']) {\r\n for (const controlName in (abstractControl as any)['controls']) {\r\n if ((abstractControl as any)['controls'][controlName]) {\r\n if (this.hasRequiredField((abstractControl as any)['controls'][controlName])) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n static initialFormValue(sections: SpxFormSectionI[]) {\r\n const formObject: any = {};\r\n sections.forEach(section => {\r\n section.fields.forEach(field => {\r\n formObject[field.key] = [field.defaultValue ? field.defaultValue() : null, field.validators ? [...field.validators()] : []];\r\n });\r\n });\r\n return formObject;\r\n }\r\n\r\n static createForm(formBuilder: FormBuilder, sections: SpxFormSectionI[]): FormGroup {\r\n return formBuilder.group(this.initialFormValue(sections));\r\n }\r\n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CAAA;sBAAjB,MAAM;gBACG,SAAS,EAAA,CAAA;sBAAlB,MAAM;gBAC0B,SAAS,EAAA,CAAA;sBAAzC,YAAY;uBAAC,iBAAiB,CAAA;;;ACtHjC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-form-view.mjs","sources":["../../../../projects/softpak/components/spx-form-view/spx-form-button-type.enum.ts","../../../../projects/softpak/components/spx-form-view/spx-autocomplete-search.component.ts","../../../../projects/softpak/components/spx-form-view/spx-autocomplete-search.component.html","../../../../projects/softpak/components/spx-form-view/spx-form-view.component.ts","../../../../projects/softpak/components/spx-form-view/softpak-components-spx-form-view.ts"],"sourcesContent":["export enum SpxFormButtonTypeEnum {\r\n button = 'button',\r\n submit = 'submit',\r\n}\r\n","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { Subscription, debounceTime } from 'rxjs';\r\n\r\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\r\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\r\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\r\nimport { SpxFormFieldI } from './spx-form-field.interface';\r\nimport { SpxFormSectionI } from './spx-form-section.interface';\r\nimport { SpxValidateControlComponent } from '@softpak/components/spx-validation';\r\n\r\nexport const sectionAutocompleteSearch = 'autocompleteSearch';\r\nexport const ctrlQuery = 'query';\r\nexport const ctrlOptions = 'options';\r\n\r\n@Component({\r\n selector: 'spx-autocomplete-search',\r\n templateUrl: './spx-autocomplete-search.component.html',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n SpxButtonComponent,\r\n SpxInputComponent,\r\n SpxValidateControlComponent\r\n]\r\n})\r\nexport class SpxAutocompleteSearchComponent implements OnInit, OnDestroy {\r\n formGroup!: FormGroup;\r\n @Input() spxSuggestions: SpxValuePair<any>[] = [];\r\n @Input() spxField!: SpxFormFieldI;\r\n @Input() txtOptions!: string;\r\n @Input() txtQuery!: string;\r\n @Input() txtSubmit!: string;\r\n @Input() spxValuePair!: SpxValuePair<any>;\r\n @Output() spxCancel: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() spxSearch: EventEmitter<SpxValuePair<any>> = new EventEmitter<SpxValuePair<any>>(); \r\n @Output() spxSubmit: EventEmitter<SpxValuePair<any>> = new EventEmitter<SpxValuePair<any>>();\r\n inputTypeRadio = SpxInputTypeEnum.radio;\r\n inputTypeText = SpxInputTypeEnum.text;\r\n severityError = SpxSeverityEnum.error;\r\n severitySuccess = SpxSeverityEnum.success;\r\n \r\n sections: SpxFormSectionI[] = [\r\n {\r\n key: sectionAutocompleteSearch,\r\n showTitle: () => false,\r\n fields: [\r\n {\r\n key: ctrlQuery,\r\n type: () => SpxInputTypeEnum.text,\r\n label: () => this.txtQuery,\r\n capitalize: () => true,\r\n },\r\n {\r\n key: ctrlOptions,\r\n type: () => SpxInputTypeEnum.radio,\r\n label: () => this.txtOptions,\r\n },\r\n ]\r\n }\r\n ];\r\n\r\n get ctrlQuery(): FormControl { return this.formGroup.get(ctrlQuery) as FormControl; }\r\n get ctrlOptions(): FormControl { return this.formGroup.get(ctrlOptions) as FormControl; }\r\n\r\n private subSelection?: Subscription;\r\n private subQuery?: Subscription;\r\n\r\n constructor(readonly formBuilder: FormBuilder) {\r\n this.createForm();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.listenToSelection();\r\n this.listenToQuery();\r\n this.ctrlQuery.setValue(this.spxValuePair, { emitEvent: false });\r\n this.spxSearch.emit(this.spxValuePair);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.subSelection) {\r\n this.subSelection.unsubscribe();\r\n }\r\n if (this.subQuery) {\r\n this.subQuery.unsubscribe();\r\n }\r\n }\r\n\r\n private createForm(): void {\r\n this.formGroup = this.formBuilder.group({\r\n [ctrlQuery]: [null],\r\n [ctrlOptions]: [null],\r\n });\r\n }\r\n\r\n getRawValidators(formControl: FormControl) {\r\n return (formControl as any)._rawValidators;\r\n }\r\n\r\n onCancel(): void {\r\n this.spxCancel.emit();\r\n }\r\n \r\n onSubmit(): void {\r\n this.spxSubmit.emit(this.ctrlQuery.value);\r\n }\r\n\r\n private listenToQuery(): void {\r\n this.subQuery = this.ctrlQuery.valueChanges.pipe(debounceTime(500)).subscribe(valuePair => {\r\n this.spxSearch.emit(valuePair);\r\n });\r\n }\r\n\r\n private listenToSelection(): void {\r\n this.subSelection = this.ctrlOptions.valueChanges.subscribe(valuePair => {\r\n this.ctrlQuery.setValue(valuePair);\r\n });\r\n }\r\n}\r\n","<form class=\"bg-black fixed pt-16 z-50 top-0 left-0 right-0 bottom-0\" [formGroup]=\"formGroup\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"h-full w-full px-3 flex flex-col gap-3\">\r\n <div class=\"grow flex flex-col gap-3 overflow-y-auto\">\r\n <spx-input [formControl]=\"ctrlQuery\" [spxLabel]=\"txtQuery\" [spxType]=\"inputTypeText\">\r\n </spx-input>\r\n <spx-input [formControl]=\"ctrlOptions\" [spxLabel]=\"txtOptions\" [spxSuggestions]=\"spxSuggestions\"\r\n [spxType]=\"inputTypeRadio\">\r\n </spx-input>\r\n </div>\r\n <div class=\"py-3 flex flex-col gap-3\">\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severitySuccess\">\r\n Save\r\n </spx-button>\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severityError\" [spxType]=\"'button'\" (spxClick)=\"onCancel()\">\r\n Cancel\r\n </spx-button>\r\n </div>\r\n </div>\r\n</form>","import { JsonPipe } from '@angular/common';\r\nimport { Component, EventEmitter, Input, Output, QueryList, ViewChild, ViewChildren } from '@angular/core';\r\nimport { SpxFormSectionI } from './spx-form-section.interface';\r\nimport { SpxFormSectionComponent } from '@softpak/components/spx-form-section';\r\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\r\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\r\nimport { AbstractControl, FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { SpxFormFieldI } from './spx-form-field.interface';\r\nimport { SpxAutocompleteSearchComponent } from './spx-autocomplete-search.component';\r\nimport { SpxValidateControlComponent } from '@softpak/components/spx-validation';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\r\nimport { SpxFormI } from './spx-form.interface';\r\n\r\n@Component({\r\n selector: 'spx-form-view',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n SpxAutocompleteSearchComponent,\r\n SpxButtonComponent,\r\n SpxCapitalizePipe,\r\n SpxFormSectionComponent,\r\n SpxInputComponent,\r\n SpxValidateControlComponent,\r\n TranslateModule\r\n],\r\n template: `@if (autocompleteField) {\r\n <spx-autocomplete-search\r\n [spxField]=\"autocompleteField\"\r\n [spxSuggestions]=\"this.spxSuggestions[autocompleteField.key]\"\r\n [spxValuePair]=\"$any(this.spxFormGroup.get(autocompleteField.key)).value\"\r\n [txtOptions]=\"'Options'\"\r\n [txtQuery]=\"'Query'\"\r\n [txtSubmit]=\"'Save'\"\r\n (spxCancel)=\"onAutocompleteCancel()\"\r\n (spxSearch)=\"onAutocompleteSearch($event)\"\r\n (spxSubmit)=\"onAutocompleteSave($event)\">\r\n </spx-autocomplete-search>\r\n}\r\n<div class=\"flex flex-col gap-3\">\r\n @for (spxSection of spxForm.sections; track spxSection; let spxSectionIndex = $index) {\r\n <spx-form-section\r\n [spxShowTitle]=\"!spxSection.showTitle || spxSection.showTitle()\"\r\n [spxIndex]=\"spxSectionIndex + 1\"\r\n [spxTitle]=\"spxSection.title ? (spxSection.title() | translate | capitalize) : undefined\">\r\n @for (spxField of spxSection.fields; track spxField; let spxFieldIndex = $index) {\r\n @if (spxField.show === undefined || spxField.show()) {\r\n @if (spxField.type() === typeButton) {\r\n <spx-button\r\n [spxFullWidth]=\"true\"\r\n [spxSeverity]=\"spxField.severity ? spxField.severity() : undefined\"\r\n [spxType]=\"'button'\"\r\n (spxClick)=\"onClick(spxField)\"\r\n >{{ (spxField.label ? spxField.label() : spxField.key) | translate | capitalize }}</spx-button>\r\n }\r\n @if (spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard) {\r\n <spx-input\r\n [formControl]=\"$any(this.spxFormGroup.get(spxField.key))\"\r\n [spxAutofocus]=\"spxField.autofocus ? spxField.autofocus() : false\"\r\n [spxCapitalize]=\"spxField.capitalize ? spxField.capitalize() : false\"\r\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\r\n [spxName]=\"spxField.key\"\r\n [spxPattern]=\"spxField.type() === typeNumericKeyboard ? '\\\\d*' : undefined\"\r\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\r\n [spxRequired]=\"hasRequiredField(this.spxFormGroup.get(spxField.key)!)\"\r\n [spxShowSearch]=\"spxField.type() === typeAutocomplete\"\r\n [spxShowHelp]=\"false\"\r\n [spxShowValidationMessages]=\"this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched\"\r\n [spxStep]=\"spxField.step ? spxField.step() : undefined\"\r\n [spxType]=\"spxField.type()\"\r\n [spxValidators]=\"getRawValidators(this.spxFormGroup.get(spxField.key)!)\"\r\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]\"\r\n (spxBlur)=\"onBlur(spxField)\"\r\n (spxSearch)=\"onSearch(spxField)\">\r\n <spx-validate-control [control]=\"$any(this.spxFormGroup.get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key)| translate | capitalize\"></spx-validate-control>\r\n </spx-input>\r\n }\r\n @if (spxField.type() === typeRadio) {\r\n <spx-input\r\n [formControl]=\"$any(this.spxFormGroup.get(spxField.key))\"\r\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\r\n [spxName]=\"spxField.key\"\r\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\r\n [spxRequired]=\"hasRequiredField(this.spxFormGroup.get(spxField.key)!)\"\r\n [spxShowHelp]=\"false\"\r\n [spxShowValidationMessages]=\"this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched\"\r\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]\"\r\n [spxType]=\"typeRadio\"\r\n [spxValidators]=\"getRawValidators(this.spxFormGroup.get(spxField.key)!)\">\r\n <spx-validate-control [control]=\"$any(this.spxFormGroup.get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"></spx-validate-control>\r\n </spx-input>\r\n }\r\n }\r\n }\r\n </spx-form-section>\r\n }\r\n\r\n @for (spxButton of spxForm.buttons; track spxButton) {\r\n <spx-button\r\n [spxFullWidth]=\"true\"\r\n [spxSeverity]=\"spxButton.severity\"\r\n [spxType]=\"spxButton.type\"\r\n (spxClick)=\"spxButton.onClick ? spxButton.onClick() : undefined\">\r\n {{ ((spxButton && spxButton.label) ? spxButton.label() : '') | translate | capitalize }}\r\n </spx-button>\r\n }\r\n</div>\r\n`,\r\n})\r\nexport class SpxFormViewComponent {\r\n @Input() spxFormGroup!: FormGroup;\r\n @Input() spxForm!: SpxFormI;\r\n @Input() spxSuggestions!: any;\r\n @Output() spxBlur: EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }> = new EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }>();\r\n @Output() spxClick: EventEmitter<{ field: SpxFormFieldI }> = new EventEmitter<{ field: SpxFormFieldI }>();\r\n @Output() spxSearch: EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }> = new EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }>();\r\n @ViewChildren(SpxInputComponent) spxInputs!: QueryList<SpxInputComponent>;\r\n autocompleteField?: SpxFormFieldI;\r\n\r\n typeAutocomplete = SpxInputTypeEnum.autocomplete;\r\n typeButton = SpxInputTypeEnum.button;\r\n typeFloat = SpxInputTypeEnum.float;\r\n typeNumber = SpxInputTypeEnum.number;\r\n typeRadio = SpxInputTypeEnum.radio;\r\n typeText = SpxInputTypeEnum.text;\r\n typeNumericKeyboard = SpxInputTypeEnum.textNumericKeyboard;\r\n typeOverlay = SpxInputTypeEnum.overlay;\r\n typeOverlayNumber = SpxInputTypeEnum.overlayNumber;\r\n\r\n setAutofocus(key: string): void {\r\n const field = this.spxInputs.find(input => input.spxName === key);\r\n if (field) {\r\n field.setFocusIn();\r\n }\r\n }\r\n\r\n onBlur(field: SpxFormFieldI) {\r\n this.spxBlur.emit({\r\n field,\r\n valuePair: this.spxFormGroup.get(field.key)!.value,\r\n });\r\n }\r\n\r\n onClick(field: SpxFormFieldI) {\r\n this.spxClick.emit({\r\n field,\r\n });\r\n }\r\n\r\n onAutocompleteCancel(): void {\r\n this.autocompleteField = undefined;\r\n }\r\n\r\n onAutocompleteSearch(valuePair: SpxValuePair<any>): void {\r\n if (this.autocompleteField) {\r\n this.spxSearch.emit({\r\n field: this.autocompleteField,\r\n valuePair,\r\n });\r\n }\r\n }\r\n\r\n onAutocompleteSave(valuePair: SpxValuePair<any>) {\r\n this.spxFormGroup.get(this.autocompleteField!.key)?.setValue(valuePair);\r\n this.autocompleteField = undefined;\r\n }\r\n\r\n onSearch(field: SpxFormFieldI) {\r\n this.autocompleteField = field;\r\n }\r\n\r\n getRawValidators(formControl: AbstractControl) {\r\n // eslint-disable-next-line no-underscore-dangle\r\n return (formControl as any)._rawValidators;\r\n }\r\n\r\n hasRequiredField(abstractControl: AbstractControl): boolean {\r\n if (abstractControl.validator) {\r\n const validator = abstractControl.validator({} as AbstractControl);\r\n if (validator && validator['required']) {\r\n return true;\r\n }\r\n }\r\n if ((abstractControl as any)['controls']) {\r\n for (const controlName in (abstractControl as any)['controls']) {\r\n if ((abstractControl as any)['controls'][controlName]) {\r\n if (this.hasRequiredField((abstractControl as any)['controls'][controlName])) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n static initialFormValue(sections: SpxFormSectionI[]) {\r\n const formObject: any = {};\r\n sections.forEach(section => {\r\n section.fields.forEach(field => {\r\n formObject[field.key] = [field.defaultValue ? field.defaultValue() : null, field.validators ? [...field.validators()] : []];\r\n });\r\n });\r\n return formObject;\r\n }\r\n\r\n static createForm(formBuilder: FormBuilder, sections: SpxFormSectionI[]): FormGroup {\r\n return formBuilder.group(this.initialFormValue(sections));\r\n }\r\n\r\n constructor(readonly formBuilder: FormBuilder) {\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;IAAY,sBAGX;AAHD,CAAA,UAAY,qBAAqB,EAAA;AAC7B,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACrB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAGhC,EAAA,CAAA,CAAA;;ACQM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AACvD,MAAM,SAAS,GAAG,OAAO,CAAC;AAC1B,MAAM,WAAW,GAAG,SAAS,CAAC;MAcxB,8BAA8B,CAAA;AAoCzC,IAAA,IAAI,SAAS,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAgB,CAAC,EAAE;AACrF,IAAA,IAAI,WAAW,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WA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A,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,WAAW;wBACX,mBAAmB;wBACnB,8BAA8B;wBAC9B,kBAAkB;wBAClB,iBAAiB;wBACjB,uBAAuB;wBACvB,iBAAiB;wBACjB,2BAA2B;wBAC3B,eAAe;AAClB,qBAAA;AACC,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiFX,CAAA;AACA,iBAAA,CAAA;gFAEU,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBACI,OAAO,EAAA,CAAA;sBAAhB,MAAM;gBACG,QAAQ,EAAA,CAAA;sBAAjB,MAAM;gBACG,SAAS,EAAA,CAAA;sBAAlB,MAAM;gBAC0B,SAAS,EAAA,CAAA;sBAAzC,YAAY;uBAAC,iBAAiB,CAAA;;;ACtHjC;;AAEG;;;;"}
|
|
@@ -1502,7 +1502,7 @@ class SpxInputComponent {
|
|
|
1502
1502
|
this.onTouched = fn;
|
|
1503
1503
|
}
|
|
1504
1504
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1505
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SpxInputComponent, isStandalone: true, selector: "spx-input", inputs: { spxLabel: "spxLabel", spxMax: "spxMax", spxMin: "spxMin", spxName: "spxName", spxReadonly: "spxReadonly", spxAutocomplete: "spxAutocomplete", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxPattern: "spxPattern", spxRequired: "spxRequired", spxSelectMonth: "spxSelectMonth", spxSelectDay: "spxSelectDay", spxShowEdit: "spxShowEdit", spxShowHelp: "spxShowHelp", spxShowLabel: "spxShowLabel", spxCompact: "spxCompact", spxShowClear: "spxShowClear", spxShowSearch: "spxShowSearch", spxShowValidationMessages: "spxShowValidationMessages", spxStep: "spxStep", spxSuggestions: "spxSuggestions", spxType: "spxType", spxValidators: "spxValidators", value: "value", spxCapitalize: "spxCapitalize", spxFocused: "spxFocused" }, outputs: { spxBlur: "spxBlur", spxClear: "spxClear", spxChange: "spxChange", spxFocus: "spxFocus", spxEdit: "spxEdit", spxHelp: "spxHelp", spxSearch: "spxSearch" }, host: { listeners: { "spxChange": "handleChangeEvent($event)", "focusout": "_handleBlurEvent()" } }, providers: [
|
|
1505
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SpxInputComponent, isStandalone: true, selector: "spx-input", inputs: { spxLabel: "spxLabel", spxMax: "spxMax", spxMin: "spxMin", spxName: "spxName", spxReadonly: "spxReadonly", spxAutocomplete: "spxAutocomplete", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxPattern: "spxPattern", spxRequired: "spxRequired", spxSelectMonth: "spxSelectMonth", spxSelectDay: "spxSelectDay", spxShowEdit: "spxShowEdit", spxShowHelp: "spxShowHelp", spxShowLabel: "spxShowLabel", spxCompact: "spxCompact", spxShowClear: "spxShowClear", spxShowSearch: "spxShowSearch", spxAlertMessageSeverity: "spxAlertMessageSeverity", spxShowValidationMessages: "spxShowValidationMessages", spxStep: "spxStep", spxSuggestions: "spxSuggestions", spxType: "spxType", spxValidators: "spxValidators", value: "value", spxCapitalize: "spxCapitalize", spxFocused: "spxFocused" }, outputs: { spxBlur: "spxBlur", spxClear: "spxClear", spxChange: "spxChange", spxFocus: "spxFocus", spxEdit: "spxEdit", spxHelp: "spxHelp", spxSearch: "spxSearch" }, host: { listeners: { "spxChange": "handleChangeEvent($event)", "focusout": "_handleBlurEvent()" } }, providers: [
|
|
1506
1506
|
{
|
|
1507
1507
|
provide: NG_VALUE_ACCESSOR,
|
|
1508
1508
|
useExisting: SpxInputComponent,
|
|
@@ -1510,6 +1510,7 @@ class SpxInputComponent {
|
|
|
1510
1510
|
}
|
|
1511
1511
|
], viewQueries: [{ propertyName: "floatInput", first: true, predicate: SpxInputFloatComponent, descendants: true }, { propertyName: "numberInput", first: true, predicate: SpxInputNumberComponent, descendants: true }, { propertyName: "textInput", first: true, predicate: SpxInputTextComponent, descendants: true }, { propertyName: "timeInput", first: true, predicate: SpxInputTimeComponent, descendants: true }, { propertyName: "radioInput", first: true, predicate: SpxInputRadioComponent, descendants: true }], ngImport: i0, template: `<spx-input-box
|
|
1512
1512
|
[spxFocused]="this.spxFocused"
|
|
1513
|
+
[spxAlertMessageSeverity]="this.spxAlertMessageSeverity"
|
|
1513
1514
|
[spxLabel]="this.spxLabel"
|
|
1514
1515
|
[spxReadonly]="this.spxReadonly"
|
|
1515
1516
|
[spxRequired]="this.spxRequired"
|
|
@@ -1645,6 +1646,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1645
1646
|
],
|
|
1646
1647
|
template: `<spx-input-box
|
|
1647
1648
|
[spxFocused]="this.spxFocused"
|
|
1649
|
+
[spxAlertMessageSeverity]="this.spxAlertMessageSeverity"
|
|
1648
1650
|
[spxLabel]="this.spxLabel"
|
|
1649
1651
|
[spxReadonly]="this.spxReadonly"
|
|
1650
1652
|
[spxRequired]="this.spxRequired"
|
|
@@ -1790,6 +1792,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1790
1792
|
type: Input
|
|
1791
1793
|
}], spxShowSearch: [{
|
|
1792
1794
|
type: Input
|
|
1795
|
+
}], spxAlertMessageSeverity: [{
|
|
1796
|
+
type: Input
|
|
1793
1797
|
}], spxShowValidationMessages: [{
|
|
1794
1798
|
type: Input
|
|
1795
1799
|
}], spxStep: [{
|