@agorapulse/ui-components 22.1.7 → 22.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 (61) hide show
  1. package/agorapulse-ui-components-22.2.0.tgz +0 -0
  2. package/fesm2022/agorapulse-ui-components-action-dropdown.mjs +29 -61
  3. package/fesm2022/agorapulse-ui-components-action-dropdown.mjs.map +1 -1
  4. package/fesm2022/agorapulse-ui-components-autocomplete.mjs +1 -1
  5. package/fesm2022/agorapulse-ui-components-autocomplete.mjs.map +1 -1
  6. package/fesm2022/agorapulse-ui-components-button.mjs +8 -4
  7. package/fesm2022/agorapulse-ui-components-button.mjs.map +1 -1
  8. package/fesm2022/agorapulse-ui-components-checkbox.mjs +16 -4
  9. package/fesm2022/agorapulse-ui-components-checkbox.mjs.map +1 -1
  10. package/fesm2022/agorapulse-ui-components-datepicker.mjs +655 -219
  11. package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
  12. package/fesm2022/agorapulse-ui-components-directives.mjs +172 -2
  13. package/fesm2022/agorapulse-ui-components-directives.mjs.map +1 -1
  14. package/fesm2022/agorapulse-ui-components-dropdown-base.mjs +69 -2
  15. package/fesm2022/agorapulse-ui-components-dropdown-base.mjs.map +1 -1
  16. package/fesm2022/agorapulse-ui-components-dropdown-panel.mjs +47 -3
  17. package/fesm2022/agorapulse-ui-components-dropdown-panel.mjs.map +1 -1
  18. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +39 -13
  19. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
  20. package/fesm2022/agorapulse-ui-components-input-group.mjs +6 -4
  21. package/fesm2022/agorapulse-ui-components-input-group.mjs.map +1 -1
  22. package/fesm2022/agorapulse-ui-components-input-search.mjs +10 -4
  23. package/fesm2022/agorapulse-ui-components-input-search.mjs.map +1 -1
  24. package/fesm2022/agorapulse-ui-components-labels-selector.mjs +1 -1
  25. package/fesm2022/agorapulse-ui-components-labels-selector.mjs.map +1 -1
  26. package/fesm2022/agorapulse-ui-components-legacy-select.mjs +1 -1
  27. package/fesm2022/agorapulse-ui-components-legacy-select.mjs.map +1 -1
  28. package/fesm2022/agorapulse-ui-components-nav-selector.mjs +3 -3
  29. package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
  30. package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs +2 -2
  31. package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs.map +1 -1
  32. package/fesm2022/agorapulse-ui-components-phone-number-input.mjs +1 -1
  33. package/fesm2022/agorapulse-ui-components-phone-number-input.mjs.map +1 -1
  34. package/fesm2022/agorapulse-ui-components-popover.mjs +7 -0
  35. package/fesm2022/agorapulse-ui-components-popover.mjs.map +1 -1
  36. package/fesm2022/agorapulse-ui-components-select.mjs +18 -44
  37. package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
  38. package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs +160 -16
  39. package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs.map +1 -1
  40. package/fesm2022/agorapulse-ui-components.mjs +2 -4
  41. package/fesm2022/agorapulse-ui-components.mjs.map +1 -1
  42. package/package.json +2 -6
  43. package/types/agorapulse-ui-components-action-dropdown.d.ts +6 -4
  44. package/types/agorapulse-ui-components-button.d.ts +4 -2
  45. package/types/agorapulse-ui-components-checkbox.d.ts +7 -1
  46. package/types/agorapulse-ui-components-datepicker.d.ts +313 -88
  47. package/types/agorapulse-ui-components-directives.d.ts +85 -2
  48. package/types/agorapulse-ui-components-dropdown-base.d.ts +40 -1
  49. package/types/agorapulse-ui-components-dropdown-panel.d.ts +16 -1
  50. package/types/agorapulse-ui-components-filter-dropdown.d.ts +3 -1
  51. package/types/agorapulse-ui-components-input-group.d.ts +3 -1
  52. package/types/agorapulse-ui-components-input-search.d.ts +5 -1
  53. package/types/agorapulse-ui-components-neo-datepicker.d.ts +2 -2
  54. package/types/agorapulse-ui-components-popover.d.ts +7 -0
  55. package/types/agorapulse-ui-components-select.d.ts +7 -5
  56. package/types/agorapulse-ui-components-selection-dropdown.d.ts +68 -5
  57. package/types/agorapulse-ui-components.d.ts +2 -5
  58. package/agorapulse-ui-components-22.1.7.tgz +0 -0
  59. package/fesm2022/agorapulse-ui-components-date-range-picker.mjs +0 -163
  60. package/fesm2022/agorapulse-ui-components-date-range-picker.mjs.map +0 -1
  61. package/types/agorapulse-ui-components-date-range-picker.d.ts +0 -75
@@ -1,8 +1,37 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { TemplateRef } from '@angular/core';
3
+ import { FocusableOption, Highlightable } from '@angular/cdk/a11y';
4
+ import { ApInteractiveElement } from '@agorapulse/ui-components/directives';
3
5
  import * as _angular_cdk_overlay from '@angular/cdk/overlay';
4
6
  import { FloatingPlacement, FloatingAnchorMode } from '@agorapulse/ui-components/floating';
5
7
 
