@six-group/ui-library-angular 0.0.0-insider.db2b416 → 0.0.0-insider.ddecb41

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.
@@ -33,7 +33,7 @@ export declare class ValueAccessor implements ControlValueAccessor, AfterViewIni
33
33
  setDisabledState(isDisabled: boolean): void;
34
34
  ngOnDestroy(): void;
35
35
  ngAfterViewInit(): void;
36
- getErrorText(control: AbstractControl): string;
36
+ getErrorTexts(control: AbstractControl): string[];
37
37
  static ɵfac: i0.ɵɵFactoryDeclaration<ValueAccessor, never>;
38
38
  static ɵdir: i0.ɵɵDirectiveDeclaration<ValueAccessor, never, never, {}, {}, never, never, false, never>;
39
39
  }
@@ -0,0 +1,71 @@
1
+ import { ElementRef, EventEmitter } from '@angular/core';
2
+ import { FormGroupDirective } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * This directive intercepts the ngSubmit event of an Angular form and introduces
6
+ * a supplementary event named sixSubmit. The sixSubmit event is triggered exclusively
7
+ * when the form is valid. In cases where the form is considered invalid, this directive
8
+ * takes proactive actions by marking all form controls as touched and dirty. Additionally,
9
+ * it shifts the focus to the initial invalid form element, facilitating quick error
10
+ * resolution.
11
+ *
12
+ * To utilize this directive, apply it to an Angular form.
13
+ * ```html
14
+ * <form [formGroup]="form" sixForm (sixSubmit)="onSubmit($event)">
15
+ * <!-- form content -->
16
+ * </form>
17
+ * ```
18
+ *
19
+ * For users needing greater flexibility in determining when error messages are displayed,
20
+ * or for those who prefer not to rely solely on the form submission event,
21
+ * an alternative is to use the SixFormUtilDirective.
22
+ */
23
+ export declare class SixFormDirective {
24
+ private elementRef;
25
+ private formGroupDirective;
26
+ /**
27
+ * Emits an event when the form is valid and the form submission has been triggered.
28
+ */
29
+ sixSubmit: EventEmitter<SubmitEvent>;
30
+ onNgSubmit(event: SubmitEvent): void;
31
+ constructor(elementRef: ElementRef<HTMLElement>, formGroupDirective: FormGroupDirective);
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<SixFormDirective, never>;
33
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SixFormDirective, "form[sixForm]", never, {}, { "sixSubmit": "sixSubmit"; }, never, never, false, never>;
34
+ }
35
+ /**
36
+ * This directive provides a utility method, that marks all form controls
37
+ * as touched and dirty, and focuses the first invalid form element.
38
+ *
39
+ * To utilize this directive, apply it to an Angular form.
40
+ * ```html
41
+ * <form [formGroup]="form" sixFormUtil (ngSubmit)="onSubmit($event)">
42
+ * <!-- form content -->
43
+ * </form>
44
+ * ```
45
+ *
46
+ * Then, get a reference to the directive and invoke `focusInvalidField()` if the
47
+ * form is invalid:
48
+ * ```ts
49
+ * @ViewChild(SixFormUtilDirective) sixFormUtil!: SixFormUtilDirective;
50
+ * // ...
51
+ * onSubmit() {
52
+ * if (this.form.invalid) {
53
+ * this.sixFormUtil.focusInvalidField();
54
+ * } else {
55
+ * // ...
56
+ * }
57
+ * }
58
+ * ```
59
+ */
60
+ export declare class SixFormUtilDirective {
61
+ private elementRef;
62
+ private formGroupDirective;
63
+ constructor(elementRef: ElementRef<HTMLElement>, formGroupDirective: FormGroupDirective);
64
+ /** markAllControlsAsDirty(Object.values(formGroup.controls));
65
+ * Marks all form controls as touched and dirty, and focuses the first
66
+ * invalid form element.
67
+ */
68
+ focusInvalidField(): void;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<SixFormUtilDirective, never>;
70
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SixFormUtilDirective, "[sixFormUtil]", never, {}, {}, never, never, false, never>;
71
+ }
@@ -125,7 +125,7 @@ export declare class SixCheckbox {
125
125
  protected el: HTMLElement;
126
126
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
127
127
  static ɵfac: i0.ɵɵFactoryDeclaration<SixCheckbox, 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>;
128
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixCheckbox, "six-checkbox", never, { "checked": "checked"; "disabled": "disabled"; "errorText": "errorText"; "errorTextCount": "errorTextCount"; "indeterminate": "indeterminate"; "invalid": "invalid"; "label": "label"; "name": "name"; "required": "required"; "value": "value"; }, {}, never, ["*"], false, never>;
129
129
  }
