@softpak/components 0.0.0-beta.8 → 0.0.0-beta.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/spx-alert/spx-alert.component.mjs +9 -4
- package/esm2022/spx-change-details/public-api.mjs +2 -0
- package/esm2022/spx-change-details/softpak-components-spx-change-details.mjs +5 -0
- package/esm2022/spx-change-details/spx-change-details-value.interface.mjs +2 -0
- package/esm2022/spx-change-details/spx-change-details.component.mjs +118 -0
- package/esm2022/spx-channel-selection/src/spx-channel-selection.component.mjs +5 -4
- package/esm2022/spx-channel-selection/src/spx-company-selection.component.mjs +5 -4
- package/esm2022/spx-check-digit/spx-check-digit.component.mjs +6 -4
- package/esm2022/spx-form-section/spx-form-section.component.mjs +7 -7
- package/esm2022/spx-form-view/public-api.mjs +4 -0
- package/esm2022/spx-form-view/softpak-components-spx-form-view.mjs +5 -0
- package/esm2022/spx-form-view/spx-form-field.interface.mjs +2 -0
- package/esm2022/spx-form-view/spx-form-section.interface.mjs +2 -0
- package/esm2022/spx-form-view/spx-form-view.component.mjs +163 -0
- package/esm2022/spx-inputs/public-api.mjs +2 -1
- package/esm2022/spx-inputs/spx-dropdown.component.mjs +91 -0
- package/esm2022/spx-inputs/spx-input-box.component.mjs +51 -44
- package/esm2022/spx-inputs/spx-input-text.component.mjs +20 -31
- package/esm2022/spx-inputs/spx-input-type.enum.mjs +14 -0
- package/esm2022/spx-inputs/spx-input.component.mjs +25 -11
- package/esm2022/spx-navigation/spx-home-tile.component.mjs +29 -10
- package/esm2022/spx-navigation/spx-navigation-item.interface.mjs +1 -1
- package/esm2022/spx-navigation/spx-navigation.component.mjs +11 -5
- package/esm2022/spx-number-check/public-api.mjs +2 -0
- package/esm2022/spx-number-check/softpak-components-spx-number-check.mjs +5 -0
- package/esm2022/spx-number-check/spx-number-check.component.mjs +262 -0
- package/esm2022/spx-progress-bar/spx-progress-bar.component.mjs +3 -3
- package/esm2022/spx-spinner/spx-spinner.component.mjs +5 -5
- package/esm2022/spx-suggestion/spx-suggestion.component.mjs +10 -6
- package/esm2022/spx-toaster/src/spx-toaster.component.mjs +33 -21
- package/fesm2022/softpak-components-spx-alert.mjs +8 -3
- package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +125 -0
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-channel-selection.mjs +7 -5
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +5 -3
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-section.mjs +6 -6
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +170 -0
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-inputs.mjs +190 -81
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +37 -12
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +269 -0
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-progress-bar.mjs +2 -2
- package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-spinner.mjs +4 -4
- package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-suggestion.mjs +9 -5
- package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-toaster.mjs +32 -20
- package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
- package/package.json +25 -7
- package/spx-change-details/index.d.ts +5 -0
- package/spx-change-details/public-api.d.ts +1 -0
- package/spx-change-details/spx-change-details-value.interface.d.ts +7 -0
- package/spx-change-details/spx-change-details.component.d.ts +40 -0
- package/spx-channel-selection/src/spx-channel-selection.component.d.ts +2 -1
- package/spx-channel-selection/src/spx-company-selection.component.d.ts +2 -1
- package/spx-check-digit/spx-check-digit.component.d.ts +3 -0
- package/spx-form-view/index.d.ts +5 -0
- package/spx-form-view/public-api.d.ts +3 -0
- package/spx-form-view/spx-form-field.interface.d.ts +16 -0
- package/spx-form-view/spx-form-section.interface.d.ts +9 -0
- package/spx-form-view/spx-form-view.component.d.ts +27 -0
- package/spx-inputs/public-api.d.ts +1 -0
- package/spx-inputs/spx-dropdown.component.d.ts +18 -0
- package/spx-inputs/spx-input-box.component.d.ts +8 -5
- package/spx-inputs/spx-input-text.component.d.ts +2 -1
- package/spx-inputs/spx-input-type.enum.d.ts +12 -0
- package/spx-inputs/spx-input.component.d.ts +4 -2
- package/spx-navigation/spx-home-tile.component.d.ts +5 -1
- package/spx-navigation/spx-navigation-item.interface.d.ts +1 -0
- package/spx-navigation/spx-navigation.component.d.ts +4 -1
- package/spx-number-check/index.d.ts +5 -0
- package/spx-number-check/public-api.d.ts +1 -0
- package/spx-number-check/spx-number-check.component.d.ts +48 -0
- package/spx-suggestion/spx-suggestion.component.d.ts +1 -0
- package/spx-toaster/src/spx-toaster.component.d.ts +1 -1
- package/tailwind.css +1 -1
|
@@ -4,7 +4,10 @@ import * as i0 from '@angular/core';
|
|
|
4
4
|
import { EventEmitter, Component, Output, Input } from '@angular/core';
|
|
5
5
|
import * as i2 from '@fortawesome/angular-fontawesome';
|
|
6
6
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
7
|
-
import { faCheck
|
|
7
|
+
import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';
|
|
8
|
+
import { faCircleInfo } from '@fortawesome/free-solid-svg-icons/faCircleInfo';
|
|
9
|
+
import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';
|
|
10
|
+
import { faTriangleExclamation } from '@fortawesome/free-solid-svg-icons/faTriangleExclamation';
|
|
8
11
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
9
12
|
|
|
10
13
|
class SpxAlertComponent {
|
|
@@ -86,7 +89,8 @@ class SpxAlertComponent {
|
|
|
86
89
|
[class.over:border-lime-600]="this.spxCloseable && this.isSeveritySuccess"
|
|
87
90
|
[class.focus:ring-amber-600]="this.spxCloseable && this.isSeverityWarning"
|
|
88
91
|
[class.hover:bg-amber-200]="this.spxCloseable && this.isSeverityWarning"
|
|
89
|
-
[class.over:border-amber-600]="this.spxCloseable && this.isSeverityWarning"
|
|
92
|
+
[class.over:border-amber-600]="this.spxCloseable && this.isSeverityWarning"
|
|
93
|
+
(click)="onClose()">
|
|
90
94
|
<fa-icon
|
|
91
95
|
*ngIf="this.isSeverityInfo"
|
|
92
96
|
[icon]="faCircleInfo" class="block text-xl text-cyan-600"></fa-icon>
|
|
@@ -147,7 +151,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
147
151
|
[class.over:border-lime-600]="this.spxCloseable && this.isSeveritySuccess"
|
|
148
152
|
[class.focus:ring-amber-600]="this.spxCloseable && this.isSeverityWarning"
|
|
149
153
|
[class.hover:bg-amber-200]="this.spxCloseable && this.isSeverityWarning"
|
|
150
|
-
[class.over:border-amber-600]="this.spxCloseable && this.isSeverityWarning"
|
|
154
|
+
[class.over:border-amber-600]="this.spxCloseable && this.isSeverityWarning"
|
|
155
|
+
(click)="onClose()">
|
|
151
156
|
<fa-icon
|
|
152
157
|
*ngIf="this.isSeverityInfo"
|
|
153
158
|
[icon]="faCircleInfo" class="block text-xl text-cyan-600"></fa-icon>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-alert.mjs","sources":["../../../../projects/softpak/components/spx-alert/spx-alert.component.ts","../../../../projects/softpak/components/spx-alert/spx-alert.interface.ts","../../../../projects/softpak/components/spx-alert/softpak-components-spx-alert.ts"],"sourcesContent":["import { CommonModule, NgIf } from '@angular/common';\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\nimport { faCheck
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-alert.mjs","sources":["../../../../projects/softpak/components/spx-alert/spx-alert.component.ts","../../../../projects/softpak/components/spx-alert/spx-alert.interface.ts","../../../../projects/softpak/components/spx-alert/softpak-components-spx-alert.ts"],"sourcesContent":["import { CommonModule, NgIf } from '@angular/common';\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\nimport { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';\nimport { faCircleInfo } from '@fortawesome/free-solid-svg-icons/faCircleInfo';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';\nimport { faTriangleExclamation } from '@fortawesome/free-solid-svg-icons/faTriangleExclamation';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-alert',\n standalone: true,\n imports: [\n CommonModule,\n FontAwesomeModule,\n NgIf,\n ],\n template: `\n <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.isSeverityError\"\n [class.border-red-500]=\"this.isSeverityError\"\n [class.text-red-900]=\"this.isSeverityError\"\n [class.bg-cyan-100]=\"this.isSeverityInfo\"\n [class.border-cyan-500]=\"this.isSeverityInfo\"\n [class.text-cyan-900]=\"this.isSeverityInfo\"\n [class.bg-lime-100]=\"this.isSeveritySuccess\"\n [class.border-lime-500]=\"this.isSeveritySuccess\"\n [class.text-lime-900]=\"this.isSeveritySuccess\"\n [class.bg-amber-100]=\"this.isSeverityWarning\"\n [class.border-amber-500]=\"this.isSeverityWarning\"\n [class.text-amber-900]=\"this.isSeverityWarning\"\n [class.focus:ring-red-600]=\"this.spxCloseable && this.isSeverityError\"\n [class.hover:bg-red-200]=\"this.spxCloseable && this.isSeverityError\"\n [class.over:border-red-600]=\"this.spxCloseable && this.isSeverityError\"\n [class.focus:ring-cyan-600]=\"this.spxCloseable && this.isSeverityInfo\"\n [class.hover:bg-cyan-200]=\"this.spxCloseable && this.isSeverityInfo\"\n [class.over:border-cyan-600]=\"this.spxCloseable && this.isSeverityInfo\"\n [class.focus:ring-lime-600]=\"this.spxCloseable && this.isSeveritySuccess\"\n [class.hover:bg-lime-200]=\"this.spxCloseable && this.isSeveritySuccess\"\n [class.over:border-lime-600]=\"this.spxCloseable && this.isSeveritySuccess\"\n [class.focus:ring-amber-600]=\"this.spxCloseable && this.isSeverityWarning\"\n [class.hover:bg-amber-200]=\"this.spxCloseable && this.isSeverityWarning\"\n [class.over:border-amber-600]=\"this.spxCloseable && this.isSeverityWarning\"\n (click)=\"onClose()\">\n <fa-icon\n *ngIf=\"this.isSeverityInfo\"\n [icon]=\"faCircleInfo\" class=\"block text-xl text-cyan-600\"></fa-icon>\n <fa-icon\n *ngIf=\"this.isSeverityError\"\n [icon]=\"faTriangleExclamation\" class=\"block text-xl text-red-600\"></fa-icon>\n <fa-icon\n *ngIf=\"this.isSeveritySuccess\"\n [icon]=\"faCheck\" class=\"block text-xl text-lime-600\"></fa-icon>\n <fa-icon\n *ngIf=\"this.isSeverityWarning\"\n [icon]=\"faTriangleExclamation\" class=\"block text-xl text-amber-600\"></fa-icon>\n <div class=\"grow\">\n <p *ngIf=\"this.spxTitle && !this.spxHideTitle\" class=\"font-bold\">{{this.spxTitle}}</p>\n <p class=\"text-sm\">\n <ng-content></ng-content>\n </p>\n </div>\n <fa-icon\n *ngIf=\"this.spxCloseable\"\n [icon]=\"faTimes\" class=\"block text-xl\"></fa-icon>\n </div>\n `,\n})\nexport class SpxAlertComponent {\n _autoCloseTimeout: any;\n @Output() spxClose: EventEmitter<void> = new EventEmitter<void>();\n @Input() spxAutoclose?: number;\n @Input() spxCloseable? = false;\n @Input() spxHideTitle = false;\n @Input() spxTitle?: string;\n @Input() spxMarginTop = false;\n @Input() spxSeverity?: SpxSeverityEnum;\n @Input() tick = {};\n\n get isSeverityError() { return this.spxSeverity === SpxSeverityEnum.error; }\n get isSeverityInfo() { return this.spxSeverity === SpxSeverityEnum.info; }\n get isSeveritySuccess() { return this.spxSeverity === SpxSeverityEnum.success; }\n get isSeverityWarning() { return this.spxSeverity === SpxSeverityEnum.warning; }\n faCheck = faCheck;\n faCircleInfo = faCircleInfo;\n faTriangleExclamation = faTriangleExclamation;\n faTimes = faTimes;\n\n componentDidLoad() {\n if (this.spxAutoclose) {\n this.prepareAutoClose();\n }\n if (!this.spxTitle) {\n this._assignDefaultTitle();\n }\n }\n\n private prepareAutoClose(): void {\n this._autoCloseTimeout = setTimeout(() => {\n this.onClose();\n this._autoCloseTimeout = null;\n this.tick = {};\n }, this.spxAutoclose);\n }\n\n private _assignDefaultTitle(): void {\n switch (this.spxSeverity) {\n case SpxSeverityEnum.error:\n this.spxTitle = 'Error';\n break;\n case SpxSeverityEnum.info:\n this.spxTitle = 'Info';\n break;\n case SpxSeverityEnum.success:\n this.spxTitle = 'Notification';\n break;\n case SpxSeverityEnum.warning:\n this.spxTitle = 'Warning';\n break;\n }\n }\n\n onClose() {\n if (this.spxCloseable) {\n this.spxClose.emit();\n }\n }\n}\n","import { SpxSeverityEnum } from \"@softpak/components/spx-helpers\";\n\nexport class SpxAlertI {\n closeable?: boolean;\n id?: number;\n message?: string;\n severity?: SpxSeverityEnum;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAqEa,iBAAiB,CAAA;AA5D9B,IAAA,WAAA,GAAA;AA8DY,QAAA,IAAA,CAAA,QAAQ,GAAuB,IAAI,YAAY,EAAQ,CAAC;QAEzD,IAAY,CAAA,YAAA,GAAI,KAAK,CAAC;QACtB,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;QAErB,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;QAErB,IAAI,CAAA,IAAA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,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,WAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,QAAA,EAAA,YAAA,EAAA,SAAA,EAAA,WAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAuDR,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBA5D7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,IAAI;AACL,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDT,EAAA,CAAA;AACF,iBAAA,CAAA;8BAGW,QAAQ,EAAA,CAAA;sBAAjB,MAAM;gBACE,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,IAAI,EAAA,CAAA;sBAAZ,KAAK;;;MC5EK,SAAS,CAAA;AAKrB;;ACPD;;AAEG;;;;"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { spxValidatorRequired, SpxValidationModule } from '@softpak/components/spx-validation';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
|
|
8
|
+
import { SpxFormViewComponent } from '@softpak/components/spx-form-view';
|
|
9
|
+
import { SpxButtonComponent } from '@softpak/components/spx-button';
|
|
10
|
+
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
11
|
+
|
|
12
|
+
const sectionChangeDetails = 'changeDetails';
|
|
13
|
+
const ctrlContainerType = 'containerType';
|
|
14
|
+
const ctrlTonsTested = 'tonsTested';
|
|
15
|
+
const ctrlLicensePlate = 'licensePlate';
|
|
16
|
+
const ctrlCategory = 'category';
|
|
17
|
+
class SpxChangeDetailsComponent {
|
|
18
|
+
get ctrlCategory() { return this.formGroup.get(ctrlCategory); }
|
|
19
|
+
get ctrlContainerType() { return this.formGroup.get(ctrlContainerType); }
|
|
20
|
+
get ctrlLicensePlate() { return this.formGroup.get(ctrlLicensePlate); }
|
|
21
|
+
get ctrlTonsTested() { return this.formGroup.get(ctrlTonsTested); }
|
|
22
|
+
constructor(formBuilder) {
|
|
23
|
+
this.formBuilder = formBuilder;
|
|
24
|
+
this.showCategory = false;
|
|
25
|
+
this.suggestions = {};
|
|
26
|
+
this.submit = new EventEmitter();
|
|
27
|
+
this.inputTypeAutocomplete = SpxInputTypeEnum.autocomplete;
|
|
28
|
+
this.inputTypeRadio = SpxInputTypeEnum.radio;
|
|
29
|
+
this.inputTypeText = SpxInputTypeEnum.text;
|
|
30
|
+
this.severitySuccess = SpxSeverityEnum.success;
|
|
31
|
+
this.sections = [
|
|
32
|
+
{
|
|
33
|
+
key: sectionChangeDetails,
|
|
34
|
+
showTitle: () => false,
|
|
35
|
+
fields: [
|
|
36
|
+
{
|
|
37
|
+
key: ctrlContainerType,
|
|
38
|
+
type: () => SpxInputTypeEnum.text,
|
|
39
|
+
label: () => this.txtContainerType,
|
|
40
|
+
capitalize: () => true,
|
|
41
|
+
afterValueChange: () => {
|
|
42
|
+
this.ctrlTonsTested.setValue(null);
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: ctrlTonsTested,
|
|
47
|
+
type: () => SpxInputTypeEnum.radio,
|
|
48
|
+
label: () => this.txtTonsTested,
|
|
49
|
+
show: () => this.suggestions?.[ctrlTonsTested] && this.suggestions?.[ctrlTonsTested].length && this.suggestions?.[ctrlTonsTested].length > 0
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: ctrlLicensePlate,
|
|
53
|
+
type: () => SpxInputTypeEnum.text,
|
|
54
|
+
label: () => this.txtLicensePlate,
|
|
55
|
+
capitalize: () => true,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: ctrlCategory,
|
|
59
|
+
type: () => SpxInputTypeEnum.text,
|
|
60
|
+
label: () => this.txtCategory,
|
|
61
|
+
capitalize: () => true,
|
|
62
|
+
show: () => this.showCategory,
|
|
63
|
+
validators: () => this.showCategory ? [spxValidatorRequired()] : [],
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
}
|
|
69
|
+
createForm() {
|
|
70
|
+
return SpxFormViewComponent.createForm(this.formBuilder, this.sections);
|
|
71
|
+
}
|
|
72
|
+
ngOnDestroy() {
|
|
73
|
+
if (this.inputChanges) {
|
|
74
|
+
this.inputChanges.unsubscribe();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
getRawValidators(formControl) {
|
|
78
|
+
return formControl._rawValidators;
|
|
79
|
+
}
|
|
80
|
+
onSubmit() {
|
|
81
|
+
this.submit.emit({
|
|
82
|
+
category: this.ctrlCategory.value,
|
|
83
|
+
containerType: this.ctrlContainerType.value,
|
|
84
|
+
licensePlate: this.ctrlLicensePlate.value,
|
|
85
|
+
tonsTested: this.ctrlTonsTested.value,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxChangeDetailsComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
89
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxChangeDetailsComponent, isStandalone: true, selector: "spx-change-details", inputs: { formGroup: "formGroup", showCategory: "showCategory", suggestions: "suggestions", txtCategory: "txtCategory", txtContainerType: "txtContainerType", txtLicensePlate: "txtLicensePlate", txtTonsTested: "txtTonsTested" }, outputs: { 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 [spxSections]=\"sections\"\n [spxSuggestions]=\"suggestions\">\n </spx-form-view>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n</form>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxSections", "spxSuggestions"] }, { kind: "ngmodule", type: SpxValidationModule }] }); }
|
|
90
|
+
}
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxChangeDetailsComponent, decorators: [{
|
|
92
|
+
type: Component,
|
|
93
|
+
args: [{ selector: 'spx-change-details', standalone: true, imports: [
|
|
94
|
+
CommonModule,
|
|
95
|
+
FormsModule,
|
|
96
|
+
ReactiveFormsModule,
|
|
97
|
+
SpxButtonComponent,
|
|
98
|
+
SpxFormViewComponent,
|
|
99
|
+
SpxInputComponent,
|
|
100
|
+
SpxValidationModule,
|
|
101
|
+
], 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 [spxSections]=\"sections\"\n [spxSuggestions]=\"suggestions\">\n </spx-form-view>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n</form>" }]
|
|
102
|
+
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { formGroup: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}], showCategory: [{
|
|
105
|
+
type: Input
|
|
106
|
+
}], suggestions: [{
|
|
107
|
+
type: Input
|
|
108
|
+
}], txtCategory: [{
|
|
109
|
+
type: Input
|
|
110
|
+
}], txtContainerType: [{
|
|
111
|
+
type: Input
|
|
112
|
+
}], txtLicensePlate: [{
|
|
113
|
+
type: Input
|
|
114
|
+
}], txtTonsTested: [{
|
|
115
|
+
type: Input
|
|
116
|
+
}], submit: [{
|
|
117
|
+
type: Output
|
|
118
|
+
}] } });
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Generated bundle index. Do not edit.
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
export { SpxChangeDetailsComponent, ctrlCategory, ctrlContainerType, ctrlLicensePlate, ctrlTonsTested, sectionChangeDetails };
|
|
125
|
+
//# sourceMappingURL=softpak-components-spx-change-details.mjs.map
|
|
@@ -0,0 +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 { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { spxValidatorRequired, SpxValidationModule } from '@softpak/components/spx-validation';\nimport { CommonModule } from '@angular/common';\nimport { SpxInputComponent, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\nimport { SpxFormSectionI, SpxFormViewComponent } from '@softpak/components/spx-form-view';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { SpxChangeDetailsValueI } from './spx-change-details-value.interface';\n\nexport const sectionChangeDetails = 'changeDetails';\nexport const ctrlContainerType = 'containerType';\nexport const ctrlTonsTested = 'tonsTested';\nexport const ctrlLicensePlate = 'licensePlate';\nexport const ctrlCategory = 'category';\n\n@Component({\n selector: 'spx-change-details',\n templateUrl: './spx-change-details.component.html',\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxButtonComponent,\n SpxFormViewComponent,\n SpxInputComponent,\n SpxValidationModule,\n ]\n})\nexport class SpxChangeDetailsComponent {\n @Input() formGroup!: FormGroup;\n @Input() showCategory = false;\n @Input() suggestions: any = {};\n @Input() txtCategory!: string;\n @Input() txtContainerType!: string;\n @Input() txtLicensePlate!: string;\n @Input() txtTonsTested!: string;\n @Output() submit: EventEmitter<SpxChangeDetailsValueI> = new EventEmitter<SpxChangeDetailsValueI>();\n inputTypeAutocomplete = SpxInputTypeEnum.autocomplete;\n inputTypeRadio = SpxInputTypeEnum.radio;\n inputTypeText = SpxInputTypeEnum.text;\n severitySuccess = SpxSeverityEnum.success;\n \n sections: SpxFormSectionI[] = [\n {\n key: sectionChangeDetails,\n showTitle: () => false,\n fields: [\n {\n key: ctrlContainerType,\n type: () => SpxInputTypeEnum.text,\n label: () => this.txtContainerType,\n capitalize: () => true,\n afterValueChange: () => {\n this.ctrlTonsTested.setValue(null);\n },\n },\n {\n key: ctrlTonsTested,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.txtTonsTested,\n show: () => this.suggestions?.[ctrlTonsTested] && this.suggestions?.[ctrlTonsTested].length && this.suggestions?.[ctrlTonsTested].length > 0\n },\n {\n key: ctrlLicensePlate,\n type: () => SpxInputTypeEnum.text,\n label: () => this.txtLicensePlate,\n capitalize: () => true,\n },\n {\n key: ctrlCategory,\n type: () => SpxInputTypeEnum.text,\n label: () => this.txtCategory,\n capitalize: () => true,\n show: () => this.showCategory,\n validators: () => this.showCategory ? [spxValidatorRequired()] : [],\n }\n ]\n }\n ];\n\n get ctrlCategory(): FormControl { return this.formGroup.get(ctrlCategory) as FormControl; }\n get ctrlContainerType(): FormControl { return this.formGroup.get(ctrlContainerType) as FormControl; }\n get ctrlLicensePlate(): FormControl { return this.formGroup.get(ctrlLicensePlate) as FormControl; }\n get ctrlTonsTested(): FormControl { return this.formGroup.get(ctrlTonsTested) as FormControl; }\n\n private inputChanges?: Subscription;\n\n constructor(readonly formBuilder: FormBuilder) {\n }\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(this.formBuilder, this.sections);\n }\n\n ngOnDestroy(): void {\n if (this.inputChanges) {\n this.inputChanges.unsubscribe();\n }\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n\n onSubmit(): void {\n this.submit.emit({\n category: this.ctrlCategory.value,\n containerType: this.ctrlContainerType.value,\n licensePlate: this.ctrlLicensePlate.value,\n tonsTested: this.ctrlTonsTested.value,\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 [spxSections]=\"sections\"\n [spxSuggestions]=\"suggestions\">\n </spx-form-view>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAWO,MAAM,oBAAoB,GAAG,gBAAgB;AAC7C,MAAM,iBAAiB,GAAG,gBAAgB;AAC1C,MAAM,cAAc,GAAG,aAAa;AACpC,MAAM,gBAAgB,GAAG,eAAe;AACxC,MAAM,YAAY,GAAG,WAAW;MAgB1B,yBAAyB,CAAA;AAoDpC,IAAA,IAAI,YAAY,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAgB,CAAC,EAAE;AAC3F,IAAA,IAAI,iBAAiB,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAgB,CAAC,EAAE;AACrG,IAAA,IAAI,gBAAgB,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAgB,CAAC,EAAE;AACnG,IAAA,IAAI,cAAc,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAgB,CAAC,EAAE;AAI/F,IAAA,WAAA,CAAqB,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QAzDpC,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;QACrB,IAAW,CAAA,WAAA,GAAQ,EAAE,CAAC;AAKrB,QAAA,IAAA,CAAA,MAAM,GAAyC,IAAI,YAAY,EAA0B,CAAC;AACpG,QAAA,IAAA,CAAA,qBAAqB,GAAG,gBAAgB,CAAC,YAAY,CAAC;AACtD,QAAA,IAAA,CAAA,cAAc,GAAG,gBAAgB,CAAC,KAAK,CAAC;AACxC,QAA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oBAAoB,oHAEpB,mBAAmB,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGV,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAdrC,SAAS;+BACE,oBAAoB,EAAA,UAAA,EAElB,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,kBAAkB;wBAClB,oBAAoB;wBACpB,iBAAiB;wBACjB,mBAAmB;AACpB,qBAAA,EAAA,QAAA,EAAA,kXAAA,EAAA,CAAA;gFAGQ,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,gBAAgB,EAAA,CAAA;sBAAxB,KAAK;gBACG,eAAe,EAAA,CAAA;sBAAvB,KAAK;gBACG,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACI,MAAM,EAAA,CAAA;sBAAf,MAAM;;;AEvCT;;AAEG;;;;"}
|
|
@@ -5,7 +5,7 @@ import * as i1$1 from '@angular/common';
|
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
import * as i1 from '@angular/forms';
|
|
7
7
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
8
|
-
import { SpxInputComponent } from '@softpak/components/spx-inputs';
|
|
8
|
+
import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
|
|
9
9
|
import { SpxFormSectionComponent } from '@softpak/components/spx-form-section';
|
|
10
10
|
import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
|
|
11
11
|
|
|
@@ -54,11 +54,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
54
54
|
class SpxChannelSelectionComponent {
|
|
55
55
|
constructor() {
|
|
56
56
|
this.options = [];
|
|
57
|
+
this.inputTypeRadio = SpxInputTypeEnum.radio;
|
|
57
58
|
}
|
|
58
59
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxChannelSelectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
59
60
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxChannelSelectionComponent, isStandalone: true, selector: "spx-channel-selection", inputs: { control: "control", options: "options", txtChannel: "txtChannel" }, ngImport: i0, template: `
|
|
60
61
|
<spx-input [formControl]="control" [spxLabel]="txtChannel"
|
|
61
|
-
[spxType]="
|
|
62
|
+
[spxType]="inputTypeRadio" [spxSuggestions]="options"></spx-input>
|
|
62
63
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
|
|
63
64
|
}
|
|
64
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxChannelSelectionComponent, decorators: [{
|
|
@@ -67,7 +68,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
67
68
|
selector: 'spx-channel-selection',
|
|
68
69
|
template: `
|
|
69
70
|
<spx-input [formControl]="control" [spxLabel]="txtChannel"
|
|
70
|
-
[spxType]="
|
|
71
|
+
[spxType]="inputTypeRadio" [spxSuggestions]="options"></spx-input>
|
|
71
72
|
`,
|
|
72
73
|
standalone: true,
|
|
73
74
|
imports: [
|
|
@@ -88,12 +89,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
88
89
|
class SpxCompanySelectionComponent {
|
|
89
90
|
constructor() {
|
|
90
91
|
this.options = [];
|
|
92
|
+
this.inputTypeRadio = SpxInputTypeEnum.radio;
|
|
91
93
|
}
|
|
92
94
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxCompanySelectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
93
95
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxCompanySelectionComponent, isStandalone: true, selector: "spx-company-selection", inputs: { control: "control", options: "options", txtChannel: "txtChannel", txtCompany: "txtCompany" }, ngImport: i0, template: `<spx-form-section [spxTitle]="txtChannel" [spxIndex]="2">
|
|
94
96
|
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3">
|
|
95
97
|
<spx-input [formControl]="control" [spxLabel]="txtCompany"
|
|
96
|
-
[spxType]="
|
|
98
|
+
[spxType]="inputTypeRadio" [spxSuggestions]="options"></spx-input>
|
|
97
99
|
</div>
|
|
98
100
|
</spx-form-section>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }, { kind: "component", type: SpxFormSectionComponent, selector: "spx-form-section", inputs: ["spxIndex", "spxIndexSecondary", "spxTitle", "spxShowTitle"] }] }); }
|
|
99
101
|
}
|
|
@@ -104,7 +106,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
104
106
|
template: `<spx-form-section [spxTitle]="txtChannel" [spxIndex]="2">
|
|
105
107
|
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3">
|
|
106
108
|
<spx-input [formControl]="control" [spxLabel]="txtCompany"
|
|
107
|
-
[spxType]="
|
|
109
|
+
[spxType]="inputTypeRadio" [spxSuggestions]="options"></spx-input>
|
|
108
110
|
</div>
|
|
109
111
|
</spx-form-section>`,
|
|
110
112
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-channel-selection.mjs","sources":["../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-selection.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-company-selection.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-welcome.component.ts","../../../../projects/softpak/components/spx-channel-selection/softpak-components-spx-channel-selection.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-channel-indicator',\n template: `<div class=\"bg-white p-3 rounded flex gap-3 items-center text-black\">\n <div class=\"grow\">\n <div class=\"text-lg font-bold\">{{ channel?.brand }}</div>\n <div class=\"text-base text-gray-600\">{{ channelType }}</div>\n </div>\n <spx-button (click)=\"onChange()\" [spxType]=\"'button'\">{{ txtChange }}</spx-button>\n </div>`,\n standalone: true,\n imports: [\n SpxButtonComponent,\n ],\n})\nexport class SpxChannelIndicatorComponent {\n @Input() channel?: SpxAppChannelI;\n @Input() channelType?: SpxAppChannelTypeEnum;\n @Input() txtChange!: string;\n @Output() spxChange: EventEmitter<void> = new EventEmitter<void>();\n\n constructor(\n ) { }\n\n onChange() {\n this.spxChange.emit();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxInputComponent, SpxValuePair } from '@softpak/components/spx-inputs';\n\n@Component({\n selector: 'spx-channel-selection',\n template: `\n <spx-input [formControl]=\"control\" [spxLabel]=\"txtChannel\"\n [spxType]=\"'radio'\" [spxSuggestions]=\"options\"></spx-input>\n `,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxInputComponent,\n ]\n})\nexport class SpxChannelSelectionComponent {\n @Input() control!: FormControl;\n @Input() options: SpxValuePair<string>[] = [];\n @Input() txtChannel!: string;\n\n constructor(\n ) { }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxFormSectionComponent } from '@softpak/components/spx-form-section';\nimport { SpxInputComponent, SpxValuePair } from '@softpak/components/spx-inputs';\n\n\n@Component({\n selector: 'spx-company-selection',\n template: `<spx-form-section [spxTitle]=\"txtChannel\" [spxIndex]=\"2\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\n <spx-input [formControl]=\"control\" [spxLabel]=\"txtCompany\"\n [spxType]=\"'radio'\" [spxSuggestions]=\"options\"></spx-input>\n </div>\n</spx-form-section>`,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxInputComponent,\n SpxFormSectionComponent,\n ]\n})\nexport class SpxCompanySelectionComponent {\n @Input() control!: FormControl;\n @Input() options: SpxValuePair<string>[] = [];\n @Input() txtChannel!: string;\n @Input() txtCompany!: string;\n\n constructor(\n ) { }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-welcome',\n template: `<div class=\"flex flex-col gap-3\">\n <spx-button [spxFullWidth]=\"true\" *ngFor=\"let channel of filteredChannels\" (click)=\"onSelectChannel(channel)\">\n {{ channel.brand }}\n </spx-button>\n </div>`,\n standalone: true,\n imports: [\n CommonModule,\n SpxButtonComponent,\n ]\n})\nexport class SpxWelcomeComponent {\n @Input() public channels?: SpxAppChannelI[] = [];\n @Output() public spxSelected: EventEmitter<SpxAppChannelI> = new EventEmitter<SpxAppChannelI>();\n\n get filteredChannels () { return (this.channels ?? [])?.filter(channel => channel.channelTypes.includes(SpxAppChannelTypeEnum.production)); }\n\n constructor(\n ) { }\n\n onSelectChannel(channel: SpxAppChannelI) {\n this.spxSelected.emit(channel);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAkBa,4BAA4B,CAAA;AAMvC,IAAA,WAAA,GAAA;AAFU,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;KAG9D;IAEL,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;KACvB;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AA,CAAA,EAAA;;2FAGT,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAb/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,CAAA;;;;AAIH,QAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,kBAAkB;AACnB,qBAAA;AACF,iBAAA,CAAA;wDAEiB,QAAQ,EAAA,CAAA;sBAAvB,KAAK;gBACW,WAAW,EAAA,CAAA;sBAA3B,MAAM;;;ACpBT;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-channel-selection.mjs","sources":["../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-selection.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-company-selection.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-welcome.component.ts","../../../../projects/softpak/components/spx-channel-selection/softpak-components-spx-channel-selection.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-channel-indicator',\n template: `<div class=\"bg-white p-3 rounded flex gap-3 items-center text-black\">\n <div class=\"grow\">\n <div class=\"text-lg font-bold\">{{ channel?.brand }}</div>\n <div class=\"text-base text-gray-600\">{{ channelType }}</div>\n </div>\n <spx-button (click)=\"onChange()\" [spxType]=\"'button'\">{{ txtChange }}</spx-button>\n </div>`,\n standalone: true,\n imports: [\n SpxButtonComponent,\n ],\n})\nexport class SpxChannelIndicatorComponent {\n @Input() channel?: SpxAppChannelI;\n @Input() channelType?: SpxAppChannelTypeEnum;\n @Input() txtChange!: string;\n @Output() spxChange: EventEmitter<void> = new EventEmitter<void>();\n\n constructor(\n ) { }\n\n onChange() {\n this.spxChange.emit();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\n\n@Component({\n selector: 'spx-channel-selection',\n template: `\n <spx-input [formControl]=\"control\" [spxLabel]=\"txtChannel\"\n [spxType]=\"inputTypeRadio\" [spxSuggestions]=\"options\"></spx-input>\n `,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxInputComponent,\n ]\n})\nexport class SpxChannelSelectionComponent {\n @Input() control!: FormControl;\n @Input() options: SpxValuePair<string>[] = [];\n @Input() txtChannel!: string;\n inputTypeRadio = SpxInputTypeEnum.radio;\n\n constructor(\n ) { }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxFormSectionComponent } from '@softpak/components/spx-form-section';\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\n\n\n@Component({\n selector: 'spx-company-selection',\n template: `<spx-form-section [spxTitle]=\"txtChannel\" [spxIndex]=\"2\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\n <spx-input [formControl]=\"control\" [spxLabel]=\"txtCompany\"\n [spxType]=\"inputTypeRadio\" [spxSuggestions]=\"options\"></spx-input>\n </div>\n</spx-form-section>`,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxInputComponent,\n SpxFormSectionComponent,\n ]\n})\nexport class SpxCompanySelectionComponent {\n @Input() control!: FormControl;\n @Input() options: SpxValuePair<string>[] = [];\n @Input() txtChannel!: string;\n @Input() txtCompany!: string;\n inputTypeRadio = SpxInputTypeEnum.radio;\n\n constructor(\n ) { }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-welcome',\n template: `<div class=\"flex flex-col gap-3\">\n <spx-button [spxFullWidth]=\"true\" *ngFor=\"let channel of filteredChannels\" (click)=\"onSelectChannel(channel)\">\n {{ channel.brand }}\n </spx-button>\n </div>`,\n standalone: true,\n imports: [\n CommonModule,\n SpxButtonComponent,\n ]\n})\nexport class SpxWelcomeComponent {\n @Input() public channels?: SpxAppChannelI[] = [];\n @Output() public spxSelected: EventEmitter<SpxAppChannelI> = new EventEmitter<SpxAppChannelI>();\n\n get filteredChannels () { return (this.channels ?? [])?.filter(channel => channel.channelTypes.includes(SpxAppChannelTypeEnum.production)); }\n\n constructor(\n ) { }\n\n onSelectChannel(channel: SpxAppChannelI) {\n this.spxSelected.emit(channel);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAkBa,4BAA4B,CAAA;AAMvC,IAAA,WAAA,GAAA;AAFU,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;KAG9D;IAEL,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;KACvB;8GAXU,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA5B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,4BAA4B,EAZ7B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAA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AA,OAAO,EAAE;wBACP,YAAY;wBACZ,kBAAkB;AACnB,qBAAA;AACF,iBAAA,CAAA;wDAEiB,QAAQ,EAAA,CAAA;sBAAvB,KAAK;gBACW,WAAW,EAAA,CAAA;sBAA3B,MAAM;;;ACpBT;;AAEG;;;;"}
|
|
@@ -8,7 +8,7 @@ import { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spx
|
|
|
8
8
|
import { valuePairToValue, calcCheckDigit } from '@softpak/components/spx-helpers';
|
|
9
9
|
import * as i2 from '@angular/common';
|
|
10
10
|
import { CommonModule } from '@angular/common';
|
|
11
|
-
import { SpxInputComponent } from '@softpak/components/spx-inputs';
|
|
11
|
+
import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
|
|
12
12
|
|
|
13
13
|
const ctrlCheckDigit = 'checkDigit';
|
|
14
14
|
const ctrlContainerNumber = 'containerNumber';
|
|
@@ -19,6 +19,8 @@ class SpxCheckDigitComponent {
|
|
|
19
19
|
get ctrlContainerPrefix() { return this.formGroup.get(ctrlPrefix); }
|
|
20
20
|
constructor(formBuilder) {
|
|
21
21
|
this.formBuilder = formBuilder;
|
|
22
|
+
this.inputTypeOverlayNumber = SpxInputTypeEnum.overlayNumber;
|
|
23
|
+
this.inputTypeText = SpxInputTypeEnum.text;
|
|
22
24
|
this.formGroup = this.formBuilder.group({
|
|
23
25
|
[ctrlCheckDigit]: [null, []],
|
|
24
26
|
[ctrlContainerNumber]: [null, [
|
|
@@ -65,7 +67,7 @@ class SpxCheckDigitComponent {
|
|
|
65
67
|
return formControl._rawValidators;
|
|
66
68
|
}
|
|
67
69
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxCheckDigitComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
68
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxCheckDigitComponent, isStandalone: true, selector: "spx-check-digit", inputs: { txtCheckDigit: "txtCheckDigit", txtContainer: "txtContainer", txtPrefix: "txtPrefix" }, ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-
|
|
70
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxCheckDigitComponent, isStandalone: true, selector: "spx-check-digit", inputs: { txtCheckDigit: "txtCheckDigit", txtContainer: "txtContainer", txtPrefix: "txtPrefix" }, ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n [formControl]=\"ctrlContainerNumber\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\n </spx-input>\n <spx-input\n [formControl]=\"ctrlContainerPrefix\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtPrefix\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\n [spxType]=\"inputTypeText\"\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\n </spx-input>\n <spx-input\n *ngIf=\"ctrlCheckDigit.value\"\n [formControl]=\"ctrlCheckDigit\"\n [spxLabel]=\"txtCheckDigit\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n</form>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: SpxValidationModule }, { kind: "component", type: i3.SpxValidateControlComponent, selector: "spx-validate-control", inputs: ["control", "label", "submitTried"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
|
|
69
71
|
}
|
|
70
72
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxCheckDigitComponent, decorators: [{
|
|
71
73
|
type: Component,
|
|
@@ -75,7 +77,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
75
77
|
ReactiveFormsModule,
|
|
76
78
|
SpxValidationModule,
|
|
77
79
|
SpxInputComponent,
|
|
78
|
-
], template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-
|
|
80
|
+
], template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n [formControl]=\"ctrlContainerNumber\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\n </spx-input>\n <spx-input\n [formControl]=\"ctrlContainerPrefix\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtPrefix\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\n [spxType]=\"inputTypeText\"\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\n </spx-input>\n <spx-input\n *ngIf=\"ctrlCheckDigit.value\"\n [formControl]=\"ctrlCheckDigit\"\n [spxLabel]=\"txtCheckDigit\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n</form>" }]
|
|
79
81
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { txtCheckDigit: [{
|
|
80
82
|
type: Input
|
|
81
83
|
}], txtContainer: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-check-digit.mjs","sources":["../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.ts","../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.html","../../../../projects/softpak/components/spx-check-digit/softpak-components-spx-check-digit.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription, combineLatest, map, startWith } from 'rxjs';\nimport { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spxValidatorPattern, SpxValidationModule } from '@softpak/components/spx-validation';\nimport { calcCheckDigit, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { CommonModule } from '@angular/common';\nimport { SpxInputComponent } from '@softpak/components/spx-inputs';\n\nconst ctrlCheckDigit = 'checkDigit';\nconst ctrlContainerNumber = 'containerNumber';\nconst ctrlPrefix = 'prefix';\n\n@Component({\n selector: 'spx-check-digit',\n templateUrl: './spx-check-digit.component.html',\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxValidationModule,\n SpxInputComponent,\n ]\n})\nexport class SpxCheckDigitComponent {\n @Input() txtCheckDigit!: string;\n @Input() txtContainer!: string;\n @Input() txtPrefix!: string;\n formGroup: FormGroup;\n\n get ctrlCheckDigit(): FormControl { return this.formGroup.get(ctrlCheckDigit) as FormControl; }\n get ctrlContainerNumber(): FormControl { return this.formGroup.get(ctrlContainerNumber) as FormControl; }\n get ctrlContainerPrefix(): FormControl { return this.formGroup.get(ctrlPrefix) as FormControl; }\n\n private inputChanges?: Subscription;\n\n constructor(\n private readonly formBuilder: FormBuilder,\n ) {\n this.formGroup = this.formBuilder.group({\n [ctrlCheckDigit]: [null, []],\n [ctrlContainerNumber]: [null, [\n spxValidatorRequired(),\n spxValidatorMaxLength(6),\n spxValidatorMinLength(6),\n spxValidatorPattern(/[0-9]{6}/),\n ]],\n [ctrlPrefix]: [null, [\n spxValidatorRequired(),\n spxValidatorMaxLength(4),\n spxValidatorMinLength(4),\n spxValidatorPattern(/[a-zA-Z]{4}/),\n ]],\n })\n }\n\n ngOnInit(): void {\n this.inputChanges = combineLatest([\n this.ctrlContainerNumber.valueChanges.pipe(startWith(this.ctrlContainerNumber.value)),\n this.ctrlContainerPrefix.valueChanges.pipe(startWith(this.ctrlContainerPrefix.value)),\n ])\n .pipe(map(([containerNumber$, prefix$]) => ({\n containerNumber: containerNumber$,\n prefix: prefix$\n })))\n .subscribe((v) => {\n if (this.ctrlContainerNumber.invalid || this.ctrlContainerPrefix.invalid) {\n this.ctrlCheckDigit.setValue(null, { emitEvent: false });\n } else {\n const prefix = valuePairToValue(this.ctrlContainerPrefix.value);\n const containerNumber = valuePairToValue(this.ctrlContainerNumber.value);\n const checkDigit = calcCheckDigit(`${prefix}${containerNumber}`);\n this.ctrlCheckDigit.setValue({ value: checkDigit }, { emitEvent: false });\n }\n });\n }\n\n ngOnDestroy(): void {\n if (this.inputChanges) {\n this.inputChanges.unsubscribe();\n }\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n}\n","<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-check-digit.mjs","sources":["../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.ts","../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.html","../../../../projects/softpak/components/spx-check-digit/softpak-components-spx-check-digit.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription, combineLatest, map, startWith } from 'rxjs';\nimport { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spxValidatorPattern, SpxValidationModule } from '@softpak/components/spx-validation';\nimport { calcCheckDigit, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { CommonModule } from '@angular/common';\nimport { SpxInputComponent, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\n\nconst ctrlCheckDigit = 'checkDigit';\nconst ctrlContainerNumber = 'containerNumber';\nconst ctrlPrefix = 'prefix';\n\n@Component({\n selector: 'spx-check-digit',\n templateUrl: './spx-check-digit.component.html',\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxValidationModule,\n SpxInputComponent,\n ]\n})\nexport class SpxCheckDigitComponent {\n @Input() txtCheckDigit!: string;\n @Input() txtContainer!: string;\n @Input() txtPrefix!: string;\n inputTypeOverlayNumber = SpxInputTypeEnum.overlayNumber;\n inputTypeText = SpxInputTypeEnum.text;\n formGroup: FormGroup;\n\n get ctrlCheckDigit(): FormControl { return this.formGroup.get(ctrlCheckDigit) as FormControl; }\n get ctrlContainerNumber(): FormControl { return this.formGroup.get(ctrlContainerNumber) as FormControl; }\n get ctrlContainerPrefix(): FormControl { return this.formGroup.get(ctrlPrefix) as FormControl; }\n\n private inputChanges?: Subscription;\n\n constructor(\n private readonly formBuilder: FormBuilder,\n ) {\n this.formGroup = this.formBuilder.group({\n [ctrlCheckDigit]: [null, []],\n [ctrlContainerNumber]: [null, [\n spxValidatorRequired(),\n spxValidatorMaxLength(6),\n spxValidatorMinLength(6),\n spxValidatorPattern(/[0-9]{6}/),\n ]],\n [ctrlPrefix]: [null, [\n spxValidatorRequired(),\n spxValidatorMaxLength(4),\n spxValidatorMinLength(4),\n spxValidatorPattern(/[a-zA-Z]{4}/),\n ]],\n })\n }\n\n ngOnInit(): void {\n this.inputChanges = combineLatest([\n this.ctrlContainerNumber.valueChanges.pipe(startWith(this.ctrlContainerNumber.value)),\n this.ctrlContainerPrefix.valueChanges.pipe(startWith(this.ctrlContainerPrefix.value)),\n ])\n .pipe(map(([containerNumber$, prefix$]) => ({\n containerNumber: containerNumber$,\n prefix: prefix$\n })))\n .subscribe((v) => {\n if (this.ctrlContainerNumber.invalid || this.ctrlContainerPrefix.invalid) {\n this.ctrlCheckDigit.setValue(null, { emitEvent: false });\n } else {\n const prefix = valuePairToValue(this.ctrlContainerPrefix.value);\n const containerNumber = valuePairToValue(this.ctrlContainerNumber.value);\n const checkDigit = calcCheckDigit(`${prefix}${containerNumber}`);\n this.ctrlCheckDigit.setValue({ value: checkDigit }, { emitEvent: false });\n }\n });\n }\n\n ngOnDestroy(): void {\n if (this.inputChanges) {\n this.inputChanges.unsubscribe();\n }\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n}\n","<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n [formControl]=\"ctrlContainerNumber\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\n </spx-input>\n <spx-input\n [formControl]=\"ctrlContainerPrefix\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtPrefix\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\n [spxType]=\"inputTypeText\"\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\n </spx-input>\n <spx-input\n *ngIf=\"ctrlCheckDigit.value\"\n [formControl]=\"ctrlCheckDigit\"\n [spxLabel]=\"txtCheckDigit\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAQA,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAC9C,MAAM,UAAU,GAAG,QAAQ,CAAC;MAcf,sBAAsB,CAAA;AAQ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CAAA;sBAArB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;;;AE3BR;;AAEG;;;;"}
|
|
@@ -7,25 +7,25 @@ class SpxFormSectionComponent {
|
|
|
7
7
|
this.spxShowTitle = true;
|
|
8
8
|
}
|
|
9
9
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxFormSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxFormSectionComponent, isStandalone: true, selector: "spx-form-section", inputs: { spxIndex: "spxIndex", spxIndexSecondary: "spxIndexSecondary", spxTitle: "spxTitle", spxShowTitle: "spxShowTitle" }, ngImport: i0, template: `<div *ngIf="this.spxShowTitle" class="spx-form-section__title">
|
|
10
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxFormSectionComponent, isStandalone: true, selector: "spx-form-section", inputs: { spxIndex: "spxIndex", spxIndexSecondary: "spxIndexSecondary", spxTitle: "spxTitle", spxShowTitle: "spxShowTitle" }, ngImport: i0, template: `<div *ngIf="this.spxShowTitle" class="spx-form-section__title mb-2">
|
|
11
11
|
<div class="spx-form-section__title-index">{{this.spxIndex}}<ng-container *ngIf="this.spxIndexSecondary">{{ this.spxIndexSecondary }}</ng-container></div>
|
|
12
12
|
<div class="spx-form-section__title-content">{{this.spxTitle}}</div>
|
|
13
13
|
</div>
|
|
14
|
-
<div class="spx-form-section__content">
|
|
14
|
+
<div class="spx-form-section__content flex flex-col gap-3">
|
|
15
15
|
<ng-content></ng-content>
|
|
16
|
-
</div>`, isInline: true, styles: [":host{display:block
|
|
16
|
+
</div>`, isInline: true, styles: [":host{display:block}.spx-form-section__title-index{background-color:var(--spx-form-section--index--background-color, #000000);color:var(--spx-form-section--index--color, #FFFFFF);display:inline-block;font-size:14px;font-weight:700;height:30px;width:30px;line-height:30px;text-align:center;margin-right:12px;vertical-align:middle}.spx-form-section__title-content{color:var(--spx-form-section--title--color, grey);display:inline-block;font-size:var(--spx-form-section--title--font-size, 16px);font-weight:var(--spx-form-section--title--font-weight, bold);vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
17
17
|
}
|
|
18
18
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxFormSectionComponent, decorators: [{
|
|
19
19
|
type: Component,
|
|
20
20
|
args: [{ selector: 'spx-form-section', standalone: true, imports: [
|
|
21
21
|
NgIf,
|
|
22
|
-
], template: `<div *ngIf="this.spxShowTitle" class="spx-form-section__title">
|
|
22
|
+
], template: `<div *ngIf="this.spxShowTitle" class="spx-form-section__title mb-2">
|
|
23
23
|
<div class="spx-form-section__title-index">{{this.spxIndex}}<ng-container *ngIf="this.spxIndexSecondary">{{ this.spxIndexSecondary }}</ng-container></div>
|
|
24
24
|
<div class="spx-form-section__title-content">{{this.spxTitle}}</div>
|
|
25
25
|
</div>
|
|
26
|
-
<div class="spx-form-section__content">
|
|
26
|
+
<div class="spx-form-section__content flex flex-col gap-3">
|
|
27
27
|
<ng-content></ng-content>
|
|
28
|
-
</div>`, styles: [":host{display:block
|
|
28
|
+
</div>`, styles: [":host{display:block}.spx-form-section__title-index{background-color:var(--spx-form-section--index--background-color, #000000);color:var(--spx-form-section--index--color, #FFFFFF);display:inline-block;font-size:14px;font-weight:700;height:30px;width:30px;line-height:30px;text-align:center;margin-right:12px;vertical-align:middle}.spx-form-section__title-content{color:var(--spx-form-section--title--color, grey);display:inline-block;font-size:var(--spx-form-section--title--font-size, 16px);font-weight:var(--spx-form-section--title--font-weight, bold);vertical-align:middle}\n"] }]
|
|
29
29
|
}], propDecorators: { spxIndex: [{
|
|
30
30
|
type: Input
|
|
31
31
|
}], spxIndexSecondary: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-form-section.mjs","sources":["../../../../projects/softpak/components/spx-form-section/spx-form-section.component.ts","../../../../projects/softpak/components/spx-form-section/softpak-components-spx-form-section.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'spx-form-section',\n standalone: true,\n imports: [\n NgIf,\n ],\n template: `<div *ngIf=\"this.spxShowTitle\" class=\"spx-form-section__title\">\n <div class=\"spx-form-section__title-index\">{{this.spxIndex}}<ng-container *ngIf=\"this.spxIndexSecondary\">{{ this.spxIndexSecondary }}</ng-container></div>\n <div class=\"spx-form-section__title-content\">{{this.spxTitle}}</div>\n </div>\n <div class=\"spx-form-section__content\">\n <ng-content></ng-content>\n </div>`,\n styles: `\n :host {\n display: block;\n
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-form-section.mjs","sources":["../../../../projects/softpak/components/spx-form-section/spx-form-section.component.ts","../../../../projects/softpak/components/spx-form-section/softpak-components-spx-form-section.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'spx-form-section',\n standalone: true,\n imports: [\n NgIf,\n ],\n template: `<div *ngIf=\"this.spxShowTitle\" class=\"spx-form-section__title mb-2\">\n <div class=\"spx-form-section__title-index\">{{this.spxIndex}}<ng-container *ngIf=\"this.spxIndexSecondary\">{{ this.spxIndexSecondary }}</ng-container></div>\n <div class=\"spx-form-section__title-content\">{{this.spxTitle}}</div>\n </div>\n <div class=\"spx-form-section__content flex flex-col gap-3\">\n <ng-content></ng-content>\n </div>`,\n styles: `\n :host {\n display: block;\n }\n \n .spx-form-section__title-index {\n background-color: var(--spx-form-section--index--background-color, #000000);\n color: var(--spx-form-section--index--color, #FFFFFF);\n display: inline-block;\n font-size: 14px;\n font-weight: bold;\n height: 30px;\n width: 30px;\n line-height: 30px;\n text-align: center;\n margin-right: 12px;\n vertical-align: middle;\n }\n \n .spx-form-section__title-content {\n color: var(--spx-form-section--title--color, grey);\n display: inline-block;\n font-size: var(--spx-form-section--title--font-size, 16px);\n font-weight: var(--spx-form-section--title--font-weight, bold);\n vertical-align: middle;\n }\n `,\n})\nexport class SpxFormSectionComponent {\n @Input() spxIndex?: number;\n @Input() spxIndexSecondary?: number;\n @Input() spxTitle?: string;\n @Input() spxShowTitle = true;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MA4Ca,uBAAuB,CAAA;AAzCpC,IAAA,WAAA,GAAA;QA6CW,IAAY,CAAA,YAAA,GAAG,IAAI,CAAC;AAC9B,KAAA;8GALY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,EAnCxB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;AAMH,QAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,mkBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EARL,IAAI,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAqCK,uBAAuB,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