quang 20.5.0 → 20.5.2-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 (35) hide show
  1. package/components/autocomplete/README.md +38 -1
  2. package/components/autocomplete/index.d.ts +266 -37
  3. package/components/date/index.d.ts +3 -0
  4. package/components/radio-group/README.md +75 -0
  5. package/components/radio-group/index.d.ts +31 -0
  6. package/components/select/README.md +34 -1
  7. package/components/select/index.d.ts +25 -3
  8. package/components/shared/index.d.ts +23 -3
  9. package/fesm2022/quang-auth.mjs +18 -18
  10. package/fesm2022/quang-components-autocomplete.mjs +647 -196
  11. package/fesm2022/quang-components-autocomplete.mjs.map +1 -1
  12. package/fesm2022/quang-components-checkbox.mjs +5 -5
  13. package/fesm2022/quang-components-checkbox.mjs.map +1 -1
  14. package/fesm2022/quang-components-date.mjs +68 -16
  15. package/fesm2022/quang-components-date.mjs.map +1 -1
  16. package/fesm2022/quang-components-input.mjs +5 -5
  17. package/fesm2022/quang-components-input.mjs.map +1 -1
  18. package/fesm2022/quang-components-paginator.mjs +13 -13
  19. package/fesm2022/quang-components-radio-group.mjs +59 -0
  20. package/fesm2022/quang-components-radio-group.mjs.map +1 -0
  21. package/fesm2022/quang-components-select.mjs +73 -24
  22. package/fesm2022/quang-components-select.mjs.map +1 -1
  23. package/fesm2022/quang-components-shared.mjs +93 -59
  24. package/fesm2022/quang-components-shared.mjs.map +1 -1
  25. package/fesm2022/quang-components-table.mjs +3 -3
  26. package/fesm2022/quang-components-wysiwyg.mjs +3 -3
  27. package/fesm2022/quang-device.mjs +3 -3
  28. package/fesm2022/quang-loader.mjs +6 -6
  29. package/fesm2022/quang-overlay-modal.mjs +6 -6
  30. package/fesm2022/quang-overlay-popover.mjs +6 -6
  31. package/fesm2022/quang-overlay-shared.mjs +9 -9
  32. package/fesm2022/quang-overlay-toast.mjs +6 -6
  33. package/fesm2022/quang-overlay-tooltip.mjs +6 -6
  34. package/fesm2022/quang-translation.mjs +6 -6
  35. package/package.json +36 -32
@@ -1,7 +1,7 @@
1
1
  import * as rxjs from 'rxjs';
2
2
  import { Subscription } from 'rxjs';
3
3
  import * as _angular_core from '@angular/core';
4
- import { AfterViewInit, Injector, DestroyRef, ElementRef } from '@angular/core';
4
+ import { AfterViewInit, Injector, DestroyRef, TemplateRef, ElementRef } from '@angular/core';
5
5
  import { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';
6
6
 
7
7
  declare const makeId: (length: number) => string;
@@ -39,6 +39,8 @@ declare abstract class QuangBaseComponent<T = any> implements ControlValueAccess
39
39
  _ngControl: _angular_core.WritableSignal<NgControl | null>;
40
40
  _injector: _angular_core.WritableSignal<Injector>;
41
41
  _statusChange$?: Subscription;
42
+ _valueChange$?: Subscription;
43
+ _eventsChange$?: Subscription;
42
44
  getIsRequiredControl: _angular_core.Signal<boolean>;
43
45
  onChange?: (value: T) => void;
44
46
  onTouched?: () => void;
@@ -59,9 +61,15 @@ declare abstract class QuangBaseComponent<T = any> implements ControlValueAccess
59
61
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<QuangBaseComponent<any>, never, never, { "componentId": { "alias": "componentId"; "required": false; "isSignal": true; }; "isReadonly": { "alias": "isReadonly"; "required": false; "isSignal": true; }; "componentTabIndex": { "alias": "componentTabIndex"; "required": false; "isSignal": true; }; "componentClass": { "alias": "componentClass"; "required": false; "isSignal": true; }; "componentLabel": { "alias": "componentLabel"; "required": false; "isSignal": true; }; "componentPlaceholder": { "alias": "componentPlaceholder"; "required": false; "isSignal": true; }; "errorMap": { "alias": "errorMap"; "required": false; "isSignal": true; }; "successMessage": { "alias": "successMessage"; "required": false; "isSignal": true; }; "helpMessage": { "alias": "helpMessage"; "required": false; "isSignal": true; }; "formControl": { "alias": "formControl"; "required": false; "isSignal": true; }; "helpMessageTooltip": { "alias": "helpMessageTooltip"; "required": false; "isSignal": true; }; }, { "componentBlur": "componentBlur"; }, never, never, true, never>;
60
62
  }
61
63
 
64
+ interface QuangSelectOptionTemplateContext {
65
+ $implicit: SelectOption;
66
+ selected: boolean;
67
+ index: number;
68
+ }
62
69
  interface SelectOption {
63
70
  label: string;
64
71
  value: string | number | null;
72
+ renderer?: TemplateRef<QuangSelectOptionTemplateContext>;
65
73
  }
