@agorapulse/ui-components 22.1.8 → 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.
- package/agorapulse-ui-components-22.2.0.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-datepicker.mjs +655 -219
- package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-directives.mjs +169 -2
- package/fesm2022/agorapulse-ui-components-directives.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-dropdown-panel.mjs +3 -1
- package/fesm2022/agorapulse-ui-components-dropdown-panel.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +15 -8
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-input-group.mjs +6 -4
- package/fesm2022/agorapulse-ui-components-input-group.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-input-search.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-input-search.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-labels-selector.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-labels-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-phone-number-input.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-phone-number-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-popover.mjs +7 -0
- package/fesm2022/agorapulse-ui-components-popover.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-select.mjs +8 -39
- package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components.mjs +1 -3
- package/fesm2022/agorapulse-ui-components.mjs.map +1 -1
- package/package.json +2 -6
- package/types/agorapulse-ui-components-datepicker.d.ts +313 -88
- package/types/agorapulse-ui-components-directives.d.ts +73 -1
- package/types/agorapulse-ui-components-dropdown-panel.d.ts +3 -1
- package/types/agorapulse-ui-components-input-group.d.ts +3 -1
- package/types/agorapulse-ui-components-neo-datepicker.d.ts +2 -2
- package/types/agorapulse-ui-components-popover.d.ts +7 -0
- package/types/agorapulse-ui-components-select.d.ts +3 -4
- package/types/agorapulse-ui-components.d.ts +1 -4
- package/agorapulse-ui-components-22.1.8.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-date-range-picker.mjs +0 -163
- package/fesm2022/agorapulse-ui-components-date-range-picker.mjs.map +0 -1
- package/types/agorapulse-ui-components-date-range-picker.d.ts +0 -75
|
@@ -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
|
|
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>
|
|
@@ -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 {
|
|
@@ -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>
|
|
@@ -200,6 +200,8 @@ declare class SelectLabelMultipleComponent {
|
|
|
200
200
|
roundedAvatar: _angular_core.InputSignal<boolean>;
|
|
201
201
|
bindNetwork: _angular_core.InputSignal<string>;
|
|
202
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>;
|
|
203
205
|
removeItem: _angular_core.OutputEmitterRef<any>;
|
|
204
206
|
/**
|
|
205
207
|
* Parent ng-select, resolved through the DI chain of the `ng-multi-label-tmp` template.
|
|
@@ -216,14 +218,11 @@ declare class SelectLabelMultipleComponent {
|
|
|
216
218
|
network: any;
|
|
217
219
|
tagColor: TagColor | undefined;
|
|
218
220
|
}[]>;
|
|
219
|
-
hiddenCount: _angular_core.WritableSignal<number>;
|
|
220
221
|
trackByItem: (_: number, item: any) => any;
|
|
221
222
|
mainContainer: _angular_core.Signal<ElementRef<any>>;
|
|
222
|
-
itemsElement: _angular_core.Signal<readonly ElementRef<any>[]>;
|
|
223
|
-
private responsiveLayout;
|
|
224
223
|
private pinHorizontalScroll;
|
|
225
224
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectLabelMultipleComponent, never>;
|
|
226
|
-
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>;
|
|
227
226
|
}
|
|
228
227
|
|
|
229
228
|
/** Search input for an ng-select dropdown — place inside its `ng-header-tmp`. */
|
|
@@ -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,
|
|
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,8 +39,6 @@ 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
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';
|
|
@@ -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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-date-range-picker.mjs","sources":["../../../libs/ui-components/date-range-picker/src/date-range-picker.component.ts","../../../libs/ui-components/date-range-picker/src/date-range-picker.component.html","../../../libs/ui-components/date-range-picker/src/agorapulse-ui-components-date-range-picker.ts"],"sourcesContent":["import { LOCALE_CONFIG, LocaleService } from '@agorapulse/ngx-daterangepicker-material';\nimport {\n DatepickerDropdownComponent,\n DatepickerMode,\n FirstDayOfWeek,\n I18nDatePicker,\n Period,\n RangesConfigPresetType,\n} from '@agorapulse/ui-components/datepicker';\nimport { DropdownTriggerDirective } from '@agorapulse/ui-components/dropdown-base';\nimport { FloatingPlacement } from '@agorapulse/ui-components/floating';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { apCalendar, apChevronDown, apChevronUp, apClock, apInfo, SymbolComponent, withSymbols } from '@agorapulse/ui-symbol';\nimport { ChangeDetectionStrategy, Component, computed, input, model, output, ViewEncapsulation } from '@angular/core';\nimport dayjs from 'dayjs';\n\nexport interface DateRangePickerPreset {\n /** Stable identifier emitted by `presetSelected`, independent of the displayed label. */\n key: string;\n /** The text shown in the preset list. */\n label: string;\n /** The date range this preset selects. */\n range: [dayjs.Dayjs, dayjs.Dayjs];\n}\n\n/** The default preset list (English labels), computed relative to `today` so ranges stay fresh. */\nexport function defaultDateRangePickerPresets(today: dayjs.Dayjs = dayjs()): DateRangePickerPreset[] {\n const yesterday = today.subtract(1, 'day');\n return [\n { key: 'yesterday', label: 'Yesterday', range: [yesterday, yesterday] },\n { key: 'lastWeek', label: 'Last week', range: [today.subtract(7, 'day'), yesterday] },\n { key: 'last30Days', label: 'Last 30 days', range: [today.subtract(30, 'day'), yesterday] },\n {\n key: 'lastMonth',\n label: 'Previous month',\n range: [today.subtract(1, 'month').startOf('month'), today.subtract(1, 'month').endOf('month')],\n },\n { key: 'last90Days', label: 'Last 90 days', range: [today.subtract(90, 'day'), yesterday] },\n { key: 'last12Months', label: 'Last 12 months', range: [today.subtract(1, 'year'), yesterday] },\n { key: 'thisMonth', label: 'This month', range: [yesterday.startOf('month'), yesterday] },\n {\n key: 'lastYear',\n label: 'Previous year',\n range: [today.subtract(1, 'year').startOf('year'), today.subtract(1, 'year').endOf('year')],\n },\n ];\n}\n\nfunction timeZoneAbbreviation(timeZone: string): string {\n return (\n new Intl.DateTimeFormat('en-US', { timeZone, timeZoneName: 'short' })\n .formatToParts(new Date())\n .find(({ type }) => type === 'timeZoneName')?.value ?? ''\n );\n}\n\n/**\n * A compact date-range selector for toolbars: a trigger chip showing the selected\n * period that opens a dropdown with preset ranges and a dual-month calendar.\n *\n * @example\n * ```html\n * <ap-date-range-picker\n * [(value)]=\"period\"\n * [maxDate]=\"yesterday\"\n * timeZone=\"Europe/Paris\"\n * (presetSelected)=\"onPreset($event)\" />\n * ```\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-date-range-picker',\n templateUrl: './date-range-picker.component.html',\n styleUrls: ['./date-range-picker.component.scss'],\n imports: [DatepickerDropdownComponent, DropdownTriggerDirective, SymbolComponent, TooltipDirective],\n providers: [\n withSymbols(apCalendar, apChevronDown, apChevronUp, apClock, apInfo),\n { provide: LOCALE_CONFIG, useValue: {} },\n LocaleService,\n ],\n host: {\n class: 'ap-date-range-picker',\n },\n // Emit plain, global `.ap-date-range-picker*` classes (no Angular scoping) so the\n // styling stays framework-agnostic and readable/reusable outside Angular.\n encapsulation: ViewEncapsulation.None,\n})\nexport class DateRangePickerComponent {\n /** The selected period. Supports two-way binding via `[(value)]`. */\n readonly value = model<Period>({ startDate: undefined, endDate: undefined });\n /** The preset ranges listed in the dropdown. Defaults to `defaultDateRangePickerPresets()`. */\n readonly presets = input<DateRangePickerPreset[]>(defaultDateRangePickerPresets());\n /** Earliest selectable date. */\n readonly minDate = input<dayjs.Dayjs | undefined>(undefined);\n /** Latest selectable date. */\n readonly maxDate = input<dayjs.Dayjs | undefined>(undefined);\n /** Maximum number of days between the start and the end date. Undefined means no limit. */\n readonly maxRangeDays = input<number | undefined>(undefined);\n /** Caption shown in the panel when `maxRangeDays` is set. Defaults to an English sentence — pass a translated one. */\n readonly maxRangeDaysHint = input<string | undefined>(undefined);\n /** Locale used for the calendar and the trigger label. */\n readonly locale = input('en');\n readonly firstDayOfWeek = input<FirstDayOfWeek>('monday');\n /** dayjs format of the trigger label. */\n readonly dateFormat = input('ll');\n /** Text shown on the trigger while no period is selected. */\n readonly placeholder = input('Select period');\n /** Panel placement. Unset means derived from the anchor mode, i.e. `bottom-start`. */\n readonly placement = input<FloatingPlacement>();\n /** Label of the \"Custom\" entry in the preset list. */\n readonly customRangeLabel = input('Custom');\n /** IANA time zone name. When set, a chip with the zone's offset is shown next to the trigger. */\n readonly timeZone = input<string | undefined>(undefined);\n /** Tooltip text of the info icon shown next to the time-zone chip. */\n readonly timeZoneTooltip = input<string | undefined>(undefined);\n readonly disabled = input(false);\n /** Close the dropdown once a full period is selected. When false it stays open until backdrop click or Escape. */\n readonly closeOnSelect = input(true);\n /** Emits the `key` of the preset matching the picked period, or 'custom'. */\n readonly presetSelected = output<string>();\n\n protected readonly DatepickerMode = DatepickerMode;\n\n protected readonly rangesConfig = computed<RangesConfigPresetType>(() =>\n Object.fromEntries(this.presets().map(({ label, range }) => [label, range]))\n );\n\n protected readonly i18n = computed<I18nDatePicker>(() => ({\n ranges: {\n yesterday: 'Yesterday',\n lastWeek: 'Last Week',\n last30Days: 'Last 30 days',\n lastMonth: 'Previous month',\n thisMonth: 'This month',\n },\n customRangeLabel: this.customRangeLabel(),\n }));\n\n protected readonly formattedValue = computed(() => {\n const { startDate, endDate } = this.value();\n if (!startDate || !endDate) {\n return '';\n }\n const format = (date: dayjs.Dayjs) => date.locale(this.locale()).format(this.dateFormat());\n return `${format(startDate)} - ${format(endDate)}`;\n });\n\n protected readonly rangeHint = computed(() => {\n const days = this.maxRangeDays();\n return days ? (this.maxRangeDaysHint() ?? `Maximum period: ${days} days`) : undefined;\n });\n\n protected readonly timeZoneOffset = computed(() => {\n const timeZone = this.timeZone();\n return timeZone ? timeZoneAbbreviation(timeZone) : '';\n });\n\n protected onPeriodSelected(period: Period): void {\n this.value.set(period);\n this.presetSelected.emit(this.matchPresetKey(period));\n }\n\n private matchPresetKey({ startDate, endDate }: Period): string {\n const match = this.presets().find(({ range: [start, end] }) => startDate?.isSame(start, 'day') && endDate?.isSame(end, 'day'));\n return match?.key ?? 'custom';\n }\n}\n","<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\"\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BAAA,EAAA,eAAA,EAAA,8BAAA,EAAA,oBAAA,EAAA,4BAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAazF,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAlBpC,SAAS;AACW,YAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,sBAAsB,WAGvB,CAAC,2BAA2B,EAAE,wBAAwB,EAAE,eAAe,EAAE,gBAAgB,CAAC,EAAA,SAAA,EACxF;wBACP,WAAW,CAAC,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC;AACpE,wBAAA,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,EAAE;wBACxC,aAAa;qBAChB,EAAA,IAAA,EACK;AACF,wBAAA,KAAK,EAAE,sBAAsB;qBAChC,EAAA,aAAA,EAGc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,u+DAAA,EAAA,MAAA,EAAA,CAAA,myCAAA,CAAA,EAAA;;;AErFzC;;AAEG;;;;"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import * as _floating_ui_utils from '@floating-ui/utils';
|
|
2
|
-
import * as _angular_core from '@angular/core';
|
|
3
|
-
import { Period, FirstDayOfWeek, DatepickerMode, RangesConfigPresetType, I18nDatePicker } from '@agorapulse/ui-components/datepicker';
|
|
4
|
-
import dayjs from 'dayjs';
|
|
5
|
-
|
|
6
|
-
interface DateRangePickerPreset {
|
|
7
|
-
/** Stable identifier emitted by `presetSelected`, independent of the displayed label. */
|
|
8
|
-
key: string;
|
|
9
|
-
/** The text shown in the preset list. */
|
|
10
|
-
label: string;
|
|
11
|
-
/** The date range this preset selects. */
|
|
12
|
-
range: [dayjs.Dayjs, dayjs.Dayjs];
|
|
13
|
-
}
|
|
14
|
-
/** The default preset list (English labels), computed relative to `today` so ranges stay fresh. */
|
|
15
|
-
declare function defaultDateRangePickerPresets(today?: dayjs.Dayjs): DateRangePickerPreset[];
|
|
16
|
-
/**
|
|
17
|
-
* A compact date-range selector for toolbars: a trigger chip showing the selected
|
|
18
|
-
* period that opens a dropdown with preset ranges and a dual-month calendar.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```html
|
|
22
|
-
* <ap-date-range-picker
|
|
23
|
-
* [(value)]="period"
|
|
24
|
-
* [maxDate]="yesterday"
|
|
25
|
-
* timeZone="Europe/Paris"
|
|
26
|
-
* (presetSelected)="onPreset($event)" />
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
declare class DateRangePickerComponent {
|
|
30
|
-
/** The selected period. Supports two-way binding via `[(value)]`. */
|
|
31
|
-
readonly value: _angular_core.ModelSignal<Period>;
|
|
32
|
-
/** The preset ranges listed in the dropdown. Defaults to `defaultDateRangePickerPresets()`. */
|
|
33
|
-
readonly presets: _angular_core.InputSignal<DateRangePickerPreset[]>;
|
|
34
|
-
/** Earliest selectable date. */
|
|
35
|
-
readonly minDate: _angular_core.InputSignal<dayjs.Dayjs | undefined>;
|
|
36
|
-
/** Latest selectable date. */
|
|
37
|
-
readonly maxDate: _angular_core.InputSignal<dayjs.Dayjs | undefined>;
|
|
38
|
-
/** Maximum number of days between the start and the end date. Undefined means no limit. */
|
|
39
|
-
readonly maxRangeDays: _angular_core.InputSignal<number | undefined>;
|
|
40
|
-
/** Caption shown in the panel when `maxRangeDays` is set. Defaults to an English sentence — pass a translated one. */
|
|
41
|
-
readonly maxRangeDaysHint: _angular_core.InputSignal<string | undefined>;
|
|
42
|
-
/** Locale used for the calendar and the trigger label. */
|
|
43
|
-
readonly locale: _angular_core.InputSignal<string>;
|
|
44
|
-
readonly firstDayOfWeek: _angular_core.InputSignal<FirstDayOfWeek>;
|
|
45
|
-
/** dayjs format of the trigger label. */
|
|
46
|
-
readonly dateFormat: _angular_core.InputSignal<string>;
|
|
47
|
-
/** Text shown on the trigger while no period is selected. */
|
|
48
|
-
readonly placeholder: _angular_core.InputSignal<string>;
|
|
49
|
-
/** Panel placement. Unset means derived from the anchor mode, i.e. `bottom-start`. */
|
|
50
|
-
readonly placement: _angular_core.InputSignal<_floating_ui_utils.Placement | undefined>;
|
|
51
|
-
/** Label of the "Custom" entry in the preset list. */
|
|
52
|
-
readonly customRangeLabel: _angular_core.InputSignal<string>;
|
|
53
|
-
/** IANA time zone name. When set, a chip with the zone's offset is shown next to the trigger. */
|
|
54
|
-
readonly timeZone: _angular_core.InputSignal<string | undefined>;
|
|
55
|
-
/** Tooltip text of the info icon shown next to the time-zone chip. */
|
|
56
|
-
readonly timeZoneTooltip: _angular_core.InputSignal<string | undefined>;
|
|
57
|
-
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
58
|
-
/** Close the dropdown once a full period is selected. When false it stays open until backdrop click or Escape. */
|
|
59
|
-
readonly closeOnSelect: _angular_core.InputSignal<boolean>;
|
|
60
|
-
/** Emits the `key` of the preset matching the picked period, or 'custom'. */
|
|
61
|
-
readonly presetSelected: _angular_core.OutputEmitterRef<string>;
|
|
62
|
-
protected readonly DatepickerMode: typeof DatepickerMode;
|
|
63
|
-
protected readonly rangesConfig: _angular_core.Signal<RangesConfigPresetType>;
|
|
64
|
-
protected readonly i18n: _angular_core.Signal<I18nDatePicker>;
|
|
65
|
-
protected readonly formattedValue: _angular_core.Signal<string>;
|
|
66
|
-
protected readonly rangeHint: _angular_core.Signal<string | undefined>;
|
|
67
|
-
protected readonly timeZoneOffset: _angular_core.Signal<string>;
|
|
68
|
-
protected onPeriodSelected(period: Period): void;
|
|
69
|
-
private matchPresetKey;
|
|
70
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DateRangePickerComponent, never>;
|
|
71
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DateRangePickerComponent, "ap-date-range-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "presets": { "alias": "presets"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "maxRangeDays": { "alias": "maxRangeDays"; "required": false; "isSignal": true; }; "maxRangeDaysHint": { "alias": "maxRangeDaysHint"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "dateFormat"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "customRangeLabel": { "alias": "customRangeLabel"; "required": false; "isSignal": true; }; "timeZone": { "alias": "timeZone"; "required": false; "isSignal": true; }; "timeZoneTooltip": { "alias": "timeZoneTooltip"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "presetSelected": "presetSelected"; }, never, never, true, never>;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export { DateRangePickerComponent, defaultDateRangePickerPresets };
|
|
75
|
-
export type { DateRangePickerPreset };
|