@wavemaker/app-ng-runtime 11.5.2-next.141118 → 11.5.2-next.141120
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/bundles/index.umd.js +11 -1
- app-ng-runtime/build-task/esm2022/basic/default/label/label.build.mjs +12 -2
- app-ng-runtime/build-task/fesm2022/index.mjs +11 -1
- app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/default/bundles/index.umd.js +2 -0
- app-ng-runtime/components/basic/default/esm2022/label/label.props.mjs +3 -1
- app-ng-runtime/components/basic/default/fesm2022/index.mjs +2 -0
- app-ng-runtime/components/basic/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/containers/tabs/bundles/index.umd.js +12 -12
- app-ng-runtime/components/containers/tabs/esm2022/tab-pane/tab-pane.component.mjs +5 -5
- app-ng-runtime/components/containers/tabs/esm2022/tabs.component.mjs +9 -9
- app-ng-runtime/components/containers/tabs/fesm2022/index.mjs +12 -12
- app-ng-runtime/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/containers/tabs/tab-pane/tab-pane.component.d.ts +1 -1
- app-ng-runtime/components/containers/tabs/tabs.component.d.ts +3 -3
- app-ng-runtime/components/data/table/bundles/index.umd.js +3 -0
- app-ng-runtime/components/data/table/esm2022/table.component.mjs +3 -1
- app-ng-runtime/components/data/table/esm2022/table.props.mjs +2 -1
- app-ng-runtime/components/data/table/fesm2022/index.mjs +3 -0
- app-ng-runtime/components/data/table/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/table/table.component.d.ts +2 -0
- app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +1 -1
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +189 -49
- app-ng-runtime/components/input/epoch/date/date.component.d.ts +103 -0
- app-ng-runtime/components/input/epoch/date/imaskUtil.d.ts +103 -0
- app-ng-runtime/components/input/epoch/epoch.module.d.ts +2 -1
- app-ng-runtime/components/input/epoch/esm2022/base-date-time.component.mjs +19 -11
- app-ng-runtime/components/input/epoch/esm2022/date/date.component.mjs +35 -25
- app-ng-runtime/components/input/epoch/esm2022/date/imaskUtil.mjs +121 -0
- app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +2 -2
- app-ng-runtime/components/input/epoch/esm2022/epoch.module.mjs +8 -4
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs +182 -40
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js +54 -1
- app-ng-runtime/components/navigation/menu/esm2022/menu-dropdown/menu-dropdown.component.mjs +51 -1
- app-ng-runtime/components/navigation/menu/esm2022/menu.component.mjs +5 -2
- app-ng-runtime/components/navigation/menu/fesm2022/index.mjs +54 -1
- app-ng-runtime/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/menu-dropdown/menu-dropdown.component.d.ts +4 -0
- app-ng-runtime/components/navigation/menu/menu.component.d.ts +2 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/scripts/datatable/datatable.js +37 -3
|
@@ -6,7 +6,7 @@ import * as i5 from '@angular/forms';
|
|
|
6
6
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
|
|
7
7
|
import * as i3 from 'ngx-bootstrap/datepicker';
|
|
8
8
|
import { BsDatepickerConfig, BsDatepickerDirective, BsDatepickerModule } from 'ngx-bootstrap/datepicker';
|
|
9
|
-
import * as i4 from 'ngx-bootstrap/dropdown';
|
|
9
|
+
import * as i4$1 from 'ngx-bootstrap/dropdown';
|
|
10
10
|
import { BsDropdownDirective, BsDropdownModule } from 'ngx-bootstrap/dropdown';
|
|
11
11
|
import * as i6 from 'ngx-bootstrap/timepicker';
|
|
12
12
|
import { TimepickerConfig, TimepickerComponent, TimepickerModule } from 'ngx-bootstrap/timepicker';
|
|
@@ -15,6 +15,9 @@ import * as i1$1 from '@wm/core';
|
|
|
15
15
|
import { App, AbstractI18nService, isMobile, getFormattedDate, getDateObj, isString, setAttr, getNativeDateObject, hasCordova, isIos, FormWidgetType, getMomentLocaleObject, getDisplayDateTimeFormat, adjustContainerPosition, adjustContainerRightEdges, addEventListenerOnElement, addClass, $appDigest } from '@wm/core';
|
|
16
16
|
import { BaseFormCustomComponent } from '@wm/components/input';
|
|
17
17
|
import * as i1 from 'ngx-bootstrap/modal';
|
|
18
|
+
import IMask from 'imask';
|
|
19
|
+
import * as i4 from 'angular-imask';
|
|
20
|
+
import { IMaskModule } from 'angular-imask';
|
|
18
21
|
|
|
19
22
|
const _c0$4 = ["*"];
|
|
20
23
|
function PickerComponent_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -834,13 +837,18 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
834
837
|
/**
|
|
835
838
|
* This method is used to highlight the current date
|
|
836
839
|
*/
|
|
837
|
-
hightlightToday() {
|
|
838
|
-
const
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
840
|
+
hightlightToday(newDate) {
|
|
841
|
+
const activeMonth = $(`.bs-datepicker-head .current`).first().text();
|
|
842
|
+
const activeYear = $(".bs-datepicker-head .current").eq(1).text();
|
|
843
|
+
const monthName = new Date().toLocaleString('default', { month: 'long' });
|
|
844
|
+
if (activeMonth == monthName && activeYear == new Date().getFullYear() && newDate.getDate() === new Date().getDate() && newDate.getMonth() === new Date().getMonth() && newDate.getFullYear() === new Date().getFullYear()) {
|
|
845
|
+
const toDay = new Date().getDate().toString();
|
|
846
|
+
_.filter($(`span:contains(${toDay})`).not('.is-other-month'), (obj) => {
|
|
847
|
+
if ($(obj).text() === toDay) {
|
|
848
|
+
$(obj).addClass('current-date text-info');
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
}
|
|
844
852
|
}
|
|
845
853
|
/**
|
|
846
854
|
* This method is used to find the new date is from another year or not
|
|
@@ -901,7 +909,10 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
901
909
|
setTimeout(() => {
|
|
902
910
|
const newDay = newDate.getDate().toString();
|
|
903
911
|
_.filter($(`span:contains(${newDay})`).not('.is-other-month'), (obj) => {
|
|
904
|
-
|
|
912
|
+
const activeMonth = $(`.bs-datepicker-head .current`).first().text();
|
|
913
|
+
const activeYear = $(".bs-datepicker-head .current").eq(1).text();
|
|
914
|
+
const monthName = new Date().toLocaleString('default', { month: 'long' });
|
|
915
|
+
if ($(obj).text() === newDay && activeMonth == monthName && activeYear == new Date().getFullYear()) {
|
|
905
916
|
if ($(obj).hasClass('selected')) {
|
|
906
917
|
$(obj).parent().attr('aria-selected', 'true');
|
|
907
918
|
}
|
|
@@ -912,8 +923,8 @@ class BaseDateTimeComponent extends BaseFormCustomComponent {
|
|
|
912
923
|
this.activeDate = newDate;
|
|
913
924
|
}
|
|
914
925
|
});
|
|
915
|
-
if (newDate.getMonth() === new Date().getMonth() && newDate.getFullYear() === new Date().getFullYear()) {
|
|
916
|
-
this.hightlightToday();
|
|
926
|
+
if (newDate.getDate() === new Date().getDate() && newDate.getMonth() === new Date().getMonth() && newDate.getFullYear() === new Date().getFullYear()) {
|
|
927
|
+
this.hightlightToday(newDate);
|
|
917
928
|
}
|
|
918
929
|
});
|
|
919
930
|
}
|
|
@@ -1659,21 +1670,141 @@ const registerProps$2 = () => {
|
|
|
1659
1670
|
registerFormWidget(FormWidgetType.DATE, new Map(dateProps));
|
|
1660
1671
|
};
|
|
1661
1672
|
|
|
1673
|
+
const monthNamesLong = [
|
|
1674
|
+
'January',
|
|
1675
|
+
'February',
|
|
1676
|
+
'March',
|
|
1677
|
+
'April',
|
|
1678
|
+
'May',
|
|
1679
|
+
'June',
|
|
1680
|
+
'July',
|
|
1681
|
+
'August',
|
|
1682
|
+
'September',
|
|
1683
|
+
'October',
|
|
1684
|
+
'November',
|
|
1685
|
+
'December',
|
|
1686
|
+
];
|
|
1687
|
+
function validateTheMaskedDate(format) {
|
|
1688
|
+
if (format == 'timestamp') {
|
|
1689
|
+
return {};
|
|
1690
|
+
}
|
|
1691
|
+
const modifiedFormat = format.toUpperCase().replace(/E/g, 'd');
|
|
1692
|
+
const parseFn = str => {
|
|
1693
|
+
return moment(str, modifiedFormat).toDate();
|
|
1694
|
+
};
|
|
1695
|
+
const formatFn = date => {
|
|
1696
|
+
return moment(date, modifiedFormat).format(modifiedFormat);
|
|
1697
|
+
};
|
|
1698
|
+
return {
|
|
1699
|
+
mask: Date,
|
|
1700
|
+
pattern: modifiedFormat,
|
|
1701
|
+
format: formatFn,
|
|
1702
|
+
parse: parseFn,
|
|
1703
|
+
blocks: {
|
|
1704
|
+
YYYY: {
|
|
1705
|
+
mask: IMask.MaskedRange,
|
|
1706
|
+
from: 1900,
|
|
1707
|
+
to: 9999,
|
|
1708
|
+
placeholderChar: 'Y',
|
|
1709
|
+
maxLength: 4,
|
|
1710
|
+
},
|
|
1711
|
+
YYY: {
|
|
1712
|
+
mask: IMask.MaskedRange,
|
|
1713
|
+
from: 900,
|
|
1714
|
+
to: 999,
|
|
1715
|
+
placeholderChar: 'Y',
|
|
1716
|
+
maxLength: 3,
|
|
1717
|
+
overwrite: false,
|
|
1718
|
+
},
|
|
1719
|
+
YY: {
|
|
1720
|
+
mask: IMask.MaskedRange,
|
|
1721
|
+
from: 0,
|
|
1722
|
+
to: 99,
|
|
1723
|
+
placeholderChar: 'Y',
|
|
1724
|
+
maxLength: 2,
|
|
1725
|
+
},
|
|
1726
|
+
Y: {
|
|
1727
|
+
mask: IMask.MaskedRange,
|
|
1728
|
+
from: 0,
|
|
1729
|
+
to: 9,
|
|
1730
|
+
placeholderChar: 'Y',
|
|
1731
|
+
maxLength: 1,
|
|
1732
|
+
},
|
|
1733
|
+
M: {
|
|
1734
|
+
mask: IMask.MaskedRange,
|
|
1735
|
+
from: 1,
|
|
1736
|
+
to: 12,
|
|
1737
|
+
placeholderChar: 'M',
|
|
1738
|
+
maxLength: 2,
|
|
1739
|
+
},
|
|
1740
|
+
MM: {
|
|
1741
|
+
mask: IMask.MaskedRange,
|
|
1742
|
+
from: 1,
|
|
1743
|
+
to: 12,
|
|
1744
|
+
placeholderChar: 'M',
|
|
1745
|
+
maxLength: 2,
|
|
1746
|
+
},
|
|
1747
|
+
MMM: {
|
|
1748
|
+
mask: IMask.MaskedEnum,
|
|
1749
|
+
enum: Array.from({ length: 12 }, (_, i) => new Date(0, i).toLocaleString(window.navigator.language, { month: 'short' })),
|
|
1750
|
+
placeholderChar: 'M',
|
|
1751
|
+
maxLength: 3,
|
|
1752
|
+
},
|
|
1753
|
+
MMMM: {
|
|
1754
|
+
mask: IMask.MaskedEnum,
|
|
1755
|
+
enum: monthNamesLong,
|
|
1756
|
+
placeholderChar: "M",
|
|
1757
|
+
maxLength: 4
|
|
1758
|
+
},
|
|
1759
|
+
DD: {
|
|
1760
|
+
mask: IMask.MaskedRange,
|
|
1761
|
+
from: 1,
|
|
1762
|
+
to: 31,
|
|
1763
|
+
placeholderChar: 'D',
|
|
1764
|
+
maxLength: 2,
|
|
1765
|
+
},
|
|
1766
|
+
D: {
|
|
1767
|
+
mask: IMask.MaskedRange,
|
|
1768
|
+
from: 1,
|
|
1769
|
+
to: 31,
|
|
1770
|
+
placeholderChar: 'D',
|
|
1771
|
+
maxLength: 1,
|
|
1772
|
+
},
|
|
1773
|
+
ddd: {
|
|
1774
|
+
mask: IMask.MaskedEnum,
|
|
1775
|
+
enum: Array.from({ length: 7 }, (_, i) => new Date(0, 0, i + 1).toLocaleString(window.navigator.language, { weekday: 'short' })),
|
|
1776
|
+
placeholderChar: 'E',
|
|
1777
|
+
maxLength: 3,
|
|
1778
|
+
},
|
|
1779
|
+
dddd: {
|
|
1780
|
+
mask: IMask.MaskedEnum,
|
|
1781
|
+
enum: Array.from({ length: 7 }, (_, i) => new Date(0, 0, i + 1).toLocaleString(window.navigator.language, { weekday: 'long' })),
|
|
1782
|
+
placeholderChar: 'E',
|
|
1783
|
+
minLength: 6,
|
|
1784
|
+
},
|
|
1785
|
+
},
|
|
1786
|
+
autofix: true,
|
|
1787
|
+
lazy: false,
|
|
1788
|
+
overwrite: true,
|
|
1789
|
+
skipInvalid: true
|
|
1790
|
+
};
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1662
1793
|
const _c0$2 = ["wmDate", ""];
|
|
1663
|
-
function
|
|
1664
|
-
const
|
|
1665
|
-
i0.ɵɵelementStart(0, "wm-datetimepicker",
|
|
1666
|
-
i0.ɵɵlistener("change", function
|
|
1794
|
+
function DateComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
|
|
1795
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
1796
|
+
i0.ɵɵelementStart(0, "wm-datetimepicker", 9);
|
|
1797
|
+
i0.ɵɵlistener("change", function DateComponent_ng_template_8_Template_wm_datetimepicker_change_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDateChange($event)); });
|
|
1667
1798
|
i0.ɵɵelementEnd();
|
|
1668
|
-
i0.ɵɵelementStart(1, "div",
|
|
1669
|
-
i0.ɵɵlistener("click", function
|
|
1799
|
+
i0.ɵɵelementStart(1, "div", 10);
|
|
1800
|
+
i0.ɵɵlistener("click", function DateComponent_ng_template_8_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r4); const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(!(ctx_r5.disabled || ctx_r5.readonly || ctx_r5.isCurrentDate) && ctx_r5.showDatePickerModal(ctx_r5.bsDataValue)); })("focus", function DateComponent_ng_template_8_Template_div_focus_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r6 = i0.ɵɵnextContext(); ctx_r6.onDateTimeInputFocus(true); return i0.ɵɵresetView(ctx_r6.invokeOnFocus($event)); })("blur", function DateComponent_ng_template_8_Template_div_blur_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r7 = i0.ɵɵnextContext(); ctx_r7.onDateTimeInputBlur(); return i0.ɵɵresetView(ctx_r7.invokeOnTouched($event)); });
|
|
1670
1801
|
i0.ɵɵelementEnd();
|
|
1671
1802
|
} if (rf & 2) {
|
|
1672
|
-
const
|
|
1673
|
-
i0.ɵɵproperty("config",
|
|
1803
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
1804
|
+
i0.ɵɵproperty("config", ctx_r2._dateOptions)("placement", ctx_r2.modal)("excludedDaysToDisable", ctx_r2.excludedDaysToDisable)("excludedDatesToDisable", ctx_r2.excludedDatesToDisable)("displayFormat", ctx_r2.dateInputFormat)("value", ctx_r2.bsDataValue);
|
|
1674
1805
|
i0.ɵɵadvance(1);
|
|
1675
|
-
i0.ɵɵproperty("tabindex",
|
|
1676
|
-
i0.ɵɵattribute("aria-label",
|
|
1806
|
+
i0.ɵɵproperty("tabindex", ctx_r2.tabindex || 0);
|
|
1807
|
+
i0.ɵɵattribute("aria-label", ctx_r2.displayValue ? "Change Date " + ctx_r2.displayValue : ctx_r2.hint || "Choose Date");
|
|
1677
1808
|
} }
|
|
1678
1809
|
const CURRENT_DATE$1 = 'CURRENT_DATE';
|
|
1679
1810
|
const DEFAULT_CLS$2 = 'app-date input-group';
|
|
@@ -1699,6 +1830,14 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1699
1830
|
get datavalue() {
|
|
1700
1831
|
return getFormattedDate(this.datePipe, this.bsDataValue, this.outputformat, this.timeZone, null, this.isCurrentDate, this) || '';
|
|
1701
1832
|
}
|
|
1833
|
+
get mask() {
|
|
1834
|
+
if (this.datepattern) {
|
|
1835
|
+
return validateTheMaskedDate(this.datepattern);
|
|
1836
|
+
}
|
|
1837
|
+
else {
|
|
1838
|
+
return false;
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1702
1841
|
// Todo[Shubham]: needs to be redefined
|
|
1703
1842
|
// sets the dataValue and computes the display model values
|
|
1704
1843
|
// @ts-ignore
|
|
@@ -1774,7 +1913,7 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1774
1913
|
this.isOpen = true;
|
|
1775
1914
|
this.bsDataValue ? this.activeDate = this.bsDataValue : this.activeDate = new Date();
|
|
1776
1915
|
if (!this.bsDataValue) {
|
|
1777
|
-
this.hightlightToday();
|
|
1916
|
+
this.hightlightToday(this.activeDate);
|
|
1778
1917
|
}
|
|
1779
1918
|
// We are using the two input tags(To maintain the modal and proxy modal) for the date control.
|
|
1780
1919
|
// So actual bootstrap input target width we made it to 0, so bootstrap calculating the calendar container top position improperly.
|
|
@@ -1907,22 +2046,22 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1907
2046
|
provideAs(DateComponent, NG_VALUE_ACCESSOR, true),
|
|
1908
2047
|
provideAs(DateComponent, NG_VALIDATORS, true),
|
|
1909
2048
|
provideAsWidgetRef(DateComponent)
|
|
1910
|
-
]), i0.ɵɵInheritDefinitionFeature], attrs: _c0$2, decls:
|
|
1911
|
-
i0.ɵɵelementStart(0, "input", 0);
|
|
2049
|
+
]), i0.ɵɵInheritDefinitionFeature], attrs: _c0$2, decls: 9, vars: 27, consts: [["focus-target", "", "type", "text", 1, "form-control", "app-textbox", "app-dateinput", "display-input", 3, "name", "imask", "unmask", "tabindex", "value", "disabled", "autofocus", "required", "readOnly", "click", "focus", "blur", "change", "keydown"], ["dateInput", ""], [1, "input-group-btn"], ["type", "button", "aria-haspopup", "true", "aria-expanded", "false", 1, "btn", "btn-default", "btn-time", 3, "tabindex", "disabled", "click"], ["aria-hidden", "true", 1, "app-icon", "wm-sl-l", "sl-calendar"], [2, "width", "0", "display", "inline-block"], ["aria-label", "datepicker dropdownmenu", "aria-controls", "date", "bsDatepicker", "", "placement", "bottom right", 1, "model-holder", 3, "tabindex", "container", "bsConfig", "isOpen", "daysDisabled", "datesDisabled", "isDisabled", "bsValue", "onShown", "onHidden", "bsValueChange"], ["datepicker", "bsDatepicker"], [3, "ngIf"], ["dateTimePicker", "", "mode", "DATE", 3, "config", "placement", "excludedDaysToDisable", "excludedDatesToDisable", "displayFormat", "value", "change"], ["role", "button", 1, "mobile-input", "mobile-datepicker-container", 3, "tabindex", "click", "focus", "blur"]], template: function DateComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2050
|
+
i0.ɵɵelementStart(0, "input", 0, 1);
|
|
1912
2051
|
i0.ɵɵlistener("click", function DateComponent_Template_input_click_0_listener($event) { return ctx.toggleDpDropdown($event, true); })("focus", function DateComponent_Template_input_focus_0_listener($event) { ctx.onDateTimeInputFocus(); return ctx.invokeOnFocus($event); })("blur", function DateComponent_Template_input_blur_0_listener($event) { return ctx.onInputBlur($event); })("change", function DateComponent_Template_input_change_0_listener($event) { return ctx.onDisplayDateChange($event); })("keydown", function DateComponent_Template_input_keydown_0_listener($event) { ctx._triggeredByUser = true; return ctx.onDisplayKeydown($event); });
|
|
1913
2052
|
i0.ɵɵelementEnd();
|
|
1914
|
-
i0.ɵɵelementStart(
|
|
1915
|
-
i0.ɵɵlistener("click", function
|
|
1916
|
-
i0.ɵɵelement(
|
|
2053
|
+
i0.ɵɵelementStart(2, "span", 2)(3, "button", 3);
|
|
2054
|
+
i0.ɵɵlistener("click", function DateComponent_Template_button_click_3_listener($event) { return ctx.toggleDpDropdown($event, false); });
|
|
2055
|
+
i0.ɵɵelement(4, "i", 4);
|
|
1917
2056
|
i0.ɵɵelementEnd()();
|
|
1918
|
-
i0.ɵɵelementStart(
|
|
1919
|
-
i0.ɵɵlistener("onShown", function
|
|
2057
|
+
i0.ɵɵelementStart(5, "div", 5)(6, "input", 6, 7);
|
|
2058
|
+
i0.ɵɵlistener("onShown", function DateComponent_Template_input_onShown_6_listener() { return ctx.onDatePickerOpen(); })("onHidden", function DateComponent_Template_input_onHidden_6_listener() { return ctx.hideDatepickerDropdown(); })("bsValueChange", function DateComponent_Template_input_bsValueChange_6_listener($event) { return ctx.onDateChange($event); });
|
|
1920
2059
|
i0.ɵɵelementEnd()();
|
|
1921
|
-
i0.ɵɵtemplate(
|
|
2060
|
+
i0.ɵɵtemplate(8, DateComponent_ng_template_8_Template, 2, 8, "ng-template", 8);
|
|
1922
2061
|
} if (rf & 2) {
|
|
1923
|
-
i0.ɵɵproperty("name", ctx.name)("tabindex", ctx.loadNativeDateInput ? "-1" : ctx.tabindex)("value", ctx.displayValue)("disabled", ctx.disabled || ctx.readonly)("autofocus", ctx.autofocus)("required", ctx.required)("readOnly", ctx.isReadOnly);
|
|
2062
|
+
i0.ɵɵproperty("name", ctx.name)("imask", ctx.mask)("unmask", true)("tabindex", ctx.loadNativeDateInput ? "-1" : ctx.tabindex)("value", ctx.displayValue)("disabled", ctx.disabled || ctx.readonly)("autofocus", ctx.autofocus)("required", ctx.required)("readOnly", ctx.isReadOnly);
|
|
1924
2063
|
i0.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey)("aria-label", ctx.hint);
|
|
1925
|
-
i0.ɵɵadvance(
|
|
2064
|
+
i0.ɵɵadvance(3);
|
|
1926
2065
|
i0.ɵɵproperty("tabindex", ctx.loadNativeDateInput ? "-1" : ctx.tabindex)("disabled", ctx.disabled || ctx.readonly);
|
|
1927
2066
|
i0.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput)("aria-label", ctx.displayValue ? "Change Date " + ctx.displayValue : "Choose date by pressing enter");
|
|
1928
2067
|
i0.ɵɵadvance(3);
|
|
@@ -1930,7 +2069,7 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1930
2069
|
i0.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput);
|
|
1931
2070
|
i0.ɵɵadvance(2);
|
|
1932
2071
|
i0.ɵɵproperty("ngIf", ctx.loadNativeDateInput);
|
|
1933
|
-
} }, dependencies: [i2.NgIf, i3.BsDatepickerDirective, i3.BsDatepickerInputDirective, DateTimePickerComponent], encapsulation: 2 }); }
|
|
2072
|
+
} }, dependencies: [i2.NgIf, i3.BsDatepickerDirective, i3.BsDatepickerInputDirective, i4.IMaskDirective, DateTimePickerComponent], encapsulation: 2 }); }
|
|
1934
2073
|
}
|
|
1935
2074
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DateComponent, [{
|
|
1936
2075
|
type: Component,
|
|
@@ -1938,7 +2077,7 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1938
2077
|
provideAs(DateComponent, NG_VALUE_ACCESSOR, true),
|
|
1939
2078
|
provideAs(DateComponent, NG_VALIDATORS, true),
|
|
1940
2079
|
provideAsWidgetRef(DateComponent)
|
|
1941
|
-
], 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 (click)=\"!(disabled || readonly || isCurrentDate) && showDatePickerModal(bsDataValue)\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event);\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : hint || 'Choose Date'\"\n role=\"button\">\n </div>\n</ng-template>\n" }]
|
|
2080
|
+
], template: " <input class=\"form-control app-textbox app-dateinput display-input\"\n focus-target\n type=\"text\"\n #dateInput\n [name]=\"name\"\n [imask]=\"mask\"\n [unmask]=\"true\"\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 (click)=\"!(disabled || readonly || isCurrentDate) && showDatePickerModal(bsDataValue)\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event);\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : hint || 'Choose Date'\"\n role=\"button\">\n </div>\n</ng-template>\n" }]
|
|
1942
2081
|
}], function () { return [{ type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: i1$1.AppDefaults }]; }, { bsDatePickerDirective: [{
|
|
1943
2082
|
type: ViewChild,
|
|
1944
2083
|
args: [BsDatepickerDirective]
|
|
@@ -2183,7 +2322,7 @@ class DatetimeComponent extends BaseDateTimeComponent {
|
|
|
2183
2322
|
this.focusTrap.activate();
|
|
2184
2323
|
this.bsDateValue ? this.activeDate = this.bsDateValue : this.activeDate = new Date();
|
|
2185
2324
|
if (!this.bsDateValue) {
|
|
2186
|
-
this.hightlightToday();
|
|
2325
|
+
this.hightlightToday(this.activeDate);
|
|
2187
2326
|
}
|
|
2188
2327
|
this.addDatepickerKeyboardEvents(this, true);
|
|
2189
2328
|
adjustContainerPosition($('bs-datepicker-container'), this.nativeElement, this.bsDatePickerDirective._datepicker);
|
|
@@ -2452,7 +2591,7 @@ class DatetimeComponent extends BaseDateTimeComponent {
|
|
|
2452
2591
|
i0.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput);
|
|
2453
2592
|
i0.ɵɵadvance(3);
|
|
2454
2593
|
i0.ɵɵproperty("ngIf", ctx.loadNativeDateInput);
|
|
2455
|
-
} }, dependencies: [i2.NgIf, i3.BsDatepickerDirective, i3.BsDatepickerInputDirective, i4.BsDropdownMenuDirective, i4.BsDropdownDirective, i5.NgControlStatus, i5.NgModel, i6.TimepickerComponent, DateTimePickerComponent], encapsulation: 2 }); }
|
|
2594
|
+
} }, dependencies: [i2.NgIf, i3.BsDatepickerDirective, i3.BsDatepickerInputDirective, i4$1.BsDropdownMenuDirective, i4$1.BsDropdownDirective, i5.NgControlStatus, i5.NgModel, i6.TimepickerComponent, DateTimePickerComponent], encapsulation: 2 }); }
|
|
2456
2595
|
}
|
|
2457
2596
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatetimeComponent, [{
|
|
2458
2597
|
type: Component,
|
|
@@ -2842,7 +2981,7 @@ class TimeComponent extends BaseDateTimeComponent {
|
|
|
2842
2981
|
i0.ɵɵproperty("tabindex", ctx.tabindex)("disabled", ctx.disabled || ctx.readonly || ctx.isCurrentTime);
|
|
2843
2982
|
i0.ɵɵadvance(3);
|
|
2844
2983
|
i0.ɵɵproperty("ngIf", ctx.loadNativeDateInput);
|
|
2845
|
-
} }, dependencies: [i2.NgIf, i4.BsDropdownMenuDirective, i4.BsDropdownDirective, i5.NgControlStatus, i5.NgModel, i6.TimepickerComponent, DateTimePickerComponent], encapsulation: 2 }); }
|
|
2984
|
+
} }, dependencies: [i2.NgIf, i4$1.BsDropdownMenuDirective, i4$1.BsDropdownDirective, i5.NgControlStatus, i5.NgModel, i6.TimepickerComponent, DateTimePickerComponent], encapsulation: 2 }); }
|
|
2846
2985
|
}
|
|
2847
2986
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimeComponent, [{
|
|
2848
2987
|
type: Component,
|
|
@@ -2871,7 +3010,8 @@ class EpochModule {
|
|
|
2871
3010
|
BsDropdownModule,
|
|
2872
3011
|
FormsModule,
|
|
2873
3012
|
TimepickerModule,
|
|
2874
|
-
WmComponentsModule
|
|
3013
|
+
WmComponentsModule,
|
|
3014
|
+
IMaskModule] }); }
|
|
2875
3015
|
}
|
|
2876
3016
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EpochModule, [{
|
|
2877
3017
|
type: NgModule,
|
|
@@ -2882,7 +3022,8 @@ class EpochModule {
|
|
|
2882
3022
|
BsDropdownModule,
|
|
2883
3023
|
FormsModule,
|
|
2884
3024
|
TimepickerModule,
|
|
2885
|
-
WmComponentsModule
|
|
3025
|
+
WmComponentsModule,
|
|
3026
|
+
IMaskModule
|
|
2886
3027
|
],
|
|
2887
3028
|
declarations: [...components],
|
|
2888
3029
|
exports: [...components]
|
|
@@ -2899,7 +3040,8 @@ class EpochModule {
|
|
|
2899
3040
|
BsDropdownModule,
|
|
2900
3041
|
FormsModule,
|
|
2901
3042
|
TimepickerModule,
|
|
2902
|
-
WmComponentsModule
|
|
3043
|
+
WmComponentsModule,
|
|
3044
|
+
IMaskModule], exports: [DateComponent,
|
|
2903
3045
|
DatetimeComponent,
|
|
2904
3046
|
TimeComponent,
|
|
2905
3047
|
DateTimePickerComponent,
|