8
+ /** Set on the active option by `ActiveDescendantKeyManager`, where focus stays in a search field. */
9
+ declare const DROPDOWN_OPTION_ACTIVE_CLASS = "ap-dropdown-option--active";
10
+ /**
11
+ * Marks an element a `ListKeyManager` can drive. It satisfies both managers, because the right one
12
+ * depends on the role: `FocusKeyManager` moves real focus through a menu or a plain listbox,
13
+ * `ActiveDescendantKeyManager` leaves focus in a combobox's input and only marks the active option.
14
+ *
15
+ * The panel is role-agnostic, so the host says which of its children are options.
16
+ */
17
+ declare class DropdownOptionDirective implements FocusableOption, Highlightable {
18
+ private readonly element;
19
+ readonly label: i0.InputSignal<string>;
20
+ readonly isDisabled: i0.InputSignal<boolean>;
21
+ /** `ListKeyManager` skips disabled options on its own; a disabled button is unfocusable anyway. */
22
+ get disabled(): boolean;
23
+ /** The id `aria-activedescendant` points at. Only meaningful under the active-descendant manager. */
24
+ get id(): string;
25
+ focus(): void;
26
+ /** Clicks the option, for a combobox where focus stays in the input and Enter must still reach it. */
27
+ activate(): void;
28
+ getLabel(): string;
29
+ setActiveStyles(): void;
30
+ setInactiveStyles(): void;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<DropdownOptionDirective, never>;
32
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DropdownOptionDirective, "[apDropdownOption]", never, { "label": { "alias": "apDropdownOption"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "apDropdownOptionDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
33
+ }
34
+
6
35
  interface DropdownOverlay {
7
36
  open(triggerElement?: HTMLElement): void;
8
37
  close(): void;
@@ -27,6 +56,16 @@ declare class DropdownTriggerDirective {
27
56
  static ɵdir: i0.ɵɵDirectiveDeclaration<DropdownTriggerDirective, "[apDropdownTrigger]", never, { "apDropdownTrigger": { "alias": "apDropdownTrigger"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
28
57
  }
29
58
 
59
+ /**
60
+ * The element a trigger really exposes — what takes focus and carries `aria-expanded`.
61
+ *
62
+ * `apDropdownTrigger` usually sits on a component host, and `<ap-button>` is not a button: it wraps
63
+ * one, so writing on the host would be inert.
64
+ *
65
+ * @param declared what the host component provides through `AP_INTERACTIVE_ELEMENT`, if any.
66
+ */
67
+ declare function interactiveTriggerElement(host: HTMLElement, declared?: ApInteractiveElement | null): HTMLElement;
68
+
30
69
  interface DropdownOverlayConfig {
31
70
  /** Defaults to `true` — the dropdown keeps its click catcher, unlike the primitive. */
32
71
  showBackdrop?: boolean;
@@ -56,5 +95,5 @@ declare function createDropdownOverlay(): {
56
95
  };
57
96
  type DropdownOverlayInstance = ReturnType<typeof createDropdownOverlay>;
58
97
 
59
- export { DropdownTriggerDirective, createDropdownOverlay };
98
+ export { DROPDOWN_OPTION_ACTIVE_CLASS, DropdownOptionDirective, DropdownTriggerDirective, createDropdownOverlay, interactiveTriggerElement };
60
99
  export type { DropdownOverlay, DropdownOverlayConfig, DropdownOverlayInstance };
@@ -13,7 +13,9 @@ declare class DropdownContentDirective {
13
13
 
14
14
  /**
15
15
  * The surface a dropdown opens: white, rounded, elevated — and nothing more. No role and no focus
16
- * trap: the content brings its own semantics (`menu`, `listbox`…). A dialog wants the popover.
16
+ * trap: the content brings its own semantics (`menu`, `listbox`, and the `dialog` a combobox owns,
17
+ * as the datepicker's calendar is). A dialog that should take focus — heading, close button, Tab
18
+ * confined — wants the popover instead.
17
19
  *
18
20
  * @example
19
21
  * <button [apDropdownTrigger]="panel">Columns</button>
@@ -25,6 +27,7 @@ declare class DropdownPanelComponent implements DropdownOverlay {
25
27
  private readonly floating;
26
28
  protected readonly content: _angular_core.Signal<DropdownContentDirective>;
27
29
  private readonly surface;
30
+ private returnFocusTo;
28
31
  /** Unset means derived from the anchor mode, i.e. `bottom-start`. */
29
32
  readonly placement: _angular_core.InputSignal<_floating_ui_utils.Placement | undefined>;
30
33
  /** On by default: a dropdown keeps its click catcher. */
@@ -40,6 +43,18 @@ declare class DropdownPanelComponent implements DropdownOverlay {
40
43
  get overlayRef(): OverlayRef | null;
41
44
  open(triggerElement?: HTMLElement): void;
42
45
  close(): void;
46
+ /**
47
+ * The pane sits at the end of `body`, so Tab from the trigger would walk the whole page before
48
+ * reaching it. Focus the content root when it declares a tabindex — a host that wants something
49
+ * finer focuses it afterwards, and wins.
50
+ */
51
+ private focusIn;
52
+ private returnFocus;
53
+ /** Only give focus back if it is still ours to give: the user may have clicked elsewhere. */
54
+ private holdsFocus;
55
+ /** `<body>` means nobody holds focus: returning focus there would land on the page's first focusable element. */
56
+ private activeElement;
57
+ private surfaceElement;
43
58
  toggle(triggerElement?: HTMLElement): void;
44
59
  private dismiss;
45
60
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropdownPanelComponent, never>;
@@ -315,6 +315,8 @@ declare class FilterDropdownComponent implements DropdownOverlay {
315
315
  readonly placement: _angular_core.InputSignal<_floating_ui_utils.Placement | undefined>;
316
316
  /** Extra class(es) set on the body-appended overlay pane, so a consumer can scope global styles to this dropdown. */
317
317
  panelClass: _angular_core.InputSignal<string | string[]>;
318
+ /** Names the dialog — a dialog owes a name. */
319
+ readonly ariaLabel: _angular_core.InputSignal<string>;
318
320
  saveNewPresetsText: _angular_core.InputSignal<string>;
319
321
  saveAsNewPresetText: _angular_core.InputSignal<string>;
320
322
  savePresetText: _angular_core.InputSignal<string>;
@@ -376,7 +378,7 @@ declare class FilterDropdownComponent implements DropdownOverlay {
376
378
  onUpdatePresets(): void;
377
379
  protected onActionDropdownItemClick(item: ActionDropdownItem): void;
378
380
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FilterDropdownComponent, never>;
379
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterDropdownComponent, "ap-filter-dropdown", never, { "infobox": { "alias": "infobox"; "required": false; "isSignal": true; }; "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "savedValue": { "alias": "savedValue"; "required": false; "isSignal": true; }; "needApplyButton": { "alias": "needApplyButton"; "required": false; "isSignal": true; }; "needClearButton": { "alias": "needClearButton"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "expandOnOpen": { "alias": "expandOnOpen"; "required": false; "isSignal": true; }; "presetsFeatureLocked": { "alias": "presetsFeatureLocked"; "required": false; "isSignal": true; }; "savePresetsMode": { "alias": "savePresetsMode"; "required": false; "isSignal": true; }; "editingPresetsMode": { "alias": "editingPresetsMode"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "saveNewPresetsText": { "alias": "saveNewPresetsText"; "required": false; "isSignal": true; }; "saveAsNewPresetText": { "alias": "saveAsNewPresetText"; "required": false; "isSignal": true; }; "savePresetText": { "alias": "savePresetText"; "required": false; "isSignal": true; }; "updateExistingPresetText": { "alias": "updateExistingPresetText"; "required": false; "isSignal": true; }; "resetFilterText": { "alias": "resetFilterText"; "required": false; "isSignal": true; }; "applyFiltersText": { "alias": "applyFiltersText"; "required": false; "isSignal": true; }; "clearFilterText": { "alias": "clearFilterText"; "required": false; "isSignal": true; }; }, { "infoboxLinkClick": "infoboxLinkClick"; "opened": "opened"; "closed": "closed"; "presetsLockedClicked": "presetsLockedClicked"; "saveNewPresets": "saveNewPresets"; "updatePresets": "updatePresets"; "applyFilters": "applyFilters"; "clearFilters": "clearFilters"; "resetFilters": "resetFilters"; "lockedFeatureClicked": "lockedFeatureClicked"; "filterDropdownGroupLockedClicked": "filterDropdownGroupLockedClicked"; }, never, never, true, never>;
381
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterDropdownComponent, "ap-filter-dropdown", never, { "infobox": { "alias": "infobox"; "required": false; "isSignal": true; }; "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "savedValue": { "alias": "savedValue"; "required": false; "isSignal": true; }; "needApplyButton": { "alias": "needApplyButton"; "required": false; "isSignal": true; }; "needClearButton": { "alias": "needClearButton"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "expandOnOpen": { "alias": "expandOnOpen"; "required": false; "isSignal": true; }; "presetsFeatureLocked": { "alias": "presetsFeatureLocked"; "required": false; "isSignal": true; }; "savePresetsMode": { "alias": "savePresetsMode"; "required": false; "isSignal": true; }; "editingPresetsMode": { "alias": "editingPresetsMode"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "saveNewPresetsText": { "alias": "saveNewPresetsText"; "required": false; "isSignal": true; }; "saveAsNewPresetText": { "alias": "saveAsNewPresetText"; "required": false; "isSignal": true; }; "savePresetText": { "alias": "savePresetText"; "required": false; "isSignal": true; }; "updateExistingPresetText": { "alias": "updateExistingPresetText"; "required": false; "isSignal": true; }; "resetFilterText": { "alias": "resetFilterText"; "required": false; "isSignal": true; }; "applyFiltersText": { "alias": "applyFiltersText"; "required": false; "isSignal": true; }; "clearFilterText": { "alias": "clearFilterText"; "required": false; "isSignal": true; }; }, { "infoboxLinkClick": "infoboxLinkClick"; "opened": "opened"; "closed": "closed"; "presetsLockedClicked": "presetsLockedClicked"; "saveNewPresets": "saveNewPresets"; "updatePresets": "updatePresets"; "applyFilters": "applyFilters"; "clearFilters": "clearFilters"; "resetFilters": "resetFilters"; "lockedFeatureClicked": "lockedFeatureClicked"; "filterDropdownGroupLockedClicked": "filterDropdownGroupLockedClicked"; }, never, never, true, never>;
380
382
  }
381
383
 
382
384
  declare class FilterDropdownButtonComponent {
@@ -2,8 +2,10 @@ import * as i0 from '@angular/core';
2
2
 
3
3
  declare class InputGroupComponent {
4
4
  symbolPosition: 'left' | 'right';
5
+ /** Paints the group in its disabled state. For when it holds no `<input disabled>`. */
6
+ disabled: i0.InputSignalWithTransform<boolean, unknown>;
5
7
  static ɵfac: i0.ɵɵFactoryDeclaration<InputGroupComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<InputGroupComponent, "ap-input-group", never, { "symbolPosition": { "alias": "symbolPosition"; "required": false; }; }, {}, never, ["ap-input-prefix", "ap-symbol", "*"], true, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputGroupComponent, "ap-input-group", never, { "symbolPosition": { "alias": "symbolPosition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["ap-input-prefix", "ap-symbol", "*"], true, never>;
7
9
  }
8
10
 
9
11
  declare class InputPrefixComponent {
@@ -6,6 +6,10 @@ declare class InputSearchComponent implements ControlValueAccessor {
6
6
  id: _angular_core.InputSignal<string>;
7
7
  placeholder: _angular_core.InputSignal<string>;
8
8
  clearable: _angular_core.InputSignal<boolean>;
9
+ /** Id of the list this field drives, when it drives one. */
10
+ ariaControls: _angular_core.InputSignal<string | null>;
11
+ /** Id of the option this field marks in that list, so focus can stay in the field. */
12
+ ariaActiveDescendant: _angular_core.InputSignal<string | null>;
9
13
  focus: _angular_core.OutputEmitterRef<FocusEvent>;
10
14
  blur: _angular_core.OutputEmitterRef<FocusEvent>;
11
15
  keyup: _angular_core.OutputEmitterRef<KeyboardEvent>;
@@ -29,7 +33,7 @@ declare class InputSearchComponent implements ControlValueAccessor {
29
33
  onBlurHandle($event: FocusEvent): void;
30
34
  onKeyup($event: KeyboardEvent): void;
31
35
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<InputSearchComponent, never>;
32
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<InputSearchComponent, "ap-input-search", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; }, { "focus": "focus"; "blur": "blur"; "keyup": "keyup"; }, never, never, true, never>;
36
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<InputSearchComponent, "ap-input-search", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; "ariaActiveDescendant": { "alias": "ariaActiveDescendant"; "required": false; "isSignal": true; }; }, { "focus": "focus"; "blur": "blur"; "keyup": "keyup"; }, never, never, true, never>;
33
37
  }
34
38
 
35
39
  export { InputSearchComponent };
@@ -32,10 +32,10 @@ declare class NeoDatepickerComponent implements OnInit {
32
32
  }> | undefined;
33
33
  locale: NeoDatePickerLocale;
34
34
  private _maxDate;
35
- set maxDate(maxDate: dayjs__default.Dayjs);
35
+ set maxDate(maxDate: dayjs__default.Dayjs | undefined);
36
36
  get maxDate(): dayjs__default.Dayjs | undefined;
37
37
  private _minDate;
38
- set minDate(minDate: dayjs__default.Dayjs);
38
+ set minDate(minDate: dayjs__default.Dayjs | undefined);
39
39
  get minDate(): dayjs__default.Dayjs | undefined;
40
40
  previousMonthAvailable: boolean;
41
41
  private _mode;
@@ -48,6 +48,13 @@ declare class PopoverPanelComponent {
48
48
  * Inputs are prefixed one by one rather than bundled: an inline config object would be recreated on
49
49
  * every change-detection cycle and thrash the overlay.
50
50
  *
51
+ * The panel does not cap its own height, and cannot: its content is a `TemplateRef`, so only the
52
+ * caller knows what may scroll. Content that can run long needs a `max-height` of
53
+ * `var(--ap-floating-available-height, none)` — the floating engine publishes what the viewport
54
+ * leaves once flip and shift have settled, and the fallback keeps a panel that already fits
55
+ * untouched. Then pick what scrolls: the whole surface when nothing in it is sticky, the body
56
+ * alone when a heading or an action row has to stay put.
57
+ *
51
58
  * @example
52
59
  * <button [apPopover]="shareTpl" apPopoverHeading="Share">Share</button>
53
60
  * <ng-template #shareTpl>…</ng-template>
@@ -125,6 +125,8 @@ declare class DropdownItemMultipleOneLineComponent {
125
125
  disabledTooltip?: string;
126
126
  badgeText?: string;
127
127
  dividerEnabled: boolean;
128
+ /** Passed through to the box: decoration, when the row around it is the real control. */
129
+ presentational: boolean;
128
130
  onlyEnabled: boolean;
129
131
  onlyText: string;
130
132
  isFeatureLocked: _angular_core.InputSignal<boolean>;
@@ -138,7 +140,8 @@ declare class DropdownItemMultipleOneLineComponent {
138
140
  onClick($event: MouseEvent): void;
139
141
  onSelectOnly(): void;
140
142
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropdownItemMultipleOneLineComponent, never>;
141
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropdownItemMultipleOneLineComponent, "ap-dropdown-item-multiple-one-line", never, { "text": { "alias": "text"; "required": true; }; "selected": { "alias": "selected"; "required": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "htmlId": { "alias": "htmlId"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; "avatarUrl": { "alias": "avatarUrl"; "required": false; }; "symbolId": { "alias": "symbolId"; "required": false; }; "disabledTooltip": { "alias": "disabledTooltip"; "required": false; }; "badgeText": { "alias": "badgeText"; "required": false; }; "dividerEnabled": { "alias": "dividerEnabled"; "required": false; }; "onlyEnabled": { "alias": "onlyEnabled"; "required": false; }; "onlyText": { "alias": "onlyText"; "required": false; }; "isFeatureLocked": { "alias": "isFeatureLocked"; "required": false; "isSignal": true; }; "roundedAvatar": { "alias": "roundedAvatar"; "required": false; "isSignal": true; }; "network": { "alias": "network"; "required": false; "isSignal": true; }; "symbolColor": { "alias": "symbolColor"; "required": false; "isSignal": true; }; "symbolTooltipText": { "alias": "symbolTooltipText"; "required": false; "isSignal": true; }; }, { "selectOnly": "selectOnly"; "lockedFeatureClicked": "lockedFeatureClicked"; }, never, never, true, never>;
143
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropdownItemMultipleOneLineComponent, "ap-dropdown-item-multiple-one-line", never, { "text": { "alias": "text"; "required": true; }; "selected": { "alias": "selected"; "required": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "htmlId": { "alias": "htmlId"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; "avatarUrl": { "alias": "avatarUrl"; "required": false; }; "symbolId": { "alias": "symbolId"; "required": false; }; "disabledTooltip": { "alias": "disabledTooltip"; "required": false; }; "badgeText": { "alias": "badgeText"; "required": false; }; "dividerEnabled": { "alias": "dividerEnabled"; "required": false; }; "presentational": { "alias": "presentational"; "required": false; }; "onlyEnabled": { "alias": "onlyEnabled"; "required": false; }; "onlyText": { "alias": "onlyText"; "required": false; }; "isFeatureLocked": { "alias": "isFeatureLocked"; "required": false; "isSignal": true; }; "roundedAvatar": { "alias": "roundedAvatar"; "required": false; "isSignal": true; }; "network": { "alias": "network"; "required": false; "isSignal": true; }; "symbolColor": { "alias": "symbolColor"; "required": false; "isSignal": true; }; "symbolTooltipText": { "alias": "symbolTooltipText"; "required": false; "isSignal": true; }; }, { "selectOnly": "selectOnly"; "lockedFeatureClicked": "lockedFeatureClicked"; }, never, never, true, never>;
144
+ static ngAcceptInputType_presentational: unknown;
142
145
  }
143
146
 
144
147
  declare class DropdownItemMultipleTwoLinesComponent {
@@ -197,6 +200,8 @@ declare class SelectLabelMultipleComponent {
197
200
  roundedAvatar: _angular_core.InputSignal<boolean>;
198
201
  bindNetwork: _angular_core.InputSignal<string>;
199
202
  bindTagColor: _angular_core.InputSignal<string>;
203
+ /** Turns chip removal off. Completes the parent ng-select's state, when there is one. */
204
+ disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
200
205
  removeItem: _angular_core.OutputEmitterRef<any>;
201
206
  /**
202
207
  * Parent ng-select, resolved through the DI chain of the `ng-multi-label-tmp` template.
@@ -213,14 +218,11 @@ declare class SelectLabelMultipleComponent {
213
218
  network: any;
214
219
  tagColor: TagColor | undefined;
215
220
  }[]>;
216
- hiddenCount: _angular_core.WritableSignal<number>;
217
221
  trackByItem: (_: number, item: any) => any;
218
222
  mainContainer: _angular_core.Signal<ElementRef<any>>;
219
- itemsElement: _angular_core.Signal<readonly ElementRef<any>[]>;
220
- private responsiveLayout;
221
223
  private pinHorizontalScroll;
222
224
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectLabelMultipleComponent, never>;
223
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectLabelMultipleComponent, "ap-select-label-multiple", never, { "displayType": { "alias": "displayType"; "required": false; "isSignal": true; }; "tagColor": { "alias": "tagColor"; "required": false; "isSignal": true; }; "selectedItems": { "alias": "selectedItems"; "required": true; "isSignal": true; }; "bindLabel": { "alias": "bindLabel"; "required": false; "isSignal": true; }; "bindValue": { "alias": "bindValue"; "required": false; "isSignal": true; }; "bindAvatarUrl": { "alias": "bindAvatarUrl"; "required": false; "isSignal": true; }; "bindSymbolId": { "alias": "bindSymbolId"; "required": false; "isSignal": true; }; "roundedAvatar": { "alias": "roundedAvatar"; "required": false; "isSignal": true; }; "bindNetwork": { "alias": "bindNetwork"; "required": false; "isSignal": true; }; "bindTagColor": { "alias": "bindTagColor"; "required": false; "isSignal": true; }; }, { "removeItem": "removeItem"; }, never, never, true, never>;
225
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectLabelMultipleComponent, "ap-select-label-multiple", never, { "displayType": { "alias": "displayType"; "required": false; "isSignal": true; }; "tagColor": { "alias": "tagColor"; "required": false; "isSignal": true; }; "selectedItems": { "alias": "selectedItems"; "required": true; "isSignal": true; }; "bindLabel": { "alias": "bindLabel"; "required": false; "isSignal": true; }; "bindValue": { "alias": "bindValue"; "required": false; "isSignal": true; }; "bindAvatarUrl": { "alias": "bindAvatarUrl"; "required": false; "isSignal": true; }; "bindSymbolId": { "alias": "bindSymbolId"; "required": false; "isSignal": true; }; "roundedAvatar": { "alias": "roundedAvatar"; "required": false; "isSignal": true; }; "bindNetwork": { "alias": "bindNetwork"; "required": false; "isSignal": true; }; "bindTagColor": { "alias": "bindTagColor"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "removeItem": "removeItem"; }, never, never, true, never>;
224
226
  }
225
227
 
226
228
  /** Search input for an ng-select dropdown — place inside its `ng-header-tmp`. */
@@ -49,11 +49,33 @@ type RenderEntry = {
49
49
  label: string;
50
50
  items: SelectionDropdownItem[];
51
51
  };
52
+ /** A run of consecutive ungrouped items, or a group. Each becomes one listbox of its own. */
53
+ type RenderRun = {
54
+ kind: 'items';
55
+ items: SelectionDropdownItem[];
56
+ } | Extract<RenderEntry, {
57
+ kind: 'group';
58
+ }>;
52
59
  type SelectionDropdownMode = 'multiple' | 'single';
53
60
  /** A dropdown of options on any trigger. `multiple` = checkbox rows with search; `single` = rows, closes on pick. */
54
61
  declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
62
+ private static nextId;
55
63
  private readonly symbolRegistry;
56
64
  private readonly panel;
65
+ private readonly options;
66
+ /** Mirrors the key manager's active index, so the roving tabindex can be bound. */
67
+ protected readonly activeIndex: _angular_core.WritableSignal<number>;
68
+ private readonly injector;
69
+ /** Names the dialog. Falls back to the visible title, then to a generic label rather than none. */
70
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
71
+ /** Names the listbox holding what is already selected. */
72
+ readonly selectedSectionText: _angular_core.InputSignal<string>;
73
+ /** Names a listbox of ungrouped options when the dropdown has no title. */
74
+ readonly optionsSectionText: _angular_core.InputSignal<string>;
75
+ protected readonly panelLabel: _angular_core.Signal<string>;
76
+ protected readonly listboxId: string;
77
+ private keyManager;
78
+ private primed;
57
79
  trigger: _angular_core.Signal<TemplateRef<unknown> | undefined>;
58
80
  /** ID for the header button */
59
81
  headerButtonId: _angular_core.InputSignal<string | undefined>;
@@ -79,6 +101,8 @@ declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
79
101
  searchPlaceholderText: _angular_core.InputSignal<string>;
80
102
  /** Text to display when no search results are found */
81
103
  noSearchResultsText: _angular_core.InputSignal<string>;
104
+ /** Announced once a search settles. `{count}` is replaced by how many options matched. */
105
+ searchResultsText: _angular_core.InputSignal<string>;
82
106
  /** Whether to show a backdrop that closes the dropdown when clicked */
83
107
  showBackdrop: _angular_core.InputSignal<boolean>;
84
108
  /** Whether the dropdown is disabled and cannot be opened */
@@ -109,6 +133,8 @@ declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
109
133
  protected readonly inputSearchComponent: _angular_core.Signal<InputSearchComponent | undefined>;
110
134
  readonly isOpen: _angular_core.Signal<boolean>;
111
135
  focusInput: _angular_core.EffectRef;
136
+ /** Single-select opens on its first option; multi does not, since marking one the user never chose announces a selection. */
137
+ primeOptions: _angular_core.EffectRef;
112
138
  protected readonly isSingleSelect: _angular_core.Signal<boolean>;
113
139
  /** Always true in `multiple` mode, leaving that layout untouched; only `single` collapses the header. */
114
140
  protected readonly searchVisible: _angular_core.Signal<boolean>;
@@ -116,6 +142,8 @@ declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
116
142
  protected readonly headerVisible: _angular_core.Signal<boolean>;
117
143
  private readonly internalItems;
118
144
  protected readonly filteredItems: _angular_core.WritableSignal<SelectionDropdownItem[]>;
145
+ /** What the live region holds. Empty outside a search: the list is on screen, unchanged. */
146
+ protected readonly resultsAnnouncement: _angular_core.WritableSignal<string>;
119
147
  protected readonly initiallySelectedItems: _angular_core.WritableSignal<SelectionDropdownItem[]>;
120
148
  protected readonly selectedItems: _angular_core.Signal<SelectionDropdownItem[]>;
121
149
  protected readonly unselectedItems: _angular_core.Signal<SelectionDropdownItem[]>;
@@ -125,6 +153,11 @@ declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
125
153
  * an already-seen group join that existing group entry.
126
154
  */
127
155
  protected readonly displayEntries: _angular_core.Signal<RenderEntry[]>;
156
+ /**
157
+ * A listbox owns only options, so a group's checkbox cannot sit inside one: each group gets its own
158
+ * listbox, and the ungrouped items between two groups are collected into one rather than one each.
159
+ */
160
+ protected readonly displayRuns: _angular_core.Signal<RenderRun[]>;
128
161
  protected readonly groupSelectionStates: _angular_core.Signal<Record<string, "selected" | "partial" | "unselected">>;
129
162
  constructor();
130
163
  ngOnDestroy(): void;
@@ -142,12 +175,37 @@ declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
142
175
  private selectOnly;
143
176
  /** Handles footer button clicks */
144
177
  onFooterButtonClick(): void;
145
- /** Handles footer button keyboard events */
146
- onFooterButtonKeydown(event: KeyboardEvent): void;
178
+ /**
179
+ * A search field keeps focus, so the list is marked rather than focused and the field says which
180
+ * option through `aria-activedescendant`. Without a field, focus is the only affordance there is,
181
+ * and the type-ahead is free — it is only a rival to a field that does the same job.
182
+ */
183
+ private activeManager;
184
+ /** `@for` gives a per-loop index, and the options span several listboxes, so identity decides. */
185
+ protected runKey(run: RenderRun): string;
186
+ /** With a search field the list is no tab stop at all: the field owns it and reaches it by arrow. */
187
+ protected optionTabIndex(carriesIt: boolean): 0 | -1;
188
+ /**
189
+ * Roving tabindex across every listbox at once: the options are a single tab stop. Before any
190
+ * arrow key the first option carries it, or nothing in the list could be tabbed to.
191
+ */
192
+ protected tabbableOption(item: SelectionDropdownItem): boolean;
193
+ /** The option the search field names as active, or nothing until an arrow key marks one. */
194
+ protected readonly activeDescendantId: _angular_core.Signal<string | null>;
195
+ /** An option needs an id of its own: the consumer's htmlId is not unique across a page. */
196
+ protected optionId(item: SelectionDropdownItem): string;
197
+ /**
198
+ * The manager owns the arrows and Home/End. An option is a button, so it activates itself.
199
+ *
200
+ * Keys from the search field arrive here by bubbling, so only navigation crosses over: anything
201
+ * else is the text being typed, and the manager would answer it instead of the field.
202
+ */
203
+ onOptionsKeyDown(event: KeyboardEvent): void;
204
+ /** Leaving the field ends its hold on the list: a marker nothing can commit only misleads. */
205
+ protected onSearchBlur(): void;
206
+ private fromSearchField;
147
207
  /** Handles header button clicks */
148
208
  onHeaderButtonClick(): void;
149
- /** Handles header button keyboard events */
150
- onHeaderButtonKeydown(event: KeyboardEvent): void;
151
209
  /** Handles search input changes from the rendered field. Filtering is driven by the
152
210
  * `searchTerm` effect, so this only updates the term and notifies listeners. */
153
211
  onSearchTermChange(term: string): void;
@@ -155,10 +213,15 @@ declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
155
213
  onGroupToggle(groupLabel: string, checked: boolean): void;
156
214
  /** Stable track key for a render entry (item or group). */
157
215
  protected entryKey(entry: RenderEntry): string;
216
+ /**
217
+ * A filtered list changes under a screen reader with nothing said, and the field keeps the focus,
218
+ * so there is no new focus to read either. Announced after the debounce, once the count is final.
219
+ */
220
+ private announceResults;
158
221
  /** Updates the filtered items based on search term */
159
222
  private updateFilteredItems;
160
223
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectionDropdownComponent, never>;
161
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectionDropdownComponent, "ap-selection-dropdown", never, { "headerButtonId": { "alias": "headerButtonId"; "required": false; "isSignal": true; }; "footerButtonId": { "alias": "footerButtonId"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "searchEnabled": { "alias": "searchEnabled"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "footerButtonText": { "alias": "footerButtonText"; "required": false; "isSignal": true; }; "footerButtonSymbolId": { "alias": "footerButtonSymbolId"; "required": false; "isSignal": true; }; "headerButtonText": { "alias": "headerButtonText"; "required": false; "isSignal": true; }; "headerButtonSymbolId": { "alias": "headerButtonSymbolId"; "required": false; "isSignal": true; }; "searchPlaceholderText": { "alias": "searchPlaceholderText"; "required": false; "isSignal": true; }; "noSearchResultsText": { "alias": "noSearchResultsText"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; "selectionChange": "selectionChange"; "footerButtonClick": "footerButtonClick"; "headerButtonClick": "headerButtonClick"; "searchInputChange": "searchInputChange"; "searchTerm": "searchTermChange"; }, ["trigger"], never, true, never>;
224
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectionDropdownComponent, "ap-selection-dropdown", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "selectedSectionText": { "alias": "selectedSectionText"; "required": false; "isSignal": true; }; "optionsSectionText": { "alias": "optionsSectionText"; "required": false; "isSignal": true; }; "headerButtonId": { "alias": "headerButtonId"; "required": false; "isSignal": true; }; "footerButtonId": { "alias": "footerButtonId"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "searchEnabled": { "alias": "searchEnabled"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "footerButtonText": { "alias": "footerButtonText"; "required": false; "isSignal": true; }; "footerButtonSymbolId": { "alias": "footerButtonSymbolId"; "required": false; "isSignal": true; }; "headerButtonText": { "alias": "headerButtonText"; "required": false; "isSignal": true; }; "headerButtonSymbolId": { "alias": "headerButtonSymbolId"; "required": false; "isSignal": true; }; "searchPlaceholderText": { "alias": "searchPlaceholderText"; "required": false; "isSignal": true; }; "noSearchResultsText": { "alias": "noSearchResultsText"; "required": false; "isSignal": true; }; "searchResultsText": { "alias": "searchResultsText"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; "selectionChange": "selectionChange"; "footerButtonClick": "footerButtonClick"; "headerButtonClick": "headerButtonClick"; "searchInputChange": "searchInputChange"; "searchTerm": "searchTermChange"; }, ["trigger"], never, true, never>;
162
225
  }
163
226
 
164
227
  /**
@@ -8,7 +8,7 @@ export { Step, StepperComponent } from '@agorapulse/ui-components/stepper';
8
8
  import * as i3 from '@agorapulse/ui-components/confirm-modal';
9
9
  export { ConfirmModalComponent, ConfirmModalTexts } from '@agorapulse/ui-components/confirm-modal';
10
10
  import * as i4 from '@agorapulse/ui-components/datepicker';
11
- export { DatepickerComponent, DatepickerMode, I18nDatePicker, Period } from '@agorapulse/ui-components/datepicker';
11
+ export { DatepickerComponent, DatepickerMode, DatepickerPreset, DatepickerSelectComponent, DatepickerValue, Period, defaultDatepickerPresets, isPeriod } from '@agorapulse/ui-components/datepicker';
12
12
  import * as i5 from '@agorapulse/ui-components/dot-stepper';
13
13
  export { DotStepperComponent } from '@agorapulse/ui-components/dot-stepper';
14
14
  import * as i6 from '@agorapulse/ui-components/directives';
@@ -39,9 +39,7 @@ import * as i18 from '@agorapulse/ui-components/tooltip';
39
39
  export { CustomTooltipAvatarItem, CustomTooltipPresentationItem, CustomTooltipType, TooltipDirective, TooltipExternalTriggerDirective } from '@agorapulse/ui-components/tooltip';
40
40
  import * as i19 from '@agorapulse/ui-components/add-comment';
41
41
  export { AddCommentComponent } from '@agorapulse/ui-components/add-comment';
42
- export { PopoverDirective } from '@agorapulse/ui-components/popover';
43
- export { FloatingAnchorMode, FloatingPlacement, FloatingSide } from '@agorapulse/ui-components/floating';
44
- export { DropdownOverlay, DropdownTriggerDirective, createDropdownOverlay } from '@agorapulse/ui-components/dropdown-base';
42
+ export { DropdownOptionDirective, DropdownOverlay, DropdownTriggerDirective, createDropdownOverlay } from '@agorapulse/ui-components/dropdown-base';
45
43
  export { DropdownContentDirective, DropdownPanelComponent } from '@agorapulse/ui-components/dropdown-panel';
46
44
  export { ActionDropdownComponent, ActionDropdownItem, ActionDropdownTriggerDirective } from '@agorapulse/ui-components/action-dropdown';
47
45
  export { AutocompleteComponent } from '@agorapulse/ui-components/autocomplete';
@@ -49,7 +47,6 @@ export { BadgeComponent } from '@agorapulse/ui-components/badge';
49
47
  export { ButtonComponent } from '@agorapulse/ui-components/button';
50
48
  export { CheckboxComponent } from '@agorapulse/ui-components/checkbox';
51
49
  export { CounterComponent } from '@agorapulse/ui-components/counter';
52
- export { DateRangePickerComponent, DateRangePickerPreset, defaultDateRangePickerPresets } from '@agorapulse/ui-components/date-range-picker';
53
50
  export { IconButtonComponent } from '@agorapulse/ui-components/icon-button';
54
51
  export { InputComponent } from '@agorapulse/ui-components/legacy/input';
55
52
  export { SelectComponent } from '@agorapulse/ui-components/legacy/select';
Binary file
@@ -1,163 +0,0 @@
1
- import { LOCALE_CONFIG, LocaleService } from '@agorapulse/ngx-daterangepicker-material';
2
- import { DatepickerMode, DatepickerDropdownComponent } from '@agorapulse/ui-components/datepicker';
3
- import { DropdownTriggerDirective } from '@agorapulse/ui-components/dropdown-base';
4
- import { TooltipDirective } from '@agorapulse/ui-components/tooltip';
5
- import { SymbolComponent, withSymbols, apCalendar, apChevronDown, apChevronUp, apClock, apInfo } from '@agorapulse/ui-symbol';
6
- import * as i0 from '@angular/core';
7
- import { model, input, output, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
8
- import dayjs from 'dayjs';
9
-
10
- /** The default preset list (English labels), computed relative to `today` so ranges stay fresh. */
11
- function defaultDateRangePickerPresets(today = dayjs()) {
12
- const yesterday = today.subtract(1, 'day');
13
- return [
14
- { key: 'yesterday', label: 'Yesterday', range: [yesterday, yesterday] },
15
- { key: 'lastWeek', label: 'Last week', range: [today.subtract(7, 'day'), yesterday] },
16
- { key: 'last30Days', label: 'Last 30 days', range: [today.subtract(30, 'day'), yesterday] },
17
- {
18
- key: 'lastMonth',
19
- label: 'Previous month',
20
- range: [today.subtract(1, 'month').startOf('month'), today.subtract(1, 'month').endOf('month')],
21
- },
22
- { key: 'last90Days', label: 'Last 90 days', range: [today.subtract(90, 'day'), yesterday] },
23
- { key: 'last12Months', label: 'Last 12 months', range: [today.subtract(1, 'year'), yesterday] },
24
- { key: 'thisMonth', label: 'This month', range: [yesterday.startOf('month'), yesterday] },
25
- {
26
- key: 'lastYear',
27
- label: 'Previous year',
28
- range: [today.subtract(1, 'year').startOf('year'), today.subtract(1, 'year').endOf('year')],
29
- },
30
- ];
31
- }
32
- function timeZoneAbbreviation(timeZone) {
33
- return (new Intl.DateTimeFormat('en-US', { timeZone, timeZoneName: 'short' })
34
- .formatToParts(new Date())
35
- .find(({ type }) => type === 'timeZoneName')?.value ?? '');
36
- }
37
- /**
38
- * A compact date-range selector for toolbars: a trigger chip showing the selected
39
- * period that opens a dropdown with preset ranges and a dual-month calendar.
40
- *
41
- * @example
42
- * ```html
43
- * <ap-date-range-picker
44
- * [(value)]="period"
45
- * [maxDate]="yesterday"
46
- * timeZone="Europe/Paris"
47
- * (presetSelected)="onPreset($event)" />
48
- * ```
49
- */
50
- class DateRangePickerComponent {
51
- /** The selected period. Supports two-way binding via `[(value)]`. */
52
- value = model({ startDate: undefined, endDate: undefined }, /* @ts-ignore */
53
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
54
- /** The preset ranges listed in the dropdown. Defaults to `defaultDateRangePickerPresets()`. */
55
- presets = input(defaultDateRangePickerPresets(), /* @ts-ignore */
56
- ...(ngDevMode ? [{ debugName: "presets" }] : /* istanbul ignore next */ []));
57
- /** Earliest selectable date. */
58
- minDate = input(undefined, /* @ts-ignore */
59
- ...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
60
- /** Latest selectable date. */
61
- maxDate = input(undefined, /* @ts-ignore */
62
- ...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
63
- /** Maximum number of days between the start and the end date. Undefined means no limit. */
64
- maxRangeDays = input(undefined, /* @ts-ignore */
65
- ...(ngDevMode ? [{ debugName: "maxRangeDays" }] : /* istanbul ignore next */ []));
66
- /** Caption shown in the panel when `maxRangeDays` is set. Defaults to an English sentence — pass a translated one. */
67
- maxRangeDaysHint = input(undefined, /* @ts-ignore */
68
- ...(ngDevMode ? [{ debugName: "maxRangeDaysHint" }] : /* istanbul ignore next */ []));
69
- /** Locale used for the calendar and the trigger label. */
70
- locale = input('en', /* @ts-ignore */
71
- ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
72
- firstDayOfWeek = input('monday', /* @ts-ignore */
73
- ...(ngDevMode ? [{ debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []));
74
- /** dayjs format of the trigger label. */
75
- dateFormat = input('ll', /* @ts-ignore */
76
- ...(ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []));
77
- /** Text shown on the trigger while no period is selected. */
78
- placeholder = input('Select period', /* @ts-ignore */
79
- ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
80
- /** Panel placement. Unset means derived from the anchor mode, i.e. `bottom-start`. */
81
- placement = input(/* @ts-ignore */
82
- ...(ngDevMode ? [undefined, { debugName: "placement" }] : /* istanbul ignore next */ []));
83
- /** Label of the "Custom" entry in the preset list. */
84
- customRangeLabel = input('Custom', /* @ts-ignore */
85
- ...(ngDevMode ? [{ debugName: "customRangeLabel" }] : /* istanbul ignore next */ []));
86
- /** IANA time zone name. When set, a chip with the zone's offset is shown next to the trigger. */
87
- timeZone = input(undefined, /* @ts-ignore */
88
- ...(ngDevMode ? [{ debugName: "timeZone" }] : /* istanbul ignore next */ []));
89
- /** Tooltip text of the info icon shown next to the time-zone chip. */
90
- timeZoneTooltip = input(undefined, /* @ts-ignore */
91
- ...(ngDevMode ? [{ debugName: "timeZoneTooltip" }] : /* istanbul ignore next */ []));
92
- disabled = input(false, /* @ts-ignore */
93
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
94
- /** Close the dropdown once a full period is selected. When false it stays open until backdrop click or Escape. */
95
- closeOnSelect = input(true, /* @ts-ignore */
96
- ...(ngDevMode ? [{ debugName: "closeOnSelect" }] : /* istanbul ignore next */ []));
97
- /** Emits the `key` of the preset matching the picked period, or 'custom'. */
98
- presetSelected = output();
99
- DatepickerMode = DatepickerMode;
100
- rangesConfig = computed(() => Object.fromEntries(this.presets().map(({ label, range }) => [label, range])), /* @ts-ignore */
101
- ...(ngDevMode ? [{ debugName: "rangesConfig" }] : /* istanbul ignore next */ []));
102
- i18n = computed(() => ({
103
- ranges: {
104
- yesterday: 'Yesterday',
105
- lastWeek: 'Last Week',
106
- last30Days: 'Last 30 days',
107
- lastMonth: 'Previous month',
108
- thisMonth: 'This month',
109
- },
110
- customRangeLabel: this.customRangeLabel(),
111
- }), /* @ts-ignore */
112
- ...(ngDevMode ? [{ debugName: "i18n" }] : /* istanbul ignore next */ []));
113
- formattedValue = computed(() => {
114
- const { startDate, endDate } = this.value();
115
- if (!startDate || !endDate) {
116
- return '';
117
- }
118
- const format = (date) => date.locale(this.locale()).format(this.dateFormat());
119
- return `${format(startDate)} - ${format(endDate)}`;
120
- }, /* @ts-ignore */
121
- ...(ngDevMode ? [{ debugName: "formattedValue" }] : /* istanbul ignore next */ []));
122
- rangeHint = computed(() => {
123
- const days = this.maxRangeDays();
124
- return days ? (this.maxRangeDaysHint() ?? `Maximum period: ${days} days`) : undefined;
125
- }, /* @ts-ignore */
126
- ...(ngDevMode ? [{ debugName: "rangeHint" }] : /* istanbul ignore next */ []));
127
- timeZoneOffset = computed(() => {
128
- const timeZone = this.timeZone();
129
- return timeZone ? timeZoneAbbreviation(timeZone) : '';
130
- }, /* @ts-ignore */
131
- ...(ngDevMode ? [{ debugName: "timeZoneOffset" }] : /* istanbul ignore next */ []));
132
- onPeriodSelected(period) {
133
- this.value.set(period);
134
- this.presetSelected.emit(this.matchPresetKey(period));
135
- }
136
- matchPresetKey({ startDate, endDate }) {
137
- const match = this.presets().find(({ range: [start, end] }) => startDate?.isSame(start, 'day') && endDate?.isSame(end, 'day'));
138
- return match?.key ?? 'custom';
139
- }
140
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
141
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: DateRangePickerComponent, isStandalone: true, selector: "ap-date-range-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, presets: { classPropertyName: "presets", publicName: "presets", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, maxRangeDays: { classPropertyName: "maxRangeDays", publicName: "maxRangeDays", isSignal: true, isRequired: false, transformFunction: null }, maxRangeDaysHint: { classPropertyName: "maxRangeDaysHint", publicName: "maxRangeDaysHint", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, customRangeLabel: { classPropertyName: "customRangeLabel", publicName: "customRangeLabel", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, timeZoneTooltip: { classPropertyName: "timeZoneTooltip", publicName: "timeZoneTooltip", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", presetSelected: "presetSelected" }, host: { classAttribute: "ap-date-range-picker" }, providers: [
142
- withSymbols(apCalendar, apChevronDown, apChevronUp, apClock, apInfo),
143
- { provide: LOCALE_CONFIG, useValue: {} },
144
- LocaleService,
145
- ], ngImport: i0, template: "<button\n type=\"button\"\n class=\"ap-date-range-picker__trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"dropdown.isOpen()\"\n [class.ap-date-range-picker__trigger--open]=\"dropdown.isOpen()\"\n [disabled]=\"disabled()\"\n [apDropdownTrigger]=\"dropdown\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"calendar\" />\n @if (formattedValue()) {\n <span class=\"ap-date-range-picker__value\">{{ formattedValue() }}</span>\n } @else {\n <span class=\"ap-date-range-picker__placeholder\">{{ placeholder() }}</span>\n }\n <ap-symbol\n class=\"ap-date-range-picker__chevron\"\n size=\"sm\"\n [symbolId]=\"dropdown.isOpen() ? 'chevron-up' : 'chevron-down'\" />\n</button>\n\n@if (timeZone()) {\n <div\n class=\"ap-date-range-picker__timezone\"\n apTooltipPosition=\"bottom\"\n [apTooltip]=\"timeZone()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"clock\"\n color=\"grey\" />\n <span class=\"ap-date-range-picker__timezone-offset\">{{ timeZoneOffset() }}</span>\n </div>\n @if (timeZoneTooltip()) {\n <ap-symbol\n class=\"ap-date-range-picker__timezone-info\"\n size=\"sm\"\n symbolId=\"info\"\n color=\"grey-blue\"\n apTooltipPosition=\"bottom\"\n [apTooltip]=\"timeZoneTooltip()\" />\n }\n}\n\n<ap-datepicker-dropdown\n #dropdown\n [mode]=\"DatepickerMode.Range\"\n [closeOnSelect]=\"closeOnSelect()\"\n [dateLimit]=\"maxRangeDays()\"\n [placement]=\"placement()\"\n [hint]=\"rangeHint()\"\n [disabled]=\"disabled()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [i18n]=\"i18n()\"\n [locale]=\"locale()\"\n [maxDate]=\"maxDate()\"\n [minDate]=\"minDate()\"\n [rangesConfig]=\"rangesConfig()\"\n [selectedPeriod]=\"value()\"\n [showCustomRangeLabel]=\"true\"\n [showRanges]=\"true\"\n (periodSelected)=\"onPeriodSelected($event)\" />\n", styles: [".ap-date-range-picker{display:inline-flex;align-items:center;gap:var(--ref-spacing-sm)}.ap-date-range-picker__trigger{display:inline-flex;align-items:center;gap:var(--ref-spacing-xxs);height:var(--sys-button-height);padding:0 var(--ref-spacing-sm);border:1px solid var(--ref-color-grey-20);border-radius:var(--sys-border-radius-sm);background-color:var(--ref-color-white);color:var(--ref-color-grey-100);font-family:var(--sys-text-style-body-font-family);font-size:var(--sys-text-style-body-size);cursor:pointer}.ap-date-range-picker__trigger .ap-symbol{color:var(--ref-color-grey-150)}.ap-date-range-picker__trigger:hover:not(:disabled){border-color:var(--ref-color-grey-40)}.ap-date-range-picker__trigger:disabled{cursor:default;color:var(--ref-color-grey-40)}.ap-date-range-picker__trigger:disabled .ap-symbol{color:inherit}.ap-date-range-picker__trigger--open{border-color:var(--ref-color-electric-blue-100)}.ap-date-range-picker__trigger--open .ap-symbol{color:var(--ref-color-electric-blue-100)}.ap-date-range-picker__placeholder{color:var(--sys-text-color-light)}.ap-date-range-picker__chevron{padding-left:var(--ref-spacing-xxs)}.ap-date-range-picker__timezone{display:inline-flex;align-items:center;gap:var(--ref-spacing-xxs)}.ap-date-range-picker__timezone-info{display:inline-flex;align-items:center}\n"], dependencies: [{ kind: "component", type: DatepickerDropdownComponent, selector: "ap-datepicker-dropdown", inputs: ["mode", "selectedDate", "selectedDates", "selectedPeriod", "minDate", "maxDate", "dateLimit", "hint", "firstDayOfWeek", "locale", "i18n", "showRanges", "showCustomRangeLabel", "rangesConfig", "showBackdrop", "closeOnSelect", "disabled", "placement"], outputs: ["opened", "closed", "dateSelected", "periodSelected"] }, { kind: "directive", type: DropdownTriggerDirective, selector: "[apDropdownTrigger]", inputs: ["apDropdownTrigger"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
146
- }
147
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateRangePickerComponent, decorators: [{
148
- type: Component,
149
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-date-range-picker', imports: [DatepickerDropdownComponent, DropdownTriggerDirective, SymbolComponent, TooltipDirective], providers: [
150
- withSymbols(apCalendar, apChevronDown, apChevronUp, apClock, apInfo),
151
- { provide: LOCALE_CONFIG, useValue: {} },
152
- LocaleService,
153
- ], host: {
154
- class: 'ap-date-range-picker',
155
- }, encapsulation: ViewEncapsulation.None, template: "<button\n type=\"button\"\n class=\"ap-date-range-picker__trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"dropdown.isOpen()\"\n [class.ap-date-range-picker__trigger--open]=\"dropdown.isOpen()\"\n [disabled]=\"disabled()\"\n [apDropdownTrigger]=\"dropdown\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"calendar\" />\n @if (formattedValue()) {\n <span class=\"ap-date-range-picker__value\">{{ formattedValue() }}</span>\n } @else {\n <span class=\"ap-date-range-picker__placeholder\">{{ placeholder() }}</span>\n }\n <ap-symbol\n class=\"ap-date-range-picker__chevron\"\n size=\"sm\"\n [symbolId]=\"dropdown.isOpen() ? 'chevron-up' : 'chevron-down'\" />\n</button>\n\n@if (timeZone()) {\n <div\n class=\"ap-date-range-picker__timezone\"\n apTooltipPosition=\"bottom\"\n [apTooltip]=\"timeZone()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"clock\"\n color=\"grey\" />\n <span class=\"ap-date-range-picker__timezone-offset\">{{ timeZoneOffset() }}</span>\n </div>\n @if (timeZoneTooltip()) {\n <ap-symbol\n class=\"ap-date-range-picker__timezone-info\"\n size=\"sm\"\n symbolId=\"info\"\n color=\"grey-blue\"\n apTooltipPosition=\"bottom\"\n [apTooltip]=\"timeZoneTooltip()\" />\n }\n}\n\n<ap-datepicker-dropdown\n #dropdown\n [mode]=\"DatepickerMode.Range\"\n [closeOnSelect]=\"closeOnSelect()\"\n [dateLimit]=\"maxRangeDays()\"\n [placement]=\"placement()\"\n [hint]=\"rangeHint()\"\n [disabled]=\"disabled()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [i18n]=\"i18n()\"\n [locale]=\"locale()\"\n [maxDate]=\"maxDate()\"\n [minDate]=\"minDate()\"\n [rangesConfig]=\"rangesConfig()\"\n [selectedPeriod]=\"value()\"\n [showCustomRangeLabel]=\"true\"\n [showRanges]=\"true\"\n (periodSelected)=\"onPeriodSelected($event)\" />\n", styles: [".ap-date-range-picker{display:inline-flex;align-items:center;gap:var(--ref-spacing-sm)}.ap-date-range-picker__trigger{display:inline-flex;align-items:center;gap:var(--ref-spacing-xxs);height:var(--sys-button-height);padding:0 var(--ref-spacing-sm);border:1px solid var(--ref-color-grey-20);border-radius:var(--sys-border-radius-sm);background-color:var(--ref-color-white);color:var(--ref-color-grey-100);font-family:var(--sys-text-style-body-font-family);font-size:var(--sys-text-style-body-size);cursor:pointer}.ap-date-range-picker__trigger .ap-symbol{color:var(--ref-color-grey-150)}.ap-date-range-picker__trigger:hover:not(:disabled){border-color:var(--ref-color-grey-40)}.ap-date-range-picker__trigger:disabled{cursor:default;color:var(--ref-color-grey-40)}.ap-date-range-picker__trigger:disabled .ap-symbol{color:inherit}.ap-date-range-picker__trigger--open{border-color:var(--ref-color-electric-blue-100)}.ap-date-range-picker__trigger--open .ap-symbol{color:var(--ref-color-electric-blue-100)}.ap-date-range-picker__placeholder{color:var(--sys-text-color-light)}.ap-date-range-picker__chevron{padding-left:var(--ref-spacing-xxs)}.ap-date-range-picker__timezone{display:inline-flex;align-items:center;gap:var(--ref-spacing-xxs)}.ap-date-range-picker__timezone-info{display:inline-flex;align-items:center}\n"] }]
156
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], maxRangeDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRangeDays", required: false }] }], maxRangeDaysHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRangeDaysHint", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], customRangeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "customRangeLabel", required: false }] }], timeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeZone", required: false }] }], timeZoneTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeZoneTooltip", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], presetSelected: [{ type: i0.Output, args: ["presetSelected"] }] } });
157
-
158
- /**
159
- * Generated bundle index. Do not edit.
160
- */
161
-
162
- export { DateRangePickerComponent, defaultDateRangePickerPresets };
163
- //# sourceMappingURL=agorapulse-ui-components-date-range-picker.mjs.map