66
74
  declare enum OptionListParentType {
67
75
  SELECT = "select",
@@ -86,6 +94,12 @@ declare class QuangOptionListComponent {
86
94
  scrollBehaviorOnOpen: _angular_core.InputSignal<ScrollBehavior>;
87
95
  changedHandler: _angular_core.OutputEmitterRef<any>;
88
96
  blurHandler: _angular_core.OutputEmitterRef<any>;
97
+ /** Emitted when user presses Escape - parent should close dropdown and return focus to trigger */
98
+ escapePressed: _angular_core.OutputEmitterRef<void>;
99
+ /** Emitted when user presses Tab - parent should handle focus transition */
100
+ tabPressed: _angular_core.OutputEmitterRef<{
101
+ shiftKey: boolean;
102
+ }>;
89
103
  optionListContainer: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
90
104
  destroyRef: DestroyRef;
91
105
  parentType: _angular_core.InputSignal<OptionListParentType>;
@@ -96,6 +110,12 @@ declare class QuangOptionListComponent {
96
110
  selectOptionsList: _angular_core.Signal<SelectOption[]>;
97
111
  onKeyDown: Subscription | null;
98
112
  selectedElementIndex: _angular_core.Signal<number>;
113
+ /** Signal to track currently focused item index for aria-activedescendant */
114
+ focusedItemIndex: _angular_core.WritableSignal<number>;
115
+ /**
116
+ * Returns the ID of the currently focused item for aria-activedescendant
117
+ */
118
+ getActiveDescendantId(): string | null;
99
119
  optionList$: _angular_core.EffectRef;
100
120
  handleSearch(key: string, listItems: HTMLLIElement[], currentIndex: number): number;
101
121
  changePosition(): void;
@@ -107,8 +127,8 @@ declare class QuangOptionListComponent {
107
127
  getOptionListWidth(): void;
108
128
  getOptionListTop(): void;
109
129
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<QuangOptionListComponent, never>;
110
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<QuangOptionListComponent, "quang-option-list", never, { "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "optionListMaxHeight": { "alias": "optionListMaxHeight"; "required": false; "isSignal": true; }; "selectOptions": { "alias": "selectOptions"; "required": false; "isSignal": true; }; "selectButtonRef": { "alias": "selectButtonRef"; "required": true; "isSignal": true; }; "_value": { "alias": "_value"; "required": false; "isSignal": true; }; "_isDisabled": { "alias": "_isDisabled"; "required": false; "isSignal": true; }; "componentClass": { "alias": "componentClass"; "required": false; "isSignal": true; }; "componentLabel": { "alias": "componentLabel"; "required": false; "isSignal": true; }; "componentTabIndex": { "alias": "componentTabIndex"; "required": false; "isSignal": true; }; "translateValue": { "alias": "translateValue"; "required": false; "isSignal": true; }; "nullOption": { "alias": "nullOption"; "required": false; "isSignal": true; }; "scrollBehaviorOnOpen": { "alias": "scrollBehaviorOnOpen"; "required": false; "isSignal": true; }; "parentType": { "alias": "parentType"; "required": true; "isSignal": true; }; "parentID": { "alias": "parentID"; "required": false; "isSignal": true; }; }, { "changedHandler": "changedHandler"; "blurHandler": "blurHandler"; }, never, never, true, never>;
130
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<QuangOptionListComponent, "quang-option-list", never, { "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "optionListMaxHeight": { "alias": "optionListMaxHeight"; "required": false; "isSignal": true; }; "selectOptions": { "alias": "selectOptions"; "required": false; "isSignal": true; }; "selectButtonRef": { "alias": "selectButtonRef"; "required": true; "isSignal": true; }; "_value": { "alias": "_value"; "required": false; "isSignal": true; }; "_isDisabled": { "alias": "_isDisabled"; "required": false; "isSignal": true; }; "componentClass": { "alias": "componentClass"; "required": false; "isSignal": true; }; "componentLabel": { "alias": "componentLabel"; "required": false; "isSignal": true; }; "componentTabIndex": { "alias": "componentTabIndex"; "required": false; "isSignal": true; }; "translateValue": { "alias": "translateValue"; "required": false; "isSignal": true; }; "nullOption": { "alias": "nullOption"; "required": false; "isSignal": true; }; "scrollBehaviorOnOpen": { "alias": "scrollBehaviorOnOpen"; "required": false; "isSignal": true; }; "parentType": { "alias": "parentType"; "required": true; "isSignal": true; }; "parentID": { "alias": "parentID"; "required": false; "isSignal": true; }; }, { "changedHandler": "changedHandler"; "blurHandler": "blurHandler"; "escapePressed": "escapePressed"; "tabPressed": "tabPressed"; }, never, never, true, never>;
111
131
  }
112
132
 
113
133
  export { OptionListParentType, QuangBaseComponent, QuangOptionListComponent, makeId };
114
- export type { ErrorData, SelectOption };
134
+ export type { ErrorData, QuangSelectOptionTemplateContext, SelectOption };
@@ -173,10 +173,10 @@ class QuangAuthService {
173
173
  hasAtLeastOneRole(roles) {
174
174
  return roles.some((role) => this.roles().has(role));
175
175
  }
176
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
177
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangAuthService, providedIn: 'root' }); }
176
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
177
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangAuthService, providedIn: 'root' }); }
178
178
  }
