@softpak/components 21.0.1 → 21.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/softpak-components-spx-404-page.mjs +3 -3
- package/fesm2022/softpak-components-spx-alert.mjs +4 -4
- package/fesm2022/softpak-components-spx-app-expiry.mjs +4 -4
- package/fesm2022/softpak-components-spx-button.mjs +4 -4
- package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-capitalize.mjs +3 -3
- package/fesm2022/softpak-components-spx-card.mjs +16 -16
- package/fesm2022/softpak-components-spx-change-details.mjs +4 -4
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-channel-selection.mjs +15 -15
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +4 -4
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-confirm.mjs +10 -10
- package/fesm2022/softpak-components-spx-form-section.mjs +5 -5
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +8 -8
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +51 -51
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +12 -12
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +6 -8
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-pagination.mjs +4 -4
- package/fesm2022/softpak-components-spx-patch.mjs +4 -4
- package/fesm2022/softpak-components-spx-pipes.mjs +3 -3
- package/fesm2022/softpak-components-spx-progress-bar.mjs +4 -4
- package/fesm2022/softpak-components-spx-spinner.mjs +4 -4
- package/fesm2022/softpak-components-spx-stock-info.mjs +4 -4
- package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-suggestion.mjs +4 -4
- package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-tabs.mjs +4 -4
- package/fesm2022/softpak-components-spx-toaster.mjs +4 -4
- package/fesm2022/softpak-components-spx-toggle.mjs +4 -4
- package/fesm2022/softpak-components-spx-update.mjs +12 -12
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation-messages.mjs +4 -4
- package/fesm2022/softpak-components-spx-validation-messages.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +4 -4
- package/fesm2022/softpak-components-spx-welcome.mjs +3 -3
- package/fesm2022/softpak-components-spx-welcome.mjs.map +1 -1
- package/package.json +58 -58
- package/tailwind.css +1 -1
- /package/{spx-404-page/index.d.ts → types/softpak-components-spx-404-page.d.ts} +0 -0
- /package/{spx-alert/index.d.ts → types/softpak-components-spx-alert.d.ts} +0 -0
- /package/{spx-app-configuration/index.d.ts → types/softpak-components-spx-app-configuration.d.ts} +0 -0
- /package/{spx-app-expiry/index.d.ts → types/softpak-components-spx-app-expiry.d.ts} +0 -0
- /package/{spx-button/index.d.ts → types/softpak-components-spx-button.d.ts} +0 -0
- /package/{spx-capitalize/index.d.ts → types/softpak-components-spx-capitalize.d.ts} +0 -0
- /package/{spx-card/index.d.ts → types/softpak-components-spx-card.d.ts} +0 -0
- /package/{spx-change-details/index.d.ts → types/softpak-components-spx-change-details.d.ts} +0 -0
- /package/{spx-channel-selection/index.d.ts → types/softpak-components-spx-channel-selection.d.ts} +0 -0
- /package/{spx-check-digit/index.d.ts → types/softpak-components-spx-check-digit.d.ts} +0 -0
- /package/{spx-confirm/index.d.ts → types/softpak-components-spx-confirm.d.ts} +0 -0
- /package/{spx-form-section/index.d.ts → types/softpak-components-spx-form-section.d.ts} +0 -0
- /package/{spx-form-view/index.d.ts → types/softpak-components-spx-form-view.d.ts} +0 -0
- /package/{spx-helpers/index.d.ts → types/softpak-components-spx-helpers.d.ts} +0 -0
- /package/{spx-inputs/index.d.ts → types/softpak-components-spx-inputs.d.ts} +0 -0
- /package/{spx-navigation/index.d.ts → types/softpak-components-spx-navigation.d.ts} +0 -0
- /package/{spx-number-check/index.d.ts → types/softpak-components-spx-number-check.d.ts} +0 -0
- /package/{spx-pagination/index.d.ts → types/softpak-components-spx-pagination.d.ts} +0 -0
- /package/{spx-patch/index.d.ts → types/softpak-components-spx-patch.d.ts} +0 -0
- /package/{spx-pipes/index.d.ts → types/softpak-components-spx-pipes.d.ts} +0 -0
- /package/{spx-progress-bar/index.d.ts → types/softpak-components-spx-progress-bar.d.ts} +0 -0
- /package/{spx-redux/index.d.ts → types/softpak-components-spx-redux.d.ts} +0 -0
- /package/{spx-spinner/index.d.ts → types/softpak-components-spx-spinner.d.ts} +0 -0
- /package/{spx-stock-info/index.d.ts → types/softpak-components-spx-stock-info.d.ts} +0 -0
- /package/{spx-storage/index.d.ts → types/softpak-components-spx-storage.d.ts} +0 -0
- /package/{spx-suggestion/index.d.ts → types/softpak-components-spx-suggestion.d.ts} +0 -0
- /package/{spx-tabs/index.d.ts → types/softpak-components-spx-tabs.d.ts} +0 -0
- /package/{spx-toaster/index.d.ts → types/softpak-components-spx-toaster.d.ts} +0 -0
- /package/{spx-toggle/index.d.ts → types/softpak-components-spx-toggle.d.ts} +0 -0
- /package/{spx-translate/index.d.ts → types/softpak-components-spx-translate.d.ts} +0 -0
- /package/{spx-update/index.d.ts → types/softpak-components-spx-update.d.ts} +0 -0
- /package/{spx-validation-messages/index.d.ts → types/softpak-components-spx-validation-messages.d.ts} +0 -0
- /package/{spx-validation/index.d.ts → types/softpak-components-spx-validation.d.ts} +0 -0
- /package/{spx-welcome/index.d.ts → types/softpak-components-spx-welcome.d.ts} +0 -0
- /package/{index.d.ts → types/softpak-components.d.ts} +0 -0
|
@@ -23,10 +23,10 @@ class Spx404PageComponent {
|
|
|
23
23
|
this.spxTextPageNotFoundDescription = spxTextPageNotFoundDescription;
|
|
24
24
|
this.spxTextGoHome = spxTextGoHome;
|
|
25
25
|
}
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
27
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: Spx404PageComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.NavController }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.8", type: Spx404PageComponent, isStandalone: true, selector: "spx-404-page", ngImport: i0, template: "<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ spxText404PageNotFound | translate | capitalize }}\n </ion-title>\n <ion-buttons slot=\"end\">\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"flex items-center justify-center min-h-screen bg-white dark:bg-gray-900 ion-padding\">\n <div class=\"text-center p-6\">\n <h1 class=\"text-7xl font-bold text-indigo-600 dark:text-indigo-400\">404</h1>\n <h2 class=\"mt-4 text-2xl font-semibold text-gray-800 dark:text-white\"> {{ spxTextPageNotFound | translate | capitalize }} </h2>\n <p class=\"mt-2 text-gray-600 dark:text-gray-400\">\n {{ spxTextPageNotFoundDescription | translate | capitalize }}\n </p>\n <div class=\"py-2\">\n <spx-button (spxClick)=\"goHome()\">\n {{ spxTextGoHome | translate | capitalize }}\n </spx-button>\n </div>\n </div>\n</ion-content>", dependencies: [{ kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType", "spxName"], outputs: ["spxClick"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: Spx404PageComponent, decorators: [{
|
|
30
30
|
type: Component,
|
|
31
31
|
args: [{ selector: 'spx-404-page', imports: [IonButtons,
|
|
32
32
|
IonContent,
|
|
@@ -57,16 +57,16 @@ class SpxAlertComponent {
|
|
|
57
57
|
this.spxClose.emit();
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
61
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SpxAlertComponent, isStandalone: true, selector: "spx-alert", inputs: { spxAutoclose: { classPropertyName: "spxAutoclose", publicName: "spxAutoclose", isSignal: true, isRequired: false, transformFunction: null }, spxCloseable: { classPropertyName: "spxCloseable", publicName: "spxCloseable", isSignal: true, isRequired: false, transformFunction: null }, spxHideTitle: { classPropertyName: "spxHideTitle", publicName: "spxHideTitle", isSignal: true, isRequired: false, transformFunction: null }, spxTitle: { classPropertyName: "spxTitle", publicName: "spxTitle", isSignal: true, isRequired: false, transformFunction: null }, spxMarginTop: { classPropertyName: "spxMarginTop", publicName: "spxMarginTop", isSignal: true, isRequired: false, transformFunction: null }, spxSeverity: { classPropertyName: "spxSeverity", publicName: "spxSeverity", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { spxClose: "spxClose", spxTitle: "spxTitleChange" }, ngImport: i0, template: "<div class=\"flex items-center gap-3 border-t-4 rounded px-4 py-3 shadow-md\"\n [class.cursor-pointer]=\"this.spxCloseable()\"\n [class.bg-red-100]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.border-red-500]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.text-red-900]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.bg-cyan-100]=\"this.spxSeverity() | isSeverity: SpxSeverity.info\"\n [class.border-cyan-500]=\"this.spxSeverity() | isSeverity: SpxSeverity.info\"\n [class.text-cyan-900]=\"this.spxSeverity() | isSeverity: SpxSeverity.info\"\n [class.bg-lime-100]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.border-lime-500]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.text-lime-900]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.bg-amber-100]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.border-amber-500]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.text-amber-900]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.focus:ring-red-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.error)\"\n [class.hover:bg-red-200]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.error)\"\n [class.over:border-red-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.error)\"\n [class.focus:ring-cyan-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.hover:bg-cyan-200]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.over:border-cyan-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.focus:ring-lime-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.success)\"\n [class.hover:bg-lime-200]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.success)\"\n [class.over:border-lime-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.success)\"\n [class.focus:ring-amber-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.warning)\"\n [class.hover:bg-amber-200]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.warning)\"\n [class.over:border-amber-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.warning)\"\n (click)=\"onClose()\">\n @if ((this.spxSeverity() | isSeverity: SpxSeverity.info)) {\n <fa-icon\n [icon]=\"faCircleInfo\" class=\"block text-xl text-cyan-600\"></fa-icon>\n }\n @if (this.spxSeverity() | isSeverity: SpxSeverity.error) {\n <fa-icon\n [icon]=\"faTriangleExclamation\" class=\"block text-xl text-red-600\"></fa-icon>\n }\n @if (this.spxSeverity() | isSeverity: SpxSeverity.success) {\n <fa-icon\n [icon]=\"faCheck\" class=\"block text-xl text-lime-600\"></fa-icon>\n }\n @if (this.spxSeverity() | isSeverity: SpxSeverity.warning) {\n <fa-icon\n [icon]=\"faTriangleExclamation\" class=\"block text-xl text-amber-600\"></fa-icon>\n }\n <div class=\"grow\">\n @if (this.spxTitle() && !this.spxHideTitle()) {\n <p class=\"font-bold\">{{this.spxTitle()}}</p>\n }\n <p class=\"text-sm\">\n <ng-content></ng-content>\n </p>\n </div>\n @if (this.spxCloseable()) {\n <fa-icon\n [icon]=\"faTimes\" class=\"block text-xl\"></fa-icon>\n }\n </div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.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: "pipe", type: IsSeverityPipe, name: "isSeverity" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxAlertComponent, decorators: [{
|
|
64
64
|
type: Component,
|
|
65
65
|
args: [{ selector: 'spx-alert', imports: [
|
|
66
66
|
FontAwesomeModule,
|
|
67
67
|
IsSeverityPipe
|
|
68
68
|
], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div class=\"flex items-center gap-3 border-t-4 rounded px-4 py-3 shadow-md\"\n [class.cursor-pointer]=\"this.spxCloseable()\"\n [class.bg-red-100]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.border-red-500]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.text-red-900]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.bg-cyan-100]=\"this.spxSeverity() | isSeverity: SpxSeverity.info\"\n [class.border-cyan-500]=\"this.spxSeverity() | isSeverity: SpxSeverity.info\"\n [class.text-cyan-900]=\"this.spxSeverity() | isSeverity: SpxSeverity.info\"\n [class.bg-lime-100]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.border-lime-500]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.text-lime-900]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.bg-amber-100]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.border-amber-500]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.text-amber-900]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.focus:ring-red-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.error)\"\n [class.hover:bg-red-200]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.error)\"\n [class.over:border-red-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.error)\"\n [class.focus:ring-cyan-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.hover:bg-cyan-200]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.over:border-cyan-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.focus:ring-lime-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.success)\"\n [class.hover:bg-lime-200]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.success)\"\n [class.over:border-lime-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.success)\"\n [class.focus:ring-amber-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.warning)\"\n [class.hover:bg-amber-200]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.warning)\"\n [class.over:border-amber-600]=\"this.spxCloseable() && (this.spxSeverity() | isSeverity: SpxSeverity.warning)\"\n (click)=\"onClose()\">\n @if ((this.spxSeverity() | isSeverity: SpxSeverity.info)) {\n <fa-icon\n [icon]=\"faCircleInfo\" class=\"block text-xl text-cyan-600\"></fa-icon>\n }\n @if (this.spxSeverity() | isSeverity: SpxSeverity.error) {\n <fa-icon\n [icon]=\"faTriangleExclamation\" class=\"block text-xl text-red-600\"></fa-icon>\n }\n @if (this.spxSeverity() | isSeverity: SpxSeverity.success) {\n <fa-icon\n [icon]=\"faCheck\" class=\"block text-xl text-lime-600\"></fa-icon>\n }\n @if (this.spxSeverity() | isSeverity: SpxSeverity.warning) {\n <fa-icon\n [icon]=\"faTriangleExclamation\" class=\"block text-xl text-amber-600\"></fa-icon>\n }\n <div class=\"grow\">\n @if (this.spxTitle() && !this.spxHideTitle()) {\n <p class=\"font-bold\">{{this.spxTitle()}}</p>\n }\n <p class=\"text-sm\">\n <ng-content></ng-content>\n </p>\n </div>\n @if (this.spxCloseable()) {\n <fa-icon\n [icon]=\"faTimes\" class=\"block text-xl\"></fa-icon>\n }\n </div>", styles: [":host{display:block}\n"] }]
|
|
69
|
-
}] });
|
|
69
|
+
}], propDecorators: { spxClose: [{ type: i0.Output, args: ["spxClose"] }], spxAutoclose: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxAutoclose", required: false }] }], spxCloseable: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxCloseable", required: false }] }], spxHideTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxHideTitle", required: false }] }], spxTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxTitle", required: false }] }, { type: i0.Output, args: ["spxTitleChange"] }], spxMarginTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxMarginTop", required: false }] }], spxSeverity: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxSeverity", required: false }] }] } });
|
|
70
70
|
|
|
71
71
|
class SpxAlertI {
|
|
72
72
|
}
|
|
@@ -39,13 +39,13 @@ class SpxAppExpiryComponent {
|
|
|
39
39
|
this.warning.set(spxCheckExpiryWarning(spxVersion, spxExpiry) && !this.finalWarning && !this.expired());
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
43
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxAppExpiryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
43
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SpxAppExpiryComponent, isStandalone: true, selector: "spx-app-expiry", inputs: { txtContactHelpdeskOrSoftpak: { classPropertyName: "txtContactHelpdeskOrSoftpak", publicName: "txtContactHelpdeskOrSoftpak", isSignal: true, isRequired: true, transformFunction: null }, txtExpired: { classPropertyName: "txtExpired", publicName: "txtExpired", isSignal: true, isRequired: true, transformFunction: null }, txtLastReminder: { classPropertyName: "txtLastReminder", publicName: "txtLastReminder", isSignal: true, isRequired: true, transformFunction: null }, txtPleaseOpenTheAppStore: { classPropertyName: "txtPleaseOpenTheAppStore", publicName: "txtPleaseOpenTheAppStore", isSignal: true, isRequired: true, transformFunction: null }, txtPleaseUpdate: { classPropertyName: "txtPleaseUpdate", publicName: "txtPleaseUpdate", isSignal: true, isRequired: true, transformFunction: null }, txtThisVersionWillExpireSoon: { classPropertyName: "txtThisVersionWillExpireSoon", publicName: "txtThisVersionWillExpireSoon", isSignal: true, isRequired: true, transformFunction: null }, txtUpdateAvailable: { classPropertyName: "txtUpdateAvailable", publicName: "txtUpdateAvailable", isSignal: true, isRequired: true, transformFunction: null }, txtUpdateTheAppToTheLatestVersion: { classPropertyName: "txtUpdateTheAppToTheLatestVersion", publicName: "txtUpdateTheAppToTheLatestVersion", isSignal: true, isRequired: true, transformFunction: null }, spxExpiry: { classPropertyName: "spxExpiry", publicName: "spxExpiry", isSignal: true, isRequired: true, transformFunction: null }, spxVersion: { classPropertyName: "spxVersion", publicName: "spxVersion", isSignal: true, isRequired: true, transformFunction: null } }, usesOnChanges: true, ngImport: i0, template: "@if (warning() || finalWarning() || expired()) {\n <div class=\"m-3\">\n <div\n class=\"p-3 font-bold text-white rounded-t text-xl\"\n [class.bg-lime-600]=\"warning()\"\n [class.bg-red-600]=\"expired()\"\n [class.bg-amber-600]=\"finalWarning()\">\n @if (warning()) {\n {{ txtUpdateAvailable() }}\n }\n @if (finalWarning()) {\n {{ txtLastReminder() }}\n }\n @if (expired()) {\n {{ txtExpired() }}\n }\n </div>\n <div\n class=\"bg-amber-50 p-3 text-black rounded-b mb-3\">\n <div>{{ txtPleaseOpenTheAppStore() }}.</div>\n <div>{{ txtUpdateTheAppToTheLatestVersion() }}.</div>\n <div>{{ txtContactHelpdeskOrSoftpak() }}.</div>\n @if (finalWarning()) {\n <div>{{ txtThisVersionWillExpireSoon() }}.</div>\n }\n </div>\n </div>\n}", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
44
44
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxAppExpiryComponent, decorators: [{
|
|
46
46
|
type: Component,
|
|
47
47
|
args: [{ selector: 'spx-app-expiry', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "@if (warning() || finalWarning() || expired()) {\n <div class=\"m-3\">\n <div\n class=\"p-3 font-bold text-white rounded-t text-xl\"\n [class.bg-lime-600]=\"warning()\"\n [class.bg-red-600]=\"expired()\"\n [class.bg-amber-600]=\"finalWarning()\">\n @if (warning()) {\n {{ txtUpdateAvailable() }}\n }\n @if (finalWarning()) {\n {{ txtLastReminder() }}\n }\n @if (expired()) {\n {{ txtExpired() }}\n }\n </div>\n <div\n class=\"bg-amber-50 p-3 text-black rounded-b mb-3\">\n <div>{{ txtPleaseOpenTheAppStore() }}.</div>\n <div>{{ txtUpdateTheAppToTheLatestVersion() }}.</div>\n <div>{{ txtContactHelpdeskOrSoftpak() }}.</div>\n @if (finalWarning()) {\n <div>{{ txtThisVersionWillExpireSoon() }}.</div>\n }\n </div>\n </div>\n}" }]
|
|
48
|
-
}] });
|
|
48
|
+
}], propDecorators: { txtContactHelpdeskOrSoftpak: [{ type: i0.Input, args: [{ isSignal: true, alias: "txtContactHelpdeskOrSoftpak", required: true }] }], txtExpired: [{ type: i0.Input, args: [{ isSignal: true, alias: "txtExpired", required: true }] }], txtLastReminder: [{ type: i0.Input, args: [{ isSignal: true, alias: "txtLastReminder", required: true }] }], txtPleaseOpenTheAppStore: [{ type: i0.Input, args: [{ isSignal: true, alias: "txtPleaseOpenTheAppStore", required: true }] }], txtPleaseUpdate: [{ type: i0.Input, args: [{ isSignal: true, alias: "txtPleaseUpdate", required: true }] }], txtThisVersionWillExpireSoon: [{ type: i0.Input, args: [{ isSignal: true, alias: "txtThisVersionWillExpireSoon", required: true }] }], txtUpdateAvailable: [{ type: i0.Input, args: [{ isSignal: true, alias: "txtUpdateAvailable", required: true }] }], txtUpdateTheAppToTheLatestVersion: [{ type: i0.Input, args: [{ isSignal: true, alias: "txtUpdateTheAppToTheLatestVersion", required: true }] }], spxExpiry: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxExpiry", required: true }] }], spxVersion: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxVersion", required: true }] }] } });
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Generated bundle index. Do not edit.
|
|
@@ -85,17 +85,17 @@ class SpxButtonComponent {
|
|
|
85
85
|
// Silence if no haptics
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
89
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
88
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
89
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: SpxButtonComponent, isStandalone: true, selector: "spx-button", inputs: { spxDisabled: { classPropertyName: "spxDisabled", publicName: "spxDisabled", isSignal: true, isRequired: false, transformFunction: null }, spxClass: { classPropertyName: "spxClass", publicName: "spxClass", isSignal: true, isRequired: false, transformFunction: null }, spxClassObject: { classPropertyName: "spxClassObject", publicName: "spxClassObject", isSignal: true, isRequired: false, transformFunction: null }, spxForm: { classPropertyName: "spxForm", publicName: "spxForm", isSignal: true, isRequired: false, transformFunction: null }, spxFullHeight: { classPropertyName: "spxFullHeight", publicName: "spxFullHeight", isSignal: true, isRequired: false, transformFunction: null }, spxFullWidth: { classPropertyName: "spxFullWidth", publicName: "spxFullWidth", isSignal: true, isRequired: false, transformFunction: null }, spxSeverity: { classPropertyName: "spxSeverity", publicName: "spxSeverity", isSignal: true, isRequired: false, transformFunction: null }, spxSize: { classPropertyName: "spxSize", publicName: "spxSize", isSignal: true, isRequired: false, transformFunction: null }, spxTabIndex: { classPropertyName: "spxTabIndex", publicName: "spxTabIndex", isSignal: true, isRequired: false, transformFunction: null }, spxType: { classPropertyName: "spxType", publicName: "spxType", isSignal: true, isRequired: false, transformFunction: null }, spxName: { classPropertyName: "spxName", publicName: "spxName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { spxClick: "spxClick" }, host: { listeners: { "document:pointerup": "onDocumentPointerUp($event)" }, properties: { "class.block": "spxFullWidth()", "class.h-full": "spxFullHeight()", "class.w-full": "spxFullWidth()" } }, viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["buttonRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\n #buttonRef\n class=\"border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r\"\n [class.h-full]=\"this.spxFullHeight()\"\n [class.w-full]=\"this.spxFullWidth()\"\n [class.bg-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.focus:ring-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.from-red-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.to-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.focus:ring-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.from-lime-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.to-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.focus:ring-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.from-amber-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.to-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.focus:ring-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.py-2]=\"!this.spxSize() || this.spxSize() === 'lg'\"\n [class.py-4]=\"!this.spxSize() || this.spxSize() === 'xl'\"\n [class.text-xl]=\"this.spxSize() === 'xl'\"\n [class.text-lg]=\"this.spxSize() === 'lg'\"\n [class.cursor-pointer]=\"!this.spxDisabled()\"\n [class.cursor-not-allowed]=\"this.spxDisabled()\"\n [class.opacity-50]=\"this.spxDisabled()\"\n [class.focus:ring-0]=\"this.spxDisabled()\"\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\"\n [attr.disabled]=\"this.spxDisabled() ? this.spxDisabled() : undefined\"\n [attr.form]=\"this.spxForm() ? this.spxForm() : undefined\"\n [attr.name]=\"this.mappedName()\"\n [attr.tabindex]=\"this.spxTabIndex() ? this.spxTabIndex() : undefined\"\n [attr.type]=\"this.spxType() ? this.spxType() : undefined\"\n (pointerdown)=\"this.handlePress()\"\n (click)=\"this.handleClick()\"\n part=\"button\">\n <ng-content></ng-content>\n </button>", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: IsSeverityPipe, name: "isSeverity" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
90
90
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxButtonComponent, decorators: [{
|
|
92
92
|
type: Component,
|
|
93
93
|
args: [{ selector: 'spx-button', imports: [NgClass, IsSeverityPipe], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
94
94
|
'[class.block]': 'spxFullWidth()',
|
|
95
95
|
'[class.h-full]': 'spxFullHeight()',
|
|
96
96
|
'[class.w-full]': 'spxFullWidth()',
|
|
97
97
|
}, standalone: true, template: "<button\n #buttonRef\n class=\"border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r\"\n [class.h-full]=\"this.spxFullHeight()\"\n [class.w-full]=\"this.spxFullWidth()\"\n [class.bg-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.focus:ring-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.from-red-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.to-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.focus:ring-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.from-lime-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.to-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.focus:ring-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.from-amber-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.to-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.focus:ring-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.py-2]=\"!this.spxSize() || this.spxSize() === 'lg'\"\n [class.py-4]=\"!this.spxSize() || this.spxSize() === 'xl'\"\n [class.text-xl]=\"this.spxSize() === 'xl'\"\n [class.text-lg]=\"this.spxSize() === 'lg'\"\n [class.cursor-pointer]=\"!this.spxDisabled()\"\n [class.cursor-not-allowed]=\"this.spxDisabled()\"\n [class.opacity-50]=\"this.spxDisabled()\"\n [class.focus:ring-0]=\"this.spxDisabled()\"\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\"\n [attr.disabled]=\"this.spxDisabled() ? this.spxDisabled() : undefined\"\n [attr.form]=\"this.spxForm() ? this.spxForm() : undefined\"\n [attr.name]=\"this.mappedName()\"\n [attr.tabindex]=\"this.spxTabIndex() ? this.spxTabIndex() : undefined\"\n [attr.type]=\"this.spxType() ? this.spxType() : undefined\"\n (pointerdown)=\"this.handlePress()\"\n (click)=\"this.handleClick()\"\n part=\"button\">\n <ng-content></ng-content>\n </button>" }]
|
|
98
|
-
}], propDecorators: { onDocumentPointerUp: [{
|
|
98
|
+
}], propDecorators: { spxDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxDisabled", required: false }] }], spxClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxClass", required: false }] }], spxClassObject: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxClassObject", required: false }] }], spxForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxForm", required: false }] }], spxFullHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxFullHeight", required: false }] }], spxFullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxFullWidth", required: false }] }], spxSeverity: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxSeverity", required: false }] }], spxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxSize", required: false }] }], spxTabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxTabIndex", required: false }] }], spxType: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxType", required: false }] }], spxName: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxName", required: false }] }], spxClick: [{ type: i0.Output, args: ["spxClick"] }], buttonRef: [{ type: i0.ViewChild, args: ['buttonRef', { isSignal: true }] }], onDocumentPointerUp: [{
|
|
99
99
|
type: HostListener,
|
|
100
100
|
args: ['document:pointerup', ['$event']]
|
|
101
101
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-button.mjs","sources":["../../../../projects/softpak/components/spx-button/spx-button.component.ts","../../../../projects/softpak/components/spx-button/spx-button.component.html","../../../../projects/softpak/components/spx-button/softpak-components-spx-button.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostListener,\n computed,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { Haptics, ImpactStyle } from '@capacitor/haptics';\n\nimport { IsSeverityPipe } from '@softpak/components/spx-pipes';\nimport { NgClass } from '@angular/common';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-button',\n imports: [NgClass, IsSeverityPipe],\n templateUrl: './spx-button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.block]': 'spxFullWidth()',\n '[class.h-full]': 'spxFullHeight()',\n '[class.w-full]': 'spxFullWidth()',\n },\n standalone: true,\n})\nexport class SpxButtonComponent {\n readonly spxDisabled = input(false);\n readonly spxClass = input<string>();\n readonly spxClassObject = input<object>();\n readonly spxForm = input<string>();\n readonly spxFullHeight = input<boolean>();\n readonly spxFullWidth = input<boolean>();\n readonly spxSeverity = input<SpxSeverityEnum | undefined>(SpxSeverityEnum.info);\n readonly spxSize = input<'lg' | 'xl'>('lg');\n readonly spxTabIndex = input<number>();\n readonly spxType = input<'button' | 'submit'>('submit');\n protected mappedName = computed(() => this.spxName() ?? undefined);\n readonly spxName = input<string>();\n spxClick = output();\n buttonRef = viewChild<ElementRef<HTMLInputElement>>('buttonRef');\n SpxSeverity = SpxSeverityEnum;\n\n // For haptics\n private isPressing = false;\n private lastHaptic = 0;\n private hapticCooldown = 120;\n //\n\n hasShadowDom = (el: HTMLElement) => {\n return !!el.shadowRoot && !!(el as any).attachShadow;\n };\n handleClick = () => {\n if (!this.spxDisabled()) {\n this.spxClick.emit();\n }\n };\n\n spxSetFocus(): void {\n this.buttonRef()?.nativeElement?.focus();\n }\n\n // For haptics\n handlePress = async () => {\n if (this.spxDisabled()) {\n return;\n }\n this.isPressing = true;\n await this.safeHaptic(ImpactStyle.Medium);\n };\n\n // global pointerup: check of de release binnen of buiten de knop is\n @HostListener('document:pointerup', ['$event'])\n onDocumentPointerUp = async (event: PointerEvent) => {\n if (!this.isPressing || this.spxDisabled()) {\n return;\n }\n this.isPressing = false;\n\n const btn = this.buttonRef()?.nativeElement;\n if (!btn) {\n return;\n }\n\n const inside = btn.contains(event.target as Node);\n\n try {\n if (inside) {\n // OK haptic\n await this.safeHaptic(ImpactStyle.Heavy);\n } else {\n // Cancel haptic\n await this.safeHaptic(ImpactStyle.Light);\n }\n } catch {\n // Silence if no haptics\n }\n };\n\n private async safeHaptic(style: ImpactStyle) {\n const now = performance.now();\n if (now - this.lastHaptic < this.hapticCooldown) {\n return;\n }\n this.lastHaptic = now;\n\n try {\n // await Haptics.impact({ style });\n } catch {\n // Silence if no haptics\n }\n }\n // End haptics\n}\n","<button\n #buttonRef\n class=\"border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r\"\n [class.h-full]=\"this.spxFullHeight()\"\n [class.w-full]=\"this.spxFullWidth()\"\n [class.bg-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.focus:ring-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.from-red-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.to-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.focus:ring-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.from-lime-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.to-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.focus:ring-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.from-amber-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.to-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.focus:ring-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.py-2]=\"!this.spxSize() || this.spxSize() === 'lg'\"\n [class.py-4]=\"!this.spxSize() || this.spxSize() === 'xl'\"\n [class.text-xl]=\"this.spxSize() === 'xl'\"\n [class.text-lg]=\"this.spxSize() === 'lg'\"\n [class.cursor-pointer]=\"!this.spxDisabled()\"\n [class.cursor-not-allowed]=\"this.spxDisabled()\"\n [class.opacity-50]=\"this.spxDisabled()\"\n [class.focus:ring-0]=\"this.spxDisabled()\"\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\"\n [attr.disabled]=\"this.spxDisabled() ? this.spxDisabled() : undefined\"\n [attr.form]=\"this.spxForm() ? this.spxForm() : undefined\"\n [attr.name]=\"this.mappedName()\"\n [attr.tabindex]=\"this.spxTabIndex() ? this.spxTabIndex() : undefined\"\n [attr.type]=\"this.spxType() ? this.spxType() : undefined\"\n (pointerdown)=\"this.handlePress()\"\n (click)=\"this.handleClick()\"\n part=\"button\">\n <ng-content></ng-content>\n </button>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA4Ba,kBAAkB,CAAA;AAZ/B,IAAA,WAAA,GAAA;AAaW,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,KAAK,uDAAC;QAC1B,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU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,EAAA,6BAAA,EAAA,EAAA,UAAA,EAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,WAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,WAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5B/B,4qEAkCW,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDhBC,OAAO,+EAAE,cAAc,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAUtB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAZ9B,SAAS;+BACE,YAAY,EAAA,OAAA,EACb,CAAC,OAAO,EAAE,cAAc,CAAC,EAAA,eAAA,EAEjB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,eAAe,EAAE,gBAAgB;AACjC,wBAAA,gBAAgB,EAAE,iBAAiB;AACnC,wBAAA,gBAAgB,EAAE,gBAAgB;AACnC,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,4qEAAA,EAAA;8BAiDhB,mBAAmB,EAAA,CAAA;sBADlB,YAAY;uBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;;AE1EhD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-button.mjs","sources":["../../../../projects/softpak/components/spx-button/spx-button.component.ts","../../../../projects/softpak/components/spx-button/spx-button.component.html","../../../../projects/softpak/components/spx-button/softpak-components-spx-button.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostListener,\n computed,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { Haptics, ImpactStyle } from '@capacitor/haptics';\n\nimport { IsSeverityPipe } from '@softpak/components/spx-pipes';\nimport { NgClass } from '@angular/common';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-button',\n imports: [NgClass, IsSeverityPipe],\n templateUrl: './spx-button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.block]': 'spxFullWidth()',\n '[class.h-full]': 'spxFullHeight()',\n '[class.w-full]': 'spxFullWidth()',\n },\n standalone: true,\n})\nexport class SpxButtonComponent {\n readonly spxDisabled = input(false);\n readonly spxClass = input<string>();\n readonly spxClassObject = input<object>();\n readonly spxForm = input<string>();\n readonly spxFullHeight = input<boolean>();\n readonly spxFullWidth = input<boolean>();\n readonly spxSeverity = input<SpxSeverityEnum | undefined>(SpxSeverityEnum.info);\n readonly spxSize = input<'lg' | 'xl'>('lg');\n readonly spxTabIndex = input<number>();\n readonly spxType = input<'button' | 'submit'>('submit');\n protected mappedName = computed(() => this.spxName() ?? undefined);\n readonly spxName = input<string>();\n spxClick = output();\n buttonRef = viewChild<ElementRef<HTMLInputElement>>('buttonRef');\n SpxSeverity = SpxSeverityEnum;\n\n // For haptics\n private isPressing = false;\n private lastHaptic = 0;\n private hapticCooldown = 120;\n //\n\n hasShadowDom = (el: HTMLElement) => {\n return !!el.shadowRoot && !!(el as any).attachShadow;\n };\n handleClick = () => {\n if (!this.spxDisabled()) {\n this.spxClick.emit();\n }\n };\n\n spxSetFocus(): void {\n this.buttonRef()?.nativeElement?.focus();\n }\n\n // For haptics\n handlePress = async () => {\n if (this.spxDisabled()) {\n return;\n }\n this.isPressing = true;\n await this.safeHaptic(ImpactStyle.Medium);\n };\n\n // global pointerup: check of de release binnen of buiten de knop is\n @HostListener('document:pointerup', ['$event'])\n onDocumentPointerUp = async (event: PointerEvent) => {\n if (!this.isPressing || this.spxDisabled()) {\n return;\n }\n this.isPressing = false;\n\n const btn = this.buttonRef()?.nativeElement;\n if (!btn) {\n return;\n }\n\n const inside = btn.contains(event.target as Node);\n\n try {\n if (inside) {\n // OK haptic\n await this.safeHaptic(ImpactStyle.Heavy);\n } else {\n // Cancel haptic\n await this.safeHaptic(ImpactStyle.Light);\n }\n } catch {\n // Silence if no haptics\n }\n };\n\n private async safeHaptic(style: ImpactStyle) {\n const now = performance.now();\n if (now - this.lastHaptic < this.hapticCooldown) {\n return;\n }\n this.lastHaptic = now;\n\n try {\n // await Haptics.impact({ style });\n } catch {\n // Silence if no haptics\n }\n }\n // End haptics\n}\n","<button\n #buttonRef\n class=\"border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r\"\n [class.h-full]=\"this.spxFullHeight()\"\n [class.w-full]=\"this.spxFullWidth()\"\n [class.bg-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.focus:ring-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.from-red-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.to-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.focus:ring-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.from-lime-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.to-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.focus:ring-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.from-amber-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.to-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.focus:ring-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.py-2]=\"!this.spxSize() || this.spxSize() === 'lg'\"\n [class.py-4]=\"!this.spxSize() || this.spxSize() === 'xl'\"\n [class.text-xl]=\"this.spxSize() === 'xl'\"\n [class.text-lg]=\"this.spxSize() === 'lg'\"\n [class.cursor-pointer]=\"!this.spxDisabled()\"\n [class.cursor-not-allowed]=\"this.spxDisabled()\"\n [class.opacity-50]=\"this.spxDisabled()\"\n [class.focus:ring-0]=\"this.spxDisabled()\"\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\"\n [attr.disabled]=\"this.spxDisabled() ? this.spxDisabled() : undefined\"\n [attr.form]=\"this.spxForm() ? this.spxForm() : undefined\"\n [attr.name]=\"this.mappedName()\"\n [attr.tabindex]=\"this.spxTabIndex() ? this.spxTabIndex() : undefined\"\n [attr.type]=\"this.spxType() ? this.spxType() : undefined\"\n (pointerdown)=\"this.handlePress()\"\n (click)=\"this.handleClick()\"\n part=\"button\">\n <ng-content></ng-content>\n </button>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA4Ba,kBAAkB,CAAA;AAZ/B,IAAA,WAAA,GAAA;AAaW,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,KAAK,uDAAC;QAC1B,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;QAC1B,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;QAChC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;QACzB,IAAA,CAAA,aAAa,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,eAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAW;QAChC,IAAA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cAAc,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAUtB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAZ9B,SAAS;+BACE,YAAY,EAAA,OAAA,EACb,CAAC,OAAO,EAAE,cAAc,CAAC,EAAA,eAAA,EAEjB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,eAAe,EAAE,gBAAgB;AACjC,wBAAA,gBAAgB,EAAE,iBAAiB;AACnC,wBAAA,gBAAgB,EAAE,gBAAgB;AACnC,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,4qEAAA,EAAA;osCAgBoC,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,EAAA,CAAA;sBAgC9D,YAAY;uBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;;AE1EhD;;AAEG;;;;"}
|
|
@@ -8,10 +8,10 @@ class SpxCapitalizePipe {
|
|
|
8
8
|
static transform(value, ..._args) {
|
|
9
9
|
return new SpxCapitalizePipe().transform(value, _args);
|
|
10
10
|
}
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
12
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: SpxCapitalizePipe, isStandalone: true, name: "capitalize" }); }
|
|
13
13
|
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxCapitalizePipe, decorators: [{
|
|
15
15
|
type: Pipe,
|
|
16
16
|
args: [{
|
|
17
17
|
name: 'capitalize',
|
|
@@ -20,13 +20,13 @@ class SpxCardComponent {
|
|
|
20
20
|
onClick() {
|
|
21
21
|
this.clicked.emit();
|
|
22
22
|
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SpxCardComponent, isStandalone: true, selector: "spx-card", inputs: { clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, hasContent: { classPropertyName: "hasContent", publicName: "hasContent", isSignal: true, isRequired: false, transformFunction: null }, onDetailPage: { classPropertyName: "onDetailPage", publicName: "onDetailPage", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, tableView: { classPropertyName: "tableView", publicName: "tableView", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button type=\"button\"\nclass=\"block w-full text-left rounded font-body items-stretch\"\n[class.flex]=\"tableView()\"\n[class.cursor-pointer]=\"clickable()\"\n[class.cursor-not-allowed]=\"!clickable()\"\n[class.focus:ring-2]=\"clickable()\"\n[class.focus:ring-offset-2]=\"clickable()\"\n[class.focus:ring-blue-500]=\"clickable()\"\n(click)=\"onClick()\"\n[tabIndex]=\"clickable() ? 0 : -1\">\n<div class=\"text-gray-900 opacity-90\" [class.w-96]=\"tableView()\">\n <ng-content select=\"[card-header]\"></ng-content>\n</div>\n<ng-content select=\"[card-content-top]\"></ng-content>\n@if (hasContent()) {\n <div class=\"bg-white dark:bg-gray-600 p-3\">\n <ng-content select=\"[card-content]\"></ng-content>\n </div>\n}\n<ng-content select=\"[card-content-bottom]\"></ng-content>\n<div class=\"bg-gray-50 dark:bg-gray-700 p-3 grow\" [class.rounded-b-lg]=\"!onDetailPage() && !tableView()\" [class.rounded-r-lg]=\"!onDetailPage() && tableView()\">\n <ng-content select=\"[card-lines]\"></ng-content>\n</div>\n</button>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxCardComponent, decorators: [{
|
|
27
27
|
type: Component,
|
|
28
28
|
args: [{ selector: 'spx-card', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button type=\"button\"\nclass=\"block w-full text-left rounded font-body items-stretch\"\n[class.flex]=\"tableView()\"\n[class.cursor-pointer]=\"clickable()\"\n[class.cursor-not-allowed]=\"!clickable()\"\n[class.focus:ring-2]=\"clickable()\"\n[class.focus:ring-offset-2]=\"clickable()\"\n[class.focus:ring-blue-500]=\"clickable()\"\n(click)=\"onClick()\"\n[tabIndex]=\"clickable() ? 0 : -1\">\n<div class=\"text-gray-900 opacity-90\" [class.w-96]=\"tableView()\">\n <ng-content select=\"[card-header]\"></ng-content>\n</div>\n<ng-content select=\"[card-content-top]\"></ng-content>\n@if (hasContent()) {\n <div class=\"bg-white dark:bg-gray-600 p-3\">\n <ng-content select=\"[card-content]\"></ng-content>\n </div>\n}\n<ng-content select=\"[card-content-bottom]\"></ng-content>\n<div class=\"bg-gray-50 dark:bg-gray-700 p-3 grow\" [class.rounded-b-lg]=\"!onDetailPage() && !tableView()\" [class.rounded-r-lg]=\"!onDetailPage() && tableView()\">\n <ng-content select=\"[card-lines]\"></ng-content>\n</div>\n</button>" }]
|
|
29
|
-
}], ctorParameters: () => [] });
|
|
29
|
+
}], ctorParameters: () => [], propDecorators: { clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], hasContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasContent", required: false }] }], onDetailPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "onDetailPage", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], tableView: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableView", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
|
|
30
30
|
|
|
31
31
|
class SpxCardItemComponent {
|
|
32
32
|
constructor() {
|
|
@@ -38,10 +38,10 @@ class SpxCardItemComponent {
|
|
|
38
38
|
this.spxIconSeverity = input(...(ngDevMode ? [undefined, { debugName: "spxIconSeverity" }] : []));
|
|
39
39
|
this.SpxSeverityEnum = SpxSeverityEnum;
|
|
40
40
|
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
42
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxCardItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SpxCardItemComponent, isStandalone: true, selector: "spx-card-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, spxLabel: { classPropertyName: "spxLabel", publicName: "spxLabel", isSignal: true, isRequired: true, transformFunction: null }, spxValue: { classPropertyName: "spxValue", publicName: "spxValue", isSignal: true, isRequired: false, transformFunction: null }, spxSeverity: { classPropertyName: "spxSeverity", publicName: "spxSeverity", isSignal: true, isRequired: false, transformFunction: null }, spxIconSeverity: { classPropertyName: "spxIconSeverity", publicName: "spxIconSeverity", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.h-full": "true" } }, ngImport: i0, template: "<div class='py-2 px-3 rounded h-full' [class.bg-slate-100]=\"!spxSeverity()\" [class.dark:bg-slate-600]=\"!spxSeverity()\"\n [class.text-black]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\"\n [class.text-white]=\"this.spxSeverity() | isSeverity: [SpxSeverityEnum.error, SpxSeverityEnum.success, SpxSeverityEnum.unknown, SpxSeverityEnum.info]\"\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\n <div class=\"font-small leading-normal\">{{ spxLabel() }}</div>\n <div class=\"flex gap-4 text-lg leading-normal py-1\">\n @if (icon()) {\n <div class=\"font-bold text-center leading-normal max-w-12 min-w-12\" [class.grow]=\"iconOnly()\">\n <div class=\"px-3 py-1 text-white rounded\" [class.bg-black]=\"!spxIconSeverity()\"\n [class.bg-red-700]=\"this.spxIconSeverity() | isSeverity: SpxSeverityEnum.error\"\n [class.bg-green-700]=\"this.spxIconSeverity() | isSeverity: SpxSeverityEnum.success\"\n [class.bg-blue-700]=\"this.spxIconSeverity() | isSeverity: SpxSeverityEnum.info\"\n [class.bg-gray-400]=\"this.spxIconSeverity() | isSeverity: SpxSeverityEnum.unknown\"\n [class.bg-amber-700]=\"this.spxIconSeverity() | isSeverity: SpxSeverityEnum.warning\">\n <fa-icon [icon]=\"icon()!\"></fa-icon>\n </div>\n </div>\n }\n <div class=\"grow font-bold\">\n @if (!iconOnly()) {\n <ng-content></ng-content>\n <div [innerHTML]=\"spxValue()\"></div>\n }\n </div>\n </div>\n</div>", dependencies: [{ kind: "component", type: 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: "pipe", type: IsSeverityPipe, name: "isSeverity" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
43
43
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxCardItemComponent, decorators: [{
|
|
45
45
|
type: Component,
|
|
46
46
|
args: [{ selector: 'spx-card-item', imports: [
|
|
47
47
|
FaIconComponent,
|
|
@@ -49,19 +49,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImpor
|
|
|
49
49
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
50
50
|
'[class.h-full]': 'true',
|
|
51
51
|
}, template: "<div class='py-2 px-3 rounded h-full' [class.bg-slate-100]=\"!spxSeverity()\" [class.dark:bg-slate-600]=\"!spxSeverity()\"\n [class.text-black]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\"\n [class.text-white]=\"this.spxSeverity() | isSeverity: [SpxSeverityEnum.error, SpxSeverityEnum.success, SpxSeverityEnum.unknown, SpxSeverityEnum.info]\"\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\n <div class=\"font-small leading-normal\">{{ spxLabel() }}</div>\n <div class=\"flex gap-4 text-lg leading-normal py-1\">\n @if (icon()) {\n <div class=\"font-bold text-center leading-normal max-w-12 min-w-12\" [class.grow]=\"iconOnly()\">\n <div class=\"px-3 py-1 text-white rounded\" [class.bg-black]=\"!spxIconSeverity()\"\n [class.bg-red-700]=\"this.spxIconSeverity() | isSeverity: SpxSeverityEnum.error\"\n [class.bg-green-700]=\"this.spxIconSeverity() | isSeverity: SpxSeverityEnum.success\"\n [class.bg-blue-700]=\"this.spxIconSeverity() | isSeverity: SpxSeverityEnum.info\"\n [class.bg-gray-400]=\"this.spxIconSeverity() | isSeverity: SpxSeverityEnum.unknown\"\n [class.bg-amber-700]=\"this.spxIconSeverity() | isSeverity: SpxSeverityEnum.warning\">\n <fa-icon [icon]=\"icon()!\"></fa-icon>\n </div>\n </div>\n }\n <div class=\"grow font-bold\">\n @if (!iconOnly()) {\n <ng-content></ng-content>\n <div [innerHTML]=\"spxValue()\"></div>\n }\n </div>\n </div>\n</div>" }]
|
|
52
|
-
}] });
|
|
52
|
+
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], spxLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxLabel", required: true }] }], spxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxValue", required: false }] }], spxSeverity: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxSeverity", required: false }] }], spxIconSeverity: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxIconSeverity", required: false }] }] } });
|
|
53
53
|
|
|
54
54
|
class SpxCardGridComponent {
|
|
55
55
|
constructor() {
|
|
56
56
|
this.minWidth2Columns = input(460, ...(ngDevMode ? [{ debugName: "minWidth2Columns" }] : []));
|
|
57
57
|
}
|
|
58
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
59
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxCardGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
59
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.8", type: SpxCardGridComponent, isStandalone: true, selector: "spx-card-grid", inputs: { minWidth2Columns: { classPropertyName: "minWidth2Columns", publicName: "minWidth2Columns", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class='grid gap-3 items-stretch'\n [class.min-[300px]:grid-cols-2]=\"minWidth2Columns() == 300\"\n [class.min-[320px]:grid-cols-2]=\"minWidth2Columns() == 320\"\n [class.min-[340px]:grid-cols-2]=\"minWidth2Columns() == 340\"\n [class.min-[360px]:grid-cols-2]=\"minWidth2Columns() == 360\"\n [class.min-[380px]:grid-cols-2]=\"minWidth2Columns() == 380\"\n [class.min-[400px]:grid-cols-2]=\"minWidth2Columns() == 400\"\n [class.min-[420px]:grid-cols-2]=\"minWidth2Columns() == 420\"\n [class.min-[440px]:grid-cols-2]=\"minWidth2Columns() == 440\"\n [class.min-[460px]:grid-cols-2]=\"minWidth2Columns() == 460\">\n <ng-content></ng-content>\n </div>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
60
60
|
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxCardGridComponent, decorators: [{
|
|
62
62
|
type: Component,
|
|
63
63
|
args: [{ selector: 'spx-card-grid', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class='grid gap-3 items-stretch'\n [class.min-[300px]:grid-cols-2]=\"minWidth2Columns() == 300\"\n [class.min-[320px]:grid-cols-2]=\"minWidth2Columns() == 320\"\n [class.min-[340px]:grid-cols-2]=\"minWidth2Columns() == 340\"\n [class.min-[360px]:grid-cols-2]=\"minWidth2Columns() == 360\"\n [class.min-[380px]:grid-cols-2]=\"minWidth2Columns() == 380\"\n [class.min-[400px]:grid-cols-2]=\"minWidth2Columns() == 400\"\n [class.min-[420px]:grid-cols-2]=\"minWidth2Columns() == 420\"\n [class.min-[440px]:grid-cols-2]=\"minWidth2Columns() == 440\"\n [class.min-[460px]:grid-cols-2]=\"minWidth2Columns() == 460\">\n <ng-content></ng-content>\n </div>" }]
|
|
64
|
-
}] });
|
|
64
|
+
}], propDecorators: { minWidth2Columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth2Columns", required: false }] }] } });
|
|
65
65
|
|
|
66
66
|
class SpxCardLineComponent {
|
|
67
67
|
constructor() {
|
|
@@ -78,13 +78,13 @@ class SpxCardLineComponent {
|
|
|
78
78
|
displayValue(val) {
|
|
79
79
|
return val || val === 0 ? val : '—';
|
|
80
80
|
}
|
|
81
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
82
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
81
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxCardLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
82
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SpxCardLineComponent, isStandalone: true, selector: "spx-card-line", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showPositiveOrNegative: { classPropertyName: "showPositiveOrNegative", publicName: "showPositiveOrNegative", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, secondValue: { classPropertyName: "secondValue", publicName: "secondValue", isSignal: true, isRequired: false, transformFunction: null }, showProgress: { classPropertyName: "showProgress", publicName: "showProgress", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, newOrderScreen: { classPropertyName: "newOrderScreen", publicName: "newOrderScreen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<div class=\"items-center\" [class.flex]=\"!newOrderScreen()\">\n <div class=\"block w-24 text-gray-600 dark:text-gray-200 text-xs mb-1\" [class.pt-1]=\"!newOrderScreen()\" [innerHTML]=\"text()\"></div>\n <div class=\"flex\">\n @if (icon()) {\n <fa-icon [icon]=\"icon()!\" class=\"text-lg mr-3 w-6 text-center\"></fa-icon>\n }\n @if (showPositiveOrNegative() && numericValue() < 0) {\n <div class=\"rounded-full w-4 h-4 mr-2 bg-sky-600\"> </div>\n }\n @if (!showProgress()) {\n <span class=\"block font-medium grow whitespace-pre-line leading-5\">\n <span [innerHTML]=\"displayValue(value())\"></span>\n <ng-content></ng-content>\n @if (unit()) {\n <span> {{ unit() }}</span>\n }\n @if (!unit() && secondValue() !== null && secondValue() !== undefined) {\n / {{ displayValue(secondValue()) }}\n }\n </span>\n }\n </div>\n @if (showProgress()) {\n <div class=\"block font-medium grow whitespace-pre-line text-gray-600 dark:text-gray-200\">\n <div class=\"flex\">\n <div class=\"flex grow gap-2\">\n <div class=\"bg-gray-200 my-0.5 h-5 w-full rounded\">\n <div class=\"bg-teal-600 h-5 rounded\" [style.width]=\"((+value()) / (secondValue() ? +secondValue()! : 0)) * 100 + '%'\"></div>\n </div>\n </div>\n <div class=\"flex text-left pl-3 gap-2\">\n <div class=\"block w-16 text-right\">{{ value() }} / {{ secondValue() }}</div>\n </div>\n </div>\n </div>\n }\n</div>", dependencies: [{ kind: "component", type: 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
83
83
|
}
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxCardLineComponent, decorators: [{
|
|
85
85
|
type: Component,
|
|
86
86
|
args: [{ selector: 'spx-card-line', imports: [FaIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div class=\"items-center\" [class.flex]=\"!newOrderScreen()\">\n <div class=\"block w-24 text-gray-600 dark:text-gray-200 text-xs mb-1\" [class.pt-1]=\"!newOrderScreen()\" [innerHTML]=\"text()\"></div>\n <div class=\"flex\">\n @if (icon()) {\n <fa-icon [icon]=\"icon()!\" class=\"text-lg mr-3 w-6 text-center\"></fa-icon>\n }\n @if (showPositiveOrNegative() && numericValue() < 0) {\n <div class=\"rounded-full w-4 h-4 mr-2 bg-sky-600\"> </div>\n }\n @if (!showProgress()) {\n <span class=\"block font-medium grow whitespace-pre-line leading-5\">\n <span [innerHTML]=\"displayValue(value())\"></span>\n <ng-content></ng-content>\n @if (unit()) {\n <span> {{ unit() }}</span>\n }\n @if (!unit() && secondValue() !== null && secondValue() !== undefined) {\n / {{ displayValue(secondValue()) }}\n }\n </span>\n }\n </div>\n @if (showProgress()) {\n <div class=\"block font-medium grow whitespace-pre-line text-gray-600 dark:text-gray-200\">\n <div class=\"flex\">\n <div class=\"flex grow gap-2\">\n <div class=\"bg-gray-200 my-0.5 h-5 w-full rounded\">\n <div class=\"bg-teal-600 h-5 rounded\" [style.width]=\"((+value()) / (secondValue() ? +secondValue()! : 0)) * 100 + '%'\"></div>\n </div>\n </div>\n <div class=\"flex text-left pl-3 gap-2\">\n <div class=\"block w-16 text-right\">{{ value() }} / {{ secondValue() }}</div>\n </div>\n </div>\n </div>\n }\n</div>" }]
|
|
87
|
-
}] });
|
|
87
|
+
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], showPositiveOrNegative: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPositiveOrNegative", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }, { type: i0.Output, args: ["valueChange"] }], secondValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondValue", required: false }] }], showProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "showProgress", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], newOrderScreen: [{ type: i0.Input, args: [{ isSignal: true, alias: "newOrderScreen", required: false }] }] } });
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* Generated bundle index. Do not edit.
|
|
@@ -171,17 +171,17 @@ class SpxChangeDetailsComponent {
|
|
|
171
171
|
this.spxSearchTonsTested.emit(valuePair);
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
175
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
174
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxChangeDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
175
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.8", type: SpxChangeDetailsComponent, isStandalone: true, selector: "spx-change-details", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, textCategory: { classPropertyName: "textCategory", publicName: "textCategory", isSignal: true, isRequired: false, transformFunction: null }, textContainerNumber: { classPropertyName: "textContainerNumber", publicName: "textContainerNumber", isSignal: true, isRequired: false, transformFunction: null }, textContainerType: { classPropertyName: "textContainerType", publicName: "textContainerType", isSignal: true, isRequired: false, transformFunction: null }, textCustomer: { classPropertyName: "textCustomer", publicName: "textCustomer", isSignal: true, isRequired: false, transformFunction: null }, textLicensePlate: { classPropertyName: "textLicensePlate", publicName: "textLicensePlate", isSignal: true, isRequired: false, transformFunction: null }, textSave: { classPropertyName: "textSave", publicName: "textSave", isSignal: true, isRequired: false, transformFunction: null }, textTonsTested: { classPropertyName: "textTonsTested", publicName: "textTonsTested", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { spxBlurCategory: "spxBlurCategory", spxBlurContainerType: "spxBlurContainerType", spxSearchCategory: "spxSearchCategory", spxSearchContainerType: "spxSearchContainerType", spxSearchTonsTested: "spxSearchTonsTested", submit: "submit" }, ngImport: i0, template: "<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>", 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: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxForm", "spxSuggestions"], outputs: ["spxBlur", "spxClick", "spxSearch"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
176
176
|
}
|
|
177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SpxChangeDetailsComponent, decorators: [{
|
|
178
178
|
type: Component,
|
|
179
179
|
args: [{ selector: 'spx-change-details', imports: [
|
|
180
180
|
FormsModule,
|
|
181
181
|
ReactiveFormsModule,
|
|
182
182
|
SpxFormViewComponent,
|
|
183
183
|
], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<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>" }]
|
|
184
|
-
}], ctorParameters: () => [] });
|
|
184
|
+
}], ctorParameters: () => [], propDecorators: { formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: false }] }], suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], textCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "textCategory", required: false }] }], textContainerNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "textContainerNumber", required: false }] }], textContainerType: [{ type: i0.Input, args: [{ isSignal: true, alias: "textContainerType", required: false }] }], textCustomer: [{ type: i0.Input, args: [{ isSignal: true, alias: "textCustomer", required: false }] }], textLicensePlate: [{ type: i0.Input, args: [{ isSignal: true, alias: "textLicensePlate", required: false }] }], textSave: [{ type: i0.Input, args: [{ isSignal: true, alias: "textSave", required: false }] }], textTonsTested: [{ type: i0.Input, args: [{ isSignal: true, alias: "textTonsTested", required: false }] }], spxBlurCategory: [{ type: i0.Output, args: ["spxBlurCategory"] }], spxBlurContainerType: [{ type: i0.Output, args: ["spxBlurContainerType"] }], spxSearchCategory: [{ type: i0.Output, args: ["spxSearchCategory"] }], spxSearchContainerType: [{ type: i0.Output, args: ["spxSearchContainerType"] }], spxSearchTonsTested: [{ type: i0.Output, args: ["spxSearchTonsTested"] }], submit: [{ type: i0.Output, args: ["submit"] }] } });
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
187
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-change-details.mjs","sources":["../../../../projects/softpak/components/spx-change-details/spx-change-details.component.ts","../../../../projects/softpak/components/spx-change-details/spx-change-details.component.html","../../../../projects/softpak/components/spx-change-details/softpak-components-spx-change-details.ts"],"sourcesContent":["import { ChangeDetectionStrategy, computed, effect, input, output } from '@angular/core';\nimport { Component } from '@angular/core';\nimport {\n FormControl,\n FormGroup,\n FormsModule,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { SpxChangeDetailsValueI } from './spx-change-details-value.interface';\nimport { SpxFormViewComponent, SpxFormI, SpxFormButtonTypeEnum, SpxFormFieldI } from '@softpak/components/spx-form-view';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxValuePair, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\n\nexport const spxSectionChangeDetails = 'changeDetails';\nexport const spxCtrlContainerNumber = 'containerNumber';\nexport const spxCtrlContainerSeqNr = 'containerSeqNr';\nexport const spxCtrlContainerType = 'containerType';\nexport const spxCtrlCustomer = 'customer';\nexport const spxCtrlTonsTested = 'tonsTested';\nexport const spxCtrlLicensePlate = 'licensePlate';\nexport const spxCtrlCategory = 'category';\nexport const spxCtrlUseCategories = 'useCategories';\n\n@Component({\n selector: 'spx-change-details',\n templateUrl: './spx-change-details.component.html',\n imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxFormViewComponent,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxChangeDetailsComponent {\n readonly formGroup = input<FormGroup>();\n readonly suggestions = input<any>();\n private readonly showTonsTested = computed(() =>\n this.suggestions()?.[spxCtrlTonsTested] &&\n this.suggestions()?.[spxCtrlTonsTested].length &&\n this.suggestions()?.[spxCtrlTonsTested].length > 0\n );\n readonly textCategory = input<string>();\n readonly textContainerNumber = input<string>();\n readonly textContainerType = input<string>();\n readonly textCustomer = input<string>();\n readonly textLicensePlate = input<string>();\n readonly textSave = input<string>();\n readonly textTonsTested = input<string>();\n spxBlurCategory = output<SpxValuePair<string>>();\n spxBlurContainerType = output<SpxValuePair<string>>();\n spxSearchCategory = output<SpxValuePair<string>>();\n spxSearchContainerType = output<SpxValuePair<string>>();\n spxSearchTonsTested = output<SpxValuePair<string>>();\n submit = output<SpxChangeDetailsValueI>();\n\n form: SpxFormI = {\n buttons: [\n {\n severity: SpxSeverityEnum.success,\n type: SpxFormButtonTypeEnum.submit,\n label: () => this.textSave()!,\n }\n ],\n sections: [\n {\n key: spxSectionChangeDetails,\n showTitle: () => false,\n fields: [\n {\n key: spxCtrlContainerSeqNr,\n type: () => SpxInputTypeEnum.hidden,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlContainerNumber,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textContainerNumber()!,\n readonly: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlCustomer,\n type: () => SpxInputTypeEnum.text,\n capitalize: () => true,\n readonly: () => true,\n label: () => this.textCustomer()!,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlContainerType,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textContainerType()!,\n capitalize: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlTonsTested,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.textTonsTested()!,\n show: () => this.showTonsTested(),\n },\n {\n key: spxCtrlLicensePlate,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textLicensePlate()!,\n capitalize: () => true,\n },\n {\n key: spxCtrlUseCategories,\n type: () => SpxInputTypeEnum.hidden,\n capitalize: () => true,\n },\n {\n key: spxCtrlCategory,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textCategory()!,\n capitalize: () => true,\n show: () => valuePairToValue(this.ctrlUseCategories()?.value),\n validators: () => valuePairToValue(this.ctrlUseCategories()?.value) ? [spxValidatorRequired()] : [],\n }\n ]\n }\n ]\n };\n\n readonly ctrlCategory = computed(() => this.formGroup()?.get(spxCtrlCategory) as FormControl);\n readonly ctrlCustomer = computed(() => this.formGroup()?.get(spxCtrlCustomer) as FormControl);\n readonly ctrlContainerType = computed(() => this.formGroup()?.get(spxCtrlContainerType) as FormControl);\n readonly ctrlLicensePlate = computed(() => this.formGroup()?.get(spxCtrlLicensePlate) as FormControl);\n readonly ctrlTonsTested = computed(() => this.formGroup()?.get(spxCtrlTonsTested) as FormControl);\n readonly ctrlUseCategories = computed(() => this.formGroup()?.get(spxCtrlUseCategories) as FormControl);\n\n private subContainerType?: Subscription;\n\n constructor() {\n effect(() => {\n if (\n this.showTonsTested()\n ) {\n this.ctrlTonsTested()?.addValidators([spxValidatorRequired()]);\n this.ctrlTonsTested()?.updateValueAndValidity();\n } else {\n this.ctrlTonsTested()?.clearValidators();\n this.ctrlTonsTested()?.updateValueAndValidity();\n }\n });\n }\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(\n this.form\n );\n }\n\n ngOnInit(): void {\n this.listenToContainerType();\n }\n\n ngOnDestroy(): void {\n if (this.subContainerType) {\n this.subContainerType.unsubscribe();\n }\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 (data.field.key === spxCtrlCategory && valuePairToValue(this.formGroup()!.get(spxCtrlCategory)!.value) !== null) {\n this.spxBlurCategory.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerType && valuePairToValue(this.formGroup()!.get(spxCtrlContainerType)!.value) !== null) {\n this.spxBlurContainerType.emit(data.valuePair);\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 === spxCtrlTonsTested) {\n this.spxSearchTonsTested.emit(data.valuePair);\n }\n }\n\n onSubmit(): void {\n this.submit.emit({\n category: valuePairToValue(this.ctrlUseCategories().value) ? this.ctrlCategory().value : null,\n containerType: this.ctrlContainerType().value,\n licensePlate: this.ctrlLicensePlate().value,\n tonsTested: this.ctrlTonsTested().value,\n })\n }\n\n private listenToContainerType(): void {\n this.subContainerType = this.ctrlContainerType().valueChanges.subscribe(valuePair => {\n this.ctrlTonsTested().setValue({ value: null });\n this.spxSearchTonsTested.emit(valuePair);\n });\n }\n}\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 * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAeO,MAAM,uBAAuB,GAAG;AAChC,MAAM,sBAAsB,GAAG;AAC/B,MAAM,qBAAqB,GAAG;AAC9B,MAAM,oBAAoB,GAAG;AAC7B,MAAM,eAAe,GAAG;AACxB,MAAM,iBAAiB,GAAG;AAC1B,MAAM,mBAAmB,GAAG;AAC5B,MAAM,eAAe,GAAG;AACxB,MAAM,oBAAoB,GAAG;MAavB,yBAAyB,CAAA;AAqGpC,IAAA,WAAA,GAAA;QApGS,IAAA,CAAA,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAa;QAC9B,IAAA,CAAA,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAO;AAClB,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAAC,MACzC,IAAI,CAAC,WAAW,EAAE,GAAG,iBAAiB,CAAC;YACvC,IAAI,CAAC,WAAW,EAAE,GAAG,iBAAiB,CAAC,CAAC,MAAM;AAC9C,YAAA,IAAI,CAAC,WAAW,EAAE,GAAG,iBAAiB,CAAC,CAAC,MAAM,GAAG,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CACnD;QACQ,IAAA,CAAA,YAAY,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;QAC9B,IAAA,CAAA,mBAA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AA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKX,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAXrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAAA,OAAA,EAErB;wBACP,WAAW;wBACX,mBAAmB;wBACnB,oBAAoB;AACrB,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2UAAA,EAAA;;;AElCjD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-change-details.mjs","sources":["../../../../projects/softpak/components/spx-change-details/spx-change-details.component.ts","../../../../projects/softpak/components/spx-change-details/spx-change-details.component.html","../../../../projects/softpak/components/spx-change-details/softpak-components-spx-change-details.ts"],"sourcesContent":["import { ChangeDetectionStrategy, computed, effect, input, output } from '@angular/core';\nimport { Component } from '@angular/core';\nimport {\n FormControl,\n FormGroup,\n FormsModule,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { SpxChangeDetailsValueI } from './spx-change-details-value.interface';\nimport { SpxFormViewComponent, SpxFormI, SpxFormButtonTypeEnum, SpxFormFieldI } from '@softpak/components/spx-form-view';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxValuePair, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\n\nexport const spxSectionChangeDetails = 'changeDetails';\nexport const spxCtrlContainerNumber = 'containerNumber';\nexport const spxCtrlContainerSeqNr = 'containerSeqNr';\nexport const spxCtrlContainerType = 'containerType';\nexport const spxCtrlCustomer = 'customer';\nexport const spxCtrlTonsTested = 'tonsTested';\nexport const spxCtrlLicensePlate = 'licensePlate';\nexport const spxCtrlCategory = 'category';\nexport const spxCtrlUseCategories = 'useCategories';\n\n@Component({\n selector: 'spx-change-details',\n templateUrl: './spx-change-details.component.html',\n imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxFormViewComponent,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxChangeDetailsComponent {\n readonly formGroup = input<FormGroup>();\n readonly suggestions = input<any>();\n private readonly showTonsTested = computed(() =>\n this.suggestions()?.[spxCtrlTonsTested] &&\n this.suggestions()?.[spxCtrlTonsTested].length &&\n this.suggestions()?.[spxCtrlTonsTested].length > 0\n );\n readonly textCategory = input<string>();\n readonly textContainerNumber = input<string>();\n readonly textContainerType = input<string>();\n readonly textCustomer = input<string>();\n readonly textLicensePlate = input<string>();\n readonly textSave = input<string>();\n readonly textTonsTested = input<string>();\n spxBlurCategory = output<SpxValuePair<string>>();\n spxBlurContainerType = output<SpxValuePair<string>>();\n spxSearchCategory = output<SpxValuePair<string>>();\n spxSearchContainerType = output<SpxValuePair<string>>();\n spxSearchTonsTested = output<SpxValuePair<string>>();\n submit = output<SpxChangeDetailsValueI>();\n\n form: SpxFormI = {\n buttons: [\n {\n severity: SpxSeverityEnum.success,\n type: SpxFormButtonTypeEnum.submit,\n label: () => this.textSave()!,\n }\n ],\n sections: [\n {\n key: spxSectionChangeDetails,\n showTitle: () => false,\n fields: [\n {\n key: spxCtrlContainerSeqNr,\n type: () => SpxInputTypeEnum.hidden,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlContainerNumber,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textContainerNumber()!,\n readonly: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlCustomer,\n type: () => SpxInputTypeEnum.text,\n capitalize: () => true,\n readonly: () => true,\n label: () => this.textCustomer()!,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlContainerType,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textContainerType()!,\n capitalize: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlTonsTested,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.textTonsTested()!,\n show: () => this.showTonsTested(),\n },\n {\n key: spxCtrlLicensePlate,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textLicensePlate()!,\n capitalize: () => true,\n },\n {\n key: spxCtrlUseCategories,\n type: () => SpxInputTypeEnum.hidden,\n capitalize: () => true,\n },\n {\n key: spxCtrlCategory,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textCategory()!,\n capitalize: () => true,\n show: () => valuePairToValue(this.ctrlUseCategories()?.value),\n validators: () => valuePairToValue(this.ctrlUseCategories()?.value) ? [spxValidatorRequired()] : [],\n }\n ]\n }\n ]\n };\n\n readonly ctrlCategory = computed(() => this.formGroup()?.get(spxCtrlCategory) as FormControl);\n readonly ctrlCustomer = computed(() => this.formGroup()?.get(spxCtrlCustomer) as FormControl);\n readonly ctrlContainerType = computed(() => this.formGroup()?.get(spxCtrlContainerType) as FormControl);\n readonly ctrlLicensePlate = computed(() => this.formGroup()?.get(spxCtrlLicensePlate) as FormControl);\n readonly ctrlTonsTested = computed(() => this.formGroup()?.get(spxCtrlTonsTested) as FormControl);\n readonly ctrlUseCategories = computed(() => this.formGroup()?.get(spxCtrlUseCategories) as FormControl);\n\n private subContainerType?: Subscription;\n\n constructor() {\n effect(() => {\n if (\n this.showTonsTested()\n ) {\n this.ctrlTonsTested()?.addValidators([spxValidatorRequired()]);\n this.ctrlTonsTested()?.updateValueAndValidity();\n } else {\n this.ctrlTonsTested()?.clearValidators();\n this.ctrlTonsTested()?.updateValueAndValidity();\n }\n });\n }\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(\n this.form\n );\n }\n\n ngOnInit(): void {\n this.listenToContainerType();\n }\n\n ngOnDestroy(): void {\n if (this.subContainerType) {\n this.subContainerType.unsubscribe();\n }\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 (data.field.key === spxCtrlCategory && valuePairToValue(this.formGroup()!.get(spxCtrlCategory)!.value) !== null) {\n this.spxBlurCategory.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerType && valuePairToValue(this.formGroup()!.get(spxCtrlContainerType)!.value) !== null) {\n this.spxBlurContainerType.emit(data.valuePair);\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 === spxCtrlTonsTested) {\n this.spxSearchTonsTested.emit(data.valuePair);\n }\n }\n\n onSubmit(): void {\n this.submit.emit({\n category: valuePairToValue(this.ctrlUseCategories().value) ? this.ctrlCategory().value : null,\n containerType: this.ctrlContainerType().value,\n licensePlate: this.ctrlLicensePlate().value,\n tonsTested: this.ctrlTonsTested().value,\n })\n }\n\n private listenToContainerType(): void {\n this.subContainerType = this.ctrlContainerType().valueChanges.subscribe(valuePair => {\n this.ctrlTonsTested().setValue({ value: null });\n this.spxSearchTonsTested.emit(valuePair);\n });\n }\n}\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 * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAeO,MAAM,uBAAuB,GAAG;AAChC,MAAM,sBAAsB,GAAG;AAC/B,MAAM,qBAAqB,GAAG;AAC9B,MAAM,oBAAoB,GAAG;AAC7B,MAAM,eAAe,GAAG;AACxB,MAAM,iBAAiB,GAAG;AAC1B,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