@acorex/components 20.1.18 → 20.1.20

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 (95) hide show
  1. package/autocomplete/index.d.ts +1 -0
  2. package/color-box/index.d.ts +1 -0
  3. package/conversation/index.d.ts +1 -0
  4. package/cron-job/index.d.ts +1 -0
  5. package/datetime-box/index.d.ts +2 -0
  6. package/datetime-input/index.d.ts +1 -0
  7. package/fesm2022/acorex-components-autocomplete.mjs +9 -3
  8. package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
  9. package/fesm2022/acorex-components-calendar.mjs +66 -21
  10. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  11. package/fesm2022/acorex-components-color-box.mjs +8 -2
  12. package/fesm2022/acorex-components-color-box.mjs.map +1 -1
  13. package/fesm2022/acorex-components-color-palette.mjs +1 -1
  14. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  15. package/fesm2022/acorex-components-conversation.mjs +10 -4
  16. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  17. package/fesm2022/acorex-components-cron-job.mjs +15 -9
  18. package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
  19. package/fesm2022/acorex-components-data-table.mjs +2 -2
  20. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  21. package/fesm2022/acorex-components-datetime-box.mjs +23 -4
  22. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  23. package/fesm2022/acorex-components-datetime-input.mjs +8 -2
  24. package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
  25. package/fesm2022/acorex-components-datetime-picker.mjs +12 -6
  26. package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
  27. package/fesm2022/acorex-components-image-editor.mjs +12 -6
  28. package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
  29. package/fesm2022/acorex-components-kanban.mjs +2 -2
  30. package/fesm2022/acorex-components-kanban.mjs.map +1 -1
  31. package/fesm2022/acorex-components-list.mjs +24 -10
  32. package/fesm2022/acorex-components-list.mjs.map +1 -1
  33. package/fesm2022/acorex-components-map.mjs +64 -16
  34. package/fesm2022/acorex-components-map.mjs.map +1 -1
  35. package/fesm2022/acorex-components-number-box-2.mjs +11 -5
  36. package/fesm2022/acorex-components-number-box-2.mjs.map +1 -1
  37. package/fesm2022/acorex-components-number-box.mjs +10 -4
  38. package/fesm2022/acorex-components-number-box.mjs.map +1 -1
  39. package/fesm2022/acorex-components-paint.mjs +8 -2
  40. package/fesm2022/acorex-components-paint.mjs.map +1 -1
  41. package/fesm2022/acorex-components-password-box.mjs +10 -4
  42. package/fesm2022/acorex-components-password-box.mjs.map +1 -1
  43. package/fesm2022/acorex-components-phone-box.mjs +9 -3
  44. package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
  45. package/fesm2022/acorex-components-popover.mjs +30 -1
  46. package/fesm2022/acorex-components-popover.mjs.map +1 -1
  47. package/fesm2022/acorex-components-popup.mjs +2 -2
  48. package/fesm2022/acorex-components-popup.mjs.map +1 -1
  49. package/fesm2022/acorex-components-query-builder.mjs +1 -1
  50. package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
  51. package/fesm2022/acorex-components-rest-api-generator.mjs +1 -1
  52. package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
  53. package/fesm2022/acorex-components-rrule.mjs +1 -1
  54. package/fesm2022/acorex-components-rrule.mjs.map +1 -1
  55. package/fesm2022/acorex-components-scheduler.mjs +16 -16
  56. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  57. package/fesm2022/acorex-components-search-box.mjs +7 -1
  58. package/fesm2022/acorex-components-search-box.mjs.map +1 -1
  59. package/fesm2022/acorex-components-select-box.mjs +16 -4
  60. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  61. package/fesm2022/acorex-components-tabs.mjs +7 -5
  62. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  63. package/fesm2022/acorex-components-tag-box.mjs +11 -5
  64. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  65. package/fesm2022/acorex-components-text-area.mjs +10 -4
  66. package/fesm2022/acorex-components-text-area.mjs.map +1 -1
  67. package/fesm2022/acorex-components-text-box.mjs +10 -4
  68. package/fesm2022/acorex-components-text-box.mjs.map +1 -1
  69. package/fesm2022/acorex-components-time-duration.mjs +35 -59
  70. package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
  71. package/fesm2022/acorex-components-tooltip.mjs +3 -3
  72. package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
  73. package/fesm2022/acorex-components-tree-view.mjs +1 -1
  74. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  75. package/fesm2022/acorex-components-wysiwyg.mjs +10 -4
  76. package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
  77. package/image-editor/index.d.ts +1 -0
  78. package/list/index.d.ts +15 -2
  79. package/map/index.d.ts +27 -6
  80. package/number-box/index.d.ts +1 -0
  81. package/number-box-2/index.d.ts +1 -0
  82. package/package.json +9 -6
  83. package/paint/index.d.ts +1 -0
  84. package/password-box/index.d.ts +1 -0
  85. package/phone-box/index.d.ts +1 -0
  86. package/popover/index.d.ts +10 -2
  87. package/scheduler/index.d.ts +1 -1
  88. package/search-box/index.d.ts +1 -0
  89. package/select-box/index.d.ts +13 -1
  90. package/tag-box/index.d.ts +1 -0
  91. package/text-area/index.d.ts +1 -0
  92. package/text-box/index.d.ts +1 -0
  93. package/time-duration/index.d.ts +3 -1
  94. package/tooltip/index.d.ts +2 -2
  95. package/wysiwyg/index.d.ts +1 -0
