@wavemaker/app-ng-runtime 11.5.2-next.141145 → 11.5.2-next.141147
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/basic/rich-text-editor/bundles/index.umd.js +9 -9
- app-ng-runtime/components/basic/rich-text-editor/esm2022/rich-text-editor.component.mjs +10 -10
- app-ng-runtime/components/basic/rich-text-editor/fesm2022/index.mjs +9 -9
- app-ng-runtime/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +173 -40
- app-ng-runtime/components/input/epoch/date/date.component.d.ts +8 -2
- app-ng-runtime/components/input/epoch/date/imaskUtil.d.ts +92 -0
- app-ng-runtime/components/input/epoch/epoch.module.d.ts +2 -1
- app-ng-runtime/components/input/epoch/esm2022/date/date.component.mjs +52 -26
- app-ng-runtime/components/input/epoch/esm2022/date/date.props.mjs +3 -2
- app-ng-runtime/components/input/epoch/esm2022/date/imaskUtil.mjs +106 -0
- app-ng-runtime/components/input/epoch/esm2022/epoch.module.mjs +8 -4
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs +166 -31
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/core/bundles/index.umd.js +0 -23
- app-ng-runtime/core/esm2022/public_api.mjs +1 -2
- app-ng-runtime/core/fesm2022/index.mjs +3 -25
- app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/core/public_api.d.ts +0 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/runtime/base/bundles/index.umd.js +3 -5
- app-ng-runtime/runtime/base/components/app-component/app.component.d.ts +1 -3
- app-ng-runtime/runtime/base/esm2022/components/app-component/app.component.mjs +5 -7
- app-ng-runtime/runtime/base/fesm2022/index.mjs +3 -5
- app-ng-runtime/runtime/base/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/scripts/datatable/datatable.js +2 -2
- app-ng-runtime/core/esm2022/services/custom-icons-loader.service.mjs +0 -26
- app-ng-runtime/core/services/custom-icons-loader.service.d.ts +0 -7
|
@@ -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 { IMaskDirective, IMaskModule } from 'angular-imask';
|
|
18
21
|
|
|
19
22
|
const _c0$4 = ["*"];
|
|
20
23
|
function PickerComponent_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -1660,28 +1663,135 @@ const dateProps = new Map([
|
|
|
1660
1663
|
['clearbutton', { value: true, ...PROP_BOOLEAN }],
|
|
1661
1664
|
['adaptiveposition', { value: true, ...PROP_BOOLEAN }],
|
|
1662
1665
|
['todaybuttonlabel', { value: 'LABEL_TODAY_DATE', ...PROP_STRING }],
|
|
1663
|
-
['clearbuttonlabel', { value: 'LABEL_CLEAR_DATE', ...PROP_STRING }]
|
|
1666
|
+
['clearbuttonlabel', { value: 'LABEL_CLEAR_DATE', ...PROP_STRING }],
|
|
1667
|
+
['showdateformatasplaceholder', PROP_BOOLEAN],
|
|
1664
1668
|
]);
|
|
1665
1669
|
const registerProps$2 = () => {
|
|
1666
1670
|
register('wm-date', dateProps);
|
|
1667
1671
|
registerFormWidget(FormWidgetType.DATE, new Map(dateProps));
|
|
1668
1672
|
};
|
|
1669
1673
|
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1674
|
+
function validateTheMaskedDate(format, locale) {
|
|
1675
|
+
if (format == 'timestamp') {
|
|
1676
|
+
return false;
|
|
1677
|
+
}
|
|
1678
|
+
const modifiedFormat = format.toUpperCase().replace(/E/g, 'd');
|
|
1679
|
+
const parseFn = str => {
|
|
1680
|
+
return moment(str, modifiedFormat).toDate();
|
|
1681
|
+
};
|
|
1682
|
+
const formatFn = date => {
|
|
1683
|
+
return moment(date, modifiedFormat).format(modifiedFormat);
|
|
1684
|
+
};
|
|
1685
|
+
return {
|
|
1686
|
+
mask: Date,
|
|
1687
|
+
pattern: modifiedFormat,
|
|
1688
|
+
format: formatFn,
|
|
1689
|
+
parse: parseFn,
|
|
1690
|
+
blocks: {
|
|
1691
|
+
YYYY: {
|
|
1692
|
+
mask: IMask.MaskedRange,
|
|
1693
|
+
from: 1900,
|
|
1694
|
+
to: 9999,
|
|
1695
|
+
placeholderChar: 'Y',
|
|
1696
|
+
maxLength: 4,
|
|
1697
|
+
},
|
|
1698
|
+
YYY: {
|
|
1699
|
+
mask: IMask.MaskedRange,
|
|
1700
|
+
from: 900,
|
|
1701
|
+
to: 999,
|
|
1702
|
+
placeholderChar: 'Y',
|
|
1703
|
+
maxLength: 3,
|
|
1704
|
+
},
|
|
1705
|
+
YY: {
|
|
1706
|
+
mask: IMask.MaskedRange,
|
|
1707
|
+
from: 0,
|
|
1708
|
+
to: 99,
|
|
1709
|
+
placeholderChar: 'Y',
|
|
1710
|
+
maxLength: 2,
|
|
1711
|
+
},
|
|
1712
|
+
Y: {
|
|
1713
|
+
mask: IMask.MaskedRange,
|
|
1714
|
+
from: 1900,
|
|
1715
|
+
to: 9999,
|
|
1716
|
+
placeholderChar: 'Y',
|
|
1717
|
+
maxLength: 4,
|
|
1718
|
+
},
|
|
1719
|
+
M: {
|
|
1720
|
+
mask: IMask.MaskedRange,
|
|
1721
|
+
from: 1,
|
|
1722
|
+
to: 12,
|
|
1723
|
+
placeholderChar: 'M',
|
|
1724
|
+
maxLength: 2,
|
|
1725
|
+
},
|
|
1726
|
+
MM: {
|
|
1727
|
+
mask: IMask.MaskedRange,
|
|
1728
|
+
from: 1,
|
|
1729
|
+
to: 12,
|
|
1730
|
+
placeholderChar: 'M',
|
|
1731
|
+
maxLength: 2,
|
|
1732
|
+
},
|
|
1733
|
+
MMM: {
|
|
1734
|
+
mask: IMask.MaskedEnum,
|
|
1735
|
+
enum: Array.from({ length: 12 }, (_, i) => new Date(0, i).toLocaleString(locale, { month: 'short' })),
|
|
1736
|
+
placeholderChar: 'M',
|
|
1737
|
+
maxLength: 3,
|
|
1738
|
+
},
|
|
1739
|
+
MMMM: {
|
|
1740
|
+
mask: IMask.MaskedEnum,
|
|
1741
|
+
enum: Array.from({ length: 12 }, (_, i) => new Date(0, i).toLocaleString(locale, { month: 'long' })),
|
|
1742
|
+
placeholderChar: "M",
|
|
1743
|
+
maxLength: 4
|
|
1744
|
+
},
|
|
1745
|
+
DD: {
|
|
1746
|
+
mask: IMask.MaskedRange,
|
|
1747
|
+
from: 1,
|
|
1748
|
+
to: 31,
|
|
1749
|
+
placeholderChar: 'D',
|
|
1750
|
+
maxLength: 2,
|
|
1751
|
+
},
|
|
1752
|
+
D: {
|
|
1753
|
+
mask: IMask.MaskedRange,
|
|
1754
|
+
from: 1,
|
|
1755
|
+
to: 31,
|
|
1756
|
+
placeholderChar: 'D',
|
|
1757
|
+
maxLength: 2,
|
|
1758
|
+
},
|
|
1759
|
+
ddd: {
|
|
1760
|
+
mask: IMask.MaskedEnum,
|
|
1761
|
+
enum: Array.from({ length: 7 }, (_, i) => new Date(0, 0, i + 1).toLocaleString(locale, { weekday: 'short' })),
|
|
1762
|
+
placeholderChar: 'E',
|
|
1763
|
+
maxLength: 3,
|
|
1764
|
+
},
|
|
1765
|
+
dddd: {
|
|
1766
|
+
mask: IMask.MaskedEnum,
|
|
1767
|
+
enum: Array.from({ length: 7 }, (_, i) => new Date(0, 0, i + 1).toLocaleString(locale, { weekday: 'long' })),
|
|
1768
|
+
placeholderChar: 'E',
|
|
1769
|
+
minLength: 6,
|
|
1770
|
+
},
|
|
1771
|
+
},
|
|
1772
|
+
autofix: true,
|
|
1773
|
+
lazy: false,
|
|
1774
|
+
overwrite: true,
|
|
1775
|
+
skipInvalid: true
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
const _c0$2 = ["dateInput"];
|
|
1780
|
+
const _c1 = ["wmDate", ""];
|
|
1781
|
+
function DateComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
|
|
1782
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
1783
|
+
i0.ɵɵelementStart(0, "wm-datetimepicker", 9);
|
|
1784
|
+
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)); });
|
|
1675
1785
|
i0.ɵɵelementEnd();
|
|
1676
|
-
i0.ɵɵelementStart(1, "div",
|
|
1677
|
-
i0.ɵɵlistener("click", function
|
|
1786
|
+
i0.ɵɵelementStart(1, "div", 10);
|
|
1787
|
+
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)); });
|
|
1678
1788
|
i0.ɵɵelementEnd();
|
|
1679
1789
|
} if (rf & 2) {
|
|
1680
|
-
const
|
|
1681
|
-
i0.ɵɵproperty("config",
|
|
1790
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
1791
|
+
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);
|
|
1682
1792
|
i0.ɵɵadvance(1);
|
|
1683
|
-
i0.ɵɵproperty("tabindex",
|
|
1684
|
-
i0.ɵɵattribute("aria-label",
|
|
1793
|
+
i0.ɵɵproperty("tabindex", ctx_r2.tabindex || 0);
|
|
1794
|
+
i0.ɵɵattribute("aria-label", ctx_r2.displayValue ? "Change Date " + ctx_r2.displayValue : ctx_r2.hint || "Choose Date");
|
|
1685
1795
|
} }
|
|
1686
1796
|
const CURRENT_DATE$1 = 'CURRENT_DATE';
|
|
1687
1797
|
const DEFAULT_CLS$2 = 'app-date input-group';
|
|
@@ -1732,6 +1842,7 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1732
1842
|
this.appDefaults = appDefaults;
|
|
1733
1843
|
this.isOpen = false;
|
|
1734
1844
|
this.isEnterPressedOnDateInput = false;
|
|
1845
|
+
this.showdateformatasplaceholder = false;
|
|
1735
1846
|
styler(this.nativeElement, this);
|
|
1736
1847
|
this.dateContainerCls = `app-date-${this.widgetId}`;
|
|
1737
1848
|
this._dateOptions.containerClass = `app-date ${this.dateContainerCls}`;
|
|
@@ -1744,6 +1855,7 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1744
1855
|
* This is an internal method triggered when the date input changes
|
|
1745
1856
|
*/
|
|
1746
1857
|
onDisplayDateChange($event, isNativePicker = false) {
|
|
1858
|
+
this.updateIMask();
|
|
1747
1859
|
if (this.isEnterPressedOnDateInput) {
|
|
1748
1860
|
this.isEnterPressedOnDateInput = false;
|
|
1749
1861
|
return;
|
|
@@ -1772,6 +1884,7 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1772
1884
|
}
|
|
1773
1885
|
if (newVal) {
|
|
1774
1886
|
this.bsDataValue = newVal;
|
|
1887
|
+
this.updateIMask();
|
|
1775
1888
|
}
|
|
1776
1889
|
else {
|
|
1777
1890
|
this.bsDataValue = undefined;
|
|
@@ -1784,6 +1897,7 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1784
1897
|
if (!this.bsDataValue) {
|
|
1785
1898
|
this.hightlightToday(this.activeDate);
|
|
1786
1899
|
}
|
|
1900
|
+
this.updateIMask();
|
|
1787
1901
|
// We are using the two input tags(To maintain the modal and proxy modal) for the date control.
|
|
1788
1902
|
// So actual bootstrap input target width we made it to 0, so bootstrap calculating the calendar container top position improperly.
|
|
1789
1903
|
// To fix the container top position set the width 1px;
|
|
@@ -1799,11 +1913,15 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1799
1913
|
adjustContainerRightEdges($('bs-datepicker-container'), this.nativeElement, this.bsDatePickerDirective._datepicker);
|
|
1800
1914
|
}
|
|
1801
1915
|
onInputBlur($event) {
|
|
1916
|
+
this.updateIMask();
|
|
1802
1917
|
if (!$($event.relatedTarget).hasClass('current-date')) {
|
|
1803
1918
|
this.invokeOnTouched();
|
|
1804
1919
|
this.invokeEventCallback('blur', { $event });
|
|
1805
1920
|
}
|
|
1806
1921
|
}
|
|
1922
|
+
updateIMask() {
|
|
1923
|
+
this.imask?.maskRef?.updateValue();
|
|
1924
|
+
}
|
|
1807
1925
|
hideDatepickerDropdown() {
|
|
1808
1926
|
this.invokeOnTouched();
|
|
1809
1927
|
this.isOpen = false;
|
|
@@ -1878,6 +1996,7 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1878
1996
|
this.invalidDateTimeFormat = false;
|
|
1879
1997
|
this.isEnterPressedOnDateInput = true;
|
|
1880
1998
|
this.bsDatePickerDirective.bsValue = event.target.value ? newVal : '';
|
|
1999
|
+
this.updateIMask();
|
|
1881
2000
|
}
|
|
1882
2001
|
this.toggleDpDropdown(event);
|
|
1883
2002
|
}
|
|
@@ -1905,32 +2024,42 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1905
2024
|
}
|
|
1906
2025
|
this.setDataValue(newVal);
|
|
1907
2026
|
}
|
|
2027
|
+
ngAfterViewInit() {
|
|
2028
|
+
super.ngAfterViewInit();
|
|
2029
|
+
this.imask.destroyMask();
|
|
2030
|
+
if (this.showdateformatasplaceholder && this.datepattern !== 'timestamp') {
|
|
2031
|
+
this.mask = validateTheMaskedDate(this.datepattern, this.selectedLocale);
|
|
2032
|
+
this.updateIMask();
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
1908
2035
|
static { this.ɵfac = function DateComponent_Factory(t) { return new (t || DateComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.AppDefaults)); }; }
|
|
1909
2036
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DateComponent, selectors: [["", "wmDate", ""]], viewQuery: function DateComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1910
2037
|
i0.ɵɵviewQuery(BsDatepickerDirective, 5);
|
|
2038
|
+
i0.ɵɵviewQuery(_c0$2, 5, IMaskDirective);
|
|
1911
2039
|
} if (rf & 2) {
|
|
1912
2040
|
let _t;
|
|
1913
2041
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.bsDatePickerDirective = _t.first);
|
|
2042
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.imask = _t.first);
|
|
1914
2043
|
} }, features: [i0.ɵɵProvidersFeature([
|
|
1915
2044
|
provideAs(DateComponent, NG_VALUE_ACCESSOR, true),
|
|
1916
2045
|
provideAs(DateComponent, NG_VALIDATORS, true),
|
|
1917
2046
|
provideAsWidgetRef(DateComponent)
|
|
1918
|
-
]), i0.ɵɵInheritDefinitionFeature], attrs:
|
|
1919
|
-
i0.ɵɵelementStart(0, "input", 0);
|
|
1920
|
-
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();
|
|
2047
|
+
]), i0.ɵɵInheritDefinitionFeature], attrs: _c1, 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) {
|
|
2048
|
+
i0.ɵɵelementStart(0, "input", 0, 1);
|
|
2049
|
+
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(); ctx.invokeOnFocus($event); return ctx.updateIMask(); })("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); });
|
|
1921
2050
|
i0.ɵɵelementEnd();
|
|
1922
|
-
i0.ɵɵelementStart(
|
|
1923
|
-
i0.ɵɵlistener("click", function
|
|
1924
|
-
i0.ɵɵelement(
|
|
2051
|
+
i0.ɵɵelementStart(2, "span", 2)(3, "button", 3);
|
|
2052
|
+
i0.ɵɵlistener("click", function DateComponent_Template_button_click_3_listener($event) { return ctx.toggleDpDropdown($event, false); });
|
|
2053
|
+
i0.ɵɵelement(4, "i", 4);
|
|
1925
2054
|
i0.ɵɵelementEnd()();
|
|
1926
|
-
i0.ɵɵelementStart(
|
|
1927
|
-
i0.ɵɵlistener("onShown", function
|
|
2055
|
+
i0.ɵɵelementStart(5, "div", 5)(6, "input", 6, 7);
|
|
2056
|
+
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); });
|
|
1928
2057
|
i0.ɵɵelementEnd()();
|
|
1929
|
-
i0.ɵɵtemplate(
|
|
2058
|
+
i0.ɵɵtemplate(8, DateComponent_ng_template_8_Template, 2, 8, "ng-template", 8);
|
|
1930
2059
|
} if (rf & 2) {
|
|
1931
|
-
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);
|
|
2060
|
+
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);
|
|
1932
2061
|
i0.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey)("aria-label", ctx.hint);
|
|
1933
|
-
i0.ɵɵadvance(
|
|
2062
|
+
i0.ɵɵadvance(3);
|
|
1934
2063
|
i0.ɵɵproperty("tabindex", ctx.loadNativeDateInput ? "-1" : ctx.tabindex)("disabled", ctx.disabled || ctx.readonly);
|
|
1935
2064
|
i0.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput)("aria-label", ctx.displayValue ? "Change Date " + ctx.displayValue : "Choose date by pressing enter");
|
|
1936
2065
|
i0.ɵɵadvance(3);
|
|
@@ -1938,7 +2067,7 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1938
2067
|
i0.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput);
|
|
1939
2068
|
i0.ɵɵadvance(2);
|
|
1940
2069
|
i0.ɵɵproperty("ngIf", ctx.loadNativeDateInput);
|
|
1941
|
-
} }, dependencies: [i2.NgIf, i3.BsDatepickerDirective, i3.BsDatepickerInputDirective, DateTimePickerComponent], encapsulation: 2 }); }
|
|
2070
|
+
} }, dependencies: [i2.NgIf, i3.BsDatepickerDirective, i3.BsDatepickerInputDirective, i4.IMaskDirective, DateTimePickerComponent], encapsulation: 2 }); }
|
|
1942
2071
|
}
|
|
1943
2072
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DateComponent, [{
|
|
1944
2073
|
type: Component,
|
|
@@ -1946,10 +2075,13 @@ class DateComponent extends BaseDateTimeComponent {
|
|
|
1946
2075
|
provideAs(DateComponent, NG_VALUE_ACCESSOR, true),
|
|
1947
2076
|
provideAs(DateComponent, NG_VALIDATORS, true),
|
|
1948
2077
|
provideAsWidgetRef(DateComponent)
|
|
1949
|
-
], 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)
|
|
2078
|
+
], template: " <input class=\"form-control app-textbox app-dateinput display-input\"\n focus-target\n type=\"text\"\n [name]=\"name\"\n #dateInput\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); updateIMask()\"\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 || '.wm-app'\"\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" }]
|
|
1950
2079
|
}], function () { return [{ type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: i1$1.AppDefaults }]; }, { bsDatePickerDirective: [{
|
|
1951
2080
|
type: ViewChild,
|
|
1952
2081
|
args: [BsDatepickerDirective]
|
|
2082
|
+
}], imask: [{
|
|
2083
|
+
type: ViewChild,
|
|
2084
|
+
args: ['dateInput', { read: IMaskDirective }]
|
|
1953
2085
|
}] }); })();
|
|
1954
2086
|
|
|
1955
2087
|
const dateTimeProps = new Map([
|
|
@@ -2460,7 +2592,7 @@ class DatetimeComponent extends BaseDateTimeComponent {
|
|
|
2460
2592
|
i0.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput);
|
|
2461
2593
|
i0.ɵɵadvance(3);
|
|
2462
2594
|
i0.ɵɵproperty("ngIf", ctx.loadNativeDateInput);
|
|
2463
|
-
} }, dependencies: [i2.NgIf, i3.BsDatepickerDirective, i3.BsDatepickerInputDirective, i4.BsDropdownMenuDirective, i4.BsDropdownDirective, i5.NgControlStatus, i5.NgModel, i6.TimepickerComponent, DateTimePickerComponent], encapsulation: 2 }); }
|
|
2595
|
+
} }, dependencies: [i2.NgIf, i3.BsDatepickerDirective, i3.BsDatepickerInputDirective, i4$1.BsDropdownMenuDirective, i4$1.BsDropdownDirective, i5.NgControlStatus, i5.NgModel, i6.TimepickerComponent, DateTimePickerComponent], encapsulation: 2 }); }
|
|
2464
2596
|
}
|
|
2465
2597
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatetimeComponent, [{
|
|
2466
2598
|
type: Component,
|
|
@@ -2850,7 +2982,7 @@ class TimeComponent extends BaseDateTimeComponent {
|
|
|
2850
2982
|
i0.ɵɵproperty("tabindex", ctx.tabindex)("disabled", ctx.disabled || ctx.readonly || ctx.isCurrentTime);
|
|
2851
2983
|
i0.ɵɵadvance(3);
|
|
2852
2984
|
i0.ɵɵproperty("ngIf", ctx.loadNativeDateInput);
|
|
2853
|
-
} }, dependencies: [i2.NgIf, i4.BsDropdownMenuDirective, i4.BsDropdownDirective, i5.NgControlStatus, i5.NgModel, i6.TimepickerComponent, DateTimePickerComponent], encapsulation: 2 }); }
|
|
2985
|
+
} }, dependencies: [i2.NgIf, i4$1.BsDropdownMenuDirective, i4$1.BsDropdownDirective, i5.NgControlStatus, i5.NgModel, i6.TimepickerComponent, DateTimePickerComponent], encapsulation: 2 }); }
|
|
2854
2986
|
}
|
|
2855
2987
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimeComponent, [{
|
|
2856
2988
|
type: Component,
|
|
@@ -2879,7 +3011,8 @@ class EpochModule {
|
|
|
2879
3011
|
BsDropdownModule,
|
|
2880
3012
|
FormsModule,
|
|
2881
3013
|
TimepickerModule,
|
|
2882
|
-
WmComponentsModule
|
|
3014
|
+
WmComponentsModule,
|
|
3015
|
+
IMaskModule] }); }
|
|
2883
3016
|
}
|
|
2884
3017
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EpochModule, [{
|
|
2885
3018
|
type: NgModule,
|
|
@@ -2890,7 +3023,8 @@ class EpochModule {
|
|
|
2890
3023
|
BsDropdownModule,
|
|
2891
3024
|
FormsModule,
|
|
2892
3025
|
TimepickerModule,
|
|
2893
|
-
WmComponentsModule
|
|
3026
|
+
WmComponentsModule,
|
|
3027
|
+
IMaskModule
|
|
2894
3028
|
],
|
|
2895
3029
|
declarations: [...components],
|
|
2896
3030
|
exports: [...components]
|
|
@@ -2907,7 +3041,8 @@ class EpochModule {
|
|
|
2907
3041
|
BsDropdownModule,
|
|
2908
3042
|
FormsModule,
|
|
2909
3043
|
TimepickerModule,
|
|
2910
|
-
WmComponentsModule
|
|
3044
|
+
WmComponentsModule,
|
|
3045
|
+
IMaskModule], exports: [DateComponent,
|
|
2911
3046
|
DatetimeComponent,
|
|
2912
3047
|
TimeComponent,
|
|
2913
3048
|
DateTimePickerComponent,
|