@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.
Files changed (39) hide show
  1. package/esm2020/lib/control-value-accessors/checkbox-value-accessor.mjs +41 -0
  2. package/esm2020/lib/control-value-accessors/datepicker-value-accessor.mjs +37 -0
  3. package/esm2020/lib/control-value-accessors/numeric-value-accessor.mjs +42 -0
  4. package/esm2020/lib/control-value-accessors/radio-value-accessor.mjs +62 -0
  5. package/esm2020/lib/control-value-accessors/range-value-accessor.mjs +42 -0
  6. package/esm2020/lib/control-value-accessors/select-value-accessor.mjs +37 -0
  7. package/esm2020/lib/control-value-accessors/switch-value-accessor.mjs +41 -0
  8. package/esm2020/lib/control-value-accessors/text-value-accessor.mjs +37 -0
  9. package/esm2020/lib/control-value-accessors/timepicker-value-accessor.mjs +37 -0
  10. package/esm2020/lib/control-value-accessors/value-accessor.mjs +143 -0
  11. package/esm2020/lib/services/validation-messages.service.mjs +15 -0
  12. package/esm2020/lib/stencil-generated/components.mjs +34 -61
  13. package/esm2020/lib/stencil-generated/index.mjs +1 -2
  14. package/esm2020/lib/ui-library-angular.module.mjs +108 -19
  15. package/esm2020/lib/util/six-form-util.directive.mjs +48 -0
  16. package/esm2020/lib/validators/six-ui-library-validators.mjs +116 -0
  17. package/esm2020/public-api.mjs +19 -1
  18. package/fesm2015/six-group-ui-library-angular.mjs +784 -80
  19. package/fesm2015/six-group-ui-library-angular.mjs.map +1 -1
  20. package/fesm2020/six-group-ui-library-angular.mjs +781 -80
  21. package/fesm2020/six-group-ui-library-angular.mjs.map +1 -1
  22. package/lib/control-value-accessors/checkbox-value-accessor.d.ts +10 -0
  23. package/lib/control-value-accessors/datepicker-value-accessor.d.ts +9 -0
  24. package/lib/control-value-accessors/numeric-value-accessor.d.ts +10 -0
  25. package/lib/control-value-accessors/radio-value-accessor.d.ts +15 -0
  26. package/lib/control-value-accessors/range-value-accessor.d.ts +10 -0
  27. package/lib/control-value-accessors/select-value-accessor.d.ts +9 -0
  28. package/lib/control-value-accessors/switch-value-accessor.d.ts +10 -0
  29. package/lib/control-value-accessors/text-value-accessor.d.ts +9 -0
  30. package/lib/control-value-accessors/timepicker-value-accessor.d.ts +9 -0
  31. package/lib/control-value-accessors/value-accessor.d.ts +39 -0
  32. package/lib/services/validation-messages.service.d.ts +7 -0
  33. package/lib/stencil-generated/components.d.ts +8 -35
  34. package/lib/stencil-generated/index.d.ts +1 -1
  35. package/lib/ui-library-angular.module.d.ts +15 -1
  36. package/lib/util/six-form-util.directive.d.ts +10 -0
  37. package/lib/validators/six-ui-library-validators.d.ts +47 -0
  38. package/package.json +3 -3
  39. package/public-api.d.ts +13 -0
