@six-group/ui-library-angular 0.0.0-insider.3f37dd4 → 0.0.0-insider.424223
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/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 +145 -0
- package/esm2020/lib/form/six-form.directive.mjs +134 -0
- package/esm2020/lib/link/six-router-link.directive.mjs +47 -0
- package/esm2020/lib/services/validation-messages.service.mjs +15 -0
- package/esm2020/lib/stencil-generated/angular-component-lib/utils.mjs +9 -1
- package/esm2020/lib/stencil-generated/components.mjs +65 -69
- package/esm2020/lib/stencil-generated/index.mjs +2 -2
- package/esm2020/lib/ui-library-angular.module.mjs +120 -19
- package/esm2020/lib/validators/six-ui-library-validators.mjs +122 -0
- package/esm2020/public-api.mjs +21 -1
- package/fesm2015/six-group-ui-library-angular.mjs +976 -89
- package/fesm2015/six-group-ui-library-angular.mjs.map +1 -1
- package/fesm2020/six-group-ui-library-angular.mjs +969 -88
- 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/form/six-form.directive.d.ts +71 -0
- package/lib/link/six-router-link.directive.d.ts +24 -0
- package/lib/services/validation-messages.service.d.ts +7 -0
- package/lib/stencil-generated/components.d.ts +19 -53
- package/lib/stencil-generated/index.d.ts +1 -1
- package/lib/ui-library-angular.module.d.ts +16 -1
- package/lib/validators/six-ui-library-validators.d.ts +47 -0
- package/package.json +8 -3
- package/public-api.d.ts +14 -0
|
@@ -1,8 +1,13 @@
|
|
|
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, EventEmitter, Output, Optional, 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 * as i1 from '@angular/forms';
|
|
7
|
+
import { NgControl, NG_VALUE_ACCESSOR, FormControl, FormGroup, FormArray, NG_VALIDATORS, Validators } from '@angular/forms';
|
|
8
|
+
import { getErrorMessage, languages } from '@six-group/ui-library';
|
|
9
|
+
import * as i1$1 from '@angular/common';
|
|
10
|
+
import * as i2 from '@angular/router';
|
|
6
11
|
|
|
7
12
|
/* eslint-disable */
|
|
8
13
|
/* tslint:disable */
|
|
@@ -16,6 +21,14 @@ const proxyInputs = (Cmp, inputs) => {
|
|
|
16
21
|
set(val) {
|
|
17
22
|
this.z.runOutsideAngular(() => (this.el[item] = val));
|
|
18
23
|
},
|
|
24
|
+
/**
|
|
25
|
+
* In the event that proxyInputs is called
|
|
26
|
+
* multiple times re-defining these inputs
|
|
27
|
+
* will cause an error to be thrown. As a result
|
|
28
|
+
* we set configurable: true to indicate these
|
|
29
|
+
* properties can be changed.
|
|
30
|
+
*/
|
|
31
|
+
configurable: true,
|
|
19
32
|
});
|
|
20
33
|
});
|
|
21
34
|
};
|
|
@@ -209,11 +222,11 @@ let SixCheckbox = class SixCheckbox {
|
|
|
209
222
|
}
|
|
210
223
|
};
|
|
211
224
|
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",
|
|
225
|
+
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 });
|
|
213
226
|
SixCheckbox = __decorate([
|
|
214
227
|
ProxyCmp({
|
|
215
|
-
inputs: ['checked', 'disabled', '
|
|
216
|
-
methods: ['setFocus', 'removeFocus'
|
|
228
|
+
inputs: ['checked', 'disabled', 'errorText', 'errorTextCount', 'indeterminate', 'invalid', 'label', 'name', 'required', 'value'],
|
|
229
|
+
methods: ['setFocus', 'removeFocus']
|
|
217
230
|
})
|
|
218
231
|
], SixCheckbox);
|
|
219
232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixCheckbox, decorators: [{
|
|
@@ -223,7 +236,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
223
236
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
224
237
|
template: '<ng-content></ng-content>',
|
|
225
238
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
226
|
-
inputs: ['checked', 'disabled', '
|
|
239
|
+
inputs: ['checked', 'disabled', 'errorText', 'errorTextCount', 'indeterminate', 'invalid', 'label', 'name', 'required', 'value'],
|
|
227
240
|
}]
|
|
228
241
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
229
242
|
let SixDatepicker = class SixDatepicker {
|
|
@@ -235,11 +248,11 @@ let SixDatepicker = class SixDatepicker {
|
|
|
235
248
|
}
|
|
236
249
|
};
|
|
237
250
|
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",
|
|
251
|
+
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 });
|
|
239
252
|
SixDatepicker = __decorate([
|
|
240
253
|
ProxyCmp({
|
|
241
|
-
inputs: ['allowedDates', 'clearable', 'closeOnSelect', 'containingElement', 'dateFormat', 'debounce', 'defaultDate', 'disabled', '
|
|
242
|
-
methods: ['
|
|
254
|
+
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
|
+
methods: ['setFocus', 'select']
|
|
243
256
|
})
|
|
244
257
|
], SixDatepicker);
|
|
245
258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixDatepicker, decorators: [{
|
|
@@ -249,7 +262,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
249
262
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
250
263
|
template: '<ng-content></ng-content>',
|
|
251
264
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
252
|
-
inputs: ['allowedDates', 'clearable', 'closeOnSelect', 'containingElement', 'dateFormat', 'debounce', 'defaultDate', 'disabled', '
|
|
265
|
+
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'],
|
|
253
266
|
}]
|
|
254
267
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
255
268
|
let SixDetails = class SixDetails {
|
|
@@ -356,6 +369,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
356
369
|
inputs: ['asyncFilter', 'autofocusFilter', 'closeOnSelect', 'containingElement', 'disableHideOnEnterAndSpace', 'distance', 'filter', 'filterDebounce', 'filterPlaceholder', 'hoist', 'open', 'options', 'placement', 'skidding', 'virtualScroll'],
|
|
357
370
|
}]
|
|
358
371
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
372
|
+
let SixError = class SixError {
|
|
373
|
+
constructor(c, r, z) {
|
|
374
|
+
this.z = z;
|
|
375
|
+
c.detach();
|
|
376
|
+
this.el = r.nativeElement;
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
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 });
|
|
380
|
+
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 });
|
|
381
|
+
SixError = __decorate([
|
|
382
|
+
ProxyCmp({})
|
|
383
|
+
], SixError);
|
|
384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixError, decorators: [{
|
|
385
|
+
type: Component,
|
|
386
|
+
args: [{
|
|
387
|
+
selector: 'six-error',
|
|
388
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
389
|
+
template: '<ng-content></ng-content>',
|
|
390
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
391
|
+
inputs: [],
|
|
392
|
+
}]
|
|
393
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
359
394
|
let SixErrorPage = class SixErrorPage {
|
|
360
395
|
constructor(c, r, z) {
|
|
361
396
|
this.z = z;
|
|
@@ -474,32 +509,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
474
509
|
inputs: [],
|
|
475
510
|
}]
|
|
476
511
|
}], 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
512
|
let SixGroupLabel = class SixGroupLabel {
|
|
504
513
|
constructor(c, r, z) {
|
|
505
514
|
this.z = z;
|
|
@@ -603,15 +612,15 @@ let SixInput = class SixInput {
|
|
|
603
612
|
this.z = z;
|
|
604
613
|
c.detach();
|
|
605
614
|
this.el = r.nativeElement;
|
|
606
|
-
proxyOutputs(this, this.el, ['six-input-change', 'six-input-clear', 'six-input-input', 'six-input-focus', 'six-input-blur'
|
|
615
|
+
proxyOutputs(this, this.el, ['six-input-change', 'six-input-clear', 'six-input-input', 'six-input-focus', 'six-input-blur']);
|
|
607
616
|
}
|
|
608
617
|
};
|
|
609
618
|
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",
|
|
619
|
+
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 });
|
|
611
620
|
SixInput = __decorate([
|
|
612
621
|
ProxyCmp({
|
|
613
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearable', 'disabled', '
|
|
614
|
-
methods: ['setFocus', 'removeFocus', 'select', 'setSelectionRange', 'setRangeText'
|
|
622
|
+
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'],
|
|
623
|
+
methods: ['setFocus', 'removeFocus', 'select', 'setSelectionRange', 'setRangeText']
|
|
615
624
|
})
|
|
616
625
|
], SixInput);
|
|
617
626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixInput, decorators: [{
|
|
@@ -621,7 +630,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
621
630
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
622
631
|
template: '<ng-content></ng-content>',
|
|
623
632
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
624
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearable', 'disabled', '
|
|
633
|
+
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'],
|
|
625
634
|
}]
|
|
626
635
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
627
636
|
let SixItemPicker = class SixItemPicker {
|
|
@@ -902,7 +911,7 @@ SixRadio.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
|
902
911
|
SixRadio = __decorate([
|
|
903
912
|
ProxyCmp({
|
|
904
913
|
inputs: ['checked', 'disabled', 'invalid', 'name', 'value'],
|
|
905
|
-
methods: ['setFocus', 'removeFocus'
|
|
914
|
+
methods: ['setFocus', 'removeFocus']
|
|
906
915
|
})
|
|
907
916
|
], SixRadio);
|
|
908
917
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixRadio, decorators: [{
|
|
@@ -924,11 +933,11 @@ let SixRange = class SixRange {
|
|
|
924
933
|
}
|
|
925
934
|
};
|
|
926
935
|
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",
|
|
936
|
+
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 });
|
|
928
937
|
SixRange = __decorate([
|
|
929
938
|
ProxyCmp({
|
|
930
|
-
inputs: ['disabled', '
|
|
931
|
-
methods: ['setFocus', 'removeFocus'
|
|
939
|
+
inputs: ['disabled', 'errorText', 'errorTextCount', 'helpText', 'invalid', 'label', 'max', 'min', 'name', 'required', 'step', 'tooltip', 'tooltipFormatter', 'value'],
|
|
940
|
+
methods: ['setFocus', 'removeFocus']
|
|
932
941
|
})
|
|
933
942
|
], SixRange);
|
|
934
943
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixRange, decorators: [{
|
|
@@ -938,7 +947,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
938
947
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
939
948
|
template: '<ng-content></ng-content>',
|
|
940
949
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
941
|
-
inputs: ['disabled', '
|
|
950
|
+
inputs: ['disabled', 'errorText', 'errorTextCount', 'helpText', 'invalid', 'label', 'max', 'min', 'name', 'required', 'step', 'tooltip', 'tooltipFormatter', 'value'],
|
|
942
951
|
}]
|
|
943
952
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
944
953
|
let SixRoot = class SixRoot {
|
|
@@ -1000,11 +1009,11 @@ let SixSelect = class SixSelect {
|
|
|
1000
1009
|
}
|
|
1001
1010
|
};
|
|
1002
1011
|
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",
|
|
1012
|
+
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 });
|
|
1004
1013
|
SixSelect = __decorate([
|
|
1005
1014
|
ProxyCmp({
|
|
1006
|
-
inputs: ['asyncFilter', 'autocomplete', 'clearable', '
|
|
1007
|
-
methods: ['
|
|
1015
|
+
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'],
|
|
1016
|
+
methods: ['setFocus']
|
|
1008
1017
|
})
|
|
1009
1018
|
], SixSelect);
|
|
1010
1019
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSelect, decorators: [{
|
|
@@ -1014,7 +1023,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1014
1023
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1015
1024
|
template: '<ng-content></ng-content>',
|
|
1016
1025
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1017
|
-
inputs: ['asyncFilter', 'autocomplete', 'clearable', '
|
|
1026
|
+
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'],
|
|
1018
1027
|
}]
|
|
1019
1028
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1020
1029
|
let SixSidebar = class SixSidebar {
|
|
@@ -1051,10 +1060,10 @@ let SixSidebarItem = class SixSidebarItem {
|
|
|
1051
1060
|
}
|
|
1052
1061
|
};
|
|
1053
1062
|
SixSidebarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSidebarItem, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1054
|
-
SixSidebarItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSidebarItem, selector: "six-sidebar-item", inputs: { disabled: "disabled", selected: "selected", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1063
|
+
SixSidebarItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSidebarItem, selector: "six-sidebar-item", inputs: { disabled: "disabled", href: "href", selected: "selected", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1055
1064
|
SixSidebarItem = __decorate([
|
|
1056
1065
|
ProxyCmp({
|
|
1057
|
-
inputs: ['disabled', 'selected', 'value']
|
|
1066
|
+
inputs: ['disabled', 'href', 'selected', 'value']
|
|
1058
1067
|
})
|
|
1059
1068
|
], SixSidebarItem);
|
|
1060
1069
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSidebarItem, decorators: [{
|
|
@@ -1064,7 +1073,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1064
1073
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1065
1074
|
template: '<ng-content></ng-content>',
|
|
1066
1075
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1067
|
-
inputs: ['disabled', 'selected', 'value'],
|
|
1076
|
+
inputs: ['disabled', 'href', 'selected', 'value'],
|
|
1068
1077
|
}]
|
|
1069
1078
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1070
1079
|
let SixSidebarItemGroup = class SixSidebarItemGroup {
|
|
@@ -1075,10 +1084,10 @@ let SixSidebarItemGroup = class SixSidebarItemGroup {
|
|
|
1075
1084
|
}
|
|
1076
1085
|
};
|
|
1077
1086
|
SixSidebarItemGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSidebarItemGroup, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1078
|
-
SixSidebarItemGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSidebarItemGroup, selector: "six-sidebar-item-group", inputs: { icon: "icon", name: "name", open: "open", summaryIcon: "summaryIcon", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1087
|
+
SixSidebarItemGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSidebarItemGroup, selector: "six-sidebar-item-group", inputs: { href: "href", icon: "icon", name: "name", open: "open", summaryIcon: "summaryIcon", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1079
1088
|
SixSidebarItemGroup = __decorate([
|
|
1080
1089
|
ProxyCmp({
|
|
1081
|
-
inputs: ['icon', 'name', 'open', 'summaryIcon', 'value']
|
|
1090
|
+
inputs: ['href', 'icon', 'name', 'open', 'summaryIcon', 'value']
|
|
1082
1091
|
})
|
|
1083
1092
|
], SixSidebarItemGroup);
|
|
1084
1093
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSidebarItemGroup, decorators: [{
|
|
@@ -1088,7 +1097,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1088
1097
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1089
1098
|
template: '<ng-content></ng-content>',
|
|
1090
1099
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1091
|
-
inputs: ['icon', 'name', 'open', 'summaryIcon', 'value'],
|
|
1100
|
+
inputs: ['href', 'icon', 'name', 'open', 'summaryIcon', 'value'],
|
|
1092
1101
|
}]
|
|
1093
1102
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1094
1103
|
let SixSpinner = class SixSpinner {
|
|
@@ -1148,11 +1157,11 @@ let SixSwitch = class SixSwitch {
|
|
|
1148
1157
|
}
|
|
1149
1158
|
};
|
|
1150
1159
|
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 });
|
|
1160
|
+
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 });
|
|
1152
1161
|
SixSwitch = __decorate([
|
|
1153
1162
|
ProxyCmp({
|
|
1154
|
-
inputs: ['checked', 'disabled', 'invalid', 'name', 'required', 'value'],
|
|
1155
|
-
methods: ['setFocus', 'removeFocus'
|
|
1163
|
+
inputs: ['checked', 'disabled', 'errorText', 'errorTextCount', 'invalid', 'label', 'name', 'required', 'value'],
|
|
1164
|
+
methods: ['setFocus', 'removeFocus']
|
|
1156
1165
|
})
|
|
1157
1166
|
], SixSwitch);
|
|
1158
1167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSwitch, decorators: [{
|
|
@@ -1162,7 +1171,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1162
1171
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1163
1172
|
template: '<ng-content></ng-content>',
|
|
1164
1173
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1165
|
-
inputs: ['checked', 'disabled', 'invalid', 'name', 'required', 'value'],
|
|
1174
|
+
inputs: ['checked', 'disabled', 'errorText', 'errorTextCount', 'invalid', 'label', 'name', 'required', 'value'],
|
|
1166
1175
|
}]
|
|
1167
1176
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1168
1177
|
let SixTab = class SixTab {
|
|
@@ -1271,15 +1280,15 @@ let SixTextarea = class SixTextarea {
|
|
|
1271
1280
|
this.z = z;
|
|
1272
1281
|
c.detach();
|
|
1273
1282
|
this.el = r.nativeElement;
|
|
1274
|
-
proxyOutputs(this, this.el, ['six-textarea-change', 'six-textarea-input', 'six-textarea-focus', 'six-textarea-blur'
|
|
1283
|
+
proxyOutputs(this, this.el, ['six-textarea-change', 'six-textarea-input', 'six-textarea-focus', 'six-textarea-blur']);
|
|
1275
1284
|
}
|
|
1276
1285
|
};
|
|
1277
1286
|
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",
|
|
1287
|
+
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 });
|
|
1279
1288
|
SixTextarea = __decorate([
|
|
1280
1289
|
ProxyCmp({
|
|
1281
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', '
|
|
1282
|
-
methods: ['setFocus', 'removeFocus', 'select', 'setSelectionRange', 'setRangeText'
|
|
1290
|
+
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', 'errorText', 'errorTextCount', 'helpText', 'inputmode', 'invalid', 'label', 'maxlength', 'minlength', 'name', 'placeholder', 'readonly', 'required', 'resize', 'rows', 'size', 'spellcheck', 'value'],
|
|
1291
|
+
methods: ['setFocus', 'removeFocus', 'select', 'setSelectionRange', 'setRangeText']
|
|
1283
1292
|
})
|
|
1284
1293
|
], SixTextarea);
|
|
1285
1294
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixTextarea, decorators: [{
|
|
@@ -1289,7 +1298,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1289
1298
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1290
1299
|
template: '<ng-content></ng-content>',
|
|
1291
1300
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1292
|
-
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', '
|
|
1301
|
+
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', 'errorText', 'errorTextCount', 'helpText', 'inputmode', 'invalid', 'label', 'maxlength', 'minlength', 'name', 'placeholder', 'readonly', 'required', 'resize', 'rows', 'size', 'spellcheck', 'value'],
|
|
1293
1302
|
}]
|
|
1294
1303
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1295
1304
|
let SixTile = class SixTile {
|
|
@@ -1327,11 +1336,11 @@ let SixTimepicker = class SixTimepicker {
|
|
|
1327
1336
|
}
|
|
1328
1337
|
};
|
|
1329
1338
|
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",
|
|
1339
|
+
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 });
|
|
1331
1340
|
SixTimepicker = __decorate([
|
|
1332
1341
|
ProxyCmp({
|
|
1333
|
-
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', '
|
|
1334
|
-
methods: ['
|
|
1342
|
+
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', 'errorText', 'errorTextCount', 'format', 'hoist', 'iconPosition', 'inline', 'interval', 'invalid', 'label', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'separator', 'size', 'timeout', 'value'],
|
|
1343
|
+
methods: ['setFocus']
|
|
1335
1344
|
})
|
|
1336
1345
|
], SixTimepicker);
|
|
1337
1346
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixTimepicker, decorators: [{
|
|
@@ -1341,7 +1350,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1341
1350
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1342
1351
|
template: '<ng-content></ng-content>',
|
|
1343
1352
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1344
|
-
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', '
|
|
1353
|
+
inputs: ['clearable', 'debounce', 'defaultTime', 'disabled', 'errorText', 'errorTextCount', 'format', 'hoist', 'iconPosition', 'inline', 'interval', 'invalid', 'label', 'name', 'open', 'placeholder', 'placement', 'readonly', 'required', 'separator', 'size', 'timeout', 'value'],
|
|
1345
1354
|
}]
|
|
1346
1355
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
1347
1356
|
let SixTooltip = class SixTooltip {
|
|
@@ -1384,12 +1393,12 @@ const DIRECTIVES = [
|
|
|
1384
1393
|
SixDialog,
|
|
1385
1394
|
SixDrawer,
|
|
1386
1395
|
SixDropdown,
|
|
1396
|
+
SixError,
|
|
1387
1397
|
SixErrorPage,
|
|
1388
1398
|
SixFileList,
|
|
1389
1399
|
SixFileListItem,
|
|
1390
1400
|
SixFileUpload,
|
|
1391
1401
|
SixFooter,
|
|
1392
|
-
SixForm,
|
|
1393
1402
|
SixGroupLabel,
|
|
1394
1403
|
SixHeader,
|
|
1395
1404
|
SixIcon,
|
|
@@ -1427,33 +1436,905 @@ const DIRECTIVES = [
|
|
|
1427
1436
|
SixTooltip
|
|
1428
1437
|
];
|
|
1429
1438
|
|
|
1430
|
-
class
|
|
1439
|
+
class ValidationMessagesService {
|
|
1440
|
+
getErrorMessage(language, error) {
|
|
1441
|
+
return getErrorMessage(language, error);
|
|
1442
|
+
}
|
|
1431
1443
|
}
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1444
|
+
ValidationMessagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ValidationMessagesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1445
|
+
ValidationMessagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ValidationMessagesService, providedIn: 'root' });
|
|
1446
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ValidationMessagesService, decorators: [{
|
|
1447
|
+
type: Injectable,
|
|
1448
|
+
args: [{ providedIn: 'root' }]
|
|
1449
|
+
}] });
|
|
1450
|
+
|
|
1451
|
+
class ValueAccessor {
|
|
1452
|
+
constructor(injector, el) {
|
|
1453
|
+
this.injector = injector;
|
|
1454
|
+
this.el = el;
|
|
1455
|
+
this.validationMessagesService = inject(ValidationMessagesService);
|
|
1456
|
+
this.onChange = () => { };
|
|
1457
|
+
this.onTouched = () => { };
|
|
1458
|
+
}
|
|
1459
|
+
registerOnChange(fn) {
|
|
1460
|
+
this.onChange = fn;
|
|
1461
|
+
}
|
|
1462
|
+
registerOnTouched(fn) {
|
|
1463
|
+
this.onTouched = fn;
|
|
1464
|
+
}
|
|
1465
|
+
writeValue(value) {
|
|
1466
|
+
this.el.nativeElement.value = value;
|
|
1467
|
+
this.updateValidation();
|
|
1468
|
+
}
|
|
1469
|
+
/**
|
|
1470
|
+
* Notifies the ControlValueAccessor of a change in the value of the control.
|
|
1471
|
+
*
|
|
1472
|
+
* This is called by each of the ValueAccessor directives when we want to update
|
|
1473
|
+
* the status and validity of the form control. For example with text components this
|
|
1474
|
+
* is called when the input event is fired. For select components this is called
|
|
1475
|
+
* when the change event is fired.
|
|
1476
|
+
*
|
|
1477
|
+
* This also updates the form status on the element by setting the 'invalid' property to true/false.
|
|
1478
|
+
*
|
|
1479
|
+
* @param el The component element.
|
|
1480
|
+
* @param value The new value of the control.
|
|
1481
|
+
*/
|
|
1482
|
+
handleValueChange(el, value) {
|
|
1483
|
+
if (el === this.el.nativeElement) {
|
|
1484
|
+
this.onChange(value);
|
|
1485
|
+
this.updateValidation();
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
_handleBlurEvent(el) {
|
|
1489
|
+
if (el === this.el.nativeElement) {
|
|
1490
|
+
this.onTouched();
|
|
1491
|
+
this.updateValidation();
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
updateValidation() {
|
|
1495
|
+
nextTick(() => {
|
|
1496
|
+
if (this.ngControl?.control == null)
|
|
1497
|
+
return;
|
|
1498
|
+
const element = this.el.nativeElement;
|
|
1499
|
+
const control = this.ngControl?.control;
|
|
1500
|
+
const invalid = !control.valid && control.dirty && control.touched;
|
|
1501
|
+
let errorTexts;
|
|
1502
|
+
if (invalid) {
|
|
1503
|
+
errorTexts = this.initialErrorText || this.getErrorTexts(control);
|
|
1504
|
+
}
|
|
1505
|
+
element.invalid = invalid;
|
|
1506
|
+
element.errorText = errorTexts ?? '';
|
|
1507
|
+
});
|
|
1508
|
+
}
|
|
1509
|
+
setDisabledState(isDisabled) {
|
|
1510
|
+
this.el.nativeElement.disabled = isDisabled;
|
|
1511
|
+
}
|
|
1512
|
+
ngOnDestroy() {
|
|
1513
|
+
if (this.statusChanges) {
|
|
1514
|
+
this.statusChanges.unsubscribe();
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
ngAfterViewInit() {
|
|
1518
|
+
this.initialErrorText = this.el.nativeElement?.errorText?.trim() || undefined;
|
|
1519
|
+
try {
|
|
1520
|
+
this.ngControl = this.injector.get(NgControl);
|
|
1521
|
+
}
|
|
1522
|
+
catch {
|
|
1523
|
+
/* No FormControl or ngModel binding */
|
|
1524
|
+
}
|
|
1525
|
+
if (!this.ngControl) {
|
|
1526
|
+
return;
|
|
1527
|
+
}
|
|
1528
|
+
// Listen for changes in validity, disabled, or pending states
|
|
1529
|
+
if (this.ngControl.statusChanges) {
|
|
1530
|
+
this.statusChanges = this.ngControl.statusChanges.subscribe(() => this.updateValidation());
|
|
1531
|
+
}
|
|
1532
|
+
/**
|
|
1533
|
+
* TODO FW-2787: Remove this in favor of https://github.com/angular/angular/issues/10887
|
|
1534
|
+
* whenever it is implemented.
|
|
1535
|
+
*/
|
|
1536
|
+
const formControl = this.ngControl.control;
|
|
1537
|
+
if (formControl) {
|
|
1538
|
+
const methodsToPatch = ['markAsTouched', 'markAllAsTouched', 'markAsUntouched', 'markAsDirty', 'markAsPristine'];
|
|
1539
|
+
methodsToPatch.forEach((method) => {
|
|
1540
|
+
if (typeof formControl[method] !== 'undefined') {
|
|
1541
|
+
const oldFn = formControl[method].bind(formControl);
|
|
1542
|
+
formControl[method] = (...params) => {
|
|
1543
|
+
oldFn(...params);
|
|
1544
|
+
this.updateValidation();
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
getErrorTexts(control) {
|
|
1551
|
+
if (control.errors == null) {
|
|
1552
|
+
console.warn('no errors for invalid control', control);
|
|
1553
|
+
return [];
|
|
1554
|
+
}
|
|
1555
|
+
const errorList = Object.entries(control.errors);
|
|
1556
|
+
if (errorList.length <= 0) {
|
|
1557
|
+
console.warn('no errors for invalid control', control);
|
|
1558
|
+
return [];
|
|
1559
|
+
}
|
|
1560
|
+
return errorList.map((error) => {
|
|
1561
|
+
const [key, value] = error;
|
|
1562
|
+
return (this.validationMessagesService.getErrorMessage(getLanguage(), { key: key, ...value }) ?? key);
|
|
1563
|
+
});
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
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 });
|
|
1567
|
+
ValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: ValueAccessor, host: { listeners: { "blur": "_handleBlurEvent($event.target)" } }, ngImport: i0 });
|
|
1568
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ValueAccessor, decorators: [{
|
|
1569
|
+
type: Directive
|
|
1570
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { _handleBlurEvent: [{
|
|
1571
|
+
type: HostListener,
|
|
1572
|
+
args: ['blur', ['$event.target']]
|
|
1573
|
+
}] } });
|
|
1574
|
+
function getLanguage() {
|
|
1575
|
+
const documentLang = document.documentElement.lang;
|
|
1576
|
+
if (languages.includes(documentLang)) {
|
|
1577
|
+
return documentLang;
|
|
1578
|
+
}
|
|
1579
|
+
return 'de';
|
|
1580
|
+
}
|
|
1581
|
+
const nextTick = (h) => {
|
|
1582
|
+
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
1583
|
+
return __zone_symbol__requestAnimationFrame(h);
|
|
1584
|
+
}
|
|
1585
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
1586
|
+
return requestAnimationFrame(h);
|
|
1587
|
+
}
|
|
1588
|
+
return setTimeout(h);
|
|
1589
|
+
};
|
|
1590
|
+
|
|
1591
|
+
class TextValueAccessor extends ValueAccessor {
|
|
1592
|
+
constructor(injector, el) {
|
|
1593
|
+
super(injector, el);
|
|
1594
|
+
}
|
|
1595
|
+
handleInputEvent(el) {
|
|
1596
|
+
this.handleValueChange(el, el.value);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
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 });
|
|
1600
|
+
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
1601
|
{
|
|
1436
|
-
provide:
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
},
|
|
1602
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1603
|
+
useExisting: TextValueAccessor,
|
|
1604
|
+
multi: true,
|
|
1440
1605
|
},
|
|
1441
|
-
] });
|
|
1442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
|
1443
|
-
type:
|
|
1606
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1607
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TextValueAccessor, decorators: [{
|
|
1608
|
+
type: Directive,
|
|
1444
1609
|
args: [{
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1610
|
+
selector: 'six-input:not([type=number]),six-textarea',
|
|
1611
|
+
providers: [
|
|
1612
|
+
{
|
|
1613
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1614
|
+
useExisting: TextValueAccessor,
|
|
1615
|
+
multi: true,
|
|
1616
|
+
},
|
|
1617
|
+
],
|
|
1618
|
+
}]
|
|
1619
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleInputEvent: [{
|
|
1620
|
+
type: HostListener,
|
|
1621
|
+
args: ['input', ['$event.target']]
|
|
1622
|
+
}] } });
|
|
1623
|
+
|
|
1624
|
+
class NumericValueAccessor extends ValueAccessor {
|
|
1625
|
+
constructor(injector, el) {
|
|
1626
|
+
super(injector, el);
|
|
1627
|
+
}
|
|
1628
|
+
handleInputEvent(el) {
|
|
1629
|
+
this.handleValueChange(el, el.value);
|
|
1630
|
+
}
|
|
1631
|
+
registerOnChange(fn) {
|
|
1632
|
+
super.registerOnChange((value) => {
|
|
1633
|
+
fn(value === '' ? null : parseFloat(value));
|
|
1634
|
+
});
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
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 });
|
|
1638
|
+
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: [
|
|
1639
|
+
{
|
|
1640
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1641
|
+
useExisting: NumericValueAccessor,
|
|
1642
|
+
multi: true,
|
|
1643
|
+
},
|
|
1644
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NumericValueAccessor, decorators: [{
|
|
1646
|
+
type: Directive,
|
|
1647
|
+
args: [{
|
|
1648
|
+
selector: 'six-input[type=number]',
|
|
1649
|
+
providers: [
|
|
1650
|
+
{
|
|
1651
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1652
|
+
useExisting: NumericValueAccessor,
|
|
1653
|
+
multi: true,
|
|
1654
|
+
},
|
|
1655
|
+
],
|
|
1656
|
+
}]
|
|
1657
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleInputEvent: [{
|
|
1658
|
+
type: HostListener,
|
|
1659
|
+
args: ['input', ['$event.target']]
|
|
1660
|
+
}] } });
|
|
1661
|
+
|
|
1662
|
+
class RadioValueAccessor extends ValueAccessor {
|
|
1663
|
+
constructor(injector, el) {
|
|
1664
|
+
super(injector, el);
|
|
1665
|
+
}
|
|
1666
|
+
handleChangeEvent(el) {
|
|
1667
|
+
this.handleValueChange(el, this.value);
|
|
1668
|
+
}
|
|
1669
|
+
ngOnInit() {
|
|
1670
|
+
this.checkName();
|
|
1671
|
+
}
|
|
1672
|
+
writeValue(value) {
|
|
1673
|
+
this.el.nativeElement.checked = value === this.value;
|
|
1674
|
+
this.updateValidation();
|
|
1675
|
+
}
|
|
1676
|
+
checkName() {
|
|
1677
|
+
if (this.name && this.formControlName && this.name !== this.formControlName) {
|
|
1678
|
+
throw new Error(`
|
|
1679
|
+
If you define both a name and a formControlName attribute on your radio button, their values
|
|
1680
|
+
must match. Ex: <six-input type="radio" formControlName="food" name="food">
|
|
1681
|
+
`);
|
|
1682
|
+
}
|
|
1683
|
+
if (!this.name && this.formControlName) {
|
|
1684
|
+
this.name = this.formControlName;
|
|
1685
|
+
this.el.nativeElement.name = this.formControlName;
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
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 });
|
|
1690
|
+
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: [
|
|
1691
|
+
{
|
|
1692
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1693
|
+
useExisting: RadioValueAccessor,
|
|
1694
|
+
multi: true,
|
|
1695
|
+
},
|
|
1696
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RadioValueAccessor, decorators: [{
|
|
1698
|
+
type: Directive,
|
|
1699
|
+
args: [{
|
|
1700
|
+
selector: 'six-radio',
|
|
1701
|
+
providers: [
|
|
1702
|
+
{
|
|
1703
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1704
|
+
useExisting: RadioValueAccessor,
|
|
1705
|
+
multi: true,
|
|
1706
|
+
},
|
|
1707
|
+
],
|
|
1708
|
+
}]
|
|
1709
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { value: [{
|
|
1710
|
+
type: Input
|
|
1711
|
+
}], formControlName: [{
|
|
1712
|
+
type: Input
|
|
1713
|
+
}], name: [{
|
|
1714
|
+
type: Input
|
|
1715
|
+
}], handleChangeEvent: [{
|
|
1716
|
+
type: HostListener,
|
|
1717
|
+
args: ['change', ['$event.target']]
|
|
1718
|
+
}] } });
|
|
1719
|
+
|
|
1720
|
+
class DatepickerValueAccessor extends ValueAccessor {
|
|
1721
|
+
constructor(injector, el) {
|
|
1722
|
+
super(injector, el);
|
|
1723
|
+
}
|
|
1724
|
+
handleChangeEvent(el) {
|
|
1725
|
+
this.handleValueChange(el, el.value);
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
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 });
|
|
1729
|
+
DatepickerValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DatepickerValueAccessor, selector: "six-datepicker", host: { listeners: { "change": "handleChangeEvent($event.target)" } }, providers: [
|
|
1730
|
+
{
|
|
1731
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1732
|
+
useExisting: DatepickerValueAccessor,
|
|
1733
|
+
multi: true,
|
|
1734
|
+
},
|
|
1735
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1736
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatepickerValueAccessor, decorators: [{
|
|
1737
|
+
type: Directive,
|
|
1738
|
+
args: [{
|
|
1739
|
+
selector: 'six-datepicker',
|
|
1448
1740
|
providers: [
|
|
1449
1741
|
{
|
|
1450
|
-
provide:
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
},
|
|
1742
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1743
|
+
useExisting: DatepickerValueAccessor,
|
|
1744
|
+
multi: true,
|
|
1454
1745
|
},
|
|
1455
1746
|
],
|
|
1456
1747
|
}]
|
|
1748
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleChangeEvent: [{
|
|
1749
|
+
type: HostListener,
|
|
1750
|
+
args: ['change', ['$event.target']]
|
|
1751
|
+
}] } });
|
|
1752
|
+
|
|
1753
|
+
/**
|
|
1754
|
+
* This directive intercepts the ngSubmit event of an Angular form and introduces
|
|
1755
|
+
* a supplementary event named sixSubmit. The sixSubmit event is triggered exclusively
|
|
1756
|
+
* when the form is valid. In cases where the form is considered invalid, this directive
|
|
1757
|
+
* takes proactive actions by marking all form controls as touched and dirty. Additionally,
|
|
1758
|
+
* it shifts the focus to the initial invalid form element, facilitating quick error
|
|
1759
|
+
* resolution.
|
|
1760
|
+
*
|
|
1761
|
+
* To utilize this directive, apply it to an Angular form.
|
|
1762
|
+
* ```html
|
|
1763
|
+
* <form [formGroup]="form" sixForm (sixSubmit)="onSubmit($event)">
|
|
1764
|
+
* <!-- form content -->
|
|
1765
|
+
* </form>
|
|
1766
|
+
* ```
|
|
1767
|
+
*
|
|
1768
|
+
* For users needing greater flexibility in determining when error messages are displayed,
|
|
1769
|
+
* or for those who prefer not to rely solely on the form submission event,
|
|
1770
|
+
* an alternative is to use the SixFormUtilDirective.
|
|
1771
|
+
*/
|
|
1772
|
+
class SixFormDirective {
|
|
1773
|
+
onNgSubmit(event) {
|
|
1774
|
+
if (this.formGroupDirective.invalid) {
|
|
1775
|
+
focusInvalidField(this.formGroupDirective, this.elementRef);
|
|
1776
|
+
}
|
|
1777
|
+
else {
|
|
1778
|
+
this.sixSubmit.emit(event);
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
constructor(elementRef, formGroupDirective) {
|
|
1782
|
+
this.elementRef = elementRef;
|
|
1783
|
+
this.formGroupDirective = formGroupDirective;
|
|
1784
|
+
/**
|
|
1785
|
+
* Emits an event when the form is valid and the form submission has been triggered.
|
|
1786
|
+
*/
|
|
1787
|
+
this.sixSubmit = new EventEmitter();
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
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 });
|
|
1791
|
+
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 });
|
|
1792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormDirective, decorators: [{
|
|
1793
|
+
type: Directive,
|
|
1794
|
+
args: [{
|
|
1795
|
+
selector: 'form[sixForm]',
|
|
1796
|
+
}]
|
|
1797
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FormGroupDirective }]; }, propDecorators: { sixSubmit: [{
|
|
1798
|
+
type: Output
|
|
1799
|
+
}], onNgSubmit: [{
|
|
1800
|
+
type: HostListener,
|
|
1801
|
+
args: ['ngSubmit', ['$event']]
|
|
1802
|
+
}] } });
|
|
1803
|
+
/**
|
|
1804
|
+
* This directive provides a utility method, that marks all form controls
|
|
1805
|
+
* as touched and dirty, and focuses the first invalid form element.
|
|
1806
|
+
*
|
|
1807
|
+
* To utilize this directive, apply it to an Angular form.
|
|
1808
|
+
* ```html
|
|
1809
|
+
* <form [formGroup]="form" sixFormUtil (ngSubmit)="onSubmit($event)">
|
|
1810
|
+
* <!-- form content -->
|
|
1811
|
+
* </form>
|
|
1812
|
+
* ```
|
|
1813
|
+
*
|
|
1814
|
+
* Then, get a reference to the directive and invoke `focusInvalidField()` if the
|
|
1815
|
+
* form is invalid:
|
|
1816
|
+
* ```ts
|
|
1817
|
+
* @ViewChild(SixFormUtilDirective) sixFormUtil!: SixFormUtilDirective;
|
|
1818
|
+
* // ...
|
|
1819
|
+
* onSubmit() {
|
|
1820
|
+
* if (this.form.invalid) {
|
|
1821
|
+
* this.sixFormUtil.focusInvalidField();
|
|
1822
|
+
* } else {
|
|
1823
|
+
* // ...
|
|
1824
|
+
* }
|
|
1825
|
+
* }
|
|
1826
|
+
* ```
|
|
1827
|
+
*/
|
|
1828
|
+
class SixFormUtilDirective {
|
|
1829
|
+
constructor(elementRef, formGroupDirective) {
|
|
1830
|
+
this.elementRef = elementRef;
|
|
1831
|
+
this.formGroupDirective = formGroupDirective;
|
|
1832
|
+
}
|
|
1833
|
+
/** markAllControlsAsDirty(Object.values(formGroup.controls));
|
|
1834
|
+
* Marks all form controls as touched and dirty, and focuses the first
|
|
1835
|
+
* invalid form element.
|
|
1836
|
+
*/
|
|
1837
|
+
focusInvalidField() {
|
|
1838
|
+
focusInvalidField(this.formGroupDirective, this.elementRef);
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
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 });
|
|
1842
|
+
SixFormUtilDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SixFormUtilDirective, selector: "[sixFormUtil]", ngImport: i0 });
|
|
1843
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormUtilDirective, decorators: [{
|
|
1844
|
+
type: Directive,
|
|
1845
|
+
args: [{
|
|
1846
|
+
selector: '[sixFormUtil]',
|
|
1847
|
+
}]
|
|
1848
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FormGroupDirective }]; } });
|
|
1849
|
+
function focusInvalidField(formGroupDirective, formElement) {
|
|
1850
|
+
formGroupDirective.form.markAllAsTouched();
|
|
1851
|
+
markAllAsDirty([formGroupDirective.form]);
|
|
1852
|
+
const invalidElement = getInvalidElement(formElement.nativeElement);
|
|
1853
|
+
if ('setFocus' in invalidElement && typeof invalidElement?.setFocus === 'function') {
|
|
1854
|
+
invalidElement.setFocus();
|
|
1855
|
+
}
|
|
1856
|
+
if ('focus' in invalidElement && typeof invalidElement?.focus === 'function') {
|
|
1857
|
+
invalidElement.focus();
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
function getInvalidElement(parent) {
|
|
1861
|
+
const invalidElement = parent.querySelector('.ng-invalid');
|
|
1862
|
+
if (invalidElement == null) {
|
|
1863
|
+
return parent;
|
|
1864
|
+
}
|
|
1865
|
+
return getInvalidElement(invalidElement);
|
|
1866
|
+
}
|
|
1867
|
+
function markAllAsDirty(controls) {
|
|
1868
|
+
controls.forEach((control) => {
|
|
1869
|
+
if (control instanceof FormControl) {
|
|
1870
|
+
control.markAsDirty({ onlySelf: true });
|
|
1871
|
+
}
|
|
1872
|
+
else if (control instanceof FormGroup) {
|
|
1873
|
+
control.markAsDirty({ onlySelf: true });
|
|
1874
|
+
markAllAsDirty(Object.values(control.controls));
|
|
1875
|
+
}
|
|
1876
|
+
else if (control instanceof FormArray) {
|
|
1877
|
+
control.markAsDirty({ onlySelf: true });
|
|
1878
|
+
markAllAsDirty(control.controls);
|
|
1879
|
+
}
|
|
1880
|
+
});
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
class SixUiLibraryValidators {
|
|
1884
|
+
static minDate(mindate) {
|
|
1885
|
+
return (control) => {
|
|
1886
|
+
if (control.value == null)
|
|
1887
|
+
return null;
|
|
1888
|
+
const actualDate = control.value;
|
|
1889
|
+
return actualDate.getTime() >= mindate.getTime() ? null : { mindate: { mindate, actual: actualDate } };
|
|
1890
|
+
};
|
|
1891
|
+
}
|
|
1892
|
+
static maxDate(maxdate) {
|
|
1893
|
+
return (control) => {
|
|
1894
|
+
if (control.value == null)
|
|
1895
|
+
return null;
|
|
1896
|
+
const actualDate = control.value;
|
|
1897
|
+
return actualDate.getTime() <= maxdate.getTime() ? null : { maxdate: { maxdate, actual: actualDate } };
|
|
1898
|
+
};
|
|
1899
|
+
}
|
|
1900
|
+
static allowedDates(allowedDates = () => true) {
|
|
1901
|
+
return (control) => {
|
|
1902
|
+
if (control.value == null)
|
|
1903
|
+
return null;
|
|
1904
|
+
const allowed = allowedDates(control.value);
|
|
1905
|
+
return allowed ? null : { invaliddate: { actual: control.value } };
|
|
1906
|
+
};
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
class MinDateValidator {
|
|
1910
|
+
validate(control) {
|
|
1911
|
+
if (this.min != null) {
|
|
1912
|
+
return SixUiLibraryValidators.minDate(this.min)(control);
|
|
1913
|
+
}
|
|
1914
|
+
return null;
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
MinDateValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MinDateValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1918
|
+
MinDateValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: MinDateValidator, selector: "six-datepicker[min]", inputs: { min: "min" }, providers: [{ provide: NG_VALIDATORS, useExisting: MinDateValidator, multi: true }], ngImport: i0 });
|
|
1919
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MinDateValidator, decorators: [{
|
|
1920
|
+
type: Directive,
|
|
1921
|
+
args: [{
|
|
1922
|
+
selector: 'six-datepicker[min]',
|
|
1923
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: MinDateValidator, multi: true }],
|
|
1924
|
+
}]
|
|
1925
|
+
}], propDecorators: { min: [{
|
|
1926
|
+
type: Input
|
|
1927
|
+
}] } });
|
|
1928
|
+
class MaxDateValidator {
|
|
1929
|
+
validate(control) {
|
|
1930
|
+
if (this.max != null) {
|
|
1931
|
+
return SixUiLibraryValidators.maxDate(this.max)(control);
|
|
1932
|
+
}
|
|
1933
|
+
return null;
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
MaxDateValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MaxDateValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1937
|
+
MaxDateValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: MaxDateValidator, selector: "six-datepicker[max]", inputs: { max: "max" }, providers: [{ provide: NG_VALIDATORS, useExisting: MaxDateValidator, multi: true }], ngImport: i0 });
|
|
1938
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MaxDateValidator, decorators: [{
|
|
1939
|
+
type: Directive,
|
|
1940
|
+
args: [{
|
|
1941
|
+
selector: 'six-datepicker[max]',
|
|
1942
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: MaxDateValidator, multi: true }],
|
|
1943
|
+
}]
|
|
1944
|
+
}], propDecorators: { max: [{
|
|
1945
|
+
type: Input
|
|
1946
|
+
}] } });
|
|
1947
|
+
class AllowedDatesValidator {
|
|
1948
|
+
constructor() {
|
|
1949
|
+
this.allowedDates = () => true;
|
|
1950
|
+
}
|
|
1951
|
+
validate(control) {
|
|
1952
|
+
return SixUiLibraryValidators.allowedDates(this.allowedDates)(control);
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
AllowedDatesValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AllowedDatesValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1956
|
+
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 });
|
|
1957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AllowedDatesValidator, decorators: [{
|
|
1958
|
+
type: Directive,
|
|
1959
|
+
args: [{
|
|
1960
|
+
selector: 'six-datepicker[allowedDates]',
|
|
1961
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: AllowedDatesValidator, multi: true }],
|
|
1962
|
+
}]
|
|
1963
|
+
}], propDecorators: { allowedDates: [{
|
|
1964
|
+
type: Input
|
|
1965
|
+
}] } });
|
|
1966
|
+
class MinValidator {
|
|
1967
|
+
validate(control) {
|
|
1968
|
+
return Validators.min(toFloat(this.min))(control);
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
MinValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MinValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1972
|
+
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 });
|
|
1973
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MinValidator, decorators: [{
|
|
1974
|
+
type: Directive,
|
|
1975
|
+
args: [{
|
|
1976
|
+
selector: 'six-input[type=number][min]',
|
|
1977
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: MinValidator, multi: true }],
|
|
1978
|
+
}]
|
|
1979
|
+
}], propDecorators: { min: [{
|
|
1980
|
+
type: Input
|
|
1981
|
+
}] } });
|
|
1982
|
+
class MaxValidator {
|
|
1983
|
+
validate(control) {
|
|
1984
|
+
return Validators.max(toFloat(this.max))(control);
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
MaxValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MaxValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1988
|
+
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 });
|
|
1989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MaxValidator, decorators: [{
|
|
1990
|
+
type: Directive,
|
|
1991
|
+
args: [{
|
|
1992
|
+
selector: 'six-input[type=number][max]',
|
|
1993
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: MaxValidator, multi: true }],
|
|
1994
|
+
}]
|
|
1995
|
+
}], propDecorators: { max: [{
|
|
1996
|
+
type: Input
|
|
1997
|
+
}] } });
|
|
1998
|
+
function toFloat(value) {
|
|
1999
|
+
return typeof value === 'number' ? value : parseFloat(value);
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
class SelectValueAccessor extends ValueAccessor {
|
|
2003
|
+
constructor(injector, el) {
|
|
2004
|
+
super(injector, el);
|
|
2005
|
+
}
|
|
2006
|
+
handleChangeEvent(el) {
|
|
2007
|
+
this.handleValueChange(el, el.value);
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
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 });
|
|
2011
|
+
SelectValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SelectValueAccessor, selector: "six-select", host: { listeners: { "change": "handleChangeEvent($event.target)" } }, providers: [
|
|
2012
|
+
{
|
|
2013
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2014
|
+
useExisting: SelectValueAccessor,
|
|
2015
|
+
multi: true,
|
|
2016
|
+
},
|
|
2017
|
+
], usesInheritance: true, ngImport: i0 });
|
|
2018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectValueAccessor, decorators: [{
|
|
2019
|
+
type: Directive,
|
|
2020
|
+
args: [{
|
|
2021
|
+
selector: 'six-select',
|
|
2022
|
+
providers: [
|
|
2023
|
+
{
|
|
2024
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2025
|
+
useExisting: SelectValueAccessor,
|
|
2026
|
+
multi: true,
|
|
2027
|
+
},
|
|
2028
|
+
],
|
|
2029
|
+
}]
|
|
2030
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleChangeEvent: [{
|
|
2031
|
+
type: HostListener,
|
|
2032
|
+
args: ['change', ['$event.target']]
|
|
2033
|
+
}] } });
|
|
2034
|
+
|
|
2035
|
+
class CheckboxValueAccessor extends ValueAccessor {
|
|
2036
|
+
constructor(injector, el) {
|
|
2037
|
+
super(injector, el);
|
|
2038
|
+
}
|
|
2039
|
+
handleChangeEvent(el) {
|
|
2040
|
+
this.handleValueChange(el, el.checked);
|
|
2041
|
+
}
|
|
2042
|
+
writeValue(value) {
|
|
2043
|
+
this.el.nativeElement.checked = value === true;
|
|
2044
|
+
this.updateValidation();
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
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 });
|
|
2048
|
+
CheckboxValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: CheckboxValueAccessor, selector: "six-checkbox", host: { listeners: { "change": "handleChangeEvent($event.target)" } }, providers: [
|
|
2049
|
+
{
|
|
2050
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2051
|
+
useExisting: CheckboxValueAccessor,
|
|
2052
|
+
multi: true,
|
|
2053
|
+
},
|
|
2054
|
+
], usesInheritance: true, ngImport: i0 });
|
|
2055
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CheckboxValueAccessor, decorators: [{
|
|
2056
|
+
type: Directive,
|
|
2057
|
+
args: [{
|
|
2058
|
+
selector: 'six-checkbox',
|
|
2059
|
+
providers: [
|
|
2060
|
+
{
|
|
2061
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2062
|
+
useExisting: CheckboxValueAccessor,
|
|
2063
|
+
multi: true,
|
|
2064
|
+
},
|
|
2065
|
+
],
|
|
2066
|
+
}]
|
|
2067
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleChangeEvent: [{
|
|
2068
|
+
type: HostListener,
|
|
2069
|
+
args: ['change', ['$event.target']]
|
|
2070
|
+
}] } });
|
|
2071
|
+
|
|
2072
|
+
class RangeValueAccessor extends ValueAccessor {
|
|
2073
|
+
constructor(injector, el) {
|
|
2074
|
+
super(injector, el);
|
|
2075
|
+
}
|
|
2076
|
+
handleInputEvent(el) {
|
|
2077
|
+
this.handleValueChange(el, el.value);
|
|
2078
|
+
}
|
|
2079
|
+
registerOnChange(fn) {
|
|
2080
|
+
super.registerOnChange((value) => {
|
|
2081
|
+
fn(value === '' ? null : parseFloat(value));
|
|
2082
|
+
});
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
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 });
|
|
2086
|
+
RangeValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: RangeValueAccessor, selector: "six-range", host: { listeners: { "input": "handleInputEvent($event.target)" } }, providers: [
|
|
2087
|
+
{
|
|
2088
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2089
|
+
useExisting: RangeValueAccessor,
|
|
2090
|
+
multi: true,
|
|
2091
|
+
},
|
|
2092
|
+
], usesInheritance: true, ngImport: i0 });
|
|
2093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RangeValueAccessor, decorators: [{
|
|
2094
|
+
type: Directive,
|
|
2095
|
+
args: [{
|
|
2096
|
+
selector: 'six-range',
|
|
2097
|
+
providers: [
|
|
2098
|
+
{
|
|
2099
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2100
|
+
useExisting: RangeValueAccessor,
|
|
2101
|
+
multi: true,
|
|
2102
|
+
},
|
|
2103
|
+
],
|
|
2104
|
+
}]
|
|
2105
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleInputEvent: [{
|
|
2106
|
+
type: HostListener,
|
|
2107
|
+
args: ['input', ['$event.target']]
|
|
2108
|
+
}] } });
|
|
2109
|
+
|
|
2110
|
+
class SwitchValueAccessor extends ValueAccessor {
|
|
2111
|
+
constructor(injector, el) {
|
|
2112
|
+
super(injector, el);
|
|
2113
|
+
}
|
|
2114
|
+
handleChangeEvent(el) {
|
|
2115
|
+
this.handleValueChange(el, el.checked);
|
|
2116
|
+
}
|
|
2117
|
+
writeValue(value) {
|
|
2118
|
+
this.el.nativeElement.checked = value === true;
|
|
2119
|
+
this.updateValidation();
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
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 });
|
|
2123
|
+
SwitchValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SwitchValueAccessor, selector: "six-switch", host: { listeners: { "change": "handleChangeEvent($event.target)" } }, providers: [
|
|
2124
|
+
{
|
|
2125
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2126
|
+
useExisting: SwitchValueAccessor,
|
|
2127
|
+
multi: true,
|
|
2128
|
+
},
|
|
2129
|
+
], usesInheritance: true, ngImport: i0 });
|
|
2130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SwitchValueAccessor, decorators: [{
|
|
2131
|
+
type: Directive,
|
|
2132
|
+
args: [{
|
|
2133
|
+
selector: 'six-switch',
|
|
2134
|
+
providers: [
|
|
2135
|
+
{
|
|
2136
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2137
|
+
useExisting: SwitchValueAccessor,
|
|
2138
|
+
multi: true,
|
|
2139
|
+
},
|
|
2140
|
+
],
|
|
2141
|
+
}]
|
|
2142
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleChangeEvent: [{
|
|
2143
|
+
type: HostListener,
|
|
2144
|
+
args: ['change', ['$event.target']]
|
|
2145
|
+
}] } });
|
|
2146
|
+
|
|
2147
|
+
class TimepickerValueAccessor extends ValueAccessor {
|
|
2148
|
+
constructor(injector, el) {
|
|
2149
|
+
super(injector, el);
|
|
2150
|
+
}
|
|
2151
|
+
handleChangeEvent(el) {
|
|
2152
|
+
this.handleValueChange(el, el.value);
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
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 });
|
|
2156
|
+
TimepickerValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: TimepickerValueAccessor, selector: "six-timepicker", host: { listeners: { "change": "handleChangeEvent($event.target)" } }, providers: [
|
|
2157
|
+
{
|
|
2158
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2159
|
+
useExisting: TimepickerValueAccessor,
|
|
2160
|
+
multi: true,
|
|
2161
|
+
},
|
|
2162
|
+
], usesInheritance: true, ngImport: i0 });
|
|
2163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TimepickerValueAccessor, decorators: [{
|
|
2164
|
+
type: Directive,
|
|
2165
|
+
args: [{
|
|
2166
|
+
selector: 'six-timepicker',
|
|
2167
|
+
providers: [
|
|
2168
|
+
{
|
|
2169
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2170
|
+
useExisting: TimepickerValueAccessor,
|
|
2171
|
+
multi: true,
|
|
2172
|
+
},
|
|
2173
|
+
],
|
|
2174
|
+
}]
|
|
2175
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { handleChangeEvent: [{
|
|
2176
|
+
type: HostListener,
|
|
2177
|
+
args: ['change', ['$event.target']]
|
|
2178
|
+
}] } });
|
|
2179
|
+
|
|
2180
|
+
/**
|
|
2181
|
+
* Forked from https://github.com/ionic-team/ionic-framework/blob/main/packages/angular/common/src/directives/navigation/router-link-delegate.ts.
|
|
2182
|
+
*/
|
|
2183
|
+
class SixRouterLinkDirective {
|
|
2184
|
+
constructor(locationStrategy, elementRef, router, routerLinkDirective) {
|
|
2185
|
+
this.locationStrategy = locationStrategy;
|
|
2186
|
+
this.elementRef = elementRef;
|
|
2187
|
+
this.router = router;
|
|
2188
|
+
this.routerLinkDirective = routerLinkDirective;
|
|
2189
|
+
}
|
|
2190
|
+
ngOnInit() {
|
|
2191
|
+
this.updateTargetUrlAndHref();
|
|
2192
|
+
}
|
|
2193
|
+
ngOnChanges() {
|
|
2194
|
+
this.updateTargetUrlAndHref();
|
|
2195
|
+
}
|
|
2196
|
+
updateTargetUrlAndHref() {
|
|
2197
|
+
if (this.routerLinkDirective?.urlTree) {
|
|
2198
|
+
this.elementRef.nativeElement.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLinkDirective.urlTree));
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
SixRouterLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixRouterLinkDirective, deps: [{ token: i1$1.LocationStrategy }, { token: i0.ElementRef }, { token: i2.Router }, { token: i2.RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2203
|
+
SixRouterLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SixRouterLinkDirective, selector: "six-sidebar-item[routerLink],six-sidebar-item-group[routerLink],six-button[routerLink]", inputs: { routerLink: "routerLink", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", relativeTo: "relativeTo" }, usesOnChanges: true, ngImport: i0 });
|
|
2204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixRouterLinkDirective, decorators: [{
|
|
2205
|
+
type: Directive,
|
|
2206
|
+
args: [{
|
|
2207
|
+
selector: 'six-sidebar-item[routerLink],six-sidebar-item-group[routerLink],six-button[routerLink]',
|
|
2208
|
+
}]
|
|
2209
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocationStrategy }, { type: i0.ElementRef }, { type: i2.Router }, { type: i2.RouterLink, decorators: [{
|
|
2210
|
+
type: Optional
|
|
2211
|
+
}] }]; }, propDecorators: { routerLink: [{
|
|
2212
|
+
type: Input
|
|
2213
|
+
}], queryParams: [{
|
|
2214
|
+
type: Input
|
|
2215
|
+
}], fragment: [{
|
|
2216
|
+
type: Input
|
|
2217
|
+
}], queryParamsHandling: [{
|
|
2218
|
+
type: Input
|
|
2219
|
+
}], relativeTo: [{
|
|
2220
|
+
type: Input
|
|
2221
|
+
}] } });
|
|
2222
|
+
|
|
2223
|
+
class UiLibraryAngularModule {
|
|
2224
|
+
static forRoot(customValidationMessagesService) {
|
|
2225
|
+
return {
|
|
2226
|
+
ngModule: UiLibraryAngularModule,
|
|
2227
|
+
providers: [
|
|
2228
|
+
{
|
|
2229
|
+
provide: APP_INITIALIZER,
|
|
2230
|
+
useFactory: () => async () => defineCustomElements(),
|
|
2231
|
+
multi: true,
|
|
2232
|
+
},
|
|
2233
|
+
{ provide: ValidationMessagesService, useClass: customValidationMessagesService ?? ValidationMessagesService },
|
|
2234
|
+
],
|
|
2235
|
+
};
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
UiLibraryAngularModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2239
|
+
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,
|
|
2240
|
+
// value accessors
|
|
2241
|
+
TextValueAccessor,
|
|
2242
|
+
NumericValueAccessor,
|
|
2243
|
+
RadioValueAccessor,
|
|
2244
|
+
DatepickerValueAccessor,
|
|
2245
|
+
TimepickerValueAccessor,
|
|
2246
|
+
SelectValueAccessor,
|
|
2247
|
+
CheckboxValueAccessor,
|
|
2248
|
+
SwitchValueAccessor,
|
|
2249
|
+
RangeValueAccessor,
|
|
2250
|
+
// validators
|
|
2251
|
+
MinValidator,
|
|
2252
|
+
MaxValidator,
|
|
2253
|
+
MinDateValidator,
|
|
2254
|
+
MaxDateValidator,
|
|
2255
|
+
AllowedDatesValidator,
|
|
2256
|
+
// form helpers
|
|
2257
|
+
SixFormDirective,
|
|
2258
|
+
SixFormUtilDirective,
|
|
2259
|
+
// router link directive
|
|
2260
|
+
SixRouterLinkDirective], 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,
|
|
2261
|
+
// value accessors
|
|
2262
|
+
TextValueAccessor,
|
|
2263
|
+
NumericValueAccessor,
|
|
2264
|
+
RadioValueAccessor,
|
|
2265
|
+
DatepickerValueAccessor,
|
|
2266
|
+
TimepickerValueAccessor,
|
|
2267
|
+
SelectValueAccessor,
|
|
2268
|
+
CheckboxValueAccessor,
|
|
2269
|
+
SwitchValueAccessor,
|
|
2270
|
+
RangeValueAccessor,
|
|
2271
|
+
// validators
|
|
2272
|
+
MinValidator,
|
|
2273
|
+
MaxValidator,
|
|
2274
|
+
MinDateValidator,
|
|
2275
|
+
MaxDateValidator,
|
|
2276
|
+
AllowedDatesValidator,
|
|
2277
|
+
// form helpers
|
|
2278
|
+
SixFormDirective,
|
|
2279
|
+
SixFormUtilDirective,
|
|
2280
|
+
// router link directive
|
|
2281
|
+
SixRouterLinkDirective] });
|
|
2282
|
+
UiLibraryAngularModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule });
|
|
2283
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule, decorators: [{
|
|
2284
|
+
type: NgModule,
|
|
2285
|
+
args: [{
|
|
2286
|
+
declarations: [
|
|
2287
|
+
// proxies
|
|
2288
|
+
...DIRECTIVES,
|
|
2289
|
+
// value accessors
|
|
2290
|
+
TextValueAccessor,
|
|
2291
|
+
NumericValueAccessor,
|
|
2292
|
+
RadioValueAccessor,
|
|
2293
|
+
DatepickerValueAccessor,
|
|
2294
|
+
TimepickerValueAccessor,
|
|
2295
|
+
SelectValueAccessor,
|
|
2296
|
+
CheckboxValueAccessor,
|
|
2297
|
+
SwitchValueAccessor,
|
|
2298
|
+
RangeValueAccessor,
|
|
2299
|
+
// validators
|
|
2300
|
+
MinValidator,
|
|
2301
|
+
MaxValidator,
|
|
2302
|
+
MinDateValidator,
|
|
2303
|
+
MaxDateValidator,
|
|
2304
|
+
AllowedDatesValidator,
|
|
2305
|
+
// form helpers
|
|
2306
|
+
SixFormDirective,
|
|
2307
|
+
SixFormUtilDirective,
|
|
2308
|
+
// router link directive
|
|
2309
|
+
SixRouterLinkDirective,
|
|
2310
|
+
],
|
|
2311
|
+
imports: [],
|
|
2312
|
+
exports: [
|
|
2313
|
+
// proxies
|
|
2314
|
+
...DIRECTIVES,
|
|
2315
|
+
// value accessors
|
|
2316
|
+
TextValueAccessor,
|
|
2317
|
+
NumericValueAccessor,
|
|
2318
|
+
RadioValueAccessor,
|
|
2319
|
+
DatepickerValueAccessor,
|
|
2320
|
+
TimepickerValueAccessor,
|
|
2321
|
+
SelectValueAccessor,
|
|
2322
|
+
CheckboxValueAccessor,
|
|
2323
|
+
SwitchValueAccessor,
|
|
2324
|
+
RangeValueAccessor,
|
|
2325
|
+
// validators
|
|
2326
|
+
MinValidator,
|
|
2327
|
+
MaxValidator,
|
|
2328
|
+
MinDateValidator,
|
|
2329
|
+
MaxDateValidator,
|
|
2330
|
+
AllowedDatesValidator,
|
|
2331
|
+
// form helpers
|
|
2332
|
+
SixFormDirective,
|
|
2333
|
+
SixFormUtilDirective,
|
|
2334
|
+
// router link directive
|
|
2335
|
+
SixRouterLinkDirective,
|
|
2336
|
+
],
|
|
2337
|
+
}]
|
|
1457
2338
|
}] });
|
|
1458
2339
|
|
|
1459
2340
|
/*
|
|
@@ -1464,5 +2345,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1464
2345
|
* Generated bundle index. Do not edit.
|
|
1465
2346
|
*/
|
|
1466
2347
|
|
|
1467
|
-
export { DIRECTIVES, SetAttributes, SixAlert, SixAvatar, SixBadge, SixButton, SixCard, SixCheckbox, SixDatepicker, SixDetails, SixDialog, SixDrawer, SixDropdown, SixErrorPage, SixFileList, SixFileListItem, SixFileUpload, SixFooter,
|
|
2348
|
+
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, SixRouterLinkDirective, SixSearchField, SixSelect, SixSidebar, SixSidebarItem, SixSidebarItemGroup, SixSpinner, SixStageIndicator, SixSwitch, SixTab, SixTabGroup, SixTabPanel, SixTag, SixTextarea, SixTile, SixTimepicker, SixTooltip, SixUiLibraryValidators, SwitchValueAccessor, TextValueAccessor, TimepickerValueAccessor, UiLibraryAngularModule, ValidationMessagesService, ValueAccessor };
|
|
1468
2349
|
//# sourceMappingURL=six-group-ui-library-angular.mjs.map
|