179
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangAuthService, decorators: [{
179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangAuthService, decorators: [{
180
180
  type: Injectable,
181
181
  args: [{
182
182
  providedIn: 'root',
@@ -247,10 +247,10 @@ class QuangHasAtLeastOneRoleDirective {
247
247
  this.changeDetectorRef.markForCheck();
248
248
  }, ...(ngDevMode ? [{ debugName: "hideViewIfNotAllowed" }] : []));
249
249
  }
250
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangHasAtLeastOneRoleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
251
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.10", type: QuangHasAtLeastOneRoleDirective, isStandalone: true, selector: "[quangHasAtLeastOneRole]", inputs: { targetRoles: { classPropertyName: "targetRoles", publicName: "quangHasAtLeastOneRole", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
250
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangHasAtLeastOneRoleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
251
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: QuangHasAtLeastOneRoleDirective, isStandalone: true, selector: "[quangHasAtLeastOneRole]", inputs: { targetRoles: { classPropertyName: "targetRoles", publicName: "quangHasAtLeastOneRole", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
252
252
  }
253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangHasAtLeastOneRoleDirective, decorators: [{
253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangHasAtLeastOneRoleDirective, decorators: [{
254
254
  type: Directive,
255
255
  args: [{
256
256
  selector: '[quangHasAtLeastOneRole]',
@@ -292,10 +292,10 @@ class QuangHasEveryRoleDirective {
292
292
  this.changeDetectorRef.markForCheck();
293
293
  }, ...(ngDevMode ? [{ debugName: "hideViewIfNotAllowed" }] : []));
294
294
  }
295
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangHasEveryRoleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
296
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.10", type: QuangHasEveryRoleDirective, isStandalone: true, selector: "[quangHasEveryRole]", inputs: { targetRoles: { classPropertyName: "targetRoles", publicName: "quangHasEveryRole", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
295
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangHasEveryRoleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
296
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: QuangHasEveryRoleDirective, isStandalone: true, selector: "[quangHasEveryRole]", inputs: { targetRoles: { classPropertyName: "targetRoles", publicName: "quangHasEveryRole", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
297
297
  }
298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangHasEveryRoleDirective, decorators: [{
298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangHasEveryRoleDirective, decorators: [{
299
299
  type: Directive,
300
300
  args: [{
301
301
  selector: '[quangHasEveryRole]',
@@ -322,10 +322,10 @@ class QuangIsAuthenticatedDirective {
322
322
  this.changeDetectorRef.markForCheck();
323
323
  }, ...(ngDevMode ? [{ debugName: "hideViewIfNotAuthenticated" }] : []));
324
324
  }
325
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangIsAuthenticatedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
326
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.10", type: QuangIsAuthenticatedDirective, isStandalone: true, selector: "[quangIsAuthenticated]", ngImport: i0 }); }
325
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangIsAuthenticatedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
326
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: QuangIsAuthenticatedDirective, isStandalone: true, selector: "[quangIsAuthenticated]", ngImport: i0 }); }
327
327
  }
328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangIsAuthenticatedDirective, decorators: [{
328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangIsAuthenticatedDirective, decorators: [{
329
329
  type: Directive,
330
330
  args: [{
331
331
  selector: '[quangIsAuthenticated]',
@@ -351,10 +351,10 @@ class QuangIsNotAuthenticatedDirective {
351
351
  this.changeDetectorRef.markForCheck();
352
352
  }, ...(ngDevMode ? [{ debugName: "showViewIfNotAuthenticated" }] : []));
353
353
  }
354
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangIsNotAuthenticatedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
355
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.10", type: QuangIsNotAuthenticatedDirective, isStandalone: true, selector: "[quangIsNotAuthenticated]", ngImport: i0 }); }
354
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangIsNotAuthenticatedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
355
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: QuangIsNotAuthenticatedDirective, isStandalone: true, selector: "[quangIsNotAuthenticated]", ngImport: i0 }); }
356
356
  }
357
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangIsNotAuthenticatedDirective, decorators: [{
357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangIsNotAuthenticatedDirective, decorators: [{
358
358
  type: Directive,
359
359
  args: [{
360
360
  selector: '[quangIsNotAuthenticated]',
@@ -439,10 +439,10 @@ class MemoryStorage {
439
439
  setItem(key, data) {
440
440
  this.data.set(key, data);
441
441
  }
442
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: MemoryStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
443
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: MemoryStorage }); }
442
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MemoryStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
443
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MemoryStorage }); }
444
444
  }
445
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: MemoryStorage, decorators: [{
445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MemoryStorage, decorators: [{
446
446
  type: Injectable
447
447
  }] });
448
448
  function withMemoryStorage() {