@softpak/components 20.7.1 → 20.7.3
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-spinner.mjs +9 -5
- package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +78 -4
- package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
- package/package.json +35 -35
- package/spx-spinner/index.d.ts +17 -3
- package/spx-validation/index.d.ts +19 -0
|
@@ -31,6 +31,7 @@ var spxSpinner_actions = /*#__PURE__*/Object.freeze({
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
const initialState = {
|
|
34
|
+
loadActions: [],
|
|
34
35
|
nrOfLoadActions: 0,
|
|
35
36
|
show: false,
|
|
36
37
|
};
|
|
@@ -42,23 +43,26 @@ var spxSpinner_initial = /*#__PURE__*/Object.freeze({
|
|
|
42
43
|
|
|
43
44
|
var spxSpinner_reducer = createFeature({
|
|
44
45
|
name: 'spxSpinner',
|
|
45
|
-
reducer: createReducer(initialState, on(hide, (state) => {
|
|
46
|
+
reducer: createReducer(initialState, on(hide, (state, { action }) => {
|
|
46
47
|
return {
|
|
47
48
|
...state,
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
loadActions: action ? [...state.loadActions.filter(a => a !== action)] : state.loadActions,
|
|
50
|
+
nrOfLoadActions: !action ? state.nrOfLoadActions : state.nrOfLoadActions > 1 ? state.nrOfLoadActions - 1 : 0,
|
|
51
|
+
show: state.loadActions.length >= 1 || state.nrOfLoadActions > 1 ? true : false,
|
|
50
52
|
};
|
|
51
53
|
}), on(reset, (state) => {
|
|
52
54
|
return {
|
|
53
55
|
...state,
|
|
54
56
|
show: false,
|
|
57
|
+
loadActions: [],
|
|
55
58
|
nrOfLoadActions: 0,
|
|
56
59
|
};
|
|
57
|
-
}), on(show, (state) => {
|
|
60
|
+
}), on(show, (state, { action }) => {
|
|
58
61
|
return {
|
|
59
62
|
...state,
|
|
60
63
|
show: true,
|
|
61
|
-
|
|
64
|
+
loadActions: action ? [...state.loadActions, action] : state.loadActions,
|
|
65
|
+
nrOfLoadActions: !action ? state.nrOfLoadActions : state.nrOfLoadActions + 1,
|
|
62
66
|
};
|
|
63
67
|
})),
|
|
64
68
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-spinner.mjs","sources":["../../../../projects/softpak/components/spx-spinner/spx-spinner.component.ts","../../../../projects/softpak/components/spx-spinner/spx-spinner.component.html","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.actions.ts","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.initial.ts","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.reducer.ts","../../../../projects/softpak/components/spx-spinner/softpak-components-spx-spinner.ts"],"sourcesContent":["\nimport { Component, input } from '@angular/core';\n\n@Component({\n selector: 'spx-spinner',\n imports: [],\n templateUrl: './spx-spinner.component.html',\n styleUrl: './spx-spinner.component.scss',\n})\nexport class SpxSpinnerComponent {\n readonly spxShow = input<boolean>(true);\n readonly spxLoaderText = input.required<string>();\n}\n","<div class=\"spx-spinner__wrapper spx-spinner2\"\n [class.is-shown]=\"this.spxShow()\">\n <div class=\"rounded-xl bg-white text-black absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[150px] h-[150px]\">\n <div class=\"spx-spinner__content\">\n <svg class=\"spx-spinner__image m-auto\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100px\" height=\"100px\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\">\n <g transform=\"rotate(0 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.9166666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(30 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.8333333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(60 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.75s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(90 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.6666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(120 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.5833333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(150 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.5s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(180 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.4166666666666667s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(210 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.3333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(240 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.25s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(270 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.16666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(300 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.08333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(330 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"0s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n </svg>\n @if (this.spxLoaderText()) {\n <span class=\"text-black pb-2 block text-center\">{{this.spxLoaderText()}}</span>\n }\n </div>\n </div>\n </div>","import { createAction, props, union } from '@ngrx/store';\n\nexport const hide = createAction('[SPX / Spinner] Hide', props<
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-spinner.mjs","sources":["../../../../projects/softpak/components/spx-spinner/spx-spinner.component.ts","../../../../projects/softpak/components/spx-spinner/spx-spinner.component.html","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.actions.ts","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.initial.ts","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.reducer.ts","../../../../projects/softpak/components/spx-spinner/softpak-components-spx-spinner.ts"],"sourcesContent":["\nimport { Component, input } from '@angular/core';\n\n@Component({\n selector: 'spx-spinner',\n imports: [],\n templateUrl: './spx-spinner.component.html',\n styleUrl: './spx-spinner.component.scss',\n})\nexport class SpxSpinnerComponent {\n readonly spxShow = input<boolean>(true);\n readonly spxLoaderText = input.required<string>();\n}\n","<div class=\"spx-spinner__wrapper spx-spinner2\"\n [class.is-shown]=\"this.spxShow()\">\n <div class=\"rounded-xl bg-white text-black absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[150px] h-[150px]\">\n <div class=\"spx-spinner__content\">\n <svg class=\"spx-spinner__image m-auto\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100px\" height=\"100px\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\">\n <g transform=\"rotate(0 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.9166666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(30 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.8333333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(60 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.75s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(90 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.6666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(120 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.5833333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(150 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.5s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(180 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.4166666666666667s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(210 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.3333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(240 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.25s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(270 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.16666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(300 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.08333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(330 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"0s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n </svg>\n @if (this.spxLoaderText()) {\n <span class=\"text-black pb-2 block text-center\">{{this.spxLoaderText()}}</span>\n }\n </div>\n </div>\n </div>","import { createAction, props, union } from '@ngrx/store';\n\nexport const hide = createAction('[SPX / Spinner] Hide', props<{ action?: string; }>());\nexport const reset = createAction('[SPX / Spinner] Reset', props<Record<string, unknown>>());\nexport const show = createAction('[SPX / Spinner] Show', props<{ action?: string; }>());\n\nconst all = union({\n hide,\n show,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-spinner.state\";\n\nexport const initialState: StateI = {\n loadActions: [],\n nrOfLoadActions: 0,\n show: false,\n};\n","import * as actions from './spx-spinner.actions';\n\nimport { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { StateI } from './spx-spinner.state';\nimport { initialState } from './spx-spinner.initial';\n\nexport default createFeature({\n name: 'spxSpinner',\n reducer: createReducer(\n initialState,\n on(actions.hide, (state: StateI, { action }): StateI => {\n return {\n ...state,\n loadActions: action ? [...state.loadActions.filter(a => a !== action)] : state.loadActions,\n nrOfLoadActions: !action ? state.nrOfLoadActions : state.nrOfLoadActions > 1 ? state.nrOfLoadActions - 1 : 0,\n show: state.loadActions.length >= 1 || state.nrOfLoadActions > 1 ? true : false,\n };\n }),\n on(actions.reset, (state: StateI): StateI => {\n return {\n ...state,\n show: false,\n loadActions: [],\n nrOfLoadActions: 0,\n };\n }),\n on(actions.show, (state: StateI, { action }): StateI => {\n return {\n ...state,\n show: true,\n loadActions: action ? [...state.loadActions, action] : state.loadActions,\n nrOfLoadActions: !action ? state.nrOfLoadActions : state.nrOfLoadActions + 1,\n };\n }),\n ),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.hide","actions.reset","actions.show"],"mappings":";;;;MASa,mBAAmB,CAAA;AANhC,IAAA,WAAA,GAAA;AAOW,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,IAAI,mDAAC;AAC9B,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,wDAAU;AAClD;8GAHY,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAA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AAC,GAAG,KAAK,CAAC,eAAe,GAAG,CAAC,GAAG,CAAC;YAC5G,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC,eAAe,GAAG,CAAC,GAAG,IAAI,GAAG,KAAK;SAClF;KACJ,CAAC,EACF,EAAE,CAACC,KAAa,EAAE,CAAC,KAAa,KAAY;QACxC,OAAO;AACH,YAAA,GAAG,KAAK;AACR,YAAA,IAAI,EAAE,KAAK;AACX,YAAA,WAAW,EAAE,EAAE;AACf,YAAA,eAAe,EAAE,CAAC;SACrB;AACL,KAAC,CAAC,EACF,EAAE,CAACC,IAAY,EAAE,CAAC,KAAa,EAAE,EAAE,MAAM,EAAE,KAAY;QACnD,OAAO;AACH,YAAA,GAAG,KAAK;AACR,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,WAAW,EAAE,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,WAAW;AACxE,YAAA,eAAe,EAAE,CAAC,MAAM,GAAG,KAAK,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,GAAG,CAAC;SAC/E;AACL,KAAC,CAAC,CACL;AACJ,CAAA,CAAC;;;;;;;;;;;ACpCF;;AAEG;;;;"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { valuePairToValue } from '@softpak/components/spx-helpers';
|
|
2
2
|
import { DateTime } from 'luxon';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
3
|
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { input, signal, computed, effect, inject, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
|
+
import { spxTextTooLong, spxTextTooShort, spxTextTooHigh, spxTextTooLow, spxTextPatternNotValid, spxTextRequired, spxTextChoosePast, spxTextChooseFuture, spxTextChooseValidMonth, spxTextDateMayNotBeFuture, spxTextDateMayNotBePast, spxTextInvalidCode } from '@softpak/components/spx-translate';
|
|
7
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
6
8
|
|
|
7
9
|
const spxValidatorRequired = () => (control) => {
|
|
8
10
|
if (control &&
|
|
@@ -137,6 +139,41 @@ class SpxValidateControlComponent {
|
|
|
137
139
|
this.submitTried = input(...(ngDevMode ? [undefined, { debugName: "submitTried" }] : []));
|
|
138
140
|
this.errors = input.required(...(ngDevMode ? [{ debugName: "errors" }] : []));
|
|
139
141
|
this.touched = input.required(...(ngDevMode ? [{ debugName: "touched" }] : []));
|
|
142
|
+
this.show = signal(false, ...(ngDevMode ? [{ debugName: "show" }] : []));
|
|
143
|
+
this.shouldShow = computed(() => this.control() && this.errors() && (this.touched() || this.submitTried()), ...(ngDevMode ? [{ debugName: "shouldShow" }] : []));
|
|
144
|
+
this.pending = null;
|
|
145
|
+
this.token = 0;
|
|
146
|
+
// Short delay to avoid growing DOM while clicking on something.
|
|
147
|
+
this._delayShow = effect((onCleanup) => {
|
|
148
|
+
const want = this.shouldShow();
|
|
149
|
+
// Invalidate any older timeouts.
|
|
150
|
+
this.token++;
|
|
151
|
+
// Cancel any in-flight timeout.
|
|
152
|
+
if (this.pending) {
|
|
153
|
+
clearTimeout(this.pending);
|
|
154
|
+
this.pending = null;
|
|
155
|
+
}
|
|
156
|
+
if (want) {
|
|
157
|
+
const myToken = this.token;
|
|
158
|
+
this.pending = setTimeout(() => {
|
|
159
|
+
// Only set true if no newer change happened AND the condition still holds.
|
|
160
|
+
if (myToken === this.token && this.shouldShow()) {
|
|
161
|
+
this.show.set(true);
|
|
162
|
+
}
|
|
163
|
+
}, 500); // your delay
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
// Turn off immediately.
|
|
167
|
+
this.show.set(false);
|
|
168
|
+
}
|
|
169
|
+
// Clean up if the effect is torn down.
|
|
170
|
+
onCleanup(() => {
|
|
171
|
+
if (this.pending) {
|
|
172
|
+
clearTimeout(this.pending);
|
|
173
|
+
this.pending = null;
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
}, ...(ngDevMode ? [{ debugName: "_delayShow" }] : []));
|
|
140
177
|
this.maxLength = computed(() => {
|
|
141
178
|
return this.errors() && this.errors()['maxlength'];
|
|
142
179
|
}, ...(ngDevMode ? [{ debugName: "maxLength" }] : []));
|
|
@@ -182,15 +219,52 @@ class SpxValidateControlComponent {
|
|
|
182
219
|
this.past = computed(() => {
|
|
183
220
|
return this.errors() && this.errors()['past'];
|
|
184
221
|
}, ...(ngDevMode ? [{ debugName: "past" }] : []));
|
|
222
|
+
this.translateService = inject(TranslateService);
|
|
223
|
+
this.textTooLong = computed(() => {
|
|
224
|
+
return this.translateService.instant(spxTextTooLong, { fieldLabel: this.label(), error: this.errors()?.["maxlength"].requiredLength });
|
|
225
|
+
}, ...(ngDevMode ? [{ debugName: "textTooLong" }] : []));
|
|
226
|
+
this.textTooShort = computed(() => {
|
|
227
|
+
return this.translateService.instant(spxTextTooShort, { fieldLabel: this.label(), error: this.errors()?.["minlength"].requiredLength });
|
|
228
|
+
}, ...(ngDevMode ? [{ debugName: "textTooShort" }] : []));
|
|
229
|
+
this.textTooHigh = computed(() => {
|
|
230
|
+
return this.translateService.instant(spxTextTooHigh, { fieldLabel: this.label(), error: this.errors()?.["max"].max });
|
|
231
|
+
}, ...(ngDevMode ? [{ debugName: "textTooHigh" }] : []));
|
|
232
|
+
this.textTooLow = computed(() => {
|
|
233
|
+
return this.translateService.instant(spxTextTooLow, { fieldLabel: this.label(), error: this.errors()?.["min"].min });
|
|
234
|
+
}, ...(ngDevMode ? [{ debugName: "textTooLow" }] : []));
|
|
235
|
+
this.textPatternNotValid = computed(() => {
|
|
236
|
+
return this.translateService.instant(spxTextPatternNotValid, { fieldLabel: this.label() });
|
|
237
|
+
}, ...(ngDevMode ? [{ debugName: "textPatternNotValid" }] : []));
|
|
238
|
+
this.textRequired = computed(() => {
|
|
239
|
+
return this.translateService.instant(spxTextRequired, { fieldLabel: this.label() });
|
|
240
|
+
}, ...(ngDevMode ? [{ debugName: "textRequired" }] : []));
|
|
241
|
+
this.textChoosePast = computed(() => {
|
|
242
|
+
return this.translateService.instant(spxTextChoosePast);
|
|
243
|
+
}, ...(ngDevMode ? [{ debugName: "textChoosePast" }] : []));
|
|
244
|
+
this.textChooseFuture = computed(() => {
|
|
245
|
+
return this.translateService.instant(spxTextChooseFuture);
|
|
246
|
+
}, ...(ngDevMode ? [{ debugName: "textChooseFuture" }] : []));
|
|
247
|
+
this.textChooseValidMonth = computed(() => {
|
|
248
|
+
return this.translateService.instant(spxTextChooseValidMonth);
|
|
249
|
+
}, ...(ngDevMode ? [{ debugName: "textChooseValidMonth" }] : []));
|
|
250
|
+
this.textDateMayNotBeFuture = computed(() => {
|
|
251
|
+
return this.translateService.instant(spxTextDateMayNotBeFuture);
|
|
252
|
+
}, ...(ngDevMode ? [{ debugName: "textDateMayNotBeFuture" }] : []));
|
|
253
|
+
this.textDateMayNotBePast = computed(() => {
|
|
254
|
+
return this.translateService.instant(spxTextDateMayNotBePast);
|
|
255
|
+
}, ...(ngDevMode ? [{ debugName: "textDateMayNotBePast" }] : []));
|
|
256
|
+
this.textInvalidCode = computed(() => {
|
|
257
|
+
return this.translateService.instant(spxTextInvalidCode, { codeName: this.errors()?.["invalidCode"].name, codeCode: this.errors()?.["invalidCode"].code });
|
|
258
|
+
}, ...(ngDevMode ? [{ debugName: "textInvalidCode" }] : []));
|
|
185
259
|
}
|
|
186
260
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxValidateControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
187
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", 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 }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: true, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (
|
|
261
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", 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 }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: true, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (show()) {\n<div class=\"bg-red-600 rounded-b p-3\">\n @if (maxLength()) {\n <div>{{ textTooLong() }}</div>\n }\n @if (minLength()) {\n <div>{{ textTooShort() }}</div>\n }\n @if (max()) {\n <div>{{ textTooHigh() }}</div>\n }\n @if (min()) {\n <div>{{ textTooLow() }}</div>\n }\n @if (pattern()) {\n <div>{{ textPatternNotValid() }}</div>\n }\n @if (required()) {\n <div>{{ textRequired() }}</div>\n }\n @if (year()) {\n <div>Please choose a year between 1991 and the current year.</div>\n }\n @if (yearFuture()) {\n <div>Please choose a year between the current year and 2050.</div>\n }\n @if (month()) {\n <div>{{ textChooseValidMonth() }}</div>\n }\n @if (future()) {\n <div>{{ textDateMayNotBeFuture() }}</div>\n }\n @if (past()) {\n <div>{{ textDateMayNotBePast() }}</div>\n }\n</div>\n}", dependencies: [{ kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
188
262
|
}
|
|
189
263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxValidateControlComponent, decorators: [{
|
|
190
264
|
type: Component,
|
|
191
265
|
args: [{ selector: 'spx-validate-control', imports: [
|
|
192
266
|
FormsModule,
|
|
193
|
-
], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (
|
|
267
|
+
], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (show()) {\n<div class=\"bg-red-600 rounded-b p-3\">\n @if (maxLength()) {\n <div>{{ textTooLong() }}</div>\n }\n @if (minLength()) {\n <div>{{ textTooShort() }}</div>\n }\n @if (max()) {\n <div>{{ textTooHigh() }}</div>\n }\n @if (min()) {\n <div>{{ textTooLow() }}</div>\n }\n @if (pattern()) {\n <div>{{ textPatternNotValid() }}</div>\n }\n @if (required()) {\n <div>{{ textRequired() }}</div>\n }\n @if (year()) {\n <div>Please choose a year between 1991 and the current year.</div>\n }\n @if (yearFuture()) {\n <div>Please choose a year between the current year and 2050.</div>\n }\n @if (month()) {\n <div>{{ textChooseValidMonth() }}</div>\n }\n @if (future()) {\n <div>{{ textDateMayNotBeFuture() }}</div>\n }\n @if (past()) {\n <div>{{ textDateMayNotBePast() }}</div>\n }\n</div>\n}" }]
|
|
194
268
|
}] });
|
|
195
269
|
|
|
196
270
|
/**
|
|
@@ -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';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorRequired = () => (control: AbstractControl): ValidationErrors | null => {\n if (\n control &&\n valuePairToValue(control.value) === undefined ||\n valuePairToValue(control.value) === null ||\n valuePairToValue(control.value) === '' ||\n valuePairToValue(control.value) === 0\n ) {\n return { required: true };\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMax = (max: number) => (control: AbstractControl): { max: { max: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n if (!isNaN(value) && value > max) {\n return {\n max: {\n max,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMaxLength = (maximumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { maxlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length > maximumLength) {\n return {\n maxlength: {\n requiredLength: maximumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMin = (min: number) => (control: AbstractControl): { min: { min: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n\n if (!isNaN(value) && value < min) {\n return {\n min: {\n min,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMinLength = (minimumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { minlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length < minimumLength) {\n return {\n minlength: {\n requiredLength: minimumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorPattern = (matcher: RegExp) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const matches = valuePairToValue(control.value).toString().match(matcher);\n if (matches === null || matches.length === 0) {\n return { pattern: true };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\n\nimport { DateTime } from 'luxon';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorYearAndMonth = (future?: boolean) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const val = valuePairToValue(control.value);\n if (val.toUpperCase() !== 'ACEP') {\n const date = DateTime.fromISO(val);\n const year = date.year;\n const month = date.month;\n if (val.length < 6) {\n return {\n minlength: {\n requiredLength: 6,\n actualLength: val.length\n }\n };\n }\n if (month < 1 || month > 12) {\n return { month: true };\n }\n if (future) {\n if (year > 2050 || year < DateTime.now().year) {\n return { yearFuture: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') < DateTime.now()) {\n return { past: true };\n }\n } else {\n if (year < 1971 || year > DateTime.now().year) {\n return { year: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') > DateTime.now()) {\n return { future: true };\n }\n }\n }\n }\n return null;\n};\n","\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { AbstractControl, FormsModule, ValidationErrors } from '@angular/forms';\n\n@Component({\n selector: 'spx-validate-control',\n templateUrl: './spx-validate-control.component.html',\n imports: [\n FormsModule,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxValidateControlComponent {\n readonly control = input.required<AbstractControl>();\n readonly label = input<string | unknown>();\n readonly submitTried = input<boolean>();\n readonly errors = input.required<ValidationErrors | null>();\n readonly touched = input.required<boolean>();\n\n maxLength = computed(() => {\n return this.errors() && this.errors()!['maxlength'];\n });\n\n maxLengthRequiredLength = computed(() => {\n return this.maxLength() && this.errors() && this.errors()!['maxlength']['requiredLength'];\n });\n\n minLength = computed(() => {\n return this.errors() && this.errors()!['minlength'];\n });\n\n minLengthRequiredLength = computed(() => {\n return this.minLength() && this.errors() && this.errors()!['minlength']['requiredLength'];\n });\n\n max = computed(() => {\n return this.errors() && this.errors()!['max'];\n });\n\n maxRequiredMax = computed(() => {\n return this.max() && this.errors() && this.errors()!['max']['max'];\n });\n\n min = computed(() => {\n return this.errors() && this.errors()!['min'];\n });\n\n minRequiredMin = computed(() => {\n return this.min() && this.errors() && this.errors()!['min']['min'];\n });\n\n pattern = computed(() => {\n return this.errors() && this.errors()!['pattern'];\n });\n\n required = computed(() => {\n return this.errors() && this.errors()!['required'];\n });\n\n year = computed(() => {\n return this.errors() && this.errors()!['year'];\n });\n\n yearFuture = computed(() => {\n return this.errors() && this.errors()!['yearFuture'];\n });\n\n month = computed(() => {\n return this.errors() && this.errors()!['month'];\n });\n\n future = computed(() => {\n return this.errors() && this.errors()!['future'];\n });\n\n past = computed(() => {\n return this.errors() && this.errors()!['past'];\n });\n}\n","@if (control() && errors() && (touched() || submitTried())) {\n @if (maxLength()) {\n <div>'{{ label() }}' is too long, the maximum length is {{ maxLengthRequiredLength() }}.</div>\n }\n @if (minLength()) {\n <div>'{{ label() }}' is too short, the minimum length is {{ minLengthRequiredLength() }}.</div>\n }\n @if (max()) {\n <div>The value of '{{ label() }}' is too high, the maximum is {{ maxRequiredMax() }}.</div>\n }\n @if (min()) {\n <div>The value of '{{ label() }}' is too low, the minimum is {{ minRequiredMin() }}.</div>\n }\n @if (pattern()) {\n <div>The pattern of '{{ label() }}' not valid.</div>\n }\n @if (required()) {\n <div>'{{ label() }}' is required.</div>\n }\n @if (year()) {\n <div>Please choose a year between 1991 and the current year.</div>\n }\n @if (yearFuture()) {\n <div>Please choose a year between the current year and 2050.</div>\n }\n @if (month()) {\n <div>Please choose a valid month (a value between 01 and 12).</div>\n }\n @if (future()) {\n <div>The selected date may not be in the future.</div>\n }\n @if (past()) {\n <div>The selected date may not be in the past.</div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAGO,MAAM,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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,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECbxC,ypCAmCA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED3BQ,WAAW,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKN,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBATvC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAAA,OAAA,EAEvB;wBACL,WAAW;AACd,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ypCAAA,EAAA;;;AEXnD;;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';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorRequired = () => (control: AbstractControl): ValidationErrors | null => {\n if (\n control &&\n valuePairToValue(control.value) === undefined ||\n valuePairToValue(control.value) === null ||\n valuePairToValue(control.value) === '' ||\n valuePairToValue(control.value) === 0\n ) {\n return { required: true };\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMax = (max: number) => (control: AbstractControl): { max: { max: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n if (!isNaN(value) && value > max) {\n return {\n max: {\n max,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMaxLength = (maximumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { maxlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length > maximumLength) {\n return {\n maxlength: {\n requiredLength: maximumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMin = (min: number) => (control: AbstractControl): { min: { min: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n\n if (!isNaN(value) && value < min) {\n return {\n min: {\n min,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMinLength = (minimumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { minlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length < minimumLength) {\n return {\n minlength: {\n requiredLength: minimumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorPattern = (matcher: RegExp) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const matches = valuePairToValue(control.value).toString().match(matcher);\n if (matches === null || matches.length === 0) {\n return { pattern: true };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\n\nimport { DateTime } from 'luxon';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorYearAndMonth = (future?: boolean) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const val = valuePairToValue(control.value);\n if (val.toUpperCase() !== 'ACEP') {\n const date = DateTime.fromISO(val);\n const year = date.year;\n const month = date.month;\n if (val.length < 6) {\n return {\n minlength: {\n requiredLength: 6,\n actualLength: val.length\n }\n };\n }\n if (month < 1 || month > 12) {\n return { month: true };\n }\n if (future) {\n if (year > 2050 || year < DateTime.now().year) {\n return { yearFuture: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') < DateTime.now()) {\n return { past: true };\n }\n } else {\n if (year < 1971 || year > DateTime.now().year) {\n return { year: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') > DateTime.now()) {\n return { future: true };\n }\n }\n }\n }\n return null;\n};\n","import { AbstractControl, FormsModule, ValidationErrors } from '@angular/forms';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal } from '@angular/core';\nimport { spxTextChooseFuture, spxTextChoosePast, spxTextChooseValidMonth, spxTextDateMayNotBeFuture, spxTextDateMayNotBePast, spxTextInvalidCode, spxTextPatternNotValid, spxTextRequired, spxTextTooHigh, spxTextTooLong, spxTextTooLow, spxTextTooShort } from '@softpak/components/spx-translate';\n\nimport { TranslateService } from '@ngx-translate/core';\n\n@Component({\n selector: 'spx-validate-control',\n templateUrl: './spx-validate-control.component.html',\n imports: [\n FormsModule,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxValidateControlComponent {\n readonly control = input.required<AbstractControl>();\n readonly label = input<string | unknown>();\n readonly submitTried = input<boolean>();\n readonly errors = input.required<ValidationErrors | null>();\n readonly touched = input.required<boolean>();\n protected readonly show = signal(false);\n private readonly shouldShow = computed(() => this.control() && this.errors() && (this.touched() || this.submitTried()));\n\n private pending: ReturnType<typeof setTimeout> | null = null;\n private token = 0;\n\n // Short delay to avoid growing DOM while clicking on something.\n private _delayShow = effect((onCleanup) => {\n const want = this.shouldShow();\n\n // Invalidate any older timeouts.\n this.token++;\n\n // Cancel any in-flight timeout.\n if (this.pending) {\n clearTimeout(this.pending);\n this.pending = null;\n }\n\n if (want) {\n const myToken = this.token;\n this.pending = setTimeout(() => {\n // Only set true if no newer change happened AND the condition still holds.\n if (myToken === this.token && this.shouldShow()) {\n this.show.set(true);\n }\n }, 500); // your delay\n } else {\n // Turn off immediately.\n this.show.set(false);\n }\n\n // Clean up if the effect is torn down.\n onCleanup(() => {\n if (this.pending) {\n clearTimeout(this.pending);\n this.pending = null;\n }\n });\n });\n\n maxLength = computed(() => {\n return this.errors() && this.errors()!['maxlength'];\n });\n\n maxLengthRequiredLength = computed(() => {\n return this.maxLength() && this.errors() && this.errors()!['maxlength']['requiredLength'];\n });\n\n minLength = computed(() => {\n return this.errors() && this.errors()!['minlength'];\n });\n\n minLengthRequiredLength = computed(() => {\n return this.minLength() && this.errors() && this.errors()!['minlength']['requiredLength'];\n });\n\n max = computed(() => {\n return this.errors() && this.errors()!['max'];\n });\n\n maxRequiredMax = computed(() => {\n return this.max() && this.errors() && this.errors()!['max']['max'];\n });\n\n min = computed(() => {\n return this.errors() && this.errors()!['min'];\n });\n\n minRequiredMin = computed(() => {\n return this.min() && this.errors() && this.errors()!['min']['min'];\n });\n\n pattern = computed(() => {\n return this.errors() && this.errors()!['pattern'];\n });\n\n required = computed(() => {\n return this.errors() && this.errors()!['required'];\n });\n\n year = computed(() => {\n return this.errors() && this.errors()!['year'];\n });\n\n yearFuture = computed(() => {\n return this.errors() && this.errors()!['yearFuture'];\n });\n\n month = computed(() => {\n return this.errors() && this.errors()!['month'];\n });\n\n future = computed(() => {\n return this.errors() && this.errors()!['future'];\n });\n\n past = computed(() => {\n return this.errors() && this.errors()!['past'];\n });\n\n translateService = inject(TranslateService);\n\n textTooLong = computed(() => {\n return this.translateService.instant(spxTextTooLong, { fieldLabel: this.label(), error: this.errors()?.[\"maxlength\"].requiredLength });\n });\n\n textTooShort = computed(() => {\n return this.translateService.instant(spxTextTooShort, { fieldLabel: this.label(), error: this.errors()?.[\"minlength\"].requiredLength });\n });\n\n textTooHigh = computed(() => {\n return this.translateService.instant(spxTextTooHigh, { fieldLabel: this.label(), error: this.errors()?.[\"max\"].max });\n });\n\n textTooLow = computed(() => {\n return this.translateService.instant(spxTextTooLow, { fieldLabel: this.label(), error: this.errors()?.[\"min\"].min });\n });\n\n textPatternNotValid = computed(() => {\n return this.translateService.instant(spxTextPatternNotValid, { fieldLabel: this.label() });\n });\n\n textRequired = computed(() => {\n return this.translateService.instant(spxTextRequired, { fieldLabel: this.label() });\n });\n\n textChoosePast = computed(() => {\n return this.translateService.instant(spxTextChoosePast);\n });\n\n textChooseFuture = computed(() => {\n return this.translateService.instant(spxTextChooseFuture);\n });\n\n textChooseValidMonth = computed(() => {\n return this.translateService.instant(spxTextChooseValidMonth);\n });\n\n textDateMayNotBeFuture = computed(() => {\n return this.translateService.instant(spxTextDateMayNotBeFuture);\n });\n\n textDateMayNotBePast = computed(() => {\n return this.translateService.instant(spxTextDateMayNotBePast);\n });\n\n textInvalidCode = computed(() => {\n return this.translateService.instant(spxTextInvalidCode, { codeName: this.errors()?.[\"invalidCode\"].name, codeCode: this.errors()?.[\"invalidCode\"].code });\n });\n}\n","@if (show()) {\n<div class=\"bg-red-600 rounded-b p-3\">\n @if (maxLength()) {\n <div>{{ textTooLong() }}</div>\n }\n @if (minLength()) {\n <div>{{ textTooShort() }}</div>\n }\n @if (max()) {\n <div>{{ textTooHigh() }}</div>\n }\n @if (min()) {\n <div>{{ textTooLow() }}</div>\n }\n @if (pattern()) {\n <div>{{ textPatternNotValid() }}</div>\n }\n @if (required()) {\n <div>{{ textRequired() }}</div>\n }\n @if (year()) {\n <div>Please choose a year between 1991 and the current year.</div>\n }\n @if (yearFuture()) {\n <div>Please choose a year between the current year and 2050.</div>\n }\n @if (month()) {\n <div>{{ textChooseValidMonth() }}</div>\n }\n @if (future()) {\n <div>{{ textDateMayNotBeFuture() }}</div>\n }\n @if (past()) {\n <div>{{ textDateMayNotBePast() }}</div>\n }\n</div>\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAGO,MAAM,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,Q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AW;AACd,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,8zBAAA,EAAA;;;AEbnD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softpak/components",
|
|
3
|
-
"version": "20.7.
|
|
3
|
+
"version": "20.7.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "20.x.x",
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
"types": "./index.d.ts",
|
|
33
33
|
"default": "./fesm2022/softpak-components.mjs"
|
|
34
34
|
},
|
|
35
|
+
"./spx-404-page": {
|
|
36
|
+
"types": "./spx-404-page/index.d.ts",
|
|
37
|
+
"default": "./fesm2022/softpak-components-spx-404-page.mjs"
|
|
38
|
+
},
|
|
35
39
|
"./spx-alert": {
|
|
36
40
|
"types": "./spx-alert/index.d.ts",
|
|
37
41
|
"default": "./fesm2022/softpak-components-spx-alert.mjs"
|
|
@@ -44,10 +48,6 @@
|
|
|
44
48
|
"types": "./spx-app-configuration/index.d.ts",
|
|
45
49
|
"default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
|
|
46
50
|
},
|
|
47
|
-
"./spx-404-page": {
|
|
48
|
-
"types": "./spx-404-page/index.d.ts",
|
|
49
|
-
"default": "./fesm2022/softpak-components-spx-404-page.mjs"
|
|
50
|
-
},
|
|
51
51
|
"./spx-button": {
|
|
52
52
|
"types": "./spx-button/index.d.ts",
|
|
53
53
|
"default": "./fesm2022/softpak-components-spx-button.mjs"
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
"types": "./spx-capitalize/index.d.ts",
|
|
57
57
|
"default": "./fesm2022/softpak-components-spx-capitalize.mjs"
|
|
58
58
|
},
|
|
59
|
-
"./spx-card": {
|
|
60
|
-
"types": "./spx-card/index.d.ts",
|
|
61
|
-
"default": "./fesm2022/softpak-components-spx-card.mjs"
|
|
62
|
-
},
|
|
63
59
|
"./spx-change-details": {
|
|
64
60
|
"types": "./spx-change-details/index.d.ts",
|
|
65
61
|
"default": "./fesm2022/softpak-components-spx-change-details.mjs"
|
|
66
62
|
},
|
|
63
|
+
"./spx-card": {
|
|
64
|
+
"types": "./spx-card/index.d.ts",
|
|
65
|
+
"default": "./fesm2022/softpak-components-spx-card.mjs"
|
|
66
|
+
},
|
|
67
67
|
"./spx-channel-selection": {
|
|
68
68
|
"types": "./spx-channel-selection/index.d.ts",
|
|
69
69
|
"default": "./fesm2022/softpak-components-spx-channel-selection.mjs"
|
|
@@ -72,10 +72,6 @@
|
|
|
72
72
|
"types": "./spx-check-digit/index.d.ts",
|
|
73
73
|
"default": "./fesm2022/softpak-components-spx-check-digit.mjs"
|
|
74
74
|
},
|
|
75
|
-
"./spx-form-section": {
|
|
76
|
-
"types": "./spx-form-section/index.d.ts",
|
|
77
|
-
"default": "./fesm2022/softpak-components-spx-form-section.mjs"
|
|
78
|
-
},
|
|
79
75
|
"./spx-confirm": {
|
|
80
76
|
"types": "./spx-confirm/index.d.ts",
|
|
81
77
|
"default": "./fesm2022/softpak-components-spx-confirm.mjs"
|
|
@@ -84,6 +80,10 @@
|
|
|
84
80
|
"types": "./spx-form-view/index.d.ts",
|
|
85
81
|
"default": "./fesm2022/softpak-components-spx-form-view.mjs"
|
|
86
82
|
},
|
|
83
|
+
"./spx-form-section": {
|
|
84
|
+
"types": "./spx-form-section/index.d.ts",
|
|
85
|
+
"default": "./fesm2022/softpak-components-spx-form-section.mjs"
|
|
86
|
+
},
|
|
87
87
|
"./spx-helpers": {
|
|
88
88
|
"types": "./spx-helpers/index.d.ts",
|
|
89
89
|
"default": "./fesm2022/softpak-components-spx-helpers.mjs"
|
|
@@ -92,10 +92,6 @@
|
|
|
92
92
|
"types": "./spx-inputs/index.d.ts",
|
|
93
93
|
"default": "./fesm2022/softpak-components-spx-inputs.mjs"
|
|
94
94
|
},
|
|
95
|
-
"./spx-number-check": {
|
|
96
|
-
"types": "./spx-number-check/index.d.ts",
|
|
97
|
-
"default": "./fesm2022/softpak-components-spx-number-check.mjs"
|
|
98
|
-
},
|
|
99
95
|
"./spx-navigation": {
|
|
100
96
|
"types": "./spx-navigation/index.d.ts",
|
|
101
97
|
"default": "./fesm2022/softpak-components-spx-navigation.mjs"
|
|
@@ -104,18 +100,22 @@
|
|
|
104
100
|
"types": "./spx-pagination/index.d.ts",
|
|
105
101
|
"default": "./fesm2022/softpak-components-spx-pagination.mjs"
|
|
106
102
|
},
|
|
103
|
+
"./spx-number-check": {
|
|
104
|
+
"types": "./spx-number-check/index.d.ts",
|
|
105
|
+
"default": "./fesm2022/softpak-components-spx-number-check.mjs"
|
|
106
|
+
},
|
|
107
107
|
"./spx-pipes": {
|
|
108
108
|
"types": "./spx-pipes/index.d.ts",
|
|
109
109
|
"default": "./fesm2022/softpak-components-spx-pipes.mjs"
|
|
110
110
|
},
|
|
111
|
-
"./spx-patch": {
|
|
112
|
-
"types": "./spx-patch/index.d.ts",
|
|
113
|
-
"default": "./fesm2022/softpak-components-spx-patch.mjs"
|
|
114
|
-
},
|
|
115
111
|
"./spx-progress-bar": {
|
|
116
112
|
"types": "./spx-progress-bar/index.d.ts",
|
|
117
113
|
"default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
|
|
118
114
|
},
|
|
115
|
+
"./spx-patch": {
|
|
116
|
+
"types": "./spx-patch/index.d.ts",
|
|
117
|
+
"default": "./fesm2022/softpak-components-spx-patch.mjs"
|
|
118
|
+
},
|
|
119
119
|
"./spx-spinner": {
|
|
120
120
|
"types": "./spx-spinner/index.d.ts",
|
|
121
121
|
"default": "./fesm2022/softpak-components-spx-spinner.mjs"
|
|
@@ -128,6 +128,10 @@
|
|
|
128
128
|
"types": "./spx-storage/index.d.ts",
|
|
129
129
|
"default": "./fesm2022/softpak-components-spx-storage.mjs"
|
|
130
130
|
},
|
|
131
|
+
"./spx-tabs": {
|
|
132
|
+
"types": "./spx-tabs/index.d.ts",
|
|
133
|
+
"default": "./fesm2022/softpak-components-spx-tabs.mjs"
|
|
134
|
+
},
|
|
131
135
|
"./spx-suggestion": {
|
|
132
136
|
"types": "./spx-suggestion/index.d.ts",
|
|
133
137
|
"default": "./fesm2022/softpak-components-spx-suggestion.mjs"
|
|
@@ -136,33 +140,29 @@
|
|
|
136
140
|
"types": "./spx-toaster/index.d.ts",
|
|
137
141
|
"default": "./fesm2022/softpak-components-spx-toaster.mjs"
|
|
138
142
|
},
|
|
139
|
-
"./spx-
|
|
140
|
-
"types": "./spx-
|
|
141
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
143
|
+
"./spx-translate": {
|
|
144
|
+
"types": "./spx-translate/index.d.ts",
|
|
145
|
+
"default": "./fesm2022/softpak-components-spx-translate.mjs"
|
|
142
146
|
},
|
|
143
147
|
"./spx-toggle": {
|
|
144
148
|
"types": "./spx-toggle/index.d.ts",
|
|
145
149
|
"default": "./fesm2022/softpak-components-spx-toggle.mjs"
|
|
146
150
|
},
|
|
147
|
-
"./spx-
|
|
148
|
-
"types": "./spx-
|
|
149
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
151
|
+
"./spx-validation": {
|
|
152
|
+
"types": "./spx-validation/index.d.ts",
|
|
153
|
+
"default": "./fesm2022/softpak-components-spx-validation.mjs"
|
|
154
|
+
},
|
|
155
|
+
"./spx-welcome": {
|
|
156
|
+
"types": "./spx-welcome/index.d.ts",
|
|
157
|
+
"default": "./fesm2022/softpak-components-spx-welcome.mjs"
|
|
150
158
|
},
|
|
151
159
|
"./spx-update": {
|
|
152
160
|
"types": "./spx-update/index.d.ts",
|
|
153
161
|
"default": "./fesm2022/softpak-components-spx-update.mjs"
|
|
154
162
|
},
|
|
155
|
-
"./spx-validation": {
|
|
156
|
-
"types": "./spx-validation/index.d.ts",
|
|
157
|
-
"default": "./fesm2022/softpak-components-spx-validation.mjs"
|
|
158
|
-
},
|
|
159
163
|
"./spx-validation-messages": {
|
|
160
164
|
"types": "./spx-validation-messages/index.d.ts",
|
|
161
165
|
"default": "./fesm2022/softpak-components-spx-validation-messages.mjs"
|
|
162
|
-
},
|
|
163
|
-
"./spx-welcome": {
|
|
164
|
-
"types": "./spx-welcome/index.d.ts",
|
|
165
|
-
"default": "./fesm2022/softpak-components-spx-welcome.mjs"
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
}
|
package/spx-spinner/index.d.ts
CHANGED
|
@@ -8,10 +8,22 @@ declare class SpxSpinnerComponent {
|
|
|
8
8
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SpxSpinnerComponent, "spx-spinner", never, { "spxShow": { "alias": "spxShow"; "required": false; "isSignal": true; }; "spxLoaderText": { "alias": "spxLoaderText"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
declare const hide: _ngrx_store.ActionCreator<"[SPX / Spinner] Hide", (props:
|
|
11
|
+
declare const hide: _ngrx_store.ActionCreator<"[SPX / Spinner] Hide", (props: {
|
|
12
|
+
action?: string;
|
|
13
|
+
}) => {
|
|
14
|
+
action?: string;
|
|
15
|
+
} & _ngrx_store.Action<"[SPX / Spinner] Hide">>;
|
|
12
16
|
declare const reset: _ngrx_store.ActionCreator<"[SPX / Spinner] Reset", (props: Record<string, unknown>) => Record<string, unknown> & _ngrx_store.Action<"[SPX / Spinner] Reset">>;
|
|
13
|
-
declare const show: _ngrx_store.ActionCreator<"[SPX / Spinner] Show", (props:
|
|
14
|
-
|
|
17
|
+
declare const show: _ngrx_store.ActionCreator<"[SPX / Spinner] Show", (props: {
|
|
18
|
+
action?: string;
|
|
19
|
+
}) => {
|
|
20
|
+
action?: string;
|
|
21
|
+
} & _ngrx_store.Action<"[SPX / Spinner] Show">>;
|
|
22
|
+
declare const all: ({
|
|
23
|
+
action?: string;
|
|
24
|
+
} & _ngrx_store.Action<"[SPX / Spinner] Hide">) | ({
|
|
25
|
+
action?: string;
|
|
26
|
+
} & _ngrx_store.Action<"[SPX / Spinner] Show">);
|
|
15
27
|
type Actions = typeof all;
|
|
16
28
|
|
|
17
29
|
type spxSpinner_actions_d_Actions = Actions;
|
|
@@ -24,6 +36,7 @@ declare namespace spxSpinner_actions_d {
|
|
|
24
36
|
}
|
|
25
37
|
|
|
26
38
|
interface StateI {
|
|
39
|
+
loadActions: string[];
|
|
27
40
|
nrOfLoadActions: number;
|
|
28
41
|
show: boolean;
|
|
29
42
|
}
|
|
@@ -47,6 +60,7 @@ declare const _default: {
|
|
|
47
60
|
reducer: _ngrx_store.ActionReducer<StateI, _ngrx_store.Action<string>>;
|
|
48
61
|
selectSpxSpinnerState: _ngrx_store.MemoizedSelector<Record<string, any>, StateI, (featureState: StateI) => StateI>;
|
|
49
62
|
selectShow: _ngrx_store.MemoizedSelector<Record<string, any>, boolean, (featureState: StateI) => boolean>;
|
|
63
|
+
selectLoadActions: _ngrx_store.MemoizedSelector<Record<string, any>, string[], (featureState: StateI) => string[]>;
|
|
50
64
|
selectNrOfLoadActions: _ngrx_store.MemoizedSelector<Record<string, any>, number, (featureState: StateI) => number>;
|
|
51
65
|
};
|
|
52
66
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
3
4
|
|
|
4
5
|
declare const spxValidatorMax: (max: number) => (control: AbstractControl) => {
|
|
5
6
|
max: {
|
|
@@ -41,6 +42,11 @@ declare class SpxValidateControlComponent {
|
|
|
41
42
|
readonly submitTried: _angular_core.InputSignal<boolean | undefined>;
|
|
42
43
|
readonly errors: _angular_core.InputSignal<ValidationErrors | null>;
|
|
43
44
|
readonly touched: _angular_core.InputSignal<boolean>;
|
|
45
|
+
protected readonly show: _angular_core.WritableSignal<boolean>;
|
|
46
|
+
private readonly shouldShow;
|
|
47
|
+
private pending;
|
|
48
|
+
private token;
|
|
49
|
+
private _delayShow;
|
|
44
50
|
maxLength: _angular_core.Signal<any>;
|
|
45
51
|
maxLengthRequiredLength: _angular_core.Signal<any>;
|
|
46
52
|
minLength: _angular_core.Signal<any>;
|
|
@@ -56,6 +62,19 @@ declare class SpxValidateControlComponent {
|
|
|
56
62
|
month: _angular_core.Signal<any>;
|
|
57
63
|
future: _angular_core.Signal<any>;
|
|
58
64
|
past: _angular_core.Signal<any>;
|
|
65
|
+
translateService: TranslateService;
|
|
66
|
+
textTooLong: _angular_core.Signal<any>;
|
|
67
|
+
textTooShort: _angular_core.Signal<any>;
|
|
68
|
+
textTooHigh: _angular_core.Signal<any>;
|
|
69
|
+
textTooLow: _angular_core.Signal<any>;
|
|
70
|
+
textPatternNotValid: _angular_core.Signal<any>;
|
|
71
|
+
textRequired: _angular_core.Signal<any>;
|
|
72
|
+
textChoosePast: _angular_core.Signal<any>;
|
|
73
|
+
textChooseFuture: _angular_core.Signal<any>;
|
|
74
|
+
textChooseValidMonth: _angular_core.Signal<any>;
|
|
75
|
+
textDateMayNotBeFuture: _angular_core.Signal<any>;
|
|
76
|
+
textDateMayNotBePast: _angular_core.Signal<any>;
|
|
77
|
+
textInvalidCode: _angular_core.Signal<any>;
|
|
59
78
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SpxValidateControlComponent, never>;
|
|
60
79
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SpxValidateControlComponent, "spx-validate-control", never, { "control": { "alias": "control"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "submitTried": { "alias": "submitTried"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": true; "isSignal": true; }; "touched": { "alias": "touched"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
61
80
|
}
|