@wirekyt/angular 0.0.11 → 0.0.13
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/dist/fesm2022/wirekyt-angular-accordion.mjs +58 -22
- package/dist/fesm2022/wirekyt-angular-accordion.mjs.map +1 -1
- package/dist/fesm2022/wirekyt-angular-color-picker.mjs +92 -9
- package/dist/fesm2022/wirekyt-angular-color-picker.mjs.map +1 -1
- package/dist/fesm2022/wirekyt-angular-combobox.mjs +44 -74
- package/dist/fesm2022/wirekyt-angular-combobox.mjs.map +1 -1
- package/dist/fesm2022/wirekyt-angular-date-input.mjs +532 -0
- package/dist/fesm2022/wirekyt-angular-date-input.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-date-picker.mjs +1315 -0
- package/dist/fesm2022/wirekyt-angular-date-picker.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-presence.mjs +176 -0
- package/dist/fesm2022/wirekyt-angular-presence.mjs.map +1 -0
- package/dist/package.json +17 -5
- package/dist/types/wirekyt-angular-accordion.d.ts +5 -1
- package/dist/types/wirekyt-angular-accordion.d.ts.map +1 -1
- package/dist/types/wirekyt-angular-color-picker.d.ts +7 -3
- package/dist/types/wirekyt-angular-color-picker.d.ts.map +1 -1
- package/dist/types/wirekyt-angular-combobox.d.ts +7 -39
- package/dist/types/wirekyt-angular-combobox.d.ts.map +1 -1
- package/dist/types/wirekyt-angular-date-input.d.ts +164 -0
- package/dist/types/wirekyt-angular-date-input.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-date-picker.d.ts +340 -0
- package/dist/types/wirekyt-angular-date-picker.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-presence.d.ts +64 -0
- package/dist/types/wirekyt-angular-presence.d.ts.map +1 -0
- package/package.json +19 -7
|
@@ -0,0 +1,1315 @@
|
|
|
1
|
+
import * as datePicker from '@wirekyt/dom/machines/date-picker';
|
|
2
|
+
import { anatomy } from '@wirekyt/dom/machines/date-picker';
|
|
3
|
+
export { parse as parseDate } from '@wirekyt/dom/machines/date-picker';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { InjectionToken, inject, signal, input, model, booleanAttribute, output, EnvironmentInjector, Injector, effect, DestroyRef, Renderer2, ElementRef, forwardRef, Directive, computed, TemplateRef, ViewContainerRef, untracked } from '@angular/core';
|
|
6
|
+
import { injectLocale, injectEnvironment, createId, useMachine, createCvaController, buildRootCarrier, bindProps } from '@wirekyt/angular';
|
|
7
|
+
import { injectFieldContextOptional } from '@wirekyt/angular/field';
|
|
8
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
9
|
+
import { PresenceBase, PRESENCE_CONTEXT, injectPresenceContext } from '@wirekyt/angular/presence';
|
|
10
|
+
|
|
11
|
+
const datePickerAnatomy = anatomy.extendWith("valueText");
|
|
12
|
+
|
|
13
|
+
const DATE_PICKER_CONTEXT = new InjectionToken("WIREKYT.DATE_PICKER_CONTEXT");
|
|
14
|
+
function injectDatePickerContext() {
|
|
15
|
+
return inject(DATE_PICKER_CONTEXT);
|
|
16
|
+
}
|
|
17
|
+
const DATE_PICKER_CONTEXT_CARRIER = new InjectionToken("WIREKYT.DATE_PICKER_CONTEXT_CARRIER");
|
|
18
|
+
function injectDatePickerContextCarrier() {
|
|
19
|
+
return inject(DATE_PICKER_CONTEXT_CARRIER);
|
|
20
|
+
}
|
|
21
|
+
const DEFAULT_VIEW_CONTEXT = signal({ view: "day" }, /* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "DEFAULT_VIEW_CONTEXT" }] : /* istanbul ignore next */ []));
|
|
23
|
+
const DATE_PICKER_VIEW_CONTEXT = new InjectionToken("WIREKYT.DATE_PICKER_VIEW_CONTEXT");
|
|
24
|
+
const DATE_PICKER_TABLE_CONTEXT = new InjectionToken("WIREKYT.DATE_PICKER_TABLE_CONTEXT");
|
|
25
|
+
const DATE_PICKER_TABLE_CELL_CONTEXT = new InjectionToken("WIREKYT.DATE_PICKER_TABLE_CELL_CONTEXT");
|
|
26
|
+
function injectDatePickerViewContext() {
|
|
27
|
+
return inject(DATE_PICKER_VIEW_CONTEXT, { optional: true }) ?? DEFAULT_VIEW_CONTEXT;
|
|
28
|
+
}
|
|
29
|
+
function injectDatePickerTableContext() {
|
|
30
|
+
return inject(DATE_PICKER_TABLE_CONTEXT);
|
|
31
|
+
}
|
|
32
|
+
function injectDatePickerTableCellContext() {
|
|
33
|
+
return inject(DATE_PICKER_TABLE_CELL_CONTEXT);
|
|
34
|
+
}
|
|
35
|
+
function isDatePickerView(value) {
|
|
36
|
+
return value === "day" || value === "month" || value === "year";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function useDatePicker(options) {
|
|
40
|
+
const locale = injectLocale();
|
|
41
|
+
const environment = injectEnvironment();
|
|
42
|
+
const field = injectFieldContextOptional();
|
|
43
|
+
const fallbackId = createId();
|
|
44
|
+
return useMachine({
|
|
45
|
+
machine: datePicker.machine,
|
|
46
|
+
context: () => {
|
|
47
|
+
const props = options.context();
|
|
48
|
+
const merged = {
|
|
49
|
+
...props,
|
|
50
|
+
dir: locale.dir,
|
|
51
|
+
getRootNode: environment.getRootNode,
|
|
52
|
+
id: props.id ?? fallbackId,
|
|
53
|
+
locale: props.locale ?? locale.locale,
|
|
54
|
+
};
|
|
55
|
+
if (field) {
|
|
56
|
+
merged.ids = {
|
|
57
|
+
label: () => field.ids.label,
|
|
58
|
+
input: () => field.ids.control,
|
|
59
|
+
...props.ids,
|
|
60
|
+
};
|
|
61
|
+
merged.disabled = Boolean(props.disabled) || field.disabled() || undefined;
|
|
62
|
+
merged.readOnly = Boolean(props.readOnly) || field.readOnly() || undefined;
|
|
63
|
+
merged.required = Boolean(props.required) || field.required() || undefined;
|
|
64
|
+
merged.invalid = Boolean(props.invalid) || field.invalid() || undefined;
|
|
65
|
+
}
|
|
66
|
+
return merged;
|
|
67
|
+
},
|
|
68
|
+
connect: (service, normalize) => datePicker.connect(service, normalize),
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
class DatePickerRoot extends PresenceBase {
|
|
73
|
+
id = input(undefined, /* @ts-ignore */
|
|
74
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
75
|
+
ids = input(undefined, /* @ts-ignore */
|
|
76
|
+
...(ngDevMode ? [{ debugName: "ids" }] : /* istanbul ignore next */ []));
|
|
77
|
+
value = model(undefined, /* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
79
|
+
defaultValue = input(undefined, /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
81
|
+
focusedValue = model(undefined, /* @ts-ignore */
|
|
82
|
+
...(ngDevMode ? [{ debugName: "focusedValue" }] : /* istanbul ignore next */ []));
|
|
83
|
+
defaultFocusedValue = input(undefined, /* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "defaultFocusedValue" }] : /* istanbul ignore next */ []));
|
|
85
|
+
view = model(undefined, /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
87
|
+
defaultView = input(undefined, /* @ts-ignore */
|
|
88
|
+
...(ngDevMode ? [{ debugName: "defaultView" }] : /* istanbul ignore next */ []));
|
|
89
|
+
open = model(undefined, /* @ts-ignore */
|
|
90
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
91
|
+
defaultOpen = input(false, { ...(ngDevMode ? { debugName: "defaultOpen" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
92
|
+
inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
93
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
94
|
+
readOnly = input(false, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
95
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
96
|
+
invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
97
|
+
outsideDaySelectable = input(false, { ...(ngDevMode ? { debugName: "outsideDaySelectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
98
|
+
closeOnSelect = input(true, { ...(ngDevMode ? { debugName: "closeOnSelect" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
99
|
+
openOnClick = input(false, { ...(ngDevMode ? { debugName: "openOnClick" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
100
|
+
fixedWeeks = input(false, { ...(ngDevMode ? { debugName: "fixedWeeks" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
101
|
+
showWeekNumbers = input(false, { ...(ngDevMode ? { debugName: "showWeekNumbers" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
102
|
+
min = input(undefined, /* @ts-ignore */
|
|
103
|
+
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
104
|
+
max = input(undefined, /* @ts-ignore */
|
|
105
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
106
|
+
minView = input(undefined, /* @ts-ignore */
|
|
107
|
+
...(ngDevMode ? [{ debugName: "minView" }] : /* istanbul ignore next */ []));
|
|
108
|
+
maxView = input(undefined, /* @ts-ignore */
|
|
109
|
+
...(ngDevMode ? [{ debugName: "maxView" }] : /* istanbul ignore next */ []));
|
|
110
|
+
numOfMonths = input(undefined, /* @ts-ignore */
|
|
111
|
+
...(ngDevMode ? [{ debugName: "numOfMonths" }] : /* istanbul ignore next */ []));
|
|
112
|
+
startOfWeek = input(undefined, /* @ts-ignore */
|
|
113
|
+
...(ngDevMode ? [{ debugName: "startOfWeek" }] : /* istanbul ignore next */ []));
|
|
114
|
+
selectionMode = input(undefined, /* @ts-ignore */
|
|
115
|
+
...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
|
|
116
|
+
maxSelectedDates = input(undefined, /* @ts-ignore */
|
|
117
|
+
...(ngDevMode ? [{ debugName: "maxSelectedDates" }] : /* istanbul ignore next */ []));
|
|
118
|
+
locale = input(undefined, /* @ts-ignore */
|
|
119
|
+
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
120
|
+
timeZone = input(undefined, /* @ts-ignore */
|
|
121
|
+
...(ngDevMode ? [{ debugName: "timeZone" }] : /* istanbul ignore next */ []));
|
|
122
|
+
translations = input(undefined, /* @ts-ignore */
|
|
123
|
+
...(ngDevMode ? [{ debugName: "translations" }] : /* istanbul ignore next */ []));
|
|
124
|
+
name = input(undefined, /* @ts-ignore */
|
|
125
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
126
|
+
placeholder = input(undefined, /* @ts-ignore */
|
|
127
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
128
|
+
format = input(undefined, /* @ts-ignore */
|
|
129
|
+
...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
|
|
130
|
+
parse = input(undefined, /* @ts-ignore */
|
|
131
|
+
...(ngDevMode ? [{ debugName: "parse" }] : /* istanbul ignore next */ []));
|
|
132
|
+
createCalendar = input(undefined, /* @ts-ignore */
|
|
133
|
+
...(ngDevMode ? [{ debugName: "createCalendar" }] : /* istanbul ignore next */ []));
|
|
134
|
+
isDateUnavailable = input(undefined, /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "isDateUnavailable" }] : /* istanbul ignore next */ []));
|
|
136
|
+
positioning = input(undefined, /* @ts-ignore */
|
|
137
|
+
...(ngDevMode ? [{ debugName: "positioning" }] : /* istanbul ignore next */ []));
|
|
138
|
+
valueDetailsChange = output();
|
|
139
|
+
focusChange = output();
|
|
140
|
+
viewDetailsChange = output();
|
|
141
|
+
visibleRangeChange = output();
|
|
142
|
+
openDetailsChange = output();
|
|
143
|
+
disabledFromForm = signal(false, /* @ts-ignore */
|
|
144
|
+
...(ngDevMode ? [{ debugName: "disabledFromForm" }] : /* istanbul ignore next */ []));
|
|
145
|
+
pendingInternalWrites = 0;
|
|
146
|
+
hasExternalBinding = false;
|
|
147
|
+
hasReceivedFormWrite = false;
|
|
148
|
+
cva = createCvaController({
|
|
149
|
+
value: this.value,
|
|
150
|
+
setDisabled: (disabled) => this.disabledFromForm.set(disabled),
|
|
151
|
+
componentName: "DatePickerRoot",
|
|
152
|
+
hasExternalModelBinding: () => this.hasExternalBinding,
|
|
153
|
+
});
|
|
154
|
+
machine = useDatePicker({
|
|
155
|
+
context: () => ({
|
|
156
|
+
id: this.id(),
|
|
157
|
+
ids: this.ids(),
|
|
158
|
+
value: this.value(),
|
|
159
|
+
defaultValue: this.defaultValue(),
|
|
160
|
+
focusedValue: this.focusedValue(),
|
|
161
|
+
defaultFocusedValue: this.defaultFocusedValue(),
|
|
162
|
+
view: this.normalizedView(),
|
|
163
|
+
defaultView: this.defaultView(),
|
|
164
|
+
open: this.normalizedOpen(),
|
|
165
|
+
defaultOpen: this.defaultOpen(),
|
|
166
|
+
inline: this.inline() || undefined,
|
|
167
|
+
disabled: this.disabled() || this.disabledFromForm() || undefined,
|
|
168
|
+
readOnly: this.readOnly() || undefined,
|
|
169
|
+
required: this.required() || undefined,
|
|
170
|
+
invalid: this.invalid() || undefined,
|
|
171
|
+
outsideDaySelectable: this.outsideDaySelectable() || undefined,
|
|
172
|
+
closeOnSelect: this.closeOnSelect(),
|
|
173
|
+
openOnClick: this.openOnClick() || undefined,
|
|
174
|
+
fixedWeeks: this.fixedWeeks() || undefined,
|
|
175
|
+
showWeekNumbers: this.showWeekNumbers() || undefined,
|
|
176
|
+
min: this.min(),
|
|
177
|
+
max: this.max(),
|
|
178
|
+
minView: this.minView(),
|
|
179
|
+
maxView: this.maxView(),
|
|
180
|
+
numOfMonths: this.numOfMonths(),
|
|
181
|
+
startOfWeek: this.startOfWeek(),
|
|
182
|
+
selectionMode: this.selectionMode(),
|
|
183
|
+
maxSelectedDates: this.maxSelectedDates(),
|
|
184
|
+
locale: this.locale(),
|
|
185
|
+
timeZone: this.timeZone(),
|
|
186
|
+
translations: this.translations(),
|
|
187
|
+
name: this.name(),
|
|
188
|
+
placeholder: this.placeholder(),
|
|
189
|
+
format: this.format(),
|
|
190
|
+
parse: this.parse(),
|
|
191
|
+
createCalendar: this.createCalendar(),
|
|
192
|
+
isDateUnavailable: this.isDateUnavailable(),
|
|
193
|
+
positioning: this.positioning(),
|
|
194
|
+
onValueChange: (details) => {
|
|
195
|
+
if (!dateValueArraysEqual(this.value(), details.value)) {
|
|
196
|
+
this.pendingInternalWrites++;
|
|
197
|
+
this.value.set([...details.value]);
|
|
198
|
+
}
|
|
199
|
+
this.cva.notifyValueChange(details.value);
|
|
200
|
+
this.cva.markTouched();
|
|
201
|
+
this.valueDetailsChange.emit(details);
|
|
202
|
+
},
|
|
203
|
+
onFocusChange: (details) => {
|
|
204
|
+
if (!dateValuesEqual(this.focusedValue(), details.focusedValue)) {
|
|
205
|
+
this.focusedValue.set(details.focusedValue);
|
|
206
|
+
}
|
|
207
|
+
this.focusChange.emit(details);
|
|
208
|
+
},
|
|
209
|
+
onViewChange: (details) => {
|
|
210
|
+
if (this.view() !== details.view) {
|
|
211
|
+
this.view.set(details.view);
|
|
212
|
+
}
|
|
213
|
+
this.viewDetailsChange.emit(details);
|
|
214
|
+
},
|
|
215
|
+
onVisibleRangeChange: (details) => {
|
|
216
|
+
this.visibleRangeChange.emit(details);
|
|
217
|
+
},
|
|
218
|
+
onOpenChange: (details) => {
|
|
219
|
+
if (this.normalizedOpen() !== details.open) {
|
|
220
|
+
this.open.set(details.open);
|
|
221
|
+
}
|
|
222
|
+
if (!details.open) {
|
|
223
|
+
this.cva.markTouched();
|
|
224
|
+
}
|
|
225
|
+
this.openDetailsChange.emit(details);
|
|
226
|
+
},
|
|
227
|
+
}),
|
|
228
|
+
});
|
|
229
|
+
state = this.machine.state;
|
|
230
|
+
api = this.machine.api;
|
|
231
|
+
service = this.machine.service;
|
|
232
|
+
send = this.machine.send;
|
|
233
|
+
presence = this.createPresence(() => this.api().open);
|
|
234
|
+
contextCarrier = buildRootCarrier({
|
|
235
|
+
providers: [{ provide: PRESENCE_CONTEXT, useValue: this.presence }],
|
|
236
|
+
root: this,
|
|
237
|
+
rootToken: DATE_PICKER_CONTEXT,
|
|
238
|
+
originInjector: inject(Injector),
|
|
239
|
+
environmentInjector: inject(EnvironmentInjector),
|
|
240
|
+
});
|
|
241
|
+
constructor() {
|
|
242
|
+
super();
|
|
243
|
+
let firstRun = true;
|
|
244
|
+
effect(() => {
|
|
245
|
+
void this.value();
|
|
246
|
+
if (firstRun) {
|
|
247
|
+
firstRun = false;
|
|
248
|
+
this.pendingInternalWrites = 0;
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
if (this.pendingInternalWrites > 0) {
|
|
252
|
+
this.pendingInternalWrites--;
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
this.hasExternalBinding = true;
|
|
256
|
+
});
|
|
257
|
+
bindProps({
|
|
258
|
+
elementRef: inject(ElementRef),
|
|
259
|
+
renderer: inject(Renderer2),
|
|
260
|
+
destroyRef: inject(DestroyRef),
|
|
261
|
+
props: () => this.api().getRootProps(),
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
getContextCarrier() {
|
|
265
|
+
return this.contextCarrier;
|
|
266
|
+
}
|
|
267
|
+
writeValue(value) {
|
|
268
|
+
const next = value === null ? undefined : value;
|
|
269
|
+
const current = this.value();
|
|
270
|
+
if (!this.hasReceivedFormWrite && current !== undefined) {
|
|
271
|
+
this.hasExternalBinding = true;
|
|
272
|
+
}
|
|
273
|
+
this.hasReceivedFormWrite = true;
|
|
274
|
+
if (current !== next) {
|
|
275
|
+
this.pendingInternalWrites++;
|
|
276
|
+
}
|
|
277
|
+
this.cva.writeValue(value);
|
|
278
|
+
}
|
|
279
|
+
registerOnChange(fn) {
|
|
280
|
+
this.cva.registerOnChange(fn);
|
|
281
|
+
}
|
|
282
|
+
registerOnTouched(fn) {
|
|
283
|
+
this.cva.registerOnTouched(fn);
|
|
284
|
+
}
|
|
285
|
+
setDisabledState(disabled) {
|
|
286
|
+
this.cva.setDisabledState(disabled);
|
|
287
|
+
}
|
|
288
|
+
normalizedOpen() {
|
|
289
|
+
const value = this.open();
|
|
290
|
+
return typeof value === "boolean" ? value : undefined;
|
|
291
|
+
}
|
|
292
|
+
normalizedView() {
|
|
293
|
+
const value = this.view();
|
|
294
|
+
return isDatePickerView(value) ? value : undefined;
|
|
295
|
+
}
|
|
296
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
297
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DatePickerRoot, isStandalone: true, selector: "[datePickerRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ids: { classPropertyName: "ids", publicName: "ids", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, focusedValue: { classPropertyName: "focusedValue", publicName: "focusedValue", isSignal: true, isRequired: false, transformFunction: null }, defaultFocusedValue: { classPropertyName: "defaultFocusedValue", publicName: "defaultFocusedValue", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, defaultView: { classPropertyName: "defaultView", publicName: "defaultView", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, outsideDaySelectable: { classPropertyName: "outsideDaySelectable", publicName: "outsideDaySelectable", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, openOnClick: { classPropertyName: "openOnClick", publicName: "openOnClick", isSignal: true, isRequired: false, transformFunction: null }, fixedWeeks: { classPropertyName: "fixedWeeks", publicName: "fixedWeeks", isSignal: true, isRequired: false, transformFunction: null }, showWeekNumbers: { classPropertyName: "showWeekNumbers", publicName: "showWeekNumbers", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, minView: { classPropertyName: "minView", publicName: "minView", isSignal: true, isRequired: false, transformFunction: null }, maxView: { classPropertyName: "maxView", publicName: "maxView", isSignal: true, isRequired: false, transformFunction: null }, numOfMonths: { classPropertyName: "numOfMonths", publicName: "numOfMonths", isSignal: true, isRequired: false, transformFunction: null }, startOfWeek: { classPropertyName: "startOfWeek", publicName: "startOfWeek", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedDates: { classPropertyName: "maxSelectedDates", publicName: "maxSelectedDates", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, translations: { classPropertyName: "translations", publicName: "translations", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, parse: { classPropertyName: "parse", publicName: "parse", isSignal: true, isRequired: false, transformFunction: null }, createCalendar: { classPropertyName: "createCalendar", publicName: "createCalendar", isSignal: true, isRequired: false, transformFunction: null }, isDateUnavailable: { classPropertyName: "isDateUnavailable", publicName: "isDateUnavailable", isSignal: true, isRequired: false, transformFunction: null }, positioning: { classPropertyName: "positioning", publicName: "positioning", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", focusedValue: "focusedValueChange", view: "viewChange", open: "openChange", valueDetailsChange: "valueDetailsChange", focusChange: "focusChange", viewDetailsChange: "viewDetailsChange", visibleRangeChange: "visibleRangeChange", openDetailsChange: "openDetailsChange" }, providers: [
|
|
298
|
+
{
|
|
299
|
+
provide: PRESENCE_CONTEXT,
|
|
300
|
+
useFactory: (root) => root.presence,
|
|
301
|
+
deps: [forwardRef(() => DatePickerRoot)],
|
|
302
|
+
},
|
|
303
|
+
{ provide: DATE_PICKER_CONTEXT, useExisting: forwardRef(() => DatePickerRoot) },
|
|
304
|
+
{
|
|
305
|
+
provide: DATE_PICKER_CONTEXT_CARRIER,
|
|
306
|
+
useFactory: (root) => root.getContextCarrier(),
|
|
307
|
+
deps: [forwardRef(() => DatePickerRoot)],
|
|
308
|
+
},
|
|
309
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerRoot), multi: true },
|
|
310
|
+
], exportAs: ["datePickerRoot"], usesInheritance: true, ngImport: i0 });
|
|
311
|
+
}
|
|
312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerRoot, decorators: [{
|
|
313
|
+
type: Directive,
|
|
314
|
+
args: [{
|
|
315
|
+
selector: "[datePickerRoot]",
|
|
316
|
+
standalone: true,
|
|
317
|
+
exportAs: "datePickerRoot",
|
|
318
|
+
providers: [
|
|
319
|
+
{
|
|
320
|
+
provide: PRESENCE_CONTEXT,
|
|
321
|
+
useFactory: (root) => root.presence,
|
|
322
|
+
deps: [forwardRef(() => DatePickerRoot)],
|
|
323
|
+
},
|
|
324
|
+
{ provide: DATE_PICKER_CONTEXT, useExisting: forwardRef(() => DatePickerRoot) },
|
|
325
|
+
{
|
|
326
|
+
provide: DATE_PICKER_CONTEXT_CARRIER,
|
|
327
|
+
useFactory: (root) => root.getContextCarrier(),
|
|
328
|
+
deps: [forwardRef(() => DatePickerRoot)],
|
|
329
|
+
},
|
|
330
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerRoot), multi: true },
|
|
331
|
+
],
|
|
332
|
+
}]
|
|
333
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ids: [{ type: i0.Input, args: [{ isSignal: true, alias: "ids", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], focusedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedValue", required: false }] }, { type: i0.Output, args: ["focusedValueChange"] }], defaultFocusedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultFocusedValue", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }, { type: i0.Output, args: ["viewChange"] }], defaultView: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultView", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], defaultOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultOpen", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], outsideDaySelectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "outsideDaySelectable", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], openOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "openOnClick", required: false }] }], fixedWeeks: [{ type: i0.Input, args: [{ isSignal: true, alias: "fixedWeeks", required: false }] }], showWeekNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showWeekNumbers", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], minView: [{ type: i0.Input, args: [{ isSignal: true, alias: "minView", required: false }] }], maxView: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxView", required: false }] }], numOfMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "numOfMonths", required: false }] }], startOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "startOfWeek", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], maxSelectedDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedDates", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], timeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeZone", required: false }] }], translations: [{ type: i0.Input, args: [{ isSignal: true, alias: "translations", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], parse: [{ type: i0.Input, args: [{ isSignal: true, alias: "parse", required: false }] }], createCalendar: [{ type: i0.Input, args: [{ isSignal: true, alias: "createCalendar", required: false }] }], isDateUnavailable: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDateUnavailable", required: false }] }], positioning: [{ type: i0.Input, args: [{ isSignal: true, alias: "positioning", required: false }] }], valueDetailsChange: [{ type: i0.Output, args: ["valueDetailsChange"] }], focusChange: [{ type: i0.Output, args: ["focusChange"] }], viewDetailsChange: [{ type: i0.Output, args: ["viewDetailsChange"] }], visibleRangeChange: [{ type: i0.Output, args: ["visibleRangeChange"] }], openDetailsChange: [{ type: i0.Output, args: ["openDetailsChange"] }] } });
|
|
334
|
+
function dateValuesEqual(a, b) {
|
|
335
|
+
if (a === b)
|
|
336
|
+
return true;
|
|
337
|
+
if (!a || !b)
|
|
338
|
+
return false;
|
|
339
|
+
return String(a) === String(b);
|
|
340
|
+
}
|
|
341
|
+
function dateValueArraysEqual(a, b) {
|
|
342
|
+
if (a === b)
|
|
343
|
+
return true;
|
|
344
|
+
if (!a || !b)
|
|
345
|
+
return false;
|
|
346
|
+
if (a.length !== b.length)
|
|
347
|
+
return false;
|
|
348
|
+
for (let i = 0; i < a.length; i++) {
|
|
349
|
+
if (!dateValuesEqual(a[i], b[i]))
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
return true;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
class DatePickerRootProvider extends PresenceBase {
|
|
356
|
+
value = input.required(/* @ts-ignore */
|
|
357
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
358
|
+
state = computed(() => this.value().state(), /* @ts-ignore */
|
|
359
|
+
...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
360
|
+
api = computed(() => this.value().api(), /* @ts-ignore */
|
|
361
|
+
...(ngDevMode ? [{ debugName: "api" }] : /* istanbul ignore next */ []));
|
|
362
|
+
send = (event) => this.value().send(event);
|
|
363
|
+
get service() {
|
|
364
|
+
return this.value().service;
|
|
365
|
+
}
|
|
366
|
+
presence = this.createPresence(() => {
|
|
367
|
+
try {
|
|
368
|
+
return this.api().open;
|
|
369
|
+
}
|
|
370
|
+
catch {
|
|
371
|
+
return false;
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
contextCarrier = buildRootCarrier({
|
|
375
|
+
providers: [{ provide: PRESENCE_CONTEXT, useValue: this.presence }],
|
|
376
|
+
root: this,
|
|
377
|
+
rootToken: DATE_PICKER_CONTEXT,
|
|
378
|
+
originInjector: inject(Injector),
|
|
379
|
+
environmentInjector: inject(EnvironmentInjector),
|
|
380
|
+
});
|
|
381
|
+
constructor() {
|
|
382
|
+
super();
|
|
383
|
+
bindProps({
|
|
384
|
+
elementRef: inject(ElementRef),
|
|
385
|
+
renderer: inject(Renderer2),
|
|
386
|
+
destroyRef: inject(DestroyRef),
|
|
387
|
+
props: () => this.api().getRootProps(),
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
getContextCarrier() {
|
|
391
|
+
return this.contextCarrier;
|
|
392
|
+
}
|
|
393
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerRootProvider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
394
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DatePickerRootProvider, isStandalone: true, selector: "[datePickerRootProvider]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
395
|
+
{
|
|
396
|
+
provide: PRESENCE_CONTEXT,
|
|
397
|
+
useFactory: (provider) => provider.presence,
|
|
398
|
+
deps: [forwardRef(() => DatePickerRootProvider)],
|
|
399
|
+
},
|
|
400
|
+
{ provide: DATE_PICKER_CONTEXT, useExisting: forwardRef(() => DatePickerRootProvider) },
|
|
401
|
+
{
|
|
402
|
+
provide: DATE_PICKER_CONTEXT_CARRIER,
|
|
403
|
+
useFactory: (provider) => provider.getContextCarrier(),
|
|
404
|
+
deps: [forwardRef(() => DatePickerRootProvider)],
|
|
405
|
+
},
|
|
406
|
+
], exportAs: ["datePickerRootProvider"], usesInheritance: true, ngImport: i0 });
|
|
407
|
+
}
|
|
408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerRootProvider, decorators: [{
|
|
409
|
+
type: Directive,
|
|
410
|
+
args: [{
|
|
411
|
+
selector: "[datePickerRootProvider]",
|
|
412
|
+
standalone: true,
|
|
413
|
+
exportAs: "datePickerRootProvider",
|
|
414
|
+
providers: [
|
|
415
|
+
{
|
|
416
|
+
provide: PRESENCE_CONTEXT,
|
|
417
|
+
useFactory: (provider) => provider.presence,
|
|
418
|
+
deps: [forwardRef(() => DatePickerRootProvider)],
|
|
419
|
+
},
|
|
420
|
+
{ provide: DATE_PICKER_CONTEXT, useExisting: forwardRef(() => DatePickerRootProvider) },
|
|
421
|
+
{
|
|
422
|
+
provide: DATE_PICKER_CONTEXT_CARRIER,
|
|
423
|
+
useFactory: (provider) => provider.getContextCarrier(),
|
|
424
|
+
deps: [forwardRef(() => DatePickerRootProvider)],
|
|
425
|
+
},
|
|
426
|
+
],
|
|
427
|
+
}]
|
|
428
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
|
|
429
|
+
|
|
430
|
+
class DatePickerContext {
|
|
431
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
432
|
+
void context;
|
|
433
|
+
return true;
|
|
434
|
+
}
|
|
435
|
+
datePicker = injectDatePickerContext();
|
|
436
|
+
templateRef = inject(TemplateRef);
|
|
437
|
+
viewContainer = inject(ViewContainerRef);
|
|
438
|
+
constructor() {
|
|
439
|
+
const view = this.viewContainer.createEmbeddedView(this.templateRef, {
|
|
440
|
+
$implicit: this.datePicker.api,
|
|
441
|
+
api: this.datePicker.api,
|
|
442
|
+
});
|
|
443
|
+
effect(() => {
|
|
444
|
+
this.datePicker.api();
|
|
445
|
+
view.detectChanges();
|
|
446
|
+
});
|
|
447
|
+
inject(DestroyRef).onDestroy(() => view.destroy());
|
|
448
|
+
}
|
|
449
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerContext, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
450
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerContext, isStandalone: true, selector: "[datePickerContext]", exportAs: ["datePickerContext"], ngImport: i0 });
|
|
451
|
+
}
|
|
452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerContext, decorators: [{
|
|
453
|
+
type: Directive,
|
|
454
|
+
args: [{
|
|
455
|
+
selector: "[datePickerContext]",
|
|
456
|
+
standalone: true,
|
|
457
|
+
exportAs: "datePickerContext",
|
|
458
|
+
}]
|
|
459
|
+
}], ctorParameters: () => [] });
|
|
460
|
+
|
|
461
|
+
class DatePickerLabel {
|
|
462
|
+
index = input(undefined, /* @ts-ignore */
|
|
463
|
+
...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
464
|
+
constructor() {
|
|
465
|
+
const context = injectDatePickerContext();
|
|
466
|
+
bindProps({
|
|
467
|
+
elementRef: inject(ElementRef),
|
|
468
|
+
renderer: inject(Renderer2),
|
|
469
|
+
destroyRef: inject(DestroyRef),
|
|
470
|
+
props: () => context.api().getLabelProps({ index: this.index() }),
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
474
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DatePickerLabel, isStandalone: true, selector: "[datePickerLabel]", inputs: { index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["datePickerLabel"], ngImport: i0 });
|
|
475
|
+
}
|
|
476
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerLabel, decorators: [{
|
|
477
|
+
type: Directive,
|
|
478
|
+
args: [{
|
|
479
|
+
selector: "[datePickerLabel]",
|
|
480
|
+
standalone: true,
|
|
481
|
+
exportAs: "datePickerLabel",
|
|
482
|
+
}]
|
|
483
|
+
}], ctorParameters: () => [], propDecorators: { index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }] } });
|
|
484
|
+
|
|
485
|
+
class DatePickerControl {
|
|
486
|
+
constructor() {
|
|
487
|
+
const context = injectDatePickerContext();
|
|
488
|
+
bindProps({
|
|
489
|
+
elementRef: inject(ElementRef),
|
|
490
|
+
renderer: inject(Renderer2),
|
|
491
|
+
destroyRef: inject(DestroyRef),
|
|
492
|
+
props: () => context.api().getControlProps(),
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
496
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerControl, isStandalone: true, selector: "[datePickerControl]", exportAs: ["datePickerControl"], ngImport: i0 });
|
|
497
|
+
}
|
|
498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerControl, decorators: [{
|
|
499
|
+
type: Directive,
|
|
500
|
+
args: [{
|
|
501
|
+
selector: "[datePickerControl]",
|
|
502
|
+
standalone: true,
|
|
503
|
+
exportAs: "datePickerControl",
|
|
504
|
+
}]
|
|
505
|
+
}], ctorParameters: () => [] });
|
|
506
|
+
|
|
507
|
+
class DatePickerInput {
|
|
508
|
+
index = input(undefined, /* @ts-ignore */
|
|
509
|
+
...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
510
|
+
fixOnBlur = input(true, { ...(ngDevMode ? { debugName: "fixOnBlur" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
511
|
+
constructor() {
|
|
512
|
+
const context = injectDatePickerContext();
|
|
513
|
+
bindProps({
|
|
514
|
+
elementRef: inject(ElementRef),
|
|
515
|
+
renderer: inject(Renderer2),
|
|
516
|
+
destroyRef: inject(DestroyRef),
|
|
517
|
+
props: () => context.api().getInputProps({ index: this.index(), fixOnBlur: this.fixOnBlur() }),
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
521
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DatePickerInput, isStandalone: true, selector: "[datePickerInput]", inputs: { index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, fixOnBlur: { classPropertyName: "fixOnBlur", publicName: "fixOnBlur", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["datePickerInput"], ngImport: i0 });
|
|
522
|
+
}
|
|
523
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerInput, decorators: [{
|
|
524
|
+
type: Directive,
|
|
525
|
+
args: [{
|
|
526
|
+
selector: "[datePickerInput]",
|
|
527
|
+
standalone: true,
|
|
528
|
+
exportAs: "datePickerInput",
|
|
529
|
+
}]
|
|
530
|
+
}], ctorParameters: () => [], propDecorators: { index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }], fixOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "fixOnBlur", required: false }] }] } });
|
|
531
|
+
|
|
532
|
+
class DatePickerTrigger {
|
|
533
|
+
constructor() {
|
|
534
|
+
const context = injectDatePickerContext();
|
|
535
|
+
bindProps({
|
|
536
|
+
elementRef: inject(ElementRef),
|
|
537
|
+
renderer: inject(Renderer2),
|
|
538
|
+
destroyRef: inject(DestroyRef),
|
|
539
|
+
props: () => context.api().getTriggerProps(),
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
543
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerTrigger, isStandalone: true, selector: "[datePickerTrigger]", exportAs: ["datePickerTrigger"], ngImport: i0 });
|
|
544
|
+
}
|
|
545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTrigger, decorators: [{
|
|
546
|
+
type: Directive,
|
|
547
|
+
args: [{
|
|
548
|
+
selector: "[datePickerTrigger]",
|
|
549
|
+
standalone: true,
|
|
550
|
+
exportAs: "datePickerTrigger",
|
|
551
|
+
}]
|
|
552
|
+
}], ctorParameters: () => [] });
|
|
553
|
+
|
|
554
|
+
class DatePickerContent {
|
|
555
|
+
constructor() {
|
|
556
|
+
const context = injectDatePickerContext();
|
|
557
|
+
const presence = injectPresenceContext();
|
|
558
|
+
const template = inject((TemplateRef), { optional: true });
|
|
559
|
+
const container = inject(ViewContainerRef);
|
|
560
|
+
const host = inject(ElementRef);
|
|
561
|
+
const elementRef = template ? { nativeElement: null } : host;
|
|
562
|
+
let view;
|
|
563
|
+
effect(() => {
|
|
564
|
+
const unmounted = presence.unmounted();
|
|
565
|
+
if (template) {
|
|
566
|
+
if (unmounted) {
|
|
567
|
+
elementRef.nativeElement = null;
|
|
568
|
+
container.clear();
|
|
569
|
+
view = undefined;
|
|
570
|
+
}
|
|
571
|
+
else if (!view) {
|
|
572
|
+
view = container.createEmbeddedView(template);
|
|
573
|
+
elementRef.nativeElement =
|
|
574
|
+
view.rootNodes.find((node) => node.nodeType === 1) ?? null;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
untracked(() => presence.setNode(elementRef.nativeElement));
|
|
578
|
+
});
|
|
579
|
+
bindProps({
|
|
580
|
+
elementRef,
|
|
581
|
+
renderer: inject(Renderer2),
|
|
582
|
+
destroyRef: inject(DestroyRef),
|
|
583
|
+
props: () => {
|
|
584
|
+
presence.unmounted();
|
|
585
|
+
return { ...context.api().getContentProps(), ...presence.getPresenceProps() };
|
|
586
|
+
},
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
590
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerContent, isStandalone: true, selector: "[datePickerContent]", exportAs: ["datePickerContent"], ngImport: i0 });
|
|
591
|
+
}
|
|
592
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerContent, decorators: [{
|
|
593
|
+
type: Directive,
|
|
594
|
+
args: [{
|
|
595
|
+
selector: "[datePickerContent]",
|
|
596
|
+
standalone: true,
|
|
597
|
+
exportAs: "datePickerContent",
|
|
598
|
+
}]
|
|
599
|
+
}], ctorParameters: () => [] });
|
|
600
|
+
|
|
601
|
+
class DatePickerPositioner {
|
|
602
|
+
constructor() {
|
|
603
|
+
const context = injectDatePickerContext();
|
|
604
|
+
const presence = injectPresenceContext();
|
|
605
|
+
const template = inject((TemplateRef), { optional: true });
|
|
606
|
+
const container = inject(ViewContainerRef);
|
|
607
|
+
const host = inject(ElementRef);
|
|
608
|
+
const elementRef = template ? { nativeElement: null } : host;
|
|
609
|
+
let view;
|
|
610
|
+
effect(() => {
|
|
611
|
+
const unmounted = presence.unmounted();
|
|
612
|
+
if (template) {
|
|
613
|
+
if (unmounted) {
|
|
614
|
+
elementRef.nativeElement = null;
|
|
615
|
+
container.clear();
|
|
616
|
+
view = undefined;
|
|
617
|
+
}
|
|
618
|
+
else if (!view) {
|
|
619
|
+
view = container.createEmbeddedView(template);
|
|
620
|
+
elementRef.nativeElement =
|
|
621
|
+
view.rootNodes.find((node) => node.nodeType === 1) ?? null;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
bindProps({
|
|
626
|
+
elementRef,
|
|
627
|
+
renderer: inject(Renderer2),
|
|
628
|
+
destroyRef: inject(DestroyRef),
|
|
629
|
+
props: () => {
|
|
630
|
+
presence.unmounted();
|
|
631
|
+
return { ...context.api().getPositionerProps(), hidden: presence.unmounted() };
|
|
632
|
+
},
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerPositioner, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
636
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerPositioner, isStandalone: true, selector: "[datePickerPositioner]", exportAs: ["datePickerPositioner"], ngImport: i0 });
|
|
637
|
+
}
|
|
638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerPositioner, decorators: [{
|
|
639
|
+
type: Directive,
|
|
640
|
+
args: [{
|
|
641
|
+
selector: "[datePickerPositioner]",
|
|
642
|
+
standalone: true,
|
|
643
|
+
exportAs: "datePickerPositioner",
|
|
644
|
+
}]
|
|
645
|
+
}], ctorParameters: () => [] });
|
|
646
|
+
|
|
647
|
+
class DatePickerClearTrigger {
|
|
648
|
+
constructor() {
|
|
649
|
+
const context = injectDatePickerContext();
|
|
650
|
+
bindProps({
|
|
651
|
+
elementRef: inject(ElementRef),
|
|
652
|
+
renderer: inject(Renderer2),
|
|
653
|
+
destroyRef: inject(DestroyRef),
|
|
654
|
+
props: () => context.api().getClearTriggerProps(),
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerClearTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
658
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerClearTrigger, isStandalone: true, selector: "[datePickerClearTrigger]", exportAs: ["datePickerClearTrigger"], ngImport: i0 });
|
|
659
|
+
}
|
|
660
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerClearTrigger, decorators: [{
|
|
661
|
+
type: Directive,
|
|
662
|
+
args: [{
|
|
663
|
+
selector: "[datePickerClearTrigger]",
|
|
664
|
+
standalone: true,
|
|
665
|
+
exportAs: "datePickerClearTrigger",
|
|
666
|
+
}]
|
|
667
|
+
}], ctorParameters: () => [] });
|
|
668
|
+
|
|
669
|
+
class DatePickerPrevTrigger {
|
|
670
|
+
constructor() {
|
|
671
|
+
const context = injectDatePickerContext();
|
|
672
|
+
const view = injectDatePickerViewContext();
|
|
673
|
+
bindProps({
|
|
674
|
+
elementRef: inject(ElementRef),
|
|
675
|
+
renderer: inject(Renderer2),
|
|
676
|
+
destroyRef: inject(DestroyRef),
|
|
677
|
+
props: () => context.api().getPrevTriggerProps(view()),
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerPrevTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
681
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerPrevTrigger, isStandalone: true, selector: "[datePickerPrevTrigger]", exportAs: ["datePickerPrevTrigger"], ngImport: i0 });
|
|
682
|
+
}
|
|
683
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerPrevTrigger, decorators: [{
|
|
684
|
+
type: Directive,
|
|
685
|
+
args: [{
|
|
686
|
+
selector: "[datePickerPrevTrigger]",
|
|
687
|
+
standalone: true,
|
|
688
|
+
exportAs: "datePickerPrevTrigger",
|
|
689
|
+
}]
|
|
690
|
+
}], ctorParameters: () => [] });
|
|
691
|
+
|
|
692
|
+
class DatePickerNextTrigger {
|
|
693
|
+
constructor() {
|
|
694
|
+
const context = injectDatePickerContext();
|
|
695
|
+
const view = injectDatePickerViewContext();
|
|
696
|
+
bindProps({
|
|
697
|
+
elementRef: inject(ElementRef),
|
|
698
|
+
renderer: inject(Renderer2),
|
|
699
|
+
destroyRef: inject(DestroyRef),
|
|
700
|
+
props: () => context.api().getNextTriggerProps(view()),
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerNextTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
704
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerNextTrigger, isStandalone: true, selector: "[datePickerNextTrigger]", exportAs: ["datePickerNextTrigger"], ngImport: i0 });
|
|
705
|
+
}
|
|
706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerNextTrigger, decorators: [{
|
|
707
|
+
type: Directive,
|
|
708
|
+
args: [{
|
|
709
|
+
selector: "[datePickerNextTrigger]",
|
|
710
|
+
standalone: true,
|
|
711
|
+
exportAs: "datePickerNextTrigger",
|
|
712
|
+
}]
|
|
713
|
+
}], ctorParameters: () => [] });
|
|
714
|
+
|
|
715
|
+
class DatePickerViewTrigger {
|
|
716
|
+
constructor() {
|
|
717
|
+
const context = injectDatePickerContext();
|
|
718
|
+
const view = injectDatePickerViewContext();
|
|
719
|
+
bindProps({
|
|
720
|
+
elementRef: inject(ElementRef),
|
|
721
|
+
renderer: inject(Renderer2),
|
|
722
|
+
destroyRef: inject(DestroyRef),
|
|
723
|
+
props: () => context.api().getViewTriggerProps(view()),
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerViewTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
727
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerViewTrigger, isStandalone: true, selector: "[datePickerViewTrigger]", exportAs: ["datePickerViewTrigger"], ngImport: i0 });
|
|
728
|
+
}
|
|
729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerViewTrigger, decorators: [{
|
|
730
|
+
type: Directive,
|
|
731
|
+
args: [{
|
|
732
|
+
selector: "[datePickerViewTrigger]",
|
|
733
|
+
standalone: true,
|
|
734
|
+
exportAs: "datePickerViewTrigger",
|
|
735
|
+
}]
|
|
736
|
+
}], ctorParameters: () => [] });
|
|
737
|
+
|
|
738
|
+
class DatePickerViewControl {
|
|
739
|
+
constructor() {
|
|
740
|
+
const context = injectDatePickerContext();
|
|
741
|
+
const view = injectDatePickerViewContext();
|
|
742
|
+
bindProps({
|
|
743
|
+
elementRef: inject(ElementRef),
|
|
744
|
+
renderer: inject(Renderer2),
|
|
745
|
+
destroyRef: inject(DestroyRef),
|
|
746
|
+
props: () => context.api().getViewControlProps(view()),
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerViewControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
750
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerViewControl, isStandalone: true, selector: "[datePickerViewControl]", exportAs: ["datePickerViewControl"], ngImport: i0 });
|
|
751
|
+
}
|
|
752
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerViewControl, decorators: [{
|
|
753
|
+
type: Directive,
|
|
754
|
+
args: [{
|
|
755
|
+
selector: "[datePickerViewControl]",
|
|
756
|
+
standalone: true,
|
|
757
|
+
exportAs: "datePickerViewControl",
|
|
758
|
+
}]
|
|
759
|
+
}], ctorParameters: () => [] });
|
|
760
|
+
|
|
761
|
+
class DatePickerPresetTrigger {
|
|
762
|
+
value = input.required(/* @ts-ignore */
|
|
763
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
764
|
+
constructor() {
|
|
765
|
+
const context = injectDatePickerContext();
|
|
766
|
+
bindProps({
|
|
767
|
+
elementRef: inject(ElementRef),
|
|
768
|
+
renderer: inject(Renderer2),
|
|
769
|
+
destroyRef: inject(DestroyRef),
|
|
770
|
+
props: () => context.api().getPresetTriggerProps({ value: this.value() }),
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerPresetTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
774
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DatePickerPresetTrigger, isStandalone: true, selector: "[datePickerPresetTrigger]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["datePickerPresetTrigger"], ngImport: i0 });
|
|
775
|
+
}
|
|
776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerPresetTrigger, decorators: [{
|
|
777
|
+
type: Directive,
|
|
778
|
+
args: [{
|
|
779
|
+
selector: "[datePickerPresetTrigger]",
|
|
780
|
+
standalone: true,
|
|
781
|
+
exportAs: "datePickerPresetTrigger",
|
|
782
|
+
}]
|
|
783
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
|
|
784
|
+
|
|
785
|
+
class DatePickerMonthSelect {
|
|
786
|
+
elementRef = inject(ElementRef);
|
|
787
|
+
renderer = inject(Renderer2);
|
|
788
|
+
ownsOptions = signal(false, /* @ts-ignore */
|
|
789
|
+
...(ngDevMode ? [{ debugName: "ownsOptions" }] : /* istanbul ignore next */ []));
|
|
790
|
+
createdOptions = [];
|
|
791
|
+
constructor() {
|
|
792
|
+
const context = injectDatePickerContext();
|
|
793
|
+
bindProps({
|
|
794
|
+
elementRef: this.elementRef,
|
|
795
|
+
renderer: this.renderer,
|
|
796
|
+
destroyRef: inject(DestroyRef),
|
|
797
|
+
props: () => context.api().getMonthSelectProps(),
|
|
798
|
+
});
|
|
799
|
+
effect(() => {
|
|
800
|
+
if (!this.ownsOptions())
|
|
801
|
+
return;
|
|
802
|
+
this.syncOptions(context.api().getMonths());
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
ngAfterContentInit() {
|
|
806
|
+
this.ownsOptions.set(hasOnlyWhitespaceContent$3(this.elementRef.nativeElement));
|
|
807
|
+
}
|
|
808
|
+
syncOptions(options) {
|
|
809
|
+
const select = this.elementRef.nativeElement;
|
|
810
|
+
for (const option of this.createdOptions) {
|
|
811
|
+
this.renderer.removeChild(select, option);
|
|
812
|
+
}
|
|
813
|
+
this.createdOptions = options.map((item) => {
|
|
814
|
+
const option = this.renderer.createElement("option");
|
|
815
|
+
this.renderer.setProperty(option, "value", String(item.value));
|
|
816
|
+
this.renderer.setProperty(option, "textContent", item.label);
|
|
817
|
+
this.renderer.setProperty(option, "disabled", Boolean(item.disabled));
|
|
818
|
+
this.renderer.appendChild(select, option);
|
|
819
|
+
return option;
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerMonthSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
823
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerMonthSelect, isStandalone: true, selector: "[datePickerMonthSelect]", exportAs: ["datePickerMonthSelect"], ngImport: i0 });
|
|
824
|
+
}
|
|
825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerMonthSelect, decorators: [{
|
|
826
|
+
type: Directive,
|
|
827
|
+
args: [{
|
|
828
|
+
selector: "[datePickerMonthSelect]",
|
|
829
|
+
standalone: true,
|
|
830
|
+
exportAs: "datePickerMonthSelect",
|
|
831
|
+
}]
|
|
832
|
+
}], ctorParameters: () => [] });
|
|
833
|
+
function hasOnlyWhitespaceContent$3(element) {
|
|
834
|
+
return element.firstElementChild === null && (element.textContent?.trim() ?? "") === "";
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
class DatePickerYearSelect {
|
|
838
|
+
elementRef = inject(ElementRef);
|
|
839
|
+
renderer = inject(Renderer2);
|
|
840
|
+
ownsOptions = signal(false, /* @ts-ignore */
|
|
841
|
+
...(ngDevMode ? [{ debugName: "ownsOptions" }] : /* istanbul ignore next */ []));
|
|
842
|
+
createdOptions = [];
|
|
843
|
+
constructor() {
|
|
844
|
+
const context = injectDatePickerContext();
|
|
845
|
+
bindProps({
|
|
846
|
+
elementRef: this.elementRef,
|
|
847
|
+
renderer: this.renderer,
|
|
848
|
+
destroyRef: inject(DestroyRef),
|
|
849
|
+
props: () => context.api().getYearSelectProps(),
|
|
850
|
+
});
|
|
851
|
+
effect(() => {
|
|
852
|
+
if (!this.ownsOptions())
|
|
853
|
+
return;
|
|
854
|
+
this.syncOptions(context.api().getYears());
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
ngAfterContentInit() {
|
|
858
|
+
this.ownsOptions.set(hasOnlyWhitespaceContent$2(this.elementRef.nativeElement));
|
|
859
|
+
}
|
|
860
|
+
syncOptions(options) {
|
|
861
|
+
const select = this.elementRef.nativeElement;
|
|
862
|
+
for (const option of this.createdOptions) {
|
|
863
|
+
this.renderer.removeChild(select, option);
|
|
864
|
+
}
|
|
865
|
+
this.createdOptions = options.map((item) => {
|
|
866
|
+
const option = this.renderer.createElement("option");
|
|
867
|
+
this.renderer.setProperty(option, "value", String(item.value));
|
|
868
|
+
this.renderer.setProperty(option, "textContent", item.label);
|
|
869
|
+
this.renderer.setProperty(option, "disabled", Boolean(item.disabled));
|
|
870
|
+
this.renderer.appendChild(select, option);
|
|
871
|
+
return option;
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerYearSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
875
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerYearSelect, isStandalone: true, selector: "[datePickerYearSelect]", exportAs: ["datePickerYearSelect"], ngImport: i0 });
|
|
876
|
+
}
|
|
877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerYearSelect, decorators: [{
|
|
878
|
+
type: Directive,
|
|
879
|
+
args: [{
|
|
880
|
+
selector: "[datePickerYearSelect]",
|
|
881
|
+
standalone: true,
|
|
882
|
+
exportAs: "datePickerYearSelect",
|
|
883
|
+
}]
|
|
884
|
+
}], ctorParameters: () => [] });
|
|
885
|
+
function hasOnlyWhitespaceContent$2(element) {
|
|
886
|
+
return element.firstElementChild === null && (element.textContent?.trim() ?? "") === "";
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
class DatePickerRangeText {
|
|
890
|
+
elementRef = inject(ElementRef);
|
|
891
|
+
renderer = inject(Renderer2);
|
|
892
|
+
ownsTextContent = signal(false, /* @ts-ignore */
|
|
893
|
+
...(ngDevMode ? [{ debugName: "ownsTextContent" }] : /* istanbul ignore next */ []));
|
|
894
|
+
constructor() {
|
|
895
|
+
const context = injectDatePickerContext();
|
|
896
|
+
bindProps({
|
|
897
|
+
elementRef: this.elementRef,
|
|
898
|
+
renderer: this.renderer,
|
|
899
|
+
destroyRef: inject(DestroyRef),
|
|
900
|
+
props: () => context.api().getRangeTextProps(),
|
|
901
|
+
});
|
|
902
|
+
effect(() => {
|
|
903
|
+
if (!this.ownsTextContent())
|
|
904
|
+
return;
|
|
905
|
+
this.renderer.setProperty(this.elementRef.nativeElement, "textContent", context.api().visibleRangeText.formatted);
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
ngAfterContentInit() {
|
|
909
|
+
this.ownsTextContent.set(hasOnlyWhitespaceContent$1(this.elementRef.nativeElement));
|
|
910
|
+
}
|
|
911
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerRangeText, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
912
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerRangeText, isStandalone: true, selector: "[datePickerRangeText]", exportAs: ["datePickerRangeText"], ngImport: i0 });
|
|
913
|
+
}
|
|
914
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerRangeText, decorators: [{
|
|
915
|
+
type: Directive,
|
|
916
|
+
args: [{
|
|
917
|
+
selector: "[datePickerRangeText]",
|
|
918
|
+
standalone: true,
|
|
919
|
+
exportAs: "datePickerRangeText",
|
|
920
|
+
}]
|
|
921
|
+
}], ctorParameters: () => [] });
|
|
922
|
+
function hasOnlyWhitespaceContent$1(element) {
|
|
923
|
+
return element.firstElementChild === null && (element.textContent?.trim() ?? "") === "";
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
class DatePickerValueText {
|
|
927
|
+
placeholder = input(undefined, /* @ts-ignore */
|
|
928
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
929
|
+
separator = input(", ", /* @ts-ignore */
|
|
930
|
+
...(ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []));
|
|
931
|
+
elementRef = inject(ElementRef);
|
|
932
|
+
renderer = inject(Renderer2);
|
|
933
|
+
ownsTextContent = signal(false, /* @ts-ignore */
|
|
934
|
+
...(ngDevMode ? [{ debugName: "ownsTextContent" }] : /* istanbul ignore next */ []));
|
|
935
|
+
constructor() {
|
|
936
|
+
const context = injectDatePickerContext();
|
|
937
|
+
bindProps({
|
|
938
|
+
elementRef: this.elementRef,
|
|
939
|
+
renderer: this.renderer,
|
|
940
|
+
destroyRef: inject(DestroyRef),
|
|
941
|
+
props: () => datePickerAnatomy.build().valueText.attrs,
|
|
942
|
+
});
|
|
943
|
+
effect(() => {
|
|
944
|
+
if (!this.ownsTextContent())
|
|
945
|
+
return;
|
|
946
|
+
const api = context.api();
|
|
947
|
+
const text = api.value.length > 0 ? api.valueAsString.join(this.separator()) : this.placeholder();
|
|
948
|
+
this.renderer.setProperty(this.elementRef.nativeElement, "textContent", text ?? "");
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
ngAfterContentInit() {
|
|
952
|
+
this.ownsTextContent.set(hasOnlyWhitespaceContent(this.elementRef.nativeElement));
|
|
953
|
+
}
|
|
954
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerValueText, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
955
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DatePickerValueText, isStandalone: true, selector: "[datePickerValueText]", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["datePickerValueText"], ngImport: i0 });
|
|
956
|
+
}
|
|
957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerValueText, decorators: [{
|
|
958
|
+
type: Directive,
|
|
959
|
+
args: [{
|
|
960
|
+
selector: "[datePickerValueText]",
|
|
961
|
+
standalone: true,
|
|
962
|
+
exportAs: "datePickerValueText",
|
|
963
|
+
}]
|
|
964
|
+
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }] } });
|
|
965
|
+
function hasOnlyWhitespaceContent(element) {
|
|
966
|
+
return element.firstElementChild === null && (element.textContent?.trim() ?? "") === "";
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
class DatePickerView {
|
|
970
|
+
view = input.required(/* @ts-ignore */
|
|
971
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
972
|
+
viewContext = computed(() => ({ view: this.view() }), /* @ts-ignore */
|
|
973
|
+
...(ngDevMode ? [{ debugName: "viewContext" }] : /* istanbul ignore next */ []));
|
|
974
|
+
constructor() {
|
|
975
|
+
const context = injectDatePickerContext();
|
|
976
|
+
bindProps({
|
|
977
|
+
elementRef: inject(ElementRef),
|
|
978
|
+
renderer: inject(Renderer2),
|
|
979
|
+
destroyRef: inject(DestroyRef),
|
|
980
|
+
props: () => ({
|
|
981
|
+
...datePickerAnatomy.build().view.attrs,
|
|
982
|
+
...context.api().getViewProps(this.viewContext()),
|
|
983
|
+
hidden: context.api().view !== this.view(),
|
|
984
|
+
}),
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
getViewContext() {
|
|
988
|
+
return this.viewContext;
|
|
989
|
+
}
|
|
990
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerView, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
991
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DatePickerView, isStandalone: true, selector: "[datePickerView]", inputs: { view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
992
|
+
{
|
|
993
|
+
provide: DATE_PICKER_VIEW_CONTEXT,
|
|
994
|
+
useFactory: (view) => view.getViewContext(),
|
|
995
|
+
deps: [forwardRef(() => DatePickerView)],
|
|
996
|
+
},
|
|
997
|
+
], exportAs: ["datePickerView"], ngImport: i0 });
|
|
998
|
+
}
|
|
999
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerView, decorators: [{
|
|
1000
|
+
type: Directive,
|
|
1001
|
+
args: [{
|
|
1002
|
+
selector: "[datePickerView]",
|
|
1003
|
+
standalone: true,
|
|
1004
|
+
exportAs: "datePickerView",
|
|
1005
|
+
providers: [
|
|
1006
|
+
{
|
|
1007
|
+
provide: DATE_PICKER_VIEW_CONTEXT,
|
|
1008
|
+
useFactory: (view) => view.getViewContext(),
|
|
1009
|
+
deps: [forwardRef(() => DatePickerView)],
|
|
1010
|
+
},
|
|
1011
|
+
],
|
|
1012
|
+
}]
|
|
1013
|
+
}], ctorParameters: () => [], propDecorators: { view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: true }] }] } });
|
|
1014
|
+
|
|
1015
|
+
class DatePickerTable {
|
|
1016
|
+
columns = input(undefined, /* @ts-ignore */
|
|
1017
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
1018
|
+
idInput = input(undefined, { ...(ngDevMode ? { debugName: "idInput" } : /* istanbul ignore next */ {}), alias: "id" });
|
|
1019
|
+
fallbackId = createId();
|
|
1020
|
+
view = injectDatePickerViewContext();
|
|
1021
|
+
tableContext = computed(() => ({
|
|
1022
|
+
...this.view(),
|
|
1023
|
+
columns: this.columns(),
|
|
1024
|
+
id: this.idInput() ?? this.fallbackId,
|
|
1025
|
+
}), /* @ts-ignore */
|
|
1026
|
+
...(ngDevMode ? [{ debugName: "tableContext" }] : /* istanbul ignore next */ []));
|
|
1027
|
+
constructor() {
|
|
1028
|
+
const context = injectDatePickerContext();
|
|
1029
|
+
bindProps({
|
|
1030
|
+
elementRef: inject(ElementRef),
|
|
1031
|
+
renderer: inject(Renderer2),
|
|
1032
|
+
destroyRef: inject(DestroyRef),
|
|
1033
|
+
props: () => context.api().getTableProps(this.tableContext()),
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
getTableContext() {
|
|
1037
|
+
return this.tableContext;
|
|
1038
|
+
}
|
|
1039
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1040
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DatePickerTable, isStandalone: true, selector: "[datePickerTable]", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1041
|
+
{
|
|
1042
|
+
provide: DATE_PICKER_TABLE_CONTEXT,
|
|
1043
|
+
useFactory: (table) => table.getTableContext(),
|
|
1044
|
+
deps: [forwardRef(() => DatePickerTable)],
|
|
1045
|
+
},
|
|
1046
|
+
], exportAs: ["datePickerTable"], ngImport: i0 });
|
|
1047
|
+
}
|
|
1048
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTable, decorators: [{
|
|
1049
|
+
type: Directive,
|
|
1050
|
+
args: [{
|
|
1051
|
+
selector: "[datePickerTable]",
|
|
1052
|
+
standalone: true,
|
|
1053
|
+
exportAs: "datePickerTable",
|
|
1054
|
+
providers: [
|
|
1055
|
+
{
|
|
1056
|
+
provide: DATE_PICKER_TABLE_CONTEXT,
|
|
1057
|
+
useFactory: (table) => table.getTableContext(),
|
|
1058
|
+
deps: [forwardRef(() => DatePickerTable)],
|
|
1059
|
+
},
|
|
1060
|
+
],
|
|
1061
|
+
}]
|
|
1062
|
+
}], ctorParameters: () => [], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], idInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
|
|
1063
|
+
|
|
1064
|
+
class DatePickerTableHead {
|
|
1065
|
+
constructor() {
|
|
1066
|
+
const context = injectDatePickerContext();
|
|
1067
|
+
const table = injectDatePickerTableContext();
|
|
1068
|
+
bindProps({
|
|
1069
|
+
elementRef: inject(ElementRef),
|
|
1070
|
+
renderer: inject(Renderer2),
|
|
1071
|
+
destroyRef: inject(DestroyRef),
|
|
1072
|
+
props: () => context.api().getTableHeadProps(table()),
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableHead, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1076
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerTableHead, isStandalone: true, selector: "[datePickerTableHead]", exportAs: ["datePickerTableHead"], ngImport: i0 });
|
|
1077
|
+
}
|
|
1078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableHead, decorators: [{
|
|
1079
|
+
type: Directive,
|
|
1080
|
+
args: [{
|
|
1081
|
+
selector: "[datePickerTableHead]",
|
|
1082
|
+
standalone: true,
|
|
1083
|
+
exportAs: "datePickerTableHead",
|
|
1084
|
+
}]
|
|
1085
|
+
}], ctorParameters: () => [] });
|
|
1086
|
+
|
|
1087
|
+
class DatePickerTableHeader {
|
|
1088
|
+
constructor() {
|
|
1089
|
+
const context = injectDatePickerContext();
|
|
1090
|
+
const table = injectDatePickerTableContext();
|
|
1091
|
+
bindProps({
|
|
1092
|
+
elementRef: inject(ElementRef),
|
|
1093
|
+
renderer: inject(Renderer2),
|
|
1094
|
+
destroyRef: inject(DestroyRef),
|
|
1095
|
+
props: () => context.api().getTableHeaderProps(table()),
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1099
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerTableHeader, isStandalone: true, selector: "[datePickerTableHeader]", exportAs: ["datePickerTableHeader"], ngImport: i0 });
|
|
1100
|
+
}
|
|
1101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableHeader, decorators: [{
|
|
1102
|
+
type: Directive,
|
|
1103
|
+
args: [{
|
|
1104
|
+
selector: "[datePickerTableHeader]",
|
|
1105
|
+
standalone: true,
|
|
1106
|
+
exportAs: "datePickerTableHeader",
|
|
1107
|
+
}]
|
|
1108
|
+
}], ctorParameters: () => [] });
|
|
1109
|
+
|
|
1110
|
+
class DatePickerTableBody {
|
|
1111
|
+
constructor() {
|
|
1112
|
+
const context = injectDatePickerContext();
|
|
1113
|
+
const table = injectDatePickerTableContext();
|
|
1114
|
+
bindProps({
|
|
1115
|
+
elementRef: inject(ElementRef),
|
|
1116
|
+
renderer: inject(Renderer2),
|
|
1117
|
+
destroyRef: inject(DestroyRef),
|
|
1118
|
+
props: () => context.api().getTableBodyProps(table()),
|
|
1119
|
+
});
|
|
1120
|
+
}
|
|
1121
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1122
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerTableBody, isStandalone: true, selector: "[datePickerTableBody]", exportAs: ["datePickerTableBody"], ngImport: i0 });
|
|
1123
|
+
}
|
|
1124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableBody, decorators: [{
|
|
1125
|
+
type: Directive,
|
|
1126
|
+
args: [{
|
|
1127
|
+
selector: "[datePickerTableBody]",
|
|
1128
|
+
standalone: true,
|
|
1129
|
+
exportAs: "datePickerTableBody",
|
|
1130
|
+
}]
|
|
1131
|
+
}], ctorParameters: () => [] });
|
|
1132
|
+
|
|
1133
|
+
class DatePickerTableRow {
|
|
1134
|
+
constructor() {
|
|
1135
|
+
const context = injectDatePickerContext();
|
|
1136
|
+
const table = injectDatePickerTableContext();
|
|
1137
|
+
bindProps({
|
|
1138
|
+
elementRef: inject(ElementRef),
|
|
1139
|
+
renderer: inject(Renderer2),
|
|
1140
|
+
destroyRef: inject(DestroyRef),
|
|
1141
|
+
props: () => context.api().getTableRowProps(table()),
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableRow, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1145
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerTableRow, isStandalone: true, selector: "[datePickerTableRow]", exportAs: ["datePickerTableRow"], ngImport: i0 });
|
|
1146
|
+
}
|
|
1147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableRow, decorators: [{
|
|
1148
|
+
type: Directive,
|
|
1149
|
+
args: [{
|
|
1150
|
+
selector: "[datePickerTableRow]",
|
|
1151
|
+
standalone: true,
|
|
1152
|
+
exportAs: "datePickerTableRow",
|
|
1153
|
+
}]
|
|
1154
|
+
}], ctorParameters: () => [] });
|
|
1155
|
+
|
|
1156
|
+
class DatePickerTableCell {
|
|
1157
|
+
value = input.required(/* @ts-ignore */
|
|
1158
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1159
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1160
|
+
visibleRange = input(undefined, /* @ts-ignore */
|
|
1161
|
+
...(ngDevMode ? [{ debugName: "visibleRange" }] : /* istanbul ignore next */ []));
|
|
1162
|
+
columns = input(undefined, /* @ts-ignore */
|
|
1163
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
1164
|
+
view = injectDatePickerViewContext();
|
|
1165
|
+
table = injectDatePickerTableContext();
|
|
1166
|
+
cellContext = computed(() => {
|
|
1167
|
+
const value = this.value();
|
|
1168
|
+
if (this.view().view === "day") {
|
|
1169
|
+
return {
|
|
1170
|
+
value: value,
|
|
1171
|
+
disabled: this.disabled(),
|
|
1172
|
+
visibleRange: this.visibleRange(),
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
return {
|
|
1176
|
+
value: value,
|
|
1177
|
+
disabled: this.disabled(),
|
|
1178
|
+
columns: this.columns() ?? this.table().columns,
|
|
1179
|
+
};
|
|
1180
|
+
}, /* @ts-ignore */
|
|
1181
|
+
...(ngDevMode ? [{ debugName: "cellContext" }] : /* istanbul ignore next */ []));
|
|
1182
|
+
constructor() {
|
|
1183
|
+
const context = injectDatePickerContext();
|
|
1184
|
+
bindProps({
|
|
1185
|
+
elementRef: inject(ElementRef),
|
|
1186
|
+
renderer: inject(Renderer2),
|
|
1187
|
+
destroyRef: inject(DestroyRef),
|
|
1188
|
+
props: () => {
|
|
1189
|
+
const api = context.api();
|
|
1190
|
+
const props = this.cellContext();
|
|
1191
|
+
const view = this.view().view;
|
|
1192
|
+
if (view === "day")
|
|
1193
|
+
return api.getDayTableCellProps(props);
|
|
1194
|
+
if (view === "month")
|
|
1195
|
+
return api.getMonthTableCellProps(props);
|
|
1196
|
+
return api.getYearTableCellProps(props);
|
|
1197
|
+
},
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
getTableCellContext() {
|
|
1201
|
+
return this.cellContext;
|
|
1202
|
+
}
|
|
1203
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1204
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DatePickerTableCell, isStandalone: true, selector: "[datePickerTableCell]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, visibleRange: { classPropertyName: "visibleRange", publicName: "visibleRange", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1205
|
+
{
|
|
1206
|
+
provide: DATE_PICKER_TABLE_CELL_CONTEXT,
|
|
1207
|
+
useFactory: (cell) => cell.getTableCellContext(),
|
|
1208
|
+
deps: [forwardRef(() => DatePickerTableCell)],
|
|
1209
|
+
},
|
|
1210
|
+
], exportAs: ["datePickerTableCell"], ngImport: i0 });
|
|
1211
|
+
}
|
|
1212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableCell, decorators: [{
|
|
1213
|
+
type: Directive,
|
|
1214
|
+
args: [{
|
|
1215
|
+
selector: "[datePickerTableCell]",
|
|
1216
|
+
standalone: true,
|
|
1217
|
+
exportAs: "datePickerTableCell",
|
|
1218
|
+
providers: [
|
|
1219
|
+
{
|
|
1220
|
+
provide: DATE_PICKER_TABLE_CELL_CONTEXT,
|
|
1221
|
+
useFactory: (cell) => cell.getTableCellContext(),
|
|
1222
|
+
deps: [forwardRef(() => DatePickerTableCell)],
|
|
1223
|
+
},
|
|
1224
|
+
],
|
|
1225
|
+
}]
|
|
1226
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], visibleRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibleRange", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }] } });
|
|
1227
|
+
|
|
1228
|
+
class DatePickerTableCellTrigger {
|
|
1229
|
+
constructor() {
|
|
1230
|
+
const context = injectDatePickerContext();
|
|
1231
|
+
const view = injectDatePickerViewContext();
|
|
1232
|
+
const cell = injectDatePickerTableCellContext();
|
|
1233
|
+
bindProps({
|
|
1234
|
+
elementRef: inject(ElementRef),
|
|
1235
|
+
renderer: inject(Renderer2),
|
|
1236
|
+
destroyRef: inject(DestroyRef),
|
|
1237
|
+
props: () => {
|
|
1238
|
+
const api = context.api();
|
|
1239
|
+
const props = cell();
|
|
1240
|
+
const currentView = view().view;
|
|
1241
|
+
if (currentView === "day")
|
|
1242
|
+
return api.getDayTableCellTriggerProps(props);
|
|
1243
|
+
if (currentView === "month")
|
|
1244
|
+
return api.getMonthTableCellTriggerProps(props);
|
|
1245
|
+
return api.getYearTableCellTriggerProps(props);
|
|
1246
|
+
},
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableCellTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1250
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerTableCellTrigger, isStandalone: true, selector: "[datePickerTableCellTrigger]", exportAs: ["datePickerTableCellTrigger"], ngImport: i0 });
|
|
1251
|
+
}
|
|
1252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerTableCellTrigger, decorators: [{
|
|
1253
|
+
type: Directive,
|
|
1254
|
+
args: [{
|
|
1255
|
+
selector: "[datePickerTableCellTrigger]",
|
|
1256
|
+
standalone: true,
|
|
1257
|
+
exportAs: "datePickerTableCellTrigger",
|
|
1258
|
+
}]
|
|
1259
|
+
}], ctorParameters: () => [] });
|
|
1260
|
+
|
|
1261
|
+
class DatePickerWeekNumberHeaderCell {
|
|
1262
|
+
constructor() {
|
|
1263
|
+
const context = injectDatePickerContext();
|
|
1264
|
+
const table = injectDatePickerTableContext();
|
|
1265
|
+
bindProps({
|
|
1266
|
+
elementRef: inject(ElementRef),
|
|
1267
|
+
renderer: inject(Renderer2),
|
|
1268
|
+
destroyRef: inject(DestroyRef),
|
|
1269
|
+
props: () => context.api().getWeekNumberHeaderCellProps(table()),
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerWeekNumberHeaderCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1273
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DatePickerWeekNumberHeaderCell, isStandalone: true, selector: "[datePickerWeekNumberHeaderCell]", exportAs: ["datePickerWeekNumberHeaderCell"], ngImport: i0 });
|
|
1274
|
+
}
|
|
1275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerWeekNumberHeaderCell, decorators: [{
|
|
1276
|
+
type: Directive,
|
|
1277
|
+
args: [{
|
|
1278
|
+
selector: "[datePickerWeekNumberHeaderCell]",
|
|
1279
|
+
standalone: true,
|
|
1280
|
+
exportAs: "datePickerWeekNumberHeaderCell",
|
|
1281
|
+
}]
|
|
1282
|
+
}], ctorParameters: () => [] });
|
|
1283
|
+
|
|
1284
|
+
class DatePickerWeekNumberCell {
|
|
1285
|
+
weekIndex = input.required(/* @ts-ignore */
|
|
1286
|
+
...(ngDevMode ? [{ debugName: "weekIndex" }] : /* istanbul ignore next */ []));
|
|
1287
|
+
week = input.required(/* @ts-ignore */
|
|
1288
|
+
...(ngDevMode ? [{ debugName: "week" }] : /* istanbul ignore next */ []));
|
|
1289
|
+
constructor() {
|
|
1290
|
+
const context = injectDatePickerContext();
|
|
1291
|
+
bindProps({
|
|
1292
|
+
elementRef: inject(ElementRef),
|
|
1293
|
+
renderer: inject(Renderer2),
|
|
1294
|
+
destroyRef: inject(DestroyRef),
|
|
1295
|
+
props: () => context.api().getWeekNumberCellProps({ weekIndex: this.weekIndex(), week: this.week() }),
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerWeekNumberCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1299
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DatePickerWeekNumberCell, isStandalone: true, selector: "[datePickerWeekNumberCell]", inputs: { weekIndex: { classPropertyName: "weekIndex", publicName: "weekIndex", isSignal: true, isRequired: true, transformFunction: null }, week: { classPropertyName: "week", publicName: "week", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["datePickerWeekNumberCell"], ngImport: i0 });
|
|
1300
|
+
}
|
|
1301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DatePickerWeekNumberCell, decorators: [{
|
|
1302
|
+
type: Directive,
|
|
1303
|
+
args: [{
|
|
1304
|
+
selector: "[datePickerWeekNumberCell]",
|
|
1305
|
+
standalone: true,
|
|
1306
|
+
exportAs: "datePickerWeekNumberCell",
|
|
1307
|
+
}]
|
|
1308
|
+
}], ctorParameters: () => [], propDecorators: { weekIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekIndex", required: true }] }], week: [{ type: i0.Input, args: [{ isSignal: true, alias: "week", required: true }] }] } });
|
|
1309
|
+
|
|
1310
|
+
/**
|
|
1311
|
+
* Generated bundle index. Do not edit.
|
|
1312
|
+
*/
|
|
1313
|
+
|
|
1314
|
+
export { DATE_PICKER_CONTEXT, DATE_PICKER_CONTEXT_CARRIER, DATE_PICKER_TABLE_CELL_CONTEXT, DATE_PICKER_TABLE_CONTEXT, DATE_PICKER_VIEW_CONTEXT, DatePickerClearTrigger, DatePickerContent, DatePickerContext, DatePickerControl, DatePickerInput, DatePickerLabel, DatePickerMonthSelect, DatePickerNextTrigger, DatePickerPositioner, DatePickerPresetTrigger, DatePickerPrevTrigger, DatePickerRangeText, DatePickerRoot, DatePickerRootProvider, DatePickerTable, DatePickerTableBody, DatePickerTableCell, DatePickerTableCellTrigger, DatePickerTableHead, DatePickerTableHeader, DatePickerTableRow, DatePickerTrigger, DatePickerValueText, DatePickerView, DatePickerViewControl, DatePickerViewTrigger, DatePickerWeekNumberCell, DatePickerWeekNumberHeaderCell, DatePickerYearSelect, datePickerAnatomy, injectDatePickerContext, injectDatePickerContextCarrier, injectDatePickerTableCellContext, injectDatePickerTableContext, injectDatePickerViewContext, useDatePicker };
|
|
1315
|
+
//# sourceMappingURL=wirekyt-angular-date-picker.mjs.map
|