@softpak/components 0.0.0-beta.22 → 0.0.0-beta.220
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-button/spx-button.component.mjs +18 -5
- 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 +199 -0
- package/esm2022/spx-channel-selection/src/spx-channel-selection.component.mjs +1 -1
- package/esm2022/spx-channel-selection/src/spx-company-selection.component.mjs +2 -2
- package/esm2022/spx-channel-selection/src/spx-welcome.component.mjs +112 -19
- package/esm2022/spx-check-digit/spx-check-digit.component.mjs +14 -7
- package/esm2022/spx-form-section/spx-form-section.component.mjs +11 -11
- 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-autocomplete-search.component.mjs +119 -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 +268 -0
- package/esm2022/spx-inputs/spx-dropdown.component.mjs +94 -0
- package/esm2022/spx-inputs/spx-input-box.component.mjs +70 -46
- package/esm2022/spx-inputs/spx-input-date.component.mjs +1 -1
- package/esm2022/spx-inputs/spx-input-float.component.mjs +10 -5
- package/esm2022/spx-inputs/spx-input-number.component.mjs +10 -5
- package/esm2022/spx-inputs/spx-input-radio.component.mjs +93 -27
- package/esm2022/spx-inputs/spx-input-text.component.mjs +25 -32
- package/esm2022/spx-inputs/spx-input-type.enum.mjs +4 -1
- package/esm2022/spx-inputs/spx-input.component.mjs +48 -13
- package/esm2022/spx-navigation/spx-home-tile.component.mjs +31 -12
- package/esm2022/spx-navigation/spx-home-tiles.component.mjs +14 -5
- 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/spx-number-check.component.mjs +87 -20
- package/esm2022/spx-suggestion/spx-suggestion.component.mjs +28 -10
- package/esm2022/spx-update/src/spx-update-info.component.mjs +1 -1
- package/esm2022/spx-validation/public-api.mjs +1 -2
- package/esm2022/spx-validation/spx-validate-control.component.mjs +8 -3
- package/fesm2022/softpak-components-spx-button.mjs +17 -4
- package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +206 -0
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-channel-selection.mjs +110 -21
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +13 -6
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-section.mjs +10 -10
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +385 -0
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-inputs.mjs +337 -118
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +51 -17
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +86 -19
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-suggestion.mjs +27 -9
- package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +1 -1
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +8 -28
- package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
- package/package.json +29 -16
- package/spx-button/spx-button.component.d.ts +4 -2
- 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 +63 -0
- package/spx-channel-selection/src/spx-welcome.component.d.ts +37 -8
- package/spx-check-digit/spx-check-digit.component.d.ts +3 -1
- package/spx-form-view/index.d.ts +5 -0
- package/spx-form-view/public-api.d.ts +3 -0
- package/spx-form-view/spx-autocomplete-search.component.d.ts +43 -0
- package/spx-form-view/spx-form-field.interface.d.ts +18 -0
- package/spx-form-view/spx-form-section.interface.d.ts +9 -0
- package/spx-form-view/spx-form-view.component.d.ts +48 -0
- package/spx-inputs/spx-dropdown.component.d.ts +18 -0
- package/spx-inputs/spx-input-box.component.d.ts +14 -7
- package/spx-inputs/spx-input-float.component.d.ts +3 -2
- package/spx-inputs/spx-input-number.component.d.ts +3 -2
- package/spx-inputs/spx-input-radio.component.d.ts +13 -5
- package/spx-inputs/spx-input-text.component.d.ts +3 -2
- package/spx-inputs/spx-input-type.enum.d.ts +4 -1
- package/spx-inputs/spx-input.component.d.ts +11 -3
- package/spx-navigation/spx-home-tile.component.d.ts +5 -1
- package/spx-navigation/spx-home-tiles.component.d.ts +2 -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/spx-number-check.component.d.ts +15 -3
- package/spx-suggestion/spx-suggestion.component.d.ts +3 -1
- package/spx-validation/public-api.d.ts +0 -1
- package/spx-validation/spx-validate-control.component.d.ts +1 -1
- package/tailwind.css +1 -1
- package/esm2022/spx-validation/spx-validation.module.mjs +0 -28
- package/spx-validation/spx-validation.module.d.ts +0 -9
|
@@ -13,9 +13,11 @@ class SpxNumberCheckComponent {
|
|
|
13
13
|
get ctrl4() { return this.form.get('ctrl4'); }
|
|
14
14
|
constructor(formBuilder) {
|
|
15
15
|
this.formBuilder = formBuilder;
|
|
16
|
+
this.spxSimpleMode = false;
|
|
16
17
|
this.spxCancel = new EventEmitter();
|
|
17
18
|
this.spxConfirm = new EventEmitter();
|
|
18
19
|
this.severityError = SpxSeverityEnum.error;
|
|
20
|
+
this.severitySuccess = SpxSeverityEnum.success;
|
|
19
21
|
this.severityWarning = SpxSeverityEnum.warning;
|
|
20
22
|
this.accepted = false;
|
|
21
23
|
this.denied = false;
|
|
@@ -34,16 +36,55 @@ class SpxNumberCheckComponent {
|
|
|
34
36
|
this.checkPincode();
|
|
35
37
|
}
|
|
36
38
|
});
|
|
39
|
+
this.listenToCtrl1 = this.ctrl1.valueChanges.subscribe(value => {
|
|
40
|
+
if (value) {
|
|
41
|
+
this.viewChild2.nativeElement.focus();
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
this.listenToCtrl2 = this.ctrl2.valueChanges.subscribe(value => {
|
|
47
|
+
if (value) {
|
|
48
|
+
this.viewChild3.nativeElement.focus();
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
this.listenToCtrl3 = this.ctrl3.valueChanges.subscribe(value => {
|
|
54
|
+
if (value) {
|
|
55
|
+
this.viewChild4.nativeElement.focus();
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
ngOnChanges(changes) {
|
|
62
|
+
setTimeout(() => {
|
|
63
|
+
if (this?.viewChild1?.nativeElement) {
|
|
64
|
+
this.viewChild1.nativeElement.focus();
|
|
65
|
+
}
|
|
66
|
+
}, 0);
|
|
37
67
|
}
|
|
38
68
|
ngOnDestroy() {
|
|
39
69
|
if (this.listenToTyping) {
|
|
40
70
|
this.listenToTyping.unsubscribe();
|
|
41
71
|
}
|
|
72
|
+
if (this.listenToCtrl1) {
|
|
73
|
+
this.listenToCtrl1.unsubscribe();
|
|
74
|
+
}
|
|
75
|
+
if (this.listenToCtrl2) {
|
|
76
|
+
this.listenToCtrl2.unsubscribe();
|
|
77
|
+
}
|
|
78
|
+
if (this.listenToCtrl3) {
|
|
79
|
+
this.listenToCtrl3.unsubscribe();
|
|
80
|
+
}
|
|
42
81
|
}
|
|
43
82
|
handleCancel() {
|
|
44
|
-
console.log('spxContainerConfirm: spxCancel');
|
|
45
83
|
this.spxCancel.emit();
|
|
46
84
|
}
|
|
85
|
+
handleConfirm() {
|
|
86
|
+
this.spxConfirm.emit();
|
|
87
|
+
}
|
|
47
88
|
handleReset() {
|
|
48
89
|
this.ctrl1.reset();
|
|
49
90
|
this.ctrl2.reset();
|
|
@@ -81,7 +122,7 @@ class SpxNumberCheckComponent {
|
|
|
81
122
|
return;
|
|
82
123
|
}
|
|
83
124
|
else {
|
|
84
|
-
setTimeout(() => { element.focus(); });
|
|
125
|
+
// setTimeout(() => { element.focus(); });
|
|
85
126
|
}
|
|
86
127
|
}
|
|
87
128
|
onBackspace(event) {
|
|
@@ -91,7 +132,6 @@ class SpxNumberCheckComponent {
|
|
|
91
132
|
if (this.spxPincode === `${this.ctrl1.value}${this.ctrl2.value}${this.ctrl3.value}${this.ctrl4.value}`) {
|
|
92
133
|
this.accepted = true;
|
|
93
134
|
setTimeout(() => {
|
|
94
|
-
console.log('spxContainerConfirm: spxConfirm');
|
|
95
135
|
this.spxConfirm.emit();
|
|
96
136
|
}, 500);
|
|
97
137
|
}
|
|
@@ -100,21 +140,28 @@ class SpxNumberCheckComponent {
|
|
|
100
140
|
}
|
|
101
141
|
}
|
|
102
142
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxNumberCheckComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
103
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxNumberCheckComponent, isStandalone: true, selector: "spx-number-check", inputs: { spxAction: "spxAction", spxPincode: "spxPincode", txtCancel: "txtCancel", txtConfirmMessage: "txtConfirmMessage", txtReset: "txtReset" }, outputs: { spxCancel: "spxCancel", spxConfirm: "spxConfirm" }, host: { listeners: { "spxChange": "handleChangeEvent($event)" } }, viewQueries: [{ propertyName: "viewChild1", first: true, predicate: ["viewChild1"], descendants: true }], ngImport: i0, template: `
|
|
104
|
-
<div class="
|
|
105
|
-
<div class="mx-auto mt-
|
|
143
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxNumberCheckComponent, isStandalone: true, selector: "spx-number-check", inputs: { spxAction: "spxAction", spxSimpleMode: "spxSimpleMode", spxPincode: "spxPincode", txtCancel: "txtCancel", txtConfirm: "txtConfirm", txtConfirmMessage: "txtConfirmMessage", txtReset: "txtReset" }, outputs: { spxCancel: "spxCancel", spxConfirm: "spxConfirm" }, host: { listeners: { "spxChange": "handleChangeEvent($event)" } }, viewQueries: [{ propertyName: "viewChild1", first: true, predicate: ["viewChild1"], descendants: true }, { propertyName: "viewChild2", first: true, predicate: ["viewChild2"], descendants: true }, { propertyName: "viewChild3", first: true, predicate: ["viewChild3"], descendants: true }, { propertyName: "viewChild4", first: true, predicate: ["viewChild4"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
144
|
+
<div class="fixed top-0 left-0 right-0 bottom-0 z-40 bg-black">
|
|
145
|
+
<div class="mx-auto mt-32 max-w-96 bg-black rounded-lg">
|
|
106
146
|
<div class="flex flex-col gap-3 p-3">
|
|
107
147
|
<div class="bg-yellow-300 text-black text-center rounded p-3 text-xl">
|
|
108
148
|
<div class="font-bold">{{ this.spxAction }}</div>
|
|
109
149
|
{{ this.txtConfirmMessage }}
|
|
110
150
|
</div>
|
|
111
|
-
<form class="block grid grid-cols-4 gap-3" [formGroup]="this.form" (ngSubmit)="null">
|
|
112
|
-
<input #viewChild1 [formControl]="ctrl1" type="text" autofocus class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" [class.bg-red-
|
|
113
|
-
<input [formControl]="ctrl2" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" [class.bg-red-
|
|
114
|
-
<input [formControl]="ctrl3" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" [class.bg-red-
|
|
115
|
-
<input [formControl]="ctrl4" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" [class.bg-red-
|
|
151
|
+
<form *ngIf="!this.spxSimpleMode" class="block grid grid-cols-4 gap-3" [formGroup]="this.form" (ngSubmit)="null">
|
|
152
|
+
<input #viewChild1 [formControl]="ctrl1" type="text" autofocus class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
153
|
+
<input #viewChild2 [formControl]="ctrl2" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
154
|
+
<input #viewChild3 [formControl]="ctrl3" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
155
|
+
<input #viewChild4 [formControl]="ctrl4" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
116
156
|
</form>
|
|
117
157
|
<spx-button
|
|
158
|
+
*ngIf="this.spxSimpleMode"
|
|
159
|
+
[spxFullWidth]="true"
|
|
160
|
+
[spxSeverity]="this.severitySuccess"
|
|
161
|
+
(spxClick)="this.handleConfirm()"
|
|
162
|
+
>{{ this.txtConfirm }}</spx-button>
|
|
163
|
+
<spx-button
|
|
164
|
+
*ngIf="!this.spxSimpleMode"
|
|
118
165
|
[spxFullWidth]="true"
|
|
119
166
|
[spxSeverity]="this.severityWarning"
|
|
120
167
|
(spxClick)="this.handleReset()"
|
|
@@ -127,7 +174,7 @@ class SpxNumberCheckComponent {
|
|
|
127
174
|
</div>
|
|
128
175
|
</div>
|
|
129
176
|
</div>
|
|
130
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { 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"] }] }); }
|
|
177
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { 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"] }] }); }
|
|
131
178
|
}
|
|
132
179
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxNumberCheckComponent, decorators: [{
|
|
133
180
|
type: Component,
|
|
@@ -144,20 +191,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
144
191
|
ReactiveFormsModule,
|
|
145
192
|
],
|
|
146
193
|
template: `
|
|
147
|
-
<div class="
|
|
148
|
-
<div class="mx-auto mt-
|
|
194
|
+
<div class="fixed top-0 left-0 right-0 bottom-0 z-40 bg-black">
|
|
195
|
+
<div class="mx-auto mt-32 max-w-96 bg-black rounded-lg">
|
|
149
196
|
<div class="flex flex-col gap-3 p-3">
|
|
150
197
|
<div class="bg-yellow-300 text-black text-center rounded p-3 text-xl">
|
|
151
198
|
<div class="font-bold">{{ this.spxAction }}</div>
|
|
152
199
|
{{ this.txtConfirmMessage }}
|
|
153
200
|
</div>
|
|
154
|
-
<form class="block grid grid-cols-4 gap-3" [formGroup]="this.form" (ngSubmit)="null">
|
|
155
|
-
<input #viewChild1 [formControl]="ctrl1" type="text" autofocus class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" [class.bg-red-
|
|
156
|
-
<input [formControl]="ctrl2" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" [class.bg-red-
|
|
157
|
-
<input [formControl]="ctrl3" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" [class.bg-red-
|
|
158
|
-
<input [formControl]="ctrl4" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" [class.bg-red-
|
|
201
|
+
<form *ngIf="!this.spxSimpleMode" class="block grid grid-cols-4 gap-3" [formGroup]="this.form" (ngSubmit)="null">
|
|
202
|
+
<input #viewChild1 [formControl]="ctrl1" type="text" autofocus class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
203
|
+
<input #viewChild2 [formControl]="ctrl2" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
204
|
+
<input #viewChild3 [formControl]="ctrl3" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
205
|
+
<input #viewChild4 [formControl]="ctrl4" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
159
206
|
</form>
|
|
160
207
|
<spx-button
|
|
208
|
+
*ngIf="this.spxSimpleMode"
|
|
209
|
+
[spxFullWidth]="true"
|
|
210
|
+
[spxSeverity]="this.severitySuccess"
|
|
211
|
+
(spxClick)="this.handleConfirm()"
|
|
212
|
+
>{{ this.txtConfirm }}</spx-button>
|
|
213
|
+
<spx-button
|
|
214
|
+
*ngIf="!this.spxSimpleMode"
|
|
161
215
|
[spxFullWidth]="true"
|
|
162
216
|
[spxSeverity]="this.severityWarning"
|
|
163
217
|
(spxClick)="this.handleReset()"
|
|
@@ -174,10 +228,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
174
228
|
}]
|
|
175
229
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { spxAction: [{
|
|
176
230
|
type: Input
|
|
231
|
+
}], spxSimpleMode: [{
|
|
232
|
+
type: Input
|
|
177
233
|
}], spxPincode: [{
|
|
178
234
|
type: Input
|
|
179
235
|
}], txtCancel: [{
|
|
180
236
|
type: Input
|
|
237
|
+
}], txtConfirm: [{
|
|
238
|
+
type: Input
|
|
181
239
|
}], txtConfirmMessage: [{
|
|
182
240
|
type: Input
|
|
183
241
|
}], txtReset: [{
|
|
@@ -189,6 +247,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
189
247
|
}], viewChild1: [{
|
|
190
248
|
type: ViewChild,
|
|
191
249
|
args: ['viewChild1']
|
|
250
|
+
}], viewChild2: [{
|
|
251
|
+
type: ViewChild,
|
|
252
|
+
args: ['viewChild2']
|
|
253
|
+
}], viewChild3: [{
|
|
254
|
+
type: ViewChild,
|
|
255
|
+
args: ['viewChild3']
|
|
256
|
+
}], viewChild4: [{
|
|
257
|
+
type: ViewChild,
|
|
258
|
+
args: ['viewChild4']
|
|
192
259
|
}] } });
|
|
193
260
|
|
|
194
261
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-number-check.mjs","sources":["../../../../projects/softpak/components/spx-number-check/spx-number-check.component.ts","../../../../projects/softpak/components/spx-number-check/softpak-components-spx-number-check.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'spx-number-check',\n standalone: true,\n host: {\n '(spxChange)': 'handleChangeEvent($event)'\n },\n imports: [\n NgIf,\n SpxButtonComponent,\n FormsModule,\n ReactiveFormsModule,\n ],\n template: `\n <div class=\"absolute top-0 left-0 right-0 bottom-0 z-40 bg-black/60\">\n <div class=\"mx-auto mt-16 max-w-96 bg-black rounded-lg\">\n <div class=\"flex flex-col gap-3 p-3\">\n <div class=\"bg-yellow-300 text-black text-center rounded p-3 text-xl\">\n <div class=\"font-bold\">{{ this.spxAction }}</div>\n {{ this.txtConfirmMessage }}\n </div>\n <form class=\"block grid grid-cols-4 gap-3\" [formGroup]=\"this.form\" (ngSubmit)=\"null\">\n <input #viewChild1 [formControl]=\"ctrl1\" type=\"text\" autofocus class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\" [class.bg-red-200]=\"this.denied\" [class.bg-teal-200]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" />\n <input [formControl]=\"ctrl2\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\" [class.bg-red-200]=\"this.denied\" [class.bg-teal-200]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" />\n <input [formControl]=\"ctrl3\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\" [class.bg-red-200]=\"this.denied\" [class.bg-teal-200]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" />\n <input [formControl]=\"ctrl4\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\" [class.bg-red-200]=\"this.denied\" [class.bg-teal-200]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" />\n </form>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityWarning\"\n (spxClick)=\"this.handleReset()\"\n >{{ this.txtReset }}</spx-button>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityError\"\n (spxClick)=\"this.handleCancel()\"\n >{{ this.txtCancel }}</spx-button>\n </div>\n </div>\n </div>\n `,\n})\nexport class SpxNumberCheckComponent implements OnInit, OnDestroy {\n @Input() spxAction!: string;\n @Input() spxPincode!: string;\n @Input() txtCancel!: string;\n @Input() txtConfirmMessage!: string;\n @Input() txtReset!: string;\n @Output() spxCancel: EventEmitter<void> = new EventEmitter<void>();\n @Output() spxConfirm: EventEmitter<void> = new EventEmitter<void>();\n @ViewChild('viewChild1') viewChild1!: ElementRef<HTMLInputElement>;\n form!: FormGroup;\n severityError = SpxSeverityEnum.error;\n severityWarning = SpxSeverityEnum.warning;\n accepted = false;\n denied = false;\n listenToTyping?: Subscription;\n\n get ctrl1(): FormControl { return this.form.get('ctrl1') as FormControl; }\n get ctrl2(): FormControl { return this.form.get('ctrl2') as FormControl; }\n get ctrl3(): FormControl { return this.form.get('ctrl3') as FormControl; }\n get ctrl4(): FormControl { return this.form.get('ctrl4') as FormControl; }\n\n constructor(private readonly formBuilder: FormBuilder) {\n this.form = this.formBuilder.group({\n ctrl1: [null, []],\n ctrl2: [null, []],\n ctrl3: [null, []],\n ctrl4: [null, []],\n });\n }\n\n ngOnInit(): void {\n this.listenToTyping = this.form.valueChanges.subscribe(() => {\n this.accepted = false;\n this.denied = false;\n if (this.ctrl1.value && this.ctrl2.value && this.ctrl3.value && this.ctrl4.value) {\n this.checkPincode();\n }\n });\n }\n\n ngOnDestroy(): void {\n if (this.listenToTyping) {\n this.listenToTyping.unsubscribe();\n } \n }\n\n handleCancel(): void {\n console.log('spxContainerConfirm: spxCancel');\n this.spxCancel.emit();\n }\n\n handleReset(): void {\n this.ctrl1.reset();\n this.ctrl2.reset();\n this.ctrl3.reset();\n this.ctrl4.reset();\n this.viewChild1.nativeElement.focus();\n this.accepted = false;\n this.denied = false;\n }\n\n onDigitInput(event: any) {\n let element: any;\n if (\n event.code === 'Digit0' ||\n event.code === 'Digit1' ||\n event.code === 'Digit2' ||\n event.code === 'Digit3' ||\n event.code === 'Digit4' ||\n event.code === 'Digit5' ||\n event.code === 'Digit6' ||\n event.code === 'Digit7' ||\n event.code === 'Digit8' ||\n event.code === 'Digit9' ||\n event.code === 'Numpad0' ||\n event.code === 'Numpad1' ||\n event.code === 'Numpad2' ||\n event.code === 'Numpad3' ||\n event.code === 'Numpad4' ||\n event.code === 'Numpad5' ||\n event.code === 'Numpad6' ||\n event.code === 'Numpad7' ||\n event.code === 'Numpad8' ||\n event.code === 'Numpad9') {\n element = event.srcElement.nextElementSibling;\n }\n if (element == null) {\n return;\n }\n else {\n setTimeout(() => { element.focus(); });\n }\n }\n\n onBackspace(event: any) {\n event.srcElement.previousElementSibling.focus();\n }\n\n private checkPincode(): void {\n if (this.spxPincode === `${this.ctrl1.value}${this.ctrl2.value}${this.ctrl3.value}${this.ctrl4.value}`) {\n this.accepted = true;\n setTimeout(() => {\n console.log('spxContainerConfirm: spxConfirm');\n this.spxConfirm.emit();\n }, 500);\n } else {\n this.denied = true;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAgDa,uBAAuB,CAAA;AAgBlC,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E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,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,aAAa,EAAE,2BAA2B;AAC3C,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,IAAI;wBACJ,kBAAkB;wBAClB,WAAW;wBACX,mBAAmB;AACpB,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BT,EAAA,CAAA;AACF,iBAAA,CAAA;gFAEU,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,iBAAiB,EAAA,CAAA;sBAAzB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACI,SAAS,EAAA,CAAA;sBAAlB,MAAM;gBACG,UAAU,EAAA,CAAA;sBAAnB,MAAM;gBACkB,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;;;ACxDzB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-number-check.mjs","sources":["../../../../projects/softpak/components/spx-number-check/spx-number-check.component.ts","../../../../projects/softpak/components/spx-number-check/softpak-components-spx-number-check.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'spx-number-check',\n standalone: true,\n host: {\n '(spxChange)': 'handleChangeEvent($event)'\n },\n imports: [\n NgIf,\n SpxButtonComponent,\n FormsModule,\n ReactiveFormsModule,\n ],\n template: `\n <div class=\"fixed top-0 left-0 right-0 bottom-0 z-40 bg-black\">\n <div class=\"mx-auto mt-32 max-w-96 bg-black rounded-lg\">\n <div class=\"flex flex-col gap-3 p-3\">\n <div class=\"bg-yellow-300 text-black text-center rounded p-3 text-xl\">\n <div class=\"font-bold\">{{ this.spxAction }}</div>\n {{ this.txtConfirmMessage }}\n </div>\n <form *ngIf=\"!this.spxSimpleMode\" class=\"block grid grid-cols-4 gap-3\" [formGroup]=\"this.form\" (ngSubmit)=\"null\">\n <input #viewChild1 [formControl]=\"ctrl1\" type=\"text\" autofocus class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild2 [formControl]=\"ctrl2\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild3 [formControl]=\"ctrl3\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild4 [formControl]=\"ctrl4\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n </form>\n <spx-button\n *ngIf=\"this.spxSimpleMode\"\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severitySuccess\"\n (spxClick)=\"this.handleConfirm()\"\n >{{ this.txtConfirm }}</spx-button>\n <spx-button\n *ngIf=\"!this.spxSimpleMode\"\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityWarning\"\n (spxClick)=\"this.handleReset()\"\n >{{ this.txtReset }}</spx-button>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityError\"\n (spxClick)=\"this.handleCancel()\"\n >{{ this.txtCancel }}</spx-button>\n </div>\n </div>\n </div>\n `,\n})\nexport class SpxNumberCheckComponent implements OnChanges, OnInit, OnDestroy {\n @Input() spxAction!: string;\n @Input() spxSimpleMode = false;\n @Input() spxPincode!: string;\n @Input() txtCancel!: string;\n @Input() txtConfirm!: string;\n @Input() txtConfirmMessage!: string;\n @Input() txtReset!: string;\n @Output() spxCancel: EventEmitter<void> = new EventEmitter<void>();\n @Output() spxConfirm: EventEmitter<void> = new EventEmitter<void>();\n @ViewChild('viewChild1') viewChild1!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild2') viewChild2!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild3') viewChild3!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild4') viewChild4!: ElementRef<HTMLInputElement>;\n form!: FormGroup;\n severityError = SpxSeverityEnum.error;\n severitySuccess = SpxSeverityEnum.success;\n severityWarning = SpxSeverityEnum.warning;\n accepted = false;\n denied = false;\n listenToCtrl1?: Subscription;\n listenToCtrl2?: Subscription;\n listenToCtrl3?: Subscription;\n listenToCtrl4?: Subscription;\n listenToTyping?: Subscription;\n\n get ctrl1(): FormControl { return this.form.get('ctrl1') as FormControl; }\n get ctrl2(): FormControl { return this.form.get('ctrl2') as FormControl; }\n get ctrl3(): FormControl { return this.form.get('ctrl3') as FormControl; }\n get ctrl4(): FormControl { return this.form.get('ctrl4') as FormControl; }\n\n constructor(private readonly formBuilder: FormBuilder) {\n this.form = this.formBuilder.group({\n ctrl1: [null, []],\n ctrl2: [null, []],\n ctrl3: [null, []],\n ctrl4: [null, []],\n });\n }\n\n ngOnInit(): void {\n this.listenToTyping = this.form.valueChanges.subscribe(() => {\n this.accepted = false;\n this.denied = false;\n if (this.ctrl1.value && this.ctrl2.value && this.ctrl3.value && this.ctrl4.value) {\n this.checkPincode();\n }\n });\n\n this.listenToCtrl1 = this.ctrl1.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild2.nativeElement.focus();\n } else {\n\n }\n });\n\n this.listenToCtrl2 = this.ctrl2.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild3.nativeElement.focus();\n } else {\n\n }\n });\n\n this.listenToCtrl3 = this.ctrl3.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild4.nativeElement.focus();\n } else {\n\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n setTimeout(() => {\n if (this?.viewChild1?.nativeElement) {\n this.viewChild1.nativeElement.focus();\n }\n }, 0);\n }\n\n ngOnDestroy(): void {\n if (this.listenToTyping) {\n this.listenToTyping.unsubscribe();\n }\n if (this.listenToCtrl1) {\n this.listenToCtrl1.unsubscribe();\n } \n if (this.listenToCtrl2) {\n this.listenToCtrl2.unsubscribe();\n } \n if (this.listenToCtrl3) {\n this.listenToCtrl3.unsubscribe();\n } \n }\n\n handleCancel(): void {\n this.spxCancel.emit();\n }\n\n handleConfirm(): void {\n this.spxConfirm.emit();\n }\n\n handleReset(): void {\n this.ctrl1.reset();\n this.ctrl2.reset();\n this.ctrl3.reset();\n this.ctrl4.reset();\n this.viewChild1.nativeElement.focus();\n this.accepted = false;\n this.denied = false;\n }\n\n onDigitInput(event: any) {\n let element: any;\n if (\n event.code === 'Digit0' ||\n event.code === 'Digit1' ||\n event.code === 'Digit2' ||\n event.code === 'Digit3' ||\n event.code === 'Digit4' ||\n event.code === 'Digit5' ||\n event.code === 'Digit6' ||\n event.code === 'Digit7' ||\n event.code === 'Digit8' ||\n event.code === 'Digit9' ||\n event.code === 'Numpad0' ||\n event.code === 'Numpad1' ||\n event.code === 'Numpad2' ||\n event.code === 'Numpad3' ||\n event.code === 'Numpad4' ||\n event.code === 'Numpad5' ||\n event.code === 'Numpad6' ||\n event.code === 'Numpad7' ||\n event.code === 'Numpad8' ||\n event.code === 'Numpad9') {\n element = event.srcElement.nextElementSibling;\n }\n if (element == null) {\n return;\n }\n else {\n // setTimeout(() => { element.focus(); });\n }\n }\n\n onBackspace(event: any) {\n event.srcElement.previousElementSibling.focus();\n }\n\n private checkPincode(): void {\n if (this.spxPincode === `${this.ctrl1.value}${this.ctrl2.value}${this.ctrl3.value}${this.ctrl4.value}`) {\n this.accepted = true;\n setTimeout(() => {\n this.spxConfirm.emit();\n }, 500);\n } else {\n this.denied = true;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAuDa,uBAAuB,CAAA;AA0BlC,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAE1E,IAAA,WAAA,CAA6B,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QA7B5C,IAAa,CAAA,aAAA,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K;gBACG,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,iBAAiB,EAAA,CAAA;sBAAzB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACI,SAAS,EAAA,CAAA;sBAAlB,MAAM;gBACG,UAAU,EAAA,CAAA;sBAAnB,MAAM;gBACkB,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;;;ACpEzB;;AAEG;;;;"}
|
|
@@ -4,14 +4,17 @@ import { Component, Input } from '@angular/core';
|
|
|
4
4
|
class SpxSuggestionComponent {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.spxDisabled = false;
|
|
7
|
+
this.spxFocused = false;
|
|
7
8
|
this.spxSelected = false;
|
|
9
|
+
this.spxTabbable = false;
|
|
8
10
|
}
|
|
9
11
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxSuggestionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxSuggestionComponent, isStandalone: true, selector: "spx-suggestion", inputs: { spxDisabled: "spxDisabled", spxSelected: "spxSelected" }, ngImport: i0, template: `<button
|
|
11
|
-
|
|
12
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxSuggestionComponent, isStandalone: true, selector: "spx-suggestion", inputs: { spxDisabled: "spxDisabled", spxFocused: "spxFocused", spxSelected: "spxSelected", spxTabbable: "spxTabbable" }, ngImport: i0, template: `<button
|
|
13
|
+
type="button"
|
|
14
|
+
class="spx-suggestion block rounded text-gray-900 text-sm p-3 w-full text-left truncate outline-none"
|
|
12
15
|
[class.bg-sky-100]="!this.spxSelected && !this.spxDisabled"
|
|
13
|
-
[class.focus:ring-sky-
|
|
14
|
-
[class.hover:bg-sky-
|
|
16
|
+
[class.focus:ring-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
17
|
+
[class.hover:bg-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
15
18
|
[class.active:bg-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
16
19
|
[class.bg-gray-200]="this.spxDisabled && !this.spxSelected"
|
|
17
20
|
[class.bg-gray-400]="this.spxDisabled && this.spxSelected"
|
|
@@ -19,7 +22,12 @@ class SpxSuggestionComponent {
|
|
|
19
22
|
[class.opacity-60]="this.spxDisabled"
|
|
20
23
|
[class.bg-teal-500]="this.spxSelected && !this.spxDisabled"
|
|
21
24
|
[class.font-bold]="this.spxSelected"
|
|
22
|
-
[attr.tabindex]="
|
|
25
|
+
[attr.tabindex]="this.spxTabbable && !this.spxDisabled ? 0 : -1"
|
|
26
|
+
[class.ring-2]="this.spxFocused && this.spxTabbable && !this.spxDisabled"
|
|
27
|
+
[class.ring-offset-2]="this.spxFocused && this.spxTabbable && !this.spxDisabled"
|
|
28
|
+
[class.ring-blue-500]="this.spxFocused && this.spxTabbable && !this.spxDisabled">
|
|
29
|
+
<div class="text-ellipsis overflow-hidden whitespace-nowrap"><ng-content></ng-content></div>
|
|
30
|
+
</button>`, isInline: true }); }
|
|
23
31
|
}
|
|
24
32
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxSuggestionComponent, decorators: [{
|
|
25
33
|
type: Component,
|
|
@@ -27,10 +35,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
27
35
|
selector: 'spx-suggestion',
|
|
28
36
|
standalone: true,
|
|
29
37
|
template: `<button
|
|
30
|
-
|
|
38
|
+
type="button"
|
|
39
|
+
class="spx-suggestion block rounded text-gray-900 text-sm p-3 w-full text-left truncate outline-none"
|
|
31
40
|
[class.bg-sky-100]="!this.spxSelected && !this.spxDisabled"
|
|
32
|
-
[class.focus:ring-sky-
|
|
33
|
-
[class.hover:bg-sky-
|
|
41
|
+
[class.focus:ring-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
42
|
+
[class.hover:bg-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
34
43
|
[class.active:bg-sky-300]="!this.spxSelected && !this.spxDisabled"
|
|
35
44
|
[class.bg-gray-200]="this.spxDisabled && !this.spxSelected"
|
|
36
45
|
[class.bg-gray-400]="this.spxDisabled && this.spxSelected"
|
|
@@ -38,12 +47,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
38
47
|
[class.opacity-60]="this.spxDisabled"
|
|
39
48
|
[class.bg-teal-500]="this.spxSelected && !this.spxDisabled"
|
|
40
49
|
[class.font-bold]="this.spxSelected"
|
|
41
|
-
[attr.tabindex]="-1"
|
|
50
|
+
[attr.tabindex]="this.spxTabbable && !this.spxDisabled ? 0 : -1"
|
|
51
|
+
[class.ring-2]="this.spxFocused && this.spxTabbable && !this.spxDisabled"
|
|
52
|
+
[class.ring-offset-2]="this.spxFocused && this.spxTabbable && !this.spxDisabled"
|
|
53
|
+
[class.ring-blue-500]="this.spxFocused && this.spxTabbable && !this.spxDisabled">
|
|
54
|
+
<div class="text-ellipsis overflow-hidden whitespace-nowrap"><ng-content></ng-content></div>
|
|
55
|
+
</button>`,
|
|
42
56
|
}]
|
|
43
57
|
}], propDecorators: { spxDisabled: [{
|
|
44
58
|
type: Input
|
|
59
|
+
}], spxFocused: [{
|
|
60
|
+
type: Input
|
|
45
61
|
}], spxSelected: [{
|
|
46
62
|
type: Input
|
|
63
|
+
}], spxTabbable: [{
|
|
64
|
+
type: Input
|
|
47
65
|
}] } });
|
|
48
66
|
|
|
49
67
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-suggestion.mjs","sources":["../../../../projects/softpak/components/spx-suggestion/spx-suggestion.component.ts","../../../../projects/softpak/components/spx-suggestion/softpak-components-spx-suggestion.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'spx-suggestion',\n standalone: true,\n template: `<button\n class=\"spx-suggestion block rounded text-gray-900 text-sm p-3 w-full text-
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-suggestion.mjs","sources":["../../../../projects/softpak/components/spx-suggestion/spx-suggestion.component.ts","../../../../projects/softpak/components/spx-suggestion/softpak-components-spx-suggestion.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'spx-suggestion',\n standalone: true,\n template: `<button\n type=\"button\"\n class=\"spx-suggestion block rounded text-gray-900 text-sm p-3 w-full text-left truncate outline-none\"\n [class.bg-sky-100]=\"!this.spxSelected && !this.spxDisabled\"\n [class.focus:ring-sky-300]=\"!this.spxSelected && !this.spxDisabled\"\n [class.hover:bg-sky-300]=\"!this.spxSelected && !this.spxDisabled\"\n [class.active:bg-sky-300]=\"!this.spxSelected && !this.spxDisabled\"\n [class.bg-gray-200]=\"this.spxDisabled && !this.spxSelected\"\n [class.bg-gray-400]=\"this.spxDisabled && this.spxSelected\"\n [class.cursor-not-allowed]=\"this.spxDisabled\"\n [class.opacity-60]=\"this.spxDisabled\"\n [class.bg-teal-500]=\"this.spxSelected && !this.spxDisabled\"\n [class.font-bold]=\"this.spxSelected\"\n [attr.tabindex]=\"this.spxTabbable && !this.spxDisabled ? 0 : -1\"\n [class.ring-2]=\"this.spxFocused && this.spxTabbable && !this.spxDisabled\"\n [class.ring-offset-2]=\"this.spxFocused && this.spxTabbable && !this.spxDisabled\"\n [class.ring-blue-500]=\"this.spxFocused && this.spxTabbable && !this.spxDisabled\">\n <div class=\"text-ellipsis overflow-hidden whitespace-nowrap\"><ng-content></ng-content></div>\n </button>`,\n})\nexport class SpxSuggestionComponent {\n @Input() spxDisabled = false;\n @Input() spxFocused = false;\n @Input() spxSelected = false;\n @Input() spxTabbable = false;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAyBa,sBAAsB,CAAA;AAvBnC,IAAA,WAAA,GAAA;QAwBW,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;QACpB,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;QACnB,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;QACpB,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AAC9B,KAAA;8GALY,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EApBvB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,UAAA,EAAA,YAAA,EAAA,WAAA,EAAA,aAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;AAkBE,aAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAED,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAvBlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;AAkBE,aAAA,CAAA;AACb,iBAAA,CAAA;8BAEU,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;;;AC7BR;;AAEG;;;;"}
|
|
@@ -51,7 +51,7 @@ class SpxUpdateInfoComponent {
|
|
|
51
51
|
<spx-input [formControl]="ctrlAppStoreVersion" [spxLabel]="txtAppStoreVersion | capitalize"
|
|
52
52
|
[spxReadonly]="true"></spx-input>
|
|
53
53
|
</div>
|
|
54
|
-
</form>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { 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"] }] }); }
|
|
54
|
+
</form>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
|
|
55
55
|
}
|
|
56
56
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxUpdateInfoComponent, decorators: [{
|
|
57
57
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-update.mjs","sources":["../../../../projects/softpak/components/spx-update/src/spx-update-info.component.ts","../../../../projects/softpak/components/spx-update/src/spx-update-progress.component.ts","../../../../projects/softpak/components/spx-update/softpak-components-spx-update.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxInputComponent } from '@softpak/components/spx-inputs';\n\nconst ctrlAppStoreVersion = 'appStoreVersion';\nconst ctrlChannel = 'channel';\nconst ctrlNextVersionNumber = 'nextVersionNumber';\nconst ctrlVersionNumber = 'versionNumber';\n\n@Component({\n selector: 'spx-update-info',\n template: `<form [formGroup]=\"form\" class=\"mt-3\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\n <spx-input [formControl]=\"ctrlVersionNumber\" [spxLabel]=\"txtVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlNextVersionNumber\" [spxLabel]=\"txtNextVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlConfiguredChannel\" [spxLabel]=\"txtChannel | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlAppStoreVersion\" [spxLabel]=\"txtAppStoreVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n </div>\n </form>`,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxCapitalizePipe,\n SpxInputComponent,\n ]\n})\nexport class SpxUpdateInfoComponent {\n form!: FormGroup;\n @Input() txtAppStoreVersion!: string;\n @Input() txtChannel!: string;\n @Input() txtNextVersion!: string;\n @Input() txtVersion!: string;\n \n get ctrlVersionNumber(): FormControl { return this.form.get(ctrlVersionNumber) as FormControl; }\n get ctrlNextVersionNumber(): FormControl { return this.form.get(ctrlNextVersionNumber) as FormControl; }\n get ctrlConfiguredChannel(): FormControl { return this.form.get(ctrlChannel) as FormControl; }\n get ctrlAppStoreVersion(): FormControl { return this.form.get(ctrlAppStoreVersion) as FormControl; }\n\n constructor(\n private readonly formBuilder: FormBuilder,\n ) {\n this.form = this.formBuilder.group({\n [ctrlAppStoreVersion]: [null, []],\n [ctrlChannel]: [null, []],\n [ctrlNextVersionNumber]: [null, []],\n [ctrlVersionNumber]: [null, []],\n });\n }\n\n update(appStoreVersion: string, channel: string, nextVersion: string, version: string) {\n this.ctrlVersionNumber.setValue({\n value: version,\n });\n this.ctrlNextVersionNumber.setValue({\n value: nextVersion,\n });\n this.ctrlConfiguredChannel.setValue({\n value: channel,\n });\n this.ctrlAppStoreVersion.setValue({\n value: appStoreVersion,\n });\n }\n}\n","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxProgressBarComponent } from '@softpak/components/spx-progress-bar';\n\n@Component({\n selector: 'spx-update-progress',\n template: `<spx-progress-bar [spxPercentage]=\"delayedPercentage\" [spxTitle]=\"title | capitalize\">\n </spx-progress-bar>`,\n standalone: true,\n imports: [\n SpxProgressBarComponent,\n SpxCapitalizePipe,\n ],\n})\nexport class SpxUpdateProgressComponent implements OnInit, OnDestroy {\n @Input() title!: string;\n @Input() percentage!: number;\n delayedPercentage!: number;\n syncTruckInterval?: any;\n \n ngOnInit(): void {\n this.startLoaderSync();\n }\n\n ngOnDestroy(): void {\n this.stopLoaderSync();\n }\n\n private startLoaderSync() {\n if (this.syncTruckInterval === null) {\n this.syncTruckInterval = setInterval(() => {\n this.delayedPercentage = this.percentage;\n }, 200);\n }\n }\n\n private stopLoaderSync() {\n if (this.syncTruckInterval !== null) {\n clearInterval(this.syncTruckInterval);\n this.syncTruckInterval = undefined;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAMA,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAC9C,MAAM,WAAW,GAAG,SAAS,CAAC;AAC9B,MAAM,qBAA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,EAAA,QAAA,EAAA,CAAA;sBACU,EAGlB,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,uBAAuB,+FACvB,iBAAiB,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGR,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAVtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE,CAAA;AACU,qBAAA,CAAA;AACpB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,uBAAuB;wBACvB,iBAAiB;AAClB,qBAAA;AACF,iBAAA,CAAA;8BAEU,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;;;AChBR;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-update.mjs","sources":["../../../../projects/softpak/components/spx-update/src/spx-update-info.component.ts","../../../../projects/softpak/components/spx-update/src/spx-update-progress.component.ts","../../../../projects/softpak/components/spx-update/softpak-components-spx-update.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxInputComponent } from '@softpak/components/spx-inputs';\n\nconst ctrlAppStoreVersion = 'appStoreVersion';\nconst ctrlChannel = 'channel';\nconst ctrlNextVersionNumber = 'nextVersionNumber';\nconst ctrlVersionNumber = 'versionNumber';\n\n@Component({\n selector: 'spx-update-info',\n template: `<form [formGroup]=\"form\" class=\"mt-3\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\n <spx-input [formControl]=\"ctrlVersionNumber\" [spxLabel]=\"txtVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlNextVersionNumber\" [spxLabel]=\"txtNextVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlConfiguredChannel\" [spxLabel]=\"txtChannel | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlAppStoreVersion\" [spxLabel]=\"txtAppStoreVersion | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n </div>\n </form>`,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxCapitalizePipe,\n SpxInputComponent,\n ]\n})\nexport class SpxUpdateInfoComponent {\n form!: FormGroup;\n @Input() txtAppStoreVersion!: string;\n @Input() txtChannel!: string;\n @Input() txtNextVersion!: string;\n @Input() txtVersion!: string;\n \n get ctrlVersionNumber(): FormControl { return this.form.get(ctrlVersionNumber) as FormControl; }\n get ctrlNextVersionNumber(): FormControl { return this.form.get(ctrlNextVersionNumber) as FormControl; }\n get ctrlConfiguredChannel(): FormControl { return this.form.get(ctrlChannel) as FormControl; }\n get ctrlAppStoreVersion(): FormControl { return this.form.get(ctrlAppStoreVersion) as FormControl; }\n\n constructor(\n private readonly formBuilder: FormBuilder,\n ) {\n this.form = this.formBuilder.group({\n [ctrlAppStoreVersion]: [null, []],\n [ctrlChannel]: [null, []],\n [ctrlNextVersionNumber]: [null, []],\n [ctrlVersionNumber]: [null, []],\n });\n }\n\n update(appStoreVersion: string, channel: string, nextVersion: string, version: string) {\n this.ctrlVersionNumber.setValue({\n value: version,\n });\n this.ctrlNextVersionNumber.setValue({\n value: nextVersion,\n });\n this.ctrlConfiguredChannel.setValue({\n value: channel,\n });\n this.ctrlAppStoreVersion.setValue({\n value: appStoreVersion,\n });\n }\n}\n","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxProgressBarComponent } from '@softpak/components/spx-progress-bar';\n\n@Component({\n selector: 'spx-update-progress',\n template: `<spx-progress-bar [spxPercentage]=\"delayedPercentage\" [spxTitle]=\"title | capitalize\">\n </spx-progress-bar>`,\n standalone: true,\n imports: [\n SpxProgressBarComponent,\n SpxCapitalizePipe,\n ],\n})\nexport class SpxUpdateProgressComponent implements OnInit, OnDestroy {\n @Input() title!: string;\n @Input() percentage!: number;\n delayedPercentage!: number;\n syncTruckInterval?: any;\n \n ngOnInit(): void {\n this.startLoaderSync();\n }\n\n ngOnDestroy(): void {\n this.stopLoaderSync();\n }\n\n private startLoaderSync() {\n if (this.syncTruckInterval === null) {\n this.syncTruckInterval = setInterval(() => {\n this.delayedPercentage = this.percentage;\n }, 200);\n }\n }\n\n private stopLoaderSync() {\n if (this.syncTruckInterval !== null) {\n clearInterval(this.syncTruckInterval);\n this.syncTruckInterval = undefined;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAMA,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAC9C,MAAM,WAAW,GAAG,SAAS,CAAC;AAC9B,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;AAClD,MAAM,iBAAiB,GAAG,eAAe,CAAC;MAyB7B,sBAAsB,CAAA;AAOjC,IAAA,IAAI,iBAAiB,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAgB,CAAC,EAAE;AAChG,IAAA,IAAI,qBAAqB,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAgB,CAAC,EAAE;AACxG,IAAA,IAAI,qBAAqB,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAgB,CAAC,EAAE;AAC9F,IAAA,IAAI,mBAAmB,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAgB,CAAC,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AK,EAAA,CAAA;sBAAb,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;;;AChBR;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { valuePairToValue } from '@softpak/components/spx-helpers';
|
|
2
2
|
import { DateTime } from 'luxon';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, Input, NgModule } from '@angular/core';
|
|
5
3
|
import * as i1 from '@angular/common';
|
|
6
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { Component, Input } from '@angular/core';
|
|
7
7
|
import { FormsModule } from '@angular/forms';
|
|
8
8
|
|
|
9
9
|
const spxValidatorRequired = () => (control) => {
|
|
@@ -179,11 +179,14 @@ class SpxValidateControlComponent {
|
|
|
179
179
|
return this.control.errors && this.control.errors['past'];
|
|
180
180
|
}
|
|
181
181
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxValidateControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
182
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxValidateControlComponent, selector: "spx-validate-control", inputs: { control: "control", label: "label", submitTried: "submitTried" }, ngImport: i0, template: "<ng-container *ngIf=\"control && control.errors && (control.touched || submitTried)\">\n <div *ngIf=\"maxLength\">'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\n <div *ngIf=\"minLength\">'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\n <div *ngIf=\"max\">The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\n <div *ngIf=\"min\">The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\n <div *ngIf=\"pattern\">The pattern of '{{ label }}' not valid.</div>\n <div *ngIf=\"required\">'{{ label }}' is required.</div>\n <div *ngIf=\"year\">Please choose a year between 1991 and the current year.</div>\n <div *ngIf=\"yearFuture\">Please choose a year between the current year and 2050.</div>\n <div *ngIf=\"month\">Please choose a valid month (a value between 01 and 12).</div>\n <div *ngIf=\"future\">The selected date may not be in the future.</div>\n <div *ngIf=\"past\">The selected date may not be in the past.</div>\n</ng-container>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
182
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxValidateControlComponent, isStandalone: true, selector: "spx-validate-control", inputs: { control: "control", label: "label", submitTried: "submitTried" }, ngImport: i0, template: "<ng-container *ngIf=\"control && control.errors && (control.touched || submitTried)\">\n <div *ngIf=\"maxLength\">'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\n <div *ngIf=\"minLength\">'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\n <div *ngIf=\"max\">The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\n <div *ngIf=\"min\">The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\n <div *ngIf=\"pattern\">The pattern of '{{ label }}' not valid.</div>\n <div *ngIf=\"required\">'{{ label }}' is required.</div>\n <div *ngIf=\"year\">Please choose a year between 1991 and the current year.</div>\n <div *ngIf=\"yearFuture\">Please choose a year between the current year and 2050.</div>\n <div *ngIf=\"month\">Please choose a valid month (a value between 01 and 12).</div>\n <div *ngIf=\"future\">The selected date may not be in the future.</div>\n <div *ngIf=\"past\">The selected date may not be in the past.</div>\n</ng-container>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }] }); }
|
|
183
183
|
}
|
|
184
184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxValidateControlComponent, decorators: [{
|
|
185
185
|
type: Component,
|
|
186
|
-
args: [{ selector: 'spx-validate-control',
|
|
186
|
+
args: [{ selector: 'spx-validate-control', imports: [
|
|
187
|
+
CommonModule,
|
|
188
|
+
FormsModule,
|
|
189
|
+
], standalone: true, template: "<ng-container *ngIf=\"control && control.errors && (control.touched || submitTried)\">\n <div *ngIf=\"maxLength\">'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\n <div *ngIf=\"minLength\">'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\n <div *ngIf=\"max\">The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\n <div *ngIf=\"min\">The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\n <div *ngIf=\"pattern\">The pattern of '{{ label }}' not valid.</div>\n <div *ngIf=\"required\">'{{ label }}' is required.</div>\n <div *ngIf=\"year\">Please choose a year between 1991 and the current year.</div>\n <div *ngIf=\"yearFuture\">Please choose a year between the current year and 2050.</div>\n <div *ngIf=\"month\">Please choose a valid month (a value between 01 and 12).</div>\n <div *ngIf=\"future\">The selected date may not be in the future.</div>\n <div *ngIf=\"past\">The selected date may not be in the past.</div>\n</ng-container>" }]
|
|
187
190
|
}], propDecorators: { control: [{
|
|
188
191
|
type: Input
|
|
189
192
|
}], label: [{
|
|
@@ -192,32 +195,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
192
195
|
type: Input
|
|
193
196
|
}] } });
|
|
194
197
|
|
|
195
|
-
class SpxValidationModule {
|
|
196
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
197
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.2", ngImport: i0, type: SpxValidationModule, declarations: [SpxValidateControlComponent], imports: [CommonModule,
|
|
198
|
-
FormsModule], exports: [SpxValidateControlComponent] }); }
|
|
199
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxValidationModule, imports: [CommonModule,
|
|
200
|
-
FormsModule] }); }
|
|
201
|
-
}
|
|
202
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxValidationModule, decorators: [{
|
|
203
|
-
type: NgModule,
|
|
204
|
-
args: [{
|
|
205
|
-
declarations: [
|
|
206
|
-
SpxValidateControlComponent
|
|
207
|
-
],
|
|
208
|
-
imports: [
|
|
209
|
-
CommonModule,
|
|
210
|
-
FormsModule,
|
|
211
|
-
],
|
|
212
|
-
exports: [
|
|
213
|
-
SpxValidateControlComponent
|
|
214
|
-
]
|
|
215
|
-
}]
|
|
216
|
-
}] });
|
|
217
|
-
|
|
218
198
|
/**
|
|
219
199
|
* Generated bundle index. Do not edit.
|
|
220
200
|
*/
|
|
221
201
|
|
|
222
|
-
export { SpxValidateControlComponent,
|
|
202
|
+
export { SpxValidateControlComponent, spxValidatorMax, spxValidatorMaxLength, spxValidatorMin, spxValidatorMinLength, spxValidatorPattern, spxValidatorRequired, spxValidatorYearAndMonth };
|
|
223
203
|
//# sourceMappingURL=softpak-components-spx-validation.mjs.map
|