@six-group/ui-library-angular 0.0.0-insider.e148618 → 0.0.0-insider.e5360cd
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/LICENSE +201 -0
- package/README.md +6 -22
- package/esm2020/lib/control-value-accessors/value-accessor.mjs +13 -11
- package/esm2020/lib/form/six-form.directive.mjs +134 -0
- package/esm2020/lib/stencil-generated/components.mjs +48 -25
- package/esm2020/lib/stencil-generated/index.mjs +2 -1
- package/esm2020/lib/ui-library-angular.module.mjs +10 -7
- package/esm2020/public-api.mjs +2 -2
- package/fesm2015/six-group-ui-library-angular.mjs +188 -74
- package/fesm2015/six-group-ui-library-angular.mjs.map +1 -1
- package/fesm2020/six-group-ui-library-angular.mjs +186 -72
- package/fesm2020/six-group-ui-library-angular.mjs.map +1 -1
- package/lib/control-value-accessors/value-accessor.d.ts +1 -1
- package/lib/form/six-form.directive.d.ts +71 -0
- package/lib/stencil-generated/components.d.ts +17 -8
- package/lib/stencil-generated/index.d.ts +1 -1
- package/lib/ui-library-angular.module.d.ts +2 -2
- package/package.json +5 -1
- package/public-api.d.ts +1 -1
- package/esm2020/lib/util/six-form-util.directive.mjs +0 -48
- package/lib/util/six-form-util.directive.d.ts +0 -10
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, Injectable, inject, Directive, HostListener, Input, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Injectable, inject, Directive, HostListener, Input, EventEmitter, Output, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
3
3
|
import { __decorate } from 'tslib';
|
|
4
4
|
import { fromEvent } from 'rxjs';
|
|
5
5
|
import { defineCustomElements } from '@six-group/ui-library/loader';
|
|
6
|
-
import
|
|
6
|
+
import * as i1 from '@angular/forms';
|
|
7
|
+
import { NgControl, NG_VALUE_ACCESSOR, FormControl, FormGroup, FormArray, NG_VALIDATORS, Validators } from '@angular/forms';
|
|
7
8
|
import { getErrorMessage } from '@six-group/ui-library';
|
|
8
9
|
|
|
9
10
|
/* eslint-disable */
|
|
@@ -211,10 +212,10 @@ let SixCheckbox = class SixCheckbox {
|
|
|
211
212
|
}
|
|
212
213
|
};
|
|
213
214
|
SixCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixCheckbox, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
214
|
-
SixCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixCheckbox, selector: "six-checkbox", inputs: { checked: "checked", disabled: "disabled", errorText: "errorText", indeterminate: "indeterminate", invalid: "invalid", label: "label", name: "name", required: "required", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
215
|
+
SixCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixCheckbox, selector: "six-checkbox", inputs: { checked: "checked", disabled: "disabled", errorText: "errorText", errorTextCount: "errorTextCount", indeterminate: "indeterminate", invalid: "invalid", label: "label", name: "name", required: "required", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
215
216
|
SixCheckbox = __decorate([
|
|
216
217
|
ProxyCmp({
|
|
217
|
-
inputs: ['checked', 'disabled', 'errorText', 'indeterminate', 'invalid', 'label', 'name', 'required', 'value'],
|
|
218
|
+
inputs: ['checked', 'disabled', 'errorText', 'errorTextCount', 'indeterminate', 'invalid', 'label', 'name', 'required', 'value'],
|
|
218
219
|
methods: ['setFocus', 'removeFocus']
|
|
219
220
|
})
|
|
220
221
|
], SixCheckbox);
|
|
@@ -225,7 +226,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
225
226
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
226
227
|
template: '<ng-content></ng-content>',
|
|
227
228
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
228
|
-
inputs: ['checked', 'disabled', 'errorText', 'indeterminate', 'invalid', 'label', 'name', 'required', 'value'],
|
|
229
|
+
inputs: ['checked', 'disabled', 'errorText', 'errorTextCount', 'indeterminate', 'invalid', 'label', 'name', 'required', 'value'],
|
|
229
230
|
}]
|
|
230
231
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
231
232
|
let SixDatepicker = class SixDatepicker {
|
|
@@ -237,10 +238,10 @@ let SixDatepicker = class SixDatepicker {
|
|
|
237
238
|
}
|
|
238
239
|
};
|
|
239
240
|
SixDatepicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixDatepicker, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
240
|
-
SixDatepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixDatepicker, selector: "six-datepicker", inputs: { allowedDates: "allowedDates", clearable: "clearable", closeOnSelect: "closeOnSelect", containingElement: "containingElement", dateFormat: "dateFormat", debounce: "debounce", defaultDate: "defaultDate", disabled: "disabled", errorText: "errorText", hoist: "hoist", iconPosition: "iconPosition", inline: "inline", invalid: "invalid", label: "label", locale: "locale", max: "max", min: "min", name: "name", open: "open", placeholder: "placeholder", placement: "placement", readonly: "readonly", required: "required", size: "size", type: "type", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
241
|
+
SixDatepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixDatepicker, selector: "six-datepicker", inputs: { allowedDates: "allowedDates", clearable: "clearable", closeOnSelect: "closeOnSelect", containingElement: "containingElement", dateFormat: "dateFormat", debounce: "debounce", defaultDate: "defaultDate", disabled: "disabled", errorText: "errorText", errorTextCount: "errorTextCount", hoist: "hoist", iconPosition: "iconPosition", inline: "inline", invalid: "invalid", label: "label", locale: "locale", max: "max", min: "min", name: "name", open: "open", placeholder: "placeholder", placement: "placement", readonly: "readonly", required: "required", size: "size", type: "type", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
241
242
|
SixDatepicker = __decorate([
|
|
242
243
|
ProxyCmp({
|
|
243
|
-
inputs: ['allowedDates', 'clearable', 'closeOnSelect', 'containingElement', 'dateFormat', 'debounce', 'defaultDate', 'disabled', 'errorText', 'hoist', 'iconPosition', 'inline', 'invalid', 'label', 'locale', 'max', 'min', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'size', 'type', 'value'],
|
|
244
|
+
inputs: ['allowedDates', 'clearable', 'closeOnSelect', 'containingElement', 'dateFormat', 'debounce', 'defaultDate', 'disabled', 'errorText', 'errorTextCount', 'hoist', 'iconPosition', 'inline', 'invalid', 'label', 'locale', 'max', 'min', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'size', 'type', 'value'],
|
|
244
245
|
methods: ['setFocus', 'select']
|
|
245
246
|
})
|
|
246
247
|
], SixDatepicker);
|
|
@@ -251,7 +252,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
251
252
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
252
253
|
template: '<ng-content></ng-content>',
|
|
253
254
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
254
|
-
inputs: ['allowedDates', 'clearable', 'closeOnSelect', 'containingElement', 'dateFormat', 'debounce', 'defaultDate', 'disabled', 'errorText', 'hoist', 'iconPosition', 'inline', 'invalid', 'label', 'locale', 'max', 'min', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'size', 'type', 'value'],
|
|
255
|
+
inputs: ['allowedDates', 'clearable', 'closeOnSelect', 'containingElement', 'dateFormat', 'debounce', 'defaultDate', 'disabled', 'errorText', 'errorTextCount', 'hoist', 'iconPosition', 'inline', 'invalid', 'label', 'locale', 'max', 'min', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'size', 'type', 'value'],
|
|
255
256
|
}]
|
|
256
257
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
257
258
|
let SixDetails = class SixDetails {
|
|
@@ -358,6 +359,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
358
359
|
inputs: ['asyncFilter', 'autofocusFilter', 'closeOnSelect', 'containingElement', 'disableHideOnEnterAndSpace', 'distance', 'filter', 'filterDebounce', 'filterPlaceholder', 'hoist', 'open', 'options', 'placement', 'skidding', 'virtualScroll'],
|
|
359
360
|
}]
|
|
360
361
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
362
|
+
let SixError = class SixError {
|
|
363
|
+
constructor(c, r, z) {
|
|
364
|
+
this.z = z;
|
|
365
|
+
c.detach();
|
|
366
|
+
this.el = r.nativeElement;
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
SixError.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixError, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
370
|
+
SixError.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixError, selector: "six-error", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
371
|
+
SixError = __decorate([
|
|
372
|
+
ProxyCmp({})
|
|
373
|
+
], SixError);
|
|
374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixError, decorators: [{
|
|
375
|
+
type: Component,
|
|
376
|
+
args: [{
|
|
377
|
+
selector: 'six-error',
|
|
378
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
379
|
+
template: '<ng-content></ng-content>',
|
|
380
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
381
|
+
inputs: [],
|
|
382
|
+
}]
|
|
383
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
361
384
|
let SixErrorPage = class SixErrorPage {
|
|
362
385
|
constructor(c, r, z) {
|
|
363
386
|
this.z = z;
|
|
@@ -583,10 +606,10 @@ let SixInput = class SixInput {
|
|
|
583
606
|
}
|
|
584
607
|
};
|
|
585
608
|
SixInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixInput, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
586
|
-
SixInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixInput, selector: "six-input", inputs: { autocapitalize: "autocapitalize", autocomplete: "autocomplete", autocorrect: "autocorrect", autofocus: "autofocus", clearable: "clearable", disabled: "disabled", errorText: "errorText", helpText: "helpText", inputmode: "inputmode", invalid: "invalid", label: "label", line: "line", max: "max", maxlength: "maxlength", min: "min", minlength: "minlength", name: "name", pattern: "pattern", pill: "pill", placeholder: "placeholder", readonly: "readonly", required: "required", size: "size", spellcheck: "spellcheck", step: "step", togglePassword: "togglePassword", type: "type", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
609
|
+
SixInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixInput, selector: "six-input", inputs: { autocapitalize: "autocapitalize", autocomplete: "autocomplete", autocorrect: "autocorrect", autofocus: "autofocus", clearable: "clearable", disabled: "disabled", errorText: "errorText", errorTextCount: "errorTextCount", helpText: "helpText", inputmode: "inputmode", invalid: "invalid", label: "label", line: "line", max: "max", maxlength: "maxlength", min: "min", minlength: "minlength", name: "name", pattern: "pattern", pill: "pill", placeholder: "placeholder", readonly: "readonly", required: "required", size: "size", spellcheck: "spellcheck", step: "step", togglePassword: "togglePassword", type: "type", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
587
610
|
SixInput = __decorate([
|
|
588
611
|
ProxyCmp({
|
|
589
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearable', 'disabled', 'errorText', 'helpText', 'inputmode', 'invalid', 'label', 'line', 'max', 'maxlength', 'min', 'minlength', 'name', 'pattern', 'pill', 'placeholder', 'readonly', 'required', 'size', 'spellcheck', 'step', 'togglePassword', 'type', 'value'],
|
|
612
|
+
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearable', 'disabled', 'errorText', 'errorTextCount', 'helpText', 'inputmode', 'invalid', 'label', 'line', 'max', 'maxlength', 'min', 'minlength', 'name', 'pattern', 'pill', 'placeholder', 'readonly', 'required', 'size', 'spellcheck', 'step', 'togglePassword', 'type', 'value'],
|
|
590
613
|
methods: ['setFocus', 'removeFocus', 'select', 'setSelectionRange', 'setRangeText']
|
|
591
614
|
})
|
|
592
615
|
], SixInput);
|
|
@@ -597,7 +620,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
597
620
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
598
621
|
template: '<ng-content></ng-content>',
|
|
599
622
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
600
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearable', 'disabled', 'errorText', 'helpText', 'inputmode', 'invalid', 'label', 'line', 'max', 'maxlength', 'min', 'minlength', 'name', 'pattern', 'pill', 'placeholder', 'readonly', 'required', 'size', 'spellcheck', 'step', 'togglePassword', 'type', 'value'],
|
|
623
|
+
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearable', 'disabled', 'errorText', 'errorTextCount', 'helpText', 'inputmode', 'invalid', 'label', 'line', 'max', 'maxlength', 'min', 'minlength', 'name', 'pattern', 'pill', 'placeholder', 'readonly', 'required', 'size', 'spellcheck', 'step', 'togglePassword', 'type', 'value'],
|
|
601
624
|
}]
|
|
602
625
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
603
626
|
let SixItemPicker = class SixItemPicker {
|
|
@@ -900,10 +923,10 @@ let SixRange = class SixRange {
|
|
|
900
923
|
}
|
|
901
924
|
};
|
|
902
925
|
SixRange.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixRange, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
903
|
-
SixRange.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixRange, selector: "six-range", inputs: { disabled: "disabled", errorText: "errorText", helpText: "helpText", invalid: "invalid", label: "label", max: "max", min: "min", name: "name", required: "required", step: "step", tooltip: "tooltip", tooltipFormatter: "tooltipFormatter", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
926
|
+
SixRange.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixRange, selector: "six-range", inputs: { disabled: "disabled", errorText: "errorText", errorTextCount: "errorTextCount", helpText: "helpText", invalid: "invalid", label: "label", max: "max", min: "min", name: "name", required: "required", step: "step", tooltip: "tooltip", tooltipFormatter: "tooltipFormatter", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
904
927
|
SixRange = __decorate([
|
|
905
928
|
ProxyCmp({
|
|
906
|
-
inputs: ['disabled', 'errorText', 'helpText', 'invalid', 'label', 'max', 'min', 'name', 'required', 'step', 'tooltip', 'tooltipFormatter', 'value'],
|
|
929
|
+
inputs: ['disabled', 'errorText', 'errorTextCount', 'helpText', 'invalid', 'label', 'max', 'min', 'name', 'required', 'step', 'tooltip', 'tooltipFormatter', 'value'],
|
|
907
930
|
methods: ['setFocus', 'removeFocus']
|
|
908
931
|
})
|
|
909
932
|
], SixRange);
|
|
@@ -914,7 +937,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
914
937
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
915
938
|
template: '<ng-content></ng-content>',
|
|
916
939
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
917
|
-
inputs: ['disabled', 'errorText', 'helpText', 'invalid', 'label', 'max', 'min', 'name', 'required', 'step', 'tooltip', 'tooltipFormatter', 'value'],
|
|
940
|
+
inputs: ['disabled', 'errorText', 'errorTextCount', 'helpText', 'invalid', 'label', 'max', 'min', 'name', 'required', 'step', 'tooltip', 'tooltipFormatter', 'value'],
|
|
918
941
|
}]
|
|
919
942
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
920
943
|
let SixRoot = class SixRoot {
|
|
@@ -976,10 +999,10 @@ let SixSelect = class SixSelect {
|
|
|
976
999
|
}
|
|
977
1000
|
};
|
|
978
1001
|
SixSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSelect, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
979
|
-
SixSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSelect, selector: "six-select", inputs: { asyncFilter: "asyncFilter", autocomplete: "autocomplete", clearable: "clearable", disabled: "disabled", errorText: "errorText", filter: "filter", filterDebounce: "filterDebounce", filterPlaceholder: "filterPlaceholder", helpText: "helpText", hoist: "hoist", inputDebounce: "inputDebounce", invalid: "invalid", label: "label", line: "line", maxTagsVisible: "maxTagsVisible", multiple: "multiple", name: "name", options: "options", pill: "pill", placeholder: "placeholder", required: "required", size: "size", value: "value", virtualScroll: "virtualScroll" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1002
|
+
SixSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSelect, selector: "six-select", inputs: { asyncFilter: "asyncFilter", autocomplete: "autocomplete", clearable: "clearable", disabled: "disabled", errorText: "errorText", errorTextCount: "errorTextCount", filter: "filter", filterDebounce: "filterDebounce", filterPlaceholder: "filterPlaceholder", helpText: "helpText", hoist: "hoist", inputDebounce: "inputDebounce", invalid: "invalid", label: "label", line: "line", maxTagsVisible: "maxTagsVisible", multiple: "multiple", name: "name", options: "options", pill: "pill", placeholder: "placeholder", required: "required", size: "size", value: "value", virtualScroll: "virtualScroll" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
980
1003
|
SixSelect = __decorate([
|
|
981
1004
|
ProxyCmp({
|
|
982
|
-
inputs: ['asyncFilter', 'autocomplete', 'clearable', 'disabled', 'errorText', 'filter', 'filterDebounce', 'filterPlaceholder', 'helpText', 'hoist', 'inputDebounce', 'invalid', 'label', 'line', 'maxTagsVisible', 'multiple', 'name', 'options', 'pill', 'placeholder', 'required', 'size', 'value', 'virtualScroll'],
|
|
1005
|
+
inputs: ['asyncFilter', 'autocomplete', 'clearable', 'disabled', 'errorText', 'errorTextCount', 'filter', 'filterDebounce', 'filterPlaceholder', 'helpText', 'hoist', 'inputDebounce', 'invalid', 'label', 'line', 'maxTagsVisible', 'multiple', 'name', 'options', 'pill', 'placeholder', 'required', 'size', 'value', 'virtualScroll'],
|
|
983
1006
|
methods: ['setFocus']
|
|
984
1007
|
})
|
|
985
1008
|
], SixSelect);
|
|
@@ -990,7 +1013,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
990
1013
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
991
1014
|
template: '<ng-content></ng-content>',
|
|
992
1015
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
993
|
-
inputs: ['asyncFilter', 'autocomplete', 'clearable', 'disabled', 'errorText', 'filter', 'filterDebounce', 'filterPlaceholder', 'helpText', 'hoist', 'inputDebounce', 'invalid', 'label', 'line', 'maxTagsVisible', 'multiple', 'name', 'options', 'pill', 'placeholder', 'required', 'size', 'value', 'virtualScroll'],
|
|
1016
|
+
inputs: ['asyncFilter', 'autocomplete', 'clearable', 'disabled', 'errorText', 'errorTextCount', 'filter', 'filterDebounce', 'filterPlaceholder', 'helpText', 'hoist', 'inputDebounce', 'invalid', 'label', 'line', 'maxTagsVisible', 'multiple', 'name', 'options', 'pill', 'placeholder', 'required', 'size', 'value', 'virtualScroll'],
|
|
994
1017
|
}]
|
|
995
1018
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
996
1019
|
let SixSidebar = class SixSidebar {
|
|
@@ -1124,10 +1147,10 @@ let SixSwitch = class SixSwitch {
|
|
|
1124
1147
|
}
|
|
1125
1148
|
};
|
|
1126
1149
|
SixSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSwitch, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1127
|
-
SixSwitch.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSwitch, selector: "six-switch", inputs: { checked: "checked", disabled: "disabled", errorText: "errorText", invalid: "invalid", label: "label", name: "name", required: "required", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1150
|
+
SixSwitch.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSwitch, selector: "six-switch", inputs: { checked: "checked", disabled: "disabled", errorText: "errorText", errorTextCount: "errorTextCount", invalid: "invalid", label: "label", name: "name", required: "required", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1128
1151
|
SixSwitch = __decorate([
|
|
1129
1152
|
ProxyCmp({
|
|
1130
|
-
inputs: ['checked', 'disabled', 'errorText', 'invalid', 'label', 'name', 'required', 'value'],
|
|
1153
|
+
inputs: ['checked', 'disabled', 'errorText', 'errorTextCount', 'invalid', 'label', 'name', 'required', 'value'],
|
|
1131
1154
|
methods: ['setFocus', 'removeFocus']
|
|
1132
1155
|
})
|
|
1133
1156
|
], SixSwitch);
|
|
@@ -1138,7 +1161,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1138
1161
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1139
1162
|
template: '<ng-content></ng-content>',
|
|
1140
1163
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1141
|
-
inputs: ['checked', 'disabled', 'errorText', 'invalid', 'label', 'name', 'required', 'value'],
|
|
1164
|
+
inputs: ['checked', 'disabled', 'errorText', 'errorTextCount', 'invalid', 'label', 'name', 'required', 'value'],
|
|
1142
1165
|
}]
|
|
1143
1166
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1144
1167
|
let SixTab = class SixTab {
|
|
@@ -1251,10 +1274,10 @@ let SixTextarea = class SixTextarea {
|
|
|
1251
1274
|
}
|
|
1252
1275
|
};
|
|
1253
1276
|
SixTextarea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixTextarea, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1254
|
-
SixTextarea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixTextarea, selector: "six-textarea", inputs: { autocapitalize: "autocapitalize", autocomplete: "autocomplete", autocorrect: "autocorrect", autofocus: "autofocus", disabled: "disabled", errorText: "errorText", helpText: "helpText", inputmode: "inputmode", invalid: "invalid", label: "label", maxlength: "maxlength", minlength: "minlength", name: "name", placeholder: "placeholder", readonly: "readonly", required: "required", resize: "resize", rows: "rows", size: "size", spellcheck: "spellcheck", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1277
|
+
SixTextarea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixTextarea, selector: "six-textarea", inputs: { autocapitalize: "autocapitalize", autocomplete: "autocomplete", autocorrect: "autocorrect", autofocus: "autofocus", disabled: "disabled", errorText: "errorText", errorTextCount: "errorTextCount", helpText: "helpText", inputmode: "inputmode", invalid: "invalid", label: "label", maxlength: "maxlength", minlength: "minlength", name: "name", placeholder: "placeholder", readonly: "readonly", required: "required", resize: "resize", rows: "rows", size: "size", spellcheck: "spellcheck", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1255
1278
|
SixTextarea = __decorate([
|
|
1256
1279
|
ProxyCmp({
|
|
1257
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', 'errorText', 'helpText', 'inputmode', 'invalid', 'label', 'maxlength', 'minlength', 'name', 'placeholder', 'readonly', 'required', 'resize', 'rows', 'size', 'spellcheck', 'value'],
|
|
1280
|
+
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', 'errorText', 'errorTextCount', 'helpText', 'inputmode', 'invalid', 'label', 'maxlength', 'minlength', 'name', 'placeholder', 'readonly', 'required', 'resize', 'rows', 'size', 'spellcheck', 'value'],
|
|
1258
1281
|
methods: ['setFocus', 'removeFocus', 'select', 'setSelectionRange', 'setRangeText']
|
|
1259
1282
|
})
|
|
1260
1283
|
], SixTextarea);
|
|
@@ -1265,7 +1288,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1265
1288
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1266
1289
|
template: '<ng-content></ng-content>',
|
|
1267
1290
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1268
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', 'errorText', 'helpText', 'inputmode', 'invalid', 'label', 'maxlength', 'minlength', 'name', 'placeholder', 'readonly', 'required', 'resize', 'rows', 'size', 'spellcheck', 'value'],
|
|
1291
|
+
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', 'errorText', 'errorTextCount', 'helpText', 'inputmode', 'invalid', 'label', 'maxlength', 'minlength', 'name', 'placeholder', 'readonly', 'required', 'resize', 'rows', 'size', 'spellcheck', 'value'],
|
|
1269
1292
|
}]
|
|
1270
1293
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1271
1294
|
let SixTile = class SixTile {
|
|
@@ -1303,10 +1326,10 @@ let SixTimepicker = class SixTimepicker {
|
|
|
1303
1326
|
}
|
|
1304
1327
|
};
|
|
1305
1328
|
SixTimepicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixTimepicker, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1306
|
-
SixTimepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixTimepicker, selector: "six-timepicker", inputs: { clearable: "clearable", debounce: "debounce", defaultTime: "defaultTime", disabled: "disabled", errorText: "errorText", format: "format", hoist: "hoist", iconPosition: "iconPosition", inline: "inline", interval: "interval", invalid: "invalid", label: "label", name: "name", open: "open", placeholder: "placeholder", placement: "placement", readonly: "readonly", required: "required", separator: "separator", size: "size", timeout: "timeout", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1329
|
+
SixTimepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixTimepicker, selector: "six-timepicker", inputs: { clearable: "clearable", debounce: "debounce", defaultTime: "defaultTime", disabled: "disabled", errorText: "errorText", errorTextCount: "errorTextCount", format: "format", hoist: "hoist", iconPosition: "iconPosition", inline: "inline", interval: "interval", invalid: "invalid", label: "label", name: "name", open: "open", placeholder: "placeholder", placement: "placement", readonly: "readonly", required: "required", separator: "separator", size: "size", timeout: "timeout", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1307
1330
|
SixTimepicker = __decorate([
|
|
1308
1331
|
ProxyCmp({
|
|
1309
|
-
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', 'errorText', 'format', 'hoist', 'iconPosition', 'inline', 'interval', 'invalid', 'label', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'separator', 'size', 'timeout', 'value'],
|
|
1332
|
+
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', 'errorText', 'errorTextCount', 'format', 'hoist', 'iconPosition', 'inline', 'interval', 'invalid', 'label', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'separator', 'size', 'timeout', 'value'],
|
|
1310
1333
|
methods: ['setFocus']
|
|
1311
1334
|
})
|
|
1312
1335
|
], SixTimepicker);
|
|
@@ -1317,7 +1340,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1317
1340
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1318
1341
|
template: '<ng-content></ng-content>',
|
|
1319
1342
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1320
|
-
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', 'errorText', 'format', 'hoist', 'iconPosition', 'inline', 'interval', 'invalid', 'label', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'separator', 'size', 'timeout', 'value'],
|
|
1343
|
+
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', 'errorText', 'errorTextCount', 'format', 'hoist', 'iconPosition', 'inline', 'interval', 'invalid', 'label', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'separator', 'size', 'timeout', 'value'],
|
|
1321
1344
|
}]
|
|
1322
1345
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1323
1346
|
let SixTooltip = class SixTooltip {
|
|
@@ -1360,6 +1383,7 @@ const DIRECTIVES = [
|
|
|
1360
1383
|
SixDialog,
|
|
1361
1384
|
SixDrawer,
|
|
1362
1385
|
SixDropdown,
|
|
1386
|
+
SixError,
|
|
1363
1387
|
SixErrorPage,
|
|
1364
1388
|
SixFileList,
|
|
1365
1389
|
SixFileListItem,
|
|
@@ -1464,12 +1488,12 @@ class ValueAccessor {
|
|
|
1464
1488
|
const element = this.el.nativeElement;
|
|
1465
1489
|
const control = this.ngControl?.control;
|
|
1466
1490
|
const invalid = !control.valid && control.dirty && control.touched;
|
|
1467
|
-
let
|
|
1491
|
+
let errorTexts;
|
|
1468
1492
|
if (invalid) {
|
|
1469
|
-
|
|
1493
|
+
errorTexts = this.initialErrorText || this.getErrorTexts(control);
|
|
1470
1494
|
}
|
|
1471
1495
|
element.invalid = invalid;
|
|
1472
|
-
element.errorText =
|
|
1496
|
+
element.errorText = errorTexts ?? '';
|
|
1473
1497
|
});
|
|
1474
1498
|
}
|
|
1475
1499
|
setDisabledState(isDisabled) {
|
|
@@ -1513,18 +1537,20 @@ class ValueAccessor {
|
|
|
1513
1537
|
});
|
|
1514
1538
|
}
|
|
1515
1539
|
}
|
|
1516
|
-
|
|
1540
|
+
getErrorTexts(control) {
|
|
1517
1541
|
if (control.errors == null) {
|
|
1518
1542
|
console.warn('no errors for invalid control', control);
|
|
1519
|
-
return
|
|
1543
|
+
return [];
|
|
1520
1544
|
}
|
|
1521
|
-
const
|
|
1522
|
-
if (
|
|
1545
|
+
const errorList = Object.entries(control.errors);
|
|
1546
|
+
if (errorList.length <= 0) {
|
|
1523
1547
|
console.warn('no errors for invalid control', control);
|
|
1524
|
-
return
|
|
1548
|
+
return [];
|
|
1525
1549
|
}
|
|
1526
|
-
|
|
1527
|
-
|
|
1550
|
+
return errorList.map((error) => {
|
|
1551
|
+
const [key, value] = error;
|
|
1552
|
+
return (this.validationMessagesService.getErrorMessage(getLanguage(), { key: key, ...value }) ?? key);
|
|
1553
|
+
});
|
|
1528
1554
|
}
|
|
1529
1555
|
}
|
|
1530
1556
|
ValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -1715,49 +1741,134 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1715
1741
|
args: ['change', ['$event.target']]
|
|
1716
1742
|
}] } });
|
|
1717
1743
|
|
|
1744
|
+
/**
|
|
1745
|
+
* This directive intercepts the ngSubmit event of an Angular form and introduces
|
|
1746
|
+
* a supplementary event named sixSubmit. The sixSubmit event is triggered exclusively
|
|
1747
|
+
* when the form is valid. In cases where the form is considered invalid, this directive
|
|
1748
|
+
* takes proactive actions by marking all form controls as touched and dirty. Additionally,
|
|
1749
|
+
* it shifts the focus to the initial invalid form element, facilitating quick error
|
|
1750
|
+
* resolution.
|
|
1751
|
+
*
|
|
1752
|
+
* To utilize this directive, apply it to an Angular form.
|
|
1753
|
+
* ```html
|
|
1754
|
+
* <form [formGroup]="form" sixForm (sixSubmit)="onSubmit($event)">
|
|
1755
|
+
* <!-- form content -->
|
|
1756
|
+
* </form>
|
|
1757
|
+
* ```
|
|
1758
|
+
*
|
|
1759
|
+
* For users needing greater flexibility in determining when error messages are displayed,
|
|
1760
|
+
* or for those who prefer not to rely solely on the form submission event,
|
|
1761
|
+
* an alternative is to use the SixFormUtilDirective.
|
|
1762
|
+
*/
|
|
1763
|
+
class SixFormDirective {
|
|
1764
|
+
onNgSubmit(event) {
|
|
1765
|
+
if (this.formGroupDirective.invalid) {
|
|
1766
|
+
focusInvalidField(this.formGroupDirective, this.elementRef);
|
|
1767
|
+
}
|
|
1768
|
+
else {
|
|
1769
|
+
this.sixSubmit.emit(event);
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
constructor(elementRef, formGroupDirective) {
|
|
1773
|
+
this.elementRef = elementRef;
|
|
1774
|
+
this.formGroupDirective = formGroupDirective;
|
|
1775
|
+
/**
|
|
1776
|
+
* Emits an event when the form is valid and the form submission has been triggered.
|
|
1777
|
+
*/
|
|
1778
|
+
this.sixSubmit = new EventEmitter();
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
SixFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormDirective, deps: [{ token: i0.ElementRef }, { token: i1.FormGroupDirective }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1782
|
+
SixFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SixFormDirective, selector: "form[sixForm]", outputs: { sixSubmit: "sixSubmit" }, host: { listeners: { "ngSubmit": "onNgSubmit($event)" } }, ngImport: i0 });
|
|
1783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormDirective, decorators: [{
|
|
1784
|
+
type: Directive,
|
|
1785
|
+
args: [{
|
|
1786
|
+
selector: 'form[sixForm]',
|
|
1787
|
+
}]
|
|
1788
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FormGroupDirective }]; }, propDecorators: { sixSubmit: [{
|
|
1789
|
+
type: Output
|
|
1790
|
+
}], onNgSubmit: [{
|
|
1791
|
+
type: HostListener,
|
|
1792
|
+
args: ['ngSubmit', ['$event']]
|
|
1793
|
+
}] } });
|
|
1794
|
+
/**
|
|
1795
|
+
* This directive provides a utility method, that marks all form controls
|
|
1796
|
+
* as touched and dirty, and focuses the first invalid form element.
|
|
1797
|
+
*
|
|
1798
|
+
* To utilize this directive, apply it to an Angular form.
|
|
1799
|
+
* ```html
|
|
1800
|
+
* <form [formGroup]="form" sixFormUtil (ngSubmit)="onSubmit($event)">
|
|
1801
|
+
* <!-- form content -->
|
|
1802
|
+
* </form>
|
|
1803
|
+
* ```
|
|
1804
|
+
*
|
|
1805
|
+
* Then, get a reference to the directive and invoke `focusInvalidField()` if the
|
|
1806
|
+
* form is invalid:
|
|
1807
|
+
* ```ts
|
|
1808
|
+
* @ViewChild(SixFormUtilDirective) sixFormUtil!: SixFormUtilDirective;
|
|
1809
|
+
* // ...
|
|
1810
|
+
* onSubmit() {
|
|
1811
|
+
* if (this.form.invalid) {
|
|
1812
|
+
* this.sixFormUtil.focusInvalidField();
|
|
1813
|
+
* } else {
|
|
1814
|
+
* // ...
|
|
1815
|
+
* }
|
|
1816
|
+
* }
|
|
1817
|
+
* ```
|
|
1818
|
+
*/
|
|
1718
1819
|
class SixFormUtilDirective {
|
|
1719
|
-
constructor(elementRef,
|
|
1820
|
+
constructor(elementRef, formGroupDirective) {
|
|
1720
1821
|
this.elementRef = elementRef;
|
|
1721
|
-
this.
|
|
1822
|
+
this.formGroupDirective = formGroupDirective;
|
|
1722
1823
|
}
|
|
1824
|
+
/** markAllControlsAsDirty(Object.values(formGroup.controls));
|
|
1825
|
+
* Marks all form controls as touched and dirty, and focuses the first
|
|
1826
|
+
* invalid form element.
|
|
1827
|
+
*/
|
|
1723
1828
|
focusInvalidField() {
|
|
1724
|
-
|
|
1725
|
-
if (formGroupDirective) {
|
|
1726
|
-
formGroupDirective.form.markAllAsTouched();
|
|
1727
|
-
markAllAsDirty(formGroupDirective.form);
|
|
1728
|
-
const invalidField = this.elementRef.nativeElement.querySelector('.ng-invalid');
|
|
1729
|
-
if (typeof invalidField?.setFocus === 'function') {
|
|
1730
|
-
invalidField.setFocus();
|
|
1731
|
-
}
|
|
1732
|
-
else if (typeof invalidField?.focus === 'function') {
|
|
1733
|
-
invalidField?.focus();
|
|
1734
|
-
}
|
|
1735
|
-
}
|
|
1829
|
+
focusInvalidField(this.formGroupDirective, this.elementRef);
|
|
1736
1830
|
}
|
|
1737
1831
|
}
|
|
1738
|
-
SixFormUtilDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormUtilDirective, deps: [{ token: i0.ElementRef }, { token:
|
|
1832
|
+
SixFormUtilDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormUtilDirective, deps: [{ token: i0.ElementRef }, { token: i1.FormGroupDirective }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1739
1833
|
SixFormUtilDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SixFormUtilDirective, selector: "[sixFormUtil]", ngImport: i0 });
|
|
1740
1834
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormUtilDirective, decorators: [{
|
|
1741
1835
|
type: Directive,
|
|
1742
1836
|
args: [{
|
|
1743
1837
|
selector: '[sixFormUtil]',
|
|
1744
1838
|
}]
|
|
1745
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type:
|
|
1746
|
-
function
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1839
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FormGroupDirective }]; } });
|
|
1840
|
+
function focusInvalidField(formGroupDirective, formElement) {
|
|
1841
|
+
formGroupDirective.form.markAllAsTouched();
|
|
1842
|
+
markAllAsDirty([formGroupDirective.form]);
|
|
1843
|
+
const invalidElement = getInvalidElement(formElement.nativeElement);
|
|
1844
|
+
if ('setFocus' in invalidElement && typeof invalidElement?.setFocus === 'function') {
|
|
1845
|
+
invalidElement.setFocus();
|
|
1846
|
+
}
|
|
1847
|
+
if ('focus' in invalidElement && typeof invalidElement?.focus === 'function') {
|
|
1848
|
+
invalidElement.focus();
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
function getInvalidElement(parent) {
|
|
1852
|
+
const invalidElement = parent.querySelector('.ng-invalid');
|
|
1853
|
+
if (invalidElement == null) {
|
|
1854
|
+
return parent;
|
|
1759
1855
|
}
|
|
1760
|
-
|
|
1856
|
+
return getInvalidElement(invalidElement);
|
|
1857
|
+
}
|
|
1858
|
+
function markAllAsDirty(controls) {
|
|
1859
|
+
controls.forEach((control) => {
|
|
1860
|
+
if (control instanceof FormControl) {
|
|
1861
|
+
control.markAsDirty({ onlySelf: true });
|
|
1862
|
+
}
|
|
1863
|
+
else if (control instanceof FormGroup) {
|
|
1864
|
+
control.markAsDirty({ onlySelf: true });
|
|
1865
|
+
markAllAsDirty(Object.values(control.controls));
|
|
1866
|
+
}
|
|
1867
|
+
else if (control instanceof FormArray) {
|
|
1868
|
+
control.markAsDirty({ onlySelf: true });
|
|
1869
|
+
markAllAsDirty(control.controls);
|
|
1870
|
+
}
|
|
1871
|
+
});
|
|
1761
1872
|
}
|
|
1762
1873
|
|
|
1763
1874
|
class SixUiLibraryValidators {
|
|
@@ -2058,9 +2169,8 @@ class UiLibraryAngularModule {
|
|
|
2058
2169
|
providers: [
|
|
2059
2170
|
{
|
|
2060
2171
|
provide: APP_INITIALIZER,
|
|
2061
|
-
useFactory: () =>
|
|
2062
|
-
|
|
2063
|
-
},
|
|
2172
|
+
useFactory: () => async () => defineCustomElements(),
|
|
2173
|
+
multi: true,
|
|
2064
2174
|
},
|
|
2065
2175
|
{ provide: ValidationMessagesService, useClass: customValidationMessagesService ?? ValidationMessagesService },
|
|
2066
2176
|
],
|
|
@@ -2068,7 +2178,7 @@ class UiLibraryAngularModule {
|
|
|
2068
2178
|
}
|
|
2069
2179
|
}
|
|
2070
2180
|
UiLibraryAngularModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2071
|
-
UiLibraryAngularModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule, declarations: [SetAttributes, SixAlert, SixAvatar, SixBadge, SixButton, SixCard, SixCheckbox, SixDatepicker, SixDetails, SixDialog, SixDrawer, SixDropdown, SixErrorPage, SixFileList, SixFileListItem, SixFileUpload, SixFooter, SixGroupLabel, SixHeader, SixIcon, SixIconButton, SixInput, SixItemPicker, SixLanguageSwitcher, SixLayoutGrid, SixMainContainer, SixMenu, SixMenuDivider, SixMenuItem, SixMenuLabel, SixPicto, SixProgressBar, SixProgressRing, SixRadio, SixRange, SixRoot, SixSearchField, SixSelect, SixSidebar, SixSidebarItem, SixSidebarItemGroup, SixSpinner, SixStageIndicator, SixSwitch, SixTab, SixTabGroup, SixTabPanel, SixTag, SixTextarea, SixTile, SixTimepicker, SixTooltip,
|
|
2181
|
+
UiLibraryAngularModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule, declarations: [SetAttributes, SixAlert, SixAvatar, SixBadge, SixButton, SixCard, SixCheckbox, SixDatepicker, SixDetails, SixDialog, SixDrawer, SixDropdown, SixError, SixErrorPage, SixFileList, SixFileListItem, SixFileUpload, SixFooter, SixGroupLabel, SixHeader, SixIcon, SixIconButton, SixInput, SixItemPicker, SixLanguageSwitcher, SixLayoutGrid, SixMainContainer, SixMenu, SixMenuDivider, SixMenuItem, SixMenuLabel, SixPicto, SixProgressBar, SixProgressRing, SixRadio, SixRange, SixRoot, SixSearchField, SixSelect, SixSidebar, SixSidebarItem, SixSidebarItemGroup, SixSpinner, SixStageIndicator, SixSwitch, SixTab, SixTabGroup, SixTabPanel, SixTag, SixTextarea, SixTile, SixTimepicker, SixTooltip,
|
|
2072
2182
|
// value accessors
|
|
2073
2183
|
TextValueAccessor,
|
|
2074
2184
|
NumericValueAccessor,
|
|
@@ -2086,7 +2196,8 @@ UiLibraryAngularModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
2086
2196
|
MaxDateValidator,
|
|
2087
2197
|
AllowedDatesValidator,
|
|
2088
2198
|
// form helpers
|
|
2089
|
-
|
|
2199
|
+
SixFormDirective,
|
|
2200
|
+
SixFormUtilDirective], exports: [SetAttributes, SixAlert, SixAvatar, SixBadge, SixButton, SixCard, SixCheckbox, SixDatepicker, SixDetails, SixDialog, SixDrawer, SixDropdown, SixError, SixErrorPage, SixFileList, SixFileListItem, SixFileUpload, SixFooter, SixGroupLabel, SixHeader, SixIcon, SixIconButton, SixInput, SixItemPicker, SixLanguageSwitcher, SixLayoutGrid, SixMainContainer, SixMenu, SixMenuDivider, SixMenuItem, SixMenuLabel, SixPicto, SixProgressBar, SixProgressRing, SixRadio, SixRange, SixRoot, SixSearchField, SixSelect, SixSidebar, SixSidebarItem, SixSidebarItemGroup, SixSpinner, SixStageIndicator, SixSwitch, SixTab, SixTabGroup, SixTabPanel, SixTag, SixTextarea, SixTile, SixTimepicker, SixTooltip,
|
|
2090
2201
|
// value accessors
|
|
2091
2202
|
TextValueAccessor,
|
|
2092
2203
|
NumericValueAccessor,
|
|
@@ -2104,6 +2215,7 @@ UiLibraryAngularModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
2104
2215
|
MaxDateValidator,
|
|
2105
2216
|
AllowedDatesValidator,
|
|
2106
2217
|
// form helpers
|
|
2218
|
+
SixFormDirective,
|
|
2107
2219
|
SixFormUtilDirective] });
|
|
2108
2220
|
UiLibraryAngularModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule });
|
|
2109
2221
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule, decorators: [{
|
|
@@ -2129,6 +2241,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2129
2241
|
MaxDateValidator,
|
|
2130
2242
|
AllowedDatesValidator,
|
|
2131
2243
|
// form helpers
|
|
2244
|
+
SixFormDirective,
|
|
2132
2245
|
SixFormUtilDirective,
|
|
2133
2246
|
],
|
|
2134
2247
|
imports: [],
|
|
@@ -2152,6 +2265,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2152
2265
|
MaxDateValidator,
|
|
2153
2266
|
AllowedDatesValidator,
|
|
2154
2267
|
// form helpers
|
|
2268
|
+
SixFormDirective,
|
|
2155
2269
|
SixFormUtilDirective,
|
|
2156
2270
|
],
|
|
2157
2271
|
}]
|
|
@@ -2165,5 +2279,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2165
2279
|
* Generated bundle index. Do not edit.
|
|
2166
2280
|
*/
|
|
2167
2281
|
|
|
2168
|
-
export { AllowedDatesValidator, CheckboxValueAccessor, DIRECTIVES, DatepickerValueAccessor, MaxDateValidator, MaxValidator, MinDateValidator, MinValidator, NumericValueAccessor, RadioValueAccessor, RangeValueAccessor, SelectValueAccessor, SetAttributes, SixAlert, SixAvatar, SixBadge, SixButton, SixCard, SixCheckbox, SixDatepicker, SixDetails, SixDialog, SixDrawer, SixDropdown, SixErrorPage, SixFileList, SixFileListItem, SixFileUpload, SixFooter, SixFormUtilDirective, SixGroupLabel, SixHeader, SixIcon, SixIconButton, SixInput, SixItemPicker, SixLanguageSwitcher, SixLayoutGrid, SixMainContainer, SixMenu, SixMenuDivider, SixMenuItem, SixMenuLabel, SixPicto, SixProgressBar, SixProgressRing, SixRadio, SixRange, SixRoot, SixSearchField, SixSelect, SixSidebar, SixSidebarItem, SixSidebarItemGroup, SixSpinner, SixStageIndicator, SixSwitch, SixTab, SixTabGroup, SixTabPanel, SixTag, SixTextarea, SixTile, SixTimepicker, SixTooltip, SixUiLibraryValidators, SwitchValueAccessor, TextValueAccessor, TimepickerValueAccessor, UiLibraryAngularModule, ValidationMessagesService, ValueAccessor };
|
|
2282
|
+
export { AllowedDatesValidator, CheckboxValueAccessor, DIRECTIVES, DatepickerValueAccessor, MaxDateValidator, MaxValidator, MinDateValidator, MinValidator, NumericValueAccessor, RadioValueAccessor, RangeValueAccessor, SelectValueAccessor, SetAttributes, SixAlert, SixAvatar, SixBadge, SixButton, SixCard, SixCheckbox, SixDatepicker, SixDetails, SixDialog, SixDrawer, SixDropdown, SixError, SixErrorPage, SixFileList, SixFileListItem, SixFileUpload, SixFooter, SixFormDirective, SixFormUtilDirective, SixGroupLabel, SixHeader, SixIcon, SixIconButton, SixInput, SixItemPicker, SixLanguageSwitcher, SixLayoutGrid, SixMainContainer, SixMenu, SixMenuDivider, SixMenuItem, SixMenuLabel, SixPicto, SixProgressBar, SixProgressRing, SixRadio, SixRange, SixRoot, SixSearchField, SixSelect, SixSidebar, SixSidebarItem, SixSidebarItemGroup, SixSpinner, SixStageIndicator, SixSwitch, SixTab, SixTabGroup, SixTabPanel, SixTag, SixTextarea, SixTile, SixTimepicker, SixTooltip, SixUiLibraryValidators, SwitchValueAccessor, TextValueAccessor, TimepickerValueAccessor, UiLibraryAngularModule, ValidationMessagesService, ValueAccessor };
|
|
2169
2283
|
//# sourceMappingURL=six-group-ui-library-angular.mjs.map
|