@softpak/components 19.15.3 → 19.15.4-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/softpak-components-spx-alert.mjs +7 -6
- package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-app-expiry.mjs +23 -91
- package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-button.mjs +8 -22
- package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-card.mjs +17 -88
- package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +50 -70
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +23 -27
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-confirm.mjs +15 -10
- package/fesm2022/softpak-components-spx-confirm.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-section.mjs +8 -33
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +39 -53
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +2 -0
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +34 -89
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +91 -198
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-pagination.mjs +12 -21
- package/fesm2022/softpak-components-spx-pagination.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-patch.mjs +8 -39
- package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-progress-bar.mjs +8 -22
- package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-spinner.mjs +15 -160
- package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-stock-info.mjs +69 -124
- package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-toaster.mjs +36 -155
- package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +3 -3
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +68 -54
- package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
- package/package.json +28 -28
- package/spx-alert/spx-alert.component.d.ts +1 -1
- package/spx-app-expiry/spx-app-expiry.component.d.ts +14 -14
- package/spx-button/spx-button.component.d.ts +0 -3
- package/spx-card/spx-card-item/spx-card-item.component.d.ts +0 -1
- package/spx-card/spx-card.component.d.ts +8 -9
- package/spx-change-details/spx-change-details.component.d.ts +22 -23
- package/spx-check-digit/spx-check-digit.component.d.ts +9 -9
- package/spx-confirm/store/spx-confirm.actions.d.ts +8 -1
- package/spx-confirm/store/spx-confirm.effects.d.ts +1 -1
- package/spx-form-section/spx-form-section.component.d.ts +5 -5
- package/spx-form-view/spx-autocomplete-search.component.d.ts +15 -16
- package/spx-form-view/spx-form-view.component.d.ts +1 -1
- package/spx-navigation/public-api.d.ts +2 -2
- package/spx-navigation/spx-home-tile/spx-home-tile.component.d.ts +11 -0
- package/spx-navigation/{spx-home-tiles.component.d.ts → spx-home-tile/spx-home-tiles.component.d.ts} +2 -2
- package/spx-navigation/spx-navigation.component.d.ts +11 -8
- package/spx-number-check/spx-number-check.component.d.ts +26 -32
- package/spx-pagination/spx-pagination.component.d.ts +9 -10
- package/spx-patch/spx-patch.component.d.ts +4 -4
- package/spx-progress-bar/spx-progress-bar.component.d.ts +3 -3
- package/spx-spinner/spx-spinner.component.d.ts +3 -3
- package/spx-stock-info/spx-stock-info.component.d.ts +45 -46
- package/spx-toaster/src/spx-toaster-message.interface.d.ts +3 -1
- package/spx-toaster/src/spx-toaster.component.d.ts +7 -13
- package/spx-validation/spx-validate-control.component.d.ts +19 -19
- package/tailwind.css +1 -1
- package/spx-navigation/spx-home-tile.component.d.ts +0 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { valuePairToValue } from '@softpak/components/spx-helpers';
|
|
2
2
|
import { DateTime } from 'luxon';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component,
|
|
4
|
+
import { input, computed, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
5
5
|
import { FormsModule } from '@angular/forms';
|
|
6
6
|
|
|
7
7
|
const spxValidatorRequired = () => (control) => {
|
|
@@ -131,66 +131,80 @@ const spxValidatorYearAndMonth = (future) => (control) => {
|
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
class SpxValidateControlComponent {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
134
|
+
constructor() {
|
|
135
|
+
this.control = input.required();
|
|
136
|
+
this.label = input();
|
|
137
|
+
this.submitTried = input();
|
|
138
|
+
this.maxLength = computed(() => {
|
|
139
|
+
const control = this.control();
|
|
140
|
+
return control.errors && control.errors['maxlength'];
|
|
141
|
+
});
|
|
142
|
+
this.maxLengthRequiredLength = computed(() => {
|
|
143
|
+
const control = this.control();
|
|
144
|
+
return this.maxLength() && control.errors && control.errors['maxlength']['requiredLength'];
|
|
145
|
+
});
|
|
146
|
+
this.minLength = computed(() => {
|
|
147
|
+
const control = this.control();
|
|
148
|
+
return control.errors && control.errors['minlength'];
|
|
149
|
+
});
|
|
150
|
+
this.minLengthRequiredLength = computed(() => {
|
|
151
|
+
const control = this.control();
|
|
152
|
+
return this.minLength() && control.errors && control.errors['minlength']['requiredLength'];
|
|
153
|
+
});
|
|
154
|
+
this.max = computed(() => {
|
|
155
|
+
const control = this.control();
|
|
156
|
+
return control.errors && control.errors['max'];
|
|
157
|
+
});
|
|
158
|
+
this.maxRequiredMax = computed(() => {
|
|
159
|
+
const control = this.control();
|
|
160
|
+
return this.max() && control.errors && control.errors['max']['max'];
|
|
161
|
+
});
|
|
162
|
+
this.min = computed(() => {
|
|
163
|
+
const control = this.control();
|
|
164
|
+
return control.errors && control.errors['min'];
|
|
165
|
+
});
|
|
166
|
+
this.minRequiredMin = computed(() => {
|
|
167
|
+
const control = this.control();
|
|
168
|
+
return this.min() && control.errors && control.errors['min']['min'];
|
|
169
|
+
});
|
|
170
|
+
this.pattern = computed(() => {
|
|
171
|
+
const control = this.control();
|
|
172
|
+
return control.errors && control.errors['pattern'];
|
|
173
|
+
});
|
|
174
|
+
this.required = computed(() => {
|
|
175
|
+
const control = this.control();
|
|
176
|
+
return control.errors && control.errors['required'];
|
|
177
|
+
});
|
|
178
|
+
this.year = computed(() => {
|
|
179
|
+
const control = this.control();
|
|
180
|
+
return control.errors && control.errors['year'];
|
|
181
|
+
});
|
|
182
|
+
this.yearFuture = computed(() => {
|
|
183
|
+
const control = this.control();
|
|
184
|
+
return control.errors && control.errors['yearFuture'];
|
|
185
|
+
});
|
|
186
|
+
this.month = computed(() => {
|
|
187
|
+
const control = this.control();
|
|
188
|
+
return control.errors && control.errors['month'];
|
|
189
|
+
});
|
|
190
|
+
this.future = computed(() => {
|
|
191
|
+
const control = this.control();
|
|
192
|
+
return control.errors && control.errors['future'];
|
|
193
|
+
});
|
|
194
|
+
this.past = computed(() => {
|
|
195
|
+
const control = this.control();
|
|
196
|
+
return control.errors && control.errors['past'];
|
|
197
|
+
});
|
|
178
198
|
}
|
|
179
199
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxValidateControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
180
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxValidateControlComponent, isStandalone: true, selector: "spx-validate-control", inputs: { control: "control", label: "label", submitTried: "submitTried" }, ngImport: i0, template: "@if (control && control.errors && (control.touched || submitTried)) {\r\n @if (maxLength) {\r\n <div>'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\r\n }\r\n @if (minLength) {\r\n <div>'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\r\n }\r\n @if (max) {\r\n <div>The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\r\n }\r\n @if (min) {\r\n <div>The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\r\n }\r\n @if (pattern) {\r\n <div>The pattern of '{{ label }}' not valid.</div>\r\n }\r\n @if (required) {\r\n <div>'{{ label }}' is required.</div>\r\n }\r\n @if (year) {\r\n <div>Please choose a year between 1991 and the current year.</div>\r\n }\r\n @if (yearFuture) {\r\n <div>Please choose a year between the current year and 2050.</div>\r\n }\r\n @if (month) {\r\n <div>Please choose a valid month (a value between 01 and 12).</div>\r\n }\r\n @if (future) {\r\n <div>The selected date may not be in the future.</div>\r\n }\r\n @if (past) {\r\n <div>The selected date may not be in the past.</div>\r\n }\r\n}", dependencies: [{ kind: "ngmodule", type: FormsModule }] }); }
|
|
200
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxValidateControlComponent, isStandalone: true, selector: "spx-validate-control", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, submitTried: { classPropertyName: "submitTried", publicName: "submitTried", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (control() && control().errors && (control().touched || submitTried())) {\r\n @if (maxLength()) {\r\n <div>'{{ label() }}' is too long, the maximum length is {{ maxLengthRequiredLength() }}.</div>\r\n }\r\n @if (minLength()) {\r\n <div>'{{ label() }}' is too short, the minimum length is {{ minLengthRequiredLength() }}.</div>\r\n }\r\n @if (max()) {\r\n <div>The value of '{{ label() }}' is too high, the maximum is {{ maxRequiredMax() }}.</div>\r\n }\r\n @if (min()) {\r\n <div>The value of '{{ label() }}' is too low, the minimum is {{ minRequiredMin() }}.</div>\r\n }\r\n @if (pattern()) {\r\n <div>The pattern of '{{ label() }}' not valid.</div>\r\n }\r\n @if (required()) {\r\n <div>'{{ label() }}' is required.</div>\r\n }\r\n @if (year()) {\r\n <div>Please choose a year between 1991 and the current year.</div>\r\n }\r\n @if (yearFuture()) {\r\n <div>Please choose a year between the current year and 2050.</div>\r\n }\r\n @if (month()) {\r\n <div>Please choose a valid month (a value between 01 and 12).</div>\r\n }\r\n @if (future()) {\r\n <div>The selected date may not be in the future.</div>\r\n }\r\n @if (past()) {\r\n <div>The selected date may not be in the past.</div>\r\n }\r\n}", dependencies: [{ kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
181
201
|
}
|
|
182
202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxValidateControlComponent, decorators: [{
|
|
183
203
|
type: Component,
|
|
184
204
|
args: [{ selector: 'spx-validate-control', imports: [
|
|
185
205
|
FormsModule
|
|
186
|
-
], template: "@if (control && control.errors && (control.touched || submitTried)) {\r\n @if (maxLength) {\r\n <div>'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\r\n }\r\n @if (minLength) {\r\n <div>'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\r\n }\r\n @if (max) {\r\n <div>The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\r\n }\r\n @if (min) {\r\n <div>The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\r\n }\r\n @if (pattern) {\r\n <div>The pattern of '{{ label }}' not valid.</div>\r\n }\r\n @if (required) {\r\n <div>'{{ label }}' is required.</div>\r\n }\r\n @if (year) {\r\n <div>Please choose a year between 1991 and the current year.</div>\r\n }\r\n @if (yearFuture) {\r\n <div>Please choose a year between the current year and 2050.</div>\r\n }\r\n @if (month) {\r\n <div>Please choose a valid month (a value between 01 and 12).</div>\r\n }\r\n @if (future) {\r\n <div>The selected date may not be in the future.</div>\r\n }\r\n @if (past) {\r\n <div>The selected date may not be in the past.</div>\r\n }\r\n}" }]
|
|
187
|
-
}]
|
|
188
|
-
type: Input
|
|
189
|
-
}], label: [{
|
|
190
|
-
type: Input
|
|
191
|
-
}], submitTried: [{
|
|
192
|
-
type: Input
|
|
193
|
-
}] } });
|
|
206
|
+
], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control() && control().errors && (control().touched || submitTried())) {\r\n @if (maxLength()) {\r\n <div>'{{ label() }}' is too long, the maximum length is {{ maxLengthRequiredLength() }}.</div>\r\n }\r\n @if (minLength()) {\r\n <div>'{{ label() }}' is too short, the minimum length is {{ minLengthRequiredLength() }}.</div>\r\n }\r\n @if (max()) {\r\n <div>The value of '{{ label() }}' is too high, the maximum is {{ maxRequiredMax() }}.</div>\r\n }\r\n @if (min()) {\r\n <div>The value of '{{ label() }}' is too low, the minimum is {{ minRequiredMin() }}.</div>\r\n }\r\n @if (pattern()) {\r\n <div>The pattern of '{{ label() }}' not valid.</div>\r\n }\r\n @if (required()) {\r\n <div>'{{ label() }}' is required.</div>\r\n }\r\n @if (year()) {\r\n <div>Please choose a year between 1991 and the current year.</div>\r\n }\r\n @if (yearFuture()) {\r\n <div>Please choose a year between the current year and 2050.</div>\r\n }\r\n @if (month()) {\r\n <div>Please choose a valid month (a value between 01 and 12).</div>\r\n }\r\n @if (future()) {\r\n <div>The selected date may not be in the future.</div>\r\n }\r\n @if (past()) {\r\n <div>The selected date may not be in the past.</div>\r\n }\r\n}" }]
|
|
207
|
+
}] });
|
|
194
208
|
|
|
195
209
|
/**
|
|
196
210
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-validation.mjs","sources":["../../../../projects/softpak/components/spx-validation/required.validator.ts","../../../../projects/softpak/components/spx-validation/max.validator.ts","../../../../projects/softpak/components/spx-validation/maxlength.validator.ts","../../../../projects/softpak/components/spx-validation/min.validator.ts","../../../../projects/softpak/components/spx-validation/minlength.validator.ts","../../../../projects/softpak/components/spx-validation/pattern.validator.ts","../../../../projects/softpak/components/spx-validation/year-and-month.validator.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.html","../../../../projects/softpak/components/spx-validation/softpak-components-spx-validation.ts"],"sourcesContent":["import { AbstractControl, ValidationErrors } from '@angular/forms';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorRequired = () => (control: AbstractControl): ValidationErrors | null => {\r\n if (\r\n control &&\r\n valuePairToValue(control.value) === undefined ||\r\n valuePairToValue(control.value) === null ||\r\n valuePairToValue(control.value) === '' ||\r\n valuePairToValue(control.value) === 0\r\n ) {\r\n return { required: true };\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMax = (max: number) => (control: AbstractControl): { max: { max: number; actual: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\r\n if (!isNaN(value) && value > max) {\r\n return {\r\n max: {\r\n max,\r\n actual: value\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMaxLength = (maximumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { maxlength: { requiredLength: number; actualLength: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n let value = valuePairToValue(control.value);\r\n if (sanitizer) {\r\n value = sanitizer(value.toString());\r\n }\r\n if (value.toString().length > maximumLength) {\r\n return {\r\n maxlength: {\r\n requiredLength: maximumLength,\r\n actualLength: value.toString().length\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMin = (min: number) => (control: AbstractControl): { min: { min: number; actual: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\r\n\r\n if (!isNaN(value) && value < min) {\r\n return {\r\n min: {\r\n min,\r\n actual: value\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMinLength = (minimumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { minlength: { requiredLength: number; actualLength: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n let value = valuePairToValue(control.value);\r\n if (sanitizer) {\r\n value = sanitizer(value.toString());\r\n }\r\n if (value.toString().length < minimumLength) {\r\n return {\r\n minlength: {\r\n requiredLength: minimumLength,\r\n actualLength: value.toString().length\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\nimport { spxValidatorRequired } from './required.validator';\r\n\r\nexport const spxValidatorPattern = (matcher: RegExp) => (control: AbstractControl): ValidationErrors | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const matches = valuePairToValue(control.value).toString().match(matcher);\r\n if (matches === null || matches.length === 0) {\r\n return { pattern: true };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\r\n\r\nimport { DateTime } from 'luxon';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\nimport { spxValidatorRequired } from './required.validator';\r\n\r\nexport const spxValidatorYearAndMonth = (future?: boolean) => (control: AbstractControl): ValidationErrors | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const val = valuePairToValue(control.value);\r\n if (val.toUpperCase() !== 'ACEP') {\r\n const date = DateTime.fromISO(val);\r\n const year = date.year;\r\n const month = date.month;\r\n if (val.length < 6) {\r\n return {\r\n minlength: {\r\n requiredLength: 6,\r\n actualLength: val.length\r\n }\r\n };\r\n }\r\n if (month < 1 || month > 12) {\r\n return { month: true };\r\n }\r\n if (future) {\r\n if (year > 2050 || year < DateTime.now().year) {\r\n return { yearFuture: true };\r\n }\r\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') < DateTime.now()) {\r\n return { past: true };\r\n }\r\n } else {\r\n if (year < 1971 || year > DateTime.now().year) {\r\n return { year: true };\r\n }\r\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') > DateTime.now()) {\r\n return { future: true };\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n};\r\n","\r\nimport { Component, Input } from '@angular/core';\r\nimport { AbstractControl, FormsModule } from '@angular/forms';\r\n\r\n@Component({\r\n selector: 'spx-validate-control',\r\n templateUrl: './spx-validate-control.component.html',\r\n imports: [\r\n FormsModule\r\n ]\r\n})\r\nexport class SpxValidateControlComponent {\r\n @Input() control!: AbstractControl;\r\n @Input() label: string | unknown;\r\n @Input() submitTried!: boolean;\r\n\r\n get maxLength() {\r\n return this.control.errors && this.control.errors['maxlength'];\r\n }\r\n\r\n get maxLengthRequiredLength() {\r\n return this.maxLength && this.control.errors && this.control.errors['maxlength']['requiredLength'];\r\n }\r\n\r\n get minLength() {\r\n return this.control.errors && this.control.errors['minlength'];\r\n }\r\n\r\n get minLengthRequiredLength() {\r\n return this.minLength && this.control.errors && this.control.errors['minlength']['requiredLength'];\r\n }\r\n\r\n get max() {\r\n return this.control.errors && this.control.errors['max'];\r\n }\r\n\r\n get maxRequiredMax() {\r\n return this.max && this.control.errors && this.control.errors['max']['max'];\r\n }\r\n\r\n get min() {\r\n return this.control.errors && this.control.errors['min'];\r\n }\r\n\r\n get minRequiredMin() {\r\n return this.min && this.control.errors && this.control.errors['min']['min'];\r\n }\r\n\r\n get pattern() {\r\n return this.control.errors && this.control.errors['pattern'];\r\n }\r\n\r\n get required() {\r\n return this.control.errors && this.control.errors['required'];\r\n }\r\n\r\n get year() {\r\n return this.control.errors && this.control.errors['year'];\r\n }\r\n\r\n get yearFuture() {\r\n return this.control.errors && this.control.errors['yearFuture'];\r\n }\r\n\r\n get month() {\r\n return this.control.errors && this.control.errors['month'];\r\n }\r\n\r\n get future() {\r\n return this.control.errors && this.control.errors['future'];\r\n }\r\n\r\n get past() {\r\n return this.control.errors && this.control.errors['past'];\r\n }\r\n}\r\n","@if (control && control.errors && (control.touched || submitTried)) {\r\n @if (maxLength) {\r\n <div>'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\r\n }\r\n @if (minLength) {\r\n <div>'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\r\n }\r\n @if (max) {\r\n <div>The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\r\n }\r\n @if (min) {\r\n <div>The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\r\n }\r\n @if (pattern) {\r\n <div>The pattern of '{{ label }}' not valid.</div>\r\n }\r\n @if (required) {\r\n <div>'{{ label }}' is required.</div>\r\n }\r\n @if (year) {\r\n <div>Please choose a year between 1991 and the current year.</div>\r\n }\r\n @if (yearFuture) {\r\n <div>Please choose a year between the current year and 2050.</div>\r\n }\r\n @if (month) {\r\n <div>Please choose a valid month (a value between 01 and 12).</div>\r\n }\r\n @if (future) {\r\n <div>The selected date may not be in the future.</div>\r\n }\r\n @if (past) {\r\n <div>The selected date may not be in the past.</div>\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAGa,MAAA,oBAAoB,GAAG,MAAM,CAAC,OAAwB,KAA6B;AAC5F,IAAA,IACI,OAAO;AACP,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS;AAC7C,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI;AACxC,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE;QACtC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EACvC;AACE,QAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;;AAE7B,IAAA,OAAO,IAAI;AACf;;ACVO,MAAM,eAAe,GAAG,CAAC,GAAW,KAAK,CAAC,OAAwB,KAAqD;AAC1H,IAAA,IAAI,CAAC,oBAAoB,EAAE,CAAC,OAAO,CAAC,EAAE;AAClC,QAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC;QACtE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,K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xC,yrCAkCC,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED1BO,WAAW,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAGN,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAPvC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAEvB,OAAA,EAAA;wBACL;AACH,qBAAA,EAAA,QAAA,EAAA,yrCAAA,EAAA;8BAGM,OAAO,EAAA,CAAA;sBAAf;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,WAAW,EAAA,CAAA;sBAAnB;;;AEdH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-validation.mjs","sources":["../../../../projects/softpak/components/spx-validation/required.validator.ts","../../../../projects/softpak/components/spx-validation/max.validator.ts","../../../../projects/softpak/components/spx-validation/maxlength.validator.ts","../../../../projects/softpak/components/spx-validation/min.validator.ts","../../../../projects/softpak/components/spx-validation/minlength.validator.ts","../../../../projects/softpak/components/spx-validation/pattern.validator.ts","../../../../projects/softpak/components/spx-validation/year-and-month.validator.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.html","../../../../projects/softpak/components/spx-validation/softpak-components-spx-validation.ts"],"sourcesContent":["import { AbstractControl, ValidationErrors } from '@angular/forms';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorRequired = () => (control: AbstractControl): ValidationErrors | null => {\r\n if (\r\n control &&\r\n valuePairToValue(control.value) === undefined ||\r\n valuePairToValue(control.value) === null ||\r\n valuePairToValue(control.value) === '' ||\r\n valuePairToValue(control.value) === 0\r\n ) {\r\n return { required: true };\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMax = (max: number) => (control: AbstractControl): { max: { max: number; actual: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\r\n if (!isNaN(value) && value > max) {\r\n return {\r\n max: {\r\n max,\r\n actual: value\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMaxLength = (maximumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { maxlength: { requiredLength: number; actualLength: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n let value = valuePairToValue(control.value);\r\n if (sanitizer) {\r\n value = sanitizer(value.toString());\r\n }\r\n if (value.toString().length > maximumLength) {\r\n return {\r\n maxlength: {\r\n requiredLength: maximumLength,\r\n actualLength: value.toString().length\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMin = (min: number) => (control: AbstractControl): { min: { min: number; actual: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\r\n\r\n if (!isNaN(value) && value < min) {\r\n return {\r\n min: {\r\n min,\r\n actual: value\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl } from '@angular/forms';\r\nimport { spxValidatorRequired } from './required.validator';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\n\r\nexport const spxValidatorMinLength = (minimumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { minlength: { requiredLength: number; actualLength: number } } | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n let value = valuePairToValue(control.value);\r\n if (sanitizer) {\r\n value = sanitizer(value.toString());\r\n }\r\n if (value.toString().length < minimumLength) {\r\n return {\r\n minlength: {\r\n requiredLength: minimumLength,\r\n actualLength: value.toString().length\r\n }\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\nimport { spxValidatorRequired } from './required.validator';\r\n\r\nexport const spxValidatorPattern = (matcher: RegExp) => (control: AbstractControl): ValidationErrors | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const matches = valuePairToValue(control.value).toString().match(matcher);\r\n if (matches === null || matches.length === 0) {\r\n return { pattern: true };\r\n }\r\n }\r\n return null;\r\n};\r\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\r\n\r\nimport { DateTime } from 'luxon';\r\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\r\nimport { spxValidatorRequired } from './required.validator';\r\n\r\nexport const spxValidatorYearAndMonth = (future?: boolean) => (control: AbstractControl): ValidationErrors | null => {\r\n if (!spxValidatorRequired()(control)) {\r\n const val = valuePairToValue(control.value);\r\n if (val.toUpperCase() !== 'ACEP') {\r\n const date = DateTime.fromISO(val);\r\n const year = date.year;\r\n const month = date.month;\r\n if (val.length < 6) {\r\n return {\r\n minlength: {\r\n requiredLength: 6,\r\n actualLength: val.length\r\n }\r\n };\r\n }\r\n if (month < 1 || month > 12) {\r\n return { month: true };\r\n }\r\n if (future) {\r\n if (year > 2050 || year < DateTime.now().year) {\r\n return { yearFuture: true };\r\n }\r\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') < DateTime.now()) {\r\n return { past: true };\r\n }\r\n } else {\r\n if (year < 1971 || year > DateTime.now().year) {\r\n return { year: true };\r\n }\r\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') > DateTime.now()) {\r\n return { future: true };\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n};\r\n","\r\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\r\nimport { AbstractControl, FormsModule } from '@angular/forms';\r\n\r\n@Component({\r\n selector: 'spx-validate-control',\r\n templateUrl: './spx-validate-control.component.html',\r\n imports: [\r\n FormsModule\r\n ],\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SpxValidateControlComponent {\r\n readonly control = input.required<AbstractControl>();\r\n readonly label = input<string | unknown>();\r\n readonly submitTried = input<boolean>();\r\n\r\n maxLength = computed(() => {\r\n const control = this.control();\r\n return control.errors && control.errors['maxlength'];\r\n });\r\n\r\n maxLengthRequiredLength = computed(() => {\r\n const control = this.control();\r\n return this.maxLength() && control.errors && control.errors['maxlength']['requiredLength'];\r\n });\r\n\r\n minLength = computed(() => {\r\n const control = this.control();\r\n return control.errors && control.errors['minlength'];\r\n });\r\n\r\n minLengthRequiredLength = computed(() => {\r\n const control = this.control();\r\n return this.minLength() && control.errors && control.errors['minlength']['requiredLength'];\r\n });\r\n\r\n max = computed(() => {\r\n const control = this.control();\r\n return control.errors && control.errors['max'];\r\n });\r\n\r\n maxRequiredMax = computed(() => {\r\n const control = this.control();\r\n return this.max() && control.errors && control.errors['max']['max'];\r\n });\r\n\r\n min = computed(() => {\r\n const control = this.control();\r\n return control.errors && control.errors['min'];\r\n });\r\n\r\n minRequiredMin = computed(() => {\r\n const control = this.control();\r\n return this.min() && control.errors && control.errors['min']['min'];\r\n });\r\n\r\n pattern = computed(() => {\r\n const control = this.control();\r\n return control.errors && control.errors['pattern'];\r\n });\r\n\r\n required = computed(() => {\r\n const control = this.control();\r\n return control.errors && control.errors['required'];\r\n });\r\n\r\n year = computed(() => {\r\n const control = this.control();\r\n return control.errors && control.errors['year'];\r\n });\r\n\r\n yearFuture = computed(() => {\r\n const control = this.control();\r\n return control.errors && control.errors['yearFuture'];\r\n });\r\n\r\n month = computed(() => {\r\n const control = this.control();\r\n return control.errors && control.errors['month'];\r\n });\r\n\r\n future = computed(() => {\r\n const control = this.control();\r\n return control.errors && control.errors['future'];\r\n });\r\n\r\n past = computed(() => {\r\n const control = this.control();\r\n return control.errors && control.errors['past'];\r\n });\r\n}\r\n","@if (control() && control().errors && (control().touched || submitTried())) {\r\n @if (maxLength()) {\r\n <div>'{{ label() }}' is too long, the maximum length is {{ maxLengthRequiredLength() }}.</div>\r\n }\r\n @if (minLength()) {\r\n <div>'{{ label() }}' is too short, the minimum length is {{ minLengthRequiredLength() }}.</div>\r\n }\r\n @if (max()) {\r\n <div>The value of '{{ label() }}' is too high, the maximum is {{ maxRequiredMax() }}.</div>\r\n }\r\n @if (min()) {\r\n <div>The value of '{{ label() }}' is too low, the minimum is {{ minRequiredMin() }}.</div>\r\n }\r\n @if (pattern()) {\r\n <div>The pattern of '{{ label() }}' not valid.</div>\r\n }\r\n @if (required()) {\r\n <div>'{{ label() }}' is required.</div>\r\n }\r\n @if (year()) {\r\n <div>Please choose a year between 1991 and the current year.</div>\r\n }\r\n @if (yearFuture()) {\r\n <div>Please choose a year between the current year and 2050.</div>\r\n }\r\n @if (month()) {\r\n <div>Please choose a valid month (a value between 01 and 12).</div>\r\n }\r\n @if (future()) {\r\n <div>The selected date may not be in the future.</div>\r\n }\r\n @if (past()) {\r\n <div>The selected date may not be in the past.</div>\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAGa,MAAA,oBAAoB,GAAG,MAAM,CAAC,OAAwB,KAA6B;AAC5F,IAAA,IACI,OAAO;AACP,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS;AAC7C,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI;AACxC,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE;QACtC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EACvC;AACE,QAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;;AAE7B,IAAA,OAAO,IAAI;AACf;;ACVO,MAAM,eAAe,G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",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "19.x.x",
|
|
@@ -33,34 +33,34 @@
|
|
|
33
33
|
"types": "./spx-alert/index.d.ts",
|
|
34
34
|
"default": "./fesm2022/softpak-components-spx-alert.mjs"
|
|
35
35
|
},
|
|
36
|
-
"./spx-capitalize": {
|
|
37
|
-
"types": "./spx-capitalize/index.d.ts",
|
|
38
|
-
"default": "./fesm2022/softpak-components-spx-capitalize.mjs"
|
|
39
|
-
},
|
|
40
36
|
"./spx-app-configuration": {
|
|
41
37
|
"types": "./spx-app-configuration/index.d.ts",
|
|
42
38
|
"default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
|
|
43
39
|
},
|
|
44
|
-
"./spx-app-expiry": {
|
|
45
|
-
"types": "./spx-app-expiry/index.d.ts",
|
|
46
|
-
"default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
|
|
47
|
-
},
|
|
48
40
|
"./spx-button": {
|
|
49
41
|
"types": "./spx-button/index.d.ts",
|
|
50
42
|
"default": "./fesm2022/softpak-components-spx-button.mjs"
|
|
51
43
|
},
|
|
44
|
+
"./spx-capitalize": {
|
|
45
|
+
"types": "./spx-capitalize/index.d.ts",
|
|
46
|
+
"default": "./fesm2022/softpak-components-spx-capitalize.mjs"
|
|
47
|
+
},
|
|
48
|
+
"./spx-app-expiry": {
|
|
49
|
+
"types": "./spx-app-expiry/index.d.ts",
|
|
50
|
+
"default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
|
|
51
|
+
},
|
|
52
52
|
"./spx-card": {
|
|
53
53
|
"types": "./spx-card/index.d.ts",
|
|
54
54
|
"default": "./fesm2022/softpak-components-spx-card.mjs"
|
|
55
55
|
},
|
|
56
|
-
"./spx-channel-selection": {
|
|
57
|
-
"types": "./spx-channel-selection/index.d.ts",
|
|
58
|
-
"default": "./fesm2022/softpak-components-spx-channel-selection.mjs"
|
|
59
|
-
},
|
|
60
56
|
"./spx-change-details": {
|
|
61
57
|
"types": "./spx-change-details/index.d.ts",
|
|
62
58
|
"default": "./fesm2022/softpak-components-spx-change-details.mjs"
|
|
63
59
|
},
|
|
60
|
+
"./spx-channel-selection": {
|
|
61
|
+
"types": "./spx-channel-selection/index.d.ts",
|
|
62
|
+
"default": "./fesm2022/softpak-components-spx-channel-selection.mjs"
|
|
63
|
+
},
|
|
64
64
|
"./spx-check-digit": {
|
|
65
65
|
"types": "./spx-check-digit/index.d.ts",
|
|
66
66
|
"default": "./fesm2022/softpak-components-spx-check-digit.mjs"
|
|
@@ -69,14 +69,14 @@
|
|
|
69
69
|
"types": "./spx-form-section/index.d.ts",
|
|
70
70
|
"default": "./fesm2022/softpak-components-spx-form-section.mjs"
|
|
71
71
|
},
|
|
72
|
-
"./spx-form-view": {
|
|
73
|
-
"types": "./spx-form-view/index.d.ts",
|
|
74
|
-
"default": "./fesm2022/softpak-components-spx-form-view.mjs"
|
|
75
|
-
},
|
|
76
72
|
"./spx-helpers": {
|
|
77
73
|
"types": "./spx-helpers/index.d.ts",
|
|
78
74
|
"default": "./fesm2022/softpak-components-spx-helpers.mjs"
|
|
79
75
|
},
|
|
76
|
+
"./spx-form-view": {
|
|
77
|
+
"types": "./spx-form-view/index.d.ts",
|
|
78
|
+
"default": "./fesm2022/softpak-components-spx-form-view.mjs"
|
|
79
|
+
},
|
|
80
80
|
"./spx-confirm": {
|
|
81
81
|
"types": "./spx-confirm/index.d.ts",
|
|
82
82
|
"default": "./fesm2022/softpak-components-spx-confirm.mjs"
|
|
@@ -85,13 +85,21 @@
|
|
|
85
85
|
"types": "./spx-inputs/index.d.ts",
|
|
86
86
|
"default": "./fesm2022/softpak-components-spx-inputs.mjs"
|
|
87
87
|
},
|
|
88
|
+
"./spx-number-check": {
|
|
89
|
+
"types": "./spx-number-check/index.d.ts",
|
|
90
|
+
"default": "./fesm2022/softpak-components-spx-number-check.mjs"
|
|
91
|
+
},
|
|
88
92
|
"./spx-navigation": {
|
|
89
93
|
"types": "./spx-navigation/index.d.ts",
|
|
90
94
|
"default": "./fesm2022/softpak-components-spx-navigation.mjs"
|
|
91
95
|
},
|
|
92
|
-
"./spx-
|
|
93
|
-
"types": "./spx-
|
|
94
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
96
|
+
"./spx-pagination": {
|
|
97
|
+
"types": "./spx-pagination/index.d.ts",
|
|
98
|
+
"default": "./fesm2022/softpak-components-spx-pagination.mjs"
|
|
99
|
+
},
|
|
100
|
+
"./spx-patch": {
|
|
101
|
+
"types": "./spx-patch/index.d.ts",
|
|
102
|
+
"default": "./fesm2022/softpak-components-spx-patch.mjs"
|
|
95
103
|
},
|
|
96
104
|
"./spx-pipes": {
|
|
97
105
|
"types": "./spx-pipes/index.d.ts",
|
|
@@ -101,18 +109,10 @@
|
|
|
101
109
|
"types": "./spx-progress-bar/index.d.ts",
|
|
102
110
|
"default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
|
|
103
111
|
},
|
|
104
|
-
"./spx-patch": {
|
|
105
|
-
"types": "./spx-patch/index.d.ts",
|
|
106
|
-
"default": "./fesm2022/softpak-components-spx-patch.mjs"
|
|
107
|
-
},
|
|
108
112
|
"./spx-spinner": {
|
|
109
113
|
"types": "./spx-spinner/index.d.ts",
|
|
110
114
|
"default": "./fesm2022/softpak-components-spx-spinner.mjs"
|
|
111
115
|
},
|
|
112
|
-
"./spx-pagination": {
|
|
113
|
-
"types": "./spx-pagination/index.d.ts",
|
|
114
|
-
"default": "./fesm2022/softpak-components-spx-pagination.mjs"
|
|
115
|
-
},
|
|
116
116
|
"./spx-storage": {
|
|
117
117
|
"types": "./spx-storage/index.d.ts",
|
|
118
118
|
"default": "./fesm2022/softpak-components-spx-storage.mjs"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SpxAlertComponent {
|
|
4
|
-
_autoCloseTimeout:
|
|
4
|
+
_autoCloseTimeout: import("@angular/core").WritableSignal<NodeJS.Timeout | null>;
|
|
5
5
|
spxClose: import("@angular/core").OutputEmitterRef<void>;
|
|
6
6
|
readonly spxAutoclose: import("@angular/core").InputSignal<number | undefined>;
|
|
7
7
|
readonly spxCloseable: import("@angular/core").InputSignal<boolean | undefined>;
|
|
@@ -2,20 +2,20 @@ import { OnChanges } from '@angular/core';
|
|
|
2
2
|
import { SpxAppExpiryI } from './spx-app-expiry.interface';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpxAppExpiryComponent implements OnChanges {
|
|
5
|
-
txtContactHelpdeskOrSoftpak: string
|
|
6
|
-
txtExpired: string
|
|
7
|
-
txtLastReminder: string
|
|
8
|
-
txtPleaseOpenTheAppStore: string
|
|
9
|
-
txtPleaseUpdate: string
|
|
10
|
-
txtThisVersionWillExpireSoon: string
|
|
11
|
-
txtUpdateAvailable: string
|
|
12
|
-
txtUpdateTheAppToTheLatestVersion: string
|
|
13
|
-
spxExpiry: SpxAppExpiryI
|
|
14
|
-
spxVersion: string
|
|
15
|
-
warning: boolean
|
|
16
|
-
finalWarning: boolean
|
|
17
|
-
expired: boolean
|
|
5
|
+
readonly txtContactHelpdeskOrSoftpak: import("@angular/core").InputSignal<string>;
|
|
6
|
+
readonly txtExpired: import("@angular/core").InputSignal<string>;
|
|
7
|
+
readonly txtLastReminder: import("@angular/core").InputSignal<string>;
|
|
8
|
+
readonly txtPleaseOpenTheAppStore: import("@angular/core").InputSignal<string>;
|
|
9
|
+
readonly txtPleaseUpdate: import("@angular/core").InputSignal<string>;
|
|
10
|
+
readonly txtThisVersionWillExpireSoon: import("@angular/core").InputSignal<string>;
|
|
11
|
+
readonly txtUpdateAvailable: import("@angular/core").InputSignal<string>;
|
|
12
|
+
readonly txtUpdateTheAppToTheLatestVersion: import("@angular/core").InputSignal<string>;
|
|
13
|
+
readonly spxExpiry: import("@angular/core").InputSignal<SpxAppExpiryI>;
|
|
14
|
+
readonly spxVersion: import("@angular/core").InputSignal<string>;
|
|
15
|
+
warning: import("@angular/core").WritableSignal<boolean>;
|
|
16
|
+
finalWarning: import("@angular/core").WritableSignal<boolean>;
|
|
17
|
+
expired: import("@angular/core").WritableSignal<boolean>;
|
|
18
18
|
ngOnChanges(): void;
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpxAppExpiryComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpxAppExpiryComponent, "spx-app-expiry", never, { "txtContactHelpdeskOrSoftpak": { "alias": "txtContactHelpdeskOrSoftpak"; "required":
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxAppExpiryComponent, "spx-app-expiry", never, { "txtContactHelpdeskOrSoftpak": { "alias": "txtContactHelpdeskOrSoftpak"; "required": true; "isSignal": true; }; "txtExpired": { "alias": "txtExpired"; "required": true; "isSignal": true; }; "txtLastReminder": { "alias": "txtLastReminder"; "required": true; "isSignal": true; }; "txtPleaseOpenTheAppStore": { "alias": "txtPleaseOpenTheAppStore"; "required": true; "isSignal": true; }; "txtPleaseUpdate": { "alias": "txtPleaseUpdate"; "required": true; "isSignal": true; }; "txtThisVersionWillExpireSoon": { "alias": "txtThisVersionWillExpireSoon"; "required": true; "isSignal": true; }; "txtUpdateAvailable": { "alias": "txtUpdateAvailable"; "required": true; "isSignal": true; }; "txtUpdateTheAppToTheLatestVersion": { "alias": "txtUpdateTheAppToTheLatestVersion"; "required": true; "isSignal": true; }; "spxExpiry": { "alias": "spxExpiry"; "required": true; "isSignal": true; }; "spxVersion": { "alias": "spxVersion"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
21
21
|
}
|
|
@@ -2,9 +2,6 @@ import { ElementRef } from '@angular/core';
|
|
|
2
2
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpxButtonComponent {
|
|
5
|
-
get hostClassBlock(): boolean | undefined;
|
|
6
|
-
get hostClassHFull(): boolean | undefined;
|
|
7
|
-
get hostClassWFull(): boolean | undefined;
|
|
8
5
|
readonly spxDisabled: import("@angular/core").InputSignal<boolean>;
|
|
9
6
|
readonly spxClass: import("@angular/core").InputSignal<string | undefined>;
|
|
10
7
|
readonly spxClassObject: import("@angular/core").InputSignal<object | undefined>;
|
|
@@ -2,7 +2,6 @@ import { IconProp } from '@fortawesome/angular-fontawesome/types';
|
|
|
2
2
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpxCardItemComponent {
|
|
5
|
-
hFull: boolean;
|
|
6
5
|
readonly icon: import("@angular/core").InputSignal<IconProp | undefined>;
|
|
7
6
|
readonly iconOnly: import("@angular/core").InputSignal<boolean>;
|
|
8
7
|
readonly spxLabel: import("@angular/core").InputSignal<string>;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
2
|
export declare class SpxCardComponent {
|
|
4
|
-
clickable: boolean
|
|
5
|
-
hasContent: boolean
|
|
6
|
-
onDetailPage: boolean
|
|
7
|
-
text: string
|
|
8
|
-
unit
|
|
9
|
-
tableView: boolean
|
|
10
|
-
clicked:
|
|
3
|
+
readonly clickable: import("@angular/core").InputSignal<boolean>;
|
|
4
|
+
readonly hasContent: import("@angular/core").InputSignal<boolean>;
|
|
5
|
+
readonly onDetailPage: import("@angular/core").InputSignal<boolean>;
|
|
6
|
+
readonly text: import("@angular/core").InputSignal<string | undefined>;
|
|
7
|
+
readonly unit: import("@angular/core").InputSignal<string | undefined>;
|
|
8
|
+
readonly tableView: import("@angular/core").InputSignal<boolean>;
|
|
9
|
+
clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
11
10
|
constructor();
|
|
12
11
|
displayValue(val: string | number): string | number;
|
|
13
12
|
onClick(): void;
|
|
14
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpxCardComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpxCardComponent, "spx-card", never, { "clickable": { "alias": "clickable"; "required": false; }; "hasContent": { "alias": "hasContent"; "required": false; }; "onDetailPage": { "alias": "onDetailPage"; "required": false; }; "text": { "alias": "text"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; "tableView": { "alias": "tableView"; "required": false; }; }, { "clicked": "clicked"; }, never, ["[card-header]", "[card-content-top]", "[card-content]", "[card-content-bottom]", "[card-lines]"], true, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxCardComponent, "spx-card", never, { "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "hasContent": { "alias": "hasContent"; "required": false; "isSignal": true; }; "onDetailPage": { "alias": "onDetailPage"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "unit": { "alias": "unit"; "required": false; "isSignal": true; }; "tableView": { "alias": "tableView"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["[card-header]", "[card-content-top]", "[card-content]", "[card-content-bottom]", "[card-lines]"], true, never>;
|
|
16
15
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
1
|
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
2
|
import { SpxChangeDetailsValueI } from './spx-change-details-value.interface';
|
|
4
3
|
import { SpxFormI, SpxFormFieldI } from '@softpak/components/spx-form-view';
|
|
@@ -15,28 +14,28 @@ export declare const ctrlCategory = "category";
|
|
|
15
14
|
export declare const ctrlUseCategories = "useCategories";
|
|
16
15
|
export declare class SpxChangeDetailsComponent {
|
|
17
16
|
readonly formBuilder: FormBuilder;
|
|
18
|
-
formGroup: FormGroup
|
|
19
|
-
suggestions: any
|
|
20
|
-
textCategory: string
|
|
21
|
-
textContainerNumber: string
|
|
22
|
-
textContainerType: string
|
|
23
|
-
textCustomer: string
|
|
24
|
-
textLicensePlate: string
|
|
25
|
-
textSave: string
|
|
26
|
-
textTonsTested: string
|
|
27
|
-
spxBlurCategory:
|
|
28
|
-
spxBlurContainerType:
|
|
29
|
-
spxSearchCategory:
|
|
30
|
-
spxSearchContainerType:
|
|
31
|
-
spxSearchTonsTested:
|
|
32
|
-
submit:
|
|
17
|
+
readonly formGroup: import("@angular/core").InputSignal<FormGroup<any>>;
|
|
18
|
+
readonly suggestions: import("@angular/core").InputSignal<any>;
|
|
19
|
+
readonly textCategory: import("@angular/core").InputSignal<string>;
|
|
20
|
+
readonly textContainerNumber: import("@angular/core").InputSignal<string>;
|
|
21
|
+
readonly textContainerType: import("@angular/core").InputSignal<string>;
|
|
22
|
+
readonly textCustomer: import("@angular/core").InputSignal<string>;
|
|
23
|
+
readonly textLicensePlate: import("@angular/core").InputSignal<string>;
|
|
24
|
+
readonly textSave: import("@angular/core").InputSignal<string>;
|
|
25
|
+
readonly textTonsTested: import("@angular/core").InputSignal<string>;
|
|
26
|
+
spxBlurCategory: import("@angular/core").OutputEmitterRef<SpxValuePair<string>>;
|
|
27
|
+
spxBlurContainerType: import("@angular/core").OutputEmitterRef<SpxValuePair<string>>;
|
|
28
|
+
spxSearchCategory: import("@angular/core").OutputEmitterRef<SpxValuePair<string>>;
|
|
29
|
+
spxSearchContainerType: import("@angular/core").OutputEmitterRef<SpxValuePair<string>>;
|
|
30
|
+
spxSearchTonsTested: import("@angular/core").OutputEmitterRef<SpxValuePair<string>>;
|
|
31
|
+
submit: import("@angular/core").OutputEmitterRef<SpxChangeDetailsValueI>;
|
|
33
32
|
form: SpxFormI;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
readonly ctrlCategory: import("@angular/core").Signal<FormControl<any>>;
|
|
34
|
+
readonly ctrlCustomer: import("@angular/core").Signal<FormControl<any>>;
|
|
35
|
+
readonly ctrlContainerType: import("@angular/core").Signal<FormControl<any>>;
|
|
36
|
+
readonly ctrlLicensePlate: import("@angular/core").Signal<FormControl<any>>;
|
|
37
|
+
readonly ctrlTonsTested: import("@angular/core").Signal<FormControl<any>>;
|
|
38
|
+
readonly ctrlUseCategories: import("@angular/core").Signal<FormControl<any>>;
|
|
40
39
|
private subContainerType?;
|
|
41
40
|
constructor(formBuilder: FormBuilder);
|
|
42
41
|
createForm(): FormGroup;
|
|
@@ -54,5 +53,5 @@ export declare class SpxChangeDetailsComponent {
|
|
|
54
53
|
onSubmit(): void;
|
|
55
54
|
private listenToContainerType;
|
|
56
55
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpxChangeDetailsComponent, never>;
|
|
57
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpxChangeDetailsComponent, "spx-change-details", never, { "formGroup": { "alias": "formGroup"; "required":
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxChangeDetailsComponent, "spx-change-details", never, { "formGroup": { "alias": "formGroup"; "required": true; "isSignal": true; }; "suggestions": { "alias": "suggestions"; "required": false; "isSignal": true; }; "textCategory": { "alias": "textCategory"; "required": true; "isSignal": true; }; "textContainerNumber": { "alias": "textContainerNumber"; "required": true; "isSignal": true; }; "textContainerType": { "alias": "textContainerType"; "required": true; "isSignal": true; }; "textCustomer": { "alias": "textCustomer"; "required": true; "isSignal": true; }; "textLicensePlate": { "alias": "textLicensePlate"; "required": true; "isSignal": true; }; "textSave": { "alias": "textSave"; "required": true; "isSignal": true; }; "textTonsTested": { "alias": "textTonsTested"; "required": true; "isSignal": true; }; }, { "spxBlurCategory": "spxBlurCategory"; "spxBlurContainerType": "spxBlurContainerType"; "spxSearchCategory": "spxSearchCategory"; "spxSearchContainerType": "spxSearchContainerType"; "spxSearchTonsTested": "spxSearchTonsTested"; "submit": "submit"; }, never, never, true, never>;
|
|
58
57
|
}
|
|
@@ -3,16 +3,16 @@ import { SpxInputComponent, SpxInputTypeEnum } from '@softpak/components/spx-inp
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpxCheckDigitComponent {
|
|
5
5
|
private readonly formBuilder;
|
|
6
|
-
txtCheckDigit: string
|
|
7
|
-
txtContainer: string
|
|
8
|
-
txtPrefix: string
|
|
9
|
-
ctrlContainerNumberRef
|
|
6
|
+
readonly txtCheckDigit: import("@angular/core").InputSignal<string>;
|
|
7
|
+
readonly txtContainer: import("@angular/core").InputSignal<string>;
|
|
8
|
+
readonly txtPrefix: import("@angular/core").InputSignal<string>;
|
|
9
|
+
ctrlContainerNumberRef: import("@angular/core").Signal<SpxInputComponent | undefined>;
|
|
10
10
|
inputTypeOverlayNumber: SpxInputTypeEnum;
|
|
11
11
|
inputTypeText: SpxInputTypeEnum;
|
|
12
|
-
formGroup: FormGroup
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
formGroup: import("@angular/core").WritableSignal<FormGroup<any> | null>;
|
|
13
|
+
ctrlCheckDigit: import("@angular/core").Signal<FormControl<any>>;
|
|
14
|
+
ctrlContainerNumber: import("@angular/core").Signal<FormControl<any>>;
|
|
15
|
+
ctrlContainerPrefix: import("@angular/core").Signal<FormControl<any>>;
|
|
16
16
|
private inputChanges?;
|
|
17
17
|
constructor(formBuilder: FormBuilder);
|
|
18
18
|
ngOnInit(): void;
|
|
@@ -20,5 +20,5 @@ export declare class SpxCheckDigitComponent {
|
|
|
20
20
|
ngOnDestroy(): void;
|
|
21
21
|
getRawValidators(formControl: FormControl): any;
|
|
22
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpxCheckDigitComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpxCheckDigitComponent, "spx-check-digit", never, { "txtCheckDigit": { "alias": "txtCheckDigit"; "required":
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxCheckDigitComponent, "spx-check-digit", never, { "txtCheckDigit": { "alias": "txtCheckDigit"; "required": true; "isSignal": true; }; "txtContainer": { "alias": "txtContainer"; "required": true; "isSignal": true; }; "txtPrefix": { "alias": "txtPrefix"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
24
24
|
}
|
|
@@ -10,6 +10,13 @@ export declare const answer: import("@ngrx/store").ActionCreator<"[Confirm] Answ
|
|
|
10
10
|
} & import("@ngrx/store").Action<"[Confirm] Answer">>;
|
|
11
11
|
export declare const reset: import("@ngrx/store").ActionCreator<"[Confirm] Reset", (props: Record<string, unknown>) => Record<string, unknown> & import("@ngrx/store").Action<"[Confirm] Reset">>;
|
|
12
12
|
export declare const show: import("@ngrx/store").ActionCreator<"[Confirm] Show", (props: SpxConfirmI) => SpxConfirmI & import("@ngrx/store").Action<"[Confirm] Show">>;
|
|
13
|
-
declare const
|
|
13
|
+
export declare const answerConfirm: import("@ngrx/store").ActionCreator<"[Confirm] Answer Confirm", (props: {
|
|
14
|
+
id: string;
|
|
15
|
+
}) => {
|
|
16
|
+
id: string;
|
|
17
|
+
} & import("@ngrx/store").Action<"[Confirm] Answer Confirm">>;
|
|
18
|
+
declare const all: (Record<string, unknown> & import("@ngrx/store").Action<"[Confirm] Reset">) | (SpxConfirmI & import("@ngrx/store").Action<"[Confirm] Show">) | ({
|
|
19
|
+
id: string;
|
|
20
|
+
} & import("@ngrx/store").Action<"[Confirm] Answer Confirm">);
|
|
14
21
|
export type Actions = typeof all;
|
|
15
22
|
export {};
|
|
@@ -5,7 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class SpxConfirmEffects {
|
|
6
6
|
private readonly actions$;
|
|
7
7
|
private readonly appStore;
|
|
8
|
-
|
|
8
|
+
onAnswer$: Observable<any>;
|
|
9
9
|
constructor(actions$: Actions, appStore: Store);
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpxConfirmEffects, never>;
|
|
11
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<SpxConfirmEffects>;
|