@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
|
+
import { __decorate, __awaiter } from 'tslib';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, Injectable, inject, Directive, HostListener, Input, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
3
|
-
import { __decorate } from 'tslib';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, Injectable, inject, Directive, HostListener, Input, EventEmitter, Output, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
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,
|
|
@@ -1465,12 +1489,12 @@ class ValueAccessor {
|
|
|
1465
1489
|
const element = this.el.nativeElement;
|
|
1466
1490
|
const control = (_b = this.ngControl) === null || _b === void 0 ? void 0 : _b.control;
|
|
1467
1491
|
const invalid = !control.valid && control.dirty && control.touched;
|
|
1468
|
-
let
|
|
1492
|
+
let errorTexts;
|
|
1469
1493
|
if (invalid) {
|
|
1470
|
-
|
|
1494
|
+
errorTexts = this.initialErrorText || this.getErrorTexts(control);
|
|
1471
1495
|
}
|
|
1472
1496
|
element.invalid = invalid;
|
|
1473
|
-
element.errorText =
|
|
1497
|
+
element.errorText = errorTexts !== null && errorTexts !== void 0 ? errorTexts : '';
|
|
1474
1498
|
});
|
|
1475
1499
|
}
|
|
1476
1500
|
setDisabledState(isDisabled) {
|
|
@@ -1515,19 +1539,21 @@ class ValueAccessor {
|
|
|
1515
1539
|
});
|
|
1516
1540
|
}
|
|
1517
1541
|
}
|
|
1518
|
-
|
|
1519
|
-
var _a;
|
|
1542
|
+
getErrorTexts(control) {
|
|
1520
1543
|
if (control.errors == null) {
|
|
1521
1544
|
console.warn('no errors for invalid control', control);
|
|
1522
|
-
return
|
|
1545
|
+
return [];
|
|
1523
1546
|
}
|
|
1524
|
-
const
|
|
1525
|
-
if (
|
|
1547
|
+
const errorList = Object.entries(control.errors);
|
|
1548
|
+
if (errorList.length <= 0) {
|
|
1526
1549
|
console.warn('no errors for invalid control', control);
|
|
1527
|
-
return
|
|
1550
|
+
return [];
|
|
1528
1551
|
}
|
|
1529
|
-
|
|
1530
|
-
|
|
1552
|
+
return errorList.map((error) => {
|
|
1553
|
+
var _a;
|
|
1554
|
+
const [key, value] = error;
|
|
1555
|
+
return ((_a = this.validationMessagesService.getErrorMessage(getLanguage(), Object.assign({ key: key }, value))) !== null && _a !== void 0 ? _a : key);
|
|
1556
|
+
});
|
|
1531
1557
|
}
|
|
1532
1558
|
}
|
|
1533
1559
|
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 });
|
|
@@ -1718,49 +1744,134 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1718
1744
|
args: ['change', ['$event.target']]
|
|
1719
1745
|
}] } });
|
|
1720
1746
|
|
|
1747
|
+
/**
|
|
1748
|
+
* This directive intercepts the ngSubmit event of an Angular form and introduces
|
|
1749
|
+
* a supplementary event named sixSubmit. The sixSubmit event is triggered exclusively
|
|
1750
|
+
* when the form is valid. In cases where the form is considered invalid, this directive
|
|
1751
|
+
* takes proactive actions by marking all form controls as touched and dirty. Additionally,
|
|
1752
|
+
* it shifts the focus to the initial invalid form element, facilitating quick error
|
|
1753
|
+
* resolution.
|
|
1754
|
+
*
|
|
1755
|
+
* To utilize this directive, apply it to an Angular form.
|
|
1756
|
+
* ```html
|
|
1757
|
+
* <form [formGroup]="form" sixForm (sixSubmit)="onSubmit($event)">
|
|
1758
|
+
* <!-- form content -->
|
|
1759
|
+
* </form>
|
|
1760
|
+
* ```
|
|
1761
|
+
*
|
|
1762
|
+
* For users needing greater flexibility in determining when error messages are displayed,
|
|
1763
|
+
* or for those who prefer not to rely solely on the form submission event,
|
|
1764
|
+
* an alternative is to use the SixFormUtilDirective.
|
|
1765
|
+
*/
|
|
1766
|
+
class SixFormDirective {
|
|
1767
|
+
onNgSubmit(event) {
|
|
1768
|
+
if (this.formGroupDirective.invalid) {
|
|
1769
|
+
focusInvalidField(this.formGroupDirective, this.elementRef);
|
|
1770
|
+
}
|
|
1771
|
+
else {
|
|
1772
|
+
this.sixSubmit.emit(event);
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
constructor(elementRef, formGroupDirective) {
|
|
1776
|
+
this.elementRef = elementRef;
|
|
1777
|
+
this.formGroupDirective = formGroupDirective;
|
|
1778
|
+
/**
|
|
1779
|
+
* Emits an event when the form is valid and the form submission has been triggered.
|
|
1780
|
+
*/
|
|
1781
|
+
this.sixSubmit = new EventEmitter();
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
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 });
|
|
1785
|
+
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 });
|
|
1786
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormDirective, decorators: [{
|
|
1787
|
+
type: Directive,
|
|
1788
|
+
args: [{
|
|
1789
|
+
selector: 'form[sixForm]',
|
|
1790
|
+
}]
|
|
1791
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FormGroupDirective }]; }, propDecorators: { sixSubmit: [{
|
|
1792
|
+
type: Output
|
|
1793
|
+
}], onNgSubmit: [{
|
|
1794
|
+
type: HostListener,
|
|
1795
|
+
args: ['ngSubmit', ['$event']]
|
|
1796
|
+
}] } });
|
|
1797
|
+
/**
|
|
1798
|
+
* This directive provides a utility method, that marks all form controls
|
|
1799
|
+
* as touched and dirty, and focuses the first invalid form element.
|
|
1800
|
+
*
|
|
1801
|
+
* To utilize this directive, apply it to an Angular form.
|
|
1802
|
+
* ```html
|
|
1803
|
+
* <form [formGroup]="form" sixFormUtil (ngSubmit)="onSubmit($event)">
|
|
1804
|
+
* <!-- form content -->
|
|
1805
|
+
* </form>
|
|
1806
|
+
* ```
|
|
1807
|
+
*
|
|
1808
|
+
* Then, get a reference to the directive and invoke `focusInvalidField()` if the
|
|
1809
|
+
* form is invalid:
|
|
1810
|
+
* ```ts
|
|
1811
|
+
* @ViewChild(SixFormUtilDirective) sixFormUtil!: SixFormUtilDirective;
|
|
1812
|
+
* // ...
|
|
1813
|
+
* onSubmit() {
|
|
1814
|
+
* if (this.form.invalid) {
|
|
1815
|
+
* this.sixFormUtil.focusInvalidField();
|
|
1816
|
+
* } else {
|
|
1817
|
+
* // ...
|
|
1818
|
+
* }
|
|
1819
|
+
* }
|
|
1820
|
+
* ```
|
|
1821
|
+
*/
|
|
1721
1822
|
class SixFormUtilDirective {
|
|
1722
|
-
constructor(elementRef,
|
|
1823
|
+
constructor(elementRef, formGroupDirective) {
|
|
1723
1824
|
this.elementRef = elementRef;
|
|
1724
|
-
this.
|
|
1825
|
+
this.formGroupDirective = formGroupDirective;
|
|
1725
1826
|
}
|
|
1827
|
+
/** markAllControlsAsDirty(Object.values(formGroup.controls));
|
|
1828
|
+
* Marks all form controls as touched and dirty, and focuses the first
|
|
1829
|
+
* invalid form element.
|
|
1830
|
+
*/
|
|
1726
1831
|
focusInvalidField() {
|
|
1727
|
-
|
|
1728
|
-
if (formGroupDirective) {
|
|
1729
|
-
formGroupDirective.form.markAllAsTouched();
|
|
1730
|
-
markAllAsDirty(formGroupDirective.form);
|
|
1731
|
-
const invalidField = this.elementRef.nativeElement.querySelector('.ng-invalid');
|
|
1732
|
-
if (typeof (invalidField === null || invalidField === void 0 ? void 0 : invalidField.setFocus) === 'function') {
|
|
1733
|
-
invalidField.setFocus();
|
|
1734
|
-
}
|
|
1735
|
-
else if (typeof (invalidField === null || invalidField === void 0 ? void 0 : invalidField.focus) === 'function') {
|
|
1736
|
-
invalidField === null || invalidField === void 0 ? void 0 : invalidField.focus();
|
|
1737
|
-
}
|
|
1738
|
-
}
|
|
1832
|
+
focusInvalidField(this.formGroupDirective, this.elementRef);
|
|
1739
1833
|
}
|
|
1740
1834
|
}
|
|
1741
|
-
SixFormUtilDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormUtilDirective, deps: [{ token: i0.ElementRef }, { token:
|
|
1835
|
+
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 });
|
|
1742
1836
|
SixFormUtilDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SixFormUtilDirective, selector: "[sixFormUtil]", ngImport: i0 });
|
|
1743
1837
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormUtilDirective, decorators: [{
|
|
1744
1838
|
type: Directive,
|
|
1745
1839
|
args: [{
|
|
1746
1840
|
selector: '[sixFormUtil]',
|
|
1747
1841
|
}]
|
|
1748
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type:
|
|
1749
|
-
function
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1842
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FormGroupDirective }]; } });
|
|
1843
|
+
function focusInvalidField(formGroupDirective, formElement) {
|
|
1844
|
+
formGroupDirective.form.markAllAsTouched();
|
|
1845
|
+
markAllAsDirty([formGroupDirective.form]);
|
|
1846
|
+
const invalidElement = getInvalidElement(formElement.nativeElement);
|
|
1847
|
+
if ('setFocus' in invalidElement && typeof (invalidElement === null || invalidElement === void 0 ? void 0 : invalidElement.setFocus) === 'function') {
|
|
1848
|
+
invalidElement.setFocus();
|
|
1849
|
+
}
|
|
1850
|
+
if ('focus' in invalidElement && typeof (invalidElement === null || invalidElement === void 0 ? void 0 : invalidElement.focus) === 'function') {
|
|
1851
|
+
invalidElement.focus();
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
function getInvalidElement(parent) {
|
|
1855
|
+
const invalidElement = parent.querySelector('.ng-invalid');
|
|
1856
|
+
if (invalidElement == null) {
|
|
1857
|
+
return parent;
|
|
1762
1858
|
}
|
|
1763
|
-
|
|
1859
|
+
return getInvalidElement(invalidElement);
|
|
1860
|
+
}
|
|
1861
|
+
function markAllAsDirty(controls) {
|
|
1862
|
+
controls.forEach((control) => {
|
|
1863
|
+
if (control instanceof FormControl) {
|
|
1864
|
+
control.markAsDirty({ onlySelf: true });
|
|
1865
|
+
}
|
|
1866
|
+
else if (control instanceof FormGroup) {
|
|
1867
|
+
control.markAsDirty({ onlySelf: true });
|
|
1868
|
+
markAllAsDirty(Object.values(control.controls));
|
|
1869
|
+
}
|
|
1870
|
+
else if (control instanceof FormArray) {
|
|
1871
|
+
control.markAsDirty({ onlySelf: true });
|
|
1872
|
+
markAllAsDirty(control.controls);
|
|
1873
|
+
}
|
|
1874
|
+
});
|
|
1764
1875
|
}
|
|
1765
1876
|
|
|
1766
1877
|
class SixUiLibraryValidators {
|
|
@@ -2061,9 +2172,8 @@ class UiLibraryAngularModule {
|
|
|
2061
2172
|
providers: [
|
|
2062
2173
|
{
|
|
2063
2174
|
provide: APP_INITIALIZER,
|
|
2064
|
-
useFactory: () => {
|
|
2065
|
-
|
|
2066
|
-
},
|
|
2175
|
+
useFactory: () => () => __awaiter(this, void 0, void 0, function* () { return defineCustomElements(); }),
|
|
2176
|
+
multi: true,
|
|
2067
2177
|
},
|
|
2068
2178
|
{ provide: ValidationMessagesService, useClass: customValidationMessagesService !== null && customValidationMessagesService !== void 0 ? customValidationMessagesService : ValidationMessagesService },
|
|
2069
2179
|
],
|
|
@@ -2071,7 +2181,7 @@ class UiLibraryAngularModule {
|
|
|
2071
2181
|
}
|
|
2072
2182
|
}
|
|
2073
2183
|
UiLibraryAngularModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2074
|
-
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,
|
|
2184
|
+
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,
|
|
2075
2185
|
// value accessors
|
|
2076
2186
|
TextValueAccessor,
|
|
2077
2187
|
NumericValueAccessor,
|
|
@@ -2089,7 +2199,8 @@ UiLibraryAngularModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
2089
2199
|
MaxDateValidator,
|
|
2090
2200
|
AllowedDatesValidator,
|
|
2091
2201
|
// form helpers
|
|
2092
|
-
|
|
2202
|
+
SixFormDirective,
|
|
2203
|
+
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,
|
|
2093
2204
|
// value accessors
|
|
2094
2205
|
TextValueAccessor,
|
|
2095
2206
|
NumericValueAccessor,
|
|
@@ -2107,6 +2218,7 @@ UiLibraryAngularModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
2107
2218
|
MaxDateValidator,
|
|
2108
2219
|
AllowedDatesValidator,
|
|
2109
2220
|
// form helpers
|
|
2221
|
+
SixFormDirective,
|
|
2110
2222
|
SixFormUtilDirective] });
|
|
2111
2223
|
UiLibraryAngularModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule });
|
|
2112
2224
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule, decorators: [{
|
|
@@ -2132,6 +2244,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2132
2244
|
MaxDateValidator,
|
|
2133
2245
|
AllowedDatesValidator,
|
|
2134
2246
|
// form helpers
|
|
2247
|
+
SixFormDirective,
|
|
2135
2248
|
SixFormUtilDirective,
|
|
2136
2249
|
],
|
|
2137
2250
|
imports: [],
|
|
@@ -2155,6 +2268,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2155
2268
|
MaxDateValidator,
|
|
2156
2269
|
AllowedDatesValidator,
|
|
2157
2270
|
// form helpers
|
|
2271
|
+
SixFormDirective,
|
|
2158
2272
|
SixFormUtilDirective,
|
|
2159
2273
|
],
|
|
2160
2274
|
}]
|
|
@@ -2168,5 +2282,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2168
2282
|
* Generated bundle index. Do not edit.
|
|
2169
2283
|
*/
|
|
2170
2284
|
|
|
2171
|
-
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 };
|
|
2285
|
+
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 };
|
|
2172
2286
|
//# sourceMappingURL=six-group-ui-library-angular.mjs.map
|