@odx/angular 5.5.5 → 5.6.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/CHANGELOG.md +12 -0
- package/components/calendar/lib/calendar.component.d.ts +9 -3
- package/components/calendar/lib/calendar.config.d.ts +11 -0
- package/components/calendar/lib/calendar.service.d.ts +10 -4
- package/components/calendar/lib/components/calendar-month/calendar-month.component.d.ts +1 -3
- package/components/calendar/lib/daterange.service.d.ts +14 -0
- package/components/calendar/lib/directives/calendar-cell.directive.d.ts +19 -4
- package/components/calendar/lib/directives/calendar-view.directive.d.ts +5 -2
- package/components/calendar/lib/models/date-range.d.ts +18 -0
- package/components/calendar/lib/models/index.d.ts +3 -0
- package/components/calendar/lib/models/selected-date.d.ts +9 -0
- package/components/calendar/lib/models/selection-mode.d.ts +4 -0
- package/components/calendar/lib/pipes/date-label.pipe.d.ts +1 -0
- package/components/calendar/lib/utils/check-cell-in-range.d.ts +7 -0
- package/components/calendar/lib/utils/index.d.ts +1 -0
- package/components/calendar/lib/utils/validate-daterange.d.ts +1 -0
- package/components/daterangepicker/README.md +3 -0
- package/components/daterangepicker/index.d.ts +7 -0
- package/components/daterangepicker/lib/daterangepicker.component.d.ts +40 -0
- package/components/daterangepicker/lib/daterangepicker.config.d.ts +29 -0
- package/components/daterangepicker/lib/daterangepicker.module.d.ts +11 -0
- package/components/daterangepicker/lib/directives/daterangepicker-input-control.directive.d.ts +25 -0
- package/components/daterangepicker/lib/directives/index.d.ts +1 -0
- package/components/daterangepicker/lib/models/daterangepicker-input-date-order.d.ts +1 -0
- package/components/daterangepicker/lib/models/daterangepicker-input-pattern.d.ts +1 -0
- package/components/daterangepicker/lib/models/index.d.ts +2 -0
- package/components/daterangepicker/lib/range.validator.d.ts +10 -0
- package/components/daterangepicker/lib/required.validator.d.ts +10 -0
- package/components/daterangepicker/lib/utils/get-daterangepicker-input-pattern.d.ts +3 -0
- package/components/daterangepicker/lib/utils/get-daterangepicker-input-value-as-date.d.ts +2 -0
- package/components/daterangepicker/lib/utils/index.d.ts +2 -0
- package/esm2022/cdk/active-indicator/lib/active-indicator.directive.mjs +2 -2
- package/esm2022/components/calendar/lib/calendar.component.mjs +25 -11
- package/esm2022/components/calendar/lib/calendar.config.mjs +3 -1
- package/esm2022/components/calendar/lib/calendar.service.mjs +28 -13
- package/esm2022/components/calendar/lib/components/calendar-month/calendar-month.component.mjs +6 -10
- package/esm2022/components/calendar/lib/components/calendar-year/calendar-year.component.mjs +4 -4
- package/esm2022/components/calendar/lib/components/calendar-years/calendar-years.component.mjs +4 -4
- package/esm2022/components/calendar/lib/daterange.service.mjs +57 -0
- package/esm2022/components/calendar/lib/directives/calendar-cell.directive.mjs +85 -5
- package/esm2022/components/calendar/lib/directives/calendar-view.directive.mjs +8 -2
- package/esm2022/components/calendar/lib/models/date-range.mjs +7 -0
- package/esm2022/components/calendar/lib/models/index.mjs +4 -1
- package/esm2022/components/calendar/lib/models/selected-date.mjs +5 -0
- package/esm2022/components/calendar/lib/models/selection-mode.mjs +6 -0
- package/esm2022/components/calendar/lib/services/calendar-month.service.mjs +1 -1
- package/esm2022/components/calendar/lib/utils/check-cell-in-range.mjs +28 -0
- package/esm2022/components/calendar/lib/utils/index.mjs +2 -1
- package/esm2022/components/calendar/lib/utils/validate-daterange.mjs +5 -0
- package/esm2022/components/datepicker/lib/datepicker.component.mjs +2 -2
- package/esm2022/components/daterangepicker/index.mjs +8 -0
- package/esm2022/components/daterangepicker/lib/daterangepicker.component.mjs +174 -0
- package/esm2022/components/daterangepicker/lib/daterangepicker.config.mjs +7 -0
- package/esm2022/components/daterangepicker/lib/daterangepicker.module.mjs +21 -0
- package/esm2022/components/daterangepicker/lib/directives/daterangepicker-input-control.directive.mjs +65 -0
- package/esm2022/components/daterangepicker/lib/directives/index.mjs +2 -0
- package/esm2022/components/daterangepicker/lib/models/daterangepicker-input-date-order.mjs +2 -0
- package/esm2022/components/daterangepicker/lib/models/daterangepicker-input-pattern.mjs +2 -0
- package/esm2022/components/daterangepicker/lib/models/index.mjs +3 -0
- package/esm2022/components/daterangepicker/lib/range.validator.mjs +37 -0
- package/esm2022/components/daterangepicker/lib/required.validator.mjs +34 -0
- package/esm2022/components/daterangepicker/lib/utils/get-daterangepicker-input-pattern.mjs +16 -0
- package/esm2022/components/daterangepicker/lib/utils/get-daterangepicker-input-value-as-date.mjs +30 -0
- package/esm2022/components/daterangepicker/lib/utils/index.mjs +3 -0
- package/esm2022/components/daterangepicker/odx-angular-components-daterangepicker.mjs +5 -0
- package/esm2022/components/list/lib/components/expandable-list-item/expandable-list-item.component.mjs +3 -3
- package/esm2022/utils/lib/helpers/event-manager.mjs +27 -8
- package/fesm2022/odx-angular-cdk-active-indicator.mjs.map +1 -1
- package/fesm2022/odx-angular-components-calendar.mjs +261 -56
- package/fesm2022/odx-angular-components-calendar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-datepicker.mjs +1 -1
- package/fesm2022/odx-angular-components-datepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-daterangepicker.mjs +364 -0
- package/fesm2022/odx-angular-components-daterangepicker.mjs.map +1 -0
- package/fesm2022/odx-angular-components-list.mjs +2 -2
- package/fesm2022/odx-angular-components-list.mjs.map +1 -1
- package/fesm2022/odx-angular-utils.mjs +33 -16
- package/fesm2022/odx-angular-utils.mjs.map +1 -1
- package/package.json +7 -1
- package/utils/lib/helpers/event-manager.d.ts +3 -1
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { __decorate, __metadata } from 'tslib';
|
|
2
|
+
import * as i1$1 from '@angular/cdk/a11y';
|
|
3
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { inject, EventEmitter, Directive, Output, HostListener, ElementRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ViewChild, ContentChildren, forwardRef, NgModule } from '@angular/core';
|
|
6
|
+
import * as i1 from '@odx/angular';
|
|
7
|
+
import { ReadonlyController, WithTabIndex, detectControllerChanges, CoreModule } from '@odx/angular';
|
|
8
|
+
import { InputControlDirective, CustomFormControl } from '@odx/angular/cdk/custom-form-control';
|
|
9
|
+
import { ActionGroupComponent } from '@odx/angular/components/action-group';
|
|
10
|
+
import { ButtonComponent } from '@odx/angular/components/button';
|
|
11
|
+
import { provideCalendarConfig, CalendarSelectionMode, CalendarComponent, validateDaterange } from '@odx/angular/components/calendar';
|
|
12
|
+
import * as i2 from '@odx/angular/components/dropdown';
|
|
13
|
+
import { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';
|
|
14
|
+
import { IconComponent } from '@odx/angular/components/icon';
|
|
15
|
+
import { CSSComponent } from '@odx/angular/internal';
|
|
16
|
+
import { createConfigTokens, untilDestroyed, injectElement, deferFn } from '@odx/angular/utils';
|
|
17
|
+
import { toDate, isValid, startOfDay, format } from 'date-fns';
|
|
18
|
+
import { DatepickerInputDateOrder, DatepickerInputFormat, DatepickerInputMask } from '@odx/angular/components/datepicker';
|
|
19
|
+
export { DatepickerInputDateOrder as DaterangepickerInputDateOrder, DatepickerInputFormat as DaterangepickerInputFormat, DatepickerInputMask as DaterangepickerInputMask } from '@odx/angular/components/datepicker';
|
|
20
|
+
import { NgxMaskPipe, provideNgxMask } from 'ngx-mask';
|
|
21
|
+
import { fromEvent, distinctUntilChanged, tap, map } from 'rxjs';
|
|
22
|
+
import { NG_VALIDATORS } from '@angular/forms';
|
|
23
|
+
|
|
24
|
+
const { DaterangepickerConfig, DaterangepickerDefaultConfig, injectDaterangepickerConfig, provideDaterangepickerConfig } = createConfigTokens('Daterangepicker', '@odx/angular/components/daterangepicker', {
|
|
25
|
+
inputDateOrder: DatepickerInputDateOrder.DMY,
|
|
26
|
+
inputDateSeparator: '.',
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
function getDaterangepickerInputPattern({ inputDateOrder, inputDateSeparator }, pattern) {
|
|
30
|
+
const patternList = {
|
|
31
|
+
[DatepickerInputDateOrder.DMY]: `${pattern.DAYS}${inputDateSeparator}${pattern.MONTH}${inputDateSeparator}${pattern.YEAR}`,
|
|
32
|
+
[DatepickerInputDateOrder.MDY]: `${pattern.MONTH}${inputDateSeparator}${pattern.DAYS}${inputDateSeparator}${pattern.YEAR}`,
|
|
33
|
+
[DatepickerInputDateOrder.YMD]: `${pattern.YEAR}${inputDateSeparator}${pattern.MONTH}${inputDateSeparator}${pattern.DAYS}`,
|
|
34
|
+
};
|
|
35
|
+
return patternList[inputDateOrder];
|
|
36
|
+
}
|
|
37
|
+
function getDaterangepickerInputFormat(config) {
|
|
38
|
+
return getDaterangepickerInputPattern(config, DatepickerInputFormat);
|
|
39
|
+
}
|
|
40
|
+
function getDaterangepickerInputMask(config) {
|
|
41
|
+
return getDaterangepickerInputPattern(config, DatepickerInputMask);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const functionList = {
|
|
45
|
+
[DatepickerInputDateOrder.DMY]: (splittedValue) => {
|
|
46
|
+
const [day, month, year] = splittedValue;
|
|
47
|
+
return { month, day, year };
|
|
48
|
+
},
|
|
49
|
+
[DatepickerInputDateOrder.MDY]: (splittedValue) => {
|
|
50
|
+
const [month, day, year] = splittedValue;
|
|
51
|
+
return { month, day, year };
|
|
52
|
+
},
|
|
53
|
+
[DatepickerInputDateOrder.YMD]: (splittedValue) => {
|
|
54
|
+
const [year, month, day] = splittedValue;
|
|
55
|
+
return { month, day, year };
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
function getDateCandidate({ inputDateOrder, inputDateSeparator }, value) {
|
|
59
|
+
const splittedValue = value.split(inputDateSeparator);
|
|
60
|
+
const { month, day, year } = functionList[inputDateOrder](splittedValue);
|
|
61
|
+
const isDateCandidateInvalid = !month || !day || !year;
|
|
62
|
+
return isDateCandidateInvalid ? null : `${month}.${day}.${year}`;
|
|
63
|
+
}
|
|
64
|
+
function getDaterangepickerInputValueAsDate(config, value) {
|
|
65
|
+
const dateCandidate = getDateCandidate(config, value);
|
|
66
|
+
if (!dateCandidate)
|
|
67
|
+
return null;
|
|
68
|
+
const date = toDate(Date.parse(dateCandidate));
|
|
69
|
+
return isValid(date) ? date : null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let DaterangepickerInputControlDirective = class DaterangepickerInputControlDirective extends InputControlDirective {
|
|
73
|
+
constructor() {
|
|
74
|
+
super(...arguments);
|
|
75
|
+
this.maskConfig = { validation: false, leadZeroDateTime: true };
|
|
76
|
+
this.readonlyController = ReadonlyController.inject();
|
|
77
|
+
this.config = injectDaterangepickerConfig();
|
|
78
|
+
this.inputMask = getDaterangepickerInputMask(this.config);
|
|
79
|
+
this.ngxMaskPipe = inject(NgxMaskPipe);
|
|
80
|
+
this.focused = new EventEmitter();
|
|
81
|
+
this.valueChange$ = fromEvent(this.element.nativeElement, 'input').pipe(distinctUntilChanged(), tap(() => this.applyMask()), map(() => this.nativeElementValue));
|
|
82
|
+
}
|
|
83
|
+
applyMask() {
|
|
84
|
+
this.nativeElementValue = this.ngxMaskPipe.transform(this.nativeElementValue, this.inputMask, this.maskConfig);
|
|
85
|
+
}
|
|
86
|
+
get valueAsDate() {
|
|
87
|
+
return getDaterangepickerInputValueAsDate(this.config, this.nativeElementValue);
|
|
88
|
+
}
|
|
89
|
+
get placeholder() {
|
|
90
|
+
return getDaterangepickerInputFormat(this.config).toUpperCase();
|
|
91
|
+
}
|
|
92
|
+
handleFocusIn() {
|
|
93
|
+
this.focused.emit(true);
|
|
94
|
+
}
|
|
95
|
+
handleFocusOut() {
|
|
96
|
+
this.focused.emit(false);
|
|
97
|
+
}
|
|
98
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerInputControlDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
99
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DaterangepickerInputControlDirective, isStandalone: true, selector: "input[odxDaterangepickerControl],input[odxDaterangepickerStartDateControl], input[odxDaterangepickerEndDateControl]", outputs: { focused: "focused" }, host: { listeners: { "focusin": "handleFocusIn()", "focusout": "handleFocusOut()" }, properties: { "attr.readonly": "readonlyController?.readonly || null", "attr.placeholder": "placeholder" } }, providers: [ReadonlyController.connect(), provideNgxMask(), NgxMaskPipe], usesInheritance: true, hostDirectives: [{ directive: i1.WithTabIndex }], ngImport: i0 }); }
|
|
100
|
+
};
|
|
101
|
+
DaterangepickerInputControlDirective = __decorate([
|
|
102
|
+
CSSComponent('daterangepicker__control')
|
|
103
|
+
], DaterangepickerInputControlDirective);
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerInputControlDirective, decorators: [{
|
|
105
|
+
type: Directive,
|
|
106
|
+
args: [{
|
|
107
|
+
standalone: true,
|
|
108
|
+
selector: 'input[odxDaterangepickerControl],input[odxDaterangepickerStartDateControl], input[odxDaterangepickerEndDateControl]',
|
|
109
|
+
host: {
|
|
110
|
+
'[attr.readonly]': 'readonlyController?.readonly || null',
|
|
111
|
+
'[attr.placeholder]': 'placeholder',
|
|
112
|
+
},
|
|
113
|
+
providers: [ReadonlyController.connect(), provideNgxMask(), NgxMaskPipe],
|
|
114
|
+
hostDirectives: [WithTabIndex],
|
|
115
|
+
}]
|
|
116
|
+
}], propDecorators: { focused: [{
|
|
117
|
+
type: Output
|
|
118
|
+
}], handleFocusIn: [{
|
|
119
|
+
type: HostListener,
|
|
120
|
+
args: ['focusin']
|
|
121
|
+
}], handleFocusOut: [{
|
|
122
|
+
type: HostListener,
|
|
123
|
+
args: ['focusout']
|
|
124
|
+
}] } });
|
|
125
|
+
|
|
126
|
+
let DaterangepickerComponent = class DaterangepickerComponent extends CustomFormControl {
|
|
127
|
+
get isOpen() {
|
|
128
|
+
return !!this.dropdown.isOpen;
|
|
129
|
+
}
|
|
130
|
+
get startDateField() {
|
|
131
|
+
const [startDate, _endDate] = this.dateFields;
|
|
132
|
+
return startDate;
|
|
133
|
+
}
|
|
134
|
+
get endDateField() {
|
|
135
|
+
const [_startDate, endDate] = this.dateFields;
|
|
136
|
+
return endDate;
|
|
137
|
+
}
|
|
138
|
+
constructor() {
|
|
139
|
+
super(null);
|
|
140
|
+
this.takeUntilDestroyed = untilDestroyed();
|
|
141
|
+
this.config = injectDaterangepickerConfig();
|
|
142
|
+
this.element = injectElement();
|
|
143
|
+
this.today = new Date();
|
|
144
|
+
this.filterFn = null;
|
|
145
|
+
this.minDate = null;
|
|
146
|
+
this.maxDate = null;
|
|
147
|
+
this.dropdownPosition = 'bottom';
|
|
148
|
+
this.selectedChange = new EventEmitter();
|
|
149
|
+
detectControllerChanges(this).subscribe();
|
|
150
|
+
}
|
|
151
|
+
ngAfterViewInit() {
|
|
152
|
+
this.updateWidth(this.startDateField, this.startDateMirror);
|
|
153
|
+
this.updateWidth(this.endDateField, this.endDateMirror);
|
|
154
|
+
this.handleDateFieldChanges();
|
|
155
|
+
this.handleDateFieldFocus();
|
|
156
|
+
deferFn(() => {
|
|
157
|
+
if (!this.value || !this.value.start || !this.value.end)
|
|
158
|
+
return;
|
|
159
|
+
this.updateValue({
|
|
160
|
+
start: startOfDay(this.value.start),
|
|
161
|
+
end: startOfDay(this.value.end),
|
|
162
|
+
});
|
|
163
|
+
this.updateStartDateField(this.value.start);
|
|
164
|
+
this.updateEndDateField(this.value.end);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
selectDateRange(value) {
|
|
168
|
+
if (!value || !value.start || !value.end)
|
|
169
|
+
return;
|
|
170
|
+
this.updateValue(value);
|
|
171
|
+
this.updateStartDateField(value.start);
|
|
172
|
+
this.updateEndDateField(value.end);
|
|
173
|
+
this.selectedChange.emit(value);
|
|
174
|
+
this.dropdown.close();
|
|
175
|
+
}
|
|
176
|
+
handleDateFieldChanges() {
|
|
177
|
+
this.startDateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe((value) => {
|
|
178
|
+
this.updateValue({ start: this.startDateField?.valueAsDate ?? null, end: this.endDateField?.valueAsDate ?? null });
|
|
179
|
+
this.updateWidth(this.startDateField, this.startDateMirror, value);
|
|
180
|
+
});
|
|
181
|
+
this.endDateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe((value) => {
|
|
182
|
+
this.updateValue({ start: this.startDateField?.valueAsDate ?? null, end: this.endDateField?.valueAsDate ?? null });
|
|
183
|
+
this.updateWidth(this.endDateField, this.endDateMirror, value);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
updateWidth(target, source, value = '') {
|
|
187
|
+
const compensationPx = 2;
|
|
188
|
+
source.nativeElement.textContent = value || target?.placeholder || null;
|
|
189
|
+
if (target) {
|
|
190
|
+
target.element.nativeElement.style.width = `${source.nativeElement.offsetWidth + compensationPx}px`;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
handleDateFieldFocus() {
|
|
194
|
+
this.startDateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {
|
|
195
|
+
if (!isFocused) {
|
|
196
|
+
this.onTouched();
|
|
197
|
+
}
|
|
198
|
+
if (this.isOpen) {
|
|
199
|
+
this.dropdown.close();
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
this.endDateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {
|
|
203
|
+
if (!isFocused) {
|
|
204
|
+
this.onTouched();
|
|
205
|
+
}
|
|
206
|
+
if (this.isOpen) {
|
|
207
|
+
this.dropdown.close();
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
openDaterangepicker(event) {
|
|
212
|
+
event.stopPropagation();
|
|
213
|
+
if (this.isReadonly || this.isDisabled)
|
|
214
|
+
return;
|
|
215
|
+
this.dropdown.open(event);
|
|
216
|
+
}
|
|
217
|
+
updateStartDateField(date) {
|
|
218
|
+
if (!this.startDateField)
|
|
219
|
+
return;
|
|
220
|
+
const dateFormat = getDaterangepickerInputFormat(this.config);
|
|
221
|
+
this.startDateField.nativeElementValue = format(date, dateFormat);
|
|
222
|
+
this.updateWidth(this.startDateField, this.startDateMirror, format(date, dateFormat));
|
|
223
|
+
}
|
|
224
|
+
updateEndDateField(date) {
|
|
225
|
+
if (!this.endDateField)
|
|
226
|
+
return;
|
|
227
|
+
const dateFormat = getDaterangepickerInputFormat(this.config);
|
|
228
|
+
this.endDateField.nativeElementValue = format(date, dateFormat);
|
|
229
|
+
this.updateWidth(this.endDateField, this.endDateMirror, format(date, dateFormat));
|
|
230
|
+
}
|
|
231
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
232
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DaterangepickerComponent, isStandalone: true, selector: "odx-daterangepicker", inputs: { filterFn: "filterFn", minDate: "minDate", maxDate: "maxDate", dropdownPosition: "dropdownPosition" }, outputs: { selectedChange: "selectedChange" }, host: { listeners: { "keydown.alt.ArrowDown": "openDaterangepicker($event)" } }, providers: [
|
|
233
|
+
provideCalendarConfig({
|
|
234
|
+
displayAdjacentDays: false,
|
|
235
|
+
selectionMode: CalendarSelectionMode.DateRange,
|
|
236
|
+
}),
|
|
237
|
+
], queries: [{ propertyName: "dateFields", predicate: DaterangepickerInputControlDirective }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: DropdownDirective, descendants: true }, { propertyName: "dropdownTriggerElement", first: true, predicate: ["dropdownTrigger"], descendants: true, read: ElementRef, static: true }, { propertyName: "startDateMirror", first: true, predicate: ["startDateMirror"], descendants: true, read: ElementRef, static: true }, { propertyName: "endDateMirror", first: true, predicate: ["endDateMirror"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<span #startDateMirror role=\"none\" class=\"odx-daterangepicker__mirror\"></span>\n<ng-content select=\"input[odxDaterangepickerStartDateControl]\"></ng-content>\n<span role=\"none\" class=\"odx-daterangepicker__separator\">\u2013</span>\n<span #endDateMirror role=\"none\" class=\"odx-daterangepicker__mirror\"></span>\n<ng-content select=\"input[odxDaterangepickerEndDateControl]\"></ng-content>\n\n<odx-action-group class=\"odx-daterangepicker__trigger-wrapper\">\n <button\n #dropdownTrigger\n class=\"odx-daterangepicker__trigger\"\n odxButton\n size=\"small\"\n variant=\"ghost\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: dropdownPosition }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n >\n <odx-icon name=\"calendar\"></odx-icon>\n </button>\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"today\"\n [selectedDateRange]=\"value\"\n (selectedDateRangeChange)=\"selectDateRange($event)\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n ></odx-calendar>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: CalendarComponent, selector: "odx-calendar", inputs: ["selectedDate", "selectedDateRange", "minDate", "maxDate", "filterFn"], outputs: ["selectedDateChange", "selectedDateRangeChange"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i2.DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
238
|
+
};
|
|
239
|
+
DaterangepickerComponent = __decorate([
|
|
240
|
+
CSSComponent('daterangepicker'),
|
|
241
|
+
__metadata("design:paramtypes", [])
|
|
242
|
+
], DaterangepickerComponent);
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerComponent, decorators: [{
|
|
244
|
+
type: Component,
|
|
245
|
+
args: [{ selector: 'odx-daterangepicker', standalone: true, imports: [A11yModule, ActionGroupComponent, ButtonComponent, CalendarComponent, DropdownModule, IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
246
|
+
provideCalendarConfig({
|
|
247
|
+
displayAdjacentDays: false,
|
|
248
|
+
selectionMode: CalendarSelectionMode.DateRange,
|
|
249
|
+
}),
|
|
250
|
+
], template: "<span #startDateMirror role=\"none\" class=\"odx-daterangepicker__mirror\"></span>\n<ng-content select=\"input[odxDaterangepickerStartDateControl]\"></ng-content>\n<span role=\"none\" class=\"odx-daterangepicker__separator\">\u2013</span>\n<span #endDateMirror role=\"none\" class=\"odx-daterangepicker__mirror\"></span>\n<ng-content select=\"input[odxDaterangepickerEndDateControl]\"></ng-content>\n\n<odx-action-group class=\"odx-daterangepicker__trigger-wrapper\">\n <button\n #dropdownTrigger\n class=\"odx-daterangepicker__trigger\"\n odxButton\n size=\"small\"\n variant=\"ghost\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: dropdownPosition }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n >\n <odx-icon name=\"calendar\"></odx-icon>\n </button>\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"today\"\n [selectedDateRange]=\"value\"\n (selectedDateRangeChange)=\"selectDateRange($event)\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n ></odx-calendar>\n</ng-template>\n" }]
|
|
251
|
+
}], ctorParameters: function () { return []; }, propDecorators: { filterFn: [{
|
|
252
|
+
type: Input
|
|
253
|
+
}], minDate: [{
|
|
254
|
+
type: Input
|
|
255
|
+
}], maxDate: [{
|
|
256
|
+
type: Input
|
|
257
|
+
}], dropdownPosition: [{
|
|
258
|
+
type: Input
|
|
259
|
+
}], selectedChange: [{
|
|
260
|
+
type: Output
|
|
261
|
+
}], dropdown: [{
|
|
262
|
+
type: ViewChild,
|
|
263
|
+
args: [DropdownDirective]
|
|
264
|
+
}], dropdownTriggerElement: [{
|
|
265
|
+
type: ViewChild,
|
|
266
|
+
args: ['dropdownTrigger', { read: ElementRef, static: true }]
|
|
267
|
+
}], dateFields: [{
|
|
268
|
+
type: ContentChildren,
|
|
269
|
+
args: [DaterangepickerInputControlDirective]
|
|
270
|
+
}], startDateMirror: [{
|
|
271
|
+
type: ViewChild,
|
|
272
|
+
args: ['startDateMirror', { read: ElementRef, static: true }]
|
|
273
|
+
}], endDateMirror: [{
|
|
274
|
+
type: ViewChild,
|
|
275
|
+
args: ['endDateMirror', { read: ElementRef, static: true }]
|
|
276
|
+
}], openDaterangepicker: [{
|
|
277
|
+
type: HostListener,
|
|
278
|
+
args: ['keydown.alt.ArrowDown', ['$event']]
|
|
279
|
+
}] } });
|
|
280
|
+
|
|
281
|
+
class DaterangepickerRangeValidator {
|
|
282
|
+
validate({ value }) {
|
|
283
|
+
const valuesArePresent = value && value.start && value.end;
|
|
284
|
+
const isValidRange = value && value.start && value.end && validateDaterange(value.start, value.end);
|
|
285
|
+
return (valuesArePresent &&
|
|
286
|
+
!isValidRange && {
|
|
287
|
+
invalidRange: true,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerRangeValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
291
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DaterangepickerRangeValidator, isStandalone: true, selector: "odx-daterangepicker[formControlName], odx-daterangepicker[formControl], odx-daterangepicker[ngModel]", providers: [
|
|
292
|
+
{
|
|
293
|
+
provide: NG_VALIDATORS,
|
|
294
|
+
useExisting: forwardRef(() => DaterangepickerRangeValidator),
|
|
295
|
+
multi: true,
|
|
296
|
+
},
|
|
297
|
+
], ngImport: i0 }); }
|
|
298
|
+
}
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerRangeValidator, decorators: [{
|
|
300
|
+
type: Directive,
|
|
301
|
+
args: [{
|
|
302
|
+
standalone: true,
|
|
303
|
+
selector: 'odx-daterangepicker[formControlName], odx-daterangepicker[formControl], odx-daterangepicker[ngModel]',
|
|
304
|
+
providers: [
|
|
305
|
+
{
|
|
306
|
+
provide: NG_VALIDATORS,
|
|
307
|
+
useExisting: forwardRef(() => DaterangepickerRangeValidator),
|
|
308
|
+
multi: true,
|
|
309
|
+
},
|
|
310
|
+
],
|
|
311
|
+
}]
|
|
312
|
+
}] });
|
|
313
|
+
|
|
314
|
+
class DaterangepickerRequiredValidator {
|
|
315
|
+
validate({ value }) {
|
|
316
|
+
const isValid = value && value.start && value.end;
|
|
317
|
+
return (!isValid && {
|
|
318
|
+
required: true,
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerRequiredValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
322
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DaterangepickerRequiredValidator, isStandalone: true, selector: "odx-daterangepicker[required][formControlName], odx-daterangepicker[required][formControl], odx-daterangepicker[required][ngModel]", providers: [
|
|
323
|
+
{
|
|
324
|
+
provide: NG_VALIDATORS,
|
|
325
|
+
useExisting: forwardRef(() => DaterangepickerRequiredValidator),
|
|
326
|
+
multi: true,
|
|
327
|
+
},
|
|
328
|
+
], ngImport: i0 }); }
|
|
329
|
+
}
|
|
330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerRequiredValidator, decorators: [{
|
|
331
|
+
type: Directive,
|
|
332
|
+
args: [{
|
|
333
|
+
standalone: true,
|
|
334
|
+
selector: 'odx-daterangepicker[required][formControlName], odx-daterangepicker[required][formControl], odx-daterangepicker[required][ngModel]',
|
|
335
|
+
providers: [
|
|
336
|
+
{
|
|
337
|
+
provide: NG_VALIDATORS,
|
|
338
|
+
useExisting: forwardRef(() => DaterangepickerRequiredValidator),
|
|
339
|
+
multi: true,
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
}]
|
|
343
|
+
}] });
|
|
344
|
+
|
|
345
|
+
const modules = [DaterangepickerComponent, DaterangepickerInputControlDirective, DaterangepickerRangeValidator, DaterangepickerRequiredValidator];
|
|
346
|
+
class DaterangepickerModule {
|
|
347
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
348
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerModule, imports: [DaterangepickerComponent, DaterangepickerInputControlDirective, DaterangepickerRangeValidator, DaterangepickerRequiredValidator], exports: [CoreModule, DaterangepickerComponent, DaterangepickerInputControlDirective, DaterangepickerRangeValidator, DaterangepickerRequiredValidator] }); }
|
|
349
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerModule, imports: [DaterangepickerComponent, CoreModule] }); }
|
|
350
|
+
}
|
|
351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DaterangepickerModule, decorators: [{
|
|
352
|
+
type: NgModule,
|
|
353
|
+
args: [{
|
|
354
|
+
imports: modules,
|
|
355
|
+
exports: [CoreModule, ...modules],
|
|
356
|
+
}]
|
|
357
|
+
}] });
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Generated bundle index. Do not edit.
|
|
361
|
+
*/
|
|
362
|
+
|
|
363
|
+
export { DaterangepickerComponent, DaterangepickerConfig, DaterangepickerDefaultConfig, DaterangepickerInputControlDirective, DaterangepickerModule, DaterangepickerRangeValidator, DaterangepickerRequiredValidator, injectDaterangepickerConfig, provideDaterangepickerConfig };
|
|
364
|
+
//# sourceMappingURL=odx-angular-components-daterangepicker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odx-angular-components-daterangepicker.mjs","sources":["../../../../libs/angular/components/daterangepicker/src/lib/daterangepicker.config.ts","../../../../libs/angular/components/daterangepicker/src/lib/utils/get-daterangepicker-input-pattern.ts","../../../../libs/angular/components/daterangepicker/src/lib/utils/get-daterangepicker-input-value-as-date.ts","../../../../libs/angular/components/daterangepicker/src/lib/directives/daterangepicker-input-control.directive.ts","../../../../libs/angular/components/daterangepicker/src/lib/daterangepicker.component.ts","../../../../libs/angular/components/daterangepicker/src/lib/daterangepicker.component.html","../../../../libs/angular/components/daterangepicker/src/lib/range.validator.ts","../../../../libs/angular/components/daterangepicker/src/lib/required.validator.ts","../../../../libs/angular/components/daterangepicker/src/lib/daterangepicker.module.ts","../../../../libs/angular/components/daterangepicker/src/odx-angular-components-daterangepicker.ts"],"sourcesContent":["import { createConfigTokens } from '@odx/angular/utils';\nimport { DaterangepickerInputDateOrder } from './models';\n\nexport interface DaterangepickerConfig {\n /**\n * Date's order ('DMY' | 'MDY' | 'YMD').\n * @default DaterangepickerInputDateOrder.DMY\n */\n inputDateOrder: DaterangepickerInputDateOrder;\n /**\n * Single-character date's separator (dot, slash etc.).\n * @default '.'\n */\n inputDateSeparator: string;\n}\n\nexport const { DaterangepickerConfig, DaterangepickerDefaultConfig, injectDaterangepickerConfig, provideDaterangepickerConfig } = createConfigTokens(\n 'Daterangepicker',\n '@odx/angular/components/daterangepicker',\n {\n inputDateOrder: DaterangepickerInputDateOrder.DMY,\n inputDateSeparator: '.',\n },\n);\n","import { DaterangepickerConfig } from '../daterangepicker.config';\nimport { DaterangepickerInputDateOrder, DaterangepickerInputFormat, DaterangepickerInputMask, DaterangepickerInputPattern } from '../models';\n\nfunction getDaterangepickerInputPattern({ inputDateOrder, inputDateSeparator }: DaterangepickerConfig, pattern: DaterangepickerInputPattern): string {\n const patternList: Record<DaterangepickerInputDateOrder, string> = {\n [DaterangepickerInputDateOrder.DMY]: `${pattern.DAYS}${inputDateSeparator}${pattern.MONTH}${inputDateSeparator}${pattern.YEAR}`,\n [DaterangepickerInputDateOrder.MDY]: `${pattern.MONTH}${inputDateSeparator}${pattern.DAYS}${inputDateSeparator}${pattern.YEAR}`,\n [DaterangepickerInputDateOrder.YMD]: `${pattern.YEAR}${inputDateSeparator}${pattern.MONTH}${inputDateSeparator}${pattern.DAYS}`,\n };\n\n return patternList[inputDateOrder];\n}\n\nexport function getDaterangepickerInputFormat(config: DaterangepickerConfig): string {\n return getDaterangepickerInputPattern(config, DaterangepickerInputFormat);\n}\n\nexport function getDaterangepickerInputMask(config: DaterangepickerConfig): string {\n return getDaterangepickerInputPattern(config, DaterangepickerInputMask);\n}\n","import { isValid, toDate } from 'date-fns';\nimport { DaterangepickerConfig } from '../daterangepicker.config';\nimport { DaterangepickerInputDateOrder } from '../models';\n\ninterface DateCandidateInterface {\n month: string;\n day: string;\n year: string;\n}\n\nconst functionList: Record<DaterangepickerInputDateOrder, (splittedValue: string[]) => DateCandidateInterface> = {\n [DaterangepickerInputDateOrder.DMY]: (splittedValue: string[]) => {\n const [day, month, year] = splittedValue;\n return { month, day, year };\n },\n [DaterangepickerInputDateOrder.MDY]: (splittedValue: string[]) => {\n const [month, day, year] = splittedValue;\n return { month, day, year };\n },\n [DaterangepickerInputDateOrder.YMD]: (splittedValue: string[]) => {\n const [year, month, day] = splittedValue;\n return { month, day, year };\n },\n};\n\nfunction getDateCandidate({ inputDateOrder, inputDateSeparator }: DaterangepickerConfig, value: string): string | null {\n const splittedValue = value.split(inputDateSeparator);\n\n const { month, day, year }: DateCandidateInterface = functionList[inputDateOrder](splittedValue);\n\n const isDateCandidateInvalid = !month || !day || !year;\n\n return isDateCandidateInvalid ? null : `${month}.${day}.${year}`;\n}\n\nexport function getDaterangepickerInputValueAsDate(config: DaterangepickerConfig, value: string): Date | null {\n const dateCandidate: string | null = getDateCandidate(config, value);\n\n if (!dateCandidate) return null;\n\n const date = toDate(Date.parse(dateCandidate));\n\n return isValid(date) ? date : null;\n}\n","import { Directive, EventEmitter, HostListener, inject, Output } from '@angular/core';\nimport { ReadonlyController, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { IConfig, NgxMaskPipe, provideNgxMask } from 'ngx-mask';\nimport { distinctUntilChanged, fromEvent, map, tap } from 'rxjs';\nimport { injectDaterangepickerConfig } from '../daterangepicker.config';\nimport { getDaterangepickerInputFormat, getDaterangepickerInputMask, getDaterangepickerInputValueAsDate } from '../utils';\n\n@CSSComponent('daterangepicker__control')\n@Directive({\n standalone: true,\n selector: 'input[odxDaterangepickerControl],input[odxDaterangepickerStartDateControl], input[odxDaterangepickerEndDateControl]',\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n '[attr.placeholder]': 'placeholder',\n },\n providers: [ReadonlyController.connect(), provideNgxMask(), NgxMaskPipe],\n hostDirectives: [WithTabIndex],\n})\nexport class DaterangepickerInputControlDirective extends InputControlDirective {\n private readonly maskConfig: Partial<IConfig> = { validation: false, leadZeroDateTime: true };\n\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly config = injectDaterangepickerConfig();\n protected readonly inputMask = getDaterangepickerInputMask(this.config);\n protected readonly ngxMaskPipe = inject(NgxMaskPipe);\n\n @Output()\n public focused = new EventEmitter<boolean>();\n\n public override valueChange$ = fromEvent(this.element.nativeElement, 'input').pipe(\n distinctUntilChanged(),\n tap(() => this.applyMask()),\n map(() => this.nativeElementValue),\n );\n\n public applyMask(): void {\n this.nativeElementValue = this.ngxMaskPipe.transform(this.nativeElementValue, this.inputMask, this.maskConfig);\n }\n\n public get valueAsDate(): Date | null {\n return getDaterangepickerInputValueAsDate(this.config, this.nativeElementValue);\n }\n\n public get placeholder(): string {\n return getDaterangepickerInputFormat(this.config).toUpperCase();\n }\n\n @HostListener('focusin')\n protected handleFocusIn(): void {\n this.focused.emit(true);\n }\n\n @HostListener('focusout')\n protected handleFocusOut(): void {\n this.focused.emit(false);\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { detectControllerChanges } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { CalendarComponent, CalendarSelectionMode, DateFilter, DateRange, provideCalendarConfig } from '@odx/angular/components/calendar';\nimport { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { Position, deferFn, injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { format, startOfDay } from 'date-fns';\nimport { injectDaterangepickerConfig } from './daterangepicker.config';\nimport { DaterangepickerInputControlDirective } from './directives';\nimport { getDaterangepickerInputFormat } from './utils';\n\n@CSSComponent('daterangepicker')\n@Component({\n selector: 'odx-daterangepicker',\n standalone: true,\n imports: [A11yModule, ActionGroupComponent, ButtonComponent, CalendarComponent, DropdownModule, IconComponent],\n templateUrl: './daterangepicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n provideCalendarConfig({\n displayAdjacentDays: false,\n selectionMode: CalendarSelectionMode.DateRange,\n }),\n ],\n})\nexport class DaterangepickerComponent extends CustomFormControl<DateRange | null> implements AfterViewInit {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n protected readonly config = injectDaterangepickerConfig();\n\n public readonly element = injectElement();\n\n public get isOpen(): boolean {\n return !!this.dropdown.isOpen;\n }\n\n public today = new Date();\n\n @Input()\n public filterFn: DateFilter | null = null;\n\n @Input()\n public minDate: Date | null = null;\n\n @Input()\n public maxDate: Date | null = null;\n\n @Input()\n public dropdownPosition: Position = 'bottom';\n\n @Output()\n public selectedChange = new EventEmitter<DateRange>();\n\n @ViewChild(DropdownDirective)\n public dropdown!: DropdownDirective;\n\n @ViewChild('dropdownTrigger', { read: ElementRef, static: true })\n public dropdownTriggerElement!: ElementRef<HTMLElement>;\n\n @ContentChildren(DaterangepickerInputControlDirective)\n public dateFields!: QueryList<DaterangepickerInputControlDirective>;\n\n @ViewChild('startDateMirror', { read: ElementRef, static: true })\n public startDateMirror!: ElementRef<HTMLElement>;\n\n @ViewChild('endDateMirror', { read: ElementRef, static: true })\n public endDateMirror!: ElementRef<HTMLElement>;\n\n public get startDateField(): DaterangepickerInputControlDirective | undefined {\n const [startDate, _endDate] = this.dateFields;\n return startDate;\n }\n\n public get endDateField(): DaterangepickerInputControlDirective | undefined {\n const [_startDate, endDate] = this.dateFields;\n return endDate;\n }\n\n constructor() {\n super(null);\n detectControllerChanges(this).subscribe();\n }\n\n public ngAfterViewInit(): void {\n this.updateWidth(this.startDateField, this.startDateMirror);\n this.updateWidth(this.endDateField, this.endDateMirror);\n this.handleDateFieldChanges();\n this.handleDateFieldFocus();\n\n deferFn(() => {\n if (!this.value || !this.value.start || !this.value.end) return;\n this.updateValue({\n start: startOfDay(this.value.start),\n end: startOfDay(this.value.end),\n });\n this.updateStartDateField(this.value.start);\n this.updateEndDateField(this.value.end);\n });\n }\n\n public selectDateRange(value: DateRange | null): void {\n if (!value || !value.start || !value.end) return;\n\n this.updateValue(value);\n this.updateStartDateField(value.start);\n this.updateEndDateField(value.end);\n\n this.selectedChange.emit(value);\n this.dropdown.close();\n }\n\n protected handleDateFieldChanges(): void {\n this.startDateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe((value: string) => {\n this.updateValue({ start: this.startDateField?.valueAsDate ?? null, end: this.endDateField?.valueAsDate ?? null });\n this.updateWidth(this.startDateField, this.startDateMirror, value);\n });\n this.endDateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe((value: string) => {\n this.updateValue({ start: this.startDateField?.valueAsDate ?? null, end: this.endDateField?.valueAsDate ?? null });\n this.updateWidth(this.endDateField, this.endDateMirror, value);\n });\n }\n\n protected updateWidth(target: DaterangepickerInputControlDirective | undefined, source: ElementRef<HTMLElement>, value = '') {\n const compensationPx = 2;\n source.nativeElement.textContent = value || target?.placeholder || null;\n if (target) {\n target.element.nativeElement.style.width = `${source.nativeElement.offsetWidth + compensationPx}px`;\n }\n }\n\n protected handleDateFieldFocus(): void {\n this.startDateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {\n if (!isFocused) {\n this.onTouched();\n }\n if (this.isOpen) {\n this.dropdown.close();\n }\n });\n this.endDateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {\n if (!isFocused) {\n this.onTouched();\n }\n if (this.isOpen) {\n this.dropdown.close();\n }\n });\n }\n\n @HostListener('keydown.alt.ArrowDown', ['$event'])\n protected openDaterangepicker(event: KeyboardEvent) {\n event.stopPropagation();\n\n if (this.isReadonly || this.isDisabled) return;\n\n this.dropdown.open(event);\n }\n\n private updateStartDateField(date: Date): void {\n if (!this.startDateField) return;\n\n const dateFormat = getDaterangepickerInputFormat(this.config);\n this.startDateField.nativeElementValue = format(date, dateFormat);\n this.updateWidth(this.startDateField, this.startDateMirror, format(date, dateFormat));\n }\n\n private updateEndDateField(date: Date): void {\n if (!this.endDateField) return;\n\n const dateFormat = getDaterangepickerInputFormat(this.config);\n this.endDateField.nativeElementValue = format(date, dateFormat);\n this.updateWidth(this.endDateField, this.endDateMirror, format(date, dateFormat));\n }\n}\n","<span #startDateMirror role=\"none\" class=\"odx-daterangepicker__mirror\"></span>\n<ng-content select=\"input[odxDaterangepickerStartDateControl]\"></ng-content>\n<span role=\"none\" class=\"odx-daterangepicker__separator\">–</span>\n<span #endDateMirror role=\"none\" class=\"odx-daterangepicker__mirror\"></span>\n<ng-content select=\"input[odxDaterangepickerEndDateControl]\"></ng-content>\n\n<odx-action-group class=\"odx-daterangepicker__trigger-wrapper\">\n <button\n #dropdownTrigger\n class=\"odx-daterangepicker__trigger\"\n odxButton\n size=\"small\"\n variant=\"ghost\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: dropdownPosition }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n >\n <odx-icon name=\"calendar\"></odx-icon>\n </button>\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"today\"\n [selectedDateRange]=\"value\"\n (selectedDateRangeChange)=\"selectDateRange($event)\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n ></odx-calendar>\n</ng-template>\n","import { Directive, forwardRef } from '@angular/core';\nimport { FormControl, NG_VALIDATORS } from '@angular/forms';\nimport { DateRange, validateDaterange } from '@odx/angular/components/calendar';\n\n@Directive({\n standalone: true,\n selector: 'odx-daterangepicker[formControlName], odx-daterangepicker[formControl], odx-daterangepicker[ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DaterangepickerRangeValidator),\n multi: true,\n },\n ],\n})\nexport class DaterangepickerRangeValidator {\n public validate({ value }: FormControl<DateRange | null>) {\n const valuesArePresent = value && value.start && value.end;\n\n const isValidRange = value && value.start && value.end && validateDaterange(value.start, value.end);\n\n return (\n valuesArePresent &&\n !isValidRange && {\n invalidRange: true,\n }\n );\n }\n}\n","import { Directive, forwardRef } from '@angular/core';\nimport { FormControl, NG_VALIDATORS } from '@angular/forms';\nimport { DateRange } from '@odx/angular/components/calendar';\n\n@Directive({\n standalone: true,\n selector: 'odx-daterangepicker[required][formControlName], odx-daterangepicker[required][formControl], odx-daterangepicker[required][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DaterangepickerRequiredValidator),\n multi: true,\n },\n ],\n})\nexport class DaterangepickerRequiredValidator {\n public validate({ value }: FormControl<DateRange | null>) {\n const isValid = value && value.start && value.end;\n\n return (\n !isValid && {\n required: true,\n }\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DaterangepickerComponent } from './daterangepicker.component';\nimport { DaterangepickerInputControlDirective } from './directives';\nimport { DaterangepickerRangeValidator } from './range.validator';\nimport { DaterangepickerRequiredValidator } from './required.validator';\n\nconst modules = [DaterangepickerComponent, DaterangepickerInputControlDirective, DaterangepickerRangeValidator, DaterangepickerRequiredValidator];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class DaterangepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["DaterangepickerInputDateOrder","DaterangepickerInputFormat","DaterangepickerInputMask","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgBa,MAAA,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,GAAG,kBAAkB,CAClJ,iBAAiB,EACjB,yCAAyC,EACzC;IACE,cAAc,EAAEA,wBAA6B,CAAC,GAAG;AACjD,IAAA,kBAAkB,EAAE,GAAG;AACxB,CAAA;;ACnBH,SAAS,8BAA8B,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAyB,EAAE,OAAoC,EAAA;AACzI,IAAA,MAAM,WAAW,GAAkD;QACjE,CAACA,wBAA6B,CAAC,GAAG,GAAG,CAAG,EAAA,OAAO,CAAC,IAAI,CAAA,EAAG,kBAAkB,CAAG,EAAA,OAAO,CAAC,KAAK,CAAA,EAAG,kBAAkB,CAAG,EAAA,OAAO,CAAC,IAAI,CAAE,CAAA;QAC/H,CAACA,wBAA6B,CAAC,GAAG,GAAG,CAAG,EAAA,OAAO,CAAC,KAAK,CAAA,EAAG,kBAAkB,CAAG,EAAA,OAAO,CAAC,IAAI,CAAA,EAAG,kBAAkB,CAAG,EAAA,OAAO,CAAC,IAAI,CAAE,CAAA;QAC/H,CAACA,wBAA6B,CAAC,GAAG,GAAG,CAAG,EAAA,OAAO,CAAC,IAAI,CAAA,EAAG,kBAAkB,CAAG,EAAA,OAAO,CAAC,KAAK,CAAA,EAAG,kBAAkB,CAAG,EAAA,OAAO,CAAC,IAAI,CAAE,CAAA;KAChI,CAAC;AAEF,IAAA,OAAO,WAAW,CAAC,cAAc,CAAC,CAAC;AACrC,CA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F,iBAAA,CAAA;;;ACPD,MAAM,OAAO,GAAG,CAAC,wBAAwB,EAAE,oCAAoC,EAAE,6BAA6B,EAAE,gCAAgC,CAAC,CAAC;MAMrI,qBAAqB,CAAA;+GAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YANjB,wBAAwB,EAAE,oCAAoC,EAAE,6BAA6B,EAAE,gCAAgC,CAIpI,EAAA,OAAA,EAAA,CAAA,UAAU,EAJL,wBAAwB,EAAE,oCAAoC,EAAE,6BAA6B,EAAE,gCAAgC,CAAA,EAAA,CAAA,CAAA,EAAA;gHAMnI,qBAAqB,EAAA,OAAA,EAAA,CANjB,wBAAwB,EAI7B,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -20,7 +20,7 @@ let ExpandableListItemComponent = class ExpandableListItemComponent {
|
|
|
20
20
|
this.element = injectElement();
|
|
21
21
|
}
|
|
22
22
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandableListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ExpandableListItemComponent, isStandalone: true, selector: "odx-expandable-list-item", host: { properties: { "class.odx-expandable-list-item--expanded": "expandableItem.expanded" } }, providers: [DisabledController.connect()], hostDirectives: [{ directive: i1.ExpandableItemDirective, inputs: ["expanded", "expanded", "id", "id"] }], ngImport: i0, template: "<div class=\"odx-expandable-list-item__header\">\n <ng-content select=\"odx-list-item, [odxListItem]\" />\n <odx-action-group class=\"odx-expandable-list-item__action\">\n <button odxButton (click)=\"expandableItem.toggle()\">\n <odx-icon name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n</div>\n<div @expandSlotAnimation class=\"odx-expandable-list-item__slot\" *ngIf=\"expandableItem.expanded\">\n <ng-content select=\"odx-list\" />\n</div>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }, { kind: "component", type: ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }], animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ExpandableListItemComponent, isStandalone: true, selector: "odx-expandable-list-item", host: { properties: { "class.odx-expandable-list-item--expanded": "expandableItem.expanded" } }, providers: [DisabledController.connect()], hostDirectives: [{ directive: i1.ExpandableItemDirective, inputs: ["expanded", "expanded", "id", "id"] }], ngImport: i0, template: "<div class=\"odx-expandable-list-item__header\">\n <ng-content select=\"odx-list-item, [odxListItem]\" />\n <odx-action-group class=\"odx-expandable-list-item__action\">\n <button odxButton (click)=\"expandableItem.toggle()\">\n <odx-icon [class.odx-expandable-list-item__icon--expanded]=\"expandableItem.expanded\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n</div>\n<div @expandSlotAnimation class=\"odx-expandable-list-item__slot\" *ngIf=\"expandableItem.expanded\">\n <ng-content select=\"odx-list\" />\n</div>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }, { kind: "component", type: ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }], animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
24
24
|
};
|
|
25
25
|
ExpandableListItemComponent = __decorate([
|
|
26
26
|
CSSComponent('expandable-list-item')
|
|
@@ -29,7 +29,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
29
29
|
type: Component,
|
|
30
30
|
args: [{ standalone: true, selector: 'odx-expandable-list-item', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CoreModule, ButtonComponent, IconComponent, ActionGroupComponent], providers: [DisabledController.connect()], hostDirectives: [{ directive: ExpandableItemDirective, inputs: ['expanded', 'id'] }], host: {
|
|
31
31
|
'[class.odx-expandable-list-item--expanded]': 'expandableItem.expanded',
|
|
32
|
-
}, animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])], template: "<div class=\"odx-expandable-list-item__header\">\n <ng-content select=\"odx-list-item, [odxListItem]\" />\n <odx-action-group class=\"odx-expandable-list-item__action\">\n <button odxButton (click)=\"expandableItem.toggle()\">\n <odx-icon name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n</div>\n<div @expandSlotAnimation class=\"odx-expandable-list-item__slot\" *ngIf=\"expandableItem.expanded\">\n <ng-content select=\"odx-list\" />\n</div>\n" }]
|
|
32
|
+
}, animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])], template: "<div class=\"odx-expandable-list-item__header\">\n <ng-content select=\"odx-list-item, [odxListItem]\" />\n <odx-action-group class=\"odx-expandable-list-item__action\">\n <button odxButton (click)=\"expandableItem.toggle()\">\n <odx-icon [class.odx-expandable-list-item__icon--expanded]=\"expandableItem.expanded\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n</div>\n<div @expandSlotAnimation class=\"odx-expandable-list-item__slot\" *ngIf=\"expandableItem.expanded\">\n <ng-content select=\"odx-list\" />\n</div>\n" }]
|
|
33
33
|
}] });
|
|
34
34
|
|
|
35
35
|
let ListItemComponent = class ListItemComponent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-list.mjs","sources":["../../../../libs/angular/components/list/src/lib/components/expandable-list-item/expandable-list-item.component.ts","../../../../libs/angular/components/list/src/lib/components/expandable-list-item/expandable-list-item.component.html","../../../../libs/angular/components/list/src/lib/components/list-item/list-item.component.ts","../../../../libs/angular/components/list/src/lib/components/list-item/list-item.component.html","../../../../libs/angular/components/list/src/lib/list.component.ts","../../../../libs/angular/components/list/src/lib/list.component.html","../../../../libs/angular/components/list/src/lib/list.module.ts","../../../../libs/angular/components/list/src/odx-angular-components-list.ts"],"sourcesContent":["import { transition, trigger, useAnimation } from '@angular/animations';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core';\nimport { CoreModule, DisabledController } from '@odx/angular';\nimport { collapse, expand } from '@odx/angular/animations';\nimport { ExpandableItemDirective } from '@odx/angular/cdk/expandable';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('expandable-list-item')\n@Component({\n standalone: true,\n selector: 'odx-expandable-list-item',\n templateUrl: 'expandable-list-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CoreModule, ButtonComponent, IconComponent, ActionGroupComponent],\n providers: [DisabledController.connect()],\n hostDirectives: [{ directive: ExpandableItemDirective, inputs: ['expanded', 'id'] }],\n host: {\n '[class.odx-expandable-list-item--expanded]': 'expandableItem.expanded',\n },\n animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])],\n})\nexport class ExpandableListItemComponent {\n protected readonly expandableItem = inject(ExpandableItemDirective);\n public readonly element = injectElement<HTMLElement>();\n}\n","<div class=\"odx-expandable-list-item__header\">\n <ng-content select=\"odx-list-item, [odxListItem]\" />\n <odx-action-group class=\"odx-expandable-list-item__action\">\n <button odxButton (click)=\"expandableItem.toggle()\">\n <odx-icon name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n</div>\n<div @expandSlotAnimation class=\"odx-expandable-list-item__slot\" *ngIf=\"expandableItem.expanded\">\n <ng-content select=\"odx-list\" />\n</div>\n","import { booleanAttribute, ChangeDetectionStrategy, Component, HostBinding, inject, Input, OnChanges, ViewEncapsulation } from '@angular/core';\nimport { WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { hasChanged, injectElement, NgChanges } from '@odx/angular/utils';\n\n@CSSComponent('list-item')\n@Component({\n standalone: true,\n selector: 'odx-list-item, [odxListItem]',\n templateUrl: './list-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [WithDisabledState, WithTabIndex],\n})\nexport class ListItemComponent implements OnChanges {\n private readonly withTabIndex = inject(WithTabIndex, { self: true });\n\n public readonly element = injectElement<HTMLElement>();\n\n @CSSModifier()\n @Input({ transform: booleanAttribute })\n public danger = false;\n\n @CSSModifier()\n @Input({ transform: booleanAttribute })\n public muted = false;\n\n @HostBinding('class.is-selected')\n @Input({ transform: booleanAttribute })\n public selected = false;\n\n public ngOnChanges(changes: NgChanges<ListItemComponent>): void {\n if (hasChanged(changes, 'muted', false)) {\n this.withTabIndex.setTabindex(this.muted ? -1 : null);\n }\n }\n}\n","<ng-content select=\"[odxListPrefix], [odxListItemPrefix]\" />\n<div class=\"odx-list-item__content\">\n <ng-content />\n</div>\n<ng-content select=\"[odxListSuffix], [odxListItemSuffix]\" />\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ExpandableContainerDirective } from '@odx/angular/cdk/expandable';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('list')\n@Component({\n selector: 'odx-list',\n standalone: true,\n templateUrl: './list.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [{ directive: ExpandableContainerDirective, inputs: ['multiple'] }],\n})\nexport class ListComponent {\n public readonly element = injectElement();\n}\n","<ng-content select=\"odx-list, odx-list-item, [odxListItem], odx-expandable-list-item\" />\n","import { NgModule } from '@angular/core';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { ExpandableListItemComponent, ListItemComponent } from './components';\nimport { ListComponent } from './list.component';\n\nconst modules = [ListComponent, ListItemComponent, ExpandableListItemComponent, IconComponent];\n\n@NgModule({\n imports: modules,\n exports: modules,\n})\nexport class ListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA0Ba,IAAA,2BAA2B,GAA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item/expandable-list-item.component.ts","../../../../libs/angular/components/list/src/lib/components/expandable-list-item/expandable-list-item.component.html","../../../../libs/angular/components/list/src/lib/components/list-item/list-item.component.ts","../../../../libs/angular/components/list/src/lib/components/list-item/list-item.component.html","../../../../libs/angular/components/list/src/lib/list.component.ts","../../../../libs/angular/components/list/src/lib/list.component.html","../../../../libs/angular/components/list/src/lib/list.module.ts","../../../../libs/angular/components/list/src/odx-angular-components-list.ts"],"sourcesContent":["import { transition, trigger, useAnimation } from '@angular/animations';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core';\nimport { CoreModule, DisabledController } from '@odx/angular';\nimport { collapse, expand } from '@odx/angular/animations';\nimport { ExpandableItemDirective } from '@odx/angular/cdk/expandable';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('expandable-list-item')\n@Component({\n standalone: true,\n selector: 'odx-expandable-list-item',\n templateUrl: 'expandable-list-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CoreModule, ButtonComponent, IconComponent, ActionGroupComponent],\n providers: [DisabledController.connect()],\n hostDirectives: [{ directive: ExpandableItemDirective, inputs: ['expanded', 'id'] }],\n host: {\n '[class.odx-expandable-list-item--expanded]': 'expandableItem.expanded',\n },\n animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])],\n})\nexport class ExpandableListItemComponent {\n protected readonly expandableItem = inject(ExpandableItemDirective);\n public readonly element = injectElement<HTMLElement>();\n}\n","<div class=\"odx-expandable-list-item__header\">\n <ng-content select=\"odx-list-item, [odxListItem]\" />\n <odx-action-group class=\"odx-expandable-list-item__action\">\n <button odxButton (click)=\"expandableItem.toggle()\">\n <odx-icon [class.odx-expandable-list-item__icon--expanded]=\"expandableItem.expanded\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n</div>\n<div @expandSlotAnimation class=\"odx-expandable-list-item__slot\" *ngIf=\"expandableItem.expanded\">\n <ng-content select=\"odx-list\" />\n</div>\n","import { booleanAttribute, ChangeDetectionStrategy, Component, HostBinding, inject, Input, OnChanges, ViewEncapsulation } from '@angular/core';\nimport { WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { hasChanged, injectElement, NgChanges } from '@odx/angular/utils';\n\n@CSSComponent('list-item')\n@Component({\n standalone: true,\n selector: 'odx-list-item, [odxListItem]',\n templateUrl: './list-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [WithDisabledState, WithTabIndex],\n})\nexport class ListItemComponent implements OnChanges {\n private readonly withTabIndex = inject(WithTabIndex, { self: true });\n\n public readonly element = injectElement<HTMLElement>();\n\n @CSSModifier()\n @Input({ transform: booleanAttribute })\n public danger = false;\n\n @CSSModifier()\n @Input({ transform: booleanAttribute })\n public muted = false;\n\n @HostBinding('class.is-selected')\n @Input({ transform: booleanAttribute })\n public selected = false;\n\n public ngOnChanges(changes: NgChanges<ListItemComponent>): void {\n if (hasChanged(changes, 'muted', false)) {\n this.withTabIndex.setTabindex(this.muted ? -1 : null);\n }\n }\n}\n","<ng-content select=\"[odxListPrefix], [odxListItemPrefix]\" />\n<div class=\"odx-list-item__content\">\n <ng-content />\n</div>\n<ng-content select=\"[odxListSuffix], [odxListItemSuffix]\" />\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ExpandableContainerDirective } from '@odx/angular/cdk/expandable';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('list')\n@Component({\n selector: 'odx-list',\n standalone: true,\n templateUrl: './list.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [{ directive: ExpandableContainerDirective, inputs: ['multiple'] }],\n})\nexport class ListComponent {\n public readonly element = injectElement();\n}\n","<ng-content select=\"odx-list, odx-list-item, [odxListItem], odx-expandable-list-item\" />\n","import { NgModule } from '@angular/core';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { ExpandableListItemComponent, ListItemComponent } from './components';\nimport { ListComponent } from './list.component';\n\nconst modules = [ListComponent, ListItemComponent, ExpandableListItemComponent, IconComponent];\n\n@NgModule({\n imports: modules,\n exports: modules,\n})\nexport class ListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA0Ba,IAAA,2BAA2B,GAAjC,MAAM,2BAA2B,CAAA;AAAjC,IAAA,WAAA,GAAA;AACc,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC;QACpD,IAAO,CAAA,OAAA,GAAG,aAAa,EAAe,CAAC;AACxD,KAAA;+GAHY,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,0CAAA,EAAA,yBAAA,EAAA,EAAA,EAAA,SAAA,EAP3B,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC,ECnB3C,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,UAAA,EAAA,IAAA,EAAA,IAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,+jBAWA,EDOY,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,I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,EAAE,2BAA2B,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CAA5E,aAAa,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;gHAMhF,UAAU,EAAA,OAAA,EAAA,CAN4B,2BAA2B,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAMhF,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,OAAO;AACjB,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -332,26 +332,52 @@ function deferFn(fn) {
|
|
|
332
332
|
setTimeout(fn, 0);
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
+
let uniqueIdCache = {};
|
|
336
|
+
function getUniqueId(key) {
|
|
337
|
+
uniqueIdCache[key] = (uniqueIdCache[key] ?? 0) + 1;
|
|
338
|
+
return `${key}-${uniqueIdCache[key]}`;
|
|
339
|
+
}
|
|
340
|
+
function clearUniqueIdCache() {
|
|
341
|
+
uniqueIdCache = {};
|
|
342
|
+
}
|
|
343
|
+
|
|
335
344
|
class EventManager {
|
|
336
345
|
constructor() {
|
|
337
346
|
this.element = injectElement();
|
|
338
347
|
this.renderer = inject(Renderer2);
|
|
339
|
-
this.listeners =
|
|
348
|
+
this.listeners = new Map();
|
|
340
349
|
}
|
|
341
350
|
destroyListeners() {
|
|
342
|
-
|
|
343
|
-
|
|
351
|
+
this.listeners.forEach((listener) => {
|
|
352
|
+
if (listener) {
|
|
353
|
+
listener();
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
this.listeners.clear();
|
|
344
357
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
358
|
+
destroyListener(listenerReferenceKey) {
|
|
359
|
+
if (this.listeners.has(listenerReferenceKey)) {
|
|
360
|
+
const listenerFn = this.listeners.get(listenerReferenceKey);
|
|
361
|
+
if (listenerFn) {
|
|
362
|
+
listenerFn();
|
|
349
363
|
}
|
|
364
|
+
this.listeners.delete(listenerReferenceKey);
|
|
350
365
|
}
|
|
351
366
|
}
|
|
367
|
+
register(eventNames, callback, target) {
|
|
368
|
+
return eventNames.filter(isPresent).map((eventName) => {
|
|
369
|
+
const listenerFn = this.renderer.listen(target ?? this.element.nativeElement, eventName, (event) => callback(event));
|
|
370
|
+
const id = getUniqueId('registeredEvent');
|
|
371
|
+
this.listeners.set(id, listenerFn);
|
|
372
|
+
return id;
|
|
373
|
+
});
|
|
374
|
+
}
|
|
352
375
|
ngOnDestroy() {
|
|
353
376
|
this.destroyListeners();
|
|
354
377
|
}
|
|
378
|
+
getActiveListenersNames() {
|
|
379
|
+
return Array.from(this.listeners.keys());
|
|
380
|
+
}
|
|
355
381
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EventManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
356
382
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EventManager }); }
|
|
357
383
|
}
|
|
@@ -420,15 +446,6 @@ function getOppositeSide(position) {
|
|
|
420
446
|
}
|
|
421
447
|
}
|
|
422
448
|
|
|
423
|
-
let uniqueIdCache = {};
|
|
424
|
-
function getUniqueId(key) {
|
|
425
|
-
uniqueIdCache[key] = (uniqueIdCache[key] ?? 0) + 1;
|
|
426
|
-
return `${key}-${uniqueIdCache[key]}`;
|
|
427
|
-
}
|
|
428
|
-
function clearUniqueIdCache() {
|
|
429
|
-
uniqueIdCache = {};
|
|
430
|
-
}
|
|
431
|
-
|
|
432
449
|
function isUrlMatcher(value) {
|
|
433
450
|
return isString(value) || value instanceof RegExp;
|
|
434
451
|
}
|