@@ -92,25 +92,49 @@ class MXCalendarBaseComponent extends MXBaseComponent {
92
92
  return this._minValue;
93
93
  }
94
94
  set minValue(v) {
95
- this.setOption({
96
- name: 'minValue',
97
- value: v,
98
- afterCallback: () => {
99
- this.render();
100
- },
101
- });
95
+ if (this.calendarService.isValidDate(v)) {
96
+ const value = this.calendarService.create(v).date;
97
+ this.setOption({
98
+ name: 'minValue',
99
+ value,
100
+ afterCallback: () => {
101
+ this.render();
102
+ },
103
+ });
104
+ }
105
+ else {
106
+ this.setOption({
107
+ name: 'minValue',
108
+ value: undefined,
109
+ afterCallback: () => {
110
+ this.render();
111
+ },
112
+ });
113
+ }
102
114
  }
103
115
  get maxValue() {
104
116
  return this._maxValue;
105
117
  }
106
118
  set maxValue(v) {
107
- this.setOption({
108
- name: 'maxValue',
109
- value: v,
110
- afterCallback: () => {
111
- this.render();
112
- },
113
- });
119
+ if (this.calendarService.isValidDate(v)) {
120
+ const value = this.calendarService.create(v).date;
121
+ this.setOption({
122
+ name: 'maxValue',
123
+ value,
124
+ afterCallback: () => {
125
+ this.render();
126
+ },
127
+ });
128
+ }
129
+ else {
130
+ this.setOption({
131
+ name: 'maxValue',
132
+ value: undefined,
133
+ afterCallback: () => {
134
+ this.render();
135
+ },
136
+ });
137
+ }
114
138
  }
115
139
  get disabledDates() {
116
140
  return this._disabledDates;
@@ -258,6 +282,12 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
258
282
  this.typeChange.pipe(unsubscriber.takeUntilDestroy).subscribe((value) => {
259
283
  this.calendar.set(value);
260
284
  });
285
+ this.minValueChange.subscribe((e) => {
286
+ if (this._viewStartDate.isBefore(e)) {
287
+ this._viewStartDate = this.calendarService.create(e, this.calendar());
288
+ this.render();
289
+ }
290
+ });
261
291
  }
262
292
  /**
263
293
  * @ignore
@@ -271,7 +301,13 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
271
301
  */
272
302
  ngAfterViewInit() {
273
303
  if (!this.value) {
274
- this.goToday();
304
+ if (this.minValue && this._viewStartDate.isBefore(this.minValue)) {
305
+ this._viewStartDate = this.calendarService.create(this.minValue, this.calendar());
306
+ this.render();
307
+ }
308
+ else {
309
+ this.goToday();
310
+ }
275
311
  }
276
312
  }
277
313
  /**
@@ -549,14 +585,20 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
549
585
  * @ignore
550
586
  */
551
587
  internalSetValue(value) {
552
- if (!value)
588
+ if (!value || !this.calendarService.isValidDate(value)) {
553
589
  return null;
554
- const v = this.calendarService.convert(value);
555
- const isDisabled = this.isDisabled(v);
556
- if (isDisabled)
590
+ }
591
+ const v = this.calendarService.convert(value, this.calendar());
592
+ if (this.isDisabled(v)) {
557
593
  return null;
558
- else
559
- return v.date;
594
+ }
595
+ if (this.minValue && this.calendarService.isValidDate(this.minValue) && v.isBefore(this.minValue)) {
596
+ return this.minValue;
597
+ }
598
+ if (this.maxValue && this.calendarService.isValidDate(this.maxValue) && v.isAfter(this.maxValue)) {
599
+ return this.maxValue;
600
+ }
601
+ return v.date;
560
602
  }
561
603
  /**
562
604
  * @ignore
@@ -567,6 +609,9 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
567
609
  val.compare(this.displayRange.startTime, this.activeView) == -1 ||
568
610
  val.compare(this.displayRange.endTime, this.activeView) == 1) {
569
611
  this._viewStartDate = this.calendarService.create(value, this.calendar());
612
+ if (this.minValue && this._viewStartDate.isBefore(this.minValue)) {
613
+ this._viewStartDate = this.calendarService.create(this.minValue, this.calendar());
614
+ }
570
615
  }
571
616
  this._footPrint.year = val.year;
572
617
  this._footPrint.month = val.monthOfYear;