@wavemaker/app-ng-runtime 11.4.0-next.28152 → 11.4.0-rc.5339
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.
- app-ng-runtime/build-task/basic/tree/tree.build.d.ts +1 -2
- app-ng-runtime/build-task/bundles/index.umd.js +8 -10
- app-ng-runtime/build-task/bundles/index.umd.js.map +1 -1
- app-ng-runtime/build-task/esm2015/basic/tree/tree.build.js +3 -4
- app-ng-runtime/build-task/esm2015/data/form/form-field/form-field.build.js +2 -2
- app-ng-runtime/build-task/esm2015/navigation/popover/popover.build.js +3 -3
- app-ng-runtime/build-task/fesm2015/index.js +8 -10
- app-ng-runtime/build-task/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/base/bundles/index.umd.js +29 -4
- app-ng-runtime/components/base/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/base/esm2015/public_api.js +2 -2
- app-ng-runtime/components/base/esm2015/utils/widget-utils.js +22 -4
- app-ng-runtime/components/base/esm2015/widgets/common/base/base-field-validations.js +3 -2
- app-ng-runtime/components/base/esm2015/widgets/common/dialog/dialog.service.js +7 -1
- app-ng-runtime/components/base/fesm2015/index.js +30 -6
- app-ng-runtime/components/base/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/base/index.metadata.json +1 -1
- app-ng-runtime/components/base/public_api.d.ts +1 -1
- app-ng-runtime/components/base/utils/widget-utils.d.ts +8 -1
- app-ng-runtime/components/basic/tree/bundles/index.umd.js +280 -256
- app-ng-runtime/components/basic/tree/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/basic/tree/esm2015/public_api.js +2 -2
- app-ng-runtime/components/basic/tree/esm2015/tree.component.js +322 -0
- app-ng-runtime/components/basic/tree/esm2015/tree.module.js +3 -3
- app-ng-runtime/components/basic/tree/fesm2015/index.js +260 -248
- app-ng-runtime/components/basic/tree/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/basic/tree/index.metadata.json +1 -1
- app-ng-runtime/components/basic/tree/public_api.d.ts +1 -1
- app-ng-runtime/components/basic/tree/tree.component.d.ts +34 -0
- app-ng-runtime/components/containers/tabs/bundles/index.umd.js +39 -23
- app-ng-runtime/components/containers/tabs/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/containers/tabs/esm2015/tab-pane/tab-pane.component.js +8 -1
- app-ng-runtime/components/containers/tabs/esm2015/tabs.animator.js +33 -13
- app-ng-runtime/components/containers/tabs/fesm2015/index.js +40 -13
- app-ng-runtime/components/containers/tabs/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/containers/tabs/tabs.animator.d.ts +5 -1
- app-ng-runtime/components/data/form/bundles/index.umd.js +37 -13
- app-ng-runtime/components/data/form/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/form/esm2015/form-field/form-field.directive.js +26 -7
- app-ng-runtime/components/data/form/esm2015/form.component.js +10 -5
- app-ng-runtime/components/data/form/fesm2015/index.js +34 -10
- app-ng-runtime/components/data/form/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/form/index.metadata.json +1 -1
- app-ng-runtime/components/data/list/bundles/index.umd.js +52 -43
- app-ng-runtime/components/data/list/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/list/esm2015/list.component.js +52 -43
- app-ng-runtime/components/data/list/fesm2015/index.js +51 -42
- app-ng-runtime/components/data/list/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/list/index.metadata.json +1 -1
- app-ng-runtime/components/data/list/list.component.d.ts +1 -1
- app-ng-runtime/components/data/pagination/bundles/index.umd.js +22 -5
- app-ng-runtime/components/data/pagination/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/pagination/esm2015/pagination.component.js +23 -6
- app-ng-runtime/components/data/pagination/fesm2015/index.js +22 -5
- app-ng-runtime/components/data/pagination/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/pagination/index.metadata.json +1 -1
- app-ng-runtime/components/data/pagination/pagination.component.d.ts +1 -0
- app-ng-runtime/components/data/table/bundles/index.umd.js +64 -12
- app-ng-runtime/components/data/table/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/table/esm2015/table.component.js +63 -13
- app-ng-runtime/components/data/table/esm2015/table.props.js +3 -1
- app-ng-runtime/components/data/table/fesm2015/index.js +64 -12
- app-ng-runtime/components/data/table/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/table/index.metadata.json +1 -1
- app-ng-runtime/components/data/table/table.component.d.ts +9 -0
- app-ng-runtime/components/dialogs/default/base-dialog.d.ts +1 -0
- app-ng-runtime/components/dialogs/default/bundles/index.umd.js +17 -3
- app-ng-runtime/components/dialogs/default/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/dialogs/default/esm2015/base-dialog.js +18 -5
- app-ng-runtime/components/dialogs/default/fesm2015/index.js +17 -4
- app-ng-runtime/components/dialogs/default/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/dialogs/default/index.metadata.json +1 -1
- app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +1 -0
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +78 -35
- app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/input/epoch/date-time/date-time-picker.component.d.ts +1 -0
- app-ng-runtime/components/input/epoch/esm2015/base-date-time.component.js +55 -31
- app-ng-runtime/components/input/epoch/esm2015/date/date.component.js +3 -3
- app-ng-runtime/components/input/epoch/esm2015/date-time/date-time-picker.component.js +31 -11
- app-ng-runtime/components/input/epoch/esm2015/date-time/date-time.component.js +2 -2
- app-ng-runtime/components/input/epoch/fesm2015/index.js +87 -43
- app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/input/epoch/index.metadata.json +1 -1
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js +25 -19
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/navigation/menu/esm2015/menu-dropdown-item/menu-dropdown-item.component.js +15 -5
- app-ng-runtime/components/navigation/menu/esm2015/menu.component.js +14 -19
- app-ng-runtime/components/navigation/menu/fesm2015/index.js +25 -20
- app-ng-runtime/components/navigation/menu/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/navigation/menu/index.metadata.json +1 -1
- app-ng-runtime/components/navigation/menu/menu-dropdown-item/menu-dropdown-item.component.d.ts +7 -4
- app-ng-runtime/components/navigation/menu/menu.component.d.ts +3 -7
- app-ng-runtime/components/navigation/popover/bundles/index.umd.js +3 -1
- app-ng-runtime/components/navigation/popover/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/navigation/popover/esm2015/popover.component.js +5 -3
- app-ng-runtime/components/navigation/popover/fesm2015/index.js +4 -2
- app-ng-runtime/components/navigation/popover/fesm2015/index.js.map +1 -1
- app-ng-runtime/core/bundles/index.umd.js +7 -1
- app-ng-runtime/core/bundles/index.umd.js.map +1 -1
- app-ng-runtime/core/esm2015/services/pagination.service.js +8 -2
- app-ng-runtime/core/fesm2015/index.js +7 -1
- app-ng-runtime/core/fesm2015/index.js.map +1 -1
- app-ng-runtime/mobile/components/page/default/bundles/index.umd.js +24 -6
- app-ng-runtime/mobile/components/page/default/bundles/index.umd.js.map +1 -1
- app-ng-runtime/mobile/components/page/default/esm2015/page.directive.js +20 -3
- app-ng-runtime/mobile/components/page/default/fesm2015/index.js +19 -2
- app-ng-runtime/mobile/components/page/default/fesm2015/index.js.map +1 -1
- app-ng-runtime/mobile/components/page/default/index.metadata.json +1 -1
- app-ng-runtime/mobile/components/page/default/page.directive.d.ts +4 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/scripts/datatable/datatable.js +86 -36
- app-ng-runtime/scripts/tree-keyboard-navigation/keyboard-navigation.js +251 -0
- app-ng-runtime/variables/bundles/index.umd.js +14 -4
- app-ng-runtime/variables/bundles/index.umd.js.map +1 -1
- app-ng-runtime/variables/esm2015/manager/action/notification-action.manager.js +5 -6
- app-ng-runtime/variables/esm2015/service/variables.service.js +8 -1
- app-ng-runtime/variables/fesm2015/index.js +11 -5
- app-ng-runtime/variables/fesm2015/index.js.map +1 -1
- app-ng-runtime/variables/index.metadata.json +1 -1
- app-ng-runtime/variables/service/variables.service.d.ts +4 -0
- app-ng-runtime/components/basic/tree/esm2015/tree.directive.js +0 -310
- app-ng-runtime/components/basic/tree/tree.directive.d.ts +0 -35
|
@@ -45,22 +45,32 @@ class DateTimePickerComponent {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
validateSelectedDate() {
|
|
48
|
-
var _a, _b, _c, _d, _e
|
|
48
|
+
var _a, _b, _c, _d, _e;
|
|
49
49
|
if (!this.changedValue) {
|
|
50
50
|
return true;
|
|
51
51
|
}
|
|
52
52
|
const cd = moment(this.changedValue);
|
|
53
|
-
|
|
53
|
+
const minDate = (_a = this._bsDatepickerConfig) === null || _a === void 0 ? void 0 : _a.minDate;
|
|
54
|
+
const maxDate = (_b = this._bsDatepickerConfig) === null || _b === void 0 ? void 0 : _b.maxDate;
|
|
55
|
+
if (minDate
|
|
56
|
+
&& ((this.mode === 'DATE'
|
|
57
|
+
&& moment(minDate).startOf('day').toDate() > this.changedValue)
|
|
58
|
+
|| (this.mode !== 'DATE'
|
|
59
|
+
&& minDate > this.changedValue))) {
|
|
54
60
|
return false;
|
|
55
61
|
}
|
|
56
|
-
if (
|
|
62
|
+
if (maxDate
|
|
63
|
+
&& ((this.mode === 'DATE'
|
|
64
|
+
&& moment(maxDate).endOf('day').toDate() < this.changedValue)
|
|
65
|
+
|| (this.mode !== 'DATE'
|
|
66
|
+
&& maxDate < this.changedValue))) {
|
|
57
67
|
return false;
|
|
58
68
|
}
|
|
59
|
-
if (((
|
|
69
|
+
if (((_d = (_c = this._bsDatepickerConfig) === null || _c === void 0 ? void 0 : _c.daysDisabled) === null || _d === void 0 ? void 0 : _d.indexOf(cd.day())) >= 0) {
|
|
60
70
|
return false;
|
|
61
71
|
}
|
|
62
72
|
const cdSt = cd.startOf('day').toDate().getTime();
|
|
63
|
-
if ((
|
|
73
|
+
if ((_e = this.excludedDatesToDisable) === null || _e === void 0 ? void 0 : _e.find(d => d.getTime() === cdSt)) {
|
|
64
74
|
return false;
|
|
65
75
|
}
|
|
66
76
|
return true;
|
|
@@ -113,6 +123,11 @@ class DateTimePickerComponent {
|
|
|
113
123
|
newVal.setMilliseconds(oldVal.getMilliseconds());
|
|
114
124
|
}
|
|
115
125
|
this.changedValue = newVal;
|
|
126
|
+
if (this.mode === 'DATE'
|
|
127
|
+
&& oldVal !== newVal
|
|
128
|
+
&& this.validateSelectedDate()) {
|
|
129
|
+
this.onOkClick();
|
|
130
|
+
}
|
|
116
131
|
}
|
|
117
132
|
onTimeUpdate(newVal) {
|
|
118
133
|
this.changedValue = newVal;
|
|
@@ -131,6 +146,10 @@ class DateTimePickerComponent {
|
|
|
131
146
|
this.triggerChange();
|
|
132
147
|
this.hideModal();
|
|
133
148
|
}
|
|
149
|
+
setToday() {
|
|
150
|
+
const today = moment().startOf('day').toDate();
|
|
151
|
+
this.onDateUpdate(today);
|
|
152
|
+
}
|
|
134
153
|
reset() {
|
|
135
154
|
this.changedValue = this._value;
|
|
136
155
|
}
|
|
@@ -191,15 +210,16 @@ DateTimePickerComponent.decorators = [
|
|
|
191
210
|
</div>
|
|
192
211
|
<div class="modal-footer">
|
|
193
212
|
<button
|
|
194
|
-
|
|
195
|
-
|
|
213
|
+
*ngIf="mode === 'DATE_TIME' || mode === 'DATE'"
|
|
214
|
+
class="btn btn-secondary today-btn"
|
|
215
|
+
(click)="setToday()">{{appLocale.MESSAGE_DATE_PICKER_TODAY || "Today" }}</button>
|
|
196
216
|
<button
|
|
197
217
|
class="btn btn-primary pull-right ok-btn"
|
|
218
|
+
*ngIf="mode === 'DATE_TIME' || mode === 'TIME'"
|
|
198
219
|
(click)="onOkClick()">{{appLocale.MESSAGE_DATE_PICKER_OK || "Ok" }}</button>
|
|
199
220
|
<button
|
|
200
|
-
class="btn btn-secondary pull-right
|
|
201
|
-
(click)="
|
|
202
|
-
|
|
221
|
+
class="btn btn-secondary pull-right clear-btn"
|
|
222
|
+
(click)="clear()">{{appLocale.MESSAGE_DATE_PICKER_CLEAR || "Clear" }}</button>
|
|
203
223
|
</div>
|
|
204
224
|
</div>
|
|
205
225
|
</ng-template>
|
|
@@ -360,7 +380,6 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
360
380
|
this.loadNativeDateInput = isMobile() && !this.showcustompicker;
|
|
361
381
|
}
|
|
362
382
|
get timeZone() { return this.inj.get(AbstractI18nService).getTimezone(this); }
|
|
363
|
-
;
|
|
364
383
|
/**
|
|
365
384
|
* returns true if the input value is default (i.e open date picker on input click)
|
|
366
385
|
* @param1 dropdownvalue, user selected value (by default datepicker opens on input click)
|
|
@@ -410,7 +429,7 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
410
429
|
};
|
|
411
430
|
}
|
|
412
431
|
/* WMS-18269 | Extending the existing validation for 'required' */
|
|
413
|
-
if (this[
|
|
432
|
+
if (this['show'] && this['required']) {
|
|
414
433
|
return !!c.value ? null : { required: true };
|
|
415
434
|
}
|
|
416
435
|
this.validateType = '';
|
|
@@ -536,6 +555,7 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
536
555
|
* @param isMouseEvent - boolean value represents the event is mouse event/ keyboard event
|
|
537
556
|
*/
|
|
538
557
|
setActiveDateFocus(newDate, isMouseEvent) {
|
|
558
|
+
this.setNextData(newDate);
|
|
539
559
|
const activeMonth = this.activeDate.getMonth();
|
|
540
560
|
// check for keyboard event
|
|
541
561
|
if (!isMouseEvent) {
|
|
@@ -550,14 +570,18 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
550
570
|
const newDay = newDate.getDate().toString();
|
|
551
571
|
_.filter($(`span:contains(${newDay})`).not('.is-other-month'), (obj) => {
|
|
552
572
|
if ($(obj).text() === newDay) {
|
|
573
|
+
if ($(obj).hasClass('selected')) {
|
|
574
|
+
$(obj).parent().attr('aria-selected', 'true');
|
|
575
|
+
}
|
|
553
576
|
$(obj).attr('aria-label', moment(newDate).format('dddd, MMMM Do YYYY'));
|
|
577
|
+
$('[bsdatepickerdaydecorator]').not('.is-other-month').attr('tabindex', '-1');
|
|
578
|
+
$(obj).attr('tabindex', '0');
|
|
554
579
|
$(obj).focus();
|
|
555
580
|
this.activeDate = newDate;
|
|
556
581
|
}
|
|
557
582
|
});
|
|
558
583
|
if (newDate.getMonth() === new Date().getMonth() && newDate.getFullYear() === new Date().getFullYear()) {
|
|
559
584
|
this.hightlightToday();
|
|
560
|
-
$(`span:contains(${new Date().getDate().toString()})`).not('.is-other-month').parent().attr('aria-selected', 'true');
|
|
561
585
|
}
|
|
562
586
|
});
|
|
563
587
|
}
|
|
@@ -585,7 +609,7 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
585
609
|
getMonth(date, inc) {
|
|
586
610
|
const currentMonth = new Date(date);
|
|
587
611
|
let month = currentMonth.getMonth();
|
|
588
|
-
|
|
612
|
+
const year = currentMonth.getFullYear();
|
|
589
613
|
month += inc;
|
|
590
614
|
const newDate = new Date(year, month);
|
|
591
615
|
const fullMonth = newDate.toLocaleString('en-US', { month: 'long' });
|
|
@@ -607,6 +631,9 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
607
631
|
if (event.originalEvent) {
|
|
608
632
|
this.setFocusForDate(-1);
|
|
609
633
|
}
|
|
634
|
+
setTimeout(() => {
|
|
635
|
+
$(`.bs-datepicker-head .previous`).focus();
|
|
636
|
+
});
|
|
610
637
|
});
|
|
611
638
|
datePickerHead.find(`.next`).click((event) => {
|
|
612
639
|
this.next = this.getMonth(this.activeDate, 2);
|
|
@@ -616,6 +643,9 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
616
643
|
if (event.originalEvent) {
|
|
617
644
|
this.setFocusForDate(1);
|
|
618
645
|
}
|
|
646
|
+
setTimeout(() => {
|
|
647
|
+
$(`.bs-datepicker-head .next`).focus();
|
|
648
|
+
});
|
|
619
649
|
});
|
|
620
650
|
datePickerHead.find(`.current`).click((event) => {
|
|
621
651
|
// check for original mouse click
|
|
@@ -630,8 +660,24 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
630
660
|
this.setFocusForMonthOrDay();
|
|
631
661
|
}
|
|
632
662
|
});
|
|
633
|
-
datePickerHead.find('.next').attr('aria-label', `Next Month ${this.next.fullMonth} ${this.next.date.getFullYear()}`);
|
|
634
|
-
datePickerHead.find('.previous').attr('aria-label', `Previous Month ${this.prev.fullMonth} ${this.prev.date.getFullYear()}`);
|
|
663
|
+
datePickerHead.find('.next').attr('aria-label', `Next Month, ${this.next.fullMonth} ${this.next.date.getFullYear()}`);
|
|
664
|
+
datePickerHead.find('.previous').attr('aria-label', `Previous Month, ${this.prev.fullMonth} ${this.prev.date.getFullYear()}`);
|
|
665
|
+
setTimeout(() => {
|
|
666
|
+
const currentNodes = datePickerHead.find('.current span');
|
|
667
|
+
const msg = 'Changed to month ';
|
|
668
|
+
// currentNodes.each((i) => {
|
|
669
|
+
// msg =`${msg} ${$(currentNodes[i]).text()}`;
|
|
670
|
+
// });
|
|
671
|
+
datePickerHead.find('.current').attr("aria-live", "assertive").attr("aria-atomic", "false");
|
|
672
|
+
if (this.clicked) {
|
|
673
|
+
if ($(currentNodes[0]).text()) {
|
|
674
|
+
datePickerHead.find('.ng-star-inserted').prepend(`<div class="sr-only">${msg}</div>`);
|
|
675
|
+
}
|
|
676
|
+
if ($(currentNodes[1]).text()) {
|
|
677
|
+
datePickerHead.find('.current').last().prepend(`<div class="sr-only"> and year </div>`);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
});
|
|
635
681
|
}
|
|
636
682
|
/**
|
|
637
683
|
* This method sets focus for months/days depending on the loaded datepicker table
|
|
@@ -713,16 +759,20 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
713
759
|
this.loadDays();
|
|
714
760
|
this.setActiveDateFocus(this.activeDate);
|
|
715
761
|
}
|
|
762
|
+
setNextData(nextDate) {
|
|
763
|
+
this.next = this.getMonth(nextDate, 1);
|
|
764
|
+
this.prev = this.getMonth(nextDate, -1);
|
|
765
|
+
}
|
|
716
766
|
/**
|
|
717
767
|
* This method is used to add tabindex, keybord and mouse events for days
|
|
718
768
|
*/
|
|
719
769
|
loadDays() {
|
|
720
770
|
setTimeout(() => {
|
|
721
771
|
$('[bsdatepickerdaydecorator]').not('.is-other-month').attr('tabindex', '0');
|
|
722
|
-
if (this.clicked === false) {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
}
|
|
772
|
+
// if (this.clicked === false) {
|
|
773
|
+
// this.next = this.getMonth(this.activeDate, 1);
|
|
774
|
+
// this.prev = this.getMonth(this.activeDate, -1);
|
|
775
|
+
// }
|
|
726
776
|
this.addKeyBoardEventsForDays();
|
|
727
777
|
this.addDatepickerMouseEvents();
|
|
728
778
|
});
|
|
@@ -791,8 +841,6 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
791
841
|
*/
|
|
792
842
|
loadMonths() {
|
|
793
843
|
setTimeout(() => {
|
|
794
|
-
const datePickerBody = $('.bs-datepicker-body');
|
|
795
|
-
datePickerBody.find('table.months span').attr('tabindex', '0');
|
|
796
844
|
this.addKeyBoardEventsForMonths();
|
|
797
845
|
this.addDatepickerMouseEvents();
|
|
798
846
|
});
|
|
@@ -845,8 +893,6 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
845
893
|
*/
|
|
846
894
|
loadYears() {
|
|
847
895
|
setTimeout(() => {
|
|
848
|
-
const datePickerBody = $('.bs-datepicker-body');
|
|
849
|
-
datePickerBody.find('table.years span').attr('tabindex', '0');
|
|
850
896
|
this.addKeyBoardEventsForYears();
|
|
851
897
|
this.addDatepickerMouseEvents();
|
|
852
898
|
});
|
|
@@ -855,6 +901,7 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
855
901
|
* This method is used to set focus for active month
|
|
856
902
|
*/
|
|
857
903
|
setActiveMonthFocus(newDate, isMoouseEvent) {
|
|
904
|
+
this.setNextData(newDate);
|
|
858
905
|
const newMonth = months[newDate.getMonth()];
|
|
859
906
|
// check for keyboard event
|
|
860
907
|
if (!isMoouseEvent) {
|
|
@@ -866,6 +913,8 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
866
913
|
}
|
|
867
914
|
}
|
|
868
915
|
setTimeout(() => {
|
|
916
|
+
$(`.bs-datepicker-body table.months span`).attr('tabindex', '-1');
|
|
917
|
+
$(`.bs-datepicker-body table.months span:contains(${newMonth})`).attr('tabindex', '0');
|
|
869
918
|
$(`.bs-datepicker-body table.months span:contains(${newMonth})`).focus();
|
|
870
919
|
this.activeDate = newDate;
|
|
871
920
|
});
|
|
@@ -924,6 +973,8 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
924
973
|
}
|
|
925
974
|
}
|
|
926
975
|
setTimeout(() => {
|
|
976
|
+
$(`.bs-datepicker-body table.years span`).attr('tabindex', '-1');
|
|
977
|
+
$(`.bs-datepicker-body table.years span:contains(${newYear})`).attr('tabindex', '0');
|
|
927
978
|
$(`.bs-datepicker-body table.years span:contains(${newYear})`).focus();
|
|
928
979
|
this.activeDate = newDate;
|
|
929
980
|
});
|
|
@@ -1104,37 +1155,27 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
1104
1155
|
}
|
|
1105
1156
|
onDateTimeInputBlur() {
|
|
1106
1157
|
// removing the opacity on blur of the mobile widget
|
|
1107
|
-
|
|
1158
|
+
const displayInputElem = this.getMobileInput();
|
|
1108
1159
|
if (displayInputElem && !hasCordova()) {
|
|
1109
|
-
|
|
1160
|
+
const children = this.nativeElement.children;
|
|
1110
1161
|
for (let i = 0; i < children.length; i++) {
|
|
1111
1162
|
children[i].classList.remove('add-opacity');
|
|
1112
1163
|
}
|
|
1113
1164
|
displayInputElem.classList.remove('remove-opacity');
|
|
1114
|
-
let allDateTimeElements = this.nativeElement.getElementsByTagName('*');
|
|
1115
|
-
for (let i = 0; i < allDateTimeElements.length; i++) {
|
|
1116
|
-
allDateTimeElements[i].setAttribute('tabindex', this.tabindex);
|
|
1117
|
-
}
|
|
1118
|
-
displayInputElem.removeAttribute('tabindex');
|
|
1119
1165
|
}
|
|
1120
1166
|
}
|
|
1121
1167
|
onDateTimeInputFocus(skipFocus = false) {
|
|
1122
1168
|
if (!this.loadNativeDateInput) {
|
|
1123
1169
|
return;
|
|
1124
1170
|
}
|
|
1125
|
-
|
|
1171
|
+
const displayInputElem = this.getMobileInput();
|
|
1126
1172
|
// toggling the classes to show and hide the native widget using opacity
|
|
1127
1173
|
if (skipFocus && !hasCordova()) {
|
|
1128
|
-
|
|
1174
|
+
const children = this.nativeElement.children;
|
|
1129
1175
|
for (let i = 0; i < children.length; i++) {
|
|
1130
1176
|
children[i].classList.add('add-opacity');
|
|
1131
1177
|
}
|
|
1132
1178
|
displayInputElem.classList.add('remove-opacity');
|
|
1133
|
-
let allDateTimeElements = this.nativeElement.getElementsByTagName('*');
|
|
1134
|
-
for (let i = 0; i < allDateTimeElements.length; i++) {
|
|
1135
|
-
allDateTimeElements[i].setAttribute('tabindex', '-1');
|
|
1136
|
-
}
|
|
1137
|
-
displayInputElem.setAttribute('tabindex', this.tabindex);
|
|
1138
1179
|
return;
|
|
1139
1180
|
}
|
|
1140
1181
|
if (displayInputElem && this._triggeredByUser) {
|
|
@@ -1224,9 +1265,12 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
1224
1265
|
this.containerTarget = getContainerTargetClass(this.nativeElement);
|
|
1225
1266
|
this.isReadOnly = this.dataentrymode != 'undefined' && !this.isDataEntryModeEnabledOnInput(this.dataentrymode);
|
|
1226
1267
|
// this mobileinput width varies in ios hence setting width here.
|
|
1227
|
-
|
|
1268
|
+
const mobileInput = this.getMobileInput();
|
|
1228
1269
|
if (mobileInput) {
|
|
1229
|
-
|
|
1270
|
+
setTimeout(() => {
|
|
1271
|
+
mobileInput.style.width = '100%';
|
|
1272
|
+
mobileInput.style.height = '100%';
|
|
1273
|
+
});
|
|
1230
1274
|
}
|
|
1231
1275
|
}
|
|
1232
1276
|
ngOnDestroy() {
|
|
@@ -1471,7 +1515,7 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1471
1515
|
if (this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
1472
1516
|
event.stopPropagation();
|
|
1473
1517
|
const action = this.keyEventPlugin.constructor.getEventFullKey(event);
|
|
1474
|
-
if (action === 'enter'
|
|
1518
|
+
if (action === 'enter') {
|
|
1475
1519
|
const newVal = getDateObj(event.target.value, { pattern: this.datepattern });
|
|
1476
1520
|
event.preventDefault();
|
|
1477
1521
|
const formattedDate = getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this);
|
|
@@ -1522,7 +1566,7 @@ DateComponent.initializeProps = registerProps$2();
|
|
|
1522
1566
|
DateComponent.decorators = [
|
|
1523
1567
|
{ type: Component, args: [{
|
|
1524
1568
|
selector: '[wmDate]',
|
|
1525
|
-
template: " <input class=\"form-control app-textbox app-dateinput display-input\"\n focus-target\n type=\"text\"\n [name]=\"name\"\n [tabindex]=\"tabindex\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event);\"\n (blur)=\"onInputBlur($event)\"\n [disabled]=\"disabled || readonly\"\n [autofocus]=\"autofocus\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"hint\"\n (change)=\"onDisplayDateChange($event)\"\n (keydown)=\"this._triggeredByUser = true; onDisplayKeydown($event);\">\n\n <span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"tabindex\"\n [disabled]=\"disabled || readonly\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n </span>\n <div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n [container]=\"containerTarget || 'body'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isOpen\"\n #datepicker=\"bsDatepicker\"\n bsDatepicker\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n placement=\"bottom right\"\n [isDisabled]=\"disabled || readonly\"\n [bsValue]=\"bsDataValue\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n (bsValueChange)=\"onDateChange($event)\">\n</div>\n\n<ng-template [ngIf]=\"loadNativeDateInput\">\n <wm-datetimepicker\n dateTimePicker\n mode=\"DATE\"\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDataValue\"\n (change)=\"onDateChange($event)\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n tabindex=\"
|
|
1569
|
+
template: " <input class=\"form-control app-textbox app-dateinput display-input\"\n focus-target\n type=\"text\"\n [name]=\"name\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event);\"\n (blur)=\"onInputBlur($event)\"\n [disabled]=\"disabled || readonly\"\n [autofocus]=\"autofocus\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"hint\"\n (change)=\"onDisplayDateChange($event)\"\n (keydown)=\"this._triggeredByUser = true; onDisplayKeydown($event);\">\n\n <span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [disabled]=\"disabled || readonly\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n </span>\n <div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n [tabindex]=\"-1\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [container]=\"containerTarget || 'body'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isOpen\"\n #datepicker=\"bsDatepicker\"\n bsDatepicker\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n placement=\"bottom right\"\n [isDisabled]=\"disabled || readonly\"\n [bsValue]=\"bsDataValue\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n (bsValueChange)=\"onDateChange($event)\">\n</div>\n\n<ng-template [ngIf]=\"loadNativeDateInput\">\n <wm-datetimepicker\n dateTimePicker\n mode=\"DATE\"\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDataValue\"\n (change)=\"onDateChange($event)\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n [tabindex]=\"tabindex || 0\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event);\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n [attr.aria-label]=\"displayValue ? 'Change Date' + displayValue : 'Choose Date'\"\n (click)=\"!(disabled || readonly || isCurrentDate) && showDatePickerModal()\">\n </div>\n</ng-template>\n",
|
|
1526
1570
|
providers: [
|
|
1527
1571
|
provideAs(DateComponent, NG_VALUE_ACCESSOR, true),
|
|
1528
1572
|
provideAs(DateComponent, NG_VALIDATORS, true),
|
|
@@ -1983,7 +2027,7 @@ DatetimeComponent.initializeProps = registerProps$1();
|
|
|
1983
2027
|
DatetimeComponent.decorators = [
|
|
1984
2028
|
{ type: Component, args: [{
|
|
1985
2029
|
selector: '[wmDateTime]',
|
|
1986
|
-
template: " <div dropdown\n [isOpen]=\"isTimeOpen\"\n autoClose=\"false\"\n [container]=\"'body'\"\n (onShown)=\"onTimepickerOpen()\"\n style=\"display: inherit;\">\n <input class=\"form-control app-textbox display-input\"\n [attr.aria-label]=\"hint\"\n focus-target\n [name]=\"name\"\n [tabindex]=\"tabindex\"\n type=\"text\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event);\"\n (blur)=\"onInputBlur($event)\"\n (change)=\"onDateChange($event)\"\n [autofocus]=\"autofocus\"\n [disabled]=\"disabled || readonly || isCurrentDate\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n (keydown)=\"this._triggeredByUser = true; onDisplayKeydown($event)\">\n\n <span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-date\"\n [tabindex]=\"tabindex\"\n [disabled]=\"disabled || readonly || isCurrentDate\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"tabindex\"\n [disabled]=\"disabled || readonly || isCurrentDate\"\n aria-label=\"Select time\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"toggleTimePicker(!isTimeOpen, $event)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-time\"></i>\n </button>\n </span>\n <div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n focus-target\n [container]=\"containerTarget || 'body'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isDateOpen\"\n placement=\"bottom right\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n #datepicker=bsDatepicker\n bsDatepicker\n [isDisabled]=\"disabled || readonly || isCurrentDate\"\n [bsValue]=\"bsDateValue\"\n (bsValueChange)=\"onModelUpdate($event, 'date')\">\n </div>\n <div *dropdownMenu\n class=\"dropdown-menu\"\n aria-label=\"timepicker dropdown\"\n aria-controls=\"time\"\n (click)=\"preventTpClose($event)\">\n <timepicker class=\"model-holder\"\n [showMeridian]=\"ismeridian\"\n [readonlyInput]=\"disabled || readonly || isCurrentDate\"\n [(ngModel)]=\"bsTimeValue\"\n [min]=\"minTime\"\n [max]=\"maxTime\"\n [hourStep]=\"hourstep\"\n [minuteStep]=\"minutestep\"\n [secondsStep]=\"secondsstep\"\n [mousewheel]=\"true\"\n [arrowkeys]=\"true\"\n (isValid)=\"isValid($event)\"\n [showSeconds]=\"showseconds\"\n (ngModelChange)=\"onModelUpdate($event, 'time')\"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]=\"loadNativeDateInput\">\n <wm-datetimepicker\n dateTimePicker\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDateValue\"\n (change)=\"onModelUpdate($event, 'date')\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n tabindex=\"
|
|
2030
|
+
template: " <div dropdown\n [isOpen]=\"isTimeOpen\"\n autoClose=\"false\"\n [container]=\"'body'\"\n (onShown)=\"onTimepickerOpen()\"\n style=\"display: inherit;\">\n <input class=\"form-control app-textbox display-input\"\n [attr.aria-label]=\"hint\"\n focus-target\n [name]=\"name\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n type=\"text\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event);\"\n (blur)=\"onInputBlur($event)\"\n (change)=\"onDateChange($event)\"\n [autofocus]=\"autofocus\"\n [disabled]=\"disabled || readonly || isCurrentDate\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n (keydown)=\"this._triggeredByUser = true; onDisplayKeydown($event)\">\n\n <span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-date\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [disabled]=\"disabled || readonly || isCurrentDate\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [disabled]=\"disabled || readonly || isCurrentDate\"\n aria-label=\"Select time\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"toggleTimePicker(!isTimeOpen, $event)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-time\"></i>\n </button>\n </span>\n <div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n focus-target\n [tabindex]=\"-1\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [container]=\"containerTarget || 'body'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isDateOpen\"\n placement=\"bottom right\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n #datepicker=bsDatepicker\n bsDatepicker\n [isDisabled]=\"disabled || readonly || isCurrentDate\"\n [bsValue]=\"bsDateValue\"\n (bsValueChange)=\"onModelUpdate($event, 'date')\">\n </div>\n <div *dropdownMenu\n class=\"dropdown-menu\"\n aria-label=\"timepicker dropdown\"\n aria-controls=\"time\"\n (click)=\"preventTpClose($event)\">\n <timepicker class=\"model-holder\"\n [showMeridian]=\"ismeridian\"\n [readonlyInput]=\"disabled || readonly || isCurrentDate\"\n [(ngModel)]=\"bsTimeValue\"\n [min]=\"minTime\"\n [max]=\"maxTime\"\n [hourStep]=\"hourstep\"\n [minuteStep]=\"minutestep\"\n [secondsStep]=\"secondsstep\"\n [mousewheel]=\"true\"\n [arrowkeys]=\"true\"\n (isValid)=\"isValid($event)\"\n [showSeconds]=\"showseconds\"\n (ngModelChange)=\"onModelUpdate($event, 'time')\"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]=\"loadNativeDateInput\">\n <wm-datetimepicker\n dateTimePicker\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDateValue\"\n (change)=\"onModelUpdate($event, 'date')\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n [tabindex]=\"tabindex || 0\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event)\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n (click)=\"!(disabled || readonly || isCurrentDate) && showDatePickerModal()\">\n </div>\n</ng-template>\n",
|
|
1987
2031
|
providers: [
|
|
1988
2032
|
provideAs(DatetimeComponent, NG_VALUE_ACCESSOR, true),
|
|
1989
2033
|
provideAs(DatetimeComponent, NG_VALIDATORS, true),
|