@softpak/components 19.17.0-beta.3 → 19.17.0-beta.4

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 (55) hide show
  1. package/README.md +24 -24
  2. package/fesm2022/softpak-components-spx-alert.mjs +2 -2
  3. package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
  4. package/fesm2022/softpak-components-spx-app-configuration.mjs.map +1 -1
  5. package/fesm2022/softpak-components-spx-app-expiry.mjs +2 -2
  6. package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
  7. package/fesm2022/softpak-components-spx-button.mjs +2 -2
  8. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  9. package/fesm2022/softpak-components-spx-capitalize.mjs.map +1 -1
  10. package/fesm2022/softpak-components-spx-card.mjs +8 -8
  11. package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
  12. package/fesm2022/softpak-components-spx-change-details.mjs +2 -2
  13. package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
  14. package/fesm2022/softpak-components-spx-channel-selection.mjs +52 -52
  15. package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
  16. package/fesm2022/softpak-components-spx-check-digit.mjs +3 -3
  17. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  18. package/fesm2022/softpak-components-spx-confirm.mjs +4 -4
  19. package/fesm2022/softpak-components-spx-confirm.mjs.map +1 -1
  20. package/fesm2022/softpak-components-spx-form-section.mjs +2 -2
  21. package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
  22. package/fesm2022/softpak-components-spx-form-view.mjs +4 -4
  23. package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
  24. package/fesm2022/softpak-components-spx-helpers.mjs.map +1 -1
  25. package/fesm2022/softpak-components-spx-inputs.mjs +20 -20
  26. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  27. package/fesm2022/softpak-components-spx-navigation.mjs +6 -6
  28. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  29. package/fesm2022/softpak-components-spx-number-check.mjs +2 -2
  30. package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
  31. package/fesm2022/softpak-components-spx-pagination.mjs +2 -2
  32. package/fesm2022/softpak-components-spx-pagination.mjs.map +1 -1
  33. package/fesm2022/softpak-components-spx-patch.mjs +2 -2
  34. package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
  35. package/fesm2022/softpak-components-spx-pipes.mjs.map +1 -1
  36. package/fesm2022/softpak-components-spx-progress-bar.mjs +2 -2
  37. package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
  38. package/fesm2022/softpak-components-spx-spinner.mjs +2 -2
  39. package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
  40. package/fesm2022/softpak-components-spx-stock-info.mjs +2 -2
  41. package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
  42. package/fesm2022/softpak-components-spx-storage.mjs.map +1 -1
  43. package/fesm2022/softpak-components-spx-suggestion.mjs +2 -2
  44. package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
  45. package/fesm2022/softpak-components-spx-toaster.mjs +2 -2
  46. package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
  47. package/fesm2022/softpak-components-spx-translate.mjs.map +1 -1
  48. package/fesm2022/softpak-components-spx-update.mjs +4 -4
  49. package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
  50. package/fesm2022/softpak-components-spx-validation.mjs +20 -33
  51. package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
  52. package/package.json +30 -30
  53. package/spx-update/store/spx-update-check/spx-update-check.actions.d.ts +5 -5
  54. package/spx-update/store/spx-update-pending/spx-update-pending.actions.d.ts +1 -1
  55. package/spx-validation/spx-validate-control.component.d.ts +4 -2
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-toaster.mjs","sources":["../../../../projects/softpak/components/spx-toaster/src/spx-toaster-autoclose-speed.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster.component.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster.component.html","../../../../projects/softpak/components/spx-toaster/src/spx-toaster-message.interface.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.actions.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.initial.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.reducer.ts","../../../../projects/softpak/components/spx-toaster/softpak-components-spx-toaster.ts"],"sourcesContent":["export enum SpxToasterSeverityEnum {\n ERROR = 'error',\n INFO = 'info',\n SUCCESS = 'success',\n WARNING = 'warning',\n}\n\nexport enum SpxToasterAutoCloseSpeedEnum {\n DEFAULT = -1,\n SLOW = -2,\n}\n\nexport function toasterAutocloseSpeed(autoCloseSpeed: SpxToasterAutoCloseSpeedEnum, messageText: string) {\n switch (autoCloseSpeed) {\n case SpxToasterAutoCloseSpeedEnum.DEFAULT:\n return Math.min(Math.max(messageText.length * 50, 2000), 7000);\n case SpxToasterAutoCloseSpeedEnum.SLOW:\n return Math.min(Math.max(messageText.length * 60, 3000), 10000);\n default:\n return autoCloseSpeed;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n effect,\n input,\n output,\n} from '@angular/core';\nimport { SpxToasterMessageI } from './spx-toaster-message.interface';\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\n\n@Component({\n selector: 'spx-toaster',\n standalone: true,\n imports: [SpxAlertComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrl: './spx-toaster.component.scss',\n templateUrl: './spx-toaster.component.html',\n host: {\n class: 'spx-toasts-displayer',\n },\n})\nexport class SpxToasterComponent {\n messages = input.required<SpxToasterMessageI[]>();\n readonly spxAutoclose = input<number>();\n spxClose = output<number>();\n constructor() {\n effect(() => {\n this.messages().forEach((message) => {\n if (message.autoClose) {\n setTimeout(() => {\n this.handleClose(message.id);\n }, message.autoClose);\n }\n });\n });\n }\n\n public handleClose(id: number) {\n this.spxClose.emit(id);\n }\n}\n","\n@if (messages().length > 0) {\n <div\n class=\"flex flex-col gap-2 fixed bottom-16 left-0 right-0 mx-auto px-3 z-50\">\n @for (message of messages(); track message) {\n <spx-alert\n [spxAutoclose]=\"message.autoClose\"\n [spxCloseable]=\"message.closeable\"\n [spxSeverity]=\"message.severity\"\n [spxTitle]=\"message.title\"\n (spxClose)=\"handleClose(message.id)\"\n (click)=\"handleClose(message.id)\"\n [id]=\"message.id\"\n >{{message.message}}\n </spx-alert>\n }\n </div>\n}","import { SpxSeverityEnum } from \"@softpak/components/spx-helpers\";\nimport { SpxToasterAutoCloseSpeedEnum, toasterAutocloseSpeed } from \"./spx-toaster-autoclose-speed\";\n\nexport class SpxToasterMessageI {\n private _autoClose?: number;\n title?: string;\n closeable?: boolean;\n id!: number;\n message!: string;\n severity!: SpxSeverityEnum;\n uniqueIdentifier?: string;\n\n constructor(message: string, id: number, severity: SpxSeverityEnum, autoClose?: SpxToasterAutoCloseSpeedEnum, closeable?: boolean) {\n this.autoClose = autoClose;\n this.message = message || '';\n this.id = id;\n this.severity = severity;\n this.closeable = closeable;\n }\n\n get autoClose(): number | undefined {\n return this._autoClose;\n }\n\n set autoClose(value: number | undefined) {\n if (value && value !== this._autoClose) {\n this._autoClose = toasterAutocloseSpeed(value, this.message);\n }\n }\n\n}\n","import { createAction, props, union } from '@ngrx/store';\nimport { SpxToasterAutoCloseSpeedEnum } from '../../src/spx-toaster-autoclose-speed';\n\nexport const clearAll = createAction('[SPX / Toaster] Clear all', props<Record<string, unknown>>());\nexport const clearAllErrors = createAction('[SPX / Toaster] Clear all errors', props<Record<string, unknown>>());\nexport const clearAllErrorsAndWarnings = createAction('[SPX / Toaster] Clear all errors and warnings', props<Record<string, unknown>>());\nexport const clearMessage = createAction('[SPX / Toaster] Clear message', props<{ id: number }>());\nexport const createError = createAction('[SPX / Toaster] Create error', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createInfo = createAction('[SPX / Toaster] Create info', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createSuccess = createAction('[SPX / Toaster] Create success', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createWarning = createAction('[SPX / Toaster] Create warning', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\n\nconst all = union({\n clearAll,\n clearAllErrors,\n clearAllErrorsAndWarnings,\n clearMessage,\n createError,\n createInfo,\n createSuccess,\n createWarning,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-toaster.state\";\n\nexport const initialState: StateI = {\n messages: [],\n nextId: 1,\n};\n","\nimport * as actions from './spx-toaster.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { StateI } from './spx-toaster.state';\nimport { initialState } from './spx-toaster.initial';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { toasterAutocloseSpeed } from '../../src/spx-toaster-autoclose-speed';\nimport { SpxToasterMessageI } from '../../src/spx-toaster-message.interface';\n \nexport function addMessage(\n currentMessages: SpxToasterMessageI[], newMessage: SpxToasterMessageI): SpxToasterMessageI[] {\n const messages = [new SpxToasterMessageI(\n newMessage.message,\n newMessage.id,\n newMessage.severity,\n newMessage.autoClose ? newMessage.autoClose : undefined,\n newMessage.closeable ? newMessage.closeable : true,\n ), ...currentMessages];\n if (messages.length > 5) {\n messages.length = 5;\n }\n return messages;\n}\n\nexport default createFeature({\n name: 'spxToaster',\n reducer: createReducer(\n initialState,\n on(actions.clearAll, (state: StateI): StateI => {\n return {\n ...state,\n messages: []\n };\n }),\n on(actions.clearAllErrors, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error)]\n };\n }),\n on(actions.clearAllErrorsAndWarnings, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error &&\n msg.severity !== SpxSeverityEnum.warning)]\n };\n }),\n on(actions.clearMessage, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.id !== action.id)]\n };\n }),\n on(actions.createError, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.error,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createInfo, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.info,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createSuccess, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.success,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createWarning, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.warning,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n ),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.clearAll","actions.clearAllErrors","actions.clearAllErrorsAndWarnings","actions.clearMessage","actions.createError","actions.createInfo","actions.createSuccess","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AAM;gBAChB,OAAO,EAAE,MAAM,CAAC,WAAW;gBAC3B,QAAQ,EAAE,eAAe,CAAC,OAAO;gBACjC,KAAK,EAAE,MAAM,CAAC,KAAK;aACtB,CAAC;AACF,YAAA,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG;SAC1B;AACL,KAAC,CAAC,EACF,EAAE,CAACC,aAAqB,EAAE,CAAC,KAAa,EAAE,MAAM,KAAY;QACxD,OAAO;AACH,YAAA,GAAG,KAAK;AACR,YAAA,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE;gBACjC,SAAS,EAAE,MAAM,CAAC,SAAS,GAAG,qBAAqB,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,SAAS;AACrG,gBAAA,SAAS,EAAE,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI;gBACrD,EAAE,EAAE,KAAK,CAAC,MAAM;gBAChB,OAAO,EAAE,MAAM,CAAC,WAAW;gBAC3B,QAAQ,EAAE,eAAe,CAAC,OAAO;gBACjC,KAAK,EAAE,MAAM,CAAC,KAAK;aACtB,CAAC;AACF,YAAA,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG;SAC1B;AACL,KAAC,CAAC,CACL;AACJ,CAAA,CAAC;;;;;;;;;;;;AC9GF;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-toaster.mjs","sources":["../../../../projects/softpak/components/spx-toaster/src/spx-toaster-autoclose-speed.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster.component.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster.component.html","../../../../projects/softpak/components/spx-toaster/src/spx-toaster-message.interface.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.actions.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.initial.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.reducer.ts","../../../../projects/softpak/components/spx-toaster/softpak-components-spx-toaster.ts"],"sourcesContent":["export enum SpxToasterSeverityEnum {\r\n ERROR = 'error',\r\n INFO = 'info',\r\n SUCCESS = 'success',\r\n WARNING = 'warning',\r\n}\r\n\r\nexport enum SpxToasterAutoCloseSpeedEnum {\r\n DEFAULT = -1,\r\n SLOW = -2,\r\n}\r\n\r\nexport function toasterAutocloseSpeed(autoCloseSpeed: SpxToasterAutoCloseSpeedEnum, messageText: string) {\r\n switch (autoCloseSpeed) {\r\n case SpxToasterAutoCloseSpeedEnum.DEFAULT:\r\n return Math.min(Math.max(messageText.length * 50, 2000), 7000);\r\n case SpxToasterAutoCloseSpeedEnum.SLOW:\r\n return Math.min(Math.max(messageText.length * 60, 3000), 10000);\r\n default:\r\n return autoCloseSpeed;\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n effect,\r\n input,\r\n output,\r\n} from '@angular/core';\r\nimport { SpxToasterMessageI } from './spx-toaster-message.interface';\r\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\r\n\r\n@Component({\r\n selector: 'spx-toaster',\r\n standalone: true,\r\n imports: [SpxAlertComponent],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './spx-toaster.component.scss',\r\n templateUrl: './spx-toaster.component.html',\r\n host: {\r\n class: 'spx-toasts-displayer',\r\n },\r\n})\r\nexport class SpxToasterComponent {\r\n messages = input.required<SpxToasterMessageI[]>();\r\n readonly spxAutoclose = input<number>();\r\n spxClose = output<number>();\r\n constructor() {\r\n effect(() => {\r\n this.messages().forEach((message) => {\r\n if (message.autoClose) {\r\n setTimeout(() => {\r\n this.handleClose(message.id);\r\n }, message.autoClose);\r\n }\r\n });\r\n });\r\n }\r\n\r\n public handleClose(id: number) {\r\n this.spxClose.emit(id);\r\n }\r\n}\r\n","\r\n@if (messages().length > 0) {\r\n <div\r\n class=\"flex flex-col gap-2 fixed bottom-16 left-0 right-0 mx-auto px-3 z-50\">\r\n @for (message of messages(); track message) {\r\n <spx-alert\r\n [spxAutoclose]=\"message.autoClose\"\r\n [spxCloseable]=\"message.closeable\"\r\n [spxSeverity]=\"message.severity\"\r\n [spxTitle]=\"message.title\"\r\n (spxClose)=\"handleClose(message.id)\"\r\n (click)=\"handleClose(message.id)\"\r\n [id]=\"message.id\"\r\n >{{message.message}}\r\n </spx-alert>\r\n }\r\n </div>\r\n}","import { SpxSeverityEnum } from \"@softpak/components/spx-helpers\";\r\nimport { SpxToasterAutoCloseSpeedEnum, toasterAutocloseSpeed } from \"./spx-toaster-autoclose-speed\";\r\n\r\nexport class SpxToasterMessageI {\r\n private _autoClose?: number;\r\n title?: string;\r\n closeable?: boolean;\r\n id!: number;\r\n message!: string;\r\n severity!: SpxSeverityEnum;\r\n uniqueIdentifier?: string;\r\n\r\n constructor(message: string, id: number, severity: SpxSeverityEnum, autoClose?: SpxToasterAutoCloseSpeedEnum, closeable?: boolean) {\r\n this.autoClose = autoClose;\r\n this.message = message || '';\r\n this.id = id;\r\n this.severity = severity;\r\n this.closeable = closeable;\r\n }\r\n\r\n get autoClose(): number | undefined {\r\n return this._autoClose;\r\n }\r\n\r\n set autoClose(value: number | undefined) {\r\n if (value && value !== this._autoClose) {\r\n this._autoClose = toasterAutocloseSpeed(value, this.message);\r\n }\r\n }\r\n\r\n}\r\n","import { createAction, props, union } from '@ngrx/store';\r\nimport { SpxToasterAutoCloseSpeedEnum } from '../../src/spx-toaster-autoclose-speed';\r\n\r\nexport const clearAll = createAction('[SPX / Toaster] Clear all', props<Record<string, unknown>>());\r\nexport const clearAllErrors = createAction('[SPX / Toaster] Clear all errors', props<Record<string, unknown>>());\r\nexport const clearAllErrorsAndWarnings = createAction('[SPX / Toaster] Clear all errors and warnings', props<Record<string, unknown>>());\r\nexport const clearMessage = createAction('[SPX / Toaster] Clear message', props<{ id: number }>());\r\nexport const createError = createAction('[SPX / Toaster] Create error', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\r\nexport const createInfo = createAction('[SPX / Toaster] Create info', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\r\nexport const createSuccess = createAction('[SPX / Toaster] Create success', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\r\nexport const createWarning = createAction('[SPX / Toaster] Create warning', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\r\n\r\nconst all = union({\r\n clearAll,\r\n clearAllErrors,\r\n clearAllErrorsAndWarnings,\r\n clearMessage,\r\n createError,\r\n createInfo,\r\n createSuccess,\r\n createWarning,\r\n});\r\n\r\nexport type Actions = typeof all;\r\n","import { StateI } from \"./spx-toaster.state\";\r\n\r\nexport const initialState: StateI = {\r\n messages: [],\r\n nextId: 1,\r\n};\r\n","\r\nimport * as actions from './spx-toaster.actions';\r\nimport { createFeature, createReducer, on } from '@ngrx/store';\r\nimport { StateI } from './spx-toaster.state';\r\nimport { initialState } from './spx-toaster.initial';\r\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\r\nimport { toasterAutocloseSpeed } from '../../src/spx-toaster-autoclose-speed';\r\nimport { SpxToasterMessageI } from '../../src/spx-toaster-message.interface';\r\n \r\nexport function addMessage(\r\n currentMessages: SpxToasterMessageI[], newMessage: SpxToasterMessageI): SpxToasterMessageI[] {\r\n const messages = [new SpxToasterMessageI(\r\n newMessage.message,\r\n newMessage.id,\r\n newMessage.severity,\r\n newMessage.autoClose ? newMessage.autoClose : undefined,\r\n newMessage.closeable ? newMessage.closeable : true,\r\n ), ...currentMessages];\r\n if (messages.length > 5) {\r\n messages.length = 5;\r\n }\r\n return messages;\r\n}\r\n\r\nexport default createFeature({\r\n name: 'spxToaster',\r\n reducer: createReducer(\r\n initialState,\r\n on(actions.clearAll, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n messages: []\r\n };\r\n }),\r\n on(actions.clearAllErrors, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error)]\r\n };\r\n }),\r\n on(actions.clearAllErrorsAndWarnings, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error &&\r\n msg.severity !== SpxSeverityEnum.warning)]\r\n };\r\n }),\r\n on(actions.clearMessage, (state: StateI, action): StateI => {\r\n return {\r\n ...state,\r\n messages: [...state.messages.filter(msg => msg.id !== action.id)]\r\n };\r\n }),\r\n on(actions.createError, (state: StateI, action): StateI => {\r\n return {\r\n ...state,\r\n messages: addMessage(state.messages, {\r\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\r\n closeable: action.closeable ? action.closeable : true,\r\n id: state.nextId,\r\n message: action.messageText,\r\n severity: SpxSeverityEnum.error,\r\n title: action.title,\r\n }),\r\n nextId: state.nextId + 1\r\n };\r\n }),\r\n on(actions.createInfo, (state: StateI, action): StateI => {\r\n return {\r\n ...state,\r\n messages: addMessage(state.messages, {\r\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\r\n closeable: action.closeable ? action.closeable : true,\r\n id: state.nextId,\r\n message: action.messageText,\r\n severity: SpxSeverityEnum.info,\r\n title: action.title,\r\n }),\r\n nextId: state.nextId + 1\r\n };\r\n }),\r\n on(actions.createSuccess, (state: StateI, action): StateI => {\r\n return {\r\n ...state,\r\n messages: addMessage(state.messages, {\r\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\r\n closeable: action.closeable ? action.closeable : true,\r\n id: state.nextId,\r\n message: action.messageText,\r\n severity: SpxSeverityEnum.success,\r\n title: action.title,\r\n }),\r\n nextId: state.nextId + 1\r\n };\r\n }),\r\n on(actions.createWarning, (state: StateI, action): StateI => {\r\n return {\r\n ...state,\r\n messages: addMessage(state.messages, {\r\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\r\n closeable: action.closeable ? action.closeable : true,\r\n id: state.nextId,\r\n message: action.messageText,\r\n severity: SpxSeverityEnum.warning,\r\n title: action.title,\r\n }),\r\n nextId: state.nextId + 1\r\n };\r\n }),\r\n ),\r\n});\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.clearAll","actions.clearAllErrors","actions.clearAllErrorsAndWarnings","actions.clearMessage","actions.createError","actions.createInfo","actions.createSuccess","actions.createWarning"],"mappings":";;;;;;IAAY;AAAZ,CAAA,UAAY,sBAAsB,EAAA;AAC9B,IAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,sBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,GAKjC,EAAA,CAAA,CAAA;IAEW;AAAZ,CAAA,UAAY,4BAA4B,EAAA;AACpC,IAAA,4BAAA,CAAA,4BAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAAA,SAAY;AACZ,IAAA,4BAAA,CAAA,4BAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAAA,MAAS;AACb,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,GAGvC,EAAA,CAAA,CAAA;AAEe,SAAA,qBAAqB,CAAC,cAA4C,EAAE,WAAmB,EAAA;IACnG,QAAQ,cAAc;QAClB,KAAK,4BAA4B,CAAC,OAAO;AACrC,YAAA,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC;QAClE,KAAK,4BAA4B,CAAC,IAAI;AAClC,YAAA,OAAO,IAAI,CAAC,GAAG,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ak/components/spx-translate/spx-translate._const.ts","../../../../projects/softpak/components/spx-translate/spx-translate.en.ts","../../../../projects/softpak/components/spx-translate/spx-translate.nl.ts","../../../../projects/softpak/components/spx-translate/softpak-components-spx-translate.ts"],"sourcesContent":["export const spxTextCheckingForUpdates = 'spxTextCheckingForUpdates';\nexport const spxTextOneMomentPlease = 'spxTextOneMomentPlease';\nexport const spxTextPatchAvailable = 'spxTextPatchAvailable';\nexport const spxTextUpdateAvailable = 'spxTextUpdateAvailable';\nexport const spxTextReadyToBeInstalled = 'spxTextReadyToBeInstalled';\nexport const spxTextUpdate = 'spxTextUpdate';\nexport const spxTextOpenAppStore = 'spxTextOpenAppStore';\nexport const spxTextChannel = 'spxTextChannel';\nexport const spxTextCompany = 'spxTextCompany';\nexport const spxTextSelect = 'spxTextSelect';\nexport const spxTextSelectYourCompany = 'spxSelectYourCompany';\nexport const spxTextChange = 'spxTextChange';\n\nexport interface SpxTranslateI {\n [spxTextChange]: string;\n [spxTextCheckingForUpdates]: string;\n [spxTextOneMomentPlease]: string;\n [spxTextPatchAvailable]: string;\n [spxTextUpdateAvailable]: string;\n [spxTextReadyToBeInstalled]: string;\n [spxTextUpdate]: string;\n [spxTextOpenAppStore]: string;\n [spxTextChannel]: string;\n [spxTextCompany]: string;\n [spxTextSelect]: string;\n [spxTextSelectYourCompany]: string;\n}\n","import { spxTextChange, spxTextChannel, spxTextCheckingForUpdates, spxTextCompany, spxTextOneMomentPlease, spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextSelect, spxTextSelectYourCompany, spxTextUpdate, spxTextUpdateAvailable, SpxTranslateI } from \"./spx-translate._const\";\n\nexport const SpxTranslateEn: SpxTranslateI = {\n [spxTextCheckingForUpdates]: 'checking for updates',\n [spxTextOneMomentPlease]: 'one moment please',\n [spxTextReadyToBeInstalled]: 'ready to be installed',\n [spxTextPatchAvailable]: 'patch available',\n [spxTextUpdateAvailable]: 'update available',\n [spxTextUpdate]: 'update',\n [spxTextOpenAppStore]: 'open app store',\n [spxTextChannel]: 'channel',\n [spxTextCompany]: 'company',\n [spxTextSelect]: 'select',\n [spxTextSelectYourCompany]: 'select your company',\n [spxTextChange]: 'change',\n}\n","import { spxTextChange, spxTextChannel, spxTextCheckingForUpdates, spxTextCompany, spxTextOneMomentPlease, spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextSelect, spxTextSelectYourCompany, spxTextUpdate, spxTextUpdateAvailable, SpxTranslateI } from \"./spx-translate._const\";\n\nexport const SpxTranslateNl: SpxTranslateI = {\n [spxTextCheckingForUpdates]: 'controleren op updates',\n [spxTextOneMomentPlease]: 'een moment geduld alstublieft',\n [spxTextReadyToBeInstalled]: 'ready to be installed',\n [spxTextPatchAvailable]: 'patch available',\n [spxTextUpdateAvailable]: 'update available',\n [spxTextUpdate]: 'updaten',\n [spxTextOpenAppStore]: 'open app store',\n [spxTextChannel]: 'kanaal',\n [spxTextCompany]: 'bedrijf',\n [spxTextSelect]: 'selecteer',\n [spxTextSelectYourCompany]: 'selecteer uw bedrijf',\n [spxTextChange]: 'wissel',\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAO,MAAM,yBAAyB,GAAG;AAClC,MAAM,sBAAsB,GAAG;AAC/B,MAAM,qBAAqB,GAAG;AAC9B,MAAM,sBAAsB,GAAG;AAC/B,MAAM,yBAAyB,GAAG;AAClC,MAAM,aAAa,GAAG;AACtB,MAAM,mBAAmB,GAAG;AAC5B,MAAM,cAAc,GAAG;AACvB,MAAM,cAAc,GAAG;AACvB,MAAM,aAAa,GAAG;AACtB,MAAM,wBAAwB,GAAG;AACjC,MAAM,aAAa,GAAG;;ACThB,MAAA,cAAc,GAAkB;IAC3C,CAAC,yBAAyB,GAAG,sBAAsB;IACnD,CAAC,sBAAsB,GAAG,mBAAmB;IAC7C,CAAC,yBAAyB,GAAG,uBAAuB;IACpD,CAAC,qBAAqB,GAAG,iBAAiB;IAC1C,CAAC,sBAAsB,GAAG,kBAAkB;IAC5C,CAAC,aAAa,GAAG,QAAQ;IACzB,CAAC,mBAAmB,GAAG,gBAAgB;IACvC,CAAC,cAAc,GAAG,SAAS;IAC3B,CAAC,cAAc,GAAG,SAAS;IAC3B,CAAC,aAAa,GAAG,QAAQ;IACzB,CAAC,wBAAwB,GAAG,qBAAqB;IACjD,CAAC,aAAa,GAAG,QAAQ;;;ACZd,MAAA,cAAc,GAAkB;IAC3C,CAAC,yBAAyB,GAAG,wBAAwB;IACrD,CAAC,sBAAsB,GAAG,+BAA+B;IACzD,CAAC,yBAAyB,GAAG,uBAAuB;IACpD,CAAC,qBAAqB,GAAG,iBAAiB;IAC1C,CAAC,sBAAsB,GAAG,kBAAkB;IAC5C,CAAC,aAAa,GAAG,SAAS;IAC1B,CAAC,mBAAmB,GAAG,gBAAgB;IACvC,CAAC,cAAc,GAAG,QAAQ;IAC1B,CAAC,cAAc,GAAG,SAAS;IAC3B,CAAC,aAAa,GAAG,WAAW;IAC5B,CAAC,wBAAwB,GAAG,sBAAsB;IAClD,CAAC,aAAa,GAAG,QAAQ;;;ACd3B;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-translate.mjs","sources":["../../../../projects/softpak/components/spx-translate/spx-translate._const.ts","../../../../projects/softpak/components/spx-translate/spx-translate.en.ts","../../../../projects/softpak/components/spx-translate/spx-translate.nl.ts","../../../../projects/softpak/components/spx-translate/softpak-components-spx-translate.ts"],"sourcesContent":["export const spxTextCheckingForUpdates = 'spxTextCheckingForUpdates';\r\nexport const spxTextOneMomentPlease = 'spxTextOneMomentPlease';\r\nexport const spxTextPatchAvailable = 'spxTextPatchAvailable';\r\nexport const spxTextUpdateAvailable = 'spxTextUpdateAvailable';\r\nexport const spxTextReadyToBeInstalled = 'spxTextReadyToBeInstalled';\r\nexport const spxTextUpdate = 'spxTextUpdate';\r\nexport const spxTextOpenAppStore = 'spxTextOpenAppStore';\r\nexport const spxTextChannel = 'spxTextChannel';\r\nexport const spxTextCompany = 'spxTextCompany';\r\nexport const spxTextSelect = 'spxTextSelect';\r\nexport const spxTextSelectYourCompany = 'spxSelectYourCompany';\r\nexport const spxTextChange = 'spxTextChange';\r\n\r\nexport interface SpxTranslateI {\r\n [spxTextChange]: string;\r\n [spxTextCheckingForUpdates]: string;\r\n [spxTextOneMomentPlease]: string;\r\n [spxTextPatchAvailable]: string;\r\n [spxTextUpdateAvailable]: string;\r\n [spxTextReadyToBeInstalled]: string;\r\n [spxTextUpdate]: string;\r\n [spxTextOpenAppStore]: string;\r\n [spxTextChannel]: string;\r\n [spxTextCompany]: string;\r\n [spxTextSelect]: string;\r\n [spxTextSelectYourCompany]: string;\r\n}\r\n","import { spxTextChange, spxTextChannel, spxTextCheckingForUpdates, spxTextCompany, spxTextOneMomentPlease, spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextSelect, spxTextSelectYourCompany, spxTextUpdate, spxTextUpdateAvailable, SpxTranslateI } from \"./spx-translate._const\";\r\n\r\nexport const SpxTranslateEn: SpxTranslateI = {\r\n [spxTextCheckingForUpdates]: 'checking for updates',\r\n [spxTextOneMomentPlease]: 'one moment please',\r\n [spxTextReadyToBeInstalled]: 'ready to be installed',\r\n [spxTextPatchAvailable]: 'patch available',\r\n [spxTextUpdateAvailable]: 'update available',\r\n [spxTextUpdate]: 'update',\r\n [spxTextOpenAppStore]: 'open app store',\r\n [spxTextChannel]: 'channel',\r\n [spxTextCompany]: 'company',\r\n [spxTextSelect]: 'select',\r\n [spxTextSelectYourCompany]: 'select your company',\r\n [spxTextChange]: 'change',\r\n}\r\n","import { spxTextChange, spxTextChannel, spxTextCheckingForUpdates, spxTextCompany, spxTextOneMomentPlease, spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextSelect, spxTextSelectYourCompany, spxTextUpdate, spxTextUpdateAvailable, SpxTranslateI } from \"./spx-translate._const\";\r\n\r\nexport const SpxTranslateNl: SpxTranslateI = {\r\n [spxTextCheckingForUpdates]: 'controleren op updates',\r\n [spxTextOneMomentPlease]: 'een moment geduld alstublieft',\r\n [spxTextReadyToBeInstalled]: 'ready to be installed',\r\n [spxTextPatchAvailable]: 'patch available',\r\n [spxTextUpdateAvailable]: 'update available',\r\n [spxTextUpdate]: 'updaten',\r\n [spxTextOpenAppStore]: 'open app store',\r\n [spxTextChannel]: 'kanaal',\r\n [spxTextCompany]: 'bedrijf',\r\n [spxTextSelect]: 'selecteer',\r\n [spxTextSelectYourCompany]: 'selecteer uw bedrijf',\r\n [spxTextChange]: 'wissel',\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAO,MAAM,yBAAyB,GAAG;AAClC,MAAM,sBAAsB,GAAG;AAC/B,MAAM,qBAAqB,GAAG;AAC9B,MAAM,sBAAsB,GAAG;AAC/B,MAAM,yBAAyB,GAAG;AAClC,MAAM,aAAa,GAAG;AACtB,MAAM,mBAAmB,GAAG;AAC5B,MAAM,cAAc,GAAG;AACvB,MAAM,cAAc,GAAG;AACvB,MAAM,aAAa,GAAG;AACtB,MAAM,wBAAwB,GAAG;AACjC,MAAM,aAAa,GAAG;;ACThB,MAAA,cAAc,GAAkB;IAC3C,CAAC,yBAAyB,GAAG,sBAAsB;IACnD,CAAC,sBAAsB,GAAG,mBAAmB;IAC7C,CAAC,yBAAyB,GAAG,uBAAuB;IACpD,CAAC,qBAAqB,GAAG,iBAAiB;IAC1C,CAAC,sBAAsB,GAAG,kBAAkB;IAC5C,CAAC,aAAa,GAAG,QAAQ;IACzB,CAAC,mBAAmB,GAAG,gBAAgB;IACvC,CAAC,cAAc,GAAG,SAAS;IAC3B,CAAC,cAAc,GAAG,SAAS;IAC3B,CAAC,aAAa,GAAG,QAAQ;IACzB,CAAC,wBAAwB,GAAG,qBAAqB;IACjD,CAAC,aAAa,GAAG,QAAQ;;;ACZd,MAAA,cAAc,GAAkB;IAC3C,CAAC,yBAAyB,GAAG,wBAAwB;IACrD,CAAC,sBAAsB,GAAG,+BAA+B;IACzD,CAAC,yBAAyB,GAAG,uBAAuB;IACpD,CAAC,qBAAqB,GAAG,iBAAiB;IAC1C,CAAC,sBAAsB,GAAG,kBAAkB;IAC5C,CAAC,aAAa,GAAG,SAAS;IAC1B,CAAC,mBAAmB,GAAG,gBAAgB;IACvC,CAAC,cAAc,GAAG,QAAQ;IAC1B,CAAC,cAAc,GAAG,SAAS;IAC3B,CAAC,aAAa,GAAG,WAAW;IAC5B,CAAC,wBAAwB,GAAG,sBAAsB;IAClD,CAAC,aAAa,GAAG,QAAQ;;;ACd3B;;AAEG;;;;"}
@@ -131,7 +131,7 @@ class SpxUpdatePageComponent {
131
131
  console.log('UPD constructor');
132
132
  }
133
133
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxUpdatePageComponent, deps: [{ token: i1.Store }, { token: i2.ActivatedRoute }, { token: i3.NavController }], target: i0.ɵɵFactoryTarget.Component }); }
134
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SpxUpdatePageComponent, isStandalone: true, selector: "spx-update-page", ngImport: i0, template: "<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ spxTextCheckingForUpdates | translate | capitalize }}\n </ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n {{ spxTextOneMomentPlease | translate | capitalize }}...\n</ion-content>\n", dependencies: [{ kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { 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: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
134
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SpxUpdatePageComponent, isStandalone: true, selector: "spx-update-page", ngImport: i0, template: "<ion-header>\r\n <ion-toolbar>\r\n <ion-title>\r\n {{ spxTextCheckingForUpdates | translate | capitalize }}\r\n </ion-title>\r\n </ion-toolbar>\r\n</ion-header>\r\n\r\n<ion-content class=\"ion-padding\">\r\n {{ spxTextOneMomentPlease | translate | capitalize }}...\r\n</ion-content>\r\n", dependencies: [{ kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { 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: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
135
135
  }
136
136
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxUpdatePageComponent, decorators: [{
137
137
  type: Component,
@@ -142,7 +142,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
142
142
  IonTitle,
143
143
  SpxCapitalizePipe,
144
144
  TranslatePipe,
145
- ], template: "<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ spxTextCheckingForUpdates | translate | capitalize }}\n </ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n {{ spxTextOneMomentPlease | translate | capitalize }}...\n</ion-content>\n" }]
145
+ ], template: "<ion-header>\r\n <ion-toolbar>\r\n <ion-title>\r\n {{ spxTextCheckingForUpdates | translate | capitalize }}\r\n </ion-title>\r\n </ion-toolbar>\r\n</ion-header>\r\n\r\n<ion-content class=\"ion-padding\">\r\n {{ spxTextOneMomentPlease | translate | capitalize }}...\r\n</ion-content>\r\n" }]
146
146
  }], ctorParameters: () => [{ type: i1.Store }, { type: i2.ActivatedRoute }, { type: i3.NavController }] });
