@six-group/ui-library-angular 0.0.0-insider.ebd822a → 0.0.0-insider.ecf3d8c

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 (37) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +6 -22
  3. package/fesm2022/six-group-ui-library-angular.mjs +2825 -0
  4. package/fesm2022/six-group-ui-library-angular.mjs.map +1 -0
  5. package/lib/control-value-accessors/checkbox-value-accessor.d.ts +10 -0
  6. package/lib/control-value-accessors/date-value-accessor.d.ts +10 -0
  7. package/lib/control-value-accessors/datepicker-value-accessor.d.ts +9 -0
  8. package/lib/control-value-accessors/numeric-value-accessor.d.ts +10 -0
  9. package/lib/control-value-accessors/radio-value-accessor.d.ts +15 -0
  10. package/lib/control-value-accessors/range-value-accessor.d.ts +10 -0
  11. package/lib/control-value-accessors/select-value-accessor.d.ts +9 -0
  12. package/lib/control-value-accessors/switch-value-accessor.d.ts +10 -0
  13. package/lib/control-value-accessors/text-value-accessor.d.ts +9 -0
  14. package/lib/control-value-accessors/timepicker-value-accessor.d.ts +9 -0
  15. package/lib/control-value-accessors/value-accessor.d.ts +41 -0
  16. package/lib/form/six-form.directive.d.ts +71 -0
  17. package/lib/link/six-router-link.directive.d.ts +26 -0
  18. package/lib/services/alert.service.d.ts +11 -0
  19. package/lib/services/validation-messages.service.d.ts +7 -0
  20. package/lib/sidebar/active-sidebar.directive.d.ts +59 -0
  21. package/lib/stencil-generated/components.d.ts +171 -186
  22. package/lib/stencil-generated/index.d.ts +1 -1
  23. package/lib/ui-library-angular-config.d.ts +6 -0
  24. package/lib/ui-library-angular.module.d.ts +19 -1
  25. package/lib/validators/six-ui-library-validators.d.ts +74 -0
  26. package/package.json +11 -13
  27. package/public-api.d.ts +17 -0
  28. package/esm2020/lib/stencil-generated/angular-component-lib/utils.mjs +0 -51
  29. package/esm2020/lib/stencil-generated/components.mjs +0 -1376
  30. package/esm2020/lib/stencil-generated/index.mjs +0 -57
  31. package/esm2020/lib/ui-library-angular.module.mjs +0 -34
  32. package/esm2020/public-api.mjs +0 -7
  33. package/esm2020/six-group-ui-library-angular.mjs +0 -5
  34. package/fesm2015/six-group-ui-library-angular.mjs +0 -1468
  35. package/fesm2015/six-group-ui-library-angular.mjs.map +0 -1
  36. package/fesm2020/six-group-ui-library-angular.mjs +0 -1468
  37. package/fesm2020/six-group-ui-library-angular.mjs.map +0 -1