@@ -0,0 +1,10 @@
1
+ import { ElementRef, Injector } from '@angular/core';
2
+ import { ValueAccessor } from './value-accessor';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CheckboxValueAccessor extends ValueAccessor {
5
+ constructor(injector: Injector, el: ElementRef);
6
+ handleChangeEvent(el: HTMLSixCheckboxElement): void;
7
+ writeValue(value: any): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxValueAccessor, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CheckboxValueAccessor, "six-checkbox", never, {}, {}, never, never, false, never>;
10
+ }
@@ -0,0 +1,9 @@
1
+ import { ElementRef, Injector } from '@angular/core';
2
+ import { ValueAccessor } from './value-accessor';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DatepickerValueAccessor extends ValueAccessor {
5
+ constructor(injector: Injector, el: ElementRef);
6
+ handleChangeEvent(el: HTMLSixDatepickerElement): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerValueAccessor, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DatepickerValueAccessor, "six-datepicker", never, {}, {}, never, never, false, never>;
9
+ }
@@ -0,0 +1,10 @@
1
+ import { ElementRef, Injector } from '@angular/core';
2
+ import { ValueAccessor } from './value-accessor';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NumericValueAccessor extends ValueAccessor {
5
+ constructor(injector: Injector, el: ElementRef);
6
+ handleInputEvent(el: HTMLSixInputElement): void;
7
+ registerOnChange(fn: (_: number | null) => void): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<NumericValueAccessor, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NumericValueAccessor, "six-input[type=number]", never, {}, {}, never, never, false, never>;
10
+ }
@@ -0,0 +1,15 @@
1
+ import { ElementRef, Injector, OnInit } from '@angular/core';
2
+ import { ValueAccessor } from './value-accessor';
3
+ import * as i0 from "@angular/core";
4
+ export declare class RadioValueAccessor extends ValueAccessor implements OnInit {
5
+ constructor(injector: Injector, el: ElementRef);
6
+ value: any;
7
+ formControlName?: string;
8
+ name?: string;
9
+ handleChangeEvent(el: HTMLSixRadioElement): void;
10
+ ngOnInit(): void;
11
+ writeValue(value: any): void;
12
+ private checkName;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioValueAccessor, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RadioValueAccessor, "six-radio", never, { "value": "value"; "formControlName": "formControlName"; "name": "name"; }, {}, never, never, false, never>;
15
+ }
@@ -0,0 +1,10 @@
1
+ import { ElementRef, Injector } from '@angular/core';
2
+ import { ValueAccessor } from './value-accessor';
3
+ import * as i0 from "@angular/core";
4
+ export declare class RangeValueAccessor extends ValueAccessor {
5
+ constructor(injector: Injector, el: ElementRef);
6
+ handleInputEvent(el: HTMLSixRangeElement): void;
7
+ registerOnChange(fn: (_: number | null) => void): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<RangeValueAccessor, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RangeValueAccessor, "six-range", never, {}, {}, never, never, false, never>;
10
+ }
@@ -0,0 +1,9 @@
1
+ import { ElementRef, Injector } from '@angular/core';
2
+ import { ValueAccessor } from './value-accessor';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SelectValueAccessor extends ValueAccessor {
5
+ constructor(injector: Injector, el: ElementRef);
6
+ handleChangeEvent(el: HTMLSixSelectElement): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectValueAccessor, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SelectValueAccessor, "six-select", never, {}, {}, never, never, false, never>;
9
+ }
@@ -0,0 +1,10 @@
1
+ import { ElementRef, Injector } from '@angular/core';
2
+ import { ValueAccessor } from './value-accessor';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SwitchValueAccessor extends ValueAccessor {
5
+ constructor(injector: Injector, el: ElementRef);
6
+ handleChangeEvent(el: HTMLSixSwitchElement): void;
7
+ writeValue(value: any): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<SwitchValueAccessor, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SwitchValueAccessor, "six-switch", never, {}, {}, never, never, false, never>;
10
+ }
@@ -0,0 +1,9 @@
1
+ import { ElementRef, Injector } from '@angular/core';
2
+ import { ValueAccessor } from './value-accessor';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TextValueAccessor extends ValueAccessor {
5
+ constructor(injector: Injector, el: ElementRef);
6
+ handleInputEvent(el: HTMLSixInputElement): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<TextValueAccessor, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TextValueAccessor, "six-input:not([type=number]),six-textarea", never, {}, {}, never, never, false, never>;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { ElementRef, Injector } from '@angular/core';
2
+ import { ValueAccessor } from './value-accessor';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TimepickerValueAccessor extends ValueAccessor {
5
+ constructor(injector: Injector, el: ElementRef);
6
+ handleChangeEvent(el: HTMLSixTimepickerElement): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<TimepickerValueAccessor, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TimepickerValueAccessor, "six-timepicker", never, {}, {}, never, never, false, never>;
9
+ }
@@ -0,0 +1,39 @@
1
+ import { AfterViewInit, ElementRef, Injector, OnDestroy } from '@angular/core';
2
+ import { AbstractControl, ControlValueAccessor } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ValueAccessor implements ControlValueAccessor, AfterViewInit, OnDestroy {
5
+ protected injector: Injector;
6
+ protected el: ElementRef;
7
+ private statusChanges?;
8
+ private ngControl?;
9
+ private initialErrorText?;
10
+ private validationMessagesService;
11
+ constructor(injector: Injector, el: ElementRef);
12
+ private onChange;
13
+ private onTouched;
14
+ registerOnChange(fn: (value: any) => void): void;
15
+ registerOnTouched(fn: () => void): void;
16
+ writeValue(value: any): void;
17
+ /**
18
+ * Notifies the ControlValueAccessor of a change in the value of the control.
19
+ *
20
+ * This is called by each of the ValueAccessor directives when we want to update
21
+ * the status and validity of the form control. For example with text components this
22
+ * is called when the input event is fired. For select components this is called
23
+ * when the change event is fired.
24
+ *
25
+ * This also updates the form status on the element by setting the 'invalid' property to true/false.
26
+ *
27
+ * @param el The component element.
28
+ * @param value The new value of the control.
29
+ */
30
+ handleValueChange(el: HTMLElement, value: any): void;
31
+ _handleBlurEvent(el: any): void;
32
+ updateValidation(): void;
33
+ setDisabledState(isDisabled: boolean): void;
34
+ ngOnDestroy(): void;
35
+ ngAfterViewInit(): void;
36
+ getErrorText(control: AbstractControl): string;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<ValueAccessor, never>;
38
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ValueAccessor, never, never, {}, {}, never, never, false, never>;
39
+ }
@@ -0,0 +1,7 @@
1
+ import { Language, ValidationError } from '@six-group/ui-library';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ValidationMessagesService {
4
+ getErrorMessage(language: Language, error: ValidationError): string | undefined;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<ValidationMessagesService, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<ValidationMessagesService>;
7
+ }
@@ -16,9 +16,6 @@ import type { SixFileListDownloadPayload as ISixFileListItemSixFileListDownloadP
16
16
  import type { SixFileListRemovePayload as ISixFileListItemSixFileListRemovePayload } from '@six-group/ui-library';
17
17
  import type { SixFileUploadSuccessPayload as ISixFileUploadSixFileUploadSuccessPayload } from '@six-group/ui-library';
18
18
  import type { SixFileUploadFailurePayload as ISixFileUploadSixFileUploadFailurePayload } from '@six-group/ui-library';
19
- import type { SixFormSubmitPayload as ISixFormSixFormSubmitPayload } from '@six-group/ui-library';
20
- import type { SixFormChangePayload as ISixFormSixFormChangePayload } from '@six-group/ui-library';
21
- import type { EmptyPayload as ISixFormEmptyPayload } from '@six-group/ui-library';
22
19
  import type { EmptyPayload as ISixHeaderEmptyPayload } from '@six-group/ui-library';
23
20
  import type { SixHeaderAppSwitcherSelectPayload as ISixHeaderSixHeaderAppSwitcherSelectPayload } from '@six-group/ui-library';
24
21
  import type { SixHeaderProfileSelectPayload as ISixHeaderSixHeaderProfileSelectPayload } from '@six-group/ui-library';
@@ -128,7 +125,7 @@ export declare class SixCheckbox {
128
125
  protected el: HTMLElement;
129
126
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
130
127
  static ɵfac: i0.ɵɵFactoryDeclaration<SixCheckbox, never>;
131
- static ɵcmp: i0.ɵɵComponentDeclaration<SixCheckbox, "six-checkbox", never, { "checked": "checked"; "disabled": "disabled"; "errorOnBlur": "errorOnBlur"; "errorText": "errorText"; "indeterminate": "indeterminate"; "invalid": "invalid"; "label": "label"; "name": "name"; "required": "required"; "value": "value"; }, {}, never, ["*"], false, never>;
128
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixCheckbox, "six-checkbox", never, { "checked": "checked"; "disabled": "disabled"; "errorText": "errorText"; "indeterminate": "indeterminate"; "invalid": "invalid"; "label": "label"; "name": "name"; "required": "required"; "value": "value"; }, {}, never, ["*"], false, never>;
132
129
  }
133
130
  export declare interface SixCheckbox extends Components.SixCheckbox {
134
131
  /**
@@ -149,7 +146,7 @@ export declare class SixDatepicker {
149
146
  protected el: HTMLElement;
150
147
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
151
148
  static ɵfac: i0.ɵɵFactoryDeclaration<SixDatepicker, never>;
152
- static ɵcmp: i0.ɵɵComponentDeclaration<SixDatepicker, "six-datepicker", never, { "allowedDates": "allowedDates"; "clearable": "clearable"; "closeOnSelect": "closeOnSelect"; "containingElement": "containingElement"; "dateFormat": "dateFormat"; "debounce": "debounce"; "defaultDate": "defaultDate"; "disabled": "disabled"; "errorOnBlur": "errorOnBlur"; "errorText": "errorText"; "hoist": "hoist"; "iconPosition": "iconPosition"; "inline": "inline"; "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"; }, {}, never, ["*"], false, never>;
149
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixDatepicker, "six-datepicker", never, { "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"; }, {}, never, ["*"], false, never>;
153
150
  }
154
151
  export declare interface SixDatepicker extends Components.SixDatepicker {
155
152
  /**
@@ -356,30 +353,6 @@ export declare class SixFooter {
356
353
  }
357
354
  export declare interface SixFooter extends Components.SixFooter {
358
355
  }
359
- export declare class SixForm {
360
- protected z: NgZone;
361
- protected el: HTMLElement;
362
- constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
363
- static ɵfac: i0.ɵɵFactoryDeclaration<SixForm, never>;
364
- static ɵcmp: i0.ɵɵComponentDeclaration<SixForm, "six-form", never, { "novalidate": "novalidate"; }, {}, never, ["*"], false, never>;
365
- }
366
- export declare interface SixForm extends Components.SixForm {
367
- /**
368
- * Emitted when the form is submitted. This event will not be emitted if any form control inside of it is in an
369
- invalid state, unless the form has the `novalidate` attribute. Note that there is never a need to prevent this
370
- event, since it doen't send a GET or POST request like native forms. To "prevent" submission, use a conditional
371
- around the XHR request you use to submit the form's data with.
372
- */
373
- 'six-form-submit': EventEmitter<CustomEvent<ISixFormSixFormSubmitPayload>>;
374
- /**
375
- * Emitted when the control's value changes.
376
- */
377
- 'six-form-change': EventEmitter<CustomEvent<ISixFormSixFormChangePayload>>;
378
- /**
379
- * Emitted when the forms values are reset.
380
- */
381
- 'six-form-reset': EventEmitter<CustomEvent<ISixFormEmptyPayload>>;
382
- }
383
356
  export declare class SixGroupLabel {
384
357
  protected z: NgZone;
385
358
  protected el: HTMLElement;
@@ -445,7 +418,7 @@ export declare class SixInput {
445
418
  protected el: HTMLElement;
446
419
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
447
420
  static ɵfac: i0.ɵɵFactoryDeclaration<SixInput, never>;
448
- static ɵcmp: i0.ɵɵComponentDeclaration<SixInput, "six-input", never, { "autocapitalize": "autocapitalize"; "autocomplete": "autocomplete"; "autocorrect": "autocorrect"; "autofocus": "autofocus"; "clearable": "clearable"; "disabled": "disabled"; "errorOnBlur": "errorOnBlur"; "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"; }, {}, never, ["*"], false, never>;
421
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixInput, "six-input", never, { "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"; }, {}, never, ["*"], false, never>;
449
422
  }
450
423
  export declare interface SixInput extends Components.SixInput {
451
424
  /**
@@ -610,7 +583,7 @@ export declare class SixRange {
610
583
  protected el: HTMLElement;
611
584
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
612
585
  static ɵfac: i0.ɵɵFactoryDeclaration<SixRange, never>;
613
- static ɵcmp: i0.ɵɵComponentDeclaration<SixRange, "six-range", never, { "disabled": "disabled"; "errorOnBlur": "errorOnBlur"; "errorText": "errorText"; "helpText": "helpText"; "invalid": "invalid"; "label": "label"; "max": "max"; "min": "min"; "name": "name"; "required": "required"; "step": "step"; "tooltip": "tooltip"; "tooltipFormatter": "tooltipFormatter"; "value": "value"; }, {}, never, ["*"], false, never>;
586
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixRange, "six-range", never, { "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"; }, {}, never, ["*"], false, never>;
614
587
  }
615
588
  export declare interface SixRange extends Components.SixRange {
616
589
  /**
@@ -657,7 +630,7 @@ export declare class SixSelect {
657
630
  protected el: HTMLElement;
658
631
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
659
632
  static ɵfac: i0.ɵɵFactoryDeclaration<SixSelect, never>;
660
- static ɵcmp: i0.ɵɵComponentDeclaration<SixSelect, "six-select", never, { "asyncFilter": "asyncFilter"; "autocomplete": "autocomplete"; "clearable": "clearable"; "defaultValue": "defaultValue"; "disabled": "disabled"; "errorOnBlur": "errorOnBlur"; "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"; }, {}, never, ["*"], false, never>;
633
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixSelect, "six-select", never, { "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"; }, {}, never, ["*"], false, never>;
661
634
  }
662
635
  export declare interface SixSelect extends Components.SixSelect {
663
636
  /**
@@ -744,7 +717,7 @@ export declare class SixSwitch {
744
717
  protected el: HTMLElement;
745
718
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
746
719
  static ɵfac: i0.ɵɵFactoryDeclaration<SixSwitch, never>;
747
- static ɵcmp: i0.ɵɵComponentDeclaration<SixSwitch, "six-switch", never, { "checked": "checked"; "disabled": "disabled"; "invalid": "invalid"; "name": "name"; "required": "required"; "value": "value"; }, {}, never, ["*"], false, never>;
720
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixSwitch, "six-switch", never, { "checked": "checked"; "disabled": "disabled"; "errorText": "errorText"; "invalid": "invalid"; "label": "label"; "name": "name"; "required": "required"; "value": "value"; }, {}, never, ["*"], false, never>;
748
721
  }
749
722
  export declare interface SixSwitch extends Components.SixSwitch {
750
723
  /**
@@ -817,7 +790,7 @@ export declare class SixTextarea {
817
790
  protected el: HTMLElement;
818
791
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
819
792
  static ɵfac: i0.ɵɵFactoryDeclaration<SixTextarea, never>;
820
- static ɵcmp: i0.ɵɵComponentDeclaration<SixTextarea, "six-textarea", never, { "autocapitalize": "autocapitalize"; "autocomplete": "autocomplete"; "autocorrect": "autocorrect"; "autofocus": "autofocus"; "disabled": "disabled"; "errorOnBlur": "errorOnBlur"; "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"; }, {}, never, ["*"], false, never>;
793
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixTextarea, "six-textarea", never, { "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"; }, {}, never, ["*"], false, never>;
821
794
  }
822
795
  export declare interface SixTextarea extends Components.SixTextarea {
823
796
  /**
@@ -859,7 +832,7 @@ export declare class SixTimepicker {
859
832
  protected el: HTMLElement;
860
833
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
861
834
  static ɵfac: i0.ɵɵFactoryDeclaration<SixTimepicker, never>;
862
- static ɵcmp: i0.ɵɵComponentDeclaration<SixTimepicker, "six-timepicker", never, { "clearable": "clearable"; "debounce": "debounce"; "defaultTime": "defaultTime"; "disabled": "disabled"; "errorOnBlur": "errorOnBlur"; "errorText": "errorText"; "format": "format"; "hoist": "hoist"; "iconPosition": "iconPosition"; "inline": "inline"; "interval": "interval"; "label": "label"; "name": "name"; "open": "open"; "placeholder": "placeholder"; "placement": "placement"; "readonly": "readonly"; "required": "required"; "separator": "separator"; "size": "size"; "timeout": "timeout"; "value": "value"; }, {}, never, ["*"], false, never>;
835
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixTimepicker, "six-timepicker", never, { "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"; }, {}, never, ["*"], false, never>;
863
836
  }
864
837
  export declare interface SixTimepicker extends Components.SixTimepicker {
865
838
  /**
@@ -1,2 +1,2 @@
1
1
  import * as d from './components';
2
- export declare const DIRECTIVES: (typeof d.SetAttributes | typeof d.SixAlert | typeof d.SixAvatar | typeof d.SixBadge | typeof d.SixButton | typeof d.SixCard | typeof d.SixCheckbox | typeof d.SixDatepicker | typeof d.SixDetails | typeof d.SixDialog | typeof d.SixDrawer | typeof d.SixDropdown | typeof d.SixErrorPage | typeof d.SixFileList | typeof d.SixFileListItem | typeof d.SixFileUpload | typeof d.SixFooter | typeof d.SixForm | typeof d.SixGroupLabel | typeof d.SixHeader | typeof d.SixIcon | typeof d.SixIconButton | typeof d.SixInput | typeof d.SixItemPicker | typeof d.SixLanguageSwitcher | typeof d.SixLayoutGrid | typeof d.SixMainContainer | typeof d.SixMenu | typeof d.SixMenuDivider | typeof d.SixMenuItem | typeof d.SixMenuLabel | typeof d.SixPicto | typeof d.SixProgressBar | typeof d.SixProgressRing | typeof d.SixRadio | typeof d.SixRange | typeof d.SixRoot | typeof d.SixSearchField | typeof d.SixSelect | typeof d.SixSidebar | typeof d.SixSidebarItem | typeof d.SixSidebarItemGroup | typeof d.SixSpinner | typeof d.SixStageIndicator | typeof d.SixSwitch | typeof d.SixTab | typeof d.SixTabGroup | typeof d.SixTabPanel | typeof d.SixTag | typeof d.SixTextarea | typeof d.SixTile | typeof d.SixTimepicker | typeof d.SixTooltip)[];
2
+ export declare const DIRECTIVES: (typeof d.SetAttributes | typeof d.SixAlert | typeof d.SixAvatar | typeof d.SixBadge | typeof d.SixButton | typeof d.SixCard | typeof d.SixCheckbox | typeof d.SixDatepicker | typeof d.SixDetails | typeof d.SixDialog | typeof d.SixDrawer | typeof d.SixDropdown | typeof d.SixErrorPage | typeof d.SixFileList | typeof d.SixFileListItem | typeof d.SixFileUpload | typeof d.SixFooter | typeof d.SixGroupLabel | typeof d.SixHeader | typeof d.SixIcon | typeof d.SixIconButton | typeof d.SixInput | typeof d.SixItemPicker | typeof d.SixLanguageSwitcher | typeof d.SixLayoutGrid | typeof d.SixMainContainer | typeof d.SixMenu | typeof d.SixMenuDivider | typeof d.SixMenuItem | typeof d.SixMenuLabel | typeof d.SixPicto | typeof d.SixProgressBar | typeof d.SixProgressRing | typeof d.SixRadio | typeof d.SixRange | typeof d.SixRoot | typeof d.SixSearchField | typeof d.SixSelect | typeof d.SixSidebar | typeof d.SixSidebarItem | typeof d.SixSidebarItemGroup | typeof d.SixSpinner | typeof d.SixStageIndicator | typeof d.SixSwitch | typeof d.SixTab | typeof d.SixTabGroup | typeof d.SixTabPanel | typeof d.SixTag | typeof d.SixTextarea | typeof d.SixTile | typeof d.SixTimepicker | typeof d.SixTooltip)[];
@@ -1,7 +1,21 @@
1
+ import { ModuleWithProviders, Type } from '@angular/core';
2
+ import { ValidationMessagesService } from './services/validation-messages.service';
1
3
  import * as i0 from "@angular/core";
2
4
  import * as i1 from "./stencil-generated/components";
5
+ import * as i2 from "./control-value-accessors/text-value-accessor";
6
+ import * as i3 from "./control-value-accessors/numeric-value-accessor";
7
+ import * as i4 from "./control-value-accessors/radio-value-accessor";
8
+ import * as i5 from "./control-value-accessors/datepicker-value-accessor";
9
+ import * as i6 from "./control-value-accessors/timepicker-value-accessor";
10
+ import * as i7 from "./control-value-accessors/select-value-accessor";
11
+ import * as i8 from "./control-value-accessors/checkbox-value-accessor";
12
+ import * as i9 from "./control-value-accessors/switch-value-accessor";
13
+ import * as i10 from "./control-value-accessors/range-value-accessor";
14
+ import * as i11 from "./validators/six-ui-library-validators";
15
+ import * as i12 from "./util/six-form-util.directive";
3
16
  export declare class UiLibraryAngularModule {
17
+ static forRoot<T extends ValidationMessagesService>(customValidationMessagesService?: Type<T>): ModuleWithProviders<UiLibraryAngularModule>;
4
18
  static ɵfac: i0.ɵɵFactoryDeclaration<UiLibraryAngularModule, never>;
5
- static ɵmod: i0.ɵɵNgModuleDeclaration<UiLibraryAngularModule, [typeof i1.SetAttributes, typeof i1.SixAlert, typeof i1.SixAvatar, typeof i1.SixBadge, typeof i1.SixButton, typeof i1.SixCard, typeof i1.SixCheckbox, typeof i1.SixDatepicker, typeof i1.SixDetails, typeof i1.SixDialog, typeof i1.SixDrawer, typeof i1.SixDropdown, typeof i1.SixErrorPage, typeof i1.SixFileList, typeof i1.SixFileListItem, typeof i1.SixFileUpload, typeof i1.SixFooter, typeof i1.SixForm, typeof i1.SixGroupLabel, typeof i1.SixHeader, typeof i1.SixIcon, typeof i1.SixIconButton, typeof i1.SixInput, typeof i1.SixItemPicker, typeof i1.SixLanguageSwitcher, typeof i1.SixLayoutGrid, typeof i1.SixMainContainer, typeof i1.SixMenu, typeof i1.SixMenuDivider, typeof i1.SixMenuItem, typeof i1.SixMenuLabel, typeof i1.SixPicto, typeof i1.SixProgressBar, typeof i1.SixProgressRing, typeof i1.SixRadio, typeof i1.SixRange, typeof i1.SixRoot, typeof i1.SixSearchField, typeof i1.SixSelect, typeof i1.SixSidebar, typeof i1.SixSidebarItem, typeof i1.SixSidebarItemGroup, typeof i1.SixSpinner, typeof i1.SixStageIndicator, typeof i1.SixSwitch, typeof i1.SixTab, typeof i1.SixTabGroup, typeof i1.SixTabPanel, typeof i1.SixTag, typeof i1.SixTextarea, typeof i1.SixTile, typeof i1.SixTimepicker, typeof i1.SixTooltip], never, [typeof i1.SetAttributes, typeof i1.SixAlert, typeof i1.SixAvatar, typeof i1.SixBadge, typeof i1.SixButton, typeof i1.SixCard, typeof i1.SixCheckbox, typeof i1.SixDatepicker, typeof i1.SixDetails, typeof i1.SixDialog, typeof i1.SixDrawer, typeof i1.SixDropdown, typeof i1.SixErrorPage, typeof i1.SixFileList, typeof i1.SixFileListItem, typeof i1.SixFileUpload, typeof i1.SixFooter, typeof i1.SixForm, typeof i1.SixGroupLabel, typeof i1.SixHeader, typeof i1.SixIcon, typeof i1.SixIconButton, typeof i1.SixInput, typeof i1.SixItemPicker, typeof i1.SixLanguageSwitcher, typeof i1.SixLayoutGrid, typeof i1.SixMainContainer, typeof i1.SixMenu, typeof i1.SixMenuDivider, typeof i1.SixMenuItem, typeof i1.SixMenuLabel, typeof i1.SixPicto, typeof i1.SixProgressBar, typeof i1.SixProgressRing, typeof i1.SixRadio, typeof i1.SixRange, typeof i1.SixRoot, typeof i1.SixSearchField, typeof i1.SixSelect, typeof i1.SixSidebar, typeof i1.SixSidebarItem, typeof i1.SixSidebarItemGroup, typeof i1.SixSpinner, typeof i1.SixStageIndicator, typeof i1.SixSwitch, typeof i1.SixTab, typeof i1.SixTabGroup, typeof i1.SixTabPanel, typeof i1.SixTag, typeof i1.SixTextarea, typeof i1.SixTile, typeof i1.SixTimepicker, typeof i1.SixTooltip]>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UiLibraryAngularModule, [typeof i1.SetAttributes, typeof i1.SixAlert, typeof i1.SixAvatar, typeof i1.SixBadge, typeof i1.SixButton, typeof i1.SixCard, typeof i1.SixCheckbox, typeof i1.SixDatepicker, typeof i1.SixDetails, typeof i1.SixDialog, typeof i1.SixDrawer, typeof i1.SixDropdown, typeof i1.SixErrorPage, typeof i1.SixFileList, typeof i1.SixFileListItem, typeof i1.SixFileUpload, typeof i1.SixFooter, typeof i1.SixGroupLabel, typeof i1.SixHeader, typeof i1.SixIcon, typeof i1.SixIconButton, typeof i1.SixInput, typeof i1.SixItemPicker, typeof i1.SixLanguageSwitcher, typeof i1.SixLayoutGrid, typeof i1.SixMainContainer, typeof i1.SixMenu, typeof i1.SixMenuDivider, typeof i1.SixMenuItem, typeof i1.SixMenuLabel, typeof i1.SixPicto, typeof i1.SixProgressBar, typeof i1.SixProgressRing, typeof i1.SixRadio, typeof i1.SixRange, typeof i1.SixRoot, typeof i1.SixSearchField, typeof i1.SixSelect, typeof i1.SixSidebar, typeof i1.SixSidebarItem, typeof i1.SixSidebarItemGroup, typeof i1.SixSpinner, typeof i1.SixStageIndicator, typeof i1.SixSwitch, typeof i1.SixTab, typeof i1.SixTabGroup, typeof i1.SixTabPanel, typeof i1.SixTag, typeof i1.SixTextarea, typeof i1.SixTile, typeof i1.SixTimepicker, typeof i1.SixTooltip, typeof i2.TextValueAccessor, typeof i3.NumericValueAccessor, typeof i4.RadioValueAccessor, typeof i5.DatepickerValueAccessor, typeof i6.TimepickerValueAccessor, typeof i7.SelectValueAccessor, typeof i8.CheckboxValueAccessor, typeof i9.SwitchValueAccessor, typeof i10.RangeValueAccessor, typeof i11.MinValidator, typeof i11.MaxValidator, typeof i11.MinDateValidator, typeof i11.MaxDateValidator, typeof i11.AllowedDatesValidator, typeof i12.SixFormUtilDirective], never, [typeof i1.SetAttributes, typeof i1.SixAlert, typeof i1.SixAvatar, typeof i1.SixBadge, typeof i1.SixButton, typeof i1.SixCard, typeof i1.SixCheckbox, typeof i1.SixDatepicker, typeof i1.SixDetails, typeof i1.SixDialog, typeof i1.SixDrawer, typeof i1.SixDropdown, typeof i1.SixErrorPage, typeof i1.SixFileList, typeof i1.SixFileListItem, typeof i1.SixFileUpload, typeof i1.SixFooter, typeof i1.SixGroupLabel, typeof i1.SixHeader, typeof i1.SixIcon, typeof i1.SixIconButton, typeof i1.SixInput, typeof i1.SixItemPicker, typeof i1.SixLanguageSwitcher, typeof i1.SixLayoutGrid, typeof i1.SixMainContainer, typeof i1.SixMenu, typeof i1.SixMenuDivider, typeof i1.SixMenuItem, typeof i1.SixMenuLabel, typeof i1.SixPicto, typeof i1.SixProgressBar, typeof i1.SixProgressRing, typeof i1.SixRadio, typeof i1.SixRange, typeof i1.SixRoot, typeof i1.SixSearchField, typeof i1.SixSelect, typeof i1.SixSidebar, typeof i1.SixSidebarItem, typeof i1.SixSidebarItemGroup, typeof i1.SixSpinner, typeof i1.SixStageIndicator, typeof i1.SixSwitch, typeof i1.SixTab, typeof i1.SixTabGroup, typeof i1.SixTabPanel, typeof i1.SixTag, typeof i1.SixTextarea, typeof i1.SixTile, typeof i1.SixTimepicker, typeof i1.SixTooltip, typeof i2.TextValueAccessor, typeof i3.NumericValueAccessor, typeof i4.RadioValueAccessor, typeof i5.DatepickerValueAccessor, typeof i6.TimepickerValueAccessor, typeof i7.SelectValueAccessor, typeof i8.CheckboxValueAccessor, typeof i9.SwitchValueAccessor, typeof i10.RangeValueAccessor, typeof i11.MinValidator, typeof i11.MaxValidator, typeof i11.MinDateValidator, typeof i11.MaxDateValidator, typeof i11.AllowedDatesValidator, typeof i12.SixFormUtilDirective]>;
6
20
  static ɵinj: i0.ɵɵInjectorDeclaration<UiLibraryAngularModule>;
7
21
  }
@@ -0,0 +1,10 @@
1
+ import { ElementRef, Injector } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SixFormUtilDirective {
4
+ private elementRef;
5
+ private injector;
6
+ constructor(elementRef: ElementRef<HTMLElement>, injector: Injector);
7
+ focusInvalidField(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<SixFormUtilDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SixFormUtilDirective, "[sixFormUtil]", never, {}, {}, never, never, false, never>;
10
+ }
@@ -0,0 +1,47 @@
1
+ import { AbstractControl, Validator, ValidatorFn } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SixUiLibraryValidators {
4
+ static minDate(mindate: Date): ValidatorFn;
5
+ static maxDate(maxdate: Date): ValidatorFn;
6
+ static allowedDates(allowedDates?: (date: Date) => boolean): ValidatorFn;
7
+ }
8
+ export declare class MinDateValidator implements Validator {
9
+ mindate: Date;
10
+ validate(control: AbstractControl): {
11
+ [key: string]: any;
12
+ } | null;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<MinDateValidator, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MinDateValidator, "six-datepicker[min]", never, { "mindate": "mindate"; }, {}, never, never, false, never>;
15
+ }
16
+ export declare class MaxDateValidator implements Validator {
17
+ maxdate: Date;
18
+ validate(control: AbstractControl): {
19
+ [key: string]: any;
20
+ } | null;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<MaxDateValidator, never>;
22
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MaxDateValidator, "six-datepicker[max]", never, { "maxdate": "maxdate"; }, {}, never, never, false, never>;
23
+ }
24
+ export declare class AllowedDatesValidator implements Validator {
25
+ allowedDates: (date: Date) => boolean;
26
+ validate(control: AbstractControl): {
27
+ [key: string]: any;
28
+ } | null;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<AllowedDatesValidator, never>;
30
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AllowedDatesValidator, "six-datepicker[allowedDates]", never, { "allowedDates": "allowedDates"; }, {}, never, never, false, never>;
31
+ }
32
+ export declare class MinValidator implements Validator {
33
+ min: number | string;
34
+ validate(control: AbstractControl): {
35
+ [key: string]: any;
36
+ } | null;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<MinValidator, never>;
38
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MinValidator, "six-input[type=number][min]", never, { "min": "min"; }, {}, never, never, false, never>;
39
+ }
40
+ export declare class MaxValidator implements Validator {
41
+ max: number | string;
42
+ validate(control: AbstractControl): {
43
+ [key: string]: any;
44
+ } | null;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<MaxValidator, never>;
46
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MaxValidator, "six-input[type=number][max]", never, { "max": "max"; }, {}, never, never, false, never>;
47
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@six-group/ui-library-angular",
3
- "version": "0.0.0-insider.d16ec8e",
3
+ "version": "0.0.0-insider.db2b416",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
- "@angular/common": "^15.2.0",
7
- "@angular/core": "^15.2.0",
6
+ "@angular/common": ">=14.0.0",
7
+ "@angular/core": ">=14.0.0",
8
8
  "@six-group/ui-library": "*"
9
9
  },
10
10
  "dependencies": {
package/public-api.d.ts CHANGED
@@ -1,3 +1,16 @@
1
1
  export * from './lib/ui-library-angular.module';
2
2
  export { DIRECTIVES } from './lib/stencil-generated';
3
3
  export * from './lib/stencil-generated/components';
4
+ export * from './lib/control-value-accessors/value-accessor';
5
+ export * from './lib/control-value-accessors/text-value-accessor';
6
+ export * from './lib/control-value-accessors/numeric-value-accessor';
7
+ export * from './lib/control-value-accessors/radio-value-accessor';
8
+ export * from './lib/control-value-accessors/datepicker-value-accessor';
9
+ export * from './lib/control-value-accessors/timepicker-value-accessor';
10
+ export * from './lib/control-value-accessors/select-value-accessor';
11
+ export * from './lib/control-value-accessors/checkbox-value-accessor';
12
+ export * from './lib/control-value-accessors/switch-value-accessor';
13
+ export * from './lib/control-value-accessors/range-value-accessor';
14
+ export * from './lib/validators/six-ui-library-validators';
15
+ export * from './lib/util/six-form-util.directive';
16
+ export * from './lib/services/validation-messages.service';