@softpak/components 21.2.0-capwesome.7 → 21.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/softpak-components-spx-alert.mjs +4 -3
- package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-channel-selection.mjs +45 -24
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +22 -4
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-patch.mjs +1 -1
- package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-stock-info.mjs +1 -1
- package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-toaster.mjs +6 -4
- package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +102 -17
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/package.json +1 -1
- package/tailwind.css +1 -1
- package/types/softpak-components-spx-alert.d.ts +3 -1
- package/types/softpak-components-spx-channel-selection.d.ts +24 -0
- package/types/softpak-components-spx-navigation.d.ts +8 -4
- package/types/softpak-components-spx-toaster.d.ts +2 -0
- package/types/softpak-components-spx-update.d.ts +10 -2
|
@@ -260,7 +260,7 @@ class SpxStockInfoComponent {
|
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
262
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SpxStockInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
263
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: SpxStockInfoComponent, isStandalone: true, selector: "spx-stock-info", inputs: { depotReadonly: { classPropertyName: "depotReadonly", publicName: "depotReadonly", isSignal: true, isRequired: false, transformFunction: null }, statusGroupsInPatch: { classPropertyName: "statusGroupsInPatch", publicName: "statusGroupsInPatch", isSignal: true, isRequired: true, transformFunction: null }, containers: { classPropertyName: "containers", publicName: "containers", isSignal: true, isRequired: true, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: true, transformFunction: null }, faArrowLeft: { classPropertyName: "faArrowLeft", publicName: "faArrowLeft", isSignal: true, isRequired: true, transformFunction: null }, faArrowRight: { classPropertyName: "faArrowRight", publicName: "faArrowRight", isSignal: true, isRequired: true, transformFunction: null }, faContainerStorage: { classPropertyName: "faContainerStorage", publicName: "faContainerStorage", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, loaded: { classPropertyName: "loaded", publicName: "loaded", isSignal: true, isRequired: true, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: true, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, textCategory: { classPropertyName: "textCategory", publicName: "textCategory", isSignal: true, isRequired: true, transformFunction: null }, textContainerInfo: { classPropertyName: "textContainerInfo", publicName: "textContainerInfo", isSignal: true, isRequired: true, transformFunction: null }, textContainerStatus: { classPropertyName: "textContainerStatus", publicName: "textContainerStatus", isSignal: true, isRequired: true, transformFunction: null }, textContainerStatusGroup: { classPropertyName: "textContainerStatusGroup", publicName: "textContainerStatusGroup", isSignal: true, isRequired: true, transformFunction: null }, textContainerType: { classPropertyName: "textContainerType", publicName: "textContainerType", isSignal: true, isRequired: true, transformFunction: null }, textCustomer: { classPropertyName: "textCustomer", publicName: "textCustomer", isSignal: true, isRequired: true, transformFunction: null }, textDepot: { classPropertyName: "textDepot", publicName: "textDepot", isSignal: true, isRequired: true, transformFunction: null }, textLocation: { classPropertyName: "textLocation", publicName: "textLocation", isSignal: true, isRequired: true, transformFunction: null }, textNext: { classPropertyName: "textNext", publicName: "textNext", isSignal: true, isRequired: true, transformFunction: null }, textPage: { classPropertyName: "textPage", publicName: "textPage", isSignal: true, isRequired: true, transformFunction: null }, textPrevious: { classPropertyName: "textPrevious", publicName: "textPrevious", isSignal: true, isRequired: true, transformFunction: null }, textSearch: { classPropertyName: "textSearch", publicName: "textSearch", isSignal: true, isRequired: true, transformFunction: null }, textNoResults: { classPropertyName: "textNoResults", publicName: "textNoResults", isSignal: true, isRequired: true, transformFunction: null }, textYouCanChangeYourFilters: { classPropertyName: "textYouCanChangeYourFilters", publicName: "textYouCanChangeYourFilters", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { spxBlurCategory: "spxBlurCategory", spxBlurContainerStatus: "spxBlurContainerStatus", spxBlurContainerStatusGroup: "spxBlurContainerStatusGroup", spxBlurContainerType: "spxBlurContainerType", spxBlurCustomer: "spxBlurCustomer", spxBlurDepot: "spxBlurDepot", spxClickContainer: "spxClickContainer", spxPageChange: "spxPageChange", spxSearchCategory: "spxSearchCategory", spxSearchContainerStatus: "spxSearchContainerStatus", spxSearchContainerStatusGroup: "spxSearchContainerStatusGroup", spxSearchContainerType: "spxSearchContainerType", spxSearchCustomer: "spxSearchCustomer", spxSearchDepot: "spxSearchDepot", spxSubmit: "spxSubmit" }, ngImport: i0, template: "@if (!loaded()) {\n <form [formGroup]=\"formGroup()\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup()\"\n [spxForm]=\"form\"\n [spxSuggestions]=\"suggestions()\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n </form>\n}\n\n@if (loaded()) {\n <div class=\"flex flex-col gap-3\">\n @if (containers().length > 0) {\n <spx-pagination\n [spxPage]=\"currentPage()\"\n [spxMaxPages]=\"(containers().length < (pageSize() + 1)) ? (currentPage() + 1) : currentPage()\"\n [faArrowLeft]=\"faArrowLeft()\"\n [faArrowRight]=\"faArrowRight()\"\n [textPage]=\"textPage()\"\n [textPrevious]=\"textPrevious()\"\n [textNext]=\"textNext()\"\n (spxPageChange)=\"onPageChange($event)\">\n </spx-pagination>\n }\n @if (containers().length === 0) {\n <spx-alert [spxSeverity]=\"severityInfo\" [spxTitle]=\"textNoResults() | translate | capitalize\">\n {{ textYouCanChangeYourFilters() | translate | capitalize }}\n </spx-alert>\n }\n @for (container of containers(); track container; let i = $index) {\n @if (i < pageSize()) {\n <spx-card [hasContent]=\"false\" (clicked)=\"goToContainer(container)\">\n <div card-header class=\"card-header rounded-t-lg p-3 bg-sky-200\">\n <div class=\"flex flex-row space-x-3 items-center w-full\">\n <div\n class=\"card-header-icon-left flex basis-10 py-1.5 shrink-0 grow-0 place-items-center rounded bg-sky-400\">\n <fa-icon class=\"mx-auto\" [icon]=\"faContainerStorage()\"></fa-icon>\n </div>\n <div class=\"card-header-text-middle grow\">\n <div class=\"block font-medium text-large\">{{ container.formatted.containerNumber }}</div>\n </div>\n <div\n class=\"card-header-icons-right text-sm text-gray-900 leading-5 flex flex-wrap items-stretch text-center font-bold\">\n @if (container.containerStatus) {\n <div class=\"min-w-[36px] px-2 py-1 bg-white text-black\"> {{\n container.formatted.containerStatus }}</div>\n }\n </div>\n </div>\n </div>\n <div card-lines class=\"grid grid-cols-2 gap-2\">\n <spx-card-line [text]=\"textContainerType() | translate | capitalize\"\n [value]=\"container.formatted.containerType\"></spx-card-line>\n <spx-card-line [text]=\"textCategory() | translate | capitalize\"\n [value]=\"container.formatted.category\"></spx-card-line>\n <spx-card-line [text]=\"textLocation() | translate | capitalize\"\n [value]=\"container.formatted.location\"></spx-card-line>\n </div>\n </spx-card>\n }\n }\n @if (containers().length > 0) {\n <spx-pagination\n [spxPage]=\"currentPage()\"\n [spxMaxPages]=\"(containers().length < (pageSize() + 1)) ? (currentPage() + 1) : currentPage()\"\n [faArrowLeft]=\"faArrowLeft()\"\n [faArrowRight]=\"faArrowRight()\"\n [textPage]=\"textPage()\"\n [textPrevious]=\"textPrevious()\"\n [textNext]=\"textNext()\"\n (spxPageChange)=\"onPageChange($event)\">\n </spx-pagination>\n }\n </div>\n}", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxAlertComponent, selector: "spx-alert", inputs: ["spxAutoclose", "spxCloseable", "spxHideTitle", "spxTitle", "spxMarginTop", "spxSeverity"], outputs: ["spxClose", "spxTitleChange"] }, { kind: "component", type: SpxCardComponent, selector: "spx-card", inputs: ["clickable", "hasContent", "onDetailPage", "text", "unit", "tableView"], outputs: ["clicked"] }, { kind: "component", type: SpxCardLineComponent, selector: "spx-card-line", inputs: ["icon", "showPositiveOrNegative", "text", "value", "secondValue", "showProgress", "unit", "newOrderScreen"], outputs: ["valueChange"] }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxForm", "spxSuggestions"], outputs: ["spxBlur", "spxClick", "spxSearch"] }, { kind: "component", type: SpxPaginationComponent, selector: "spx-pagination", inputs: ["faArrowLeft", "faArrowRight", "spxPage", "spxMaxPages", "textNext", "textPage", "textPrevious"], outputs: ["spxPageChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
263
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: SpxStockInfoComponent, isStandalone: true, selector: "spx-stock-info", inputs: { depotReadonly: { classPropertyName: "depotReadonly", publicName: "depotReadonly", isSignal: true, isRequired: false, transformFunction: null }, statusGroupsInPatch: { classPropertyName: "statusGroupsInPatch", publicName: "statusGroupsInPatch", isSignal: true, isRequired: true, transformFunction: null }, containers: { classPropertyName: "containers", publicName: "containers", isSignal: true, isRequired: true, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: true, transformFunction: null }, faArrowLeft: { classPropertyName: "faArrowLeft", publicName: "faArrowLeft", isSignal: true, isRequired: true, transformFunction: null }, faArrowRight: { classPropertyName: "faArrowRight", publicName: "faArrowRight", isSignal: true, isRequired: true, transformFunction: null }, faContainerStorage: { classPropertyName: "faContainerStorage", publicName: "faContainerStorage", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, loaded: { classPropertyName: "loaded", publicName: "loaded", isSignal: true, isRequired: true, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: true, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, textCategory: { classPropertyName: "textCategory", publicName: "textCategory", isSignal: true, isRequired: true, transformFunction: null }, textContainerInfo: { classPropertyName: "textContainerInfo", publicName: "textContainerInfo", isSignal: true, isRequired: true, transformFunction: null }, textContainerStatus: { classPropertyName: "textContainerStatus", publicName: "textContainerStatus", isSignal: true, isRequired: true, transformFunction: null }, textContainerStatusGroup: { classPropertyName: "textContainerStatusGroup", publicName: "textContainerStatusGroup", isSignal: true, isRequired: true, transformFunction: null }, textContainerType: { classPropertyName: "textContainerType", publicName: "textContainerType", isSignal: true, isRequired: true, transformFunction: null }, textCustomer: { classPropertyName: "textCustomer", publicName: "textCustomer", isSignal: true, isRequired: true, transformFunction: null }, textDepot: { classPropertyName: "textDepot", publicName: "textDepot", isSignal: true, isRequired: true, transformFunction: null }, textLocation: { classPropertyName: "textLocation", publicName: "textLocation", isSignal: true, isRequired: true, transformFunction: null }, textNext: { classPropertyName: "textNext", publicName: "textNext", isSignal: true, isRequired: true, transformFunction: null }, textPage: { classPropertyName: "textPage", publicName: "textPage", isSignal: true, isRequired: true, transformFunction: null }, textPrevious: { classPropertyName: "textPrevious", publicName: "textPrevious", isSignal: true, isRequired: true, transformFunction: null }, textSearch: { classPropertyName: "textSearch", publicName: "textSearch", isSignal: true, isRequired: true, transformFunction: null }, textNoResults: { classPropertyName: "textNoResults", publicName: "textNoResults", isSignal: true, isRequired: true, transformFunction: null }, textYouCanChangeYourFilters: { classPropertyName: "textYouCanChangeYourFilters", publicName: "textYouCanChangeYourFilters", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { spxBlurCategory: "spxBlurCategory", spxBlurContainerStatus: "spxBlurContainerStatus", spxBlurContainerStatusGroup: "spxBlurContainerStatusGroup", spxBlurContainerType: "spxBlurContainerType", spxBlurCustomer: "spxBlurCustomer", spxBlurDepot: "spxBlurDepot", spxClickContainer: "spxClickContainer", spxPageChange: "spxPageChange", spxSearchCategory: "spxSearchCategory", spxSearchContainerStatus: "spxSearchContainerStatus", spxSearchContainerStatusGroup: "spxSearchContainerStatusGroup", spxSearchContainerType: "spxSearchContainerType", spxSearchCustomer: "spxSearchCustomer", spxSearchDepot: "spxSearchDepot", spxSubmit: "spxSubmit" }, ngImport: i0, template: "@if (!loaded()) {\n <form [formGroup]=\"formGroup()\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup()\"\n [spxForm]=\"form\"\n [spxSuggestions]=\"suggestions()\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n </form>\n}\n\n@if (loaded()) {\n <div class=\"flex flex-col gap-3\">\n @if (containers().length > 0) {\n <spx-pagination\n [spxPage]=\"currentPage()\"\n [spxMaxPages]=\"(containers().length < (pageSize() + 1)) ? (currentPage() + 1) : currentPage()\"\n [faArrowLeft]=\"faArrowLeft()\"\n [faArrowRight]=\"faArrowRight()\"\n [textPage]=\"textPage()\"\n [textPrevious]=\"textPrevious()\"\n [textNext]=\"textNext()\"\n (spxPageChange)=\"onPageChange($event)\">\n </spx-pagination>\n }\n @if (containers().length === 0) {\n <spx-alert [spxSeverity]=\"severityInfo\" [spxTitle]=\"textNoResults() | translate | capitalize\">\n {{ textYouCanChangeYourFilters() | translate | capitalize }}\n </spx-alert>\n }\n @for (container of containers(); track container; let i = $index) {\n @if (i < pageSize()) {\n <spx-card [hasContent]=\"false\" (clicked)=\"goToContainer(container)\">\n <div card-header class=\"card-header rounded-t-lg p-3 bg-sky-200\">\n <div class=\"flex flex-row space-x-3 items-center w-full\">\n <div\n class=\"card-header-icon-left flex basis-10 py-1.5 shrink-0 grow-0 place-items-center rounded bg-sky-400\">\n <fa-icon class=\"mx-auto\" [icon]=\"faContainerStorage()\"></fa-icon>\n </div>\n <div class=\"card-header-text-middle grow\">\n <div class=\"block font-medium text-large\">{{ container.formatted.containerNumber }}</div>\n </div>\n <div\n class=\"card-header-icons-right text-sm text-gray-900 leading-5 flex flex-wrap items-stretch text-center font-bold\">\n @if (container.containerStatus) {\n <div class=\"min-w-[36px] px-2 py-1 bg-white text-black\"> {{\n container.formatted.containerStatus }}</div>\n }\n </div>\n </div>\n </div>\n <div card-lines class=\"grid grid-cols-2 gap-2\">\n <spx-card-line [text]=\"textContainerType() | translate | capitalize\"\n [value]=\"container.formatted.containerType\"></spx-card-line>\n <spx-card-line [text]=\"textCategory() | translate | capitalize\"\n [value]=\"container.formatted.category\"></spx-card-line>\n <spx-card-line [text]=\"textLocation() | translate | capitalize\"\n [value]=\"container.formatted.location\"></spx-card-line>\n </div>\n </spx-card>\n }\n }\n @if (containers().length > 0) {\n <spx-pagination\n [spxPage]=\"currentPage()\"\n [spxMaxPages]=\"(containers().length < (pageSize() + 1)) ? (currentPage() + 1) : currentPage()\"\n [faArrowLeft]=\"faArrowLeft()\"\n [faArrowRight]=\"faArrowRight()\"\n [textPage]=\"textPage()\"\n [textPrevious]=\"textPrevious()\"\n [textNext]=\"textNext()\"\n (spxPageChange)=\"onPageChange($event)\">\n </spx-pagination>\n }\n </div>\n}", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxAlertComponent, selector: "spx-alert", inputs: ["spxAutoclose", "spxCompanyName", "spxCloseable", "spxHideTitle", "spxTitle", "spxMarginTop", "spxSeverity"], outputs: ["spxClose", "spxTitleChange"] }, { kind: "component", type: SpxCardComponent, selector: "spx-card", inputs: ["clickable", "hasContent", "onDetailPage", "text", "unit", "tableView"], outputs: ["clicked"] }, { kind: "component", type: SpxCardLineComponent, selector: "spx-card-line", inputs: ["icon", "showPositiveOrNegative", "text", "value", "secondValue", "showProgress", "unit", "newOrderScreen"], outputs: ["valueChange"] }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxForm", "spxSuggestions"], outputs: ["spxBlur", "spxClick", "spxSearch"] }, { kind: "component", type: SpxPaginationComponent, selector: "spx-pagination", inputs: ["faArrowLeft", "faArrowRight", "spxPage", "spxMaxPages", "textNext", "textPage", "textPrevious"], outputs: ["spxPageChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
264
264
|
}
|
|
265
265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SpxStockInfoComponent, decorators: [{
|
|
266
266
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-stock-info.mjs","sources":["../../../../projects/softpak/components/spx-stock-info/spx-stock-info.component.ts","../../../../projects/softpak/components/spx-stock-info/spx-stock-info.component.html","../../../../projects/softpak/components/spx-stock-info/softpak-components-spx-stock-info.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\nimport { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\nimport { SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\nimport { SpxFormButtonTypeEnum, SpxFormFieldI, SpxFormI, SpxFormViewComponent } from '@softpak/components/spx-form-view';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxStockInfoValueI } from './spx-stock-info-value.interface';\nimport { SpxPaginationComponent } from '@softpak/components/spx-pagination';\nimport { IconProp } from '@fortawesome/fontawesome-svg-core';\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\nimport { SpxCardComponent, SpxCardLineComponent } from '@softpak/components/spx-card';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { FontAwesomeModule, IconDefinition } from '@fortawesome/angular-fontawesome';\n\nexport const spxCtrlCategory = 'ctrlCategory';\nexport const spxCtrlContainerStatus = 'ctrlContainerStatus';\nexport const spxCtrlContainerStatusGroup = 'ctrlContainerStatusGroup';\nexport const spxCtrlContainerType = 'ctrlContainerType';\nexport const spxCtrlCustomer = 'ctrlCustomer';\nexport const spxCtrlDepot = 'ctrlDepot';\nexport const spxCtrlLocation = 'ctrlLocation';\nexport const spxSectionContainerInfo = 'sectionContainerInfo';\nexport const spxSectionCustomer = 'sectionCustomer';\nexport const spxSectionLocation = 'sectionLocation';\n\n@Component({\n selector: 'spx-stock-info',\n templateUrl: './spx-stock-info.component.html',\n imports: [\n FormsModule,\n FontAwesomeModule,\n ReactiveFormsModule,\n SpxAlertComponent,\n SpxCapitalizePipe,\n SpxCardComponent,\n SpxCardLineComponent,\n SpxFormViewComponent,\n SpxPaginationComponent,\n TranslateModule\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SpxStockInfoComponent {\n readonly depotReadonly = input<boolean>(false);\n readonly statusGroupsInPatch = input.required<boolean>();\n readonly containers = input.required<any[]>();\n readonly currentPage = input.required<number>();\n readonly faArrowLeft = input.required<IconProp>();\n readonly faArrowRight = input.required<IconProp>();\n readonly faContainerStorage = input.required<IconProp>();\n readonly formGroup = input.required<FormGroup>();\n readonly loaded = input.required<boolean>();\n readonly pageSize = input.required<number>();\n readonly suggestions = input<any>({});\n readonly textCategory = input.required<string>();\n readonly textContainerInfo = input.required<string>();\n readonly textContainerStatus = input.required<string>();\n readonly textContainerStatusGroup = input.required<string>();\n readonly textContainerType = input.required<string>();\n readonly textCustomer = input.required<string>();\n readonly textDepot = input.required<string>();\n readonly textLocation = input.required<string>();\n readonly textNext = input.required<string>();\n readonly textPage = input.required<string>();\n readonly textPrevious = input.required<string>();\n readonly textSearch = input.required<string>();\n readonly textNoResults = input.required<string>();\n readonly textYouCanChangeYourFilters = input.required<string>();\n readonly spxBlurCategory = output<SpxValuePair<string>>();\n readonly spxBlurContainerStatus = output<SpxValuePair<string>>();\n readonly spxBlurContainerStatusGroup = output<SpxValuePair<string>>();\n readonly spxBlurContainerType = output<SpxValuePair<string>>();\n readonly spxBlurCustomer = output<SpxValuePair<string>>();\n readonly spxBlurDepot = output<SpxValuePair<string>>();\n readonly spxClickContainer = output<any>();\n readonly spxPageChange = output<number>();\n readonly spxSearchCategory = output<SpxValuePair<string>>();\n readonly spxSearchContainerStatus = output<SpxValuePair<string>>();\n readonly spxSearchContainerStatusGroup = output<SpxValuePair<string>>();\n readonly spxSearchContainerType = output<SpxValuePair<string>>();\n readonly spxSearchCustomer = output<SpxValuePair<string>>();\n readonly spxSearchDepot = output<SpxValuePair<string>>();\n readonly spxSubmit = output<SpxStockInfoValueI>();\n severityInfo = SpxSeverityEnum.info;\n\n\n form: SpxFormI = {\n buttons: [\n {\n severity: SpxSeverityEnum.success,\n type: SpxFormButtonTypeEnum.submit,\n label: () => this.textSearch(),\n }\n ],\n sections: [\n {\n key: spxSectionLocation,\n show: () => true,\n title: () => this.textLocation(),\n fields: [\n {\n key: spxCtrlDepot,\n label: () => this.textDepot(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [spxValidatorRequired()],\n readonly: () => this.depotReadonly(),\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n {\n key: spxCtrlLocation,\n label: () => this.textLocation(),\n type: () => SpxInputTypeEnum.text,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => false,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n ]\n },\n {\n key: spxSectionCustomer,\n show: () => true,\n title: () => this.textCustomer(),\n fields: [\n {\n key: spxCtrlCustomer,\n label: () => this.textCustomer(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n ]\n },\n {\n key: spxSectionContainerInfo,\n show: () => true,\n title: () => this.textContainerInfo(),\n fields: [\n {\n key: spxCtrlCategory,\n label: () => this.textCategory(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n {\n key: spxCtrlContainerStatus,\n label: () => this.textContainerStatus(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n {\n key: spxCtrlContainerStatusGroup,\n label: () => this.textContainerStatusGroup(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => this.statusGroupsInPatch(),\n capitalize: () => true,\n },\n {\n key: spxCtrlContainerType,\n label: () => this.textContainerType(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n ]\n },\n ]\n };\n\n readonly ctrlCategory = computed(() => this.formGroup()?.get(spxCtrlCategory) as FormControl);\n readonly ctrlContainerStatus = computed(() => this.formGroup()?.get(spxCtrlContainerStatus) as FormControl);\n readonly ctrlContainerStatusGroup = computed(() => this.formGroup()?.get(spxCtrlContainerStatusGroup) as FormControl);\n readonly ctrlContainerType = computed(() => this.formGroup()?.get(spxCtrlContainerType) as FormControl);\n readonly ctrlCustomer = computed(() => this.formGroup()?.get(spxCtrlCustomer) as FormControl);\n readonly ctrlDepot = computed(() => this.formGroup()?.get(spxCtrlDepot) as FormControl);\n readonly ctrlLocation = computed(() => this.formGroup()?.get(spxCtrlLocation) as FormControl);\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(this.form);\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n\n onBlur(data: { field: SpxFormFieldI, valuePair: SpxValuePair<any> }) {\n setTimeout(() => {\n if (valuePairToValue(data.valuePair)) {\n if (data.field.key === spxCtrlCategory && valuePairToValue(this.ctrlCategory().value) !== null) {\n this.spxBlurCategory.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerStatus && valuePairToValue(this.ctrlContainerStatus().value) !== null) {\n this.spxBlurContainerStatus.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerStatusGroup && valuePairToValue(this.ctrlContainerStatusGroup().value) !== null) {\n this.spxBlurContainerStatusGroup.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerType && valuePairToValue(this.ctrlContainerType().value) !== null) {\n this.spxBlurContainerType.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlCustomer && valuePairToValue(this.ctrlCustomer().value) !== null) {\n this.spxBlurCustomer.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlDepot && valuePairToValue(this.ctrlDepot().value) !== null) {\n this.spxBlurDepot.emit(data.valuePair);\n }\n }\n }, 300);\n }\n\n onSearch(data: { field: SpxFormFieldI, valuePair: SpxValuePair<any> }) {\n if (data.field.key === spxCtrlCategory) {\n this.spxSearchCategory.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerType) {\n this.spxSearchContainerType.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerStatus) {\n this.spxSearchContainerStatus.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerStatusGroup) {\n this.spxSearchContainerStatusGroup.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlCustomer) {\n this.spxSearchCustomer.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlDepot) {\n this.spxSearchDepot.emit(data.valuePair);\n }\n }\n\n onPageChange(page: number) {\n this.spxPageChange.emit(page);\n }\n\n goToContainer(container: any) {\n this.spxClickContainer.emit(container);\n }\n\n onSubmit(): void {\n this.spxSubmit.emit({\n ctrlCategory: this.ctrlCategory().value,\n ctrlContainerStatus: this.ctrlContainerStatus().value,\n ctrlContainerStatusGroup: this.ctrlContainerStatusGroup().value,\n ctrlContainerType: this.ctrlContainerType().value,\n ctrlCustomer: this.ctrlCustomer().value,\n ctrlDepot: this.ctrlDepot().value,\n ctrlLocation: this.ctrlLocation().value,\n });\n }\n}\n","@if (!loaded()) {\n <form [formGroup]=\"formGroup()\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup()\"\n [spxForm]=\"form\"\n [spxSuggestions]=\"suggestions()\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n </form>\n}\n\n@if (loaded()) {\n <div class=\"flex flex-col gap-3\">\n @if (containers().length > 0) {\n <spx-pagination\n [spxPage]=\"currentPage()\"\n [spxMaxPages]=\"(containers().length < (pageSize() + 1)) ? (currentPage() + 1) : currentPage()\"\n [faArrowLeft]=\"faArrowLeft()\"\n [faArrowRight]=\"faArrowRight()\"\n [textPage]=\"textPage()\"\n [textPrevious]=\"textPrevious()\"\n [textNext]=\"textNext()\"\n (spxPageChange)=\"onPageChange($event)\">\n </spx-pagination>\n }\n @if (containers().length === 0) {\n <spx-alert [spxSeverity]=\"severityInfo\" [spxTitle]=\"textNoResults() | translate | capitalize\">\n {{ textYouCanChangeYourFilters() | translate | capitalize }}\n </spx-alert>\n }\n @for (container of containers(); track container; let i = $index) {\n @if (i < pageSize()) {\n <spx-card [hasContent]=\"false\" (clicked)=\"goToContainer(container)\">\n <div card-header class=\"card-header rounded-t-lg p-3 bg-sky-200\">\n <div class=\"flex flex-row space-x-3 items-center w-full\">\n <div\n class=\"card-header-icon-left flex basis-10 py-1.5 shrink-0 grow-0 place-items-center rounded bg-sky-400\">\n <fa-icon class=\"mx-auto\" [icon]=\"faContainerStorage()\"></fa-icon>\n </div>\n <div class=\"card-header-text-middle grow\">\n <div class=\"block font-medium text-large\">{{ container.formatted.containerNumber }}</div>\n </div>\n <div\n class=\"card-header-icons-right text-sm text-gray-900 leading-5 flex flex-wrap items-stretch text-center font-bold\">\n @if (container.containerStatus) {\n <div class=\"min-w-[36px] px-2 py-1 bg-white text-black\"> {{\n container.formatted.containerStatus }}</div>\n }\n </div>\n </div>\n </div>\n <div card-lines class=\"grid grid-cols-2 gap-2\">\n <spx-card-line [text]=\"textContainerType() | translate | capitalize\"\n [value]=\"container.formatted.containerType\"></spx-card-line>\n <spx-card-line [text]=\"textCategory() | translate | capitalize\"\n [value]=\"container.formatted.category\"></spx-card-line>\n <spx-card-line [text]=\"textLocation() | translate | capitalize\"\n [value]=\"container.formatted.location\"></spx-card-line>\n </div>\n </spx-card>\n }\n }\n @if (containers().length > 0) {\n <spx-pagination\n [spxPage]=\"currentPage()\"\n [spxMaxPages]=\"(containers().length < (pageSize() + 1)) ? (currentPage() + 1) : currentPage()\"\n [faArrowLeft]=\"faArrowLeft()\"\n [faArrowRight]=\"faArrowRight()\"\n [textPage]=\"textPage()\"\n [textPrevious]=\"textPrevious()\"\n [textNext]=\"textNext()\"\n (spxPageChange)=\"onPageChange($event)\">\n </spx-pagination>\n }\n </div>\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAeO,MAAM,eAAe,GAAG;AACxB,MAAM,sBAAsB,GAAG;AAC/B,MAAM,2BAA2B,GAAG;AACpC,MAAM,oBAAoB,GAAG;AAC7B,MAAM,eAAe,GAAG;AACxB,MAAM,YAAY,GAAG;AACrB,MAAM,eAAe,GAAG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,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACpB,oBAAoB,gKACpB,sBAAsB,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,cAAA,EAAA,SAAA,EAAA,aAAA,EAAA,UAAA,EAAA,UAAA,EAAA,cAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACtB,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EALf,iBAAiB,EAAA,IAAA,EAAA,YAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAUR,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAlBjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,OAAA,EAEjB;wBACP,WAAW;wBACX,iBAAiB;wBACjB,mBAAmB;wBACnB,iBAAiB;wBACjB,iBAAiB;wBACjB,gBAAgB;wBAChB,oBAAoB;wBACpB,oBAAoB;wBACpB,sBAAsB;wBACtB;AACD,qBAAA,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EAAA,QAAA,EAAA,62GAAA,EAAA;;;AE1ClB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-stock-info.mjs","sources":["../../../../projects/softpak/components/spx-stock-info/spx-stock-info.component.ts","../../../../projects/softpak/components/spx-stock-info/spx-stock-info.component.html","../../../../projects/softpak/components/spx-stock-info/softpak-components-spx-stock-info.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\nimport { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\nimport { SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\nimport { SpxFormButtonTypeEnum, SpxFormFieldI, SpxFormI, SpxFormViewComponent } from '@softpak/components/spx-form-view';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxStockInfoValueI } from './spx-stock-info-value.interface';\nimport { SpxPaginationComponent } from '@softpak/components/spx-pagination';\nimport { IconProp } from '@fortawesome/fontawesome-svg-core';\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\nimport { SpxCardComponent, SpxCardLineComponent } from '@softpak/components/spx-card';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { FontAwesomeModule, IconDefinition } from '@fortawesome/angular-fontawesome';\n\nexport const spxCtrlCategory = 'ctrlCategory';\nexport const spxCtrlContainerStatus = 'ctrlContainerStatus';\nexport const spxCtrlContainerStatusGroup = 'ctrlContainerStatusGroup';\nexport const spxCtrlContainerType = 'ctrlContainerType';\nexport const spxCtrlCustomer = 'ctrlCustomer';\nexport const spxCtrlDepot = 'ctrlDepot';\nexport const spxCtrlLocation = 'ctrlLocation';\nexport const spxSectionContainerInfo = 'sectionContainerInfo';\nexport const spxSectionCustomer = 'sectionCustomer';\nexport const spxSectionLocation = 'sectionLocation';\n\n@Component({\n selector: 'spx-stock-info',\n templateUrl: './spx-stock-info.component.html',\n imports: [\n FormsModule,\n FontAwesomeModule,\n ReactiveFormsModule,\n SpxAlertComponent,\n SpxCapitalizePipe,\n SpxCardComponent,\n SpxCardLineComponent,\n SpxFormViewComponent,\n SpxPaginationComponent,\n TranslateModule\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SpxStockInfoComponent {\n readonly depotReadonly = input<boolean>(false);\n readonly statusGroupsInPatch = input.required<boolean>();\n readonly containers = input.required<any[]>();\n readonly currentPage = input.required<number>();\n readonly faArrowLeft = input.required<IconProp>();\n readonly faArrowRight = input.required<IconProp>();\n readonly faContainerStorage = input.required<IconProp>();\n readonly formGroup = input.required<FormGroup>();\n readonly loaded = input.required<boolean>();\n readonly pageSize = input.required<number>();\n readonly suggestions = input<any>({});\n readonly textCategory = input.required<string>();\n readonly textContainerInfo = input.required<string>();\n readonly textContainerStatus = input.required<string>();\n readonly textContainerStatusGroup = input.required<string>();\n readonly textContainerType = input.required<string>();\n readonly textCustomer = input.required<string>();\n readonly textDepot = input.required<string>();\n readonly textLocation = input.required<string>();\n readonly textNext = input.required<string>();\n readonly textPage = input.required<string>();\n readonly textPrevious = input.required<string>();\n readonly textSearch = input.required<string>();\n readonly textNoResults = input.required<string>();\n readonly textYouCanChangeYourFilters = input.required<string>();\n readonly spxBlurCategory = output<SpxValuePair<string>>();\n readonly spxBlurContainerStatus = output<SpxValuePair<string>>();\n readonly spxBlurContainerStatusGroup = output<SpxValuePair<string>>();\n readonly spxBlurContainerType = output<SpxValuePair<string>>();\n readonly spxBlurCustomer = output<SpxValuePair<string>>();\n readonly spxBlurDepot = output<SpxValuePair<string>>();\n readonly spxClickContainer = output<any>();\n readonly spxPageChange = output<number>();\n readonly spxSearchCategory = output<SpxValuePair<string>>();\n readonly spxSearchContainerStatus = output<SpxValuePair<string>>();\n readonly spxSearchContainerStatusGroup = output<SpxValuePair<string>>();\n readonly spxSearchContainerType = output<SpxValuePair<string>>();\n readonly spxSearchCustomer = output<SpxValuePair<string>>();\n readonly spxSearchDepot = output<SpxValuePair<string>>();\n readonly spxSubmit = output<SpxStockInfoValueI>();\n severityInfo = SpxSeverityEnum.info;\n\n\n form: SpxFormI = {\n buttons: [\n {\n severity: SpxSeverityEnum.success,\n type: SpxFormButtonTypeEnum.submit,\n label: () => this.textSearch(),\n }\n ],\n sections: [\n {\n key: spxSectionLocation,\n show: () => true,\n title: () => this.textLocation(),\n fields: [\n {\n key: spxCtrlDepot,\n label: () => this.textDepot(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [spxValidatorRequired()],\n readonly: () => this.depotReadonly(),\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n {\n key: spxCtrlLocation,\n label: () => this.textLocation(),\n type: () => SpxInputTypeEnum.text,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => false,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n ]\n },\n {\n key: spxSectionCustomer,\n show: () => true,\n title: () => this.textCustomer(),\n fields: [\n {\n key: spxCtrlCustomer,\n label: () => this.textCustomer(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n ]\n },\n {\n key: spxSectionContainerInfo,\n show: () => true,\n title: () => this.textContainerInfo(),\n fields: [\n {\n key: spxCtrlCategory,\n label: () => this.textCategory(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n {\n key: spxCtrlContainerStatus,\n label: () => this.textContainerStatus(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n {\n key: spxCtrlContainerStatusGroup,\n label: () => this.textContainerStatusGroup(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => this.statusGroupsInPatch(),\n capitalize: () => true,\n },\n {\n key: spxCtrlContainerType,\n label: () => this.textContainerType(),\n type: () => SpxInputTypeEnum.autocomplete,\n defaultValue: () => null,\n validators: () => [],\n readonly: () => false,\n suggestions: () => true,\n afterValueChange: undefined,\n show: () => true,\n capitalize: () => true,\n },\n ]\n },\n ]\n };\n\n readonly ctrlCategory = computed(() => this.formGroup()?.get(spxCtrlCategory) as FormControl);\n readonly ctrlContainerStatus = computed(() => this.formGroup()?.get(spxCtrlContainerStatus) as FormControl);\n readonly ctrlContainerStatusGroup = computed(() => this.formGroup()?.get(spxCtrlContainerStatusGroup) as FormControl);\n readonly ctrlContainerType = computed(() => this.formGroup()?.get(spxCtrlContainerType) as FormControl);\n readonly ctrlCustomer = computed(() => this.formGroup()?.get(spxCtrlCustomer) as FormControl);\n readonly ctrlDepot = computed(() => this.formGroup()?.get(spxCtrlDepot) as FormControl);\n readonly ctrlLocation = computed(() => this.formGroup()?.get(spxCtrlLocation) as FormControl);\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(this.form);\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n\n onBlur(data: { field: SpxFormFieldI, valuePair: SpxValuePair<any> }) {\n setTimeout(() => {\n if (valuePairToValue(data.valuePair)) {\n if (data.field.key === spxCtrlCategory && valuePairToValue(this.ctrlCategory().value) !== null) {\n this.spxBlurCategory.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerStatus && valuePairToValue(this.ctrlContainerStatus().value) !== null) {\n this.spxBlurContainerStatus.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerStatusGroup && valuePairToValue(this.ctrlContainerStatusGroup().value) !== null) {\n this.spxBlurContainerStatusGroup.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerType && valuePairToValue(this.ctrlContainerType().value) !== null) {\n this.spxBlurContainerType.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlCustomer && valuePairToValue(this.ctrlCustomer().value) !== null) {\n this.spxBlurCustomer.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlDepot && valuePairToValue(this.ctrlDepot().value) !== null) {\n this.spxBlurDepot.emit(data.valuePair);\n }\n }\n }, 300);\n }\n\n onSearch(data: { field: SpxFormFieldI, valuePair: SpxValuePair<any> }) {\n if (data.field.key === spxCtrlCategory) {\n this.spxSearchCategory.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerType) {\n this.spxSearchContainerType.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerStatus) {\n this.spxSearchContainerStatus.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerStatusGroup) {\n this.spxSearchContainerStatusGroup.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlCustomer) {\n this.spxSearchCustomer.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlDepot) {\n this.spxSearchDepot.emit(data.valuePair);\n }\n }\n\n onPageChange(page: number) {\n this.spxPageChange.emit(page);\n }\n\n goToContainer(container: any) {\n this.spxClickContainer.emit(container);\n }\n\n onSubmit(): void {\n this.spxSubmit.emit({\n ctrlCategory: this.ctrlCategory().value,\n ctrlContainerStatus: this.ctrlContainerStatus().value,\n ctrlContainerStatusGroup: this.ctrlContainerStatusGroup().value,\n ctrlContainerType: this.ctrlContainerType().value,\n ctrlCustomer: this.ctrlCustomer().value,\n ctrlDepot: this.ctrlDepot().value,\n ctrlLocation: this.ctrlLocation().value,\n });\n }\n}\n","@if (!loaded()) {\n <form [formGroup]=\"formGroup()\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup()\"\n [spxForm]=\"form\"\n [spxSuggestions]=\"suggestions()\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n </form>\n}\n\n@if (loaded()) {\n <div class=\"flex flex-col gap-3\">\n @if (containers().length > 0) {\n <spx-pagination\n [spxPage]=\"currentPage()\"\n [spxMaxPages]=\"(containers().length < (pageSize() + 1)) ? (currentPage() + 1) : currentPage()\"\n [faArrowLeft]=\"faArrowLeft()\"\n [faArrowRight]=\"faArrowRight()\"\n [textPage]=\"textPage()\"\n [textPrevious]=\"textPrevious()\"\n [textNext]=\"textNext()\"\n (spxPageChange)=\"onPageChange($event)\">\n </spx-pagination>\n }\n @if (containers().length === 0) {\n <spx-alert [spxSeverity]=\"severityInfo\" [spxTitle]=\"textNoResults() | translate | capitalize\">\n {{ textYouCanChangeYourFilters() | translate | capitalize }}\n </spx-alert>\n }\n @for (container of containers(); track container; let i = $index) {\n @if (i < pageSize()) {\n <spx-card [hasContent]=\"false\" (clicked)=\"goToContainer(container)\">\n <div card-header class=\"card-header rounded-t-lg p-3 bg-sky-200\">\n <div class=\"flex flex-row space-x-3 items-center w-full\">\n <div\n class=\"card-header-icon-left flex basis-10 py-1.5 shrink-0 grow-0 place-items-center rounded bg-sky-400\">\n <fa-icon class=\"mx-auto\" [icon]=\"faContainerStorage()\"></fa-icon>\n </div>\n <div class=\"card-header-text-middle grow\">\n <div class=\"block font-medium text-large\">{{ container.formatted.containerNumber }}</div>\n </div>\n <div\n class=\"card-header-icons-right text-sm text-gray-900 leading-5 flex flex-wrap items-stretch text-center font-bold\">\n @if (container.containerStatus) {\n <div class=\"min-w-[36px] px-2 py-1 bg-white text-black\"> {{\n container.formatted.containerStatus }}</div>\n }\n </div>\n </div>\n </div>\n <div card-lines class=\"grid grid-cols-2 gap-2\">\n <spx-card-line [text]=\"textContainerType() | translate | capitalize\"\n [value]=\"container.formatted.containerType\"></spx-card-line>\n <spx-card-line [text]=\"textCategory() | translate | capitalize\"\n [value]=\"container.formatted.category\"></spx-card-line>\n <spx-card-line [text]=\"textLocation() | translate | capitalize\"\n [value]=\"container.formatted.location\"></spx-card-line>\n </div>\n </spx-card>\n }\n }\n @if (containers().length > 0) {\n <spx-pagination\n [spxPage]=\"currentPage()\"\n [spxMaxPages]=\"(containers().length < (pageSize() + 1)) ? (currentPage() + 1) : currentPage()\"\n [faArrowLeft]=\"faArrowLeft()\"\n [faArrowRight]=\"faArrowRight()\"\n [textPage]=\"textPage()\"\n [textPrevious]=\"textPrevious()\"\n [textNext]=\"textNext()\"\n (spxPageChange)=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A,EAAA,62GAAA,EAAA;;;AE1ClB;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { inject, input, output, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { SpxAlertComponent } from '@softpak/components/spx-alert';
|
|
4
|
-
import { createActionGroup, props, emptyProps, createFeature, createReducer, on } from '@ngrx/store';
|
|
4
|
+
import { Store, createActionGroup, props, emptyProps, createFeature, createReducer, on } from '@ngrx/store';
|
|
5
5
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
6
6
|
|
|
7
7
|
var SpxToasterSeverityEnum;
|
|
@@ -30,8 +30,10 @@ function toasterAutocloseSpeed(autoCloseSpeed, messageText) {
|
|
|
30
30
|
|
|
31
31
|
class SpxToasterComponent {
|
|
32
32
|
constructor() {
|
|
33
|
+
this.store = inject(Store);
|
|
33
34
|
this.messages = input.required(...(ngDevMode ? [{ debugName: "messages" }] : []));
|
|
34
35
|
this.spxAutoclose = input(...(ngDevMode ? [undefined, { debugName: "spxAutoclose" }] : []));
|
|
36
|
+
this.spxCustomer = this.store.selectSignal((state) => state.spxChannel?.channel?.brand);
|
|
35
37
|
this.spxClose = output();
|
|
36
38
|
effect(() => {
|
|
37
39
|
this.messages().forEach((message) => {
|
|
@@ -47,13 +49,13 @@ class SpxToasterComponent {
|
|
|
47
49
|
this.spxClose.emit(id);
|
|
48
50
|
}
|
|
49
51
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SpxToasterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: SpxToasterComponent, isStandalone: true, selector: "spx-toaster", inputs: { messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: true, transformFunction: null }, spxAutoclose: { classPropertyName: "spxAutoclose", publicName: "spxAutoclose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { spxClose: "spxClose" }, host: { classAttribute: "spx-toasts-displayer" }, ngImport: i0, template: "\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}", styles: [".progress-bar-container{width:100%;height:5px;background-color:#ccc;margin-top:8px;border-radius:2px;overflow:hidden}.progress-bar{height:100%;background-color:#76c7c0;animation-name:progress;animation-timing-function:ease-in-out;animation-fill-mode:forwards;animation-duration:5000}@keyframes progress{0%{width:0%}to{width:100%}}\n"], dependencies: [{ kind: "component", type: SpxAlertComponent, selector: "spx-alert", inputs: ["spxAutoclose", "spxCloseable", "spxHideTitle", "spxTitle", "spxMarginTop", "spxSeverity"], outputs: ["spxClose", "spxTitleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
52
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: SpxToasterComponent, isStandalone: true, selector: "spx-toaster", inputs: { messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: true, transformFunction: null }, spxAutoclose: { classPropertyName: "spxAutoclose", publicName: "spxAutoclose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { spxClose: "spxClose" }, host: { classAttribute: "spx-toasts-displayer" }, ngImport: i0, template: "\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 [spxCompanyName]=\"spxCustomer()\"\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}\n", styles: [".progress-bar-container{width:100%;height:5px;background-color:#ccc;margin-top:8px;border-radius:2px;overflow:hidden}.progress-bar{height:100%;background-color:#76c7c0;animation-name:progress;animation-timing-function:ease-in-out;animation-fill-mode:forwards;animation-duration:5000}@keyframes progress{0%{width:0%}to{width:100%}}\n"], dependencies: [{ kind: "component", type: SpxAlertComponent, selector: "spx-alert", inputs: ["spxAutoclose", "spxCompanyName", "spxCloseable", "spxHideTitle", "spxTitle", "spxMarginTop", "spxSeverity"], outputs: ["spxClose", "spxTitleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
51
53
|
}
|
|
52
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SpxToasterComponent, decorators: [{
|
|
53
55
|
type: Component,
|
|
54
56
|
args: [{ selector: 'spx-toaster', standalone: true, imports: [SpxAlertComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
55
57
|
class: 'spx-toasts-displayer',
|
|
56
|
-
}, template: "\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}", styles: [".progress-bar-container{width:100%;height:5px;background-color:#ccc;margin-top:8px;border-radius:2px;overflow:hidden}.progress-bar{height:100%;background-color:#76c7c0;animation-name:progress;animation-timing-function:ease-in-out;animation-fill-mode:forwards;animation-duration:5000}@keyframes progress{0%{width:0%}to{width:100%}}\n"] }]
|
|
58
|
+
}, template: "\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 [spxCompanyName]=\"spxCustomer()\"\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}\n", styles: [".progress-bar-container{width:100%;height:5px;background-color:#ccc;margin-top:8px;border-radius:2px;overflow:hidden}.progress-bar{height:100%;background-color:#76c7c0;animation-name:progress;animation-timing-function:ease-in-out;animation-fill-mode:forwards;animation-duration:5000}@keyframes progress{0%{width:0%}to{width:100%}}\n"] }]
|
|
57
59
|
}], ctorParameters: () => [], propDecorators: { messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: true }] }], spxAutoclose: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxAutoclose", required: false }] }], spxClose: [{ type: i0.Output, args: ["spxClose"] }] } });
|
|
58
60
|
|
|
59
61
|
class SpxToasterMessageI {
|
|
@@ -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 const messageLength = messageText?.length ?? 0;\n switch (autoCloseSpeed) {\n case SpxToasterAutoCloseSpeedEnum.DEFAULT:\n return Math.min(Math.max(messageLength * 50, 2000), 7000);\n case SpxToasterAutoCloseSpeedEnum.SLOW:\n return Math.min(Math.max(messageLength * 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 { createActionGroup, emptyProps, props } from '@ngrx/store';\n\nimport { SpxToasterAutoCloseSpeedEnum } from '../../src/spx-toaster-autoclose-speed';\n\nexport const spxToasterActions = createActionGroup({\n source: 'SpxToaster',\n events: {\n ClearAll: emptyProps(),\n ClearAllErrors: emptyProps(),\n ClearAllErrorsAndWarnings: emptyProps(),\n ClearMessage: props<{ id: number; }>(),\n CreateError: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n CreateInfo: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n CreateSuccess: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n CreateWarning: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n },\n});\n","import { StateI } from \"./spx-toaster.state\";\n\nexport const initialState: StateI = {\n messages: [],\n nextId: 1,\n};\n","import { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { SpxToasterMessageI } from '../../src/spx-toaster-message.interface';\nimport { StateI } from './spx-toaster.state';\nimport { initialState } from './spx-toaster.initial';\nimport { spxToasterActions } from './spx-toaster.actions';\nimport { toasterAutocloseSpeed } from '../../src/spx-toaster-autoclose-speed';\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(spxToasterActions.clearAll, (state: StateI): StateI => {\n return {\n ...state,\n messages: []\n };\n }),\n on(spxToasterActions.clearAllErrors, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error)]\n };\n }),\n on(spxToasterActions.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(spxToasterActions.clearMessage, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.id !== action.id)]\n };\n }),\n on(spxToasterActions.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(spxToasterActions.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(spxToasterActions.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(spxToasterActions.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":[],"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,GAAA,EAAA,CAAA,CAAA;IAOtB;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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AM,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,IAAA,CAAC,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 {\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 const messageLength = messageText?.length ?? 0;\n switch (autoCloseSpeed) {\n case SpxToasterAutoCloseSpeedEnum.DEFAULT:\n return Math.min(Math.max(messageLength * 50, 2000), 7000);\n case SpxToasterAutoCloseSpeedEnum.SLOW:\n return Math.min(Math.max(messageLength * 60, 3000), 10000);\n default:\n return autoCloseSpeed;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n effect,\n inject,\n input,\n output,\n} from '@angular/core';\n\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\nimport { SpxToasterMessageI } from './spx-toaster-message.interface';\nimport { Store } from '@ngrx/store';\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 private readonly store = inject(Store);\n messages = input.required<SpxToasterMessageI[]>();\n readonly spxAutoclose = input<number>();\n readonly spxCustomer = this.store.selectSignal(\n (state: { spxChannel?: { channel?: { brand?: string } | null } }) => state.spxChannel?.channel?.brand,\n );\n spxClose = output<number>();\n\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 [spxCompanyName]=\"spxCustomer()\"\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}\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 { createActionGroup, emptyProps, props } from '@ngrx/store';\n\nimport { SpxToasterAutoCloseSpeedEnum } from '../../src/spx-toaster-autoclose-speed';\n\nexport const spxToasterActions = createActionGroup({\n source: 'SpxToaster',\n events: {\n ClearAll: emptyProps(),\n ClearAllErrors: emptyProps(),\n ClearAllErrorsAndWarnings: emptyProps(),\n ClearMessage: props<{ id: number; }>(),\n CreateError: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n CreateInfo: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n CreateSuccess: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n CreateWarning: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n },\n});\n","import { StateI } from \"./spx-toaster.state\";\n\nexport const initialState: StateI = {\n messages: [],\n nextId: 1,\n};\n","import { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { SpxToasterMessageI } from '../../src/spx-toaster-message.interface';\nimport { StateI } from './spx-toaster.state';\nimport { initialState } from './spx-toaster.initial';\nimport { spxToasterActions } from './spx-toaster.actions';\nimport { toasterAutocloseSpeed } from '../../src/spx-toaster-autoclose-speed';\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(spxToasterActions.clearAll, (state: StateI): StateI => {\n return {\n ...state,\n messages: []\n };\n }),\n on(spxToasterActions.clearAllErrors, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error)]\n };\n }),\n on(spxToasterActions.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(spxToasterActions.clearMessage, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.id !== action.id)]\n };\n }),\n on(spxToasterActions.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(spxToasterActions.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(spxToasterActions.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(spxToasterActions.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":[],"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,GAAA,EAAA,CAAA,CAAA;IAOtB;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,GAAA,EAAA,CAAA,CAAA;AAKlC,SAAU,qBAAqB,CAAC,cAA4C,EAAE,WAAmB,EAAA;AACnG,IAAA,MAAM,aAAa,GAAG,WAAW,EAAE,MAAM,IAAI,CAAC;IAC9C,QAAQ,cAAc;QAClB,KAAK,4BAA4B,CAAC,OAAO;AACrC,YAAA,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,GAAG,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC;QAC7D,KAAK,4BAA4B,CAAC,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AAE,KAAK,CAAC,MAAM,GAAG;SAC1B;AACL,IAAA,CAAC,CAAC,CACL;AACJ,CAAA,CAAC;;;;;;;;;;;;AC9GF;;AAEG;;;;"}
|
|
@@ -4,23 +4,23 @@ import { spxTextCheckingForUpdates, spxTextOneMomentPlease, spxTextUpdateErrorRe
|
|
|
4
4
|
import { App } from '@capacitor/app';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { signal, computed, effect, Component, HostBinding, ChangeDetectionStrategy, inject, Injectable } from '@angular/core';
|
|
7
|
+
import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
|
|
7
8
|
import { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';
|
|
9
|
+
import { getBinaryVersionGroup, unsubscribeSubscriptions, SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
8
10
|
import { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';
|
|
9
11
|
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
|
|
10
12
|
import * as i1 from '@ngrx/store';
|
|
11
13
|
import { createActionGroup, emptyProps, props, createFeature, createReducer, on, Store } from '@ngrx/store';
|
|
12
14
|
import { DateTime } from 'luxon';
|
|
13
15
|
import * as i2 from '@angular/router';
|
|
14
|
-
import { unsubscribeSubscriptions, SpxSeverityEnum, getBinaryVersionGroup } from '@softpak/components/spx-helpers';
|
|
15
16
|
import { SpxButtonComponent } from '@softpak/components/spx-button';
|
|
16
17
|
import * as i2$1 from '@angular/platform-browser';
|
|
17
18
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
|
18
19
|
import { LiveUpdate } from '@capawesome/capacitor-live-update';
|
|
19
20
|
import { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';
|
|
20
|
-
import { of, concat, from } from 'rxjs';
|
|
21
|
+
import { of, concat, from, timer } from 'rxjs';
|
|
21
22
|
import { delay, mergeMap, exhaustMap, map, catchError, tap } from 'rxjs/operators';
|
|
22
23
|
import { Capacitor } from '@capacitor/core';
|
|
23
|
-
import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
|
|
24
24
|
import { captureMessage } from '@sentry/angular';
|
|
25
25
|
|
|
26
26
|
const spxUpdateCheckActions = createActionGroup({
|
|
@@ -104,7 +104,7 @@ var updCheck = createFeature({
|
|
|
104
104
|
}), on(spxUpdateCheckActions.runCheck, (state, { forceWaitForUpdate }) => {
|
|
105
105
|
return {
|
|
106
106
|
...state,
|
|
107
|
-
forceWaitForUpdate: forceWaitForUpdate ?
|
|
107
|
+
forceWaitForUpdate: typeof forceWaitForUpdate === 'boolean' ? forceWaitForUpdate : state.forceWaitForUpdate,
|
|
108
108
|
lastErrorReason: null,
|
|
109
109
|
showError: false,
|
|
110
110
|
status: SpxUpdateCheckStatusEnum.preparing,
|
|
@@ -134,11 +134,15 @@ var spxUpdateCheck_reducer = /*#__PURE__*/Object.freeze({
|
|
|
134
134
|
});
|
|
135
135
|
|
|
136
136
|
class SpxUpdatePageComponent {
|
|
137
|
+
static { this.SUCCESS_CLOSE_DELAY_MS = 5000; }
|
|
137
138
|
ngOnInit() {
|
|
138
139
|
this.hasStarted.set(true);
|
|
139
140
|
void this.loadVersionInfo();
|
|
140
141
|
this.appStore.dispatch(spxUpdateCheckActions.runCheck({ forceWaitForUpdate: true }));
|
|
141
142
|
}
|
|
143
|
+
ngOnDestroy() {
|
|
144
|
+
this.clearScheduledClose();
|
|
145
|
+
}
|
|
142
146
|
constructor(appStore, activatedRoute, navController) {
|
|
143
147
|
this.appStore = appStore;
|
|
144
148
|
this.activatedRoute = activatedRoute;
|
|
@@ -148,11 +152,12 @@ class SpxUpdatePageComponent {
|
|
|
148
152
|
this.buildVersion = signal('-', ...(ngDevMode ? [{ debugName: "buildVersion" }] : []));
|
|
149
153
|
this.lastCheck = this.appStore.selectSignal(updCheck.selectLastCheck);
|
|
150
154
|
this.lastErrorReason = this.appStore.selectSignal(updCheck.selectLastErrorReason);
|
|
151
|
-
this.forceWaitForUpdate = this.appStore.selectSignal(updCheck.selectForceWaitForUpdate);
|
|
152
155
|
this.hasStarted = signal(false, ...(ngDevMode ? [{ debugName: "hasStarted" }] : []));
|
|
156
|
+
this.hasNavigatedAway = signal(false, ...(ngDevMode ? [{ debugName: "hasNavigatedAway" }] : []));
|
|
153
157
|
this.liveBundle = signal('-', ...(ngDevMode ? [{ debugName: "liveBundle" }] : []));
|
|
154
158
|
this.liveUpdateChannel = signal('-', ...(ngDevMode ? [{ debugName: "liveUpdateChannel" }] : []));
|
|
155
159
|
this.status = this.appStore.selectSignal(updCheck.selectStatus);
|
|
160
|
+
this.closeTimerId = null;
|
|
156
161
|
this.spxTextCheckingForUpdates = spxTextCheckingForUpdates;
|
|
157
162
|
this.spxTextOneMomentPlease = spxTextOneMomentPlease;
|
|
158
163
|
this.spxTextUpdateErrorReason = spxTextUpdateErrorReason;
|
|
@@ -166,6 +171,8 @@ class SpxUpdatePageComponent {
|
|
|
166
171
|
this.spxTextUpdateVersionInfo = spxTextUpdateVersionInfo;
|
|
167
172
|
this.statusText = computed(() => {
|
|
168
173
|
switch (this.status()) {
|
|
174
|
+
case SpxUpdateCheckStatusEnum.idle:
|
|
175
|
+
return spxTextUpdateStatusPreparing;
|
|
169
176
|
case SpxUpdateCheckStatusEnum.preparing:
|
|
170
177
|
return spxTextUpdateStatusPreparing;
|
|
171
178
|
case SpxUpdateCheckStatusEnum.syncing:
|
|
@@ -184,24 +191,95 @@ class SpxUpdatePageComponent {
|
|
|
184
191
|
return spxTextUpdateStatusCompleted;
|
|
185
192
|
}
|
|
186
193
|
}, ...(ngDevMode ? [{ debugName: "statusText" }] : []));
|
|
187
|
-
this.showError = this.appStore.selectSignal(updCheck.selectShowError);
|
|
188
194
|
effect(() => {
|
|
189
|
-
|
|
195
|
+
this.status();
|
|
196
|
+
this.refreshStorageVersionInfo();
|
|
197
|
+
});
|
|
198
|
+
effect(() => {
|
|
199
|
+
const status = this.status();
|
|
200
|
+
if (!this.hasStarted() || this.hasNavigatedAway()) {
|
|
190
201
|
return;
|
|
191
202
|
}
|
|
192
|
-
if (this.
|
|
203
|
+
if (!this.shouldCloseUpdatePage(status)) {
|
|
204
|
+
this.clearScheduledClose();
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const targetUrl = this.activatedRoute.snapshot.data['url'];
|
|
208
|
+
if (targetUrl === undefined) {
|
|
193
209
|
console.error('configure data property \'url\' in route for update page');
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const closeDelayMs = this.getCloseDelayMs(status);
|
|
213
|
+
if (closeDelayMs === 0) {
|
|
214
|
+
this.clearScheduledClose();
|
|
215
|
+
this.navigateAway(targetUrl);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
if (this.closeTimerId !== null) {
|
|
219
|
+
return;
|
|
194
220
|
}
|
|
195
|
-
this.
|
|
221
|
+
this.closeTimerId = setTimeout(() => {
|
|
222
|
+
this.closeTimerId = null;
|
|
223
|
+
this.navigateAway(targetUrl);
|
|
224
|
+
}, closeDelayMs);
|
|
196
225
|
});
|
|
197
226
|
}
|
|
227
|
+
shouldCloseUpdatePage(status) {
|
|
228
|
+
return status === SpxUpdateCheckStatusEnum.upToDate ||
|
|
229
|
+
status === SpxUpdateCheckStatusEnum.failed ||
|
|
230
|
+
status === SpxUpdateCheckStatusEnum.notAvailableOnWeb ||
|
|
231
|
+
status === SpxUpdateCheckStatusEnum.updateReady;
|
|
232
|
+
}
|
|
233
|
+
getCloseDelayMs(status) {
|
|
234
|
+
if (status === SpxUpdateCheckStatusEnum.upToDate || status === SpxUpdateCheckStatusEnum.updateReady) {
|
|
235
|
+
return SpxUpdatePageComponent.SUCCESS_CLOSE_DELAY_MS;
|
|
236
|
+
}
|
|
237
|
+
return 0;
|
|
238
|
+
}
|
|
239
|
+
clearScheduledClose() {
|
|
240
|
+
if (this.closeTimerId === null) {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
clearTimeout(this.closeTimerId);
|
|
244
|
+
this.closeTimerId = null;
|
|
245
|
+
}
|
|
246
|
+
navigateAway(targetUrl) {
|
|
247
|
+
if (this.hasNavigatedAway()) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
this.hasNavigatedAway.set(true);
|
|
251
|
+
this.navController.navigateRoot(targetUrl);
|
|
252
|
+
}
|
|
198
253
|
async loadVersionInfo() {
|
|
199
254
|
const appInfo = await App.getInfo();
|
|
200
|
-
|
|
255
|
+
const appVersion = appInfo.version || '-';
|
|
256
|
+
this.appVersion.set(appVersion);
|
|
201
257
|
this.buildVersion.set(appInfo.build || '-');
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
258
|
+
try {
|
|
259
|
+
const computedBinaryVersionGroup = `${getBinaryVersionGroup(appVersion)}.x`;
|
|
260
|
+
const storedBinaryVersionGroup = SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup);
|
|
261
|
+
this.binaryVersionGroup.set(storedBinaryVersionGroup || computedBinaryVersionGroup);
|
|
262
|
+
const storedLiveUpdateChannel = SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel);
|
|
263
|
+
const channelType = SpxStorage.getSetting(SpxStorageKeyEnum.channelType) || SpxAppChannelTypeEnum.production;
|
|
264
|
+
this.liveUpdateChannel.set(storedLiveUpdateChannel || `${channelType}-${computedBinaryVersionGroup}`);
|
|
265
|
+
}
|
|
266
|
+
catch {
|
|
267
|
+
this.binaryVersionGroup.set(SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup) || '-');
|
|
268
|
+
this.liveUpdateChannel.set(SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel) || '-');
|
|
269
|
+
}
|
|
270
|
+
this.refreshStorageVersionInfo();
|
|
271
|
+
}
|
|
272
|
+
refreshStorageVersionInfo() {
|
|
273
|
+
const storedBinaryVersionGroup = SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup);
|
|
274
|
+
const storedLiveUpdateChannel = SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel);
|
|
275
|
+
const storedLiveBundle = SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdate);
|
|
276
|
+
if (storedBinaryVersionGroup) {
|
|
277
|
+
this.binaryVersionGroup.set(storedBinaryVersionGroup);
|
|
278
|
+
}
|
|
279
|
+
if (storedLiveUpdateChannel) {
|
|
280
|
+
this.liveUpdateChannel.set(storedLiveUpdateChannel);
|
|
281
|
+
}
|
|
282
|
+
this.liveBundle.set(storedLiveBundle || '-');
|
|
205
283
|
}
|
|
206
284
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SpxUpdatePageComponent, deps: [{ token: i1.Store }, { token: i2.ActivatedRoute }, { token: i3.NavController }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
207
285
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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 <p>{{ spxTextOneMomentPlease | translate | capitalize }}...</p>\n <p class=\"mt-2\">\n <strong>{{ spxTextUpdateStatus | translate | capitalize }}:</strong>\n {{ statusText() | translate | capitalize }}\n </p>\n @if (lastErrorReason()) {\n <p class=\"mt-2 text-red-700\">\n <strong>{{ spxTextUpdateErrorReason | translate | capitalize }}:</strong>\n {{ lastErrorReason() }}\n </p>\n }\n @if (lastCheck()) {\n <p class=\"mt-1 text-sm text-zinc-600\">\n <strong>{{ spxTextUpdateLastCheck | translate | capitalize }}:</strong>\n {{ lastCheck() }}\n </p>\n }\n\n <div class=\"mt-6 text-sm text-zinc-600\">\n <p><strong>{{ spxTextUpdateVersionInfo | translate | capitalize }}</strong></p>\n <p>{{ spxTextUpdateAppVersion | translate | capitalize }}: {{ appVersion() }}</p>\n <p>{{ spxTextUpdateBuildVersion | translate | capitalize }}: {{ buildVersion() }}</p>\n <p>{{ spxTextUpdateBinaryVersionGroup | translate | capitalize }}: {{ binaryVersionGroup() }}</p>\n <p>{{ spxTextUpdateLiveChannel | translate | capitalize }}: {{ liveUpdateChannel() }}</p>\n <p>{{ spxTextUpdateLiveBundle | translate | capitalize }}: {{ liveBundle() }}</p>\n </div>\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" }] }); }
|
|
@@ -325,7 +403,7 @@ let Effects$1 = class Effects {
|
|
|
325
403
|
this.actions$ = inject(Actions);
|
|
326
404
|
this.translateService = inject(TranslateService);
|
|
327
405
|
this.afterInitialize$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.initialize), delay(120000), mergeMap(() => [
|
|
328
|
-
spxUpdateCheckActions.runCheck({}),
|
|
406
|
+
spxUpdateCheckActions.runCheck({ forceWaitForUpdate: false }),
|
|
329
407
|
])));
|
|
330
408
|
this.onRun$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.runCheck), exhaustMap((action) => {
|
|
331
409
|
if (Capacitor.getPlatform() === 'web') {
|
|
@@ -334,7 +412,7 @@ let Effects$1 = class Effects {
|
|
|
334
412
|
return concat(of(spxUpdateCheckActions.syncStarted()), from(App.getInfo()).pipe(mergeMap((binaryInfo) => {
|
|
335
413
|
// Migrate from e.g. 1.2.x to 1.3.x
|
|
336
414
|
const binaryVersionGroup = getBinaryVersionGroup(binaryInfo.version);
|
|
337
|
-
|
|
415
|
+
const channelType = SpxStorage.getSetting(SpxStorageKeyEnum.channelType);
|
|
338
416
|
if (SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup)) {
|
|
339
417
|
SpxStorage.setSetting(SpxStorageKeyEnum.lastBinaryVersionGroup, SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup));
|
|
340
418
|
}
|
|
@@ -362,6 +440,9 @@ let Effects$1 = class Effects {
|
|
|
362
440
|
}
|
|
363
441
|
}), catchError((err) => {
|
|
364
442
|
const errorReason = this.getReadableErrorReason(err);
|
|
443
|
+
if (this.isSyncAlreadyInProgress(errorReason)) {
|
|
444
|
+
return timer(1500).pipe(map(() => spxUpdateCheckActions.runCheck({ forceWaitForUpdate: !!action.forceWaitForUpdate })));
|
|
445
|
+
}
|
|
365
446
|
captureMessage(`[UPD] Handled: ${errorReason}`);
|
|
366
447
|
return of(spxUpdateCheckActions.checkFailed({
|
|
367
448
|
errorReason,
|
|
@@ -373,7 +454,7 @@ let Effects$1 = class Effects {
|
|
|
373
454
|
SpxUpdatePendingActions.hasBeenDownloaded(),
|
|
374
455
|
])));
|
|
375
456
|
this.whenCheckHasFailed$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.checkFailed), delay(30000), mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [
|
|
376
|
-
spxUpdateCheckActions.runCheck({}),
|
|
457
|
+
spxUpdateCheckActions.runCheck({ forceWaitForUpdate: false }),
|
|
377
458
|
])));
|
|
378
459
|
this.whenCheckHasFailedShowError$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.checkFailed), map((action) => spxToasterActions.createError({
|
|
379
460
|
autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,
|
|
@@ -382,7 +463,7 @@ let Effects$1 = class Effects {
|
|
|
382
463
|
: this.translateService.instant(spxTextLiveUpdateCheckFailed),
|
|
383
464
|
}))));
|
|
384
465
|
this.whenNoUpdateWasFound$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.noUpdateWasFound), delay(120000), mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [
|
|
385
|
-
spxUpdateCheckActions.runCheck({}),
|
|
466
|
+
spxUpdateCheckActions.runCheck({ forceWaitForUpdate: false }),
|
|
386
467
|
])));
|
|
387
468
|
}
|
|
388
469
|
getReadableErrorReason(err) {
|
|
@@ -409,6 +490,10 @@ let Effects$1 = class Effects {
|
|
|
409
490
|
}
|
|
410
491
|
return '';
|
|
411
492
|
}
|
|
493
|
+
isSyncAlreadyInProgress(errorReason) {
|
|
494
|
+
const normalized = errorReason.toLowerCase();
|
|
495
|
+
return normalized.includes('sync is already in progress');
|
|
496
|
+
}
|
|
412
497
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
413
498
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects }); }
|
|
414
499
|
};
|