@acorex/components 19.12.0-next.1 → 19.12.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/calendar/lib/calendar-range.component.d.ts +4 -1
  2. package/calendar/lib/calendar.class.d.ts +8 -0
  3. package/calendar/lib/calendar.component.d.ts +2 -0
  4. package/datetime-box/lib/datetime-box.component.d.ts +11 -13
  5. package/datetime-input/lib/datetime-input.component.d.ts +21 -84
  6. package/datetime-picker/lib/datetime-picker.component.d.ts +13 -31
  7. package/fesm2022/acorex-components-alert.mjs +2 -2
  8. package/fesm2022/acorex-components-alert.mjs.map +1 -1
  9. package/fesm2022/acorex-components-calendar.mjs +65 -37
  10. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  11. package/fesm2022/acorex-components-conversation.mjs +2 -2
  12. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  13. package/fesm2022/acorex-components-datetime-box.mjs +28 -26
  14. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  15. package/fesm2022/acorex-components-datetime-input.mjs +113 -181
  16. package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
  17. package/fesm2022/acorex-components-datetime-picker.mjs +79 -81
  18. package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
  19. package/fesm2022/acorex-components-file-explorer.mjs +1 -1
  20. package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
  21. package/fesm2022/acorex-components-map.mjs +13 -3
  22. package/fesm2022/acorex-components-map.mjs.map +1 -1
  23. package/fesm2022/{acorex-components-modal-acorex-components-modal-Bs1CnBt8.mjs → acorex-components-modal-acorex-components-modal-BzlZIwq8.mjs} +116 -26
  24. package/fesm2022/acorex-components-modal-acorex-components-modal-BzlZIwq8.mjs.map +1 -0
  25. package/fesm2022/acorex-components-modal-modal-content.component-zmFWBaiD.mjs +187 -0
  26. package/fesm2022/acorex-components-modal-modal-content.component-zmFWBaiD.mjs.map +1 -0
  27. package/fesm2022/acorex-components-modal.mjs +1 -1
  28. package/fesm2022/acorex-components-query-builder.mjs +1 -1
  29. package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
  30. package/fesm2022/acorex-components-scheduler.mjs +1299 -103
  31. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  32. package/fesm2022/acorex-components-tree-view.mjs +16 -7
  33. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  34. package/map/lib/map.service.d.ts +1 -1
  35. package/modal/lib/modal-content/modal-content.component.d.ts +11 -8
  36. package/modal/lib/modal-state.service.d.ts +5 -4
  37. package/modal/lib/modal.component.d.ts +2 -0
  38. package/modal/lib/modal.service.d.ts +4 -2
  39. package/modal/lib/modal.types.d.ts +15 -1
  40. package/package.json +1 -1
  41. package/scheduler/index.d.ts +5 -2
  42. package/scheduler/lib/scheduler.class.d.ts +53 -0
  43. package/scheduler/lib/scheduler.component.d.ts +75 -22
  44. package/scheduler/lib/scheduler.module.d.ts +5 -9
  45. package/scheduler/lib/scheduler.service.d.ts +61 -0
  46. package/scheduler/lib/views/day/scheduler-day-view.component.d.ts +35 -0
  47. package/scheduler/lib/views/month/scheduler-month-view.component.d.ts +45 -0
  48. package/scheduler/lib/views/week/scheduler-week-view.component.d.ts +42 -0
  49. package/tree-view/lib/tree-view.component.d.ts +4 -2
  50. package/fesm2022/acorex-components-modal-acorex-components-modal-Bs1CnBt8.mjs.map +0 -1
  51. package/fesm2022/acorex-components-modal-modal-content.component-DhpujG4d.mjs +0 -181
  52. package/fesm2022/acorex-components-modal-modal-content.component-DhpujG4d.mjs.map +0 -1
  53. package/scheduler/lib/scheduler-month-view.component.d.ts +0 -41
  54. package/scheduler/lib/scheduler-week-view.component.d.ts +0 -10
@@ -1,9 +1,11 @@
1
1
  import { MXInputBaseValueComponent, AXComponent, AXFocusableComponent, AXValuableComponent, AXClearableComponent } from '@acorex/components/common';
2
2
  import { AXCalendarService, AXDateTimeModule } from '@acorex/core/date-time';
