quang 19.0.27 → 20.0.0

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 (114) hide show
  1. package/README.md +0 -1
  2. package/auth/README.md +10 -0
  3. package/auth/index.d.ts +195 -9
  4. package/auth/mobile/index.d.ts +5 -1
  5. package/components/autocomplete/index.d.ts +46 -1
  6. package/components/checkbox/index.d.ts +15 -1
  7. package/components/date/index.d.ts +89 -1
  8. package/components/input/index.d.ts +19 -1
  9. package/components/paginator/index.d.ts +68 -5
  10. package/components/select/index.d.ts +32 -1
  11. package/components/shared/index.d.ts +112 -4
  12. package/components/table/index.d.ts +70 -1
  13. package/components/wysiwyg/index.d.ts +51 -1
  14. package/device/index.d.ts +14 -1
  15. package/fesm2022/quang-auth.mjs +18 -18
  16. package/fesm2022/quang-auth.mjs.map +1 -1
  17. package/fesm2022/quang-components-autocomplete.mjs +7 -7
  18. package/fesm2022/quang-components-autocomplete.mjs.map +1 -1
  19. package/fesm2022/quang-components-checkbox.mjs +6 -6
  20. package/fesm2022/quang-components-checkbox.mjs.map +1 -1
  21. package/fesm2022/quang-components-date.mjs +5 -5
  22. package/fesm2022/quang-components-date.mjs.map +1 -1
  23. package/fesm2022/quang-components-input.mjs +6 -6
  24. package/fesm2022/quang-components-input.mjs.map +1 -1
  25. package/fesm2022/quang-components-paginator.mjs +15 -15
  26. package/fesm2022/quang-components-paginator.mjs.map +1 -1
  27. package/fesm2022/quang-components-select.mjs +6 -6
  28. package/fesm2022/quang-components-select.mjs.map +1 -1
  29. package/fesm2022/quang-components-shared.mjs +6 -6
  30. package/fesm2022/quang-components-shared.mjs.map +1 -1
  31. package/fesm2022/quang-components-table.mjs +3 -3
  32. package/fesm2022/quang-components-table.mjs.map +1 -1
  33. package/fesm2022/quang-components-wysiwyg.mjs +6 -6
  34. package/fesm2022/quang-components-wysiwyg.mjs.map +1 -1
  35. package/fesm2022/quang-device.mjs +3 -3
  36. package/fesm2022/quang-device.mjs.map +1 -1
  37. package/fesm2022/quang-loader.mjs +7 -8
  38. package/fesm2022/quang-loader.mjs.map +1 -1
  39. package/fesm2022/quang-overlay-modal.mjs +3 -3
  40. package/fesm2022/quang-overlay-modal.mjs.map +1 -1
  41. package/fesm2022/quang-overlay-popover.mjs +8 -8
  42. package/fesm2022/quang-overlay-popover.mjs.map +1 -1
  43. package/fesm2022/quang-overlay-shared.mjs +10 -11
  44. package/fesm2022/quang-overlay-shared.mjs.map +1 -1
  45. package/fesm2022/quang-overlay-toast.mjs +8 -8
  46. package/fesm2022/quang-overlay-toast.mjs.map +1 -1
  47. package/fesm2022/quang-overlay-tooltip.mjs +6 -6
  48. package/fesm2022/quang-overlay-tooltip.mjs.map +1 -1
  49. package/fesm2022/quang-translation.mjs +6 -6
  50. package/fesm2022/quang-translation.mjs.map +1 -1
  51. package/forms/index.d.ts +51 -2
  52. package/index.d.ts +13 -9
  53. package/loader/index.d.ts +69 -4
  54. package/overlay/modal/index.d.ts +34 -1
  55. package/overlay/popover/index.d.ts +25 -1
  56. package/overlay/shared/index.d.ts +116 -3
  57. package/overlay/toast/index.d.ts +45 -2
  58. package/overlay/tooltip/index.d.ts +23 -2
  59. package/package.json +31 -31
  60. package/shared/index.d.ts +16 -1
  61. package/translation/index.d.ts +62 -4
  62. package/auth/auth-providers.d.ts +0 -39
  63. package/auth/auth.service.d.ts +0 -52
  64. package/auth/directives/has-at-least-one-role.directive.d.ts +0 -26
  65. package/auth/directives/has-every-role.directive.d.ts +0 -26
  66. package/auth/directives/is-authenticated.directive.d.ts +0 -14
  67. package/auth/directives/is-not-authenticated.directive.d.ts +0 -14
  68. package/auth/guards/index.d.ts +0 -2
  69. package/auth/guards/is-allowed.guard.d.ts +0 -2
  70. package/auth/guards/is-authenticated.guard.d.ts +0 -2
  71. package/auth/logout-on-error.interceptor.d.ts +0 -9
  72. package/auth/mobile/mobile-auth-feature.d.ts +0 -2
  73. package/auth/token-storage/index.d.ts +0 -3
  74. package/auth/token-storage/local-storage-feature.d.ts +0 -2
  75. package/auth/token-storage/memory-storage-feature.d.ts +0 -12
  76. package/auth/token-storage/session-storage-feature.d.ts +0 -2
  77. package/components/autocomplete/autocomplete.component.d.ts +0 -43
  78. package/components/checkbox/checkbox.component.d.ts +0 -11
  79. package/components/date/date.component.d.ts +0 -85
  80. package/components/input/input.component.d.ts +0 -15
  81. package/components/paginator/paginator-language.service.d.ts +0 -10
  82. package/components/paginator/paginator.component.d.ts +0 -30
  83. package/components/paginator/paginator.module.d.ts +0 -7
  84. package/components/paginator/paginator.service.d.ts +0 -6
  85. package/components/paginator/paginatorIntl.d.ts +0 -12
  86. package/components/select/select.component.d.ts +0 -29
  87. package/components/shared/ErrorData.d.ts +0 -4
  88. package/components/shared/makeId.d.ts +0 -1
  89. package/components/shared/option-list/option-list.component.d.ts +0 -53
  90. package/components/shared/quang-base-component.directive.d.ts +0 -50
  91. package/components/table/table.component.d.ts +0 -66
  92. package/components/wysiwyg/wysiwyg.component.d.ts +0 -46
  93. package/device/resize-observable.service.d.ts +0 -11
  94. package/forms/form-group-model.d.ts +0 -18
  95. package/forms/validators.d.ts +0 -43
  96. package/loader/loader-providers.d.ts +0 -23
  97. package/loader/loader.component.d.ts +0 -23
  98. package/loader/loader.interceptor.d.ts +0 -10
  99. package/loader/loader.service.d.ts +0 -9
  100. package/overlay/modal/modal.component.d.ts +0 -29
  101. package/overlay/popover/popover.component.d.ts +0 -13
  102. package/overlay/popover/popover.directive.d.ts +0 -11
  103. package/overlay/shared/CustomViewportRuler.d.ts +0 -63
  104. package/overlay/shared/quang-base-overlay.component.d.ts +0 -9
  105. package/overlay/shared/quang-base-overlay.directive.d.ts +0 -44
  106. package/overlay/toast/toast.component.d.ts +0 -13
  107. package/overlay/toast/toast.service.d.ts +0 -27
  108. package/overlay/tooltip/tooltip.component.d.ts +0 -11
  109. package/overlay/tooltip/tooltip.directive.d.ts +0 -11
  110. package/shared/intercept-utils.d.ts +0 -13
  111. package/translation/translation-loader.service.d.ts +0 -10
  112. package/translation/translation-providers.d.ts +0 -28
  113. package/translation/translation.service.d.ts +0 -15
  114. package/translation/translations.tokens.d.ts +0 -5