@@ -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,41 @@
1
+ import { AfterViewInit, ElementRef, Injector, OnDestroy } from '@angular/core';
2
+ import { AbstractControl, ControlValueAccessor } from '@angular/forms';
3
+ import { UiLibraryConfig } from '../ui-library-angular-config';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ValueAccessor implements ControlValueAccessor, AfterViewInit, OnDestroy {
6
+ protected injector: Injector;
7
+ protected el: ElementRef;
8
+ private statusChanges?;
9
+ private ngControl?;
10
+ private initialErrorText?;
11
+ private validationMessagesService;
12
+ protected config: UiLibraryConfig;
13
+ constructor(injector: Injector, el: ElementRef);
14
+ private onChange;
15
+ private onTouched;
16
+ registerOnChange(fn: (value: any) => void): void;
17
+ registerOnTouched(fn: () => void): void;
18
+ writeValue(value: any): void;
19
+ /**
20
+ * Notifies the ControlValueAccessor of a change in the value of the control.
21
+ *
22
+ * This is called by each of the ValueAccessor directives when we want to update
23
+ * the status and validity of the form control. For example with text components this
24
+ * is called when the input event is fired. For select components this is called
25
+ * when the change event is fired.
26
+ *
27
+ * This also updates the form status on the element by setting the 'invalid' property to true/false.
28
+ *
29
+ * @param el The component element.
30
+ * @param value The new value of the control.
31
+ */
32
+ handleValueChange(el: HTMLElement, value: any): void;
33
+ _handleBlurEvent(el: any): void;
34
+ updateValidation(): void;
35
+ setDisabledState(isDisabled: boolean): void;
36
+ ngOnDestroy(): void;
37
+ ngAfterViewInit(): void;
38
+ getErrorTexts(control: AbstractControl): string[];
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<ValueAccessor, never>;
40
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ValueAccessor, never, never, {}, {}, never, never, true, never>;
41
+ }
@@ -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
+ }
@@ -0,0 +1,26 @@
1
+ import { ElementRef, OnChanges, OnInit, Renderer2 } from '@angular/core';
2
+ import { Router, RouterLink } from '@angular/router';
3
+ import { LocationStrategy } from '@angular/common';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Forked from https://github.com/ionic-team/ionic-framework/blob/main/packages/angular/common/src/directives/navigation/router-link-delegate.ts.
7
+ */
8
+ export declare class SixRouterLinkDirective implements OnInit, OnChanges {
9
+ private locationStrategy;
10
+ private elementRef;
11
+ private router;
12
+ private renderer;
13
+ private routerLinkDirective?;
14
+ constructor(locationStrategy: LocationStrategy, elementRef: ElementRef, router: Router, renderer: Renderer2, routerLinkDirective?: RouterLink | undefined);
15
+ onClick(event: UIEvent): void;
16
+ routerLink?: any;
17
+ queryParams?: any;
18
+ fragment?: any;
19
+ queryParamsHandling?: any;
20
+ relativeTo?: any;
21
+ ngOnInit(): void;
22
+ ngOnChanges(): void;
23
+ private updateTargetUrlAndHref;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<SixRouterLinkDirective, [null, null, null, null, { optional: true; }]>;
25
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SixRouterLinkDirective, "six-sidebar-item[routerLink],six-sidebar-item-group[routerLink],six-button[routerLink],six-icon-button[routerLink]", never, { "routerLink": { "alias": "routerLink"; "required": false; }; "queryParams": { "alias": "queryParams"; "required": false; }; "fragment": { "alias": "fragment"; "required": false; }; "queryParamsHandling": { "alias": "queryParamsHandling"; "required": false; }; "relativeTo": { "alias": "relativeTo"; "required": false; }; }, {}, never, never, false, never>;
26
+ }
@@ -0,0 +1,11 @@
1
+ import { AlertType } from '@six-group/ui-library';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AlertService {
4
+ private ngZone;
5
+ /**
6
+ * Displays an alert as a toast notification.
7
+ */
8
+ showAlert(message: string, alertType?: AlertType, duration?: number, iconName?: string): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<AlertService>;
11
+ }
@@ -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
+ }
@@ -0,0 +1,59 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/router";
3
+ /**
4
+ * Enables Angular router integration for the six-sidebar component.
5
+ *
6
+ * When this directive is added to a six-sidebar component using the 'sixRouterLinkActive' attribute,
7
+ * it activates automatic route-based selection for sidebar items and groups.
8
+ *
9
+ * @recommended Add this directive to enable automatic route-based navigation in sidebars.
10
+ *
11
+ * @example
12
+ * ```html
13
+ * <six-sidebar sixRouterLinkActive>
14
+ * <six-sidebar-item routerLink="/home">Home</six-sidebar-item>
15
+ * <six-sidebar-item-group>
16
+ * <six-sidebar-item routerLink="/settings/profile">Profile</six-sidebar-item>
17
+ * </six-sidebar-item-group>
18
+ * </six-sidebar>
19
+ * ```
20
+ */
21
+ export declare class ActiveSidebarDirective {
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<ActiveSidebarDirective, never>;
23
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ActiveSidebarDirective, "six-sidebar[sixRouterLinkActive]", never, {}, {}, never, never, false, never>;
24
+ }
25
+ /**
26
+ * Enhances six-sidebar-item with Angular router integration.
27
+ *
28
+ * This directive automatically manages the 'selected' state of sidebar items based on the current route.
29
+ * When used with ActiveSidebarDirective, it switches from manual selection to route-based selection.
30
+ *
31
+ * @requires RouterLinkActive
32
+ * @optional ActiveSidebarDirective - If present, enables route-based selection
33
+ */
34
+ export declare class ActiveSidebarItemDirective {
35
+ private routerLinkActive;
36
+ private sidebarItem;
37
+ private activeSidebarDirective;
38
+ get selected(): boolean;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<ActiveSidebarItemDirective, never>;
40
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ActiveSidebarItemDirective, "six-sidebar-item", never, {}, {}, never, never, false, [{ directive: typeof i1.RouterLinkActive; inputs: {}; outputs: {}; }]>;
41
+ }
42
+ /**
43
+ * Enhances six-sidebar-item-group with Angular router integration.
44
+ *
45
+ * This directive automatically manages the 'open' state of sidebar groups based on the active route.
46
+ * When a child route is active, the group automatically expands to show the active item.
47
+ *
48
+ * @requires RouterLinkActive
49
+ * @optional ActiveSidebarDirective - If present, enables route-based expansion
50
+ */
51
+ export declare class ActiveSidebarItemGroupDirective {
52
+ private routerLinkActive;
53
+ private sidebarItemGroup;
54
+ private activeSidebarDirective;
55
+ private sidebarItems;
56
+ get open(): boolean;
57
+ static ɵfac: i0.ɵɵFactoryDeclaration<ActiveSidebarItemGroupDirective, never>;
58
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ActiveSidebarItemGroupDirective, "six-sidebar-item-group", never, {}, {}, ["sidebarItems"], never, false, [{ directive: typeof i1.RouterLinkActive; inputs: {}; outputs: {}; }]>;
59
+ }