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

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 (54) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +6 -22
  3. package/esm2022/lib/control-value-accessors/checkbox-value-accessor.mjs +41 -0
  4. package/esm2022/lib/control-value-accessors/datepicker-value-accessor.mjs +37 -0
  5. package/esm2022/lib/control-value-accessors/numeric-value-accessor.mjs +42 -0
  6. package/esm2022/lib/control-value-accessors/radio-value-accessor.mjs +62 -0
  7. package/esm2022/lib/control-value-accessors/range-value-accessor.mjs +42 -0
  8. package/esm2022/lib/control-value-accessors/select-value-accessor.mjs +37 -0
  9. package/esm2022/lib/control-value-accessors/switch-value-accessor.mjs +41 -0
  10. package/esm2022/lib/control-value-accessors/text-value-accessor.mjs +37 -0
  11. package/esm2022/lib/control-value-accessors/timepicker-value-accessor.mjs +37 -0
  12. package/esm2022/lib/control-value-accessors/value-accessor.mjs +138 -0
  13. package/esm2022/lib/form/six-form.directive.mjs +134 -0
  14. package/esm2022/lib/link/six-router-link.directive.mjs +61 -0
  15. package/esm2022/lib/services/alert.service.mjs +21 -0
  16. package/esm2022/lib/services/validation-messages.service.mjs +15 -0
  17. package/esm2022/lib/stencil-generated/angular-component-lib/utils.mjs +59 -0
  18. package/esm2022/lib/stencil-generated/components.mjs +1388 -0
  19. package/esm2022/lib/stencil-generated/index.mjs +60 -0
  20. package/esm2022/lib/ui-library-angular.module.mjs +135 -0
  21. package/esm2022/lib/validators/six-ui-library-validators.mjs +122 -0
  22. package/esm2022/public-api.mjs +28 -0
  23. package/fesm2022/six-group-ui-library-angular.mjs +2446 -0
  24. package/fesm2022/six-group-ui-library-angular.mjs.map +1 -0
  25. package/lib/control-value-accessors/checkbox-value-accessor.d.ts +10 -0
  26. package/lib/control-value-accessors/datepicker-value-accessor.d.ts +9 -0
  27. package/lib/control-value-accessors/numeric-value-accessor.d.ts +10 -0
  28. package/lib/control-value-accessors/radio-value-accessor.d.ts +15 -0
  29. package/lib/control-value-accessors/range-value-accessor.d.ts +10 -0
  30. package/lib/control-value-accessors/select-value-accessor.d.ts +9 -0
  31. package/lib/control-value-accessors/switch-value-accessor.d.ts +10 -0
  32. package/lib/control-value-accessors/text-value-accessor.d.ts +9 -0
  33. package/lib/control-value-accessors/timepicker-value-accessor.d.ts +9 -0
  34. package/lib/control-value-accessors/value-accessor.d.ts +39 -0
  35. package/lib/form/six-form.directive.d.ts +71 -0
  36. package/lib/link/six-router-link.directive.d.ts +26 -0
  37. package/lib/services/alert.service.d.ts +11 -0
  38. package/lib/services/validation-messages.service.d.ts +7 -0
  39. package/lib/stencil-generated/components.d.ts +97 -109
  40. package/lib/stencil-generated/index.d.ts +1 -1
  41. package/lib/ui-library-angular.module.d.ts +16 -1
  42. package/lib/validators/six-ui-library-validators.d.ts +47 -0
  43. package/package.json +13 -13
  44. package/public-api.d.ts +15 -0
  45. package/esm2020/lib/stencil-generated/angular-component-lib/utils.mjs +0 -51
  46. package/esm2020/lib/stencil-generated/components.mjs +0 -1376
  47. package/esm2020/lib/stencil-generated/index.mjs +0 -57
  48. package/esm2020/lib/ui-library-angular.module.mjs +0 -34
  49. package/esm2020/public-api.mjs +0 -7
  50. package/fesm2015/six-group-ui-library-angular.mjs +0 -1468
  51. package/fesm2015/six-group-ui-library-angular.mjs.map +0 -1
  52. package/fesm2020/six-group-ui-library-angular.mjs +0 -1468
  53. package/fesm2020/six-group-ui-library-angular.mjs.map +0 -1
  54. /package/{esm2020 → esm2022}/six-group-ui-library-angular.mjs +0 -0
@@ -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
+ getErrorTexts(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,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
+ }