@@ -1 +1,25 @@
1
- export * from './popover.directive';
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef } from '@angular/core';
3
+ import { ComponentType } from '@angular/cdk/portal';
4
+ import { QuangBaseOverlayComponent, QuangBaseOverlayDirective } from 'quang/overlay/shared';
5
+ import * as rxjs from 'rxjs';
6
+ import { ConnectionPositionPair } from '@angular/cdk/overlay';
7
+
8
+ declare class QuangPopoverComponent implements QuangBaseOverlayComponent {
9
+ overlayContent: _angular_core.InputSignal<TemplateRef<any> | null>;
10
+ positionPair: _angular_core.WritableSignal<ConnectionPositionPair | null>;
11
+ payload: _angular_core.InputSignal<any>;
12
+ getPopoverPosition: _angular_core.WritableSignal<string>;
13
+ onChangePositionPair$: rxjs.Subscription;
14
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<QuangPopoverComponent, never>;
15
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<QuangPopoverComponent, "quang-popover", never, { "overlayContent": { "alias": "overlayContent"; "required": false; "isSignal": true; }; "payload": { "alias": "payload"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
16
+ }
17
+
18
+ declare class QuangPopoverDirective extends QuangBaseOverlayDirective<QuangPopoverComponent> {
19
+ targetComponentType: _angular_core.WritableSignal<ComponentType<QuangPopoverComponent> | undefined>;
20
+ content: _angular_core.InputSignal<TemplateRef<any> | null>;
21
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<QuangPopoverDirective, never>;
22
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<QuangPopoverDirective, "[quangPopover]", never, { "content": { "alias": "quangPopover"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
23
+ }
24
+
25
+ export { QuangPopoverDirective };
@@ -1,3 +1,116 @@
1
- export * from './quang-base-overlay.component';
2
- export * from './quang-base-overlay.directive';
3
- export * from './CustomViewportRuler';
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnDestroy, DestroyRef, NgZone } from '@angular/core';
3
+ import { ConnectionPositionPair, ConnectedPosition } from '@angular/cdk/overlay';
4
+ import { ComponentType } from '@angular/cdk/portal';
5
+ import { Platform } from '@angular/cdk/platform';
6
+ import { ViewportScrollPosition } from '@angular/cdk/scrolling';
7
+ import { Observable } from 'rxjs';
8
+
9
+ declare abstract class QuangBaseOverlayComponent {
10
+ overlayContent: _angular_core.InputSignal<any>;
11
+ payload: _angular_core.InputSignal<any>;
12
+ positionPair: _angular_core.WritableSignal<ConnectionPositionPair | null>;
13
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<QuangBaseOverlayComponent, never>;
14
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<QuangBaseOverlayComponent, "quang-base-overlay-component", never, { "overlayContent": { "alias": "overlayContent"; "required": true; "isSignal": true; }; "payload": { "alias": "payload"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
15
+ }
16
+
17
+ declare abstract class QuangBaseOverlayDirective<T extends QuangBaseOverlayComponent> implements OnDestroy {
18
+ targetComponentType: _angular_core.WritableSignal<ComponentType<T> | undefined>;
19
+ /**
20
+ * The amount of pixels needed for the popover to automatically disappear. If undefined the popover will not disappear on scroll
21
+ * Default: 100
22
+ * @default 100
23
+ */
24
+ scrollCloseThreshold: _angular_core.InputSignal<number | undefined>;
25
+ showMethod: _angular_core.InputSignal<"click" | "hover">;
26
+ content: _angular_core.InputSignal<any>;
27
+ quangOverlayPayload: _angular_core.InputSignal<any>;
28
+ closeOnClickOutside: boolean;
29
+ overlayPosition: _angular_core.InputSignal<"top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "right">;
30
+ destroyRef: DestroyRef;
31
+ private top;
32
+ private topLeft;
33
+ private topRight;
34
+ private bottom;
35
+ private bottomLeft;
36
+ private bottomRight;
37
+ private left;
38
+ private right;
39
+ tooltipPosition: _angular_core.Signal<ConnectedPosition[]>;
40
+ private overlayRef;
41
+ private readonly overlay;
42
+ private readonly overlayPositionBuilder;
43
+ private readonly elementRef;
44
+ private positionStrategy;
45
+ private componentOverlayRef;
46
+ onClick(): void;
47
+ onHover(): void;
48
+ onLeave(): void;
49
+ attachOverlay(): void;
50
+ detachOverlay(): void;
51
+ showHideOverlay(): void;
52
+ ngOnDestroy(): void;
53
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<QuangBaseOverlayDirective<any>, never>;
54
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<QuangBaseOverlayDirective<any>, never, never, { "scrollCloseThreshold": { "alias": "scrollCloseThreshold"; "required": false; "isSignal": true; }; "showMethod": { "alias": "showMethod"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": true; "isSignal": true; }; "quangOverlayPayload": { "alias": "quangOverlayPayload"; "required": false; "isSignal": true; }; "overlayPosition": { "alias": "overlayPosition"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
55
+ }
56
+
57
+ /**
58
+ * Class cloe of [ViewportRuler](https://github.com/angular/components/blob/master/src/cdk/scrolling/viewport-ruler.ts)
59
+ * To fix the wrong reported size of the viewport on mobile devices with hidden url bars
60
+ * Issues references:
61
+ * https://github.com/angular/components/issues/18890
62
+ * https://github.com/angular/components/issues/27739
63
+ *
64
+ * To use this component provide it instead of `ViewportRuler`
65
+ *
66
+ * @example
67
+ * providers: [
68
+ * {
69
+ * provide: ViewportRuler,
70
+ * useClass: CustomViewportRuler
71
+ * }
72
+ * ]
73
+ */
74
+ declare class CustomViewportRuler implements OnDestroy {
75
+ private _platform;
76
+ /** Used to reference correct document/window */
77
+ protected _document: Document;
78
+ /** Cached viewport dimensions. */
79
+ private _viewportSize;
80
+ /** Stream of viewport change events. */
81
+ private readonly _change;
82
+ constructor(_platform: Platform, ngZone: NgZone, document: any);
83
+ ngOnDestroy(): void;
84
+ /** Returns the viewport's width and height. */
85
+ getViewportSize(): Readonly<{
86
+ width: number;
87
+ height: number;
88
+ }>;
89
+ /** Gets a DOMRect for the viewport's bounds. */
90
+ getViewportRect(): {
91
+ top: number;
92
+ left: number;
93
+ bottom: number;
94
+ right: number;
95
+ height: number;
96
+ width: number;
97
+ };
98
+ /** Gets the (top, left) scroll position of the viewport. */
99
+ getViewportScrollPosition(): ViewportScrollPosition;
100
+ /**
101
+ * Returns a stream that emits whenever the size of the viewport changes.
102
+ * This stream emits outside of the Angular zone.
103
+ * @param throttleTime Time in milliseconds to throttle the stream.
104
+ */
105
+ change(throttleTime?: number): Observable<Event>;
106
+ /** Event listener that will be used to handle the viewport change events. */
107
+ private _changeListener;
108
+ /** Use defaultView of injected document if available or fallback to global window reference */
109
+ private _getWindow;
110
+ /** Updates the cached viewport size. */
111
+ private _updateViewportSize;
112
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CustomViewportRuler, [null, null, { optional: true; }]>;
113
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<CustomViewportRuler>;
114
+ }
115
+
116
+ export { CustomViewportRuler, QuangBaseOverlayComponent, QuangBaseOverlayDirective };
@@ -1,2 +1,45 @@
1
- export * from './toast.component';
2
- export * from './toast.service';
1
+ import * as quang_overlay_toast from 'quang/overlay/toast';
2
+ import * as _angular_core from '@angular/core';
3
+ import { TemplateRef } from '@angular/core';
4
+ import * as node_modules__ngrx_signals_src_deep_signal from 'node_modules/@ngrx/signals/src/deep-signal';
5
+
6
+ interface ToastData {
7
+ type: 'success' | 'warning' | 'error';
8
+ title?: string;
9
+ position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center' | 'top-center' | 'bottom-center';
10
+ timing: number;
11
+ text?: string;
12
+ textValue?: string;
13
+ showCloseButton?: boolean;
14
+ date?: Date;
15
+ dateFormat?: string;
16
+ customTemplate?: TemplateRef<any>;
17
+ customIcon?: string;
18
+ hideHeader?: boolean;
19
+ }
20
+ declare class QuangToastService {
21
+ private toastState;
22
+ isShowing: _angular_core.Signal<boolean>;
23
+ count: node_modules__ngrx_signals_src_deep_signal.Signal<number>;
24
+ currentTimeout: node_modules__ngrx_signals_src_deep_signal.Signal<number | null>;
25
+ openToast(toastData: ToastData): void;
26
+ closeToast(): void;
27
+ currentToast: _angular_core.WritableSignal<ToastData | null>;
28
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<QuangToastService, never>;
29
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<QuangToastService>;
30
+ }
31
+
32
+ declare class QuangToastComponent {
33
+ toastService: _angular_core.WritableSignal<QuangToastService>;
34
+ readonly isShowing: _angular_core.Signal<boolean>;
35
+ showAtLeastFor: _angular_core.InputSignal<number>;
36
+ private showToastBuffer$;
37
+ showToast: _angular_core.Signal<boolean | undefined>;
38
+ readonly _currentToast: _angular_core.WritableSignal<quang_overlay_toast.ToastData | null>;
39
+ close(): void;
40
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<QuangToastComponent, never>;
41
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<QuangToastComponent, "quang-toast", never, { "showAtLeastFor": { "alias": "showAtLeastFor"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
42
+ }
43
+
44
+ export { QuangToastComponent, QuangToastService };
45
+ export type { ToastData };
@@ -1,2 +1,23 @@
1
- export * from './tooltip.directive';
2
- export * from './tooltip.component';
1
+ import * as _angular_core from '@angular/core';
2
+ import { ComponentType } from '@angular/cdk/portal';
3
+ import { QuangBaseOverlayComponent, QuangBaseOverlayDirective } from 'quang/overlay/shared';
4
+ import { ConnectionPositionPair } from '@angular/cdk/overlay';
5
+
6
+ declare class QuangTooltipComponent implements QuangBaseOverlayComponent {
7
+ overlayContent: _angular_core.InputSignal<string>;
8
+ quangTooltipPosition: _angular_core.InputSignal<"top" | "bottom" | "left" | "right">;
9
+ positionPair: _angular_core.WritableSignal<ConnectionPositionPair | null>;
10
+ payload: _angular_core.InputSignal<unknown>;
11
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<QuangTooltipComponent, never>;
12
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<QuangTooltipComponent, "quang-tooltip", never, { "overlayContent": { "alias": "overlayContent"; "required": true; "isSignal": true; }; "quangTooltipPosition": { "alias": "quangTooltipPosition"; "required": false; "isSignal": true; }; "payload": { "alias": "payload"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
13
+ }
14
+
15
+ declare class QuangTooltipDirective extends QuangBaseOverlayDirective<QuangTooltipComponent> {
16
+ targetComponentType: _angular_core.WritableSignal<ComponentType<QuangTooltipComponent> | undefined>;
17
+ content: _angular_core.InputSignal<string>;
18
+ showMethod: _angular_core.InputSignal<"click" | "hover">;
19
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<QuangTooltipDirective, never>;
20
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<QuangTooltipDirective, "[quangTooltip]", never, { "content": { "alias": "quangTooltip"; "required": true; "isSignal": true; }; "showMethod": { "alias": "showMethod"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
21
+ }
22
+
23
+ export { QuangTooltipComponent, QuangTooltipDirective };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quang",
3
3
  "sideEffects": false,
4
- "version": "19.0.27",
4
+ "version": "20.0.0",
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
7
7
  },
@@ -11,18 +11,18 @@
11
11
  "url": "https://github.com/quix-it/quix-quang.git"
12
12
  },
13
13
  "peerDependencies": {
14
- "@angular/animations": "^19.0.3",
15
- "@angular/cdk": "^19.0.2",
16
- "@angular/common": "^19.0.3",
17
- "@angular/core": "^19.0.3",
18
- "@angular/forms": "^19.0.3",
14
+ "@angular/animations": "^20.0.0",
15
+ "@angular/cdk": "^20.0.0",
16
+ "@angular/common": "^20.0.0",
17
+ "@angular/core": "^20.0.0",
18
+ "@angular/forms": "^20.0.0",
19
19
  "@capacitor/app": "^6.0.0",
20
20
  "@capacitor/browser": "^6.0.1",
21
21
  "@capacitor/core": "^6.1.1",
22
22
  "@jsverse/transloco": "^7.5.0",
23
23
  "@ngrx/signals": "^19.0.0",
24
24
  "air-datepicker": "^3.5.0",
25
- "angular-oauth2-oidc": "^19.0.0",
25
+ "angular-oauth2-oidc": "^20.0.0",
26
26
  "date-fns": "^3.6.0",
27
27
  "rxjs": "~7.8.0",
28
28
  "suneditor": "^2.46.0"
@@ -75,14 +75,14 @@
75
75
  "types": "./forms/index.d.ts",
76
76
  "default": "./fesm2022/quang-forms.mjs"
77
77
  },
78
- "./loader": {
79
- "types": "./loader/index.d.ts",
80
- "default": "./fesm2022/quang-loader.mjs"
81
- },
82
78
  "./shared": {
83
79
  "types": "./shared/index.d.ts",
84
80
  "default": "./fesm2022/quang-shared.mjs"
85
81
  },
82
+ "./loader": {
83
+ "types": "./loader/index.d.ts",
84
+ "default": "./fesm2022/quang-loader.mjs"
85
+ },
86
86
  "./translation": {
87
87
  "types": "./translation/index.d.ts",
88
88
  "default": "./fesm2022/quang-translation.mjs"
@@ -99,41 +99,33 @@
99
99
  "types": "./components/checkbox/index.d.ts",
100
100
  "default": "./fesm2022/quang-components-checkbox.mjs"
101
101
  },
102
- "./components/date": {
103
- "types": "./components/date/index.d.ts",
104
- "default": "./fesm2022/quang-components-date.mjs"
105
- },
106
102
  "./components/input": {
107
103
  "types": "./components/input/index.d.ts",
108
104
  "default": "./fesm2022/quang-components-input.mjs"
109
105
  },
110
- "./components/select": {
111
- "types": "./components/select/index.d.ts",
112
- "default": "./fesm2022/quang-components-select.mjs"
106
+ "./components/date": {
107
+ "types": "./components/date/index.d.ts",
108
+ "default": "./fesm2022/quang-components-date.mjs"
113
109
  },
114
110
  "./components/paginator": {
115
111
  "types": "./components/paginator/index.d.ts",
116
112
  "default": "./fesm2022/quang-components-paginator.mjs"
117
113
  },
118
- "./components/wysiwyg": {
119
- "types": "./components/wysiwyg/index.d.ts",
120
- "default": "./fesm2022/quang-components-wysiwyg.mjs"
121
- },
122
- "./components/shared": {
123
- "types": "./components/shared/index.d.ts",
124
- "default": "./fesm2022/quang-components-shared.mjs"
114
+ "./components/select": {
115
+ "types": "./components/select/index.d.ts",
116
+ "default": "./fesm2022/quang-components-select.mjs"
125
117
  },
126
118
  "./components/table": {
127
119
  "types": "./components/table/index.d.ts",
128
120
  "default": "./fesm2022/quang-components-table.mjs"
129
121
  },
130
- "./overlay/popover": {
131
- "types": "./overlay/popover/index.d.ts",
132
- "default": "./fesm2022/quang-overlay-popover.mjs"
122
+ "./components/shared": {
123
+ "types": "./components/shared/index.d.ts",
124
+ "default": "./fesm2022/quang-components-shared.mjs"
133
125
  },
134
- "./overlay/toast": {
135
- "types": "./overlay/toast/index.d.ts",
136
- "default": "./fesm2022/quang-overlay-toast.mjs"
126
+ "./components/wysiwyg": {
127
+ "types": "./components/wysiwyg/index.d.ts",
128
+ "default": "./fesm2022/quang-components-wysiwyg.mjs"
137
129
  },
138
130
  "./overlay/modal": {
139
131
  "types": "./overlay/modal/index.d.ts",
@@ -143,6 +135,14 @@
143
135
  "types": "./overlay/shared/index.d.ts",
144
136
  "default": "./fesm2022/quang-overlay-shared.mjs"
145
137
  },
138
+ "./overlay/popover": {
139
+ "types": "./overlay/popover/index.d.ts",
140
+ "default": "./fesm2022/quang-overlay-popover.mjs"
141
+ },
142
+ "./overlay/toast": {
143
+ "types": "./overlay/toast/index.d.ts",
144
+ "default": "./fesm2022/quang-overlay-toast.mjs"
145
+ },
146
146
  "./overlay/tooltip": {
147
147
  "types": "./overlay/tooltip/index.d.ts",
148
148
  "default": "./fesm2022/quang-overlay-tooltip.mjs"
package/shared/index.d.ts CHANGED
@@ -1 +1,16 @@
1
- export * from './intercept-utils';
1
+ type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
2
+ declare function isHttpMethod(value: string): value is HttpMethod;
3
+ interface UrlData {
4
+ url: string;
5
+ method: HttpMethod;
6
+ }
7
+ /**
8
+ * @example
9
+ * providers: [
10
+ * provideHttpClient(withInterceptors([quangLoaderInterceptor]))
11
+ * ]
12
+ */
13
+ declare function getExcludedUrlsByMethod(urlData: UrlData[]): Map<HttpMethod, Set<string>>;
14
+
15
+ export { getExcludedUrlsByMethod, isHttpMethod };
16
+ export type { HttpMethod, UrlData };
@@ -1,4 +1,62 @@
1
- export * from './translation-providers';
2
- export * from './translation-loader.service';
3
- export * from './translation.service';
4
- export * from './translations.tokens';
1
+ import * as i0 from '@angular/core';
2
+ import { EnvironmentProviders, InjectionToken } from '@angular/core';
3
+ import { QuangFeature, QuangFeatureKind } from 'quang';
4
+ import { TranslocoLoader, Translation, HashMap, SetTranslationOptions } from '@jsverse/transloco';
5
+ import { Observable } from 'rxjs';
6
+
7
+ interface TranslationConfig {
8
+ availableLangs: string[];
9
+ defaultLang: string;
10
+ fallbackLang: string;
11
+ translationsBasePath?: string;
12
+ reRenderOnLangChange?: boolean;
13
+ prodMode?: boolean;
14
+ failedRetries?: number;
15
+ logMissingKey?: boolean;
16
+ useFallbackTranslation?: boolean;
17
+ allowEmpty?: boolean;
18
+ }
19
+ /**
20
+ * @example
21
+ * export const appConfig: ApplicationConfig = {
22
+ * providers: [
23
+ * provideTranslation({
24
+ * availableLangs: ['it', 'en'],
25
+ * defaultLang: 'it',
26
+ * fallbackLang: 'it',
27
+ * })
28
+ * ]
29
+ * }
30
+ */
31
+ declare function provideTranslation(config: TranslationConfig): EnvironmentProviders;
32
+ declare function withTranslation(config: TranslationConfig): QuangFeature<QuangFeatureKind.TranslationFeature>;
33
+
34
+ declare class QuangTranslationLoaderService implements TranslocoLoader {
35
+ private readonly httpClient;
36
+ private readonly translationBasePath;
37
+ getTranslation(lang: string): Observable<Translation> | Promise<Translation>;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<QuangTranslationLoaderService, never>;
39
+ static ɵprov: i0.ɵɵInjectableDeclaration<QuangTranslationLoaderService>;
40
+ }
41
+
42
+ declare class QuangTranslationService {
43
+ private readonly _translocoService;
44
+ activeLang: i0.Signal<string | null>;
45
+ private readonly _availableLangs;
46
+ private readonly _defaultLang;
47
+ setActiveLang(lang: string): void;
48
+ getActiveLang(): string | null;
49
+ translate(key: string, params?: HashMap): string;
50
+ setTranslation(translation: Translation, lang?: string, options?: SetTranslationOptions): void;
51
+ setTranslationKey(key: string, value: string, options?: Omit<SetTranslationOptions, 'merge'>): void;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<QuangTranslationService, never>;
53
+ static ɵprov: i0.ɵɵInjectableDeclaration<QuangTranslationService>;
54
+ }
55
+
56
+ declare const AVAILABLE_LANGS: InjectionToken<string[]>;
57
+ declare const DEFAULT_LANG: InjectionToken<string>;
58
+ declare const FALLBACK_LANG: InjectionToken<string>;
59
+ declare const TRANSLATIONS_BASE_PATH: InjectionToken<string>;
60
+
61
+ export { AVAILABLE_LANGS, DEFAULT_LANG, FALLBACK_LANG, QuangTranslationLoaderService, QuangTranslationService, TRANSLATIONS_BASE_PATH, provideTranslation, withTranslation };
62
+ export type { TranslationConfig };
@@ -1,39 +0,0 @@
1
- import { EnvironmentProviders, Provider } from '@angular/core';
2
- import { type QuangFeature, QuangFeatureKind } from 'quang';
3
- import { type QuangAuthConfig } from './auth.service';
4
- export declare function provideAuth(authConfig?: QuangAuthConfig, ...features: QuangAuthFeatures[]): EnvironmentProviders;
5
- export declare function withAuth(authConfig?: QuangAuthConfig, ...features: QuangAuthFeatures[]): QuangFeature<QuangFeatureKind.LoaderFeature>;
6
- /**
7
- * Helper type to represent a QuangAuth feature.
8
- *
9
- * @publicApi
10
- */
11
- export interface QuangAuthFeature<FeatureKind extends QuangAuthFeatureKind> {
12
- ɵkind: FeatureKind;
13
- ɵproviders: (Provider | EnvironmentProviders)[];
14
- }
15
- /**
16
- * Helper function to create an object that represents a QuangAuth feature.
17
- */
18
- export declare function quangAuthFeature<FeatureKind extends QuangAuthFeatureKind>(kind: FeatureKind, providers: (Provider | EnvironmentProviders)[]): QuangAuthFeature<FeatureKind>;
19
- /**
20
- * A type alias that represents all QuangAuth features available for use with `provideAuth`.
21
- * Features can be enabled by adding special functions to the `provideAuth` call.
22
- * See documentation for each symbol to find corresponding function name. See also `provideAuth`
23
- * documentation on how to use those functions.
24
- *
25
- * @see {@link provideAuth}
26
- *
27
- * @publicApi
28
- */
29
- export type QuangAuthFeatures = QuangAuthFeature<QuangAuthFeatureKind>;
30
- /**
31
- * The list of features as an enum to uniquely type each feature.
32
- */
33
- export declare const enum QuangAuthFeatureKind {
34
- MobileAuthFeature = 0,
35
- SessionStorageFeature = 1,
36
- LocalStorageFeature = 2,
37
- MemoryStorageFeature = 3,
38
- LogoutOnErrorFeature = 4
39
- }
@@ -1,52 +0,0 @@
1
- import { EnvironmentProviders, InjectionToken } from '@angular/core';
2
- import { AuthConfig } from 'angular-oauth2-oidc';
3
- import * as i0 from "@angular/core";
4
- export declare const AUTH_CONFIG: InjectionToken<QuangAuthConfig | undefined>;
5
- export interface QuangAuthConfig extends AuthConfig {
6
- autoLogin: boolean;
7
- sendAccessToken: boolean;
8
- urlsToSendToken: string[];
9
- revokeTokensOnLogout?: boolean;
10
- getUserProfileOnLoginSuccess?: boolean;
11
- useSilentRefresh: boolean;
12
- }
13
- export declare function provideQuangAuthConfig(authConfig?: QuangAuthConfig): EnvironmentProviders;
14
- export declare const OPEN_URI: InjectionToken<(uri: string) => void | undefined>;
15
- export declare function provideOpenURI(openURI: (uri: string) => void | undefined): EnvironmentProviders;
16
- interface TokenStatus {
17
- accessToken: string | null;
18
- accessTokenExpiresAt: number | null;
19
- idToken: string | null;
20
- idTokenExpiresAt: number | null;
21
- refreshToken: string | null;
22
- }
23
- export declare class QuangAuthService {
24
- private config;
25
- logLevel: "normal" | "verbose" | null;
26
- private oAuthService;
27
- private state;
28
- loginChecked: import("@ngrx/signals/src/deep-signal").Signal<boolean>;
29
- isAuthenticated: import("@angular/core").Signal<boolean>;
30
- authenticationError: import("@ngrx/signals/src/deep-signal").Signal<boolean>;
31
- tokenStatus: import("@ngrx/signals").DeepSignal<TokenStatus>;
32
- roles: import("@ngrx/signals/src/deep-signal").Signal<Set<string>>;
33
- user: import("@ngrx/signals/src/deep-signal").Signal<Record<string, any> | null>;
34
- constructor();
35
- init(): Promise<void>;
36
- checkForAuthentication(forceRefresh?: boolean): Promise<boolean | undefined>;
37
- private refreshAuth;
38
- login(): void;
39
- logout(): Promise<void>;
40
- private loginError;
41
- getUserProfile(): Promise<void>;
42
- private setTokens;
43
- waitForLoginCheck(): Promise<void>;
44
- getAuthResult(): Promise<boolean>;
45
- addRoles(rolesToAdd: string[]): void;
46
- removeRoles(rolesToRemove: string[]): void;
47
- hasEveryRole(roles: string[]): boolean;
48
- hasAtLeastOneRole(roles: string[]): boolean;
49
- static ɵfac: i0.ɵɵFactoryDeclaration<QuangAuthService, never>;
50
- static ɵprov: i0.ɵɵInjectableDeclaration<QuangAuthService>;
51
- }
52
- export {};
@@ -1,26 +0,0 @@
1
- import { ChangeDetectorRef, EmbeddedViewRef, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { QuangAuthService } from '../auth.service';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * This directive conditionally renders the associated template if the authenticated user
6
- * has at least one of the specified roles. By using the `QuangAuthService.hasAtLeastOneRole()` method it checks the user's roles against
7
- * the required roles provided through the `quangHasAtLeastOneRole` directive.
8
- *
9
- * @example
10
- * <div *quangHasAtLeastOneRole="['admin', 'editor']">
11
- * This content will only be visible to users with 'admin' or 'editor' roles.
12
- * </div>
13
- */
14
- export declare class QuangHasAtLeastOneRoleDirective {
15
- logLevel: "normal" | "verbose" | null;
16
- targetRoles: import("@angular/core").InputSignal<string[]>;
17
- viewContainerRef: ViewContainerRef;
18
- embeddedViewRef: EmbeddedViewRef<unknown> | null;
19
- templateRef: TemplateRef<any>;
20
- authService: QuangAuthService;
21
- takeUntilDestroyed: import("rxjs").MonoTypeOperatorFunction<unknown>;
22
- changeDetectorRef: ChangeDetectorRef;
23
- hideViewIfNotAllowed: import("@angular/core").EffectRef;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<QuangHasAtLeastOneRoleDirective, never>;
25
- static ɵdir: i0.ɵɵDirectiveDeclaration<QuangHasAtLeastOneRoleDirective, "[quangHasAtLeastOneRole]", never, { "targetRoles": { "alias": "quangHasAtLeastOneRole"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
26
- }
@@ -1,26 +0,0 @@
1
- import { ChangeDetectorRef, EmbeddedViewRef, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { QuangAuthService } from '../auth.service';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * This directive conditionally renders the associated template if the authenticated user
6
- * has every of the specified roles. By using the `QuangAuthService.hasEveryRole()` method it checks the user's roles against
7
- * the required roles provided through the `quangHasEveryRole` required input.
8
- *
9
- * @example
10
- * <div *quangHasEveryRole="['admin', 'editor']">
11
- * This content will only be visible to users with 'admin' and 'editor' roles.
12
- * </div>
13
- */
14
- export declare class QuangHasEveryRoleDirective {
15
- logLevel: "normal" | "verbose" | null;
16
- targetRoles: import("@angular/core").InputSignal<string[]>;
17
- viewContainerRef: ViewContainerRef;
18
- embeddedViewRef: EmbeddedViewRef<unknown> | null;
19
- templateRef: TemplateRef<any>;
20
- authService: QuangAuthService;
21
- takeUntilDestroyed: import("rxjs").MonoTypeOperatorFunction<unknown>;
22
- changeDetectorRef: ChangeDetectorRef;
23
- hideViewIfNotAllowed: import("@angular/core").EffectRef;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<QuangHasEveryRoleDirective, never>;
25
- static ɵdir: i0.ɵɵDirectiveDeclaration<QuangHasEveryRoleDirective, "[quangHasEveryRole]", never, { "targetRoles": { "alias": "quangHasEveryRole"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
26
- }
@@ -1,14 +0,0 @@
1
- import { ChangeDetectorRef, EmbeddedViewRef, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { QuangAuthService } from '../auth.service';
3
- import * as i0 from "@angular/core";
4
- export declare class QuangIsAuthenticatedDirective {
5
- viewContainerRef: ViewContainerRef;
6
- templateRef: TemplateRef<any>;
7
- embeddedViewRef: EmbeddedViewRef<any> | null;
8
- authService: QuangAuthService;
9
- takeUntilDestroyed: import("rxjs").MonoTypeOperatorFunction<unknown>;
10
- changeDetectorRef: ChangeDetectorRef;
11
- hideViewIfNotAuthenticated: import("@angular/core").EffectRef;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<QuangIsAuthenticatedDirective, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<QuangIsAuthenticatedDirective, "[quangIsAuthenticated]", never, {}, {}, never, never, true, never>;
14
- }
@@ -1,14 +0,0 @@
1
- import { ChangeDetectorRef, EmbeddedViewRef, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { QuangAuthService } from '../auth.service';
3
- import * as i0 from "@angular/core";
4
- export declare class QuangIsNotAuthenticatedDirective {
5
- viewContainerRef: ViewContainerRef;
6
- templateRef: TemplateRef<any>;
7
- embeddedViewRef: EmbeddedViewRef<any> | null;
8
- authService: QuangAuthService;
9
- takeUntilDestroyed: import("rxjs").MonoTypeOperatorFunction<unknown>;
10
- changeDetectorRef: ChangeDetectorRef;
11
- showViewIfNotAuthenticated: import("@angular/core").EffectRef;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<QuangIsNotAuthenticatedDirective, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<QuangIsNotAuthenticatedDirective, "[quangIsNotAuthenticated]", never, {}, {}, never, never, true, never>;
14
- }
@@ -1,2 +0,0 @@
1
- export * from './is-allowed.guard';
2
- export * from './is-authenticated.guard';
@@ -1,2 +0,0 @@
1
- import type { CanActivateFn } from '@angular/router';
2
- export declare const quangIsAllowedGuardFactory: (roles: string[], behavior: "every" | "atLeastOne") => CanActivateFn;
@@ -1,2 +0,0 @@
1
- import type { CanActivateFn } from '@angular/router';
2
- export declare const quangIsAuthenticatedGuard: CanActivateFn;
@@ -1,9 +0,0 @@
1
- import { HttpInterceptorFn } from '@angular/common/http';
2
- import { InjectionToken } from '@angular/core';
3
- import { UrlData } from 'quang/shared';
4
- import { QuangAuthFeature, QuangAuthFeatureKind } from './auth-providers';
5
- export declare const LOGOUT_RETRIES: InjectionToken<number>;
6
- export declare const LOGOUT_STATUSES: InjectionToken<number[]>;
7
- export declare const LOGOUT_EXCLUDED_URLS: InjectionToken<UrlData[]>;
8
- export declare const logoutOnErrorInterceptor: HttpInterceptorFn;
9
- export declare function withLogoutOnError(excludedUrls?: UrlData[], statuses?: number[], retries?: number): QuangAuthFeature<QuangAuthFeatureKind.LogoutOnErrorFeature>;
@@ -1,2 +0,0 @@
1
- import { QuangAuthFeature, QuangAuthFeatureKind } from 'quang/auth';
2
- export declare function withMobileAuth(toolbarColor?: string, presentationStyle?: 'popover' | 'fullscreen'): QuangAuthFeature<QuangAuthFeatureKind.MobileAuthFeature>;
@@ -1,3 +0,0 @@
1
- export * from './local-storage-feature';
2
- export * from './memory-storage-feature';
3
- export * from './session-storage-feature';
@@ -1,2 +0,0 @@
1
- import { QuangAuthFeature, QuangAuthFeatureKind } from '../auth-providers';
2
- export declare function withLocalStorage(): QuangAuthFeature<QuangAuthFeatureKind.LocalStorageFeature>;