@wavemaker/app-ng-runtime 11.5.4-rc.5516 → 11.5.4-rc.5517
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/components/input/epoch/bundles/index.umd.js +186 -37
- app-ng-runtime/components/input/epoch/date/date.component.d.ts +88 -0
- app-ng-runtime/components/input/epoch/date/imaskUtil.d.ts +89 -0
- app-ng-runtime/components/input/epoch/epoch.module.d.ts +2 -1
- app-ng-runtime/components/input/epoch/esm2020/date/date.component.mjs +34 -24
- app-ng-runtime/components/input/epoch/esm2020/date/imaskUtil.mjs +138 -0
- app-ng-runtime/components/input/epoch/esm2020/epoch.module.mjs +8 -4
- app-ng-runtime/components/input/epoch/fesm2015/index.mjs +179 -28
- app-ng-runtime/components/input/epoch/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/epoch/fesm2020/index.mjs +179 -28
- app-ng-runtime/components/input/epoch/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-bootstrap/datepicker'), require('ngx-bootstrap/dropdown'), require('ngx-bootstrap/timepicker'), require('@wm/components/base'), require('@wm/core'), require('@wm/components/input'), require('ngx-bootstrap/modal')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', '@angular/forms', 'ngx-bootstrap/datepicker', 'ngx-bootstrap/dropdown', 'ngx-bootstrap/timepicker', '@wm/components/base', '@wm/core', '@wm/components/input', 'ngx-bootstrap/modal'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.input = global.wm.components.input || {}, global.wm.components.input.epoch = {}), global.ng.core, global.ng.common, global.ng.forms, global.datepicker, global.dropdown, global.timepicker, global.wm.components.base, global.wm.core, global.wm.components.input, global.modal));
|
|
5
|
-
})(this, (function (exports, i0, i2, i5, i3, i4, i6, base, i1$1, input, i1) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-bootstrap/datepicker'), require('ngx-bootstrap/dropdown'), require('ngx-bootstrap/timepicker'), require('@wm/components/base'), require('@wm/core'), require('@wm/components/input'), require('ngx-bootstrap/modal'), require('imask'), require('angular-imask')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', '@angular/forms', 'ngx-bootstrap/datepicker', 'ngx-bootstrap/dropdown', 'ngx-bootstrap/timepicker', '@wm/components/base', '@wm/core', '@wm/components/input', 'ngx-bootstrap/modal', 'imask', 'angular-imask'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.input = global.wm.components.input || {}, global.wm.components.input.epoch = {}), global.ng.core, global.ng.common, global.ng.forms, global.datepicker, global.dropdown, global.timepicker, global.wm.components.base, global.wm.core, global.wm.components.input, global.modal, global.IMask, global.angularIMask));
|
|
5
|
+
})(this, (function (exports, i0, i2, i5, i3, i4$1, i6, base, i1$1, input, i1, IMask, i4) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
var n = Object.create(null);
|
|
@@ -25,10 +25,11 @@
|
|
|
25
25
|
var i2__namespace = /*#__PURE__*/_interopNamespaceDefault(i2);
|
|
26
26
|
var i5__namespace = /*#__PURE__*/_interopNamespaceDefault(i5);
|
|
27
27
|
var i3__namespace = /*#__PURE__*/_interopNamespaceDefault(i3);
|
|
28
|
-
var
|
|
28
|
+
var i4$1__namespace = /*#__PURE__*/_interopNamespaceDefault(i4$1);
|
|
29
29
|
var i6__namespace = /*#__PURE__*/_interopNamespaceDefault(i6);
|
|
30
30
|
var i1$1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1$1);
|
|
31
31
|
var i1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1);
|
|
32
|
+
var i4__namespace = /*#__PURE__*/_interopNamespaceDefault(i4);
|
|
32
33
|
|
|
33
34
|
const _c0$4 = ["*"];
|
|
34
35
|
function PickerComponent_div_6_Template(rf, ctx) {
|
|
@@ -1635,7 +1636,7 @@
|
|
|
1635
1636
|
BaseDateTimeComponent.ɵfac = function BaseDateTimeComponent_Factory(t) { i0__namespace.ɵɵinvalidFactory(); };
|
|
1636
1637
|
BaseDateTimeComponent.ɵdir = /*@__PURE__*/ i0__namespace.ɵɵdefineDirective({ type: BaseDateTimeComponent, viewQuery: function BaseDateTimeComponent_Query(rf, ctx) {
|
|
1637
1638
|
if (rf & 1) {
|
|
1638
|
-
i0__namespace.ɵɵviewQuery(i4.BsDropdownDirective, 5);
|
|
1639
|
+
i0__namespace.ɵɵviewQuery(i4$1.BsDropdownDirective, 5);
|
|
1639
1640
|
i0__namespace.ɵɵviewQuery(i6.TimepickerComponent, 5);
|
|
1640
1641
|
i0__namespace.ɵɵviewQuery(DateTimePickerComponent, 5);
|
|
1641
1642
|
}
|
|
@@ -1651,7 +1652,7 @@
|
|
|
1651
1652
|
type: i0.Directive
|
|
1652
1653
|
}], function () { return [{ type: i0__namespace.Injector }, { type: undefined }]; }, { bsDropdown: [{
|
|
1653
1654
|
type: i0.ViewChild,
|
|
1654
|
-
args: [i4.BsDropdownDirective]
|
|
1655
|
+
args: [i4$1.BsDropdownDirective]
|
|
1655
1656
|
}], bsTimePicker: [{
|
|
1656
1657
|
type: i0.ViewChild,
|
|
1657
1658
|
args: [i6.TimepickerComponent]
|
|
@@ -1699,23 +1700,160 @@
|
|
|
1699
1700
|
base.registerFormWidget(i1$1.FormWidgetType.DATE, new Map(dateProps));
|
|
1700
1701
|
};
|
|
1701
1702
|
|
|
1703
|
+
const weekNamesShort = [
|
|
1704
|
+
'Mon',
|
|
1705
|
+
'Tue',
|
|
1706
|
+
'Wed',
|
|
1707
|
+
'Thu',
|
|
1708
|
+
'Fri',
|
|
1709
|
+
'Sat',
|
|
1710
|
+
'Sun'
|
|
1711
|
+
];
|
|
1712
|
+
const weekNamesLong = [
|
|
1713
|
+
'Monday',
|
|
1714
|
+
'Tuesday',
|
|
1715
|
+
'Wednesday',
|
|
1716
|
+
'Thursday',
|
|
1717
|
+
'Friday',
|
|
1718
|
+
'Saturday',
|
|
1719
|
+
'Sunday'
|
|
1720
|
+
];
|
|
1721
|
+
const monthNamesShort = [
|
|
1722
|
+
'Jan',
|
|
1723
|
+
'Feb',
|
|
1724
|
+
'Mar',
|
|
1725
|
+
'Apr',
|
|
1726
|
+
'May',
|
|
1727
|
+
'Jun',
|
|
1728
|
+
'Jul',
|
|
1729
|
+
'Aug',
|
|
1730
|
+
'Sep',
|
|
1731
|
+
'Oct',
|
|
1732
|
+
'Nov',
|
|
1733
|
+
'Dec',
|
|
1734
|
+
];
|
|
1735
|
+
const monthNamesLong = [
|
|
1736
|
+
'January',
|
|
1737
|
+
'February',
|
|
1738
|
+
'March',
|
|
1739
|
+
'April',
|
|
1740
|
+
'May',
|
|
1741
|
+
'June',
|
|
1742
|
+
'July',
|
|
1743
|
+
'August',
|
|
1744
|
+
'September',
|
|
1745
|
+
'October',
|
|
1746
|
+
'November',
|
|
1747
|
+
'December',
|
|
1748
|
+
];
|
|
1749
|
+
function validateTheMaskedDate(format) {
|
|
1750
|
+
if (format == 'timestamp') {
|
|
1751
|
+
return {};
|
|
1752
|
+
}
|
|
1753
|
+
const modifiedFormat = format.toUpperCase().replace(/E/g, 'd');
|
|
1754
|
+
const parseFn = str => {
|
|
1755
|
+
return moment(str, modifiedFormat).toDate();
|
|
1756
|
+
};
|
|
1757
|
+
const formatFn = date => {
|
|
1758
|
+
return moment(date, modifiedFormat).format(modifiedFormat);
|
|
1759
|
+
};
|
|
1760
|
+
return {
|
|
1761
|
+
mask: Date,
|
|
1762
|
+
pattern: modifiedFormat,
|
|
1763
|
+
format: formatFn,
|
|
1764
|
+
parse: parseFn,
|
|
1765
|
+
blocks: {
|
|
1766
|
+
YYYY: {
|
|
1767
|
+
mask: IMask.MaskedRange,
|
|
1768
|
+
from: 1900,
|
|
1769
|
+
to: 9999,
|
|
1770
|
+
placeholderChar: 'Y',
|
|
1771
|
+
maxLength: 4
|
|
1772
|
+
},
|
|
1773
|
+
YY: {
|
|
1774
|
+
mask: IMask.MaskedRange,
|
|
1775
|
+
from: 0,
|
|
1776
|
+
to: 99,
|
|
1777
|
+
placeholderChar: 'Y',
|
|
1778
|
+
maxLength: 2
|
|
1779
|
+
},
|
|
1780
|
+
M: {
|
|
1781
|
+
mask: IMask.MaskedRange,
|
|
1782
|
+
from: 1,
|
|
1783
|
+
to: 12,
|
|
1784
|
+
placeholderChar: 'M',
|
|
1785
|
+
maxLength: 2
|
|
1786
|
+
},
|
|
1787
|
+
MM: {
|
|
1788
|
+
mask: IMask.MaskedRange,
|
|
1789
|
+
from: 1,
|
|
1790
|
+
to: 12,
|
|
1791
|
+
placeholderChar: 'M',
|
|
1792
|
+
maxLength: 2
|
|
1793
|
+
},
|
|
1794
|
+
MMM: {
|
|
1795
|
+
mask: IMask.MaskedEnum,
|
|
1796
|
+
enum: monthNamesShort,
|
|
1797
|
+
placeholderChar: 'M',
|
|
1798
|
+
maxLength: 3
|
|
1799
|
+
},
|
|
1800
|
+
MMMM: {
|
|
1801
|
+
mask: IMask.MaskedEnum,
|
|
1802
|
+
enum: monthNamesLong,
|
|
1803
|
+
placeholderChar: 'M',
|
|
1804
|
+
minLength: 3
|
|
1805
|
+
},
|
|
1806
|
+
DD: {
|
|
1807
|
+
mask: IMask.MaskedRange,
|
|
1808
|
+
from: 1,
|
|
1809
|
+
to: 31,
|
|
1810
|
+
placeholderChar: 'D',
|
|
1811
|
+
maxLength: 2
|
|
1812
|
+
},
|
|
1813
|
+
D: {
|
|
1814
|
+
mask: IMask.MaskedRange,
|
|
1815
|
+
from: 1,
|
|
1816
|
+
to: 31,
|
|
1817
|
+
placeholderChar: 'D',
|
|
1818
|
+
maxLength: 1
|
|
1819
|
+
},
|
|
1820
|
+
ddd: {
|
|
1821
|
+
mask: IMask.MaskedEnum,
|
|
1822
|
+
enum: weekNamesShort,
|
|
1823
|
+
placeholderChar: 'E',
|
|
1824
|
+
maxLength: 3
|
|
1825
|
+
},
|
|
1826
|
+
dddd: {
|
|
1827
|
+
mask: IMask.MaskedEnum,
|
|
1828
|
+
enum: weekNamesLong,
|
|
1829
|
+
placeholderChar: 'E',
|
|
1830
|
+
minLength: 6
|
|
1831
|
+
},
|
|
1832
|
+
},
|
|
1833
|
+
autofix: true,
|
|
1834
|
+
lazy: false,
|
|
1835
|
+
overwrite: true,
|
|
1836
|
+
skipInvalid: true
|
|
1837
|
+
};
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1702
1840
|
const _c0$2 = ["wmDate", ""];
|
|
1703
|
-
function
|
|
1841
|
+
function DateComponent_ng_template_8_Template(rf, ctx) {
|
|
1704
1842
|
if (rf & 1) {
|
|
1705
|
-
const
|
|
1706
|
-
i0__namespace.ɵɵelementStart(0, "wm-datetimepicker",
|
|
1707
|
-
i0__namespace.ɵɵlistener("change", function
|
|
1843
|
+
const _r4 = i0__namespace.ɵɵgetCurrentView();
|
|
1844
|
+
i0__namespace.ɵɵelementStart(0, "wm-datetimepicker", 9);
|
|
1845
|
+
i0__namespace.ɵɵlistener("change", function DateComponent_ng_template_8_Template_wm_datetimepicker_change_0_listener($event) { i0__namespace.ɵɵrestoreView(_r4); const ctx_r3 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r3.onDateChange($event)); });
|
|
1708
1846
|
i0__namespace.ɵɵelementEnd();
|
|
1709
|
-
i0__namespace.ɵɵelementStart(1, "div",
|
|
1710
|
-
i0__namespace.ɵɵlistener("focus", function
|
|
1847
|
+
i0__namespace.ɵɵelementStart(1, "div", 10);
|
|
1848
|
+
i0__namespace.ɵɵlistener("focus", function DateComponent_ng_template_8_Template_div_focus_1_listener($event) { i0__namespace.ɵɵrestoreView(_r4); const ctx_r5 = i0__namespace.ɵɵnextContext(); ctx_r5.onDateTimeInputFocus(true); return i0__namespace.ɵɵresetView(ctx_r5.invokeOnFocus($event)); })("blur", function DateComponent_ng_template_8_Template_div_blur_1_listener($event) { i0__namespace.ɵɵrestoreView(_r4); const ctx_r6 = i0__namespace.ɵɵnextContext(); ctx_r6.onDateTimeInputBlur(); return i0__namespace.ɵɵresetView(ctx_r6.invokeOnTouched($event)); })("click", function DateComponent_ng_template_8_Template_div_click_1_listener() { i0__namespace.ɵɵrestoreView(_r4); const ctx_r7 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(!(ctx_r7.disabled || ctx_r7.readonly || ctx_r7.isCurrentDate) && ctx_r7.showDatePickerModal()); });
|
|
1711
1849
|
i0__namespace.ɵɵelementEnd();
|
|
1712
1850
|
}
|
|
1713
1851
|
if (rf & 2) {
|
|
1714
|
-
const
|
|
1715
|
-
i0__namespace.ɵɵproperty("config",
|
|
1852
|
+
const ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
1853
|
+
i0__namespace.ɵɵ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);
|
|
1716
1854
|
i0__namespace.ɵɵadvance(1);
|
|
1717
|
-
i0__namespace.ɵɵproperty("tabindex",
|
|
1718
|
-
i0__namespace.ɵɵattribute("aria-label",
|
|
1855
|
+
i0__namespace.ɵɵproperty("tabindex", ctx_r2.tabindex || 0);
|
|
1856
|
+
i0__namespace.ɵɵattribute("aria-label", ctx_r2.displayValue ? "Change Date" + ctx_r2.displayValue : "Choose Date");
|
|
1719
1857
|
}
|
|
1720
1858
|
}
|
|
1721
1859
|
const CURRENT_DATE$1 = 'CURRENT_DATE';
|
|
@@ -1741,6 +1879,14 @@
|
|
|
1741
1879
|
get datavalue() {
|
|
1742
1880
|
return i1$1.getFormattedDate(this.datePipe, this.bsDataValue, this.outputformat, this.timeZone, null, this.isCurrentDate, this) || '';
|
|
1743
1881
|
}
|
|
1882
|
+
get mask() {
|
|
1883
|
+
if (this.datepattern) {
|
|
1884
|
+
return validateTheMaskedDate(this.datepattern);
|
|
1885
|
+
}
|
|
1886
|
+
else {
|
|
1887
|
+
return false;
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1744
1890
|
// Todo[Shubham]: needs to be redefined
|
|
1745
1891
|
// sets the dataValue and computes the display model values
|
|
1746
1892
|
// @ts-ignore
|
|
@@ -1955,24 +2101,24 @@
|
|
|
1955
2101
|
base.provideAs(DateComponent, i5.NG_VALUE_ACCESSOR, true),
|
|
1956
2102
|
base.provideAs(DateComponent, i5.NG_VALIDATORS, true),
|
|
1957
2103
|
base.provideAsWidgetRef(DateComponent)
|
|
1958
|
-
]), i0__namespace.ɵɵInheritDefinitionFeature], attrs: _c0$2, decls:
|
|
2104
|
+
]), i0__namespace.ɵɵ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"], [1, "mobile-input", "mobile-datepicker-container", 3, "tabindex", "focus", "blur", "click"]], template: function DateComponent_Template(rf, ctx) {
|
|
1959
2105
|
if (rf & 1) {
|
|
1960
|
-
i0__namespace.ɵɵelementStart(0, "input", 0);
|
|
2106
|
+
i0__namespace.ɵɵelementStart(0, "input", 0, 1);
|
|
1961
2107
|
i0__namespace.ɵɵ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); });
|
|
1962
2108
|
i0__namespace.ɵɵelementEnd();
|
|
1963
|
-
i0__namespace.ɵɵelementStart(
|
|
1964
|
-
i0__namespace.ɵɵlistener("click", function
|
|
1965
|
-
i0__namespace.ɵɵelement(
|
|
2109
|
+
i0__namespace.ɵɵelementStart(2, "span", 2)(3, "button", 3);
|
|
2110
|
+
i0__namespace.ɵɵlistener("click", function DateComponent_Template_button_click_3_listener($event) { return ctx.toggleDpDropdown($event, false); });
|
|
2111
|
+
i0__namespace.ɵɵelement(4, "i", 4);
|
|
1966
2112
|
i0__namespace.ɵɵelementEnd()();
|
|
1967
|
-
i0__namespace.ɵɵelementStart(
|
|
1968
|
-
i0__namespace.ɵɵlistener("onShown", function
|
|
2113
|
+
i0__namespace.ɵɵelementStart(5, "div", 5)(6, "input", 6, 7);
|
|
2114
|
+
i0__namespace.ɵɵ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); });
|
|
1969
2115
|
i0__namespace.ɵɵelementEnd()();
|
|
1970
|
-
i0__namespace.ɵɵtemplate(
|
|
2116
|
+
i0__namespace.ɵɵtemplate(8, DateComponent_ng_template_8_Template, 2, 8, "ng-template", 8);
|
|
1971
2117
|
}
|
|
1972
2118
|
if (rf & 2) {
|
|
1973
|
-
i0__namespace.ɵɵ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);
|
|
2119
|
+
i0__namespace.ɵɵ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);
|
|
1974
2120
|
i0__namespace.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey)("aria-label", ctx.hint);
|
|
1975
|
-
i0__namespace.ɵɵadvance(
|
|
2121
|
+
i0__namespace.ɵɵadvance(3);
|
|
1976
2122
|
i0__namespace.ɵɵproperty("tabindex", ctx.loadNativeDateInput ? "-1" : ctx.tabindex)("disabled", ctx.disabled || ctx.readonly);
|
|
1977
2123
|
i0__namespace.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput)("aria-label", ctx.displayValue ? "Change Date " + ctx.displayValue : "Choose date by pressing enter");
|
|
1978
2124
|
i0__namespace.ɵɵadvance(3);
|
|
@@ -1981,7 +2127,7 @@
|
|
|
1981
2127
|
i0__namespace.ɵɵadvance(2);
|
|
1982
2128
|
i0__namespace.ɵɵproperty("ngIf", ctx.loadNativeDateInput);
|
|
1983
2129
|
}
|
|
1984
|
-
}, dependencies: [i2__namespace.NgIf, i3__namespace.BsDatepickerDirective, i3__namespace.BsDatepickerInputDirective, DateTimePickerComponent], encapsulation: 2 });
|
|
2130
|
+
}, dependencies: [i2__namespace.NgIf, i3__namespace.BsDatepickerDirective, i3__namespace.BsDatepickerInputDirective, i4__namespace.IMaskDirective, DateTimePickerComponent], encapsulation: 2 });
|
|
1985
2131
|
(function () {
|
|
1986
2132
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(DateComponent, [{
|
|
1987
2133
|
type: i0.Component,
|
|
@@ -1989,7 +2135,7 @@
|
|
|
1989
2135
|
base.provideAs(DateComponent, i5.NG_VALUE_ACCESSOR, true),
|
|
1990
2136
|
base.provideAs(DateComponent, i5.NG_VALIDATORS, true),
|
|
1991
2137
|
base.provideAsWidgetRef(DateComponent)
|
|
1992
|
-
], 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" }]
|
|
2138
|
+
], 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 (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" }]
|
|
1993
2139
|
}], function () { return [{ type: i0__namespace.Injector }, { type: i0__namespace.ChangeDetectorRef }, { type: i1$1__namespace.AppDefaults }]; }, { bsDatePickerDirective: [{
|
|
1994
2140
|
type: i0.ViewChild,
|
|
1995
2141
|
args: [i3.BsDatepickerDirective]
|
|
@@ -2518,7 +2664,7 @@
|
|
|
2518
2664
|
i0__namespace.ɵɵadvance(3);
|
|
2519
2665
|
i0__namespace.ɵɵproperty("ngIf", ctx.loadNativeDateInput);
|
|
2520
2666
|
}
|
|
2521
|
-
}, dependencies: [i2__namespace.NgIf, i3__namespace.BsDatepickerDirective, i3__namespace.BsDatepickerInputDirective,
|
|
2667
|
+
}, dependencies: [i2__namespace.NgIf, i3__namespace.BsDatepickerDirective, i3__namespace.BsDatepickerInputDirective, i4$1__namespace.BsDropdownMenuDirective, i4$1__namespace.BsDropdownDirective, i5__namespace.NgControlStatus, i5__namespace.NgModel, i6__namespace.TimepickerComponent, DateTimePickerComponent], encapsulation: 2 });
|
|
2522
2668
|
(function () {
|
|
2523
2669
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(DatetimeComponent, [{
|
|
2524
2670
|
type: i0.Component,
|
|
@@ -2917,7 +3063,7 @@
|
|
|
2917
3063
|
i0__namespace.ɵɵadvance(3);
|
|
2918
3064
|
i0__namespace.ɵɵproperty("ngIf", ctx.loadNativeDateInput);
|
|
2919
3065
|
}
|
|
2920
|
-
}, dependencies: [i2__namespace.NgIf,
|
|
3066
|
+
}, dependencies: [i2__namespace.NgIf, i4$1__namespace.BsDropdownMenuDirective, i4$1__namespace.BsDropdownDirective, i5__namespace.NgControlStatus, i5__namespace.NgModel, i6__namespace.TimepickerComponent, DateTimePickerComponent], encapsulation: 2 });
|
|
2921
3067
|
(function () {
|
|
2922
3068
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(TimeComponent, [{
|
|
2923
3069
|
type: i0.Component,
|
|
@@ -2945,10 +3091,11 @@
|
|
|
2945
3091
|
EpochModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: EpochModule });
|
|
2946
3092
|
EpochModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [i2.CommonModule,
|
|
2947
3093
|
i3.BsDatepickerModule,
|
|
2948
|
-
i4.BsDropdownModule,
|
|
3094
|
+
i4$1.BsDropdownModule,
|
|
2949
3095
|
i5.FormsModule,
|
|
2950
3096
|
i6.TimepickerModule,
|
|
2951
|
-
base.WmComponentsModule
|
|
3097
|
+
base.WmComponentsModule,
|
|
3098
|
+
i4.IMaskModule] });
|
|
2952
3099
|
(function () {
|
|
2953
3100
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(EpochModule, [{
|
|
2954
3101
|
type: i0.NgModule,
|
|
@@ -2956,10 +3103,11 @@
|
|
|
2956
3103
|
imports: [
|
|
2957
3104
|
i2.CommonModule,
|
|
2958
3105
|
i3.BsDatepickerModule,
|
|
2959
|
-
i4.BsDropdownModule,
|
|
3106
|
+
i4$1.BsDropdownModule,
|
|
2960
3107
|
i5.FormsModule,
|
|
2961
3108
|
i6.TimepickerModule,
|
|
2962
|
-
base.WmComponentsModule
|
|
3109
|
+
base.WmComponentsModule,
|
|
3110
|
+
i4.IMaskModule
|
|
2963
3111
|
],
|
|
2964
3112
|
declarations: [...components],
|
|
2965
3113
|
exports: [...components]
|
|
@@ -2975,10 +3123,11 @@
|
|
|
2975
3123
|
PickerComponent,
|
|
2976
3124
|
PickerGroupComponent], imports: [i2.CommonModule,
|
|
2977
3125
|
i3.BsDatepickerModule,
|
|
2978
|
-
i4.BsDropdownModule,
|
|
3126
|
+
i4$1.BsDropdownModule,
|
|
2979
3127
|
i5.FormsModule,
|
|
2980
3128
|
i6.TimepickerModule,
|
|
2981
|
-
base.WmComponentsModule
|
|
3129
|
+
base.WmComponentsModule,
|
|
3130
|
+
i4.IMaskModule], exports: [DateComponent,
|
|
2982
3131
|
DatetimeComponent,
|
|
2983
3132
|
TimeComponent,
|
|
2984
3133
|
DateTimePickerComponent,
|
|
@@ -21,6 +21,94 @@ export declare class DateComponent extends BaseDateTimeComponent {
|
|
|
21
21
|
get displayValue(): any;
|
|
22
22
|
get nativeDisplayValue(): any;
|
|
23
23
|
get datavalue(): any;
|
|
24
|
+
get mask(): false | {
|
|
25
|
+
mask?: undefined;
|
|
26
|
+
pattern?: undefined;
|
|
27
|
+
format?: undefined;
|
|
28
|
+
parse?: undefined;
|
|
29
|
+
blocks?: undefined;
|
|
30
|
+
autofix?: undefined;
|
|
31
|
+
lazy?: undefined;
|
|
32
|
+
overwrite?: undefined;
|
|
33
|
+
skipInvalid?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
mask: DateConstructor;
|
|
36
|
+
pattern: any;
|
|
37
|
+
format: (date: any) => any;
|
|
38
|
+
parse: (str: any) => any;
|
|
39
|
+
blocks: {
|
|
40
|
+
YYYY: {
|
|
41
|
+
mask: typeof import("imask").default.MaskedRange;
|
|
42
|
+
from: number;
|
|
43
|
+
to: number;
|
|
44
|
+
placeholderChar: string;
|
|
45
|
+
maxLength: number;
|
|
46
|
+
};
|
|
47
|
+
YY: {
|
|
48
|
+
mask: typeof import("imask").default.MaskedRange;
|
|
49
|
+
from: number;
|
|
50
|
+
to: number;
|
|
51
|
+
placeholderChar: string;
|
|
52
|
+
maxLength: number;
|
|
53
|
+
};
|
|
54
|
+
M: {
|
|
55
|
+
mask: typeof import("imask").default.MaskedRange;
|
|
56
|
+
from: number;
|
|
57
|
+
to: number;
|
|
58
|
+
placeholderChar: string;
|
|
59
|
+
maxLength: number;
|
|
60
|
+
};
|
|
61
|
+
MM: {
|
|
62
|
+
mask: typeof import("imask").default.MaskedRange;
|
|
63
|
+
from: number;
|
|
64
|
+
to: number;
|
|
65
|
+
placeholderChar: string;
|
|
66
|
+
maxLength: number;
|
|
67
|
+
};
|
|
68
|
+
MMM: {
|
|
69
|
+
mask: typeof import("imask").default.MaskedEnum;
|
|
70
|
+
enum: string[];
|
|
71
|
+
placeholderChar: string;
|
|
72
|
+
maxLength: number;
|
|
73
|
+
};
|
|
74
|
+
MMMM: {
|
|
75
|
+
mask: typeof import("imask").default.MaskedEnum;
|
|
76
|
+
enum: string[];
|
|
77
|
+
placeholderChar: string;
|
|
78
|
+
minLength: number;
|
|
79
|
+
};
|
|
80
|
+
DD: {
|
|
81
|
+
mask: typeof import("imask").default.MaskedRange;
|
|
82
|
+
from: number;
|
|
83
|
+
to: number;
|
|
84
|
+
placeholderChar: string;
|
|
85
|
+
maxLength: number;
|
|
86
|
+
};
|
|
87
|
+
D: {
|
|
88
|
+
mask: typeof import("imask").default.MaskedRange;
|
|
89
|
+
from: number;
|
|
90
|
+
to: number;
|
|
91
|
+
placeholderChar: string;
|
|
92
|
+
maxLength: number;
|
|
93
|
+
};
|
|
94
|
+
ddd: {
|
|
95
|
+
mask: typeof import("imask").default.MaskedEnum;
|
|
96
|
+
enum: string[];
|
|
97
|
+
placeholderChar: string;
|
|
98
|
+
maxLength: number;
|
|
99
|
+
};
|
|
100
|
+
dddd: {
|
|
101
|
+
mask: typeof import("imask").default.MaskedEnum;
|
|
102
|
+
enum: string[];
|
|
103
|
+
placeholderChar: string;
|
|
104
|
+
minLength: number;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
autofix: boolean;
|
|
108
|
+
lazy: boolean;
|
|
109
|
+
overwrite: boolean;
|
|
110
|
+
skipInvalid: boolean;
|
|
111
|
+
};
|
|
24
112
|
set datavalue(newVal: any);
|
|
25
113
|
protected bsDatePickerDirective: any;
|
|
26
114
|
constructor(inj: Injector, cdRef: ChangeDetectorRef, appDefaults: AppDefaults);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import IMask from "imask";
|
|
2
|
+
export declare function validateTheMaskedDate(format: any): {
|
|
3
|
+
mask?: undefined;
|
|
4
|
+
pattern?: undefined;
|
|
5
|
+
format?: undefined;
|
|
6
|
+
parse?: undefined;
|
|
7
|
+
blocks?: undefined;
|
|
8
|
+
autofix?: undefined;
|
|
9
|
+
lazy?: undefined;
|
|
10
|
+
overwrite?: undefined;
|
|
11
|
+
skipInvalid?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
mask: DateConstructor;
|
|
14
|
+
pattern: any;
|
|
15
|
+
format: (date: any) => any;
|
|
16
|
+
parse: (str: any) => any;
|
|
17
|
+
blocks: {
|
|
18
|
+
YYYY: {
|
|
19
|
+
mask: typeof IMask.MaskedRange;
|
|
20
|
+
from: number;
|
|
21
|
+
to: number;
|
|
22
|
+
placeholderChar: string;
|
|
23
|
+
maxLength: number;
|
|
24
|
+
};
|
|
25
|
+
YY: {
|
|
26
|
+
mask: typeof IMask.MaskedRange;
|
|
27
|
+
from: number;
|
|
28
|
+
to: number;
|
|
29
|
+
placeholderChar: string;
|
|
30
|
+
maxLength: number;
|
|
31
|
+
};
|
|
32
|
+
M: {
|
|
33
|
+
mask: typeof IMask.MaskedRange;
|
|
34
|
+
from: number;
|
|
35
|
+
to: number;
|
|
36
|
+
placeholderChar: string;
|
|
37
|
+
maxLength: number;
|
|
38
|
+
};
|
|
39
|
+
MM: {
|
|
40
|
+
mask: typeof IMask.MaskedRange;
|
|
41
|
+
from: number;
|
|
42
|
+
to: number;
|
|
43
|
+
placeholderChar: string;
|
|
44
|
+
maxLength: number;
|
|
45
|
+
};
|
|
46
|
+
MMM: {
|
|
47
|
+
mask: typeof IMask.MaskedEnum;
|
|
48
|
+
enum: string[];
|
|
49
|
+
placeholderChar: string;
|
|
50
|
+
maxLength: number;
|
|
51
|
+
};
|
|
52
|
+
MMMM: {
|
|
53
|
+
mask: typeof IMask.MaskedEnum;
|
|
54
|
+
enum: string[];
|
|
55
|
+
placeholderChar: string;
|
|
56
|
+
minLength: number;
|
|
57
|
+
};
|
|
58
|
+
DD: {
|
|
59
|
+
mask: typeof IMask.MaskedRange;
|
|
60
|
+
from: number;
|
|
61
|
+
to: number;
|
|
62
|
+
placeholderChar: string;
|
|
63
|
+
maxLength: number;
|
|
64
|
+
};
|
|
65
|
+
D: {
|
|
66
|
+
mask: typeof IMask.MaskedRange;
|
|
67
|
+
from: number;
|
|
68
|
+
to: number;
|
|
69
|
+
placeholderChar: string;
|
|
70
|
+
maxLength: number;
|
|
71
|
+
};
|
|
72
|
+
ddd: {
|
|
73
|
+
mask: typeof IMask.MaskedEnum;
|
|
74
|
+
enum: string[];
|
|
75
|
+
placeholderChar: string;
|
|
76
|
+
maxLength: number;
|
|
77
|
+
};
|
|
78
|
+
dddd: {
|
|
79
|
+
mask: typeof IMask.MaskedEnum;
|
|
80
|
+
enum: string[];
|
|
81
|
+
placeholderChar: string;
|
|
82
|
+
minLength: number;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
autofix: boolean;
|
|
86
|
+
lazy: boolean;
|
|
87
|
+
overwrite: boolean;
|
|
88
|
+
skipInvalid: boolean;
|
|
89
|
+
};
|
|
@@ -10,8 +10,9 @@ import * as i8 from "ngx-bootstrap/dropdown";
|
|
|
10
10
|
import * as i9 from "@angular/forms";
|
|
11
11
|
import * as i10 from "ngx-bootstrap/timepicker";
|
|
12
12
|
import * as i11 from "@wm/components/base";
|
|
13
|
+
import * as i12 from "angular-imask";
|
|
13
14
|
export declare class EpochModule {
|
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<EpochModule, never>;
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<EpochModule, [typeof i1.DateComponent, typeof i2.DatetimeComponent, typeof i3.TimeComponent, typeof i4.DateTimePickerComponent, typeof i4.TimePickerComponent, typeof i5.PickerComponent, typeof i5.PickerGroupComponent], [typeof i6.CommonModule, typeof i7.BsDatepickerModule, typeof i8.BsDropdownModule, typeof i9.FormsModule, typeof i10.TimepickerModule, typeof i11.WmComponentsModule], [typeof i1.DateComponent, typeof i2.DatetimeComponent, typeof i3.TimeComponent, typeof i4.DateTimePickerComponent, typeof i4.TimePickerComponent, typeof i5.PickerComponent, typeof i5.PickerGroupComponent]>;
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EpochModule, [typeof i1.DateComponent, typeof i2.DatetimeComponent, typeof i3.TimeComponent, typeof i4.DateTimePickerComponent, typeof i4.TimePickerComponent, typeof i5.PickerComponent, typeof i5.PickerGroupComponent], [typeof i6.CommonModule, typeof i7.BsDatepickerModule, typeof i8.BsDropdownModule, typeof i9.FormsModule, typeof i10.TimepickerModule, typeof i11.WmComponentsModule, typeof i12.IMaskModule], [typeof i1.DateComponent, typeof i2.DatetimeComponent, typeof i3.TimeComponent, typeof i4.DateTimePickerComponent, typeof i4.TimePickerComponent, typeof i5.PickerComponent, typeof i5.PickerGroupComponent]>;
|
|
16
17
|
static ɵinj: i0.ɵɵInjectorDeclaration<EpochModule>;
|
|
17
18
|
}
|