@softpak/components 0.0.0-beta.98 → 0.0.0
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-expiry/public-api.mjs +6 -0
- package/esm2022/spx-app-expiry/softpak-components-spx-app-expiry.mjs +5 -0
- package/esm2022/spx-app-expiry/spx-app-expiry.component.mjs +90 -0
- package/esm2022/spx-app-expiry/spx-app-expiry.interface.mjs +2 -0
- package/esm2022/spx-app-expiry/spx-check-expiry-final-warning.interface.mjs +5 -0
- package/esm2022/spx-app-expiry/spx-check-expiry-happened.interface.mjs +5 -0
- package/esm2022/spx-app-expiry/spx-check-expiry-warning.interface.mjs +5 -0
- package/esm2022/spx-button/spx-button.component.mjs +18 -5
- package/esm2022/spx-change-details/spx-change-details.component.mjs +94 -13
- package/esm2022/spx-channel-selection/public-api.mjs +1 -3
- package/esm2022/spx-channel-selection/src/spx-welcome.component.mjs +112 -19
- package/esm2022/spx-check-digit/spx-check-digit.component.mjs +14 -7
- package/esm2022/spx-form-section/spx-form-section.component.mjs +11 -11
- package/esm2022/spx-form-view/spx-autocomplete-search.component.mjs +119 -0
- package/esm2022/spx-form-view/spx-form-field.interface.mjs +1 -1
- package/esm2022/spx-form-view/spx-form-view.component.mjs +119 -14
- package/esm2022/spx-inputs/spx-dropdown.component.mjs +7 -8
- package/esm2022/spx-inputs/spx-input-box.component.mjs +32 -19
- package/esm2022/spx-inputs/spx-input-date.component.mjs +1 -1
- package/esm2022/spx-inputs/spx-input-float.component.mjs +10 -5
- package/esm2022/spx-inputs/spx-input-number.component.mjs +10 -5
- package/esm2022/spx-inputs/spx-input-radio.component.mjs +93 -27
- package/esm2022/spx-inputs/spx-input-text.component.mjs +7 -4
- package/esm2022/spx-inputs/spx-input-type.enum.mjs +3 -1
- package/esm2022/spx-inputs/spx-input.component.mjs +34 -8
- package/esm2022/spx-navigation/spx-home-tile.component.mjs +3 -3
- package/esm2022/spx-navigation/spx-home-tiles.component.mjs +14 -5
- package/esm2022/spx-navigation/spx-navigation.component.mjs +6 -3
- package/esm2022/spx-number-check/spx-number-check.component.mjs +1 -4
- package/esm2022/spx-suggestion/spx-suggestion.component.mjs +30 -16
- package/esm2022/spx-update/src/spx-update-info.component.mjs +1 -1
- package/esm2022/spx-validation/public-api.mjs +1 -2
- package/esm2022/spx-validation/spx-validate-control.component.mjs +8 -3
- package/fesm2022/softpak-components-spx-app-expiry.mjs +107 -0
- package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-button.mjs +17 -4
- package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +94 -13
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-channel-selection.mjs +109 -97
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +13 -6
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-section.mjs +10 -10
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +229 -14
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +186 -68
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +19 -7
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +0 -3
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-suggestion.mjs +29 -15
- package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +1 -1
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +8 -28
- package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
- package/package.json +23 -16
- package/spx-app-expiry/index.d.ts +5 -0
- package/spx-app-expiry/public-api.d.ts +5 -0
- package/spx-app-expiry/spx-app-expiry.component.d.ts +21 -0
- package/spx-app-expiry/spx-app-expiry.interface.d.ts +7 -0
- package/spx-app-expiry/spx-check-expiry-final-warning.interface.d.ts +2 -0
- package/spx-app-expiry/spx-check-expiry-happened.interface.d.ts +2 -0
- package/spx-app-expiry/spx-check-expiry-warning.interface.d.ts +2 -0
- package/spx-button/spx-button.component.d.ts +4 -2
- package/spx-change-details/spx-change-details.component.d.ts +27 -4
- package/spx-channel-selection/public-api.d.ts +0 -2
- package/spx-channel-selection/src/spx-welcome.component.d.ts +37 -8
- package/spx-check-digit/spx-check-digit.component.d.ts +3 -1
- package/spx-form-view/spx-autocomplete-search.component.d.ts +43 -0
- package/spx-form-view/spx-form-field.interface.d.ts +2 -0
- package/spx-form-view/spx-form-view.component.d.ts +23 -2
- package/spx-inputs/spx-input-box.component.d.ts +8 -5
- package/spx-inputs/spx-input-float.component.d.ts +3 -2
- package/spx-inputs/spx-input-number.component.d.ts +3 -2
- package/spx-inputs/spx-input-radio.component.d.ts +13 -5
- package/spx-inputs/spx-input-text.component.d.ts +1 -1
- package/spx-inputs/spx-input-type.enum.d.ts +2 -0
- package/spx-inputs/spx-input.component.d.ts +9 -2
- package/spx-navigation/spx-home-tiles.component.d.ts +2 -1
- package/spx-navigation/spx-navigation.component.d.ts +2 -1
- package/spx-suggestion/spx-suggestion.component.d.ts +3 -2
- package/spx-validation/public-api.d.ts +0 -1
- package/spx-validation/spx-validate-control.component.d.ts +1 -1
- package/tailwind.css +1 -1
- package/esm2022/spx-channel-selection/src/spx-channel-selection.component.mjs +0 -41
- package/esm2022/spx-channel-selection/src/spx-company-selection.component.mjs +0 -49
- package/esm2022/spx-validation/spx-validation.module.mjs +0 -28
- package/spx-channel-selection/src/spx-channel-selection.component.d.ts +0 -12
- package/spx-channel-selection/src/spx-company-selection.component.d.ts +0 -13
- package/spx-validation/spx-validation.module.d.ts +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-number-check.mjs","sources":["../../../../projects/softpak/components/spx-number-check/spx-number-check.component.ts","../../../../projects/softpak/components/spx-number-check/softpak-components-spx-number-check.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'spx-number-check',\n standalone: true,\n host: {\n '(spxChange)': 'handleChangeEvent($event)'\n },\n imports: [\n NgIf,\n SpxButtonComponent,\n FormsModule,\n ReactiveFormsModule,\n ],\n template: `\n <div class=\"fixed top-0 left-0 right-0 bottom-0 z-40 bg-black\">\n <div class=\"mx-auto mt-32 max-w-96 bg-black rounded-lg\">\n <div class=\"flex flex-col gap-3 p-3\">\n <div class=\"bg-yellow-300 text-black text-center rounded p-3 text-xl\">\n <div class=\"font-bold\">{{ this.spxAction }}</div>\n {{ this.txtConfirmMessage }}\n </div>\n <form *ngIf=\"!this.spxSimpleMode\" class=\"block grid grid-cols-4 gap-3\" [formGroup]=\"this.form\" (ngSubmit)=\"null\">\n <input #viewChild1 [formControl]=\"ctrl1\" type=\"text\" autofocus class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild2 [formControl]=\"ctrl2\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild3 [formControl]=\"ctrl3\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild4 [formControl]=\"ctrl4\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n </form>\n <spx-button\n *ngIf=\"this.spxSimpleMode\"\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severitySuccess\"\n (spxClick)=\"this.handleConfirm()\"\n >{{ this.txtConfirm }}</spx-button>\n <spx-button\n *ngIf=\"!this.spxSimpleMode\"\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityWarning\"\n (spxClick)=\"this.handleReset()\"\n >{{ this.txtReset }}</spx-button>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityError\"\n (spxClick)=\"this.handleCancel()\"\n >{{ this.txtCancel }}</spx-button>\n </div>\n </div>\n </div>\n `,\n})\nexport class SpxNumberCheckComponent implements OnChanges, OnInit, OnDestroy {\n @Input() spxAction!: string;\n @Input() spxSimpleMode = false;\n @Input() spxPincode!: string;\n @Input() txtCancel!: string;\n @Input() txtConfirm!: string;\n @Input() txtConfirmMessage!: string;\n @Input() txtReset!: string;\n @Output() spxCancel: EventEmitter<void> = new EventEmitter<void>();\n @Output() spxConfirm: EventEmitter<void> = new EventEmitter<void>();\n @ViewChild('viewChild1') viewChild1!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild2') viewChild2!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild3') viewChild3!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild4') viewChild4!: ElementRef<HTMLInputElement>;\n form!: FormGroup;\n severityError = SpxSeverityEnum.error;\n severitySuccess = SpxSeverityEnum.success;\n severityWarning = SpxSeverityEnum.warning;\n accepted = false;\n denied = false;\n listenToCtrl1?: Subscription;\n listenToCtrl2?: Subscription;\n listenToCtrl3?: Subscription;\n listenToCtrl4?: Subscription;\n listenToTyping?: Subscription;\n\n get ctrl1(): FormControl { return this.form.get('ctrl1') as FormControl; }\n get ctrl2(): FormControl { return this.form.get('ctrl2') as FormControl; }\n get ctrl3(): FormControl { return this.form.get('ctrl3') as FormControl; }\n get ctrl4(): FormControl { return this.form.get('ctrl4') as FormControl; }\n\n constructor(private readonly formBuilder: FormBuilder) {\n this.form = this.formBuilder.group({\n ctrl1: [null, []],\n ctrl2: [null, []],\n ctrl3: [null, []],\n ctrl4: [null, []],\n });\n }\n\n ngOnInit(): void {\n this.listenToTyping = this.form.valueChanges.subscribe(() => {\n this.accepted = false;\n this.denied = false;\n if (this.ctrl1.value && this.ctrl2.value && this.ctrl3.value && this.ctrl4.value) {\n this.checkPincode();\n }\n });\n\n this.listenToCtrl1 = this.ctrl1.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild2.nativeElement.focus();\n } else {\n\n }\n });\n\n this.listenToCtrl2 = this.ctrl2.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild3.nativeElement.focus();\n } else {\n\n }\n });\n\n this.listenToCtrl3 = this.ctrl3.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild4.nativeElement.focus();\n } else {\n\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n setTimeout(() => {\n if (this?.viewChild1?.nativeElement) {\n this.viewChild1.nativeElement.focus();\n }\n }, 0);\n }\n\n ngOnDestroy(): void {\n if (this.listenToTyping) {\n this.listenToTyping.unsubscribe();\n }\n if (this.listenToCtrl1) {\n this.listenToCtrl1.unsubscribe();\n } \n if (this.listenToCtrl2) {\n this.listenToCtrl2.unsubscribe();\n } \n if (this.listenToCtrl3) {\n this.listenToCtrl3.unsubscribe();\n } \n }\n\n handleCancel(): void {\n console.log('spxContainerConfirm: spxCancel');\n this.spxCancel.emit();\n }\n\n handleConfirm(): void {\n console.log('spxContainerConfirm: spxConfirm');\n this.spxConfirm.emit();\n }\n\n handleReset(): void {\n this.ctrl1.reset();\n this.ctrl2.reset();\n this.ctrl3.reset();\n this.ctrl4.reset();\n this.viewChild1.nativeElement.focus();\n this.accepted = false;\n this.denied = false;\n }\n\n onDigitInput(event: any) {\n let element: any;\n if (\n event.code === 'Digit0' ||\n event.code === 'Digit1' ||\n event.code === 'Digit2' ||\n event.code === 'Digit3' ||\n event.code === 'Digit4' ||\n event.code === 'Digit5' ||\n event.code === 'Digit6' ||\n event.code === 'Digit7' ||\n event.code === 'Digit8' ||\n event.code === 'Digit9' ||\n event.code === 'Numpad0' ||\n event.code === 'Numpad1' ||\n event.code === 'Numpad2' ||\n event.code === 'Numpad3' ||\n event.code === 'Numpad4' ||\n event.code === 'Numpad5' ||\n event.code === 'Numpad6' ||\n event.code === 'Numpad7' ||\n event.code === 'Numpad8' ||\n event.code === 'Numpad9') {\n element = event.srcElement.nextElementSibling;\n }\n if (element == null) {\n return;\n }\n else {\n // setTimeout(() => { element.focus(); });\n }\n }\n\n onBackspace(event: any) {\n event.srcElement.previousElementSibling.focus();\n }\n\n private checkPincode(): void {\n if (this.spxPincode === `${this.ctrl1.value}${this.ctrl2.value}${this.ctrl3.value}${this.ctrl4.value}`) {\n this.accepted = true;\n setTimeout(() => {\n console.log('spxContainerConfirm: spxConfirm');\n this.spxConfirm.emit();\n }, 500);\n } else {\n this.denied = true;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAuDa,uBAAuB,CAAA;AA0BlC,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAE1E,IAAA,WAAA,CAA6B,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QA7B5C,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;AAMrB,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACzD,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YAAY,EAAQ,CAAC;AAMpE,QAAA,IAAA,CAAA,aAAa,GAAG,eAAe,CAAC,KAAK,CAAC;AACtC,QAAA,IAAA,CAAA,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC;AAC1C,QAAA,IAAA,CAAA,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC;QAC1C,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QACjB,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;QAab,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AACjC,YAAA,KAAK,EAAE,CAAC,I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;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;;;ACpEzB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-number-check.mjs","sources":["../../../../projects/softpak/components/spx-number-check/spx-number-check.component.ts","../../../../projects/softpak/components/spx-number-check/softpak-components-spx-number-check.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'spx-number-check',\n standalone: true,\n host: {\n '(spxChange)': 'handleChangeEvent($event)'\n },\n imports: [\n NgIf,\n SpxButtonComponent,\n FormsModule,\n ReactiveFormsModule,\n ],\n template: `\n <div class=\"fixed top-0 left-0 right-0 bottom-0 z-40 bg-black\">\n <div class=\"mx-auto mt-32 max-w-96 bg-black rounded-lg\">\n <div class=\"flex flex-col gap-3 p-3\">\n <div class=\"bg-yellow-300 text-black text-center rounded p-3 text-xl\">\n <div class=\"font-bold\">{{ this.spxAction }}</div>\n {{ this.txtConfirmMessage }}\n </div>\n <form *ngIf=\"!this.spxSimpleMode\" class=\"block grid grid-cols-4 gap-3\" [formGroup]=\"this.form\" (ngSubmit)=\"null\">\n <input #viewChild1 [formControl]=\"ctrl1\" type=\"text\" autofocus class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild2 [formControl]=\"ctrl2\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild3 [formControl]=\"ctrl3\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild4 [formControl]=\"ctrl4\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n </form>\n <spx-button\n *ngIf=\"this.spxSimpleMode\"\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severitySuccess\"\n (spxClick)=\"this.handleConfirm()\"\n >{{ this.txtConfirm }}</spx-button>\n <spx-button\n *ngIf=\"!this.spxSimpleMode\"\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityWarning\"\n (spxClick)=\"this.handleReset()\"\n >{{ this.txtReset }}</spx-button>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityError\"\n (spxClick)=\"this.handleCancel()\"\n >{{ this.txtCancel }}</spx-button>\n </div>\n </div>\n </div>\n `,\n})\nexport class SpxNumberCheckComponent implements OnChanges, OnInit, OnDestroy {\n @Input() spxAction!: string;\n @Input() spxSimpleMode = false;\n @Input() spxPincode!: string;\n @Input() txtCancel!: string;\n @Input() txtConfirm!: string;\n @Input() txtConfirmMessage!: string;\n @Input() txtReset!: string;\n @Output() spxCancel: EventEmitter<void> = new EventEmitter<void>();\n @Output() spxConfirm: EventEmitter<void> = new EventEmitter<void>();\n @ViewChild('viewChild1') viewChild1!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild2') viewChild2!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild3') viewChild3!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild4') viewChild4!: ElementRef<HTMLInputElement>;\n form!: FormGroup;\n severityError = SpxSeverityEnum.error;\n severitySuccess = SpxSeverityEnum.success;\n severityWarning = SpxSeverityEnum.warning;\n accepted = false;\n denied = false;\n listenToCtrl1?: Subscription;\n listenToCtrl2?: Subscription;\n listenToCtrl3?: Subscription;\n listenToCtrl4?: Subscription;\n listenToTyping?: Subscription;\n\n get ctrl1(): FormControl { return this.form.get('ctrl1') as FormControl; }\n get ctrl2(): FormControl { return this.form.get('ctrl2') as FormControl; }\n get ctrl3(): FormControl { return this.form.get('ctrl3') as FormControl; }\n get ctrl4(): FormControl { return this.form.get('ctrl4') as FormControl; }\n\n constructor(private readonly formBuilder: FormBuilder) {\n this.form = this.formBuilder.group({\n ctrl1: [null, []],\n ctrl2: [null, []],\n ctrl3: [null, []],\n ctrl4: [null, []],\n });\n }\n\n ngOnInit(): void {\n this.listenToTyping = this.form.valueChanges.subscribe(() => {\n this.accepted = false;\n this.denied = false;\n if (this.ctrl1.value && this.ctrl2.value && this.ctrl3.value && this.ctrl4.value) {\n this.checkPincode();\n }\n });\n\n this.listenToCtrl1 = this.ctrl1.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild2.nativeElement.focus();\n } else {\n\n }\n });\n\n this.listenToCtrl2 = this.ctrl2.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild3.nativeElement.focus();\n } else {\n\n }\n });\n\n this.listenToCtrl3 = this.ctrl3.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild4.nativeElement.focus();\n } else {\n\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n setTimeout(() => {\n if (this?.viewChild1?.nativeElement) {\n this.viewChild1.nativeElement.focus();\n }\n }, 0);\n }\n\n ngOnDestroy(): void {\n if (this.listenToTyping) {\n this.listenToTyping.unsubscribe();\n }\n if (this.listenToCtrl1) {\n this.listenToCtrl1.unsubscribe();\n } \n if (this.listenToCtrl2) {\n this.listenToCtrl2.unsubscribe();\n } \n if (this.listenToCtrl3) {\n this.listenToCtrl3.unsubscribe();\n } \n }\n\n handleCancel(): void {\n this.spxCancel.emit();\n }\n\n handleConfirm(): void {\n this.spxConfirm.emit();\n }\n\n handleReset(): void {\n this.ctrl1.reset();\n this.ctrl2.reset();\n this.ctrl3.reset();\n this.ctrl4.reset();\n this.viewChild1.nativeElement.focus();\n this.accepted = false;\n this.denied = false;\n }\n\n onDigitInput(event: any) {\n let element: any;\n if (\n event.code === 'Digit0' ||\n event.code === 'Digit1' ||\n event.code === 'Digit2' ||\n event.code === 'Digit3' ||\n event.code === 'Digit4' ||\n event.code === 'Digit5' ||\n event.code === 'Digit6' ||\n event.code === 'Digit7' ||\n event.code === 'Digit8' ||\n event.code === 'Digit9' ||\n event.code === 'Numpad0' ||\n event.code === 'Numpad1' ||\n event.code === 'Numpad2' ||\n event.code === 'Numpad3' ||\n event.code === 'Numpad4' ||\n event.code === 'Numpad5' ||\n event.code === 'Numpad6' ||\n event.code === 'Numpad7' ||\n event.code === 'Numpad8' ||\n event.code === 'Numpad9') {\n element = event.srcElement.nextElementSibling;\n }\n if (element == null) {\n return;\n }\n else {\n // setTimeout(() => { element.focus(); });\n }\n }\n\n onBackspace(event: any) {\n event.srcElement.previousElementSibling.focus();\n }\n\n private checkPincode(): void {\n if (this.spxPincode === `${this.ctrl1.value}${this.ctrl2.value}${this.ctrl3.value}${this.ctrl4.value}`) {\n this.accepted = true;\n setTimeout(() => {\n this.spxConfirm.emit();\n }, 500);\n } else {\n this.denied = true;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAuDa,uBAAuB,CAAA;AA0BlC,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAE1E,IAAA,WAAA,CAA6B,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QA7B5C,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;AAMrB,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACzD,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YAAY,EAAQ,CAAC;AAMpE,QAAA,IAAA,CAAA,aAAa,GAAG,eAAe,CAAC,KAAK,CAAC;AACtC,QAAA,IAAA,CAAA,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC;AAC1C,QAAA,IAAA,CAAA,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC;QAC1C,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QACjB,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;QAab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YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;;;ACpEzB;;AAEG;;;;"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component,
|
|
2
|
+
import { Component, Input } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class SpxSuggestionComponent {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.overflowHidden = true;
|
|
7
6
|
this.spxDisabled = false;
|
|
7
|
+
this.spxFocused = false;
|
|
8
8
|
this.spxSelected = false;
|
|
9
|
+
this.spxTabbable = false;
|
|
9
10
|
}
|
|
10
11
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxSuggestionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxSuggestionComponent, isStandalone: true, selector: "spx-suggestion", inputs: { spxDisabled: "spxDisabled",
|
|
12
|
-
|
|
12
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxSuggestionComponent, isStandalone: true, selector: "spx-suggestion", inputs: { spxDisabled: "spxDisabled", spxFocused: "spxFocused", spxSelected: "spxSelected", spxTabbable: "spxTabbable" }, ngImport: i0, template: `<button
|
|
13
|
+
type="button"
|
|
14
|
+
class="spx-suggestion block rounded text-gray-900 text-sm p-3 w-full text-left truncate outline-none"
|
|
13
15
|
[class.bg-sky-100]="!this.spxSelected && !this.spxDisabled"
|
|
14
|
-
[class.focus:ring-sky-
|
|
15
|
-
[class.hover:bg-sky-
|
|
16
|
+
[class.focus:ring-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
17
|
+
[class.hover:bg-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
16
18
|
[class.active:bg-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
17
19
|
[class.bg-gray-200]="this.spxDisabled && !this.spxSelected"
|
|
18
20
|
[class.bg-gray-400]="this.spxDisabled && this.spxSelected"
|
|
@@ -20,7 +22,12 @@ class SpxSuggestionComponent {
|
|
|
20
22
|
[class.opacity-60]="this.spxDisabled"
|
|
21
23
|
[class.bg-teal-500]="this.spxSelected && !this.spxDisabled"
|
|
22
24
|
[class.font-bold]="this.spxSelected"
|
|
23
|
-
[attr.tabindex]="
|
|
25
|
+
[attr.tabindex]="this.spxTabbable && !this.spxDisabled ? 0 : -1"
|
|
26
|
+
[class.ring-2]="this.spxFocused && this.spxTabbable && !this.spxDisabled"
|
|
27
|
+
[class.ring-offset-2]="this.spxFocused && this.spxTabbable && !this.spxDisabled"
|
|
28
|
+
[class.ring-blue-500]="this.spxFocused && this.spxTabbable && !this.spxDisabled">
|
|
29
|
+
<div class="text-ellipsis overflow-hidden whitespace-nowrap"><ng-content></ng-content></div>
|
|
30
|
+
</button>`, isInline: true }); }
|
|
24
31
|
}
|
|
25
32
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxSuggestionComponent, decorators: [{
|
|
26
33
|
type: Component,
|
|
@@ -28,10 +35,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
28
35
|
selector: 'spx-suggestion',
|
|
29
36
|
standalone: true,
|
|
30
37
|
template: `<button
|
|
31
|
-
|
|
38
|
+
type="button"
|
|
39
|
+
class="spx-suggestion block rounded text-gray-900 text-sm p-3 w-full text-left truncate outline-none"
|
|
32
40
|
[class.bg-sky-100]="!this.spxSelected && !this.spxDisabled"
|
|
33
|
-
[class.focus:ring-sky-
|
|
34
|
-
[class.hover:bg-sky-
|
|
41
|
+
[class.focus:ring-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
42
|
+
[class.hover:bg-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
35
43
|
[class.active:bg-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
36
44
|
[class.bg-gray-200]="this.spxDisabled && !this.spxSelected"
|
|
37
45
|
[class.bg-gray-400]="this.spxDisabled && this.spxSelected"
|
|
@@ -39,15 +47,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
39
47
|
[class.opacity-60]="this.spxDisabled"
|
|
40
48
|
[class.bg-teal-500]="this.spxSelected && !this.spxDisabled"
|
|
41
49
|
[class.font-bold]="this.spxSelected"
|
|
42
|
-
[attr.tabindex]="-1"
|
|
50
|
+
[attr.tabindex]="this.spxTabbable && !this.spxDisabled ? 0 : -1"
|
|
51
|
+
[class.ring-2]="this.spxFocused && this.spxTabbable && !this.spxDisabled"
|
|
52
|
+
[class.ring-offset-2]="this.spxFocused && this.spxTabbable && !this.spxDisabled"
|
|
53
|
+
[class.ring-blue-500]="this.spxFocused && this.spxTabbable && !this.spxDisabled">
|
|
54
|
+
<div class="text-ellipsis overflow-hidden whitespace-nowrap"><ng-content></ng-content></div>
|
|
55
|
+
</button>`,
|
|
43
56
|
}]
|
|
44
|
-
}], propDecorators: {
|
|
45
|
-
type:
|
|
46
|
-
|
|
47
|
-
}], spxDisabled: [{
|
|
57
|
+
}], propDecorators: { spxDisabled: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], spxFocused: [{
|
|
48
60
|
type: Input
|
|
49
61
|
}], spxSelected: [{
|
|
50
62
|
type: Input
|
|
63
|
+
}], spxTabbable: [{
|
|
64
|
+
type: Input
|
|
51
65
|
}] } });
|
|
52
66
|
|
|
53
67
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-suggestion.mjs","sources":["../../../../projects/softpak/components/spx-suggestion/spx-suggestion.component.ts","../../../../projects/softpak/components/spx-suggestion/softpak-components-spx-suggestion.ts"],"sourcesContent":["import { Component,
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-suggestion.mjs","sources":["../../../../projects/softpak/components/spx-suggestion/spx-suggestion.component.ts","../../../../projects/softpak/components/spx-suggestion/softpak-components-spx-suggestion.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'spx-suggestion',\n standalone: true,\n template: `<button\n type=\"button\"\n class=\"spx-suggestion block rounded text-gray-900 text-sm p-3 w-full text-left truncate outline-none\"\n [class.bg-sky-100]=\"!this.spxSelected && !this.spxDisabled\"\n [class.focus:ring-sky-300]=\"!this.spxSelected && !this.spxDisabled\"\n [class.hover:bg-sky-300]=\"!this.spxSelected && !this.spxDisabled\"\n [class.active:bg-sky-300]=\"!this.spxSelected && !this.spxDisabled\"\n [class.bg-gray-200]=\"this.spxDisabled && !this.spxSelected\"\n [class.bg-gray-400]=\"this.spxDisabled && this.spxSelected\"\n [class.cursor-not-allowed]=\"this.spxDisabled\"\n [class.opacity-60]=\"this.spxDisabled\"\n [class.bg-teal-500]=\"this.spxSelected && !this.spxDisabled\"\n [class.font-bold]=\"this.spxSelected\"\n [attr.tabindex]=\"this.spxTabbable && !this.spxDisabled ? 0 : -1\"\n [class.ring-2]=\"this.spxFocused && this.spxTabbable && !this.spxDisabled\"\n [class.ring-offset-2]=\"this.spxFocused && this.spxTabbable && !this.spxDisabled\"\n [class.ring-blue-500]=\"this.spxFocused && this.spxTabbable && !this.spxDisabled\">\n <div class=\"text-ellipsis overflow-hidden whitespace-nowrap\"><ng-content></ng-content></div>\n </button>`,\n})\nexport class SpxSuggestionComponent {\n @Input() spxDisabled = false;\n @Input() spxFocused = false;\n @Input() spxSelected = false;\n @Input() spxTabbable = false;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAyBa,sBAAsB,CAAA;AAvBnC,IAAA,WAAA,GAAA;QAwBW,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;QACpB,IAAU,CAAA,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[spxReadonly]="true"></spx-input>
|
|
53
53
|
</div>
|
|
54
|
-
</form>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
|
|
54
|
+
</form>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "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"] }] }); }
|
|
55
55
|
}
|
|
56
56
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxUpdateInfoComponent, decorators: [{
|
|
57
57
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-update.mjs","sources":["../../../../projects/softpak/components/spx-update/src/spx-update-info.component.ts","../../../../projects/softpak/components/spx-update/src/spx-update-progress.component.ts","../../../../projects/softpak/components/spx-update/softpak-components-spx-update.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxInputComponent } from '@softpak/components/spx-inputs';\n\nconst ctrlAppStoreVersion = 'appStoreVersion';\nconst ctrlChannel = 'channel';\nconst ctrlNextVersionNumber = 'nextVersionNumber';\nconst ctrlVersionNumber = 'versionNumber';\n\n@Component({\n selector: 'spx-update-info',\n template: `<form [formGroup]=\"form\" class=\"mt-3\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\n <spx-input [formControl]=\"ctrlVersionNumber\" [spxLabel]=\"txtVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlNextVersionNumber\" [spxLabel]=\"txtNextVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlConfiguredChannel\" [spxLabel]=\"txtChannel | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlAppStoreVersion\" [spxLabel]=\"txtAppStoreVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n </div>\n </form>`,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxCapitalizePipe,\n SpxInputComponent,\n ]\n})\nexport class SpxUpdateInfoComponent {\n form!: FormGroup;\n @Input() txtAppStoreVersion!: string;\n @Input() txtChannel!: string;\n @Input() txtNextVersion!: string;\n @Input() txtVersion!: string;\n \n get ctrlVersionNumber(): FormControl { return this.form.get(ctrlVersionNumber) as FormControl; }\n get ctrlNextVersionNumber(): FormControl { return this.form.get(ctrlNextVersionNumber) as FormControl; }\n get ctrlConfiguredChannel(): FormControl { return this.form.get(ctrlChannel) as FormControl; }\n get ctrlAppStoreVersion(): FormControl { return this.form.get(ctrlAppStoreVersion) as FormControl; }\n\n constructor(\n private readonly formBuilder: FormBuilder,\n ) {\n this.form = this.formBuilder.group({\n [ctrlAppStoreVersion]: [null, []],\n [ctrlChannel]: [null, []],\n [ctrlNextVersionNumber]: [null, []],\n [ctrlVersionNumber]: [null, []],\n });\n }\n\n update(appStoreVersion: string, channel: string, nextVersion: string, version: string) {\n this.ctrlVersionNumber.setValue({\n value: version,\n });\n this.ctrlNextVersionNumber.setValue({\n value: nextVersion,\n });\n this.ctrlConfiguredChannel.setValue({\n value: channel,\n });\n this.ctrlAppStoreVersion.setValue({\n value: appStoreVersion,\n });\n }\n}\n","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxProgressBarComponent } from '@softpak/components/spx-progress-bar';\n\n@Component({\n selector: 'spx-update-progress',\n template: `<spx-progress-bar [spxPercentage]=\"delayedPercentage\" [spxTitle]=\"title | capitalize\">\n </spx-progress-bar>`,\n standalone: true,\n imports: [\n SpxProgressBarComponent,\n SpxCapitalizePipe,\n ],\n})\nexport class SpxUpdateProgressComponent implements OnInit, OnDestroy {\n @Input() title!: string;\n @Input() percentage!: number;\n delayedPercentage!: number;\n syncTruckInterval?: any;\n \n ngOnInit(): void {\n this.startLoaderSync();\n }\n\n ngOnDestroy(): void {\n this.stopLoaderSync();\n }\n\n private startLoaderSync() {\n if (this.syncTruckInterval === null) {\n this.syncTruckInterval = setInterval(() => {\n this.delayedPercentage = this.percentage;\n }, 200);\n }\n }\n\n private stopLoaderSync() {\n if (this.syncTruckInterval !== null) {\n clearInterval(this.syncTruckInterval);\n this.syncTruckInterval = undefined;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAMA,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAC9C,MAAM,WAAW,GAAG,SAAS,CAAC;AAC9B,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;AAClD,MAAM,iBAAiB,GAAG,eAAe,CAAC;MAyB7B,sBAAsB,CAAA;AAOjC,IAAA,IAAI,iBAAiB,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAgB,CAAC,EAAE;AAChG,IAAA,IAAI,qBAAqB,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAgB,CAAC,EAAE;AACxG,IAAA,IAAI,qBAAqB,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,G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;AACpB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,uBAAuB;wBACvB,iBAAiB;AAClB,qBAAA;AACF,iBAAA,CAAA;8BAEU,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;;;AChBR;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-update.mjs","sources":["../../../../projects/softpak/components/spx-update/src/spx-update-info.component.ts","../../../../projects/softpak/components/spx-update/src/spx-update-progress.component.ts","../../../../projects/softpak/components/spx-update/softpak-components-spx-update.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxInputComponent } from '@softpak/components/spx-inputs';\n\nconst ctrlAppStoreVersion = 'appStoreVersion';\nconst ctrlChannel = 'channel';\nconst ctrlNextVersionNumber = 'nextVersionNumber';\nconst ctrlVersionNumber = 'versionNumber';\n\n@Component({\n selector: 'spx-update-info',\n template: `<form [formGroup]=\"form\" class=\"mt-3\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\n <spx-input [formControl]=\"ctrlVersionNumber\" [spxLabel]=\"txtVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlNextVersionNumber\" [spxLabel]=\"txtNextVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlConfiguredChannel\" [spxLabel]=\"txtChannel | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlAppStoreVersion\" [spxLabel]=\"txtAppStoreVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n </div>\n </form>`,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxCapitalizePipe,\n SpxInputComponent,\n ]\n})\nexport class SpxUpdateInfoComponent {\n form!: FormGroup;\n @Input() txtAppStoreVersion!: string;\n @Input() txtChannel!: string;\n @Input() txtNextVersion!: string;\n @Input() txtVersion!: string;\n \n get ctrlVersionNumber(): FormControl { return this.form.get(ctrlVersionNumber) as FormControl; }\n get ctrlNextVersionNumber(): FormControl { return this.form.get(ctrlNextVersionNumber) as FormControl; }\n get ctrlConfiguredChannel(): FormControl { return this.form.get(ctrlChannel) as FormControl; }\n get ctrlAppStoreVersion(): FormControl { return this.form.get(ctrlAppStoreVersion) as FormControl; }\n\n constructor(\n private readonly formBuilder: FormBuilder,\n ) {\n this.form = this.formBuilder.group({\n [ctrlAppStoreVersion]: [null, []],\n [ctrlChannel]: [null, []],\n [ctrlNextVersionNumber]: [null, []],\n [ctrlVersionNumber]: [null, []],\n });\n }\n\n update(appStoreVersion: string, channel: string, nextVersion: string, version: string) {\n this.ctrlVersionNumber.setValue({\n value: version,\n });\n this.ctrlNextVersionNumber.setValue({\n value: nextVersion,\n });\n this.ctrlConfiguredChannel.setValue({\n value: channel,\n });\n this.ctrlAppStoreVersion.setValue({\n value: appStoreVersion,\n });\n }\n}\n","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxProgressBarComponent } from '@softpak/components/spx-progress-bar';\n\n@Component({\n selector: 'spx-update-progress',\n template: `<spx-progress-bar [spxPercentage]=\"delayedPercentage\" [spxTitle]=\"title | capitalize\">\n </spx-progress-bar>`,\n standalone: true,\n imports: [\n SpxProgressBarComponent,\n SpxCapitalizePipe,\n ],\n})\nexport class SpxUpdateProgressComponent implements OnInit, OnDestroy {\n @Input() title!: string;\n @Input() percentage!: number;\n delayedPercentage!: number;\n syncTruckInterval?: any;\n \n ngOnInit(): void {\n this.startLoaderSync();\n }\n\n ngOnDestroy(): void {\n this.stopLoaderSync();\n }\n\n private startLoaderSync() {\n if (this.syncTruckInterval === null) {\n this.syncTruckInterval = setInterval(() => {\n this.delayedPercentage = this.percentage;\n }, 200);\n }\n }\n\n private stopLoaderSync() {\n if (this.syncTruckInterval !== null) {\n clearInterval(this.syncTruckInterval);\n this.syncTruckInterval = undefined;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAMA,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAC9C,MAAM,WAAW,GAAG,SAAS,CAAC;AAC9B,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;AAClD,MAAM,iBAAiB,GAAG,eAAe,CAAC;MAyB7B,sBAAsB,CAAA;AAOjC,IAAA,IAAI,iBAAiB,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAgB,CAAC,EAAE;AAChG,IAAA,IAAI,qBAAqB,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAgB,CAAC,EAAE;AACxG,IAAA,IAAI,qBAAqB,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAgB,CAAC,EAAE;AAC9F,IAAA,IAAI,mBAAmB,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAgB,CAAC,EAAE;AAEpG,IAAA,WAAA,CACmB,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QAEzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AACjC,YAAA,CAAC,mBAAmB,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;AACjC,YAAA,CAAC,WAAW,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;AACzB,YAAA,CAAC,qBAAqB,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;AACnC,YAAA,CAAC,iBAAiB,GAAG,CAA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,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,EAR3B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;sBACU,EAGlB,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,uBAAuB,+FACvB,iBAAiB,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGR,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAVtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE,CAAA;AACU,qBAAA,CAAA;AACpB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,uBAAuB;wBACvB,iBAAiB;AAClB,qBAAA;AACF,iBAAA,CAAA;8BAEU,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;;;AChBR;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { valuePairToValue } from '@softpak/components/spx-helpers';
|
|
2
2
|
import { DateTime } from 'luxon';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, Input, NgModule } from '@angular/core';
|
|
5
3
|
import * as i1 from '@angular/common';
|
|
6
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { Component, Input } from '@angular/core';
|
|
7
7
|
import { FormsModule } from '@angular/forms';
|
|
8
8
|
|
|
9
9
|
const spxValidatorRequired = () => (control) => {
|
|
@@ -179,11 +179,14 @@ class SpxValidateControlComponent {
|
|
|
179
179
|
return this.control.errors && this.control.errors['past'];
|
|
180
180
|
}
|
|
181
181
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxValidateControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
182
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxValidateControlComponent, selector: "spx-validate-control", inputs: { control: "control", label: "label", submitTried: "submitTried" }, ngImport: i0, template: "<ng-container *ngIf=\"control && control.errors && (control.touched || submitTried)\">\n <div *ngIf=\"maxLength\">'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\n <div *ngIf=\"minLength\">'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\n <div *ngIf=\"max\">The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\n <div *ngIf=\"min\">The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\n <div *ngIf=\"pattern\">The pattern of '{{ label }}' not valid.</div>\n <div *ngIf=\"required\">'{{ label }}' is required.</div>\n <div *ngIf=\"year\">Please choose a year between 1991 and the current year.</div>\n <div *ngIf=\"yearFuture\">Please choose a year between the current year and 2050.</div>\n <div *ngIf=\"month\">Please choose a valid month (a value between 01 and 12).</div>\n <div *ngIf=\"future\">The selected date may not be in the future.</div>\n <div *ngIf=\"past\">The selected date may not be in the past.</div>\n</ng-container>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
182
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxValidateControlComponent, isStandalone: true, selector: "spx-validate-control", inputs: { control: "control", label: "label", submitTried: "submitTried" }, ngImport: i0, template: "<ng-container *ngIf=\"control && control.errors && (control.touched || submitTried)\">\n <div *ngIf=\"maxLength\">'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\n <div *ngIf=\"minLength\">'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\n <div *ngIf=\"max\">The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\n <div *ngIf=\"min\">The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\n <div *ngIf=\"pattern\">The pattern of '{{ label }}' not valid.</div>\n <div *ngIf=\"required\">'{{ label }}' is required.</div>\n <div *ngIf=\"year\">Please choose a year between 1991 and the current year.</div>\n <div *ngIf=\"yearFuture\">Please choose a year between the current year and 2050.</div>\n <div *ngIf=\"month\">Please choose a valid month (a value between 01 and 12).</div>\n <div *ngIf=\"future\">The selected date may not be in the future.</div>\n <div *ngIf=\"past\">The selected date may not be in the past.</div>\n</ng-container>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }] }); }
|
|
183
183
|
}
|
|
184
184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxValidateControlComponent, decorators: [{
|
|
185
185
|
type: Component,
|
|
186
|
-
args: [{ selector: 'spx-validate-control',
|
|
186
|
+
args: [{ selector: 'spx-validate-control', imports: [
|
|
187
|
+
CommonModule,
|
|
188
|
+
FormsModule,
|
|
189
|
+
], standalone: true, template: "<ng-container *ngIf=\"control && control.errors && (control.touched || submitTried)\">\n <div *ngIf=\"maxLength\">'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\n <div *ngIf=\"minLength\">'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\n <div *ngIf=\"max\">The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\n <div *ngIf=\"min\">The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\n <div *ngIf=\"pattern\">The pattern of '{{ label }}' not valid.</div>\n <div *ngIf=\"required\">'{{ label }}' is required.</div>\n <div *ngIf=\"year\">Please choose a year between 1991 and the current year.</div>\n <div *ngIf=\"yearFuture\">Please choose a year between the current year and 2050.</div>\n <div *ngIf=\"month\">Please choose a valid month (a value between 01 and 12).</div>\n <div *ngIf=\"future\">The selected date may not be in the future.</div>\n <div *ngIf=\"past\">The selected date may not be in the past.</div>\n</ng-container>" }]
|
|
187
190
|
}], propDecorators: { control: [{
|
|
188
191
|
type: Input
|
|
189
192
|
}], label: [{
|
|
@@ -192,32 +195,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
192
195
|
type: Input
|
|
193
196
|
}] } });
|
|
194
197
|
|
|
195
|
-
class SpxValidationModule {
|
|
196
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
197
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.2", ngImport: i0, type: SpxValidationModule, declarations: [SpxValidateControlComponent], imports: [CommonModule,
|
|
198
|
-
FormsModule], exports: [SpxValidateControlComponent] }); }
|
|
199
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxValidationModule, imports: [CommonModule,
|
|
200
|
-
FormsModule] }); }
|
|
201
|
-
}
|
|
202
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxValidationModule, decorators: [{
|
|
203
|
-
type: NgModule,
|
|
204
|
-
args: [{
|
|
205
|
-
declarations: [
|
|
206
|
-
SpxValidateControlComponent
|
|
207
|
-
],
|
|
208
|
-
imports: [
|
|
209
|
-
CommonModule,
|
|
210
|
-
FormsModule,
|
|
211
|
-
],
|
|
212
|
-
exports: [
|
|
213
|
-
SpxValidateControlComponent
|
|
214
|
-
]
|
|
215
|
-
}]
|
|
216
|
-
}] });
|
|
217
|
-
|
|
218
198
|
/**
|
|
219
199
|
* Generated bundle index. Do not edit.
|
|
220
200
|
*/
|
|
221
201
|
|
|
222
|
-
export { SpxValidateControlComponent,
|
|
202
|
+
export { SpxValidateControlComponent, spxValidatorMax, spxValidatorMaxLength, spxValidatorMin, spxValidatorMinLength, spxValidatorPattern, spxValidatorRequired, spxValidatorYearAndMonth };
|
|
223
203
|
//# sourceMappingURL=softpak-components-spx-validation.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-validation.mjs","sources":["../../../../projects/softpak/components/spx-validation/required.validator.ts","../../../../projects/softpak/components/spx-validation/max.validator.ts","../../../../projects/softpak/components/spx-validation/maxlength.validator.ts","../../../../projects/softpak/components/spx-validation/min.validator.ts","../../../../projects/softpak/components/spx-validation/minlength.validator.ts","../../../../projects/softpak/components/spx-validation/pattern.validator.ts","../../../../projects/softpak/components/spx-validation/year-and-month.validator.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.html","../../../../projects/softpak/components/spx-validation/spx-validation.module.ts","../../../../projects/softpak/components/spx-validation/softpak-components-spx-validation.ts"],"sourcesContent":["import { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorRequired = () => (control: AbstractControl): ValidationErrors | null => {\n if (\n control &&\n valuePairToValue(control.value) === undefined ||\n valuePairToValue(control.value) === null ||\n valuePairToValue(control.value) === '' ||\n valuePairToValue(control.value) === 0\n ) {\n return { required: true };\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMax = (max: number) => (control: AbstractControl): { max: { max: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n if (!isNaN(value) && value > max) {\n return {\n max: {\n max,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMaxLength = (maximumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { maxlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length > maximumLength) {\n return {\n maxlength: {\n requiredLength: maximumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMin = (min: number) => (control: AbstractControl): { min: { min: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n\n if (!isNaN(value) && value < min) {\n return {\n min: {\n min,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMinLength = (minimumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { minlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length < minimumLength) {\n return {\n minlength: {\n requiredLength: minimumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorPattern = (matcher: RegExp) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const matches = valuePairToValue(control.value).toString().match(matcher);\n if (matches === null || matches.length === 0) {\n return { pattern: true };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\n\nimport { DateTime } from 'luxon';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorYearAndMonth = (future?: boolean) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const val = valuePairToValue(control.value);\n if (val.toUpperCase() !== 'ACEP') {\n const date = DateTime.fromISO(val);\n const year = date.year;\n const month = date.month;\n if (val.length < 6) {\n return {\n minlength: {\n requiredLength: 6,\n actualLength: val.length\n }\n };\n }\n if (month < 1 || month > 12) {\n return { month: true };\n }\n if (future) {\n if (year > 2050 || year < DateTime.now().year) {\n return { yearFuture: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') < DateTime.now()) {\n return { past: true };\n }\n } else {\n if (year < 1971 || year > DateTime.now().year) {\n return { year: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') > DateTime.now()) {\n return { future: true };\n }\n }\n }\n }\n return null;\n};\n","import { Component, Input } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\n\n@Component({\n selector: 'spx-validate-control',\n templateUrl: './spx-validate-control.component.html',\n})\nexport class SpxValidateControlComponent {\n @Input() control!: AbstractControl;\n @Input() label: string | unknown;\n @Input() submitTried!: boolean;\n\n get maxLength() {\n return this.control.errors && this.control.errors['maxlength'];\n }\n\n get maxLengthRequiredLength() {\n return this.maxLength && this.control.errors && this.control.errors['maxlength']['requiredLength'];\n }\n\n get minLength() {\n return this.control.errors && this.control.errors['minlength'];\n }\n\n get minLengthRequiredLength() {\n return this.minLength && this.control.errors && this.control.errors['minlength']['requiredLength'];\n }\n\n get max() {\n return this.control.errors && this.control.errors['max'];\n }\n\n get maxRequiredMax() {\n return this.max && this.control.errors && this.control.errors['max']['max'];\n }\n\n get min() {\n return this.control.errors && this.control.errors['min'];\n }\n\n get minRequiredMin() {\n return this.min && this.control.errors && this.control.errors['min']['min'];\n }\n\n get pattern() {\n return this.control.errors && this.control.errors['pattern'];\n }\n\n get required() {\n return this.control.errors && this.control.errors['required'];\n }\n\n get year() {\n return this.control.errors && this.control.errors['year'];\n }\n\n get yearFuture() {\n return this.control.errors && this.control.errors['yearFuture'];\n }\n\n get month() {\n return this.control.errors && this.control.errors['month'];\n }\n\n get future() {\n return this.control.errors && this.control.errors['future'];\n }\n\n get past() {\n return this.control.errors && this.control.errors['past'];\n }\n}\n","<ng-container *ngIf=\"control && control.errors && (control.touched || submitTried)\">\n <div *ngIf=\"maxLength\">'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\n <div *ngIf=\"minLength\">'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\n <div *ngIf=\"max\">The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\n <div *ngIf=\"min\">The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\n <div *ngIf=\"pattern\">The pattern of '{{ label }}' not valid.</div>\n <div *ngIf=\"required\">'{{ label }}' is required.</div>\n <div *ngIf=\"year\">Please choose a year between 1991 and the current year.</div>\n <div *ngIf=\"yearFuture\">Please choose a year between the current year and 2050.</div>\n <div *ngIf=\"month\">Please choose a valid month (a value between 01 and 12).</div>\n <div *ngIf=\"future\">The selected date may not be in the future.</div>\n <div *ngIf=\"past\">The selected date may not be in the past.</div>\n</ng-container>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SpxValidateControlComponent } from './spx-validate-control.component';\nimport { FormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [\n SpxValidateControlComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n ],\n exports: [\n SpxValidateControlComponent\n ]\n})\nexport class SpxValidationModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAGa,MAAA,oBAAoB,GAAG,MAAM,CAAC,OAAwB,KAA6B;AAC5F,IAAA,IACI,OAAO;AACP,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS;AAC7C,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI;AACxC,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE;QACtC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EACvC;AACE,QAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KAC7B;AACD,IAAA,OAAO,IAAI,CAAC;AAChB;;ACVO,MAAM,eAAe,GAAG,CAAC,GAAW,KAAK,CAAC,OAAwB,KAAqD;AAC1H,IAAA,IAAI,CAAC,oBAAoB,EAAE,CAAC,OAAO,CAAC,EAAE;AAClC,QAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;QACvE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,GAAG,EAAE;YAC9B,OAAO;AACH,gBAAA,GAAG,EAAE;oBACD,GAAG;AACH,oBAAA,MAAM,EAAE,KAAK;AAChB,iBAAA;aACJ,CAAC;SACL;KACJ;AACD,IAAA,OAAO,IAAI,CAAC;AAChB;;ACbO,MAAM,qBAAqB,GAAG,CAAC,aAAqB,EAAE,SAAqC,KAAK,CAAC,OAAwB,KAA4E;AACxM,IAAA,IAAI,CAAC,oBAAoB,EAAE,CA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AE;wBACP,YAAY;wBACZ,WAAW;AACZ,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,2BAA2B;AAC5B,qBAAA;AACF,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-validation.mjs","sources":["../../../../projects/softpak/components/spx-validation/required.validator.ts","../../../../projects/softpak/components/spx-validation/max.validator.ts","../../../../projects/softpak/components/spx-validation/maxlength.validator.ts","../../../../projects/softpak/components/spx-validation/min.validator.ts","../../../../projects/softpak/components/spx-validation/minlength.validator.ts","../../../../projects/softpak/components/spx-validation/pattern.validator.ts","../../../../projects/softpak/components/spx-validation/year-and-month.validator.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.html","../../../../projects/softpak/components/spx-validation/softpak-components-spx-validation.ts"],"sourcesContent":["import { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorRequired = () => (control: AbstractControl): ValidationErrors | null => {\n if (\n control &&\n valuePairToValue(control.value) === undefined ||\n valuePairToValue(control.value) === null ||\n valuePairToValue(control.value) === '' ||\n valuePairToValue(control.value) === 0\n ) {\n return { required: true };\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMax = (max: number) => (control: AbstractControl): { max: { max: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n if (!isNaN(value) && value > max) {\n return {\n max: {\n max,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMaxLength = (maximumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { maxlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length > maximumLength) {\n return {\n maxlength: {\n requiredLength: maximumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMin = (min: number) => (control: AbstractControl): { min: { min: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n\n if (!isNaN(value) && value < min) {\n return {\n min: {\n min,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMinLength = (minimumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { minlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length < minimumLength) {\n return {\n minlength: {\n requiredLength: minimumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorPattern = (matcher: RegExp) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const matches = valuePairToValue(control.value).toString().match(matcher);\n if (matches === null || matches.length === 0) {\n return { pattern: true };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\n\nimport { DateTime } from 'luxon';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorYearAndMonth = (future?: boolean) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const val = valuePairToValue(control.value);\n if (val.toUpperCase() !== 'ACEP') {\n const date = DateTime.fromISO(val);\n const year = date.year;\n const month = date.month;\n if (val.length < 6) {\n return {\n minlength: {\n requiredLength: 6,\n actualLength: val.length\n }\n };\n }\n if (month < 1 || month > 12) {\n return { month: true };\n }\n if (future) {\n if (year > 2050 || year < DateTime.now().year) {\n return { yearFuture: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') < DateTime.now()) {\n return { past: true };\n }\n } else {\n if (year < 1971 || year > DateTime.now().year) {\n return { year: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') > DateTime.now()) {\n return { future: true };\n }\n }\n }\n }\n return null;\n};\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { AbstractControl, FormsModule } from '@angular/forms';\n\n@Component({\n selector: 'spx-validate-control',\n templateUrl: './spx-validate-control.component.html',\n imports: [\n CommonModule,\n FormsModule,\n ],\n standalone: true,\n})\nexport class SpxValidateControlComponent {\n @Input() control!: AbstractControl;\n @Input() label: string | unknown;\n @Input() submitTried!: boolean;\n\n get maxLength() {\n return this.control.errors && this.control.errors['maxlength'];\n }\n\n get maxLengthRequiredLength() {\n return this.maxLength && this.control.errors && this.control.errors['maxlength']['requiredLength'];\n }\n\n get minLength() {\n return this.control.errors && this.control.errors['minlength'];\n }\n\n get minLengthRequiredLength() {\n return this.minLength && this.control.errors && this.control.errors['minlength']['requiredLength'];\n }\n\n get max() {\n return this.control.errors && this.control.errors['max'];\n }\n\n get maxRequiredMax() {\n return this.max && this.control.errors && this.control.errors['max']['max'];\n }\n\n get min() {\n return this.control.errors && this.control.errors['min'];\n }\n\n get minRequiredMin() {\n return this.min && this.control.errors && this.control.errors['min']['min'];\n }\n\n get pattern() {\n return this.control.errors && this.control.errors['pattern'];\n }\n\n get required() {\n return this.control.errors && this.control.errors['required'];\n }\n\n get year() {\n return this.control.errors && this.control.errors['year'];\n }\n\n get yearFuture() {\n return this.control.errors && this.control.errors['yearFuture'];\n }\n\n get month() {\n return this.control.errors && this.control.errors['month'];\n }\n\n get future() {\n return this.control.errors && this.control.errors['future'];\n }\n\n get past() {\n return this.control.errors && this.control.errors['past'];\n }\n}\n","<ng-container *ngIf=\"control && control.errors && (control.touched || submitTried)\">\n <div *ngIf=\"maxLength\">'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\n <div *ngIf=\"minLength\">'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\n <div *ngIf=\"max\">The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\n <div *ngIf=\"min\">The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\n <div *ngIf=\"pattern\">The pattern of '{{ label }}' not valid.</div>\n <div *ngIf=\"required\">'{{ label }}' is required.</div>\n <div *ngIf=\"year\">Please choose a year between 1991 and the current year.</div>\n <div *ngIf=\"yearFuture\">Please choose a year between the current year and 2050.</div>\n <div *ngIf=\"month\">Please choose a valid month (a value between 01 and 12).</div>\n <div *ngIf=\"future\">The selected date may not be in the future.</div>\n <div *ngIf=\"past\">The selected date may not be in the past.</div>\n</ng-container>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAGa,MAAA,oBAAoB,GAAG,MAAM,CAAC,OAAwB,KAA6B;AAC5F,IAAA,IACI,OAAO;AACP,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS;AAC7C,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI;AACxC,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE;QACtC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EACvC;AACE,QAAA,OAAO,EAAE,QAAQ,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P,YAAY;wBACZ,WAAW;AACZ,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,4jCAAA,EAAA,CAAA;8BAGP,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;;;AEhBR;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softpak/components",
|
|
3
|
-
"version": "0.0.0
|
|
3
|
+
"version": "0.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/common": "
|
|
7
|
-
"@angular/core": "
|
|
8
|
-
"@fortawesome/free-solid-svg-icons": "^6.x.x"
|
|
6
|
+
"@angular/common": "17.x.x || 18.x.x",
|
|
7
|
+
"@angular/core": "17.x.x || 18.x.x",
|
|
8
|
+
"@fortawesome/free-solid-svg-icons": "^6.x.x",
|
|
9
|
+
"@ngx-translate/core": "^15.0.0"
|
|
9
10
|
},
|
|
10
11
|
"dependencies": {
|
|
11
12
|
"tslib": "^2.3.0"
|
|
@@ -29,24 +30,30 @@
|
|
|
29
30
|
"esm": "./esm2022/spx-alert/softpak-components-spx-alert.mjs",
|
|
30
31
|
"default": "./fesm2022/softpak-components-spx-alert.mjs"
|
|
31
32
|
},
|
|
32
|
-
"./spx-button": {
|
|
33
|
-
"types": "./spx-button/index.d.ts",
|
|
34
|
-
"esm2022": "./esm2022/spx-button/softpak-components-spx-button.mjs",
|
|
35
|
-
"esm": "./esm2022/spx-button/softpak-components-spx-button.mjs",
|
|
36
|
-
"default": "./fesm2022/softpak-components-spx-button.mjs"
|
|
37
|
-
},
|
|
38
33
|
"./spx-app-configuration": {
|
|
39
34
|
"types": "./spx-app-configuration/index.d.ts",
|
|
40
35
|
"esm2022": "./esm2022/spx-app-configuration/softpak-components-spx-app-configuration.mjs",
|
|
41
36
|
"esm": "./esm2022/spx-app-configuration/softpak-components-spx-app-configuration.mjs",
|
|
42
37
|
"default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
|
|
43
38
|
},
|
|
39
|
+
"./spx-app-expiry": {
|
|
40
|
+
"types": "./spx-app-expiry/index.d.ts",
|
|
41
|
+
"esm2022": "./esm2022/spx-app-expiry/softpak-components-spx-app-expiry.mjs",
|
|
42
|
+
"esm": "./esm2022/spx-app-expiry/softpak-components-spx-app-expiry.mjs",
|
|
43
|
+
"default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
|
|
44
|
+
},
|
|
44
45
|
"./spx-capitalize": {
|
|
45
46
|
"types": "./spx-capitalize/index.d.ts",
|
|
46
47
|
"esm2022": "./esm2022/spx-capitalize/softpak-components-spx-capitalize.mjs",
|
|
47
48
|
"esm": "./esm2022/spx-capitalize/softpak-components-spx-capitalize.mjs",
|
|
48
49
|
"default": "./fesm2022/softpak-components-spx-capitalize.mjs"
|
|
49
50
|
},
|
|
51
|
+
"./spx-button": {
|
|
52
|
+
"types": "./spx-button/index.d.ts",
|
|
53
|
+
"esm2022": "./esm2022/spx-button/softpak-components-spx-button.mjs",
|
|
54
|
+
"esm": "./esm2022/spx-button/softpak-components-spx-button.mjs",
|
|
55
|
+
"default": "./fesm2022/softpak-components-spx-button.mjs"
|
|
56
|
+
},
|
|
50
57
|
"./spx-change-details": {
|
|
51
58
|
"types": "./spx-change-details/index.d.ts",
|
|
52
59
|
"esm2022": "./esm2022/spx-change-details/softpak-components-spx-change-details.mjs",
|
|
@@ -65,12 +72,6 @@
|
|
|
65
72
|
"esm": "./esm2022/spx-check-digit/softpak-components-spx-check-digit.mjs",
|
|
66
73
|
"default": "./fesm2022/softpak-components-spx-check-digit.mjs"
|
|
67
74
|
},
|
|
68
|
-
"./spx-helpers": {
|
|
69
|
-
"types": "./spx-helpers/index.d.ts",
|
|
70
|
-
"esm2022": "./esm2022/spx-helpers/softpak-components-spx-helpers.mjs",
|
|
71
|
-
"esm": "./esm2022/spx-helpers/softpak-components-spx-helpers.mjs",
|
|
72
|
-
"default": "./fesm2022/softpak-components-spx-helpers.mjs"
|
|
73
|
-
},
|
|
74
75
|
"./spx-form-section": {
|
|
75
76
|
"types": "./spx-form-section/index.d.ts",
|
|
76
77
|
"esm2022": "./esm2022/spx-form-section/softpak-components-spx-form-section.mjs",
|
|
@@ -83,6 +84,12 @@
|
|
|
83
84
|
"esm": "./esm2022/spx-form-view/softpak-components-spx-form-view.mjs",
|
|
84
85
|
"default": "./fesm2022/softpak-components-spx-form-view.mjs"
|
|
85
86
|
},
|
|
87
|
+
"./spx-helpers": {
|
|
88
|
+
"types": "./spx-helpers/index.d.ts",
|
|
89
|
+
"esm2022": "./esm2022/spx-helpers/softpak-components-spx-helpers.mjs",
|
|
90
|
+
"esm": "./esm2022/spx-helpers/softpak-components-spx-helpers.mjs",
|
|
91
|
+
"default": "./fesm2022/softpak-components-spx-helpers.mjs"
|
|
92
|
+
},
|
|
86
93
|
"./spx-inputs": {
|
|
87
94
|
"types": "./spx-inputs/index.d.ts",
|
|
88
95
|
"esm2022": "./esm2022/spx-inputs/softpak-components-spx-inputs.mjs",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnChanges } from '@angular/core';
|
|
2
|
+
import { SpxAppExpiryI } from './spx-app-expiry.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SpxAppExpiryComponent implements OnChanges {
|
|
5
|
+
txtContactHelpdeskOrSoftpak: string;
|
|
6
|
+
txtExpired: string;
|
|
7
|
+
txtLastReminder: string;
|
|
8
|
+
txtPleaseOpenTheAppStore: string;
|
|
9
|
+
txtPleaseUpdate: string;
|
|
10
|
+
txtThisVersionWillExpireSoon: string;
|
|
11
|
+
txtUpdateAvailable: string;
|
|
12
|
+
txtUpdateTheAppToTheLatestVersion: string;
|
|
13
|
+
spxExpiry: SpxAppExpiryI;
|
|
14
|
+
spxVersion: string;
|
|
15
|
+
warning: boolean;
|
|
16
|
+
finalWarning: boolean;
|
|
17
|
+
expired: boolean;
|
|
18
|
+
ngOnChanges(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpxAppExpiryComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxAppExpiryComponent, "spx-app-expiry", never, { "txtContactHelpdeskOrSoftpak": { "alias": "txtContactHelpdeskOrSoftpak"; "required": false; }; "txtExpired": { "alias": "txtExpired"; "required": false; }; "txtLastReminder": { "alias": "txtLastReminder"; "required": false; }; "txtPleaseOpenTheAppStore": { "alias": "txtPleaseOpenTheAppStore"; "required": false; }; "txtPleaseUpdate": { "alias": "txtPleaseUpdate"; "required": false; }; "txtThisVersionWillExpireSoon": { "alias": "txtThisVersionWillExpireSoon"; "required": false; }; "txtUpdateAvailable": { "alias": "txtUpdateAvailable"; "required": false; }; "txtUpdateTheAppToTheLatestVersion": { "alias": "txtUpdateTheAppToTheLatestVersion"; "required": false; }; "spxExpiry": { "alias": "spxExpiry"; "required": false; }; "spxVersion": { "alias": "spxVersion"; "required": false; }; }, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpxButtonComponent {
|
|
@@ -11,17 +11,19 @@ export declare class SpxButtonComponent {
|
|
|
11
11
|
spxForm?: string;
|
|
12
12
|
spxFullHeight?: boolean;
|
|
13
13
|
spxFullWidth?: boolean;
|
|
14
|
-
spxSeverity
|
|
14
|
+
spxSeverity?: SpxSeverityEnum;
|
|
15
15
|
spxSize: 'lg' | 'xl';
|
|
16
16
|
spxTabIndex?: number;
|
|
17
17
|
spxType: 'button' | 'submit';
|
|
18
18
|
spxClick: EventEmitter<void>;
|
|
19
|
+
buttonRef?: ElementRef<HTMLInputElement>;
|
|
19
20
|
get severityError(): boolean;
|
|
20
21
|
get severityInfo(): boolean;
|
|
21
22
|
get severitySuccess(): boolean;
|
|
22
23
|
get severityWarning(): boolean;
|
|
23
24
|
hasShadowDom: (el: HTMLElement) => boolean;
|
|
24
25
|
handleClick: () => void;
|
|
26
|
+
spxSetFocus(): void;
|
|
25
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpxButtonComponent, never>;
|
|
26
28
|
static ɵcmp: i0.ɵɵComponentDeclaration<SpxButtonComponent, "spx-button", never, { "spxDisabled": { "alias": "spxDisabled"; "required": false; }; "spxClass": { "alias": "spxClass"; "required": false; }; "spxClassObject": { "alias": "spxClassObject"; "required": false; }; "spxForm": { "alias": "spxForm"; "required": false; }; "spxFullHeight": { "alias": "spxFullHeight"; "required": false; }; "spxFullWidth": { "alias": "spxFullWidth"; "required": false; }; "spxSeverity": { "alias": "spxSeverity"; "required": false; }; "spxSize": { "alias": "spxSize"; "required": false; }; "spxTabIndex": { "alias": "spxTabIndex"; "required": false; }; "spxType": { "alias": "spxType"; "required": false; }; }, { "spxClick": "spxClick"; }, never, ["*"], true, never>;
|
|
27
29
|
}
|