@softpak/components 20.1.0 → 20.2.1

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.
Files changed (69) hide show
  1. package/README.md +24 -24
  2. package/fesm2022/softpak-components-spx-404-page.mjs +4 -4
  3. package/fesm2022/softpak-components-spx-404-page.mjs.map +1 -1
  4. package/fesm2022/softpak-components-spx-alert.mjs +4 -4
  5. package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
  6. package/fesm2022/softpak-components-spx-app-configuration.mjs.map +1 -1
  7. package/fesm2022/softpak-components-spx-app-expiry.mjs +4 -4
  8. package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
  9. package/fesm2022/softpak-components-spx-button.mjs +4 -4
  10. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  11. package/fesm2022/softpak-components-spx-capitalize.mjs +3 -3
  12. package/fesm2022/softpak-components-spx-capitalize.mjs.map +1 -1
  13. package/fesm2022/softpak-components-spx-card.mjs +16 -16
  14. package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
  15. package/fesm2022/softpak-components-spx-change-details.mjs +4 -4
  16. package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
  17. package/fesm2022/softpak-components-spx-channel-selection.mjs +64 -238
  18. package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
  19. package/fesm2022/softpak-components-spx-check-digit.mjs +4 -4
  20. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  21. package/fesm2022/softpak-components-spx-confirm.mjs +11 -11
  22. package/fesm2022/softpak-components-spx-confirm.mjs.map +1 -1
  23. package/fesm2022/softpak-components-spx-form-section.mjs +4 -4
  24. package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
  25. package/fesm2022/softpak-components-spx-form-view.mjs +8 -8
  26. package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
  27. package/fesm2022/softpak-components-spx-helpers.mjs.map +1 -1
  28. package/fesm2022/softpak-components-spx-inputs.mjs +44 -44
  29. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  30. package/fesm2022/softpak-components-spx-navigation.mjs +12 -12
  31. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  32. package/fesm2022/softpak-components-spx-number-check.mjs +4 -4
  33. package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
  34. package/fesm2022/softpak-components-spx-pagination.mjs +4 -4
  35. package/fesm2022/softpak-components-spx-pagination.mjs.map +1 -1
  36. package/fesm2022/softpak-components-spx-patch.mjs +4 -4
  37. package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
  38. package/fesm2022/softpak-components-spx-pipes.mjs +3 -3
  39. package/fesm2022/softpak-components-spx-pipes.mjs.map +1 -1
  40. package/fesm2022/softpak-components-spx-progress-bar.mjs +4 -4
  41. package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
  42. package/fesm2022/softpak-components-spx-spinner.mjs +4 -4
  43. package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
  44. package/fesm2022/softpak-components-spx-stock-info.mjs +4 -4
  45. package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
  46. package/fesm2022/softpak-components-spx-storage.mjs +1 -0
  47. package/fesm2022/softpak-components-spx-storage.mjs.map +1 -1
  48. package/fesm2022/softpak-components-spx-suggestion.mjs +4 -4
  49. package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
  50. package/fesm2022/softpak-components-spx-tabs.mjs +4 -4
  51. package/fesm2022/softpak-components-spx-tabs.mjs.map +1 -1
  52. package/fesm2022/softpak-components-spx-toaster.mjs +4 -4
  53. package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
  54. package/fesm2022/softpak-components-spx-toggle.mjs +4 -4
  55. package/fesm2022/softpak-components-spx-toggle.mjs.map +1 -1
  56. package/fesm2022/softpak-components-spx-translate.mjs.map +1 -1
  57. package/fesm2022/softpak-components-spx-update.mjs +14 -14
  58. package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
  59. package/fesm2022/softpak-components-spx-validation-messages.mjs +4 -4
  60. package/fesm2022/softpak-components-spx-validation-messages.mjs.map +1 -1
  61. package/fesm2022/softpak-components-spx-validation.mjs +4 -4
  62. package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
  63. package/fesm2022/softpak-components-spx-welcome.mjs +135 -0
  64. package/fesm2022/softpak-components-spx-welcome.mjs.map +1 -0
  65. package/package.json +42 -38
  66. package/spx-app-configuration/index.d.ts +7 -2
  67. package/spx-channel-selection/index.d.ts +22 -81
  68. package/spx-storage/index.d.ts +1 -0
  69. package/spx-welcome/index.d.ts +37 -0
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-validation-messages.mjs","sources":["../../../../projects/softpak/components/spx-validation-messages/spx-validation-messages.component.ts","../../../../projects/softpak/components/spx-validation-messages/spx-validation-messages.component.html","../../../../projects/softpak/components/spx-validation-messages/softpak-components-spx-validation-messages.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { TranslateService } from '@ngx-translate/core';\nimport { spxTextChooseFuture, spxTextChoosePast, spxTextChooseValidMonth, spxTextDateMayNotBeFuture, spxTextDateMayNotBePast, spxTextInvalidCode, spxTextPatternNotValid, spxTextRequired, spxTextTooHigh, spxTextTooLong, spxTextTooLow, spxTextTooShort } from '@softpak/components/spx-translate';\n\n@Component({\n selector: 'spx-validation-messages',\n standalone: true,\n templateUrl: './spx-validation-messages.component.html',\n styleUrl: './spx-validation-messages.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SpxValidationMessagesComponent { \n readonly errors = input.required<ValidationErrors>();\n readonly touched = input.required<boolean>();\n readonly formControlI = input<AbstractControl<any,any> | undefined>(undefined);\n readonly fieldLabel = input<string | undefined>(undefined);\n readonly submitTried = input<boolean | undefined>(undefined);\n\n translateService = inject(TranslateService);\n \n textTooLong = computed(() => {\n return this.translateService.instant(spxTextTooLong, { fieldLabel: this.fieldLabel(), error: this.errors()[\"maxlength\"].requiredLength });\n });\n\n textTooShort = computed(() => {\n return this.translateService.instant(spxTextTooShort, { fieldLabel: this.fieldLabel(), error: this.errors()[\"minlength\"].requiredLength });\n });\n\n textTooHigh = computed(() => {\n return this.translateService.instant(spxTextTooHigh, { fieldLabel: this.fieldLabel(), error: this.errors()[\"max\"].max });\n });\n\n textTooLow = computed(() => {\n return this.translateService.instant(spxTextTooLow, { fieldLabel: this.fieldLabel(), error: this.errors()[\"min\"].min });\n });\n\n textPatternNotValid = computed(() => {\n return this.translateService.instant(spxTextPatternNotValid, { fieldLabel: this.fieldLabel() });\n });\n\n textRequired = computed(() => {\n return this.translateService.instant(spxTextRequired, { fieldLabel: this.fieldLabel() });\n });\n\n textChoosePast = computed(() => {\n return this.translateService.instant(spxTextChoosePast);\n });\n\n textChooseFuture = computed(() => {\n return this.translateService.instant(spxTextChooseFuture);\n });\n\n textChooseValidMonth = computed(() => {\n return this.translateService.instant(spxTextChooseValidMonth);\n });\n\n textDateMayNotBeFuture = computed(() => {\n return this.translateService.instant(spxTextDateMayNotBeFuture);\n });\n\n textDateMayNotBePast = computed(() => {\n return this.translateService.instant(spxTextDateMayNotBePast);\n });\n\n textInvalidCode = computed(() => {\n return this.translateService.instant(spxTextInvalidCode, { codeName: this.errors()[\"invalidCode\"].name, codeCode: this.errors()[\"invalidCode\"].code });\n });\n\n}\n","\n@if (formControlI() && errors() && (touched() || submitTried())) {\n @if (errors()[\"maxlength\"]) {\n <div>{{ textTooLong() }}</div>\n }\n @if (errors()[\"minlength\"]) {\n <div>{{ textTooShort() }}</div>\n }\n @if (errors()[\"max\"]) {\n <div>{{ textTooHigh() }}</div>\n }\n @if (errors()[\"min\"]) {\n <div>{{ textTooLow() }}</div>\n }\n @if (errors()[\"pattern\"]) {\n <div>{{ textPatternNotValid() }}</div>\n }\n @if (errors()[\"required\"]) {\n <div>{{ textRequired() }}</div>\n }\n @if (errors()[\"year\"]) {\n <div>{{ textChoosePast() }}</div>\n }\n @if (errors()[\"yearFuture\"]) {\n <div>{{ textChooseFuture() }}</div>\n }\n @if (errors()[\"month\"]) {\n <div>{{ textChooseValidMonth() }}</div>\n }\n @if (errors()[\"future\"]) {\n <div>{{ textDateMayNotBeFuture() }}</div>\n }\n @if (errors()[\"past\"]) {\n <div>{{ textDateMayNotBePast() }}</div>\n }\n @if (errors()[\"invalidCode\"]) {\n <div>{{ textInvalidCode() }}</div>\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAYa,8BAA8B,CAAA;AAP3C,IAAA,WAAA,GAAA;AAQW,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAoB;AAC3C,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAW;AACnC,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAuC,SAAS,CAAC;AACrE,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAqB,SAAS,CAAC;AACjD,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAsB,SAAS,CAAC;AAE5D,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAE3C,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AAC1B,YAAA,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,CAAC,cAAc,EAAE,CAAC;AAC3I,SAAC,CAAC;AAEF,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AAC3B,YAAA,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE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AA,EAAA,CAAA;kBAP1C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EACvB,UAAA,EAAA,IAAI,EAGC,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,8+BAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;;AEVjD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-validation-messages.mjs","sources":["../../../../projects/softpak/components/spx-validation-messages/spx-validation-messages.component.ts","../../../../projects/softpak/components/spx-validation-messages/spx-validation-messages.component.html","../../../../projects/softpak/components/spx-validation-messages/softpak-components-spx-validation-messages.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\r\nimport { AbstractControl, ValidationErrors } from '@angular/forms';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { spxTextChooseFuture, spxTextChoosePast, spxTextChooseValidMonth, spxTextDateMayNotBeFuture, spxTextDateMayNotBePast, spxTextInvalidCode, spxTextPatternNotValid, spxTextRequired, spxTextTooHigh, spxTextTooLong, spxTextTooLow, spxTextTooShort } from '@softpak/components/spx-translate';\r\n\r\n@Component({\r\n selector: 'spx-validation-messages',\r\n standalone: true,\r\n templateUrl: './spx-validation-messages.component.html',\r\n styleUrl: './spx-validation-messages.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SpxValidationMessagesComponent { \r\n readonly errors = input.required<ValidationErrors>();\r\n readonly touched = input.required<boolean>();\r\n readonly formControlI = input<AbstractControl<any,any> | undefined>(undefined);\r\n readonly fieldLabel = input<string | undefined>(undefined);\r\n readonly submitTried = input<boolean | undefined>(undefined);\r\n\r\n translateService = inject(TranslateService);\r\n \r\n textTooLong = computed(() => {\r\n return this.translateService.instant(spxTextTooLong, { fieldLabel: this.fieldLabel(), error: this.errors()[\"maxlength\"].requiredLength });\r\n });\r\n\r\n textTooShort = computed(() => {\r\n return this.translateService.instant(spxTextTooShort, { fieldLabel: this.fieldLabel(), error: this.errors()[\"minlength\"].requiredLength });\r\n });\r\n\r\n textTooHigh = computed(() => {\r\n return this.translateService.instant(spxTextTooHigh, { fieldLabel: this.fieldLabel(), error: this.errors()[\"max\"].max });\r\n });\r\n\r\n textTooLow = computed(() => {\r\n return this.translateService.instant(spxTextTooLow, { fieldLabel: this.fieldLabel(), error: this.errors()[\"min\"].min });\r\n });\r\n\r\n textPatternNotValid = computed(() => {\r\n return this.translateService.instant(spxTextPatternNotValid, { fieldLabel: this.fieldLabel() });\r\n });\r\n\r\n textRequired = computed(() => {\r\n return this.translateService.instant(spxTextRequired, { fieldLabel: this.fieldLabel() });\r\n });\r\n\r\n textChoosePast = computed(() => {\r\n return this.translateService.instant(spxTextChoosePast);\r\n });\r\n\r\n textChooseFuture = computed(() => {\r\n return this.translateService.instant(spxTextChooseFuture);\r\n });\r\n\r\n textChooseValidMonth = computed(() => {\r\n return this.translateService.instant(spxTextChooseValidMonth);\r\n });\r\n\r\n textDateMayNotBeFuture = computed(() => {\r\n return this.translateService.instant(spxTextDateMayNotBeFuture);\r\n });\r\n\r\n textDateMayNotBePast = computed(() => {\r\n return this.translateService.instant(spxTextDateMayNotBePast);\r\n });\r\n\r\n textInvalidCode = computed(() => {\r\n return this.translateService.instant(spxTextInvalidCode, { codeName: this.errors()[\"invalidCode\"].name, codeCode: this.errors()[\"invalidCode\"].code });\r\n });\r\n\r\n}\r\n","\r\n@if (formControlI() && errors() && (touched() || submitTried())) {\r\n @if (errors()[\"maxlength\"]) {\r\n <div>{{ textTooLong() }}</div>\r\n }\r\n @if (errors()[\"minlength\"]) {\r\n <div>{{ textTooShort() }}</div>\r\n }\r\n @if (errors()[\"max\"]) {\r\n <div>{{ textTooHigh() }}</div>\r\n }\r\n @if (errors()[\"min\"]) {\r\n <div>{{ textTooLow() }}</div>\r\n }\r\n @if (errors()[\"pattern\"]) {\r\n <div>{{ textPatternNotValid() }}</div>\r\n }\r\n @if (errors()[\"required\"]) {\r\n <div>{{ textRequired() }}</div>\r\n }\r\n @if (errors()[\"year\"]) {\r\n <div>{{ textChoosePast() }}</div>\r\n }\r\n @if (errors()[\"yearFuture\"]) {\r\n <div>{{ textChooseFuture() }}</div>\r\n }\r\n @if (errors()[\"month\"]) {\r\n <div>{{ textChooseValidMonth() }}</div>\r\n }\r\n @if (errors()[\"future\"]) {\r\n <div>{{ textDateMayNotBeFuture() }}</div>\r\n }\r\n @if (errors()[\"past\"]) {\r\n <div>{{ textDateMayNotBePast() }}</div>\r\n }\r\n @if (errors()[\"invalidCode\"]) {\r\n <div>{{ textInvalidCode() }}</div>\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAYa,8BAA8B,CAAA;AAP3C,IAAA,WAAA,GAAA;AAQW,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAoB;AAC3C,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAW;AACnC,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAuC,SAAS,CAAC;AACrE,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAqB,SAAS,CAAC;AACjD,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAsB,SAAS,CAAC;AAE5D,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAE3C,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AAC1B,YAAA,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,CAAC,cAAc,EAAE,CAAC;AAC3I,SAAC,CAAC;AAEF,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AAC3B,YAAA,OAAO,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AA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FD1BY,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAP1C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EACvB,UAAA,EAAA,IAAI,EAGC,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,0jCAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;;AEVjD;;AAEG;;;;"}
@@ -183,14 +183,14 @@ class SpxValidateControlComponent {
183
183
  return this.errors() && this.errors()['past'];
184
184
  });
185
185
  }
186
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxValidateControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
187
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.1", type: SpxValidateControlComponent, isStandalone: true, selector: "spx-validate-control", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, submitTried: { classPropertyName: "submitTried", publicName: "submitTried", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: true, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (control() && errors() && (touched() || submitTried())) {\n @if (maxLength()) {\n <div>'{{ label() }}' is too long, the maximum length is {{ maxLengthRequiredLength() }}.</div>\n }\n @if (minLength()) {\n <div>'{{ label() }}' is too short, the minimum length is {{ minLengthRequiredLength() }}.</div>\n }\n @if (max()) {\n <div>The value of '{{ label() }}' is too high, the maximum is {{ maxRequiredMax() }}.</div>\n }\n @if (min()) {\n <div>The value of '{{ label() }}' is too low, the minimum is {{ minRequiredMin() }}.</div>\n }\n @if (pattern()) {\n <div>The pattern of '{{ label() }}' not valid.</div>\n }\n @if (required()) {\n <div>'{{ label() }}' is required.</div>\n }\n @if (year()) {\n <div>Please choose a year between 1991 and the current year.</div>\n }\n @if (yearFuture()) {\n <div>Please choose a year between the current year and 2050.</div>\n }\n @if (month()) {\n <div>Please choose a valid month (a value between 01 and 12).</div>\n }\n @if (future()) {\n <div>The selected date may not be in the future.</div>\n }\n @if (past()) {\n <div>The selected date may not be in the past.</div>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
186
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: SpxValidateControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
187
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: SpxValidateControlComponent, isStandalone: true, selector: "spx-validate-control", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, submitTried: { classPropertyName: "submitTried", publicName: "submitTried", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: true, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (control() && errors() && (touched() || submitTried())) {\r\n @if (maxLength()) {\r\n <div>'{{ label() }}' is too long, the maximum length is {{ maxLengthRequiredLength() }}.</div>\r\n }\r\n @if (minLength()) {\r\n <div>'{{ label() }}' is too short, the minimum length is {{ minLengthRequiredLength() }}.</div>\r\n }\r\n @if (max()) {\r\n <div>The value of '{{ label() }}' is too high, the maximum is {{ maxRequiredMax() }}.</div>\r\n }\r\n @if (min()) {\r\n <div>The value of '{{ label() }}' is too low, the minimum is {{ minRequiredMin() }}.</div>\r\n }\r\n @if (pattern()) {\r\n <div>The pattern of '{{ label() }}' not valid.</div>\r\n }\r\n @if (required()) {\r\n <div>'{{ label() }}' is required.</div>\r\n }\r\n @if (year()) {\r\n <div>Please choose a year between 1991 and the current year.</div>\r\n }\r\n @if (yearFuture()) {\r\n <div>Please choose a year between the current year and 2050.</div>\r\n }\r\n @if (month()) {\r\n <div>Please choose a valid month (a value between 01 and 12).</div>\r\n }\r\n @if (future()) {\r\n <div>The selected date may not be in the future.</div>\r\n }\r\n @if (past()) {\r\n <div>The selected date may not be in the past.</div>\r\n }\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
188
188
  }
189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxValidateControlComponent, decorators: [{
189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: SpxValidateControlComponent, decorators: [{
190
190
  type: Component,
191
191
  args: [{ selector: 'spx-validate-control', imports: [
192
192
  FormsModule,
193
- ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control() && errors() && (touched() || submitTried())) {\n @if (maxLength()) {\n <div>'{{ label() }}' is too long, the maximum length is {{ maxLengthRequiredLength() }}.</div>\n }\n @if (minLength()) {\n <div>'{{ label() }}' is too short, the minimum length is {{ minLengthRequiredLength() }}.</div>\n }\n @if (max()) {\n <div>The value of '{{ label() }}' is too high, the maximum is {{ maxRequiredMax() }}.</div>\n }\n @if (min()) {\n <div>The value of '{{ label() }}' is too low, the minimum is {{ minRequiredMin() }}.</div>\n }\n @if (pattern()) {\n <div>The pattern of '{{ label() }}' not valid.</div>\n }\n @if (required()) {\n <div>'{{ label() }}' is required.</div>\n }\n @if (year()) {\n <div>Please choose a year between 1991 and the current year.</div>\n }\n @if (yearFuture()) {\n <div>Please choose a year between the current year and 2050.</div>\n }\n @if (month()) {\n <div>Please choose a valid month (a value between 01 and 12).</div>\n }\n @if (future()) {\n <div>The selected date may not be in the future.</div>\n }\n @if (past()) {\n <div>The selected date may not be in the past.</div>\n }\n}\n" }]
193
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control() && errors() && (touched() || submitTried())) {\r\n @if (maxLength()) {\r\n <div>'{{ label() }}' is too long, the maximum length is {{ maxLengthRequiredLength() }}.</div>\r\n }\r\n @if (minLength()) {\r\n <div>'{{ label() }}' is too short, the minimum length is {{ minLengthRequiredLength() }}.</div>\r\n }\r\n @if (max()) {\r\n <div>The value of '{{ label() }}' is too high, the maximum is {{ maxRequiredMax() }}.</div>\r\n }\r\n @if (min()) {\r\n <div>The value of '{{ label() }}' is too low, the minimum is {{ minRequiredMin() }}.</div>\r\n }\r\n @if (pattern()) {\r\n <div>The pattern of '{{ label() }}' not valid.</div>\r\n }\r\n @if (required()) {\r\n <div>'{{ label() }}' is required.</div>\r\n }\r\n @if (year()) {\r\n <div>Please choose a year between 1991 and the current year.</div>\r\n }\r\n @if (yearFuture()) {\r\n <div>Please choose a year between the current year and 2050.</div>\r\n }\r\n @if (month()) {\r\n <div>Please choose a valid month (a value between 01 and 12).</div>\r\n }\r\n @if (future()) {\r\n <div>The selected date may not be in the future.</div>\r\n }\r\n @if (past()) {\r\n <div>The selected date may not be in the past.</div>\r\n }\r\n}\r\n" }]
194
194
  }] });
195
195
 
196
196
  /**
@@ -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/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","\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { AbstractControl, FormsModule, ValidationErrors } from '@angular/forms';\n\n@Component({\n selector: 'spx-validate-control',\n templateUrl: './spx-validate-control.component.html',\n imports: [\n FormsModule,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxValidateControlComponent {\n readonly control = input.required<AbstractControl>();\n readonly label = input<string | unknown>();\n readonly submitTried = input<boolean>();\n readonly errors = input.required<ValidationErrors | null>();\n readonly touched = input.required<boolean>();\n\n maxLength = computed(() => {\n return this.errors() && this.errors()!['maxlength'];\n });\n\n maxLengthRequiredLength = computed(() => {\n return this.maxLength() && this.errors() && this.errors()!['maxlength']['requiredLength'];\n });\n\n minLength = computed(() => {\n return this.errors() && this.errors()!['minlength'];\n });\n\n minLengthRequiredLength = computed(() => {\n return this.minLength() && this.errors() && this.errors()!['minlength']['requiredLength'];\n });\n\n max = computed(() => {\n return this.errors() && this.errors()!['max'];\n });\n\n maxRequiredMax = computed(() => {\n return this.max() && this.errors() && this.errors()!['max']['max'];\n });\n\n min = computed(() => {\n return this.errors() && this.errors()!['min'];\n });\n\n minRequiredMin = computed(() => {\n return this.min() && this.errors() && this.errors()!['min']['min'];\n });\n\n pattern = computed(() => {\n return this.errors() && this.errors()!['pattern'];\n });\n\n required = computed(() => {\n return this.errors() && this.errors()!['required'];\n });\n\n year = computed(() => {\n return this.errors() && this.errors()!['year'];\n });\n\n yearFuture = computed(() => {\n return this.errors() && this.errors()!['yearFuture'];\n });\n\n month = computed(() => {\n return this.errors() && this.errors()!['month'];\n });\n\n future = computed(() => {\n return this.errors() && this.errors()!['future'];\n });\n\n past = computed(() => {\n return this.errors() && this.errors()!['past'];\n });\n}\n","@if (control() && errors() && (touched() || submitTried())) {\n @if (maxLength()) {\n <div>'{{ label() }}' is too long, the maximum length is {{ maxLengthRequiredLength() }}.</div>\n }\n @if (minLength()) {\n <div>'{{ label() }}' is too short, the minimum length is {{ minLengthRequiredLength() }}.</div>\n }\n @if (max()) {\n <div>The value of '{{ label() }}' is too high, the maximum is {{ maxRequiredMax() }}.</div>\n }\n @if (min()) {\n <div>The value of '{{ label() }}' is too low, the minimum is {{ minRequiredMin() }}.</div>\n }\n @if (pattern()) {\n <div>The pattern of '{{ label() }}' not valid.</div>\n }\n @if (required()) {\n <div>'{{ label() }}' is required.</div>\n }\n @if (year()) {\n <div>Please choose a year between 1991 and the current year.</div>\n }\n @if (yearFuture()) {\n <div>Please choose a year between the current year and 2050.</div>\n }\n @if (month()) {\n <div>Please choose a valid month (a value between 01 and 12).</div>\n }\n @if (future()) {\n <div>The selected date may not be in the future.</div>\n }\n @if (past()) {\n <div>The selected date may not be in the past.</div>\n }\n}\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;;AAE7B,IAAA,OAAO,IAAI;AACf;;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;QACtE,IAAI,CAAC,K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AA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECbxC,ypCAmCA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED3BQ,WAAW,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKN,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBATvC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAEvB,OAAA,EAAA;wBACL,WAAW;AACd,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ypCAAA,EAAA;;;AEXnD;;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';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorRequired = () => (control: AbstractControl): ValidationErrors | null => {\r\n if (\r\n control &&\r\n valuePairToValue(control.value) === undefined ||\r\n valuePairToValue(control.value) === null ||\r\n valuePairToValue(control.value) === '' ||\r\n valuePairToValue(control.value) === 0\r\n ) {\r\n return { required: true };\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMax = (max: number) => (control: AbstractControl): { max: { max: number; actual: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\r\n if (!isNaN(value) && value > max) {\r\n return {\r\n max: {\r\n max,\r\n actual: value\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMaxLength = (maximumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { maxlength: { requiredLength: number; actualLength: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n let value = valuePairToValue(control.value);\r\n if (sanitizer) {\r\n value = sanitizer(value.toString());\r\n }\r\n if (value.toString().length > maximumLength) {\r\n return {\r\n maxlength: {\r\n requiredLength: maximumLength,\r\n actualLength: value.toString().length\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMin = (min: number) => (control: AbstractControl): { min: { min: number; actual: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\r\n\r\n if (!isNaN(value) && value < min) {\r\n return {\r\n min: {\r\n min,\r\n actual: value\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMinLength = (minimumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { minlength: { requiredLength: number; actualLength: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n let value = valuePairToValue(control.value);\r\n if (sanitizer) {\r\n value = sanitizer(value.toString());\r\n }\r\n if (value.toString().length < minimumLength) {\r\n return {\r\n minlength: {\r\n requiredLength: minimumLength,\r\n actualLength: value.toString().length\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\nimport { spxValidatorRequired } from './required.validator';\r\n\r\nexport const spxValidatorPattern = (matcher: RegExp) => (control: AbstractControl): ValidationErrors | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const matches = valuePairToValue(control.value).toString().match(matcher);\r\n if (matches === null || matches.length === 0) {\r\n return { pattern: true };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\r\n\r\nimport { DateTime } from 'luxon';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\nimport { spxValidatorRequired } from './required.validator';\r\n\r\nexport const spxValidatorYearAndMonth = (future?: boolean) => (control: AbstractControl): ValidationErrors | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const val = valuePairToValue(control.value);\r\n if (val.toUpperCase() !== 'ACEP') {\r\n const date = DateTime.fromISO(val);\r\n const year = date.year;\r\n const month = date.month;\r\n if (val.length < 6) {\r\n return {\r\n minlength: {\r\n requiredLength: 6,\r\n actualLength: val.length\r\n }\r\n };\r\n }\r\n if (month < 1 || month > 12) {\r\n return { month: true };\r\n }\r\n if (future) {\r\n if (year > 2050 || year < DateTime.now().year) {\r\n return { yearFuture: true };\r\n }\r\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') < DateTime.now()) {\r\n return { past: true };\r\n }\r\n } else {\r\n if (year < 1971 || year > DateTime.now().year) {\r\n return { year: true };\r\n }\r\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') > DateTime.now()) {\r\n return { future: true };\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n};\r\n","\r\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\r\nimport { AbstractControl, FormsModule, ValidationErrors } from '@angular/forms';\r\n\r\n@Component({\r\n selector: 'spx-validate-control',\r\n templateUrl: './spx-validate-control.component.html',\r\n imports: [\r\n FormsModule,\r\n ],\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SpxValidateControlComponent {\r\n readonly control = input.required<AbstractControl>();\r\n readonly label = input<string | unknown>();\r\n readonly submitTried = input<boolean>();\r\n readonly errors = input.required<ValidationErrors | null>();\r\n readonly touched = input.required<boolean>();\r\n\r\n maxLength = computed(() => {\r\n return this.errors() && this.errors()!['maxlength'];\r\n });\r\n\r\n maxLengthRequiredLength = computed(() => {\r\n return this.maxLength() && this.errors() && this.errors()!['maxlength']['requiredLength'];\r\n });\r\n\r\n minLength = computed(() => {\r\n return this.errors() && this.errors()!['minlength'];\r\n });\r\n\r\n minLengthRequiredLength = computed(() => {\r\n return this.minLength() && this.errors() && this.errors()!['minlength']['requiredLength'];\r\n });\r\n\r\n max = computed(() => {\r\n return this.errors() && this.errors()!['max'];\r\n });\r\n\r\n maxRequiredMax = computed(() => {\r\n return this.max() && this.errors() && this.errors()!['max']['max'];\r\n });\r\n\r\n min = computed(() => {\r\n return this.errors() && this.errors()!['min'];\r\n });\r\n\r\n minRequiredMin = computed(() => {\r\n return this.min() && this.errors() && this.errors()!['min']['min'];\r\n });\r\n\r\n pattern = computed(() => {\r\n return this.errors() && this.errors()!['pattern'];\r\n });\r\n\r\n required = computed(() => {\r\n return this.errors() && this.errors()!['required'];\r\n });\r\n\r\n year = computed(() => {\r\n return this.errors() && this.errors()!['year'];\r\n });\r\n\r\n yearFuture = computed(() => {\r\n return this.errors() && this.errors()!['yearFuture'];\r\n });\r\n\r\n month = computed(() => {\r\n return this.errors() && this.errors()!['month'];\r\n });\r\n\r\n future = computed(() => {\r\n return this.errors() && this.errors()!['future'];\r\n });\r\n\r\n past = computed(() => {\r\n return this.errors() && this.errors()!['past'];\r\n });\r\n}\r\n","@if (control() && errors() && (touched() || submitTried())) {\r\n @if (maxLength()) {\r\n <div>'{{ label() }}' is too long, the maximum length is {{ maxLengthRequiredLength() }}.</div>\r\n }\r\n @if (minLength()) {\r\n <div>'{{ label() }}' is too short, the minimum length is {{ minLengthRequiredLength() }}.</div>\r\n }\r\n @if (max()) {\r\n <div>The value of '{{ label() }}' is too high, the maximum is {{ maxRequiredMax() }}.</div>\r\n }\r\n @if (min()) {\r\n <div>The value of '{{ label() }}' is too low, the minimum is {{ minRequiredMin() }}.</div>\r\n }\r\n @if (pattern()) {\r\n <div>The pattern of '{{ label() }}' not valid.</div>\r\n }\r\n @if (required()) {\r\n <div>'{{ label() }}' is required.</div>\r\n }\r\n @if (year()) {\r\n <div>Please choose a year between 1991 and the current year.</div>\r\n }\r\n @if (yearFuture()) {\r\n <div>Please choose a year between the current year and 2050.</div>\r\n }\r\n @if (month()) {\r\n <div>Please choose a valid month (a value between 01 and 12).</div>\r\n }\r\n @if (future()) {\r\n <div>The selected date may not be in the future.</div>\r\n }\r\n @if (past()) {\r\n <div>The selected date may not be in the past.</div>\r\n }\r\n}\r\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,KA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BAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECbxC,+tCAmCA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED3BQ,WAAW,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKN,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBATvC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAEvB,OAAA,EAAA;wBACL,WAAW;AACd,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+tCAAA,EAAA;;;AEXnD;;AAEG;;;;"}
@@ -0,0 +1,135 @@
1
+ import * as i0 from '@angular/core';
2
+ import { signal, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i2 from '@angular/forms';
4
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
5
+ import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
6
+ import { SpxFormButtonTypeEnum, SpxFormViewComponent } from '@softpak/components/spx-form-view';
7
+ import { valuePairToValue, SpxSeverityEnum, unsubscribeSubscriptions } from '@softpak/components/spx-helpers';
8
+ import { SpxInputTypeEnum } from '@softpak/components/spx-inputs';
9
+ import { spxValidatorRequired } from '@softpak/components/spx-validation';
10
+ import { spxTextChannel, spxTextCompany, spxTextSelect, spxTextSelectYourCompany } from '@softpak/components/spx-translate';
11
+ import { IonHeader, IonToolbar, IonTitle, IonButtons, IonContent } from '@ionic/angular/standalone';
12
+ import { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';
13
+ import { TranslatePipe } from '@ngx-translate/core';
14
+ import { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';
15
+ import { spxChannelReducer, spxChannelActions } from '@softpak/components/spx-channel-selection';
16
+ import * as i1 from '@ngrx/store';
17
+
18
+ const spxSectionWelcome = 'welcome';
19
+ const spxCtrlChannel = 'channel';
20
+ const spxCtrlChannelType = 'channelType';
21
+ class SpxWelcomeComponent {
22
+ constructor(store, formBuilder) {
23
+ this.store = store;
24
+ this.formBuilder = formBuilder;
25
+ this.channels = signal([]);
26
+ this.formGroup = signal(undefined);
27
+ this.suggestions = signal({
28
+ [spxCtrlChannelType]: [],
29
+ [spxCtrlChannel]: [],
30
+ });
31
+ this.textChannel = spxTextChannel;
32
+ this.textCompany = spxTextCompany;
33
+ this.textSelect = spxTextSelect;
34
+ this.textSelectYourCompany = spxTextSelectYourCompany;
35
+ this.formSection = computed(() => this.formGroup()?.get(spxSectionWelcome));
36
+ this.ctrlChannel = computed(() => this.formSection()?.get(spxCtrlChannel));
37
+ this.ctrlChannelType = computed(() => this.formSection()?.get(spxCtrlChannelType));
38
+ this.subscriptions = {};
39
+ this.form = signal({
40
+ buttons: [
41
+ {
42
+ severity: SpxSeverityEnum.success,
43
+ type: SpxFormButtonTypeEnum.submit,
44
+ label: () => this.textSelect,
45
+ }
46
+ ],
47
+ sections: [
48
+ {
49
+ key: spxSectionWelcome,
50
+ showTitle: () => false,
51
+ fields: [
52
+ {
53
+ key: spxCtrlChannel,
54
+ type: () => SpxInputTypeEnum.radio,
55
+ label: () => this.textCompany,
56
+ validators: () => [spxValidatorRequired()],
57
+ },
58
+ {
59
+ key: spxCtrlChannelType,
60
+ type: () => SpxInputTypeEnum.radio,
61
+ label: () => this.textChannel,
62
+ capitalize: () => true,
63
+ show: () => valuePairToValue(this.ctrlChannel().value),
64
+ validators: () => [spxValidatorRequired()],
65
+ },
66
+ ]
67
+ }
68
+ ]
69
+ });
70
+ this.formGroup.set(this.formBuilder.group({
71
+ [spxSectionWelcome]: SpxFormViewComponent.createForm(this.formBuilder, this.form().sections)
72
+ }));
73
+ }
74
+ ngOnDestroy() {
75
+ unsubscribeSubscriptions(this.subscriptions);
76
+ }
77
+ ngOnInit() {
78
+ let channels = [];
79
+ this.subscriptions.channels = this.store.select(spxChannelReducer.default.selectChannels).subscribe(channelsD => {
80
+ channels = channelsD;
81
+ this.channels.set(channels);
82
+ this.suggestions()[spxCtrlChannel] = channels.filter(channel => channel.channelTypes.map(type => type.name).includes(SpxAppChannelTypeEnum.production)).map(c => ({ description: c.brand, value: c.brand }));
83
+ });
84
+ this.subscriptions.channel = this.ctrlChannel().valueChanges.subscribe(valuePair => {
85
+ const brandFound = channels.find(c => c.brand === valuePairToValue(valuePair));
86
+ this.suggestions()[spxCtrlChannelType] = !brandFound ? [] : brandFound?.channelTypes?.map(channelType => ({
87
+ description: channelType.name,
88
+ value: channelType.name
89
+ }));
90
+ this.ctrlChannelType().setValue({
91
+ value: SpxAppChannelTypeEnum.production,
92
+ });
93
+ });
94
+ }
95
+ onSubmit() {
96
+ const channel = this.channels().find(c => c.brand === valuePairToValue(this.ctrlChannel().value));
97
+ const channelType = valuePairToValue(this.ctrlChannelType().value);
98
+ if (!channel) {
99
+ this.store.dispatch(spxToasterActions.createWarning({
100
+ autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,
101
+ messageText: 'Please select a company',
102
+ }));
103
+ }
104
+ else {
105
+ this.store.dispatch(spxChannelActions.choose({
106
+ channel,
107
+ channelType,
108
+ }));
109
+ }
110
+ }
111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: SpxWelcomeComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
112
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: SpxWelcomeComponent, isStandalone: true, selector: "spx-welcome", ngImport: i0, template: "<ion-header>\r\n <ion-toolbar>\r\n <ion-title>\r\n {{ textSelectYourCompany | translate | capitalize }}\r\n </ion-title>\r\n <ion-buttons slot=\"end\">\r\n </ion-buttons>\r\n </ion-toolbar>\r\n</ion-header>\r\n<ion-content class=\"ion-padding\">\r\n <form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\r\n <spx-form-view\r\n [spxForm]=\"form()\"\r\n [spxFormGroup]=\"formSection()\"\r\n [spxSuggestions]=\"suggestions()\">\r\n </spx-form-view>\r\n </form>\r\n</ion-content>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxForm", "spxSuggestions"], outputs: ["spxBlur", "spxClick", "spxSearch"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
113
+ }
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: SpxWelcomeComponent, decorators: [{
115
+ type: Component,
116
+ args: [{ selector: 'spx-welcome', imports: [
117
+ FormsModule,
118
+ ReactiveFormsModule,
119
+ SpxCapitalizePipe,
120
+ SpxFormViewComponent,
121
+ IonHeader,
122
+ IonToolbar,
123
+ IonTitle,
124
+ IonButtons,
125
+ IonContent,
126
+ TranslatePipe,
127
+ ], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<ion-header>\r\n <ion-toolbar>\r\n <ion-title>\r\n {{ textSelectYourCompany | translate | capitalize }}\r\n </ion-title>\r\n <ion-buttons slot=\"end\">\r\n </ion-buttons>\r\n </ion-toolbar>\r\n</ion-header>\r\n<ion-content class=\"ion-padding\">\r\n <form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\r\n <spx-form-view\r\n [spxForm]=\"form()\"\r\n [spxFormGroup]=\"formSection()\"\r\n [spxSuggestions]=\"suggestions()\">\r\n </spx-form-view>\r\n </form>\r\n</ion-content>" }]
128
+ }], ctorParameters: () => [{ type: i1.Store }, { type: i2.FormBuilder }] });
129
+
130
+ /**
131
+ * Generated bundle index. Do not edit.
132
+ */
133
+
134
+ export { SpxWelcomeComponent, spxCtrlChannel, spxCtrlChannelType, spxSectionWelcome };
135
+ //# sourceMappingURL=softpak-components-spx-welcome.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"softpak-components-spx-welcome.mjs","sources":["../../../../projects/softpak/components/spx-welcome/spx-welcome.component.ts","../../../../projects/softpak/components/spx-welcome/spx-welcome.component.html","../../../../projects/softpak/components/spx-welcome/softpak-components-spx-welcome.ts"],"sourcesContent":["import { Component, OnInit, OnDestroy, signal, computed, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { Store } from '@ngrx/store';\r\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\r\nimport { SpxFormButtonTypeEnum, SpxFormI, SpxFormViewComponent } from '@softpak/components/spx-form-view';\r\nimport { SpxSeverityEnum, unsubscribeSubscriptions, valuePairToValue } from '@softpak/components/spx-helpers';\r\nimport { SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\r\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\r\nimport { Subscription } from 'rxjs';\r\nimport { spxTextChannel, spxTextCompany, spxTextSelect, spxTextSelectYourCompany } from '@softpak/components/spx-translate';\r\nimport { IonHeader, IonToolbar, IonTitle, IonButtons, IonContent } from '@ionic/angular/standalone';\r\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\r\nimport { TranslatePipe } from '@ngx-translate/core';\r\nimport { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';\r\nimport { spxChannelReducer, spxChannelActions } from '@softpak/components/spx-channel-selection';\r\n\r\nexport const spxSectionWelcome = 'welcome';\r\nexport const spxCtrlChannel = 'channel';\r\nexport const spxCtrlChannelType = 'channelType';\r\n\r\n@Component({\r\n selector: 'spx-welcome',\r\n templateUrl: './spx-welcome.component.html',\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n SpxCapitalizePipe,\r\n SpxFormViewComponent,\r\n IonHeader,\r\n IonToolbar,\r\n IonTitle,\r\n IonButtons,\r\n IonContent,\r\n TranslatePipe,\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n})\r\nexport class SpxWelcomeComponent implements OnInit, OnDestroy {\r\n private readonly channels = signal<SpxAppChannelI[]>([]);\r\n protected readonly formGroup = signal<FormGroup | undefined>(undefined);\r\n protected readonly suggestions = signal<{\r\n [spxCtrlChannelType]?: SpxValuePair<string>[];\r\n [spxCtrlChannel]?: SpxValuePair<string>[];\r\n}>({\r\n [spxCtrlChannelType]: [],\r\n [spxCtrlChannel]: [],\r\n });\r\n\r\n textChannel = spxTextChannel;\r\n textCompany = spxTextCompany;\r\n textSelect = spxTextSelect;\r\n textSelectYourCompany = spxTextSelectYourCompany;\r\n\r\n protected readonly formSection = computed(() => this.formGroup()?.get(spxSectionWelcome) as FormGroup);\r\n private readonly ctrlChannel = computed(() => this.formSection()?.get(spxCtrlChannel) as FormControl);\r\n private readonly ctrlChannelType = computed(() => this.formSection()?.get(spxCtrlChannelType) as FormControl);\r\n private subscriptions: {\r\n channel?: Subscription;\r\n channels?: Subscription;\r\n } = {};\r\n\r\n protected readonly form = signal<SpxFormI>({\r\n buttons: [\r\n {\r\n severity: SpxSeverityEnum.success,\r\n type: SpxFormButtonTypeEnum.submit,\r\n label: () => this.textSelect,\r\n }\r\n ],\r\n sections: [\r\n {\r\n key: spxSectionWelcome,\r\n showTitle: () => false,\r\n fields: [\r\n {\r\n key: spxCtrlChannel,\r\n type: () => SpxInputTypeEnum.radio,\r\n label: () => this.textCompany,\r\n validators: () => [spxValidatorRequired()],\r\n },\r\n {\r\n key: spxCtrlChannelType,\r\n type: () => SpxInputTypeEnum.radio,\r\n label: () => this.textChannel,\r\n capitalize: () => true,\r\n show: () => valuePairToValue(this.ctrlChannel().value),\r\n validators: () => [spxValidatorRequired()],\r\n },\r\n ]\r\n }\r\n ]\r\n });\r\n\r\n constructor(\r\n private readonly store: Store,\r\n private readonly formBuilder: FormBuilder\r\n ) {\r\n this.formGroup.set(this.formBuilder.group({\r\n [spxSectionWelcome]: SpxFormViewComponent.createForm(this.formBuilder, this.form().sections)\r\n }));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n unsubscribeSubscriptions(this.subscriptions);\r\n }\r\n\r\n ngOnInit(): void {\r\n let channels: SpxAppChannelI[] = [];\r\n\r\n this.subscriptions.channels = this.store.select(spxChannelReducer.default.selectChannels).subscribe(channelsD => {\r\n channels = channelsD;\r\n this.channels.set(channels);\r\n this.suggestions()[spxCtrlChannel] = channels.filter(channel => channel.channelTypes.map(type => type.name).includes(SpxAppChannelTypeEnum.production)).map(c => ({ description: c.brand, value: c.brand }));\r\n });\r\n\r\n this.subscriptions.channel = this.ctrlChannel().valueChanges.subscribe(valuePair => {\r\n const brandFound = channels.find(c => c.brand === valuePairToValue(valuePair));\r\n this.suggestions()[spxCtrlChannelType] = !brandFound ? [] : brandFound?.channelTypes?.map(channelType => ({\r\n description: channelType.name,\r\n value: channelType.name\r\n }));\r\n this.ctrlChannelType().setValue({\r\n value: SpxAppChannelTypeEnum.production,\r\n });\r\n });\r\n }\r\n\r\n protected onSubmit(): void {\r\n const channel = this.channels().find(c => c.brand === valuePairToValue(this.ctrlChannel().value))!;\r\n const channelType = valuePairToValue(this.ctrlChannelType().value);\r\n\r\n if (!channel) {\r\n this.store.dispatch(spxToasterActions.createWarning({\r\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\r\n messageText: 'Please select a company',\r\n }))\r\n } else {\r\n this.store.dispatch(spxChannelActions.choose({\r\n channel,\r\n channelType,\r\n }));\r\n }\r\n }\r\n}\r\n","<ion-header>\r\n <ion-toolbar>\r\n <ion-title>\r\n {{ textSelectYourCompany | translate | capitalize }}\r\n </ion-title>\r\n <ion-buttons slot=\"end\">\r\n </ion-buttons>\r\n </ion-toolbar>\r\n</ion-header>\r\n<ion-content class=\"ion-padding\">\r\n <form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\r\n <spx-form-view\r\n [spxForm]=\"form()\"\r\n [spxFormGroup]=\"formSection()\"\r\n [spxSuggestions]=\"suggestions()\">\r\n </spx-form-view>\r\n </form>\r\n</ion-content>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgBO,MAAM,iBAAiB,GAAG;AAC1B,MAAM,cAAc,GAAG;AACvB,MAAM,kBAAkB,GAAG;MAoBrB,mBAAmB,CAAA;IAwD9B,WACmB,CAAA,KAAY,EACZ,WAAwB,EAAA;QADxB,IAAK,CAAA,KAAA,GAAL,KAAK;QACL,IAAW,CAAA,WAAA,GAAX,WAAW;AAzDb,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAmB,EAAE,CAAC;AACrC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAwB,SAAS,CAAC;QACpD,IAAW,CAAA,WAAA,GAAG,MAAM,CAGtC;YACC,CAAC,kBAAkB,GAAG,EAAE;YACxB,CAAC,cAAc,GAAG,EAAE;AACrB,SAAA,CAAC;QAEF,IAAW,CAAA,WAAA,GAAG,cAAc;QAC5B,IAAW,CAAA,WAAA,GAAG,cAAc;QAC5B,IAAU,CAAA,UAAA,GAAG,aAAa;QAC1B,IAAqB,CAAA,qBAAA,GAAG,wBAAwB;AAE7B,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,EAAE,GAAG,CAAC,iBAAiB,CAAc,CAAC;AACrF,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,EAAE,GAAG,CAAC,cAAc,CAAgB,CAAC;AACpF,QAAA,IAAA,CAAA,eAAe,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAA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eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EAAA,QAAA,EAAA,8jBAAA,EAAA;;;AEpClB;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softpak/components",
3
- "version": "20.1.0",
3
+ "version": "20.2.1",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "19.x.x || 20.x.x",
@@ -44,22 +44,18 @@
44
44
  "types": "./spx-app-configuration/index.d.ts",
45
45
  "default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
46
46
  },
47
- "./spx-app-expiry": {
48
- "types": "./spx-app-expiry/index.d.ts",
49
- "default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
50
- },
51
47
  "./spx-capitalize": {
52
48
  "types": "./spx-capitalize/index.d.ts",
53
49
  "default": "./fesm2022/softpak-components-spx-capitalize.mjs"
54
50
  },
51
+ "./spx-app-expiry": {
52
+ "types": "./spx-app-expiry/index.d.ts",
53
+ "default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
54
+ },
55
55
  "./spx-button": {
56
56
  "types": "./spx-button/index.d.ts",
57
57
  "default": "./fesm2022/softpak-components-spx-button.mjs"
58
58
  },
59
- "./spx-card": {
60
- "types": "./spx-card/index.d.ts",
61
- "default": "./fesm2022/softpak-components-spx-card.mjs"
62
- },
63
59
  "./spx-change-details": {
64
60
  "types": "./spx-change-details/index.d.ts",
65
61
  "default": "./fesm2022/softpak-components-spx-change-details.mjs"
@@ -72,22 +68,18 @@
72
68
  "types": "./spx-confirm/index.d.ts",
73
69
  "default": "./fesm2022/softpak-components-spx-confirm.mjs"
74
70
  },
75
- "./spx-check-digit": {
76
- "types": "./spx-check-digit/index.d.ts",
77
- "default": "./fesm2022/softpak-components-spx-check-digit.mjs"
78
- },
79
71
  "./spx-form-section": {
80
72
  "types": "./spx-form-section/index.d.ts",
81
73
  "default": "./fesm2022/softpak-components-spx-form-section.mjs"
82
74
  },
83
- "./spx-helpers": {
84
- "types": "./spx-helpers/index.d.ts",
85
- "default": "./fesm2022/softpak-components-spx-helpers.mjs"
86
- },
87
75
  "./spx-form-view": {
88
76
  "types": "./spx-form-view/index.d.ts",
89
77
  "default": "./fesm2022/softpak-components-spx-form-view.mjs"
90
78
  },
79
+ "./spx-check-digit": {
80
+ "types": "./spx-check-digit/index.d.ts",
81
+ "default": "./fesm2022/softpak-components-spx-check-digit.mjs"
82
+ },
91
83
  "./spx-inputs": {
92
84
  "types": "./spx-inputs/index.d.ts",
93
85
  "default": "./fesm2022/softpak-components-spx-inputs.mjs"
@@ -100,33 +92,25 @@
100
92
  "types": "./spx-number-check/index.d.ts",
101
93
  "default": "./fesm2022/softpak-components-spx-number-check.mjs"
102
94
  },
103
- "./spx-patch": {
104
- "types": "./spx-patch/index.d.ts",
105
- "default": "./fesm2022/softpak-components-spx-patch.mjs"
95
+ "./spx-card": {
96
+ "types": "./spx-card/index.d.ts",
97
+ "default": "./fesm2022/softpak-components-spx-card.mjs"
106
98
  },
107
99
  "./spx-pagination": {
108
100
  "types": "./spx-pagination/index.d.ts",
109
101
  "default": "./fesm2022/softpak-components-spx-pagination.mjs"
110
102
  },
111
- "./spx-pipes": {
112
- "types": "./spx-pipes/index.d.ts",
113
- "default": "./fesm2022/softpak-components-spx-pipes.mjs"
103
+ "./spx-helpers": {
104
+ "types": "./spx-helpers/index.d.ts",
105
+ "default": "./fesm2022/softpak-components-spx-helpers.mjs"
114
106
  },
115
107
  "./spx-progress-bar": {
116
108
  "types": "./spx-progress-bar/index.d.ts",
117
109
  "default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
118
110
  },
119
- "./spx-spinner": {
120
- "types": "./spx-spinner/index.d.ts",
121
- "default": "./fesm2022/softpak-components-spx-spinner.mjs"
122
- },
123
- "./spx-tabs": {
124
- "types": "./spx-tabs/index.d.ts",
125
- "default": "./fesm2022/softpak-components-spx-tabs.mjs"
126
- },
127
- "./spx-storage": {
128
- "types": "./spx-storage/index.d.ts",
129
- "default": "./fesm2022/softpak-components-spx-storage.mjs"
111
+ "./spx-patch": {
112
+ "types": "./spx-patch/index.d.ts",
113
+ "default": "./fesm2022/softpak-components-spx-patch.mjs"
130
114
  },
131
115
  "./spx-stock-info": {
132
116
  "types": "./spx-stock-info/index.d.ts",
@@ -136,14 +120,22 @@
136
120
  "types": "./spx-suggestion/index.d.ts",
137
121
  "default": "./fesm2022/softpak-components-spx-suggestion.mjs"
138
122
  },
123
+ "./spx-spinner": {
124
+ "types": "./spx-spinner/index.d.ts",
125
+ "default": "./fesm2022/softpak-components-spx-spinner.mjs"
126
+ },
127
+ "./spx-pipes": {
128
+ "types": "./spx-pipes/index.d.ts",
129
+ "default": "./fesm2022/softpak-components-spx-pipes.mjs"
130
+ },
131
+ "./spx-tabs": {
132
+ "types": "./spx-tabs/index.d.ts",
133
+ "default": "./fesm2022/softpak-components-spx-tabs.mjs"
134
+ },
139
135
  "./spx-toaster": {
140
136
  "types": "./spx-toaster/index.d.ts",
141
137
  "default": "./fesm2022/softpak-components-spx-toaster.mjs"
142
138
  },
143
- "./spx-toggle": {
144
- "types": "./spx-toggle/index.d.ts",
145
- "default": "./fesm2022/softpak-components-spx-toggle.mjs"
146
- },
147
139
  "./spx-translate": {
148
140
  "types": "./spx-translate/index.d.ts",
149
141
  "default": "./fesm2022/softpak-components-spx-translate.mjs"
@@ -152,10 +144,22 @@
152
144
  "types": "./spx-update/index.d.ts",
153
145
  "default": "./fesm2022/softpak-components-spx-update.mjs"
154
146
  },
147
+ "./spx-storage": {
148
+ "types": "./spx-storage/index.d.ts",
149
+ "default": "./fesm2022/softpak-components-spx-storage.mjs"
150
+ },
155
151
  "./spx-validation": {
156
152
  "types": "./spx-validation/index.d.ts",
157
153
  "default": "./fesm2022/softpak-components-spx-validation.mjs"
158
154
  },
155
+ "./spx-toggle": {
156
+ "types": "./spx-toggle/index.d.ts",
157
+ "default": "./fesm2022/softpak-components-spx-toggle.mjs"
158
+ },
159
+ "./spx-welcome": {
160
+ "types": "./spx-welcome/index.d.ts",
161
+ "default": "./fesm2022/softpak-components-spx-welcome.mjs"
162
+ },
159
163
  "./spx-validation-messages": {
160
164
  "types": "./spx-validation-messages/index.d.ts",
161
165
  "default": "./fesm2022/softpak-components-spx-validation-messages.mjs"
@@ -22,12 +22,17 @@ declare enum SpxAppChannelTypeEnum {
22
22
  development = "Development"
23
23
  }
24
24
 
25
+ interface SpxChannelTypeI {
26
+ name: SpxAppChannelTypeEnum;
27
+ webUrl?: string;
28
+ }
29
+
25
30
  interface SpxAppChannelI {
26
31
  backendCompanyCode: string;
27
32
  brand: string;
28
33
  catalogFileName: string;
29
34
  catalogPrefix: string;
30
- channelTypes: SpxAppChannelTypeEnum[];
35
+ channelTypes: SpxChannelTypeI[];
31
36
  default?: boolean;
32
37
  serviceURI: string;
33
38
  }
@@ -63,4 +68,4 @@ interface SpxAppConfigI {
63
68
  }
64
69
 
65
70
  export { SpxAppChannelTypeEnum, SpxAppIdEnum, SpxAppLangEnum };
66
- export type { SpxAppAlertI, SpxAppBundleSetI, SpxAppChannelI, SpxAppConfigI };
71
+ export type { SpxAppAlertI, SpxAppBundleSetI, SpxAppChannelI, SpxAppConfigI, SpxChannelTypeI };