3
+ import { AXFormatService } from '@acorex/core/format';
4
+ import { AXLocaleService } from '@acorex/core/locale';
3
5
  import { AXPlatform } from '@acorex/core/platform';
4
6
  import { AXStringUtil } from '@acorex/core/utils';
5
7
  import * as i0 from '@angular/core';
6
- import { inject, input, EventEmitter, signal, forwardRef, HostListener, Input, Output, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
8
+ import { inject, signal, input, linkedSignal, viewChild, output, effect, untracked, forwardRef, HostListener, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
7
9
  import * as i1 from '@angular/forms';
8
10
  import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
9
11
  import { map } from 'rxjs';
@@ -17,8 +19,10 @@ import { CommonModule } from '@angular/common';
17
19
  class AXDateTimeInputComponent extends MXInputBaseValueComponent {
18
20
  constructor() {
19
21
  super(...arguments);
20
- this.calendarService = inject(AXCalendarService);
21
22
  this.platformService = inject(AXPlatform);
23
+ this.formatService = inject(AXFormatService);
24
+ this.localeService = inject(AXLocaleService);
25
+ this.calendarService = inject(AXCalendarService);
22
26
  /**
23
27
  * @ignore
24
28
  */
@@ -30,7 +34,7 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
30
34
  enabled: false,
31
35
  default: 2023,
32
36
  typedValue: null,
33
- realValue: () => this.editingDateObj.format(this._editingParts.year.placeholder),
37
+ realValue: () => this.formatService.format(this._editingDate(), 'datetime', this._editingParts.year.placeholder),
34
38
  },
35
39
  month: {
36
40
  key: 'month',
@@ -39,16 +43,16 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
39
43
  enabled: false,
40
44
  default: 1,
41
45
  typedValue: null,
42
- realValue: () => this.editingDateObj.format(this._editingParts.month.placeholder),
46
+ realValue: () => this.formatService.format(this._editingDate(), 'datetime', this._editingParts.month.placeholder),
43
47
  },
44
48
  day: {
45
49
  key: 'day',
46
50
  placeholder: 'dd',
47
- placeholders: ['dd', 'd', 'DDDD', 'DDD'],
51
+ placeholders: ['dd', 'DD', 'd', 'dddd', 'E'],
48
52
  enabled: false,
49
53
  default: 1,
50
54
  typedValue: null,
51
- realValue: () => this.editingDateObj.format(this._editingParts.day.placeholder),
55
+ realValue: () => this.formatService.format(this._editingDate(), 'datetime', this._editingParts.day.placeholder),
52
56
  },
53
57
  hour: {
54
58
  key: 'hour',
@@ -57,7 +61,7 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
57
61
  enabled: false,
58
62
  default: 0,
59
63
  typedValue: null,
60
- realValue: () => this.editingDateObj.format(this._editingParts.hour.placeholder),
64
+ realValue: () => this.formatService.format(this._editingDate(), 'datetime', this._editingParts.hour.placeholder),
61
65
  },
62
66
  minute: {
63
67
  key: 'minute',
@@ -66,7 +70,7 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
66
70
  enabled: false,
67
71
  default: 0,
68
72
  typedValue: null,
69
- realValue: () => this.editingDateObj.format(this._editingParts.minute.placeholder),
73
+ realValue: () => this.formatService.format(this._editingDate(), 'datetime', this._editingParts.minute.placeholder),
70
74
  },
71
75
  second: {
72
76
  key: 'second',
@@ -75,145 +79,93 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
75
79
  enabled: false,
76
80
  default: 0,
77
81
  typedValue: null,
78
- realValue: () => this.editingDateObj.format(this._editingParts.second.placeholder),
82
+ realValue: () => this.formatService.format(this._editingDate(), 'datetime', this._editingParts.second.placeholder),
83
+ },
84
+ AMPM: {
85
+ key: 'AMPM',
86
+ placeholder: 'a',
87
+ placeholders: ['a', 'A'],
88
+ enabled: false,
89
+ default: 0,
90
+ typedValue: null,
91
+ realValue: () => this.formatService.format(this._editingDate(), 'datetime', this._editingParts.AMPM.placeholder),
79
92
  },
80
93
  };
81
94
  /**
82
95
  * @ignore
83
96
  */
84
- this._inputChars = [];
97
+ this._editingText = signal('');
85
98
  /**
86
99
  * @ignore
87
100
  */
88
- this._type = this.calendarService.calendar.name();
101
+ this._inputChars = [];
89
102
  /**
90
103
  * Indicates whether typing is allowed in the input field.
91
104
  * @defaultValue false
92
105
  */
93
106
  this.allowTyping = input(false);
94
107
  /**
95
- * @ignore
108
+ * @description The calendar type to use for the datetime input.
96
109
  */
97
- this._activePart = 'hour';
110
+ this.calendar = input(null);
111
+ this._calendarSystem = linkedSignal(() => this.calendar());
112
+ this._activePart = signal(null);
113
+ // TODO: fix this
114
+ // #effect = effect(() => {
115
+ // this._activePart()
116
+ // this._clearInputBuffer();
117
+ // });
118
+ this._editingDate = linkedSignal(() => this.calendarService.now(this._calendarSystem()));
98
119
  /**
99
120
  * @ignore
100
121
  */
101
- this._editingDateObj = this.calendarService.now(this.type);
102
- /**
103
- * Emitted when the format of the datetime input changes.
104
- * @event
105
- */
106
- this.formatChange = new EventEmitter();
122
+ this.input = viewChild('input');
123
+ this.minValue = input(null);
124
+ this.maxValue = input(null);
107
125
  /**
108
126
  * Emitted when a click event occurs on the datetime box.
109
127
  * @event
110
128
  */
111
- this.onClick = new EventEmitter();
129
+ this.onClick = output();
130
+ this.picker = input('datetime');
131
+ this._format = linkedSignal(() => this.format());
112
132
  /**
113
- * @ignore
133
+ * @deprecated use locale & mode instead
114
134
  */
115
- this._format = this.calendarService.calendar.formats.dateTimeInput;
135
+ this.format = input();
136
+ this.#effect = effect(() => {
137
+ const profile = this.localeService.activeProfile();
138
+ //
139
+ if (!this.format()) {
140
+ this._format.set(this.format() ?? profile.formats[this.picker()]?.short ?? '');
141
+ }
142
+ //
143
+ if (!this.calendar()) {
144
+ this._calendarSystem.set(profile.calendar.system);
145
+ }
146
+ //
147
+ this._detectParts();
148
+ untracked(() => {
149
+ this._updateText();
150
+ });
151
+ });
116
152
  /**
117
153
  * @description check if page is in rtl or ltr
118
154
  */