147
147
 
148
148
  const acceptUpdate = createAction('[SPX / Update Pending] Accept update', props());
@@ -235,7 +235,7 @@ class SpxUpdatePendingComponent {
235
235
  this.appStore.dispatch(acceptUpdate({}));
236
236
  }
237
237
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxUpdatePendingComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
238
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxUpdatePendingComponent, isStandalone: true, selector: "spx-update-pending", ngImport: i0, template: "@if (showLiveUpdateReady()) {\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\n <div class=\"grow\">\n <p\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\n </div>\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\n }}</spx-button>\n</div>\n}", dependencies: [{ kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
238
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxUpdatePendingComponent, isStandalone: true, selector: "spx-update-pending", ngImport: i0, template: "@if (showLiveUpdateReady()) {\r\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\r\n <div class=\"grow\">\r\n <p\r\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\r\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\r\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\r\n </div>\r\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\r\n }}</spx-button>\r\n</div>\r\n}", dependencies: [{ kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
239
239
  }
240
240
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxUpdatePendingComponent, decorators: [{
241
241
  type: Component,
@@ -243,7 +243,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
243
243
  SpxButtonComponent,
244
244
  SpxCapitalizePipe,
245
245
  TranslatePipe,
246
- ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (showLiveUpdateReady()) {\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\n <div class=\"grow\">\n <p\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\n </div>\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\n }}</spx-button>\n</div>\n}" }]
246
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (showLiveUpdateReady()) {\r\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\r\n <div class=\"grow\">\r\n <p\r\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\r\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\r\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\r\n </div>\r\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\r\n }}</spx-button>\r\n</div>\r\n}" }]
247
247
  }], ctorParameters: () => [{ type: i1.Store }] });
