@six-group/ui-library-angular 0.0.0-insider.d16ec8e → 0.0.0-insider.db2b416
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/esm2020/lib/control-value-accessors/checkbox-value-accessor.mjs +41 -0
- package/esm2020/lib/control-value-accessors/datepicker-value-accessor.mjs +37 -0
- package/esm2020/lib/control-value-accessors/numeric-value-accessor.mjs +42 -0
- package/esm2020/lib/control-value-accessors/radio-value-accessor.mjs +62 -0
- package/esm2020/lib/control-value-accessors/range-value-accessor.mjs +42 -0
- package/esm2020/lib/control-value-accessors/select-value-accessor.mjs +37 -0
- package/esm2020/lib/control-value-accessors/switch-value-accessor.mjs +41 -0
- package/esm2020/lib/control-value-accessors/text-value-accessor.mjs +37 -0
- package/esm2020/lib/control-value-accessors/timepicker-value-accessor.mjs +37 -0
- package/esm2020/lib/control-value-accessors/value-accessor.mjs +143 -0
- package/esm2020/lib/services/validation-messages.service.mjs +15 -0
- package/esm2020/lib/stencil-generated/components.mjs +34 -61
- package/esm2020/lib/stencil-generated/index.mjs +1 -2
- package/esm2020/lib/ui-library-angular.module.mjs +108 -19
- package/esm2020/lib/util/six-form-util.directive.mjs +48 -0
- package/esm2020/lib/validators/six-ui-library-validators.mjs +116 -0
- package/esm2020/public-api.mjs +19 -1
- package/fesm2015/six-group-ui-library-angular.mjs +784 -80
- package/fesm2015/six-group-ui-library-angular.mjs.map +1 -1
- package/fesm2020/six-group-ui-library-angular.mjs +781 -80
- package/fesm2020/six-group-ui-library-angular.mjs.map +1 -1
- package/lib/control-value-accessors/checkbox-value-accessor.d.ts +10 -0
- package/lib/control-value-accessors/datepicker-value-accessor.d.ts +9 -0
- package/lib/control-value-accessors/numeric-value-accessor.d.ts +10 -0
- package/lib/control-value-accessors/radio-value-accessor.d.ts +15 -0
- package/lib/control-value-accessors/range-value-accessor.d.ts +10 -0
- package/lib/control-value-accessors/select-value-accessor.d.ts +9 -0
- package/lib/control-value-accessors/switch-value-accessor.d.ts +10 -0
- package/lib/control-value-accessors/text-value-accessor.d.ts +9 -0
- package/lib/control-value-accessors/timepicker-value-accessor.d.ts +9 -0
- package/lib/control-value-accessors/value-accessor.d.ts +39 -0
- package/lib/services/validation-messages.service.d.ts +7 -0
- package/lib/stencil-generated/components.d.ts +8 -35
- package/lib/stencil-generated/index.d.ts +1 -1
- package/lib/ui-library-angular.module.d.ts +15 -1
- package/lib/util/six-form-util.directive.d.ts +10 -0
- package/lib/validators/six-ui-library-validators.d.ts +47 -0
- package/package.json +3 -3
- package/public-api.d.ts +13 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Injectable, inject, Directive, HostListener, Input, 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 { NgControl, NG_VALUE_ACCESSOR, FormGroupDirective, FormControl, FormGroup, FormArray, NG_VALIDATORS, Validators } from '@angular/forms';
|
|
7
|
+
import { getErrorMessage } from '@six-group/ui-library';
|
|
6
8
|
|
|
7
9
|
/* eslint-disable */
|
|
8
10
|
/* tslint:disable */
|
|
@@ -209,11 +211,11 @@ let SixCheckbox = class SixCheckbox {
|
|
|
209
211
|
}
|
|
210
212
|
};
|
|
211
213
|
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 });
|
|
212
|
-
SixCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixCheckbox, selector: "six-checkbox", inputs: { checked: "checked", disabled: "disabled",
|
|
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 });
|
|
213
215
|
SixCheckbox = __decorate([
|
|
214
216
|
ProxyCmp({
|
|
215
|
-
inputs: ['checked', 'disabled', '
|
|
216
|
-
methods: ['setFocus', 'removeFocus', '
|
|
217
|
+
inputs: ['checked', 'disabled', 'errorText', 'indeterminate', 'invalid', 'label', 'name', 'required', 'value'],
|
|
218
|
+
methods: ['setFocus', 'removeFocus', 'reset']
|
|
217
219
|
})
|
|
218
220
|
], SixCheckbox);
|
|
219
221
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixCheckbox, decorators: [{
|
|
@@ -223,7 +225,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
223
225
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
224
226
|
template: '<ng-content></ng-content>',
|
|
225
227
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
226
|
-
inputs: ['checked', 'disabled', '
|
|
228
|
+
inputs: ['checked', 'disabled', 'errorText', 'indeterminate', 'invalid', 'label', 'name', 'required', 'value'],
|
|
227
229
|
}]
|
|
228
230
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
229
231
|
let SixDatepicker = class SixDatepicker {
|
|
@@ -235,11 +237,11 @@ let SixDatepicker = class SixDatepicker {
|
|
|
235
237
|
}
|
|
236
238
|
};
|
|
237
239
|
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 });
|
|
238
|
-
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",
|
|
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 });
|
|
239
241
|
SixDatepicker = __decorate([
|
|
240
242
|
ProxyCmp({
|
|
241
|
-
inputs: ['allowedDates', 'clearable', 'closeOnSelect', 'containingElement', 'dateFormat', 'debounce', 'defaultDate', 'disabled', '
|
|
242
|
-
methods: ['
|
|
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
|
+
methods: ['setFocus', 'select']
|
|
243
245
|
})
|
|
244
246
|
], SixDatepicker);
|
|
245
247
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixDatepicker, decorators: [{
|
|
@@ -249,7 +251,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
249
251
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
250
252
|
template: '<ng-content></ng-content>',
|
|
251
253
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
252
|
-
inputs: ['allowedDates', 'clearable', 'closeOnSelect', 'containingElement', 'dateFormat', 'debounce', 'defaultDate', 'disabled', '
|
|
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'],
|
|
253
255
|
}]
|
|
254
256
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
255
257
|
let SixDetails = class SixDetails {
|
|
@@ -474,32 +476,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
474
476
|
inputs: [],
|
|
475
477
|
}]
|
|
476
478
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
477
|
-
let SixForm = class SixForm {
|
|
478
|
-
constructor(c, r, z) {
|
|
479
|
-
this.z = z;
|
|
480
|
-
c.detach();
|
|
481
|
-
this.el = r.nativeElement;
|
|
482
|
-
proxyOutputs(this, this.el, ['six-form-submit', 'six-form-change', 'six-form-reset']);
|
|
483
|
-
}
|
|
484
|
-
};
|
|
485
|
-
SixForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixForm, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
486
|
-
SixForm.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixForm, selector: "six-form", inputs: { novalidate: "novalidate" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
487
|
-
SixForm = __decorate([
|
|
488
|
-
ProxyCmp({
|
|
489
|
-
inputs: ['novalidate'],
|
|
490
|
-
methods: ['getFormData', 'getFormControls', 'submit', 'checkValidity', 'reset']
|
|
491
|
-
})
|
|
492
|
-
], SixForm);
|
|
493
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixForm, decorators: [{
|
|
494
|
-
type: Component,
|
|
495
|
-
args: [{
|
|
496
|
-
selector: 'six-form',
|
|
497
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
498
|
-
template: '<ng-content></ng-content>',
|
|
499
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
500
|
-
inputs: ['novalidate'],
|
|
501
|
-
}]
|
|
502
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
503
479
|
let SixGroupLabel = class SixGroupLabel {
|
|
504
480
|
constructor(c, r, z) {
|
|
505
481
|
this.z = z;
|
|
@@ -607,11 +583,11 @@ let SixInput = class SixInput {
|
|
|
607
583
|
}
|
|
608
584
|
};
|
|
609
585
|
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 });
|
|
610
|
-
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",
|
|
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 });
|
|
611
587
|
SixInput = __decorate([
|
|
612
588
|
ProxyCmp({
|
|
613
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearable', 'disabled', '
|
|
614
|
-
methods: ['setFocus', 'removeFocus', 'select', 'setSelectionRange', 'setRangeText'
|
|
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'],
|
|
590
|
+
methods: ['setFocus', 'removeFocus', 'select', 'setSelectionRange', 'setRangeText']
|
|
615
591
|
})
|
|
616
592
|
], SixInput);
|
|
617
593
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixInput, decorators: [{
|
|
@@ -621,7 +597,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
621
597
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
622
598
|
template: '<ng-content></ng-content>',
|
|
623
599
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
624
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearable', 'disabled', '
|
|
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'],
|
|
625
601
|
}]
|
|
626
602
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
627
603
|
let SixItemPicker = class SixItemPicker {
|
|
@@ -902,7 +878,7 @@ SixRadio.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
|
902
878
|
SixRadio = __decorate([
|
|
903
879
|
ProxyCmp({
|
|
904
880
|
inputs: ['checked', 'disabled', 'invalid', 'name', 'value'],
|
|
905
|
-
methods: ['setFocus', 'removeFocus', '
|
|
881
|
+
methods: ['setFocus', 'removeFocus', 'reset']
|
|
906
882
|
})
|
|
907
883
|
], SixRadio);
|
|
908
884
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixRadio, decorators: [{
|
|
@@ -924,11 +900,11 @@ let SixRange = class SixRange {
|
|
|
924
900
|
}
|
|
925
901
|
};
|
|
926
902
|
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 });
|
|
927
|
-
SixRange.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixRange, selector: "six-range", inputs: { disabled: "disabled",
|
|
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 });
|
|
928
904
|
SixRange = __decorate([
|
|
929
905
|
ProxyCmp({
|
|
930
|
-
inputs: ['disabled', '
|
|
931
|
-
methods: ['setFocus', 'removeFocus'
|
|
906
|
+
inputs: ['disabled', 'errorText', 'helpText', 'invalid', 'label', 'max', 'min', 'name', 'required', 'step', 'tooltip', 'tooltipFormatter', 'value'],
|
|
907
|
+
methods: ['setFocus', 'removeFocus']
|
|
932
908
|
})
|
|
933
909
|
], SixRange);
|
|
934
910
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixRange, decorators: [{
|
|
@@ -938,7 +914,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
938
914
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
939
915
|
template: '<ng-content></ng-content>',
|
|
940
916
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
941
|
-
inputs: ['disabled', '
|
|
917
|
+
inputs: ['disabled', 'errorText', 'helpText', 'invalid', 'label', 'max', 'min', 'name', 'required', 'step', 'tooltip', 'tooltipFormatter', 'value'],
|
|
942
918
|
}]
|
|
943
919
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
944
920
|
let SixRoot = class SixRoot {
|
|
@@ -1000,11 +976,11 @@ let SixSelect = class SixSelect {
|
|
|
1000
976
|
}
|
|
1001
977
|
};
|
|
1002
978
|
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 });
|
|
1003
|
-
SixSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSelect, selector: "six-select", inputs: { asyncFilter: "asyncFilter", autocomplete: "autocomplete", clearable: "clearable",
|
|
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 });
|
|
1004
980
|
SixSelect = __decorate([
|
|
1005
981
|
ProxyCmp({
|
|
1006
|
-
inputs: ['asyncFilter', 'autocomplete', 'clearable', '
|
|
1007
|
-
methods: ['
|
|
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'],
|
|
983
|
+
methods: ['setFocus']
|
|
1008
984
|
})
|
|
1009
985
|
], SixSelect);
|
|
1010
986
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSelect, decorators: [{
|
|
@@ -1014,7 +990,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1014
990
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1015
991
|
template: '<ng-content></ng-content>',
|
|
1016
992
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1017
|
-
inputs: ['asyncFilter', 'autocomplete', 'clearable', '
|
|
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'],
|
|
1018
994
|
}]
|
|
1019
995
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1020
996
|
let SixSidebar = class SixSidebar {
|
|
@@ -1148,11 +1124,11 @@ let SixSwitch = class SixSwitch {
|
|
|
1148
1124
|
}
|
|
1149
1125
|
};
|
|
1150
1126
|
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 });
|
|
1151
|
-
SixSwitch.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSwitch, selector: "six-switch", inputs: { checked: "checked", disabled: "disabled", invalid: "invalid", name: "name", required: "required", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
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 });
|
|
1152
1128
|
SixSwitch = __decorate([
|
|
1153
1129
|
ProxyCmp({
|
|
1154
|
-
inputs: ['checked', 'disabled', 'invalid', 'name', 'required', 'value'],
|
|
1155
|
-
methods: ['setFocus', 'removeFocus'
|
|
1130
|
+
inputs: ['checked', 'disabled', 'errorText', 'invalid', 'label', 'name', 'required', 'value'],
|
|
1131
|
+
methods: ['setFocus', 'removeFocus']
|
|
1156
1132
|
})
|
|
1157
1133
|
], SixSwitch);
|
|
1158
1134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSwitch, decorators: [{
|
|
@@ -1162,7 +1138,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1162
1138
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1163
1139
|
template: '<ng-content></ng-content>',
|
|
1164
1140
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1165
|
-
inputs: ['checked', 'disabled', 'invalid', 'name', 'required', 'value'],
|
|
1141
|
+
inputs: ['checked', 'disabled', 'errorText', 'invalid', 'label', 'name', 'required', 'value'],
|
|
1166
1142
|
}]
|
|
1167
1143
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1168
1144
|
let SixTab = class SixTab {
|
|
@@ -1275,11 +1251,11 @@ let SixTextarea = class SixTextarea {
|
|
|
1275
1251
|
}
|
|
1276
1252
|
};
|
|
1277
1253
|
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 });
|
|
1278
|
-
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",
|
|
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 });
|
|
1279
1255
|
SixTextarea = __decorate([
|
|
1280
1256
|
ProxyCmp({
|
|
1281
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', '
|
|
1282
|
-
methods: ['setFocus', 'removeFocus', 'select', 'setSelectionRange', 'setRangeText'
|
|
1257
|
+
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', 'errorText', 'helpText', 'inputmode', 'invalid', 'label', 'maxlength', 'minlength', 'name', 'placeholder', 'readonly', 'required', 'resize', 'rows', 'size', 'spellcheck', 'value'],
|
|
1258
|
+
methods: ['setFocus', 'removeFocus', 'select', 'setSelectionRange', 'setRangeText']
|
|
1283
1259
|
})
|
|
1284
1260
|
], SixTextarea);
|
|
1285
1261
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixTextarea, decorators: [{
|
|
@@ -1289,7 +1265,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1289
1265
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1290
1266
|
template: '<ng-content></ng-content>',
|
|
1291
1267
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1292
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', '
|
|
1268
|
+
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', 'errorText', 'helpText', 'inputmode', 'invalid', 'label', 'maxlength', 'minlength', 'name', 'placeholder', 'readonly', 'required', 'resize', 'rows', 'size', 'spellcheck', 'value'],
|
|
1293
1269
|
}]
|
|
1294
1270
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1295
1271
|
let SixTile = class SixTile {
|
|
@@ -1327,11 +1303,11 @@ let SixTimepicker = class SixTimepicker {
|
|
|
1327
1303
|
}
|
|
1328
1304
|
};
|
|
1329
1305
|
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 });
|
|
1330
|
-
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",
|
|
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 });
|
|
1331
1307
|
SixTimepicker = __decorate([
|
|
1332
1308
|
ProxyCmp({
|
|
1333
|
-
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', '
|
|
1334
|
-
methods: ['
|
|
1309
|
+
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', 'errorText', 'format', 'hoist', 'iconPosition', 'inline', 'interval', 'invalid', 'label', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'separator', 'size', 'timeout', 'value'],
|
|
1310
|
+
methods: ['setFocus']
|
|
1335
1311
|
})
|
|
1336
1312
|
], SixTimepicker);
|
|
1337
1313
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixTimepicker, decorators: [{
|
|
@@ -1341,7 +1317,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1341
1317
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1342
1318
|
template: '<ng-content></ng-content>',
|
|
1343
1319
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1344
|
-
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', '
|
|
1320
|
+
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', 'errorText', 'format', 'hoist', 'iconPosition', 'inline', 'interval', 'invalid', 'label', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'separator', 'size', 'timeout', 'value'],
|
|
1345
1321
|
}]
|
|
1346
1322
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1347
1323
|
let SixTooltip = class SixTooltip {
|
|
@@ -1389,7 +1365,6 @@ const DIRECTIVES = [
|
|
|
1389
1365
|
SixFileListItem,
|
|
1390
1366
|
SixFileUpload,
|
|
1391
1367
|
SixFooter,
|
|
1392
|
-
SixForm,
|
|
1393
1368
|
SixGroupLabel,
|
|
1394
1369
|
SixHeader,
|
|
1395
1370
|
SixIcon,
|
|
@@ -1427,33 +1402,762 @@ const DIRECTIVES = [
|
|
|
1427
1402
|
SixTooltip
|
|
1428
1403
|
];
|
|
1429
1404
|
|
|
1430
|
-
class
|
|
1405
|
+
class ValidationMessagesService {
|
|
1406
|
+
getErrorMessage(language, error) {
|
|
1407
|
+
return getErrorMessage(language, error);
|
|
1408
|
+
}
|
|
1431
1409
|
}
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1410
|
+
ValidationMessagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ValidationMessagesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1411
|
+
ValidationMessagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ValidationMessagesService, providedIn: 'root' });
|
|
1412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ValidationMessagesService, decorators: [{
|
|
1413
|
+
type: Injectable,
|
|
1414
|
+
args: [{ providedIn: 'root' }]
|
|
1415
|
+
}] });
|
|
1416
|
+
|
|
1417
|
+
class ValueAccessor {
|
|
1418
|
+
constructor(injector, el) {
|
|
1419
|
+
this.injector = injector;
|
|
1420
|
+
this.el = el;
|
|
1421
|
+
this.validationMessagesService = inject(ValidationMessagesService);
|
|
1422
|
+
this.onChange = () => { };
|
|
1423
|
+
this.onTouched = () => { };
|
|
1424
|
+
}
|
|
1425
|
+
registerOnChange(fn) {
|
|
1426
|
+
this.onChange = fn;
|
|
1427
|
+
}
|
|
1428
|
+
registerOnTouched(fn) {
|
|
1429
|
+
this.onTouched = fn;
|
|
1430
|
+
}
|
|
1431
|
+
writeValue(value) {
|
|
1432
|
+
this.el.nativeElement.value = value;
|
|
1433
|
+
this.updateValidation();
|
|
1434
|
+
}
|
|
1435
|
+
/**
|
|
1436
|
+
* Notifies the ControlValueAccessor of a change in the value of the control.
|
|
1437
|
+
*
|
|
1438
|
+
* This is called by each of the ValueAccessor directives when we want to update
|
|
1439
|
+
* the status and validity of the form control. For example with text components this
|
|
1440
|
+
* is called when the input event is fired. For select components this is called
|
|
1441
|
+
* when the change event is fired.
|
|
1442
|
+
*
|
|
1443
|
+
* This also updates the form status on the element by setting the 'invalid' property to true/false.
|
|
1444
|
+
*
|
|
1445
|
+
* @param el The component element.
|
|
1446
|
+
* @param value The new value of the control.
|
|
1447
|
+
*/
|
|
1448
|
+
handleValueChange(el, value) {
|
|
1449
|
+
if (el === this.el.nativeElement) {
|
|
1450
|
+
this.onChange(value);
|
|
1451
|
+
this.updateValidation();
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
_handleBlurEvent(el) {
|
|
1455
|
+
if (el === this.el.nativeElement) {
|
|
1456
|
+
this.onTouched();
|
|
1457
|
+
this.updateValidation();
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
updateValidation() {
|
|
1461
|
+
nextTick(() => {
|
|
1462
|
+
var _a, _b;
|
|
1463
|
+
if (((_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.control) == null)
|
|
1464
|
+
return;
|
|
1465
|
+
const element = this.el.nativeElement;
|
|
1466
|
+
const control = (_b = this.ngControl) === null || _b === void 0 ? void 0 : _b.control;
|
|
1467
|
+
const invalid = !control.valid && control.dirty && control.touched;
|
|
1468
|
+
let errorText;
|
|
1469
|
+
if (invalid) {
|
|
1470
|
+
errorText = this.initialErrorText || this.getErrorText(control);
|
|
1471
|
+
}
|
|
1472
|
+
element.invalid = invalid;
|
|
1473
|
+
element.errorText = errorText !== null && errorText !== void 0 ? errorText : '';
|
|
1474
|
+
});
|
|
1475
|
+
}
|
|
1476
|
+
setDisabledState(isDisabled) {
|
|
1477
|
+
this.el.nativeElement.disabled = isDisabled;
|
|
1478
|
+
}
|
|
1479
|
+
ngOnDestroy() {
|
|
1480
|
+
if (this.statusChanges) {
|
|
1481
|
+
this.statusChanges.unsubscribe();
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
ngAfterViewInit() {
|
|
1485
|
+
var _a, _b;
|
|
1486
|
+
this.initialErrorText = ((_b = (_a = this.el.nativeElement) === null || _a === void 0 ? void 0 : _a.errorText) === null || _b === void 0 ? void 0 : _b.trim()) || undefined;
|
|
1487
|
+
try {
|
|
1488
|
+
this.ngControl = this.injector.get(NgControl);
|
|
1489
|
+
}
|
|
1490
|
+
catch (_c) {
|
|
1491
|
+
/* No FormControl or ngModel binding */
|
|
1492
|
+
}
|
|
1493
|
+
if (!this.ngControl) {
|
|
1494
|
+
return;
|
|
1495
|
+
}
|
|
1496
|
+
// Listen for changes in validity, disabled, or pending states
|
|
1497
|
+
if (this.ngControl.statusChanges) {
|
|
1498
|
+
this.statusChanges = this.ngControl.statusChanges.subscribe(() => this.updateValidation());
|
|
1499
|
+
}
|
|
1500
|
+
/**
|
|
1501
|
+
* TODO FW-2787: Remove this in favor of https://github.com/angular/angular/issues/10887
|
|
1502
|
+
* whenever it is implemented.
|
|
1503
|
+
*/
|
|
1504
|
+
const formControl = this.ngControl.control;
|
|
1505
|
+
if (formControl) {
|
|
1506
|
+
const methodsToPatch = ['markAsTouched', 'markAllAsTouched', 'markAsUntouched', 'markAsDirty', 'markAsPristine'];
|
|
1507
|
+
methodsToPatch.forEach((method) => {
|
|
1508
|
+
if (typeof formControl[method] !== 'undefined') {
|
|
1509
|
+
const oldFn = formControl[method].bind(formControl);
|
|
1510
|
+
formControl[method] = (...params) => {
|
|
1511
|
+
oldFn(...params);
|
|
1512
|
+
this.updateValidation();
|
|
1513
|
+
};
|
|
1514
|
+
}
|
|
1515
|
+
});
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
getErrorText(control) {
|
|
1519
|
+
var _a;
|
|
1520
|
+
if (control.errors == null) {
|
|
1521
|
+
console.warn('no errors for invalid control', control);
|
|
1522
|
+
return '';
|
|
1523
|
+
}
|
|
1524
|
+
const firstError = Object.entries(control.errors).at(0);
|
|
1525
|
+
if (firstError == null) {
|
|
1526
|
+
console.warn('no errors for invalid control', control);
|
|
1527
|
+
return '';
|
|
1528
|
+
}
|
|
1529
|
+
const [key, value] = firstError;
|
|
1530
|
+
return ((_a = this.validationMessagesService.getErrorMessage(getLanguage(), Object.assign({ key: key }, value))) !== null && _a !== void 0 ? _a : key);
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
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 });
|
|
1534
|
+
ValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: ValueAccessor, host: { listeners: { "blur": "_handleBlurEvent($event.target)" } }, ngImport: i0 });
|
|
1535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ValueAccessor, decorators: [{
|
|
1536
|
+
type: Directive
|
|
1537
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { _handleBlurEvent: [{
|
|
1538
|
+
type: HostListener,
|
|
1539
|
+
args: ['blur', ['$event.target']]
|
|
1540
|
+
}] } });
|
|
1541
|
+
function getLanguage() {
|
|
1542
|
+
const languages = ['de', 'fr', 'it', 'en'];
|
|
1543
|
+
const documentLang = document.documentElement.lang;
|
|
1544
|
+
if (languages.includes(documentLang)) {
|
|
1545
|
+
return documentLang;
|
|
1546
|
+
}
|
|
1547
|
+
return 'de';
|
|
1548
|
+
}
|
|
1549
|
+
const nextTick = (h) => {
|
|
1550
|
+
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
1551
|
+
return __zone_symbol__requestAnimationFrame(h);
|
|
1552
|
+
}
|
|
1553
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
1554
|
+
return requestAnimationFrame(h);
|
|
1555
|
+
}
|
|
1556
|
+
return setTimeout(h);
|
|
1557
|
+
};
|
|
1558
|
+
|
|
1559
|
+
class TextValueAccessor extends ValueAccessor {
|
|
1560
|
+
constructor(injector, el) {
|
|
1561
|
+
super(injector, el);
|
|
1562
|
+
}
|
|
1563
|
+
handleInputEvent(el) {
|
|
1564
|
+
this.handleValueChange(el, el.value);
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
TextValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TextValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1568
|
+
TextValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: TextValueAccessor, selector: "six-input:not([type=number]),six-textarea", host: { listeners: { "input": "handleInputEvent($event.target)" } }, providers: [
|
|
1435
1569
|
{
|
|
1436
|
-
provide:
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
},
|
|
1570
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1571
|
+
useExisting: TextValueAccessor,
|
|
1572
|
+
multi: true,
|
|
1440
1573
|
},
|
|
1441
|
-
] });
|
|
1442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
|
1443
|
-
type:
|
|
1574
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TextValueAccessor, decorators: [{
|
|
1576
|
+
type: Directive,
|
|
1444
1577
|
args: [{
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1578
|
+
selector: 'six-input:not([type=number]),six-textarea',
|
|
1579
|
+
providers: [
|
|
1580
|
+
{
|
|
1581
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1582
|
+
useExisting: TextValueAccessor,
|
|
1583
|
+
multi: true,
|
|
1584
|
+
},
|
|
1585
|
+
],
|
|
1586
|
+
}]
|
|
1587
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleInputEvent: [{
|
|
1588
|
+
type: HostListener,
|
|
1589
|
+
args: ['input', ['$event.target']]
|
|
1590
|
+
}] } });
|
|
1591
|
+
|
|
1592
|
+
class NumericValueAccessor extends ValueAccessor {
|
|
1593
|
+
constructor(injector, el) {
|
|
1594
|
+
super(injector, el);
|
|
1595
|
+
}
|
|
1596
|
+
handleInputEvent(el) {
|
|
1597
|
+
this.handleValueChange(el, el.value);
|
|
1598
|
+
}
|
|
1599
|
+
registerOnChange(fn) {
|
|
1600
|
+
super.registerOnChange((value) => {
|
|
1601
|
+
fn(value === '' ? null : parseFloat(value));
|
|
1602
|
+
});
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
NumericValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NumericValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1606
|
+
NumericValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NumericValueAccessor, selector: "six-input[type=number]", host: { listeners: { "input": "handleInputEvent($event.target)" } }, providers: [
|
|
1607
|
+
{
|
|
1608
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1609
|
+
useExisting: NumericValueAccessor,
|
|
1610
|
+
multi: true,
|
|
1611
|
+
},
|
|
1612
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NumericValueAccessor, decorators: [{
|
|
1614
|
+
type: Directive,
|
|
1615
|
+
args: [{
|
|
1616
|
+
selector: 'six-input[type=number]',
|
|
1617
|
+
providers: [
|
|
1618
|
+
{
|
|
1619
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1620
|
+
useExisting: NumericValueAccessor,
|
|
1621
|
+
multi: true,
|
|
1622
|
+
},
|
|
1623
|
+
],
|
|
1624
|
+
}]
|
|
1625
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleInputEvent: [{
|
|
1626
|
+
type: HostListener,
|
|
1627
|
+
args: ['input', ['$event.target']]
|
|
1628
|
+
}] } });
|
|
1629
|
+
|
|
1630
|
+
class RadioValueAccessor extends ValueAccessor {
|
|
1631
|
+
constructor(injector, el) {
|
|
1632
|
+
super(injector, el);
|
|
1633
|
+
}
|
|
1634
|
+
handleChangeEvent(el) {
|
|
1635
|
+
this.handleValueChange(el, this.value);
|
|
1636
|
+
}
|
|
1637
|
+
ngOnInit() {
|
|
1638
|
+
this.checkName();
|
|
1639
|
+
}
|
|
1640
|
+
writeValue(value) {
|
|
1641
|
+
this.el.nativeElement.checked = value === this.value;
|
|
1642
|
+
this.updateValidation();
|
|
1643
|
+
}
|
|
1644
|
+
checkName() {
|
|
1645
|
+
if (this.name && this.formControlName && this.name !== this.formControlName) {
|
|
1646
|
+
throw new Error(`
|
|
1647
|
+
If you define both a name and a formControlName attribute on your radio button, their values
|
|
1648
|
+
must match. Ex: <six-input type="radio" formControlName="food" name="food">
|
|
1649
|
+
`);
|
|
1650
|
+
}
|
|
1651
|
+
if (!this.name && this.formControlName) {
|
|
1652
|
+
this.name = this.formControlName;
|
|
1653
|
+
this.el.nativeElement.name = this.formControlName;
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
RadioValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RadioValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1658
|
+
RadioValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: RadioValueAccessor, selector: "six-radio", inputs: { value: "value", formControlName: "formControlName", name: "name" }, host: { listeners: { "change": "handleChangeEvent($event.target)" } }, providers: [
|
|
1659
|
+
{
|
|
1660
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1661
|
+
useExisting: RadioValueAccessor,
|
|
1662
|
+
multi: true,
|
|
1663
|
+
},
|
|
1664
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RadioValueAccessor, decorators: [{
|
|
1666
|
+
type: Directive,
|
|
1667
|
+
args: [{
|
|
1668
|
+
selector: 'six-radio',
|
|
1669
|
+
providers: [
|
|
1670
|
+
{
|
|
1671
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1672
|
+
useExisting: RadioValueAccessor,
|
|
1673
|
+
multi: true,
|
|
1674
|
+
},
|
|
1675
|
+
],
|
|
1676
|
+
}]
|
|
1677
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { value: [{
|
|
1678
|
+
type: Input
|
|
1679
|
+
}], formControlName: [{
|
|
1680
|
+
type: Input
|
|
1681
|
+
}], name: [{
|
|
1682
|
+
type: Input
|
|
1683
|
+
}], handleChangeEvent: [{
|
|
1684
|
+
type: HostListener,
|
|
1685
|
+
args: ['change', ['$event.target']]
|
|
1686
|
+
}] } });
|
|
1687
|
+
|
|
1688
|
+
class DatepickerValueAccessor extends ValueAccessor {
|
|
1689
|
+
constructor(injector, el) {
|
|
1690
|
+
super(injector, el);
|
|
1691
|
+
}
|
|
1692
|
+
handleChangeEvent(el) {
|
|
1693
|
+
this.handleValueChange(el, el.value);
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
DatepickerValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatepickerValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1697
|
+
DatepickerValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DatepickerValueAccessor, selector: "six-datepicker", host: { listeners: { "change": "handleChangeEvent($event.target)" } }, providers: [
|
|
1698
|
+
{
|
|
1699
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1700
|
+
useExisting: DatepickerValueAccessor,
|
|
1701
|
+
multi: true,
|
|
1702
|
+
},
|
|
1703
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatepickerValueAccessor, decorators: [{
|
|
1705
|
+
type: Directive,
|
|
1706
|
+
args: [{
|
|
1707
|
+
selector: 'six-datepicker',
|
|
1448
1708
|
providers: [
|
|
1449
1709
|
{
|
|
1450
|
-
provide:
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
},
|
|
1710
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1711
|
+
useExisting: DatepickerValueAccessor,
|
|
1712
|
+
multi: true,
|
|
1454
1713
|
},
|
|
1455
1714
|
],
|
|
1456
1715
|
}]
|
|
1716
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleChangeEvent: [{
|
|
1717
|
+
type: HostListener,
|
|
1718
|
+
args: ['change', ['$event.target']]
|
|
1719
|
+
}] } });
|
|
1720
|
+
|
|
1721
|
+
class SixFormUtilDirective {
|
|
1722
|
+
constructor(elementRef, injector) {
|
|
1723
|
+
this.elementRef = elementRef;
|
|
1724
|
+
this.injector = injector;
|
|
1725
|
+
}
|
|
1726
|
+
focusInvalidField() {
|
|
1727
|
+
const formGroupDirective = this.injector.get(FormGroupDirective);
|
|
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
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
SixFormUtilDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormUtilDirective, deps: [{ token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1742
|
+
SixFormUtilDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SixFormUtilDirective, selector: "[sixFormUtil]", ngImport: i0 });
|
|
1743
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormUtilDirective, decorators: [{
|
|
1744
|
+
type: Directive,
|
|
1745
|
+
args: [{
|
|
1746
|
+
selector: '[sixFormUtil]',
|
|
1747
|
+
}]
|
|
1748
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }]; } });
|
|
1749
|
+
function markAllAsDirty(formGroup) {
|
|
1750
|
+
function markAllControlsAsDirty(controls) {
|
|
1751
|
+
controls.forEach((control) => {
|
|
1752
|
+
if (control instanceof FormControl) {
|
|
1753
|
+
control.markAsDirty({ onlySelf: true });
|
|
1754
|
+
}
|
|
1755
|
+
else if (control instanceof FormGroup) {
|
|
1756
|
+
markAllControlsAsDirty(Object.values(control.controls));
|
|
1757
|
+
}
|
|
1758
|
+
else if (control instanceof FormArray) {
|
|
1759
|
+
markAllControlsAsDirty(control.controls);
|
|
1760
|
+
}
|
|
1761
|
+
});
|
|
1762
|
+
}
|
|
1763
|
+
markAllControlsAsDirty(Object.values(formGroup.controls));
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
class SixUiLibraryValidators {
|
|
1767
|
+
static minDate(mindate) {
|
|
1768
|
+
return (control) => {
|
|
1769
|
+
if (control.value == null)
|
|
1770
|
+
return null;
|
|
1771
|
+
const actualDate = control.value;
|
|
1772
|
+
return actualDate.getTime() >= mindate.getTime() ? null : { mindate: { mindate, actual: actualDate } };
|
|
1773
|
+
};
|
|
1774
|
+
}
|
|
1775
|
+
static maxDate(maxdate) {
|
|
1776
|
+
return (control) => {
|
|
1777
|
+
if (control.value == null)
|
|
1778
|
+
return null;
|
|
1779
|
+
const actualDate = control.value;
|
|
1780
|
+
return actualDate.getTime() <= maxdate.getTime() ? null : { maxdate: { maxdate, actual: actualDate } };
|
|
1781
|
+
};
|
|
1782
|
+
}
|
|
1783
|
+
static allowedDates(allowedDates = () => true) {
|
|
1784
|
+
return (control) => {
|
|
1785
|
+
if (control.value == null)
|
|
1786
|
+
return null;
|
|
1787
|
+
const allowed = allowedDates(control.value);
|
|
1788
|
+
return allowed ? null : { invaliddate: { actual: control.value } };
|
|
1789
|
+
};
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
class MinDateValidator {
|
|
1793
|
+
validate(control) {
|
|
1794
|
+
return SixUiLibraryValidators.minDate(this.mindate);
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
MinDateValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MinDateValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1798
|
+
MinDateValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: MinDateValidator, selector: "six-datepicker[min]", inputs: { mindate: "mindate" }, providers: [{ provide: NG_VALIDATORS, useExisting: MinDateValidator, multi: true }], ngImport: i0 });
|
|
1799
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MinDateValidator, decorators: [{
|
|
1800
|
+
type: Directive,
|
|
1801
|
+
args: [{
|
|
1802
|
+
selector: 'six-datepicker[min]',
|
|
1803
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: MinDateValidator, multi: true }],
|
|
1804
|
+
}]
|
|
1805
|
+
}], propDecorators: { mindate: [{
|
|
1806
|
+
type: Input
|
|
1807
|
+
}] } });
|
|
1808
|
+
class MaxDateValidator {
|
|
1809
|
+
validate(control) {
|
|
1810
|
+
return SixUiLibraryValidators.maxDate(this.maxdate);
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
MaxDateValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MaxDateValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1814
|
+
MaxDateValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: MaxDateValidator, selector: "six-datepicker[max]", inputs: { maxdate: "maxdate" }, providers: [{ provide: NG_VALIDATORS, useExisting: MaxDateValidator, multi: true }], ngImport: i0 });
|
|
1815
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MaxDateValidator, decorators: [{
|
|
1816
|
+
type: Directive,
|
|
1817
|
+
args: [{
|
|
1818
|
+
selector: 'six-datepicker[max]',
|
|
1819
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: MaxDateValidator, multi: true }],
|
|
1820
|
+
}]
|
|
1821
|
+
}], propDecorators: { maxdate: [{
|
|
1822
|
+
type: Input
|
|
1823
|
+
}] } });
|
|
1824
|
+
class AllowedDatesValidator {
|
|
1825
|
+
constructor() {
|
|
1826
|
+
this.allowedDates = () => true;
|
|
1827
|
+
}
|
|
1828
|
+
validate(control) {
|
|
1829
|
+
return SixUiLibraryValidators.allowedDates(this.allowedDates)(control);
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
AllowedDatesValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AllowedDatesValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1833
|
+
AllowedDatesValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: AllowedDatesValidator, selector: "six-datepicker[allowedDates]", inputs: { allowedDates: "allowedDates" }, providers: [{ provide: NG_VALIDATORS, useExisting: AllowedDatesValidator, multi: true }], ngImport: i0 });
|
|
1834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AllowedDatesValidator, decorators: [{
|
|
1835
|
+
type: Directive,
|
|
1836
|
+
args: [{
|
|
1837
|
+
selector: 'six-datepicker[allowedDates]',
|
|
1838
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: AllowedDatesValidator, multi: true }],
|
|
1839
|
+
}]
|
|
1840
|
+
}], propDecorators: { allowedDates: [{
|
|
1841
|
+
type: Input
|
|
1842
|
+
}] } });
|
|
1843
|
+
class MinValidator {
|
|
1844
|
+
validate(control) {
|
|
1845
|
+
return Validators.min(toFloat(this.min))(control);
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
MinValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MinValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1849
|
+
MinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: MinValidator, selector: "six-input[type=number][min]", inputs: { min: "min" }, providers: [{ provide: NG_VALIDATORS, useExisting: MinValidator, multi: true }], ngImport: i0 });
|
|
1850
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MinValidator, decorators: [{
|
|
1851
|
+
type: Directive,
|
|
1852
|
+
args: [{
|
|
1853
|
+
selector: 'six-input[type=number][min]',
|
|
1854
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: MinValidator, multi: true }],
|
|
1855
|
+
}]
|
|
1856
|
+
}], propDecorators: { min: [{
|
|
1857
|
+
type: Input
|
|
1858
|
+
}] } });
|
|
1859
|
+
class MaxValidator {
|
|
1860
|
+
validate(control) {
|
|
1861
|
+
return Validators.max(toFloat(this.max))(control);
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
MaxValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MaxValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1865
|
+
MaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: MaxValidator, selector: "six-input[type=number][max]", inputs: { max: "max" }, providers: [{ provide: NG_VALIDATORS, useExisting: MaxValidator, multi: true }], ngImport: i0 });
|
|
1866
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MaxValidator, decorators: [{
|
|
1867
|
+
type: Directive,
|
|
1868
|
+
args: [{
|
|
1869
|
+
selector: 'six-input[type=number][max]',
|
|
1870
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: MaxValidator, multi: true }],
|
|
1871
|
+
}]
|
|
1872
|
+
}], propDecorators: { max: [{
|
|
1873
|
+
type: Input
|
|
1874
|
+
}] } });
|
|
1875
|
+
function toFloat(value) {
|
|
1876
|
+
return typeof value === 'number' ? value : parseFloat(value);
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
class SelectValueAccessor extends ValueAccessor {
|
|
1880
|
+
constructor(injector, el) {
|
|
1881
|
+
super(injector, el);
|
|
1882
|
+
}
|
|
1883
|
+
handleChangeEvent(el) {
|
|
1884
|
+
this.handleValueChange(el, el.value);
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
SelectValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1888
|
+
SelectValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SelectValueAccessor, selector: "six-select", host: { listeners: { "change": "handleChangeEvent($event.target)" } }, providers: [
|
|
1889
|
+
{
|
|
1890
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1891
|
+
useExisting: SelectValueAccessor,
|
|
1892
|
+
multi: true,
|
|
1893
|
+
},
|
|
1894
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectValueAccessor, decorators: [{
|
|
1896
|
+
type: Directive,
|
|
1897
|
+
args: [{
|
|
1898
|
+
selector: 'six-select',
|
|
1899
|
+
providers: [
|
|
1900
|
+
{
|
|
1901
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1902
|
+
useExisting: SelectValueAccessor,
|
|
1903
|
+
multi: true,
|
|
1904
|
+
},
|
|
1905
|
+
],
|
|
1906
|
+
}]
|
|
1907
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleChangeEvent: [{
|
|
1908
|
+
type: HostListener,
|
|
1909
|
+
args: ['change', ['$event.target']]
|
|
1910
|
+
}] } });
|
|
1911
|
+
|
|
1912
|
+
class CheckboxValueAccessor extends ValueAccessor {
|
|
1913
|
+
constructor(injector, el) {
|
|
1914
|
+
super(injector, el);
|
|
1915
|
+
}
|
|
1916
|
+
handleChangeEvent(el) {
|
|
1917
|
+
this.handleValueChange(el, el.checked);
|
|
1918
|
+
}
|
|
1919
|
+
writeValue(value) {
|
|
1920
|
+
this.el.nativeElement.checked = value === true;
|
|
1921
|
+
this.updateValidation();
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
CheckboxValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CheckboxValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1925
|
+
CheckboxValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: CheckboxValueAccessor, selector: "six-checkbox", host: { listeners: { "change": "handleChangeEvent($event.target)" } }, providers: [
|
|
1926
|
+
{
|
|
1927
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1928
|
+
useExisting: CheckboxValueAccessor,
|
|
1929
|
+
multi: true,
|
|
1930
|
+
},
|
|
1931
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1932
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CheckboxValueAccessor, decorators: [{
|
|
1933
|
+
type: Directive,
|
|
1934
|
+
args: [{
|
|
1935
|
+
selector: 'six-checkbox',
|
|
1936
|
+
providers: [
|
|
1937
|
+
{
|
|
1938
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1939
|
+
useExisting: CheckboxValueAccessor,
|
|
1940
|
+
multi: true,
|
|
1941
|
+
},
|
|
1942
|
+
],
|
|
1943
|
+
}]
|
|
1944
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleChangeEvent: [{
|
|
1945
|
+
type: HostListener,
|
|
1946
|
+
args: ['change', ['$event.target']]
|
|
1947
|
+
}] } });
|
|
1948
|
+
|
|
1949
|
+
class RangeValueAccessor extends ValueAccessor {
|
|
1950
|
+
constructor(injector, el) {
|
|
1951
|
+
super(injector, el);
|
|
1952
|
+
}
|
|
1953
|
+
handleInputEvent(el) {
|
|
1954
|
+
this.handleValueChange(el, el.value);
|
|
1955
|
+
}
|
|
1956
|
+
registerOnChange(fn) {
|
|
1957
|
+
super.registerOnChange((value) => {
|
|
1958
|
+
fn(value === '' ? null : parseFloat(value));
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
RangeValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RangeValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1963
|
+
RangeValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: RangeValueAccessor, selector: "six-range", host: { listeners: { "input": "handleInputEvent($event.target)" } }, providers: [
|
|
1964
|
+
{
|
|
1965
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1966
|
+
useExisting: RangeValueAccessor,
|
|
1967
|
+
multi: true,
|
|
1968
|
+
},
|
|
1969
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RangeValueAccessor, decorators: [{
|
|
1971
|
+
type: Directive,
|
|
1972
|
+
args: [{
|
|
1973
|
+
selector: 'six-range',
|
|
1974
|
+
providers: [
|
|
1975
|
+
{
|
|
1976
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1977
|
+
useExisting: RangeValueAccessor,
|
|
1978
|
+
multi: true,
|
|
1979
|
+
},
|
|
1980
|
+
],
|
|
1981
|
+
}]
|
|
1982
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleInputEvent: [{
|
|
1983
|
+
type: HostListener,
|
|
1984
|
+
args: ['input', ['$event.target']]
|
|
1985
|
+
}] } });
|
|
1986
|
+
|
|
1987
|
+
class SwitchValueAccessor extends ValueAccessor {
|
|
1988
|
+
constructor(injector, el) {
|
|
1989
|
+
super(injector, el);
|
|
1990
|
+
}
|
|
1991
|
+
handleChangeEvent(el) {
|
|
1992
|
+
this.handleValueChange(el, el.checked);
|
|
1993
|
+
}
|
|
1994
|
+
writeValue(value) {
|
|
1995
|
+
this.el.nativeElement.checked = value === true;
|
|
1996
|
+
this.updateValidation();
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
SwitchValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SwitchValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2000
|
+
SwitchValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SwitchValueAccessor, selector: "six-switch", host: { listeners: { "change": "handleChangeEvent($event.target)" } }, providers: [
|
|
2001
|
+
{
|
|
2002
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2003
|
+
useExisting: SwitchValueAccessor,
|
|
2004
|
+
multi: true,
|
|
2005
|
+
},
|
|
2006
|
+
], usesInheritance: true, ngImport: i0 });
|
|
2007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SwitchValueAccessor, decorators: [{
|
|
2008
|
+
type: Directive,
|
|
2009
|
+
args: [{
|
|
2010
|
+
selector: 'six-switch',
|
|
2011
|
+
providers: [
|
|
2012
|
+
{
|
|
2013
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2014
|
+
useExisting: SwitchValueAccessor,
|
|
2015
|
+
multi: true,
|
|
2016
|
+
},
|
|
2017
|
+
],
|
|
2018
|
+
}]
|
|
2019
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleChangeEvent: [{
|
|
2020
|
+
type: HostListener,
|
|
2021
|
+
args: ['change', ['$event.target']]
|
|
2022
|
+
}] } });
|
|
2023
|
+
|
|
2024
|
+
class TimepickerValueAccessor extends ValueAccessor {
|
|
2025
|
+
constructor(injector, el) {
|
|
2026
|
+
super(injector, el);
|
|
2027
|
+
}
|
|
2028
|
+
handleChangeEvent(el) {
|
|
2029
|
+
this.handleValueChange(el, el.value);
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
TimepickerValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TimepickerValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2033
|
+
TimepickerValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: TimepickerValueAccessor, selector: "six-timepicker", host: { listeners: { "change": "handleChangeEvent($event.target)" } }, providers: [
|
|
2034
|
+
{
|
|
2035
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2036
|
+
useExisting: TimepickerValueAccessor,
|
|
2037
|
+
multi: true,
|
|
2038
|
+
},
|
|
2039
|
+
], usesInheritance: true, ngImport: i0 });
|
|
2040
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TimepickerValueAccessor, decorators: [{
|
|
2041
|
+
type: Directive,
|
|
2042
|
+
args: [{
|
|
2043
|
+
selector: 'six-timepicker',
|
|
2044
|
+
providers: [
|
|
2045
|
+
{
|
|
2046
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2047
|
+
useExisting: TimepickerValueAccessor,
|
|
2048
|
+
multi: true,
|
|
2049
|
+
},
|
|
2050
|
+
],
|
|
2051
|
+
}]
|
|
2052
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleChangeEvent: [{
|
|
2053
|
+
type: HostListener,
|
|
2054
|
+
args: ['change', ['$event.target']]
|
|
2055
|
+
}] } });
|
|
2056
|
+
|
|
2057
|
+
class UiLibraryAngularModule {
|
|
2058
|
+
static forRoot(customValidationMessagesService) {
|
|
2059
|
+
return {
|
|
2060
|
+
ngModule: UiLibraryAngularModule,
|
|
2061
|
+
providers: [
|
|
2062
|
+
{
|
|
2063
|
+
provide: APP_INITIALIZER,
|
|
2064
|
+
useFactory: () => {
|
|
2065
|
+
return defineCustomElements();
|
|
2066
|
+
},
|
|
2067
|
+
},
|
|
2068
|
+
{ provide: ValidationMessagesService, useClass: customValidationMessagesService !== null && customValidationMessagesService !== void 0 ? customValidationMessagesService : ValidationMessagesService },
|
|
2069
|
+
],
|
|
2070
|
+
};
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
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,
|
|
2075
|
+
// value accessors
|
|
2076
|
+
TextValueAccessor,
|
|
2077
|
+
NumericValueAccessor,
|
|
2078
|
+
RadioValueAccessor,
|
|
2079
|
+
DatepickerValueAccessor,
|
|
2080
|
+
TimepickerValueAccessor,
|
|
2081
|
+
SelectValueAccessor,
|
|
2082
|
+
CheckboxValueAccessor,
|
|
2083
|
+
SwitchValueAccessor,
|
|
2084
|
+
RangeValueAccessor,
|
|
2085
|
+
// validators
|
|
2086
|
+
MinValidator,
|
|
2087
|
+
MaxValidator,
|
|
2088
|
+
MinDateValidator,
|
|
2089
|
+
MaxDateValidator,
|
|
2090
|
+
AllowedDatesValidator,
|
|
2091
|
+
// form helpers
|
|
2092
|
+
SixFormUtilDirective], exports: [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,
|
|
2093
|
+
// value accessors
|
|
2094
|
+
TextValueAccessor,
|
|
2095
|
+
NumericValueAccessor,
|
|
2096
|
+
RadioValueAccessor,
|
|
2097
|
+
DatepickerValueAccessor,
|
|
2098
|
+
TimepickerValueAccessor,
|
|
2099
|
+
SelectValueAccessor,
|
|
2100
|
+
CheckboxValueAccessor,
|
|
2101
|
+
SwitchValueAccessor,
|
|
2102
|
+
RangeValueAccessor,
|
|
2103
|
+
// validators
|
|
2104
|
+
MinValidator,
|
|
2105
|
+
MaxValidator,
|
|
2106
|
+
MinDateValidator,
|
|
2107
|
+
MaxDateValidator,
|
|
2108
|
+
AllowedDatesValidator,
|
|
2109
|
+
// form helpers
|
|
2110
|
+
SixFormUtilDirective] });
|
|
2111
|
+
UiLibraryAngularModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule });
|
|
2112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule, decorators: [{
|
|
2113
|
+
type: NgModule,
|
|
2114
|
+
args: [{
|
|
2115
|
+
declarations: [
|
|
2116
|
+
// proxies
|
|
2117
|
+
...DIRECTIVES,
|
|
2118
|
+
// value accessors
|
|
2119
|
+
TextValueAccessor,
|
|
2120
|
+
NumericValueAccessor,
|
|
2121
|
+
RadioValueAccessor,
|
|
2122
|
+
DatepickerValueAccessor,
|
|
2123
|
+
TimepickerValueAccessor,
|
|
2124
|
+
SelectValueAccessor,
|
|
2125
|
+
CheckboxValueAccessor,
|
|
2126
|
+
SwitchValueAccessor,
|
|
2127
|
+
RangeValueAccessor,
|
|
2128
|
+
// validators
|
|
2129
|
+
MinValidator,
|
|
2130
|
+
MaxValidator,
|
|
2131
|
+
MinDateValidator,
|
|
2132
|
+
MaxDateValidator,
|
|
2133
|
+
AllowedDatesValidator,
|
|
2134
|
+
// form helpers
|
|
2135
|
+
SixFormUtilDirective,
|
|
2136
|
+
],
|
|
2137
|
+
imports: [],
|
|
2138
|
+
exports: [
|
|
2139
|
+
// proxies
|
|
2140
|
+
...DIRECTIVES,
|
|
2141
|
+
// value accessors
|
|
2142
|
+
TextValueAccessor,
|
|
2143
|
+
NumericValueAccessor,
|
|
2144
|
+
RadioValueAccessor,
|
|
2145
|
+
DatepickerValueAccessor,
|
|
2146
|
+
TimepickerValueAccessor,
|
|
2147
|
+
SelectValueAccessor,
|
|
2148
|
+
CheckboxValueAccessor,
|
|
2149
|
+
SwitchValueAccessor,
|
|
2150
|
+
RangeValueAccessor,
|
|
2151
|
+
// validators
|
|
2152
|
+
MinValidator,
|
|
2153
|
+
MaxValidator,
|
|
2154
|
+
MinDateValidator,
|
|
2155
|
+
MaxDateValidator,
|
|
2156
|
+
AllowedDatesValidator,
|
|
2157
|
+
// form helpers
|
|
2158
|
+
SixFormUtilDirective,
|
|
2159
|
+
],
|
|
2160
|
+
}]
|
|
1457
2161
|
}] });
|
|
1458
2162
|
|
|
1459
2163
|
/*
|
|
@@ -1464,5 +2168,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1464
2168
|
* Generated bundle index. Do not edit.
|
|
1465
2169
|
*/
|
|
1466
2170
|
|
|
1467
|
-
export { DIRECTIVES, SetAttributes, SixAlert, SixAvatar, SixBadge, SixButton, SixCard, SixCheckbox, SixDatepicker, SixDetails, SixDialog, SixDrawer, SixDropdown, SixErrorPage, SixFileList, SixFileListItem, SixFileUpload, SixFooter,
|
|
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 };
|
|
1468
2172
|
//# sourceMappingURL=six-group-ui-library-angular.mjs.map
|