119
155
  this.isRtl = signal(this.platformService.isRtl());
120
156
  }
121
- /**
122
- * Gets the type of the datetime input.
123
- */
124
- get type() {
125
- return this._type || this.calendarService.calendar.name();
126
- }
127
- /**
128
- * Sets the type of the datetime input.
129
- *
130
- * @param v The new type to set for the datetime input.
131
- */
132
- set type(v) {
133
- this.setOption({
134
- name: 'type',
135
- value: v,
136
- afterCallback: () => {
137
- this.cdr.markForCheck();
138
- },
157
+ #effect;
158
+ _detectParts() {
159
+ Object.values(this._editingParts).forEach((e) => {
160
+ e.enabled = false;
139
161
  });
140
- }
141
- /**
142
- * Gets the currently active part of the datetime input.
143
- */
144
- get activePart() {
145
- return this._activePart;
146
- }
147
- /**
148
- * Sets the currently active part of the datetime input.
149
- *
150
- * @param v The new name or identifier of the active part.
151
- */
152
- set activePart(v) {
153
- this._activePart = v;
154
- this._clearInputBuffer();
155
- }
156
- /**
157
- * @ignore
158
- */
159
- get editingDateObj() {
160
- return this._editingDateObj;
161
- }
162
- /**
163
- * Gets the minimum allowed date value for the datetime input.
164
- */
165
- get minValue() {
166
- return this._minValue;
167
- }
168
- /**
169
- * Sets the minimum allowable date value for the datetime input.
170
- *
171
- * @param v The minimum allowable date value to set.
172
- */
173
- set minValue(v) {
174
- this._minValue = v;
175
- }
176
- /**
177
- * Gets the maximum allowed date value for the datetime input.
178
- */
179
- get maxValue() {
180
- return this._maxValue;
181
- }
182
- /**
183
- * Sets the maximum allowable date value for the datetime input.
184
- *
185
- * @param v - The maximum allowable date value to set.
186
- */
187
- set maxValue(v) {
188
- this._maxValue = v;
189
- }
190
- /**
191
- * Gets or sets the format string for displaying date and time values.
192
- */
193
- get format() {
194
- return this._format;
195
- }
196
- /**
197
- * Sets the format string for displaying date and time values.
198
- * @param v - The new format string. It defines how date and time values should be formatted.
199
- */
200
- set format(v) {
201
- this.setOption({
202
- name: 'format',
203
- value: v,
204
- afterCallback: (o, n) => {
205
- Object.values(this._editingParts).forEach((e) => {
206
- e.enabled = false;
207
- });
208
- const formatParts = n.split(/[^a-zA-Z]+/);
209
- formatParts.forEach((f) => {
210
- const found = Object.values(this._editingParts).find((c) => c.placeholders.some((d) => d == f));
211
- if (found) {
212
- found.enabled = true;
213
- found.placeholder = f;
214
- }
215
- });
216
- },
162
+ const formatParts = this._format().split(/[^a-zA-Z]+/);
163
+ formatParts.forEach((f) => {
164
+ const found = Object.values(this._editingParts).find((c) => c.placeholders.some((d) => d == f));
165
+ if (found) {
166
+ found.enabled = true;
167
+ found.placeholder = f;
168
+ }
217
169
  });
218
170
  }
219
171
  /**
@@ -227,7 +179,7 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
227
179
  */
228
180
  _getOrderedParts() {
229
181
  // TODO: better spliter format
230
- const formatParts = this.format.split(/[^a-zA-Z]+/);
182
+ const formatParts = this._format().split(/[^a-zA-Z]+/);
231
183
  const result = [];
232
184
  formatParts.forEach((f) => {
233
185
  const found = Object.values(this._editingParts).find((c) => c.placeholders.some((d) => d == f));
@@ -246,10 +198,10 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
246
198
  * @ignore
247
199
  */
248
200
  _updateText() {
249
- let text = this.format;
201
+ let text = this._format();
250
202
  //
251
203
  Object.values(this._editingParts).forEach((part) => {
252
- if (this.activePart == part.key) {
204
+ if (this._activePart() == part.key) {
253
205
  if (part.typedValue)
254
206
  text = text.replace(part.placeholder, part.typedValue);
255
207
  }
@@ -259,8 +211,8 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
259
211
  }
260
212
  }
261
213
  });
262
- this._editingText = text == this.format ? '' : text;
263
- if (this.activePart) {
214
+ this._editingText.set(text == this._format() ? '' : text);
215
+ if (this._activePart()) {
264
216
  this._highlightActivePart();
265
217
  }
266
218
  }
@@ -271,7 +223,7 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
271
223
  */
272
224
  internalSetValue(value) {
273
225
  if (value) {
274
- let editingDate = this.calendarService.create(value, this.type);
226
+ let editingDate = this.calendarService.create(value, this._calendarSystem());
275
227
  let applyChanges = false;
276
228
  Object.values(this._editingParts).forEach((part) => {
277
229
  if (!part.enabled) {
@@ -292,8 +244,8 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
292
244
  * @ignore
293
245
  */
294
246
  internalValueChanged(value) {
295
- if (value && this.calendarService.isDate(value)) {
296
- this._editingDateObj = this.calendarService.create(value, this.type);
247
+ if (value && this.calendarService.isValidDate(value)) {
248
+ this._editingDate.set(this.calendarService.create(value, this._calendarSystem()));
297
249
  }
298
250
  Object.values(this._editingParts).forEach((part) => {
299
251
  if (value) {
@@ -320,21 +272,21 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
320
272
  const input = e.target;
321
273
  //
322
274
  const orderedParts = this._getOrderedParts();
323
- const part = this.activePart ? this._editingParts[this.activePart] : orderedParts[0];
275
+ const part = this._activePart() ? this._editingParts[this._activePart()] : orderedParts[0];
324
276
  const nextPart = part ? orderedParts[orderedParts.indexOf(part) + 1] : null;
325
277
  const prevPart = part ? orderedParts[orderedParts.indexOf(part) - 1] : null;
326
278
  //
327
279
  const goNext = () => {
328
280
  this._clearInputBuffer();
329
281
  if (nextPart) {
330
- this.activePart = nextPart.key;
282
+ this._activePart.set(nextPart.key);
331
283
  this._highlightActivePart();
332
284
  }
333
285
  };
334
286
  const goPrev = () => {
335
287
  this._clearInputBuffer();
336
288
  if (prevPart) {
337
- this.activePart = prevPart.key;
289
+ this._activePart.set(prevPart.key);
338
290
  this._highlightActivePart();
339
291
  }
340
292
  };
@@ -352,10 +304,10 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
352
304
  else {
353
305
  ignore();
354
306
  const sign = e.code === 'ArrowUp' ? +1 : -1;
355
- this.activePart = part.key;
356
- let newVal = this.editingDateObj.add(part.key, sign);
357
- this._editingParts[part.key].typedValue = newVal.format(this._editingParts[part.key].placeholder);
358
- this._editingDateObj = newVal;
307
+ this._activePart.set(part.key);
308
+ const newVal = this._editingDate().add(part.key, sign);
309
+ this._editingParts[part.key].typedValue = this.formatService.format(newVal, 'datetime', this._editingParts[part.key].placeholder);
310
+ this._editingDate.set(newVal);
359
311
  this._detectValueChanges();
360
312
  }
361
313
  }
@@ -397,7 +349,10 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
397
349
  switch (part.key) {
398
350
  case 'year': {
399
351
  if (editing.placeholder.length == 2 && this._inputChars.length == 0) {
400
- this._inputChars.push(...this.calendarService.now(this.type).format('yyyy').substring(0, 2).split(''));
352
+ this._inputChars.push(...this.formatService
353
+ .format(this.calendarService.now(this._calendarSystem()), 'datetime', 'yyyy')
354
+ .substring(0, 2)
355
+ .split(''));
401
356
  }
402
357
  if (this._inputChars.length < 4) {
403
358
  editing.typedValue = `${this._inputChars.join('')}${e.key}`;
@@ -412,8 +367,8 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
412
367
  editing.typedValue = ('0000' + editing.typedValue).slice(-4);
413
368
  const nv = parseInt(editing.typedValue);
414
369
  //if (nv > 0) {
415
- const newVal = this.editingDateObj.set('year', nv);
416
- this._editingDateObj = newVal;
370
+ const newVal = this._editingDate().set('year', nv);
371
+ this._editingDate.set(newVal);
417
372
  this._detectValueChanges();
418
373
  //}
419
374
  break;
@@ -441,8 +396,8 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
441
396
  editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;
442
397
  const nv = parseInt(editing.typedValue);
443
398
  if (nv > 0) {
444
- const newVal = this.editingDateObj.set(part.key, nv);
445
- this._editingDateObj = newVal;
399
+ const newVal = this._editingDate().set(part.key, nv);
400
+ this._editingDate.set(newVal);
446
401
  this._detectValueChanges();
447
402
  }
448
403
  break;
@@ -458,7 +413,7 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
458
413
  }
459
414
  else if (this._inputChars.length == 1) {
460
415
  const newStr = parseInt(`${this._inputChars[0]}${e.key}`);
461
- if (newStr > this._editingDateObj.month.totalDays) {
416
+ if (newStr > this._editingDate().month.totalDays) {
462
417
  editing.typedValue = `0${e.key}`;
463
418
  }
464
419
  else {
@@ -470,8 +425,8 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
470
425
  editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;
471
426
  const nv = parseInt(editing.typedValue);
472
427
  if (nv > 0) {
473
- const newVal = this.editingDateObj.set(part.key, nv);
474
- this._editingDateObj = newVal;
428
+ const newVal = this._editingDate().set(part.key, nv);
429
+ this._editingDate.set(newVal);
475
430
  this._detectValueChanges();
476
431
  }
477
432
  break;
@@ -495,8 +450,8 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
495
450
  next = true;
496
451
  }
497
452
  editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;
498
- const newVal = this.editingDateObj.set('hour', parseInt(editing.typedValue));
499
- this._editingDateObj = newVal;
453
+ const newVal = this._editingDate().set('hour', parseInt(editing.typedValue));
454
+ this._editingDate.set(newVal);
500
455
  this._detectValueChanges();
501
456
  break;
502
457
  }
@@ -522,8 +477,9 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
522
477
  next = true;
523
478
  }
524
479
  editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;
525
- const newVal = this.editingDateObj.set(part.key, parseInt(editing.typedValue));
526
- this._editingDateObj = newVal;
480
+ // eslint-disable-next-line no-case-declarations
481
+ const newVal = this._editingDate().set(part.key, parseInt(editing.typedValue));
482
+ this._editingDate.set(newVal);
527
483
  this._detectValueChanges();
528
484
  break;
529
485
  default:
@@ -540,7 +496,7 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
540
496
  * @ignore
541
497
  */
542
498
  _handleKeyUpEvent(e) {
543
- if (this.activePart) {
499
+ if (this._activePart()) {
544
500
  this._highlightActivePart();
545
501
  }
546
502
  }
@@ -576,26 +532,26 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
576
532
  * @ignore
577
533
  */
578
534
  _detectPartAtPosition() {
579
- const input = this.input.nativeElement;
580
- if (!input.value)
535
+ const input = this.input();
536
+ if (!input || !input.value)
581
537
  return;
582
538
  const sStart = input.selectionEnd || 0;
583
539
  const re = /[a-zA-Z0-9]+/gi;
584
540
  const valueParts = Array.from(input.value.matchAll(re));
585
541
  const orderedParts = this._getOrderedParts();
586
542
  const index = valueParts.findIndex((c) => c.index <= sStart && c.index + c[0].length >= sStart);
587
- this.activePart = orderedParts[index].key;
543
+ this._activePart.set(orderedParts[index].key);
588
544
  this._highlightActivePart();
589
545
  }
590
546
  /**
591
547
  * @ignore
592
548
  */
593
549
  _highlightActivePart() {
594
- const input = this.input?.nativeElement;
595
- if (!input || !input.value || !this.activePart)
550
+ const input = this.input();
551
+ if (!input || !input.value || !this._activePart())
596
552
  return;
597
553
  const orderedParts = this._getOrderedParts();
598
- const index = orderedParts.findIndex((c) => c.key == this.activePart);
554
+ const index = orderedParts.findIndex((c) => c.key == this._activePart());
599
555
  const re = /[a-zA-Z0-9]+/gi;
600
556
  const valueParts = Array.from(input.value.matchAll(re));
601
557
  const { start, end } = AXStringUtil.getWordBoundsAtPosition(input.value, valueParts[index]?.index);
@@ -607,10 +563,10 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
607
563
  * @ignore
608
564
  */
609
565
  _detectValueChanges() {
610
- this.commitValue(this._editingDateObj.date, true);
566
+ this.commitValue(this._editingDate().date, true);
611
567
  }
612
568
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXDateTimeInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
613
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.5", type: AXDateTimeInputComponent, isStandalone: true, selector: "ax-datetime-input", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, allowTyping: { classPropertyName: "allowTyping", publicName: "allowTyping", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: false, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: false, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", onClick: "onClick", readonlyChange: "readonlyChange", disabledChange: "disabledChange", formatChange: "formatChange" }, host: { listeners: { "keydown": "_handleOnKeydownEvent($event)", "keyup": "_handleKeyUpEvent($event)" } }, providers: [
569
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.5", type: AXDateTimeInputComponent, isStandalone: true, selector: "ax-datetime-input", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, allowTyping: { classPropertyName: "allowTyping", publicName: "allowTyping", isSignal: true, isRequired: false, transformFunction: null }, calendar: { classPropertyName: "calendar", publicName: "calendar", isSignal: true, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, picker: { classPropertyName: "picker", publicName: "picker", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", readonlyChange: "readonlyChange", disabledChange: "disabledChange", onClick: "onClick" }, host: { listeners: { "keydown": "_handleOnKeydownEvent($event)", "keyup": "_handleKeyUpEvent($event)" } }, providers: [
614
570
  { provide: AXComponent, useExisting: AXDateTimeInputComponent },
615
571
  { provide: AXFocusableComponent, useExisting: AXDateTimeInputComponent },
616
572
  { provide: AXValuableComponent, useExisting: AXDateTimeInputComponent },
@@ -620,20 +576,11 @@ class AXDateTimeInputComponent extends MXInputBaseValueComponent {
620
576
  useExisting: forwardRef(() => AXDateTimeInputComponent),
621
577
  multi: true,
622
578
  },
623
- ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<input\n #input\n id=\"input\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"ax-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-select-none]=\"!allowTyping()\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"true\"\n [ngModel]=\"_editingText\"\n (mouseup)=\"_handleOnInputClickEvent($event)\"\n (blur)=\"_handleBlurEvent($event)\"\n (focus)=\"_handleFocusEvent($event)\"\n style=\"display: flex\"\n [style.justify-items]=\"isRtl() ? 'end' : 'start'\"\n/>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-select-none,.ax-select-none *{-webkit-user-select:none!important;user-select:none!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
579
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<input\n #input\n id=\"input\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"ax-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-select-none]=\"!allowTyping()\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"true\"\n [ngModel]=\"_editingText()\"\n (mouseup)=\"_handleOnInputClickEvent($event)\"\n (blur)=\"_handleBlurEvent($event)\"\n (focus)=\"_handleFocusEvent($event)\"\n style=\"display: flex\"\n [style.justify-items]=\"isRtl() ? 'end' : 'start'\"\n/>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-select-none,.ax-select-none *{-webkit-user-select:none!important;user-select:none!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
624
580
  }
625
581
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXDateTimeInputComponent, decorators: [{
626
582
  type: Component,
627
- args: [{ selector: 'ax-datetime-input', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id'], outputs: [
628
- 'valueChange',
629
- 'stateChange',
630
- 'onValueChanged',
631
- 'onBlur',
632
- 'onFocus',
633
- 'onClick',
634
- 'readonlyChange',
635
- 'disabledChange',
636
- ], providers: [
583
+ args: [{ selector: 'ax-datetime-input', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id'], outputs: ['valueChange', 'stateChange', 'onValueChanged', 'onBlur', 'onFocus', 'readonlyChange', 'disabledChange'], providers: [
637
584
  { provide: AXComponent, useExisting: AXDateTimeInputComponent },
638
585
  { provide: AXFocusableComponent, useExisting: AXDateTimeInputComponent },
639
586
  { provide: AXValuableComponent, useExisting: AXDateTimeInputComponent },
@@ -643,23 +590,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
643
590
  useExisting: forwardRef(() => AXDateTimeInputComponent),
644
591
  multi: true,
645
592
  },
646
- ], imports: [FormsModule], template: "<input\n #input\n id=\"input\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"ax-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-select-none]=\"!allowTyping()\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"true\"\n [ngModel]=\"_editingText\"\n (mouseup)=\"_handleOnInputClickEvent($event)\"\n (blur)=\"_handleBlurEvent($event)\"\n (focus)=\"_handleFocusEvent($event)\"\n style=\"display: flex\"\n [style.justify-items]=\"isRtl() ? 'end' : 'start'\"\n/>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-select-none,.ax-select-none *{-webkit-user-select:none!important;user-select:none!important}\n"] }]
647
- }], propDecorators: { type: [{
648
- type: Input
649
- }], input: [{
650
- type: ViewChild,
651
- args: ['input']
652
- }], minValue: [{
653
- type: Input
654
- }], maxValue: [{
655
- type: Input
656
- }], formatChange: [{
657
- type: Output
658
- }], onClick: [{
659
- type: Output
660
- }], format: [{
661
- type: Input
662
- }], _handleOnKeydownEvent: [{
593
+ ], imports: [FormsModule], template: "<input\n #input\n id=\"input\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"ax-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-select-none]=\"!allowTyping()\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"true\"\n [ngModel]=\"_editingText()\"\n (mouseup)=\"_handleOnInputClickEvent($event)\"\n (blur)=\"_handleBlurEvent($event)\"\n (focus)=\"_handleFocusEvent($event)\"\n style=\"display: flex\"\n [style.justify-items]=\"isRtl() ? 'end' : 'start'\"\n/>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-select-none,.ax-select-none *{-webkit-user-select:none!important;user-select:none!important}\n"] }]
594
+ }], propDecorators: { _handleOnKeydownEvent: [{
663
595
  type: HostListener,
664
596
  args: ['keydown', ['$event']]
665
597
  }], _handleKeyUpEvent: [{