248
248
 
249
249
  const spxUpdateUrl = '';
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-update.mjs","sources":["../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.html","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.html","../../../../projects/softpak/components/spx-update/spx-update-url.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.effects.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.effects.ts","../../../../projects/softpak/components/spx-update/softpak-components-spx-update.ts"],"sourcesContent":["import { createAction, props, union } from '@ngrx/store';\n\nexport const anUpdateIsReady = createAction('[SPX / Update Check] An update is ready', props<Record<string, unknown>>());\nexport const clearError = createAction('[SPX / Update Check] Clear error', props<Record<string, unknown>>());\nexport const checkFailed = createAction('[SPX / Update Check] Error happened', props<{ startUpdateAgainAfterTimeout?: boolean }>());\nexport const initialize = createAction('[SPX / Update Check] Initialize', props<Record<string, unknown>>());\nexport const noUpdateWasFound = createAction('[SPX / Update Check] No update was found', props<{ startUpdateAgainAfterTimeout?: boolean }>());\nexport const notAvailableOnWeb = createAction('[SPX / Update Check] Not available on web', props<Record<string, unknown>>());\nexport const runCheck = createAction('[SPX / Update Check] Run', props<{ forceWaitForUpdate?: boolean; }>());\n\nconst all = union({\n anUpdateIsReady,\n clearError,\n checkFailed,\n initialize,\n noUpdateWasFound,\n notAvailableOnWeb,\n runCheck,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-update-check.state\";\n\nexport const initialState: StateI = {\n forceWaitForUpdate: false,\n lastCheck: null,\n showError: false,\n};\n","\nimport * as actions from './spx-update-check.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { StateI } from './spx-update-check.state';\nimport { initialState } from './spx-update-check.initial';\nimport { DateTime } from 'luxon';\n \nexport default createFeature({\n name: 'spxUpdateCheck',\n reducer: createReducer(\n initialState,\n on(actions.anUpdateIsReady, (state: StateI): StateI => {\n return {\n ...state,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(actions.clearError, (state: StateI): StateI => {\n return {\n ...state,\n showError: false,\n };\n }),\n on(actions.checkFailed, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n showError: true,\n };\n }),\n on(actions.noUpdateWasFound, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(actions.runCheck, (state: StateI, { forceWaitForUpdate }): StateI => {\n return {\n ...state,\n forceWaitForUpdate: forceWaitForUpdate ? true : state.forceWaitForUpdate\n };\n }),\n on(actions.notAvailableOnWeb, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false\n };\n }),\n ),\n});\n","import { Component } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { IonContent, IonHeader, IonTitle, IonToolbar, NavController } from '@ionic/angular/standalone';\nimport { Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { runCheck } from './store/spx-update-check/spx-update-check.actions';\nimport { default as updCheck } from './store/spx-update-check/spx-update-check.reducer';\nimport { unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextCheckingForUpdates, spxTextOneMomentPlease } from '@softpak/components/spx-translate';\nimport { ActivatedRoute } from '@angular/router';\n\n@Component({\n selector: 'spx-update-page',\n imports: [\n IonContent,\n IonHeader,\n IonToolbar,\n IonTitle,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n templateUrl: `./spx-update-page.component.html`,\n})\nexport class SpxUpdatePageComponent {\n spxTextCheckingForUpdates = spxTextCheckingForUpdates;\n spxTextOneMomentPlease = spxTextOneMomentPlease;\n\n private subscriptions: {\n updCheck?: Subscription;\n } = {};\n\n ngOnInit() {\n console.log('ngOnInit event fired');\n\n this.appStore.dispatch(runCheck({ forceWaitForUpdate: true }));\n this.subscriptions.updCheck = this.appStore.select(updCheck.selectForceWaitForUpdate).subscribe(forceWaitForUpdate => {\n if (forceWaitForUpdate === false) {\n if (this.activatedRoute.snapshot.data['url'] === undefined) {\n console.error('configure data property \\'url\\' in route for update page');\n }\n this.navController.navigateRoot(this.activatedRoute.snapshot.data['url']);\n }\n });\n }\n\n ngOnDestroy() {\n console.log('ngOnDestroy event fired');\n\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n constructor(\n private readonly appStore: Store,\n private readonly activatedRoute: ActivatedRoute,\n private readonly navController: NavController,\n ) {\n console.log('UPD constructor');\n }\n}\n","<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ spxTextCheckingForUpdates | translate | capitalize }}\n </ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n {{ spxTextOneMomentPlease | translate | capitalize }}...\n</ion-content>\n","import { createAction, props, union } from '@ngrx/store';\n\nexport const acceptUpdate = createAction('[SPX / Update Pending] Accept update', props<Record<string, unknown>>());\nexport const hasBeenDownloaded = createAction('[SPX / Update Pending] Has been downloaded', props<Record<string, unknown>>());\nexport const hasBeenInstalled = createAction('[SPX / Update Pending] Has been installed', props<Record<string, unknown>>());\nexport const postpone = createAction('[SPX / Update Pending] Postpone', props<Record<string, unknown>>());\nexport const postponeExpired = createAction('[SPX / Update Pending] Postpone expired', props<Record<string, unknown>>());\n\nconst all = union({\n acceptUpdate,\n hasBeenDownloaded,\n hasBeenInstalled,\n postpone,\n postponeExpired,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-update-pending.state\";\n\nexport const initialState: StateI = {\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n};\n","\nimport * as actions from './spx-update-pending.actions';\nimport { createReducer, on, createFeature } from '@ngrx/store';\nimport { StateI } from './spx-update-pending.state';\nimport { initialState } from './spx-update-pending.initial';\n\nexport default createFeature({\n name: 'spxUpdatePending',\n reducer: createReducer(\n initialState,\n on(actions.hasBeenDownloaded, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n updateIsDownloadedAndPending: true,\n };\n }),\n on(actions.hasBeenInstalled, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n };\n }),\n on(actions.postpone, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n };\n }),\n on(actions.postponeExpired, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n };\n }),\n ),\n});\n","import { ChangeDetectionStrategy, Component, signal } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { acceptUpdate } from './store/spx-update-pending/spx-update-pending.actions';\nimport { default as updPending } from './store/spx-update-pending/spx-update-pending.reducer';\nimport { SpxSeverityEnum, unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextUpdate, spxTextUpdateAvailable } from '@softpak/components/spx-translate';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-update-pending',\n imports: [\n SpxButtonComponent,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n templateUrl: `./spx-update-pending.component.html`,\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxUpdatePendingComponent {\n availableStoreVersion = signal<undefined | string>(undefined);\n currentStoreVersion = signal<undefined | string>(undefined);\n severitySuccess = SpxSeverityEnum.success;\n showLiveUpdateReady = signal<boolean>(false);\n spxTextUpdate = spxTextUpdate;\n spxTextReadyToBeInstalled = spxTextReadyToBeInstalled;\n spxTextPatchAvailable = spxTextPatchAvailable;\n spxTextUpdateAvailable = spxTextUpdateAvailable;\n spxTextOpenAppStore = spxTextOpenAppStore;\n\n private subscriptions: {\n updPending?: Subscription;\n } = {};\n\n ngOnInit() {\n this.subscriptions.updPending = this.appStore.select(updPending.selectShowLiveUpdateReady).subscribe(showLiveUpdateReady => {\n this.showLiveUpdateReady.set(showLiveUpdateReady);\n });\n }\n\n ngOnDestroy() {\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n constructor(\n private readonly appStore: Store,\n ) {}\n\n onUpdate(): void {\n this.appStore.dispatch(acceptUpdate({}));\n }\n}\n","@if (showLiveUpdateReady()) {\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\n <div class=\"grow\">\n <p\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\n </div>\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\n }}</spx-button>\n</div>\n}","export const spxUpdateUrl = '';","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { from, Observable, of } from 'rxjs';\nimport { catchError, delay, exhaustMap, map, mergeMap, tap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport * as actions from './spx-update-check.actions';\nimport { getConfig, reload, setConfig, sync, SyncResult } from '@capacitor/live-updates';\nimport { captureMessage } from '@sentry/angular';\nimport { Capacitor } from '@capacitor/core';\nimport { App } from '@capacitor/app';\nimport { hasBeenDownloaded } from '../spx-update-pending/spx-update-pending.actions';\nimport { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\n\n@Injectable()\nexport class Effects {\n afterInitialize$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.initialize),\n delay(120000),\n mergeMap(() => [\n actions.runCheck({}),\n ]))\n );\n onRun$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.runCheck),\n tap(async () => {\n if (Capacitor.getPlatform() !== 'web') {\n // Migrate from e.g. 1.2.x to 1.3.x\n const binaryInfo = await App.getInfo()\n const binaryVersionGroup = binaryInfo.version.substring(0, 3);\n const config = await getConfig();\n const channelVersionGroup = config.channel!.split('-')[1].substring(0, 3); // e.g. \"1.4\"\n let channelType = config.channel!.split('-')[0];\n // Temp fix\n if (channelType === 'null') {\n channelType = 'Production';\n }\n // End temp fix\n if (channelType === null || binaryVersionGroup != channelVersionGroup) {\n await setConfig({\n channel: `${channelType ? channelType : SpxAppChannelTypeEnum.production}-${binaryVersionGroup}.x`\n });\n }\n // End migrate from e.g. 1.2.x to 1.3.x\n }\n }),\n exhaustMap((action) => from(sync()).pipe(\n map((syncResult: SyncResult) => {\n if (syncResult.activeApplicationPathChanged) {\n if (action.forceWaitForUpdate) {\n reload();\n }\n return actions.anUpdateIsReady({});\n } else {\n return actions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate });\n }\n }),\n catchError((err) => {\n if (err.message !== 'Not implemented for web only') {\n captureMessage(\"[UPD] Handled: \" + err.message);\n }\n return err.message === 'Not implemented for web only' ? of(actions.notAvailableOnWeb({})) : of(actions.checkFailed({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate }))\n })\n )),\n ));\n\n constructor(\n private readonly actions$: Actions,\n ) { }\n\n whenAndUpdateIsReady$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.anUpdateIsReady),\n mergeMap(() => [\n hasBeenDownloaded({}),\n ]))\n );\n\n whenCheckHasFailed$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.checkFailed),\n delay(30000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n actions.runCheck({}),\n ]))\n );\n\n whenNoUpdateWasFound$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.noUpdateWasFound),\n delay(120000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n actions.runCheck({}),\n ]))\n );\n}\n\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Observable } from 'rxjs';\nimport { mergeMap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport * as actions from './spx-update-pending.actions';\nimport { reload } from '@capacitor/live-updates';\n\n@Injectable()\nexport class Effects {\n\n constructor(\n private readonly actions$: Actions,\n ) { }\n\n whenAccepted$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.acceptUpdate),\n mergeMap(() => {\n reload();\n return []; \n })) as any\n );\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["all","initialState","actions.anUpdateIsReady","actions.clearError","actions.checkFailed","actions.noUpdateWasFound","actions.runCheck","actions.notAvailableOnWeb","actions.hasBeenDownloaded","actions.hasBeenInstalled","actions.postpone","actions.postponeExpired","actions.initialize","i1","Effects","actions.acceptUpdate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,eAAe,GAAG,YAAY,CAAC,yCAAyC,EAAE,KAAK,EAA2B,CAAC;AACjH,MAAM,UAAU,GAAG,YAAY,CAAC,kCAAkC,EAAE,KAAK,EAA2B,CAAC;AACrG,MAAM,WAAW,GAAG,YAAY,CAAC,qCAAqC,EAAE,KAAK,EAA8C,CAAC;AAC5H,MAAM,UAAU,GAAG,YAAY,CAAC,iCAAiC,EAAE,KAAK,EAA2B,CAAC;AACpG,MAAM,gBAAgB,GAAG,YAAY,CAAC,0CAA0C,EAAE,KAAK,EAA8C,CAAC;AACtI,MAAM,iBAAiB,GAAG,YAAY,CAAC,2CAA2C,EAAE,KAAK,EAA2B,CAAC;AACrH,MAAM,QAAQ,GAAG,YAAY,CAAC,0BAA0B,EAAE,KAAK,E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eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAP,OAAO,EAAA,CAAA,CAAA;;2FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBADnB;;;;;;;;;;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-update.mjs","sources":["../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.html","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.html","../../../../projects/softpak/components/spx-update/spx-update-url.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.effects.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.effects.ts","../../../../projects/softpak/components/spx-update/softpak-components-spx-update.ts"],"sourcesContent":["import { createAction, props, union } from '@ngrx/store';\r\n\r\nexport const anUpdateIsReady = createAction('[SPX / Update Check] An update is ready', props<Record<string, unknown>>());\r\nexport const clearError = createAction('[SPX / Update Check] Clear error', props<Record<string, unknown>>());\r\nexport const checkFailed = createAction('[SPX / Update Check] Error happened', props<{ startUpdateAgainAfterTimeout?: boolean }>());\r\nexport const initialize = createAction('[SPX / Update Check] Initialize', props<Record<string, unknown>>());\r\nexport const noUpdateWasFound = createAction('[SPX / Update Check] No update was found', props<{ startUpdateAgainAfterTimeout?: boolean }>());\r\nexport const notAvailableOnWeb = createAction('[SPX / Update Check] Not available on web', props<Record<string, unknown>>());\r\nexport const runCheck = createAction('[SPX / Update Check] Run', props<{ forceWaitForUpdate?: boolean; }>());\r\n\r\nconst all = union({\r\n anUpdateIsReady,\r\n clearError,\r\n checkFailed,\r\n initialize,\r\n noUpdateWasFound,\r\n notAvailableOnWeb,\r\n runCheck,\r\n});\r\n\r\nexport type Actions = typeof all;\r\n","import { StateI } from \"./spx-update-check.state\";\r\n\r\nexport const initialState: StateI = {\r\n forceWaitForUpdate: false,\r\n lastCheck: null,\r\n showError: false,\r\n};\r\n","\r\nimport * as actions from './spx-update-check.actions';\r\nimport { createFeature, createReducer, on } from '@ngrx/store';\r\nimport { StateI } from './spx-update-check.state';\r\nimport { initialState } from './spx-update-check.initial';\r\nimport { DateTime } from 'luxon';\r\n \r\nexport default createFeature({\r\n name: 'spxUpdateCheck',\r\n reducer: createReducer(\r\n initialState,\r\n on(actions.anUpdateIsReady, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n lastCheck: DateTime.now().toISO(),\r\n showError: false,\r\n };\r\n }),\r\n on(actions.clearError, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n showError: false,\r\n };\r\n }),\r\n on(actions.checkFailed, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n forceWaitForUpdate: false,\r\n showError: true,\r\n };\r\n }),\r\n on(actions.noUpdateWasFound, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n forceWaitForUpdate: false,\r\n lastCheck: DateTime.now().toISO(),\r\n showError: false,\r\n };\r\n }),\r\n on(actions.runCheck, (state: StateI, { forceWaitForUpdate }): StateI => {\r\n return {\r\n ...state,\r\n forceWaitForUpdate: forceWaitForUpdate ? true : state.forceWaitForUpdate\r\n };\r\n }),\r\n on(actions.notAvailableOnWeb, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n forceWaitForUpdate: false\r\n };\r\n }),\r\n ),\r\n});\r\n","import { Component } from '@angular/core';\r\nimport { TranslatePipe } from '@ngx-translate/core';\r\nimport { IonContent, IonHeader, IonTitle, IonToolbar, NavController } from '@ionic/angular/standalone';\r\nimport { Subscription } from 'rxjs';\r\nimport { Store } from '@ngrx/store';\r\nimport { runCheck } from './store/spx-update-check/spx-update-check.actions';\r\nimport { default as updCheck } from './store/spx-update-check/spx-update-check.reducer';\r\nimport { unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\r\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\r\nimport { spxTextCheckingForUpdates, spxTextOneMomentPlease } from '@softpak/components/spx-translate';\r\nimport { ActivatedRoute } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'spx-update-page',\r\n imports: [\r\n IonContent,\r\n IonHeader,\r\n IonToolbar,\r\n IonTitle,\r\n SpxCapitalizePipe,\r\n TranslatePipe,\r\n ],\r\n templateUrl: `./spx-update-page.component.html`,\r\n})\r\nexport class SpxUpdatePageComponent {\r\n spxTextCheckingForUpdates = spxTextCheckingForUpdates;\r\n spxTextOneMomentPlease = spxTextOneMomentPlease;\r\n\r\n private subscriptions: {\r\n updCheck?: Subscription;\r\n } = {};\r\n\r\n ngOnInit() {\r\n console.log('ngOnInit event fired');\r\n\r\n this.appStore.dispatch(runCheck({ forceWaitForUpdate: true }));\r\n this.subscriptions.updCheck = this.appStore.select(updCheck.selectForceWaitForUpdate).subscribe(forceWaitForUpdate => {\r\n if (forceWaitForUpdate === false) {\r\n if (this.activatedRoute.snapshot.data['url'] === undefined) {\r\n console.error('configure data property \\'url\\' in route for update page');\r\n }\r\n this.navController.navigateRoot(this.activatedRoute.snapshot.data['url']);\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy() {\r\n console.log('ngOnDestroy event fired');\r\n\r\n unsubscribeSubscriptions(this.subscriptions);\r\n }\r\n\r\n constructor(\r\n private readonly appStore: Store,\r\n private readonly activatedRoute: ActivatedRoute,\r\n private readonly navController: NavController,\r\n ) {\r\n console.log('UPD constructor');\r\n }\r\n}\r\n","<ion-header>\r\n <ion-toolbar>\r\n <ion-title>\r\n {{ spxTextCheckingForUpdates | translate | capitalize }}\r\n </ion-title>\r\n </ion-toolbar>\r\n</ion-header>\r\n\r\n<ion-content class=\"ion-padding\">\r\n {{ spxTextOneMomentPlease | translate | capitalize }}...\r\n</ion-content>\r\n","import { createAction, props, union } from '@ngrx/store';\r\n\r\nexport const acceptUpdate = createAction('[SPX / Update Pending] Accept update', props<Record<string, unknown>>());\r\nexport const hasBeenDownloaded = createAction('[SPX / Update Pending] Has been downloaded', props<Record<string, unknown>>());\r\nexport const hasBeenInstalled = createAction('[SPX / Update Pending] Has been installed', props<Record<string, unknown>>());\r\nexport const postpone = createAction('[SPX / Update Pending] Postpone', props<Record<string, unknown>>());\r\nexport const postponeExpired = createAction('[SPX / Update Pending] Postpone expired', props<Record<string, unknown>>());\r\n\r\nconst all = union({\r\n acceptUpdate,\r\n hasBeenDownloaded,\r\n hasBeenInstalled,\r\n postpone,\r\n postponeExpired,\r\n});\r\n\r\nexport type Actions = typeof all;\r\n","import { StateI } from \"./spx-update-pending.state\";\r\n\r\nexport const initialState: StateI = {\r\n showLiveUpdateReady: false,\r\n updateIsDownloadedAndPending: false,\r\n};\r\n","\r\nimport * as actions from './spx-update-pending.actions';\r\nimport { createReducer, on, createFeature } from '@ngrx/store';\r\nimport { StateI } from './spx-update-pending.state';\r\nimport { initialState } from './spx-update-pending.initial';\r\n\r\nexport default createFeature({\r\n name: 'spxUpdatePending',\r\n reducer: createReducer(\r\n initialState,\r\n on(actions.hasBeenDownloaded, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n showLiveUpdateReady: true,\r\n updateIsDownloadedAndPending: true,\r\n };\r\n }),\r\n on(actions.hasBeenInstalled, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n showLiveUpdateReady: false,\r\n updateIsDownloadedAndPending: false,\r\n };\r\n }),\r\n on(actions.postpone, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n showLiveUpdateReady: false,\r\n };\r\n }),\r\n on(actions.postponeExpired, (state: StateI): StateI => {\r\n return {\r\n ...state,\r\n showLiveUpdateReady: true,\r\n };\r\n }),\r\n ),\r\n});\r\n","import { ChangeDetectionStrategy, Component, signal } from '@angular/core';\r\nimport { TranslatePipe } from '@ngx-translate/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { Store } from '@ngrx/store';\r\nimport { acceptUpdate } from './store/spx-update-pending/spx-update-pending.actions';\r\nimport { default as updPending } from './store/spx-update-pending/spx-update-pending.reducer';\r\nimport { SpxSeverityEnum, unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\r\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\r\nimport { spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextUpdate, spxTextUpdateAvailable } from '@softpak/components/spx-translate';\r\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\r\n\r\n@Component({\r\n selector: 'spx-update-pending',\r\n imports: [\r\n SpxButtonComponent,\r\n SpxCapitalizePipe,\r\n TranslatePipe,\r\n ],\r\n templateUrl: `./spx-update-pending.component.html`,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SpxUpdatePendingComponent {\r\n availableStoreVersion = signal<undefined | string>(undefined);\r\n currentStoreVersion = signal<undefined | string>(undefined);\r\n severitySuccess = SpxSeverityEnum.success;\r\n showLiveUpdateReady = signal<boolean>(false);\r\n spxTextUpdate = spxTextUpdate;\r\n spxTextReadyToBeInstalled = spxTextReadyToBeInstalled;\r\n spxTextPatchAvailable = spxTextPatchAvailable;\r\n spxTextUpdateAvailable = spxTextUpdateAvailable;\r\n spxTextOpenAppStore = spxTextOpenAppStore;\r\n\r\n private subscriptions: {\r\n updPending?: Subscription;\r\n } = {};\r\n\r\n ngOnInit() {\r\n this.subscriptions.updPending = this.appStore.select(updPending.selectShowLiveUpdateReady).subscribe(showLiveUpdateReady => {\r\n this.showLiveUpdateReady.set(showLiveUpdateReady);\r\n });\r\n }\r\n\r\n ngOnDestroy() {\r\n unsubscribeSubscriptions(this.subscriptions);\r\n }\r\n\r\n constructor(\r\n private readonly appStore: Store,\r\n ) {}\r\n\r\n onUpdate(): void {\r\n this.appStore.dispatch(acceptUpdate({}));\r\n }\r\n}\r\n","@if (showLiveUpdateReady()) {\r\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\r\n <div class=\"grow\">\r\n <p\r\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\r\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\r\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\r\n </div>\r\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\r\n }}</spx-button>\r\n</div>\r\n}","export const spxUpdateUrl = '';","import { Actions, createEffect, ofType } from '@ngrx/effects';\r\nimport { from, Observable, of } from 'rxjs';\r\nimport { catchError, delay, exhaustMap, map, mergeMap, tap } from 'rxjs/operators';\r\nimport { Injectable } from '@angular/core';\r\nimport * as actions from './spx-update-check.actions';\r\nimport { getConfig, reload, setConfig, sync, SyncResult } from '@capacitor/live-updates';\r\nimport { captureMessage } from '@sentry/angular';\r\nimport { Capacitor } from '@capacitor/core';\r\nimport { App } from '@capacitor/app';\r\nimport { hasBeenDownloaded } from '../spx-update-pending/spx-update-pending.actions';\r\nimport { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\r\n\r\n@Injectable()\r\nexport class Effects {\r\n afterInitialize$: Observable<any> = createEffect(() => this.actions$.pipe(\r\n ofType(actions.initialize),\r\n delay(120000),\r\n mergeMap(() => [\r\n actions.runCheck({}),\r\n ]))\r\n );\r\n onRun$: Observable<any> = createEffect(() => this.actions$.pipe(\r\n ofType(actions.runCheck),\r\n tap(async () => {\r\n if (Capacitor.getPlatform() !== 'web') {\r\n // Migrate from e.g. 1.2.x to 1.3.x\r\n const binaryInfo = await App.getInfo()\r\n const binaryVersionGroup = binaryInfo.version.substring(0, 3);\r\n const config = await getConfig();\r\n const channelVersionGroup = config.channel!.split('-')[1].substring(0, 3); // e.g. \"1.4\"\r\n let channelType = config.channel!.split('-')[0];\r\n // Temp fix\r\n if (channelType === 'null') {\r\n channelType = 'Production';\r\n }\r\n // End temp fix\r\n if (channelType === null || binaryVersionGroup != channelVersionGroup) {\r\n await setConfig({\r\n channel: `${channelType ? channelType : SpxAppChannelTypeEnum.production}-${binaryVersionGroup}.x`\r\n });\r\n }\r\n // End migrate from e.g. 1.2.x to 1.3.x\r\n }\r\n }),\r\n exhaustMap((action) => from(sync()).pipe(\r\n map((syncResult: SyncResult) => {\r\n if (syncResult.activeApplicationPathChanged) {\r\n if (action.forceWaitForUpdate) {\r\n reload();\r\n }\r\n return actions.anUpdateIsReady({});\r\n } else {\r\n return actions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate });\r\n }\r\n }),\r\n catchError((err) => {\r\n if (err.message !== 'Not implemented for web only') {\r\n captureMessage(\"[UPD] Handled: \" + err.message);\r\n }\r\n return err.message === 'Not implemented for web only' ? of(actions.notAvailableOnWeb({})) : of(actions.checkFailed({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate }))\r\n })\r\n )),\r\n ));\r\n\r\n constructor(\r\n private readonly actions$: Actions,\r\n ) { }\r\n\r\n whenAndUpdateIsReady$: Observable<any> = createEffect(() => this.actions$.pipe(\r\n ofType(actions.anUpdateIsReady),\r\n mergeMap(() => [\r\n hasBeenDownloaded({}),\r\n ]))\r\n );\r\n\r\n whenCheckHasFailed$: Observable<any> = createEffect(() => this.actions$.pipe(\r\n ofType(actions.checkFailed),\r\n delay(30000),\r\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\r\n actions.runCheck({}),\r\n ]))\r\n );\r\n\r\n whenNoUpdateWasFound$: Observable<any> = createEffect(() => this.actions$.pipe(\r\n ofType(actions.noUpdateWasFound),\r\n delay(120000),\r\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\r\n actions.runCheck({}),\r\n ]))\r\n );\r\n}\r\n\r\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\r\nimport { Observable } from 'rxjs';\r\nimport { mergeMap } from 'rxjs/operators';\r\nimport { Injectable } from '@angular/core';\r\nimport * as actions from './spx-update-pending.actions';\r\nimport { reload } from '@capacitor/live-updates';\r\n\r\n@Injectable()\r\nexport class Effects {\r\n\r\n constructor(\r\n private readonly actions$: Actions,\r\n ) { }\r\n\r\n whenAccepted$: Observable<any> = createEffect(() => this.actions$.pipe(\r\n ofType(actions.acceptUpdate),\r\n mergeMap(() => {\r\n reload();\r\n return []; \r\n })) as any\r\n );\r\n}\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["all","initialState","actions.anUpdateIsReady","actions.clearError","actions.checkFailed","actions.noUpdateWasFound","actions.runCheck","actions.notAvailableOnWeb","actions.hasBeenDownloaded","actions.hasBeenInstalled","actions.postpone","actions.postponeExpired","actions.initialize","i1","Effects","actions.acceptUpdate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,eAAe,GAAG,YAAY,CAAC,yCAAyC,EAAE,KAAK,EAA2B,CAAC;AACjH,MAAM,UAAU,GAAG,YAAY,CAAC,kCAAkC,EAAE,KAAK,EAA2B,CAAC;AACrG,MAAM,WAAW,GAAG,YAAY,CAAC,qCAAqC,EAAE,KAAK,EAA8C,CAAC;AAC5H,MAAM,UAAU,GAAG,YAAY,CAAC,iCAAiC,EAAE,KAAK,EAA2B,CAAC;AACpG,MAAM,gBAAgB,GAAG,YAAY,CAAC,0CAA0C,EAAE,KAAK,EAA8C,CAAC;AACtI,MAAM,iBAAiB,GAAG,YAAY,CAAC,2CAA2C,EAAE,KAAK,EAA2B,CAAC;AACrH,MAAM,QAAQ,GAAG,YAA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AA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAP,OAAO,EAAA,CAAA,CAAA;;2FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBADnB;;;;;;;;;;;;ACPD;;AAEG;;;;"}
@@ -135,75 +135,62 @@ class SpxValidateControlComponent {
135
135
  this.control = input.required();
136
136
  this.label = input();
137
137
  this.submitTried = input();
138
+ this.errors = input.required();
139
+ this.touched = input.required();
138
140
  this.maxLength = computed(() => {
139
- const control = this.control();
140
- return control.errors && control.errors['maxlength'];
141
+ return this.errors() && this.errors()['maxlength'];
141
142
  });
142
143
  this.maxLengthRequiredLength = computed(() => {
143
- const control = this.control();
144
- return this.maxLength() && control.errors && control.errors['maxlength']['requiredLength'];
144
+ return this.maxLength() && this.errors() && this.errors()['maxlength']['requiredLength'];
145
145
  });
146
146
  this.minLength = computed(() => {
147
- const control = this.control();
148
- return control.errors && control.errors['minlength'];
147
+ return this.errors() && this.errors()['minlength'];
149
148
  });
150
149
  this.minLengthRequiredLength = computed(() => {
151
- const control = this.control();
152
- return this.minLength() && control.errors && control.errors['minlength']['requiredLength'];
150
+ return this.minLength() && this.errors() && this.errors()['minlength']['requiredLength'];
153
151
  });
154
152
  this.max = computed(() => {
155
- const control = this.control();
156
- return control.errors && control.errors['max'];
153
+ return this.errors() && this.errors()['max'];
157
154
  });
158
155
  this.maxRequiredMax = computed(() => {
159
- const control = this.control();
160
- return this.max() && control.errors && control.errors['max']['max'];
156
+ return this.max() && this.errors() && this.errors()['max']['max'];
161
157
  });
162
158
  this.min = computed(() => {
163
- const control = this.control();
164
- return control.errors && control.errors['min'];
159
+ return this.errors() && this.errors()['min'];
165
160
  });
166
161
  this.minRequiredMin = computed(() => {
167
- const control = this.control();
168
- return this.min() && control.errors && control.errors['min']['min'];
162
+ return this.min() && this.errors() && this.errors()['min']['min'];
169
163
  });
170
164
  this.pattern = computed(() => {
171
- const control = this.control();
172
- return control.errors && control.errors['pattern'];
165
+ return this.errors() && this.errors()['pattern'];
173
166
  });
174
167
  this.required = computed(() => {
175
- const control = this.control();
176
- return control.errors && control.errors['required'];
168
+ return this.errors() && this.errors()['required'];
177
169
  });
178
170
  this.year = computed(() => {
179
- const control = this.control();
180
- return control.errors && control.errors['year'];
171
+ return this.errors() && this.errors()['year'];
181
172
  });
182
173
  this.yearFuture = computed(() => {
183
- const control = this.control();
184
- return control.errors && control.errors['yearFuture'];
174
+ return this.errors() && this.errors()['yearFuture'];
185
175
  });
186
176
  this.month = computed(() => {
187
- const control = this.control();
188
- return control.errors && control.errors['month'];
177
+ return this.errors() && this.errors()['month'];
189
178
  });
190
179
  this.future = computed(() => {
191
- const control = this.control();
192
- return control.errors && control.errors['future'];
180
+ return this.errors() && this.errors()['future'];
193
181
  });
194
182
  this.past = computed(() => {
195
- const control = this.control();
196
- return control.errors && control.errors['past'];
183
+ return this.errors() && this.errors()['past'];
197
184
  });
198
185
  }
199
186
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxValidateControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
200
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", 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 } }, ngImport: i0, template: "@if (control() && control().errors && (control().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}", dependencies: [{ kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
187
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", 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 }); }
201
188
  }
202
189
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxValidateControlComponent, decorators: [{
203
190
  type: Component,
204
191
  args: [{ selector: 'spx-validate-control', imports: [
205
- FormsModule
206
- ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control() && control().errors && (control().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}" }]
192
+ FormsModule,
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" }]
207
194
  }] });
208
195
 
209
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 } 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\n maxLength = computed(() => {\n const control = this.control();\n return control.errors && control.errors['maxlength'];\n });\n\n maxLengthRequiredLength = computed(() => {\n const control = this.control();\n return this.maxLength() && control.errors && control.errors['maxlength']['requiredLength'];\n });\n\n minLength = computed(() => {\n const control = this.control();\n return control.errors && control.errors['minlength'];\n });\n\n minLengthRequiredLength = computed(() => {\n const control = this.control();\n return this.minLength() && control.errors && control.errors['minlength']['requiredLength'];\n });\n\n max = computed(() => {\n const control = this.control();\n return control.errors && control.errors['max'];\n });\n\n maxRequiredMax = computed(() => {\n const control = this.control();\n return this.max() && control.errors && control.errors['max']['max'];\n });\n\n min = computed(() => {\n const control = this.control();\n return control.errors && control.errors['min'];\n });\n\n minRequiredMin = computed(() => {\n const control = this.control();\n return this.min() && control.errors && control.errors['min']['min'];\n });\n\n pattern = computed(() => {\n const control = this.control();\n return control.errors && control.errors['pattern'];\n });\n\n required = computed(() => {\n const control = this.control();\n return control.errors && control.errors['required'];\n });\n\n year = computed(() => {\n const control = this.control();\n return control.errors && control.errors['year'];\n });\n\n yearFuture = computed(() => {\n const control = this.control();\n return control.errors && control.errors['yearFuture'];\n });\n\n month = computed(() => {\n const control = this.control();\n return control.errors && control.errors['month'];\n });\n\n future = computed(() => {\n const control = this.control();\n return control.errors && control.errors['future'];\n });\n\n past = computed(() => {\n const control = this.control();\n return control.errors && control.errors['past'];\n });\n}\n","@if (control() && control().errors && (control().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 * 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,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,GAAG,EAAE;YAC9B,OAAO;AACH,gBAAA,GAAG,EAAE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AA,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,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECbxC,uqCAkCC,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED1BO,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;AACH,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,uqCAAA,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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