130
130
  export declare interface SixCheckbox extends Components.SixCheckbox {
131
131
  /**
@@ -146,7 +146,7 @@ export declare class SixDatepicker {
146
146
  protected el: HTMLElement;
147
147
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
148
148
  static ɵfac: i0.ɵɵFactoryDeclaration<SixDatepicker, 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>;
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"; "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"; }, {}, never, ["*"], false, never>;
150
150
  }
151
151
  export declare interface SixDatepicker extends Components.SixDatepicker {
152
152
  /**
@@ -292,6 +292,15 @@ export declare interface SixDropdown extends Components.SixDropdown {
292
292
  */
293
293
  'six-dropdown-scroll': EventEmitter<CustomEvent<ISixDropdownSixDropdownScrollPayload>>;
294
294
  }
295
+ export declare class SixError {
296
+ protected z: NgZone;
297
+ protected el: HTMLElement;
298
+ constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
299
+ static ɵfac: i0.ɵɵFactoryDeclaration<SixError, never>;
300
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixError, "six-error", never, {}, {}, never, ["*"], false, never>;
301
+ }
302
+ export declare interface SixError extends Components.SixError {
303
+ }
295
304
  export declare class SixErrorPage {
296
305
  protected z: NgZone;
297
306
  protected el: HTMLElement;
@@ -418,7 +427,7 @@ export declare class SixInput {
418
427
  protected el: HTMLElement;
419
428
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
420
429
  static ɵfac: i0.ɵɵFactoryDeclaration<SixInput, 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>;
430
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixInput, "six-input", never, { "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"; }, {}, never, ["*"], false, never>;
422
431
  }
423
432
  export declare interface SixInput extends Components.SixInput {
424
433
  /**
@@ -583,7 +592,7 @@ export declare class SixRange {
583
592
  protected el: HTMLElement;
584
593
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
585
594
  static ɵfac: i0.ɵɵFactoryDeclaration<SixRange, 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>;
595
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixRange, "six-range", never, { "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"; }, {}, never, ["*"], false, never>;
587
596
  }
588
597
  export declare interface SixRange extends Components.SixRange {
589
598
  /**
@@ -630,7 +639,7 @@ export declare class SixSelect {
630
639
  protected el: HTMLElement;
631
640
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
632
641
  static ɵfac: i0.ɵɵFactoryDeclaration<SixSelect, 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>;
642
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixSelect, "six-select", never, { "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"; }, {}, never, ["*"], false, never>;
634
643
  }
635
644
  export declare interface SixSelect extends Components.SixSelect {
636
645
  /**
@@ -717,7 +726,7 @@ export declare class SixSwitch {
717
726
  protected el: HTMLElement;
718
727
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
719
728
  static ɵfac: i0.ɵɵFactoryDeclaration<SixSwitch, 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>;
729
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixSwitch, "six-switch", never, { "checked": "checked"; "disabled": "disabled"; "errorText": "errorText"; "errorTextCount": "errorTextCount"; "invalid": "invalid"; "label": "label"; "name": "name"; "required": "required"; "value": "value"; }, {}, never, ["*"], false, never>;
721
730
  }
722
731
  export declare interface SixSwitch extends Components.SixSwitch {
723
732
  /**
@@ -790,7 +799,7 @@ export declare class SixTextarea {
790
799
  protected el: HTMLElement;
791
800
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
792
801
  static ɵfac: i0.ɵɵFactoryDeclaration<SixTextarea, 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>;
802
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixTextarea, "six-textarea", never, { "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"; }, {}, never, ["*"], false, never>;
794
803
  }
795
804
  export declare interface SixTextarea extends Components.SixTextarea {
796
805
  /**
@@ -832,7 +841,7 @@ export declare class SixTimepicker {
832
841
  protected el: HTMLElement;
833
842
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
834
843
  static ɵfac: i0.ɵɵFactoryDeclaration<SixTimepicker, 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>;
844
+ static ɵcmp: i0.ɵɵComponentDeclaration<SixTimepicker, "six-timepicker", never, { "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"; }, {}, never, ["*"], false, never>;
836
845
  }
837
846
  export declare interface SixTimepicker extends Components.SixTimepicker {
838
847
  /**
@@ -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.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.SixError | 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)[];
@@ -12,10 +12,10 @@ import * as i8 from "./control-value-accessors/checkbox-value-accessor";
12
12
  import * as i9 from "./control-value-accessors/switch-value-accessor";
13
13
  import * as i10 from "./control-value-accessors/range-value-accessor";
14
14
  import * as i11 from "./validators/six-ui-library-validators";
15
- import * as i12 from "./util/six-form-util.directive";
15
+ import * as i12 from "./form/six-form.directive";
16
16
  export declare class UiLibraryAngularModule {
17
17
  static forRoot<T extends ValidationMessagesService>(customValidationMessagesService?: Type<T>): ModuleWithProviders<UiLibraryAngularModule>;
18
18
  static ɵfac: i0.ɵɵFactoryDeclaration<UiLibraryAngularModule, never>;
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]>;
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.SixError, 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.SixFormDirective, 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.SixError, 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.SixFormDirective, typeof i12.SixFormUtilDirective]>;
20
20
  static ɵinj: i0.ɵɵInjectorDeclaration<UiLibraryAngularModule>;
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@six-group/ui-library-angular",
3
- "version": "0.0.0-insider.db2b416",
3
+ "version": "0.0.0-insider.ddecb41",
4
+ "description": "Angular wrapper components for @six-group/ui-library",
4
5
  "private": false,
5
6
  "peerDependencies": {
6
7
  "@angular/common": ">=14.0.0",
@@ -11,6 +12,9 @@
11
12
  "tslib": "^2.3.0"
12
13
  },
13
14
  "sideEffects": false,
15
+ "engines": {
16
+ "node": ">=16.0.0"
17
+ },
14
18
  "module": "fesm2015/six-group-ui-library-angular.mjs",
15
19
  "es2020": "fesm2020/six-group-ui-library-angular.mjs",
16
20
  "esm2020": "esm2020/six-group-ui-library-angular.mjs",
package/public-api.d.ts CHANGED
@@ -12,5 +12,5 @@ export * from './lib/control-value-accessors/checkbox-value-accessor';
12
12
  export * from './lib/control-value-accessors/switch-value-accessor';
13
13
  export * from './lib/control-value-accessors/range-value-accessor';
14
14
  export * from './lib/validators/six-ui-library-validators';
15
- export * from './lib/util/six-form-util.directive';
15
+ export * from './lib/form/six-form.directive';
16
16
  export * from './lib/services/validation-messages.service';
@@ -1,48 +0,0 @@
1
- import { Directive } from '@angular/core';
2
- import { FormArray, FormControl, FormGroup, FormGroupDirective } from '@angular/forms';
3
- import * as i0 from "@angular/core";
4
- export class SixFormUtilDirective {
5
- constructor(elementRef, injector) {
6
- this.elementRef = elementRef;
7
- this.injector = injector;
8
- }
9
- focusInvalidField() {
10
- const formGroupDirective = this.injector.get(FormGroupDirective);
11
- if (formGroupDirective) {
12
- formGroupDirective.form.markAllAsTouched();
13
- markAllAsDirty(formGroupDirective.form);
14
- const invalidField = this.elementRef.nativeElement.querySelector('.ng-invalid');
15
- if (typeof invalidField?.setFocus === 'function') {
16
- invalidField.setFocus();
17
- }
18
- else if (typeof invalidField?.focus === 'function') {
19
- invalidField?.focus();
20
- }
21
- }
22
- }
23
- }
24
- SixFormUtilDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormUtilDirective, deps: [{ token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
25
- SixFormUtilDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SixFormUtilDirective, selector: "[sixFormUtil]", ngImport: i0 });
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixFormUtilDirective, decorators: [{
27
- type: Directive,
28
- args: [{
29
- selector: '[sixFormUtil]',
30
- }]
31
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }]; } });
32
- function markAllAsDirty(formGroup) {
33
- function markAllControlsAsDirty(controls) {
34
- controls.forEach((control) => {
35
- if (control instanceof FormControl) {
36
- control.markAsDirty({ onlySelf: true });
37
- }
38
- else if (control instanceof FormGroup) {
39
- markAllControlsAsDirty(Object.values(control.controls));
40
- }
41
- else if (control instanceof FormArray) {
42
- markAllControlsAsDirty(control.controls);
43
- }
44
- });
45
- }
46
- markAllControlsAsDirty(Object.values(formGroup.controls));
47
- }
48
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2l4LWZvcm0tdXRpbC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL3V0aWwvc2l4LWZvcm0tdXRpbC5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBd0IsTUFBTSxlQUFlLENBQUM7QUFDaEUsT0FBTyxFQUFtQixTQUFTLEVBQUUsV0FBVyxFQUFFLFNBQVMsRUFBRSxrQkFBa0IsRUFBRSxNQUFNLGdC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AgIG1hcmtBbGxDb250cm9sc0FzRGlydHkoT2JqZWN0LnZhbHVlcyhjb250cm9sLmNvbnRyb2xzKSk7XG4gICAgICB9IGVsc2UgaWYgKGNvbnRyb2wgaW5zdGFuY2VvZiBGb3JtQXJyYXkpIHtcbiAgICAgICAgbWFya0FsbENvbnRyb2xzQXNEaXJ0eShjb250cm9sLmNvbnRyb2xzKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxuICBtYXJrQWxsQ29udHJvbHNBc0RpcnR5KE9iamVjdC52YWx1ZXMoZm9ybUdyb3VwLmNvbnRyb2xzKSk7XG59XG4iXX0=
@@ -1,10 +0,0 @@
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
- }