@sumaris-net/ngx-components 1.14.3 → 1.15.2
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.
- package/bundles/sumaris-net.ngx-components.umd.js +358 -195
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +10 -0
- package/esm2015/src/app/shared/dates.js +6 -5
- package/esm2015/src/app/shared/material/datetime/material.date.js +133 -101
- package/esm2015/src/app/shared/material/datetime/material.datetime.js +58 -59
- package/esm2015/src/app/shared/material/datetime/testing/mat-date.test.js +109 -0
- package/esm2015/src/app/shared/material/material.testing.module.js +10 -1
- package/esm2015/src/app/shared/validator/validators.js +20 -9
- package/esm2015/sumaris-net.ngx-components.js +6 -5
- package/fesm2015/sumaris-net.ngx-components.js +341 -191
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/dates.d.ts +2 -1
- package/src/app/shared/material/datetime/material.date.d.ts +20 -14
- package/src/app/shared/material/datetime/material.datetime.d.ts +5 -5
- package/src/app/shared/material/datetime/testing/mat-date.test.d.ts +29 -0
- package/src/app/shared/validator/validators.d.ts +3 -1
- package/src/assets/i18n/en-US.json +1 -0
- package/src/assets/i18n/en.json +1 -0
- package/src/assets/i18n/fr.json +1 -0
- package/sumaris-net.ngx-components.d.ts +5 -4
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/table'), require('@angular/cdk/a11y'), require('@angular/cdk/overlay'), require('@angular/cdk/scrolling'), require('@angular/material/core'), require('@angular/material/table'), require('@angular/material/sort'), require('@angular/material/paginator'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/checkbox'), require('@angular/material/expansion'), require('@angular/material/toolbar'), require('@angular/material/icon'), require('@angular/material/button'), require('@angular/material/menu'), require('@angular/material/select'), require('@angular/material/card'), require('@angular/material/tabs'), require('@angular/material/stepper'), require('@angular/material/list'), require('@angular/material/button-toggle'), require('@angular/material/progress-spinner'), require('@angular/material/progress-bar'), require('@angular/material/radio'), require('@angular/material/badge'), require('@angular/material/slide-toggle'), require('@angular/material/dialog'), require('@angular/material/autocomplete'), require('@angular/forms'), require('rxjs'), require('rxjs/operators'), require('@ngx-translate/core'), require('@ionic/angular'), require('moment'), require('@angular/material-moment-adapter'), require('moment-timezone'), require('@ionic-native/keyboard/ngx'), require('angular2-text-mask'), require('ngx-material-timepicker'), require('@angular/material/datepicker'), require('@angular/animations'), require('@angular/material/divider'), require('@angular/material/tooltip'), require('@angular/material/chips'), require('@angular/router'), require('@angular/platform-browser'), require('@angular/common/http'), require('ngx-color-picker'), require('@ionic-native/native-audio/ngx'), require('@ionic-native/vibration/ngx'), require('@ionic-native/audio-management/ngx'), require('@ionic-native/native-audio/ngx/index'), require('@ionic-native/vibration/ngx/index'), require('@ionic-native/audio-management/ngx/index'), require('uuid/v4'), require('@angular/cdk/drag-drop'), require('ngx-markdown'), require('tweetnacl'), require('@ionic/storage'), require('zone.js/dist/zone-error'), require('@ionic-native/splash-screen/ngx'), require('@ionic-native/network/ngx'), require('ionic-cache'), require('ionic-cache/dist/cache.service'), require('@ionic-native/network/ngx/index'), require('@ionic-native/splash-screen/ngx/index'), require('@ionic-native/status-bar/ngx'), require('@angular/cdk/platform'), require('@ionic-native/in-app-browser/ngx'), require('@apollo/client/core'), require('apollo-angular'), require('@apollo/client/link/ws'), require('@apollo/client/utilities'), require('@apollo/client/link/retry'), require('apollo-link-queue'), require('apollo-link-serialize'), require('apollo-link-logger'), require('apollo-angular/http'), require('apollo3-cache-persist'), require('@ionic-native/downloader/ngx'), require('@ionic-native/status-bar/ngx/index'), require('@ionic-native/keyboard/ngx/index'), require('@ionic-native/in-app-browser/ngx/index'), require('@ionic-native/downloader/ngx/index'), require('@angular/cdk/text-field'), require('@e-is/ngx-material-table'), require('@angular/cdk/collections'), require('ngx-jdenticon'), require('tweetnacl-util'), require('scrypt-async'), require('hammerjs')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@sumaris-net/ngx-components', ['exports', '@angular/core', '@angular/common', '@angular/cdk/table', '@angular/cdk/a11y', '@angular/cdk/overlay', '@angular/cdk/scrolling', '@angular/material/core', '@angular/material/table', '@angular/material/sort', '@angular/material/paginator', '@angular/material/form-field', '@angular/material/input', '@angular/material/checkbox', '@angular/material/expansion', '@angular/material/toolbar', '@angular/material/icon', '@angular/material/button', '@angular/material/menu', '@angular/material/select', '@angular/material/card', '@angular/material/tabs', '@angular/material/stepper', '@angular/material/list', '@angular/material/button-toggle', '@angular/material/progress-spinner', '@angular/material/progress-bar', '@angular/material/radio', '@angular/material/badge', '@angular/material/slide-toggle', '@angular/material/dialog', '@angular/material/autocomplete', '@angular/forms', 'rxjs', 'rxjs/operators', '@ngx-translate/core', '@ionic/angular', 'moment', '@angular/material-moment-adapter', 'moment-timezone', '@ionic-native/keyboard/ngx', 'angular2-text-mask', 'ngx-material-timepicker', '@angular/material/datepicker', '@angular/animations', '@angular/material/divider', '@angular/material/tooltip', '@angular/material/chips', '@angular/router', '@angular/platform-browser', '@angular/common/http', 'ngx-color-picker', '@ionic-native/native-audio/ngx', '@ionic-native/vibration/ngx', '@ionic-native/audio-management/ngx', '@ionic-native/native-audio/ngx/index', '@ionic-native/vibration/ngx/index', '@ionic-native/audio-management/ngx/index', 'uuid/v4', '@angular/cdk/drag-drop', 'ngx-markdown', 'tweetnacl', '@ionic/storage', 'zone.js/dist/zone-error', '@ionic-native/splash-screen/ngx', '@ionic-native/network/ngx', 'ionic-cache', 'ionic-cache/dist/cache.service', '@ionic-native/network/ngx/index', '@ionic-native/splash-screen/ngx/index', '@ionic-native/status-bar/ngx', '@angular/cdk/platform', '@ionic-native/in-app-browser/ngx', '@apollo/client/core', 'apollo-angular', '@apollo/client/link/ws', '@apollo/client/utilities', '@apollo/client/link/retry', 'apollo-link-queue', 'apollo-link-serialize', 'apollo-link-logger', 'apollo-angular/http', 'apollo3-cache-persist', '@ionic-native/downloader/ngx', '@ionic-native/status-bar/ngx/index', '@ionic-native/keyboard/ngx/index', '@ionic-native/in-app-browser/ngx/index', '@ionic-native/downloader/ngx/index', '@angular/cdk/text-field', '@e-is/ngx-material-table', '@angular/cdk/collections', 'ngx-jdenticon', 'tweetnacl-util', 'scrypt-async', 'hammerjs'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["sumaris-net"] = global["sumaris-net"] || {}, global["sumaris-net"]["ngx-components"] = {}), global.ng.core, global.ng.common, global.ng.cdk.table, global.ng.cdk.a11y, global.ng.cdk.overlay, global.ng.cdk.scrolling, global.ng.material.core, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.material.formField, global.ng.material.input, global.ng.material.checkbox, global.ng.material.expansion, global.ng.material.toolbar, global.ng.material.icon, global.ng.material.button, global.ng.material.menu, global.ng.material.select, global.ng.material.card, global.ng.material.tabs, global.ng.material.stepper, global.ng.material.list, global.ng.material.buttonToggle, global.ng.material.progressSpinner, global.ng.material.progressBar, global.ng.material.radio, global.ng.material.badge, global.ng.material.slideToggle, global.ng.material.dialog, global.ng.material.autocomplete, global.ng.forms, global.rxjs, global.rxjs.operators, global["ngx-translate"].core, global.ionic.angular, global.moment, global.ng.materialMomentAdapter, global
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["sumaris-net"] = global["sumaris-net"] || {}, global["sumaris-net"]["ngx-components"] = {}), global.ng.core, global.ng.common, global.ng.cdk.table, global.ng.cdk.a11y, global.ng.cdk.overlay, global.ng.cdk.scrolling, global.ng.material.core, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.material.formField, global.ng.material.input, global.ng.material.checkbox, global.ng.material.expansion, global.ng.material.toolbar, global.ng.material.icon, global.ng.material.button, global.ng.material.menu, global.ng.material.select, global.ng.material.card, global.ng.material.tabs, global.ng.material.stepper, global.ng.material.list, global.ng.material.buttonToggle, global.ng.material.progressSpinner, global.ng.material.progressBar, global.ng.material.radio, global.ng.material.badge, global.ng.material.slideToggle, global.ng.material.dialog, global.ng.material.autocomplete, global.ng.forms, global.rxjs, global.rxjs.operators, global["ngx-translate"].core, global.ionic.angular, global.moment, global.ng.materialMomentAdapter, global["moment-timezone"], global["ionic-native"].keyboard.ngx, global["angular2-text-mask"], global["ngx-material-timepicker"], global.ng.material.datepicker, global.ng.animations, global.ng.material.divider, global.ng.material.tooltip, global.ng.material.chips, global.ng.router, global.ng.platformBrowser, global.ng.common.http, global["ngx-color-picker"], global["ionic-native"]["native-audio"].ngx, global["ionic-native"].vibration.ngx, global["ionic-native"]["audio-management"].ngx, global["ionic-native"]["native-audio"].ngx.index, global["ionic-native"].vibration.ngx.index, global["ionic-native"]["audio-management"].ngx.index, global.uuid.v4, global.ng.cdk.dragDrop, global["ngx-markdown"], global.tweetnacl, global.ionic.storage, null, global["ionic-native"]["splash-screen"].ngx, global["ionic-native"].network.ngx, global["ionic-cache"], global["ionic-cache/dist/cache"].service, global["ionic-native"].network.ngx.index, global["ionic-native"]["splash-screen"].ngx.index, global["ionic-native"]["status-bar"].ngx, global.ng.cdk.platform, global["ionic-native"]["in-app-browser"].ngx, global.apollo.client.core, global["apollo-angular"], global.apollo.client.link.ws, global.apollo.client.utilities, global.apollo.client.link.retry, global["apollo-link-queue"], global["apollo-link-serialize"], global["apollo-link-logger"], global["apollo-angular"].http, global["apollo3-cache-persist"], global["ionic-native"].downloader.ngx, global["ionic-native"]["status-bar"].ngx.index, global["ionic-native"].keyboard.ngx.index, global["ionic-native"]["in-app-browser"].ngx.index, global["ionic-native"].downloader.ngx.index, global.ng.cdk.textField, global["e-is"]["ngx-material-table"], global.ng.cdk.collections, global["ngx-jdenticon"]));
|
|
5
5
|
})(this, (function (exports, i0, i1$4, table$1, a11y, overlay, scrolling, i1$3, table, sort$1, paginator, formField, input, checkbox, expansion, toolbar, icon, button, menu, select, card, tabs, stepper, list, buttonToggle, progressSpinner, progressBar, radio, badge, slideToggle, i2, autocomplete, i1, rxjs, operators, i1$2, i1$5, momentImported, i1$1, momentTZImported, ngx, angular2TextMask, ngxMaterialTimepicker, datepicker, animations, divider, tooltip, chips, i3, i1$6, i2$1, ngxColorPicker, ngx$2, ngx$3, ngx$1, i2$2, i3$1, i4, uuidv4Imported, dragDrop, ngxMarkdown, tweetnacl, i3$2, zoneError, ngx$5, ngx$4, ionicCache, i6, i9, i10, ngx$7, i2$4, ngx$8, core, i2$3, ws, utilities, retry, QueueLink, SerializingLink, loggerLink, i3$3, apollo3CachePersist, ngx$6, i14, i15, i17, i18, textField, ngxMaterialTable, collections, ngxJdenticon) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -2092,7 +2092,7 @@
|
|
|
2092
2092
|
{ type: i1$2.TranslateService }
|
|
2093
2093
|
]; };
|
|
2094
2094
|
|
|
2095
|
-
var moment$
|
|
2095
|
+
var moment$7 = momentImported__namespace;
|
|
2096
2096
|
var DateDiffDurationPipe = /** @class */ (function () {
|
|
2097
2097
|
function DateDiffDurationPipe(dateAdapter, translate) {
|
|
2098
2098
|
var _this = this;
|
|
@@ -2109,10 +2109,10 @@
|
|
|
2109
2109
|
return this.format(startDate, endDate);
|
|
2110
2110
|
};
|
|
2111
2111
|
DateDiffDurationPipe.prototype.format = function (startDate, endDate) {
|
|
2112
|
-
var duration = moment$
|
|
2112
|
+
var duration = moment$7.duration(endDate.diff(startDate));
|
|
2113
2113
|
if (duration.asMinutes() < 0)
|
|
2114
2114
|
return '';
|
|
2115
|
-
var timeDuration = moment$
|
|
2115
|
+
var timeDuration = moment$7(0)
|
|
2116
2116
|
.hour(duration.hours())
|
|
2117
2117
|
.minute(duration.minutes());
|
|
2118
2118
|
var days = Math.floor(duration.asDays());
|
|
@@ -2572,7 +2572,7 @@
|
|
|
2572
2572
|
{ type: i0.Pipe, args: [{ name: 'fileSize' },] }
|
|
2573
2573
|
];
|
|
2574
2574
|
|
|
2575
|
-
var moment$
|
|
2575
|
+
var moment$6 = momentImported__namespace;
|
|
2576
2576
|
var tz = momentTZImported__namespace;
|
|
2577
2577
|
var DATE_UNIX_TIMESTAMP = 'X';
|
|
2578
2578
|
var DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
@@ -2601,18 +2601,19 @@
|
|
|
2601
2601
|
* Same implementation as the Java class Dates.resetTime() (see any SUMARiS like Pod)
|
|
2602
2602
|
* @param value
|
|
2603
2603
|
* @param timezone a timezone (see https://momentjs.com/timezone/)
|
|
2604
|
+
* @param keepLocalTime if true, only the timezone (and offset) is updated, keeping the local time same. Consequently, it will now point to a different point in time if the offset has changed.
|
|
2604
2605
|
*/
|
|
2605
|
-
DateUtils.resetTime = function (value, timezone) {
|
|
2606
|
+
DateUtils.resetTime = function (value, timezone, keepLocalTime) {
|
|
2606
2607
|
if (!value)
|
|
2607
2608
|
return undefined;
|
|
2608
2609
|
var date = fromDateISOString(value);
|
|
2609
2610
|
// No timezone
|
|
2610
2611
|
if (!timezone) {
|
|
2611
|
-
return
|
|
2612
|
+
return date.clone().startOf('day');
|
|
2612
2613
|
}
|
|
2613
2614
|
// Use timezone
|
|
2614
|
-
|
|
2615
|
-
.tz(timezone,
|
|
2615
|
+
return date.clone() // clone the original date
|
|
2616
|
+
.tz(timezone, keepLocalTime)
|
|
2616
2617
|
.startOf('day');
|
|
2617
2618
|
};
|
|
2618
2619
|
return DateUtils;
|
|
@@ -2635,32 +2636,32 @@
|
|
|
2635
2636
|
if (!value || momentImported.isMoment(value))
|
|
2636
2637
|
return value;
|
|
2637
2638
|
// Parse the input value, as a ISO date time
|
|
2638
|
-
var date = moment$
|
|
2639
|
+
var date = moment$6(value, DATE_ISO_PATTERN);
|
|
2639
2640
|
if (date.isValid())
|
|
2640
2641
|
return date;
|
|
2641
2642
|
// Not valid: trying to convert from unix timestamp
|
|
2642
2643
|
if (typeof value === 'string') {
|
|
2643
2644
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2644
2645
|
if (value.length === 10) {
|
|
2645
|
-
return moment$
|
|
2646
|
+
return moment$6(value, DATE_UNIX_TIMESTAMP);
|
|
2646
2647
|
}
|
|
2647
2648
|
else if (value.length === 13) {
|
|
2648
|
-
return moment$
|
|
2649
|
+
return moment$6(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2649
2650
|
}
|
|
2650
2651
|
}
|
|
2651
2652
|
console.warn('Unable to parse date: ' + value);
|
|
2652
2653
|
return undefined;
|
|
2653
2654
|
}
|
|
2654
2655
|
function fromUnixTimestamp(timeInSec) {
|
|
2655
|
-
return moment$
|
|
2656
|
+
return moment$6(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2656
2657
|
}
|
|
2657
2658
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2658
|
-
return moment$
|
|
2659
|
+
return moment$6(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2659
2660
|
}
|
|
2660
2661
|
function toDuration(value, unit) {
|
|
2661
2662
|
if (!value)
|
|
2662
2663
|
return undefined;
|
|
2663
|
-
var duration = moment$
|
|
2664
|
+
var duration = moment$6.duration(value, unit);
|
|
2664
2665
|
// fix 990+ ms
|
|
2665
2666
|
if (duration.milliseconds() >= 990) {
|
|
2666
2667
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -3160,7 +3161,7 @@
|
|
|
3160
3161
|
ngInit: [{ type: i0.Output }]
|
|
3161
3162
|
};
|
|
3162
3163
|
|
|
3163
|
-
var moment$
|
|
3164
|
+
var moment$5 = momentImported__namespace;
|
|
3164
3165
|
// @dynamic
|
|
3165
3166
|
var SharedValidators = /** @class */ (function () {
|
|
3166
3167
|
function SharedValidators() {
|
|
@@ -3177,14 +3178,6 @@
|
|
|
3177
3178
|
this._REGEXP_CACHE.DOUBLE_BY_MAX_DECIMALS[maxDecimals] = new RegExp("^[-]?[0-9]+([.,][0-9]{1," + maxDecimals + "})?$");
|
|
3178
3179
|
return this._REGEXP_CACHE.DOUBLE_BY_MAX_DECIMALS[maxDecimals];
|
|
3179
3180
|
};
|
|
3180
|
-
SharedValidators.validDate = function (control) {
|
|
3181
|
-
var value = control.value;
|
|
3182
|
-
var date = !value || moment$4.isMoment(value) ? value : moment$4(control.value, DATE_ISO_PATTERN);
|
|
3183
|
-
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
3184
|
-
return { validDate: true };
|
|
3185
|
-
}
|
|
3186
|
-
return null;
|
|
3187
|
-
};
|
|
3188
3181
|
SharedValidators.latitude = function (control) {
|
|
3189
3182
|
var value = control.value;
|
|
3190
3183
|
if (isNotNil(value) && (value < -90 || value > 90)) {
|
|
@@ -3249,6 +3242,14 @@
|
|
|
3249
3242
|
return null;
|
|
3250
3243
|
};
|
|
3251
3244
|
};
|
|
3245
|
+
SharedValidators.validDate = function (control) {
|
|
3246
|
+
var value = control.value;
|
|
3247
|
+
var date = !value || moment$5.isMoment(value) ? value : moment$5(control.value, DATE_ISO_PATTERN);
|
|
3248
|
+
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
3249
|
+
return { validDate: true };
|
|
3250
|
+
}
|
|
3251
|
+
return null;
|
|
3252
|
+
};
|
|
3252
3253
|
SharedValidators.dateIsAfter = function (previousValue, errorParam, granularity) {
|
|
3253
3254
|
return function (control) {
|
|
3254
3255
|
var value = fromDateISOString(control.value);
|
|
@@ -3259,6 +3260,16 @@
|
|
|
3259
3260
|
return null;
|
|
3260
3261
|
};
|
|
3261
3262
|
};
|
|
3263
|
+
SharedValidators.dateIsBefore = function (maxValue, errorParam, granularity) {
|
|
3264
|
+
return function (control) {
|
|
3265
|
+
var value = fromDateISOString(control.value);
|
|
3266
|
+
if (isNotNil(value) && isNotNil(maxValue) && value.isSameOrAfter(maxValue, granularity)) {
|
|
3267
|
+
// Return the error
|
|
3268
|
+
return { dateIsBefore: { maxDate: errorParam } };
|
|
3269
|
+
}
|
|
3270
|
+
return null;
|
|
3271
|
+
};
|
|
3272
|
+
};
|
|
3262
3273
|
SharedValidators.dateRangeEnd = function (startDateFieldName, msg) {
|
|
3263
3274
|
var errorCode = msg ? 'msg' : 'dateRange';
|
|
3264
3275
|
var error = msg ? { msg: msg } : { dateRange: true };
|
|
@@ -3354,6 +3365,7 @@
|
|
|
3354
3365
|
pubkey: 'ERROR.FIELD_NOT_VALID_PUBKEY',
|
|
3355
3366
|
validDate: 'ERROR.FIELD_NOT_VALID_DATE',
|
|
3356
3367
|
dateIsAfter: 'ERROR.FIELD_NOT_VALID_DATE_AFTER',
|
|
3368
|
+
dateIsBefore: 'ERROR.FIELD_NOT_VALID_DATE_BEFORE',
|
|
3357
3369
|
dateRange: 'ERROR.FIELD_NOT_VALID_DATE_RANGE',
|
|
3358
3370
|
dateMinDuration: 'ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION',
|
|
3359
3371
|
dateMaxDuration: 'ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION',
|
|
@@ -5331,6 +5343,7 @@
|
|
|
5331
5343
|
var ɵ0$9 = noop$6;
|
|
5332
5344
|
var MatDate = /** @class */ (function () {
|
|
5333
5345
|
function MatDate(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5346
|
+
this.platform = platform;
|
|
5334
5347
|
this.dateAdapter = dateAdapter;
|
|
5335
5348
|
this.translate = translate;
|
|
5336
5349
|
this.formBuilder = formBuilder;
|
|
@@ -5340,21 +5353,30 @@
|
|
|
5340
5353
|
this._onChangeCallback = noop$6;
|
|
5341
5354
|
this._onTouchedCallback = noop$6;
|
|
5342
5355
|
this._subscription = new rxjs.Subscription();
|
|
5343
|
-
this.
|
|
5344
|
-
this.
|
|
5356
|
+
this._writing = true;
|
|
5357
|
+
this._disabling = false;
|
|
5358
|
+
this._readonly = false;
|
|
5345
5359
|
this.dayMask = DAY_MASK$2;
|
|
5346
|
-
this.disabled = false;
|
|
5347
5360
|
this.floatLabel = 'auto';
|
|
5348
|
-
this.readonly = false;
|
|
5349
5361
|
this.compact = false;
|
|
5350
5362
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
5351
5363
|
this.autofocus = false;
|
|
5364
|
+
this.startDate = null;
|
|
5352
5365
|
this.clearable = false;
|
|
5353
|
-
|
|
5354
|
-
this.mobile = platform.is('mobile');
|
|
5355
|
-
this.keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
5366
|
+
this.timezone = null;
|
|
5356
5367
|
this.locale = (translate.currentLang || translate.defaultLang).substr(0, 2);
|
|
5357
5368
|
}
|
|
5369
|
+
Object.defineProperty(MatDate.prototype, "readonly", {
|
|
5370
|
+
get: function () {
|
|
5371
|
+
return this._readonly;
|
|
5372
|
+
},
|
|
5373
|
+
set: function (value) {
|
|
5374
|
+
this._readonly = value;
|
|
5375
|
+
this.markForCheck();
|
|
5376
|
+
},
|
|
5377
|
+
enumerable: false,
|
|
5378
|
+
configurable: true
|
|
5379
|
+
});
|
|
5358
5380
|
Object.defineProperty(MatDate.prototype, "tabindex", {
|
|
5359
5381
|
get: function () {
|
|
5360
5382
|
return this._tabindex;
|
|
@@ -5371,71 +5393,72 @@
|
|
|
5371
5393
|
});
|
|
5372
5394
|
Object.defineProperty(MatDate.prototype, "value", {
|
|
5373
5395
|
get: function () {
|
|
5374
|
-
return
|
|
5396
|
+
return this.formControl.value;
|
|
5375
5397
|
},
|
|
5376
5398
|
enumerable: false,
|
|
5377
5399
|
configurable: true
|
|
5378
5400
|
});
|
|
5379
5401
|
MatDate.prototype.ngOnInit = function () {
|
|
5380
5402
|
var _this = this;
|
|
5403
|
+
this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
|
|
5404
|
+
this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
5381
5405
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
5382
5406
|
if (!this.formControl)
|
|
5383
5407
|
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-field>.');
|
|
5384
5408
|
this.required = toBoolean(this.required, this.formControl.validator === i1.Validators.required);
|
|
5385
|
-
//
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5409
|
+
// Add 'validDate' validator (when existing validator are null or required, to be sure to keep it)
|
|
5410
|
+
if (!this.formControl.validator || this.formControl.validator === i1.Validators.required) {
|
|
5411
|
+
this.formControl.setValidators(this.required ? [i1.Validators.required, SharedValidators.validDate] : SharedValidators.validDate);
|
|
5412
|
+
}
|
|
5413
|
+
else {
|
|
5414
|
+
this.formControl.setValidators(this.required ? [this.formControl.validator, i1.Validators.required, SharedValidators.validDate] :
|
|
5415
|
+
[this.formControl.validator, SharedValidators.validDate]);
|
|
5416
|
+
}
|
|
5417
|
+
this.dayControl = this.formBuilder.control(null, function () { return _this.formControl.errors; });
|
|
5390
5418
|
// Get patterns to display date
|
|
5391
|
-
this.updatePattern(this.translate.instant('COMMON.DATE_PATTERN'));
|
|
5392
5419
|
this._subscription.add(this.translate.get('COMMON.DATE_PATTERN')
|
|
5393
5420
|
.subscribe(function (pattern) { return _this.updatePattern(pattern); }));
|
|
5394
5421
|
this._subscription.add(this.dayControl.valueChanges
|
|
5395
5422
|
.subscribe(function (value) { return _this.onFormChange(value); }));
|
|
5396
|
-
// Listen status changes outside the component
|
|
5423
|
+
// Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
|
|
5397
5424
|
this._subscription.add(this.formControl.statusChanges
|
|
5398
|
-
.pipe(operators.filter(function () { return !_this.readonly && !_this.
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
}
|
|
5403
|
-
else if (status === 'VALID') {
|
|
5404
|
-
$error.next(null);
|
|
5405
|
-
}
|
|
5406
|
-
_this.dayControl.updateValueAndValidity({ onlySelf: true, emitEvent: false });
|
|
5425
|
+
.pipe(operators.filter(function (_) { return !_this.readonly && !_this._writing && !_this._disabling; }) // Skip
|
|
5426
|
+
)
|
|
5427
|
+
.subscribe(function () {
|
|
5428
|
+
_this.dayControl.updateValueAndValidity({ emitEvent: false });
|
|
5407
5429
|
_this.markForCheck();
|
|
5408
5430
|
}));
|
|
5409
5431
|
this.updateTabIndex();
|
|
5410
|
-
this.
|
|
5432
|
+
this._writing = false;
|
|
5411
5433
|
};
|
|
5412
5434
|
MatDate.prototype.ngOnDestroy = function () {
|
|
5413
5435
|
this._subscription.unsubscribe();
|
|
5414
5436
|
};
|
|
5415
|
-
MatDate.prototype.writeValue = function (
|
|
5416
|
-
if (this.
|
|
5417
|
-
return;
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5437
|
+
MatDate.prototype.writeValue = function (valueStr) {
|
|
5438
|
+
if (this._writing)
|
|
5439
|
+
return; // Skip
|
|
5440
|
+
this._writing = true;
|
|
5441
|
+
// DEBUG
|
|
5442
|
+
// console.debug("[mat-date] writeValue() with:", valueStr);
|
|
5443
|
+
var value = fromDateISOString(valueStr);
|
|
5444
|
+
if (!value || !value.isValid()) {
|
|
5421
5445
|
this.dayControl.patchValue(null, { emitEvent: false });
|
|
5422
|
-
this._value = undefined;
|
|
5423
5446
|
if (this.formControl.value) {
|
|
5424
5447
|
this.formControl.patchValue(null, { emitEvent: false });
|
|
5425
5448
|
this._onChangeCallback(null);
|
|
5426
5449
|
}
|
|
5427
|
-
this.writing = false;
|
|
5428
|
-
this.markForCheck();
|
|
5429
|
-
return;
|
|
5430
5450
|
}
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5451
|
+
else {
|
|
5452
|
+
// Format day
|
|
5453
|
+
// Move to the expected TZ (keeping local hour - e.g. midnight)
|
|
5454
|
+
var day = value && this.timezone ? value.clone().tz(this.timezone) : value.clone();
|
|
5455
|
+
// Reset hour
|
|
5456
|
+
day = day.startOf('day');
|
|
5457
|
+
var dayStr = this.dateAdapter.format(day, this.dayPattern);
|
|
5458
|
+
// Update control
|
|
5459
|
+
this.dayControl.patchValue(dayStr, { emitEvent: false });
|
|
5434
5460
|
}
|
|
5435
|
-
this.
|
|
5436
|
-
// Set form value
|
|
5437
|
-
this.dayControl.patchValue(this.dateAdapter.format(this._value.clone().startOf('day'), this.dayPattern), { emitEvent: false });
|
|
5438
|
-
this.writing = false;
|
|
5461
|
+
this._writing = false;
|
|
5439
5462
|
this.markForCheck();
|
|
5440
5463
|
};
|
|
5441
5464
|
MatDate.prototype.registerOnChange = function (fn) {
|
|
@@ -5445,37 +5468,39 @@
|
|
|
5445
5468
|
this._onTouchedCallback = fn;
|
|
5446
5469
|
};
|
|
5447
5470
|
MatDate.prototype.setDisabledState = function (isDisabled) {
|
|
5448
|
-
if (this.
|
|
5471
|
+
if (this._disabling)
|
|
5449
5472
|
return;
|
|
5450
|
-
this.
|
|
5451
|
-
this.disabled = isDisabled;
|
|
5473
|
+
this._disabling = true;
|
|
5452
5474
|
if (isDisabled) {
|
|
5453
|
-
this.dayControl.disable({
|
|
5475
|
+
this.dayControl.disable({ emitEvent: false });
|
|
5454
5476
|
}
|
|
5455
5477
|
else {
|
|
5456
|
-
this.dayControl.enable({
|
|
5478
|
+
this.dayControl.enable({ emitEvent: false });
|
|
5457
5479
|
}
|
|
5458
|
-
this.
|
|
5480
|
+
this._disabling = false;
|
|
5459
5481
|
this.markForCheck();
|
|
5460
5482
|
};
|
|
5461
5483
|
MatDate.prototype.onDatePickerChange = function (event) {
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
var
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
this.
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5484
|
+
// Make sure event is valid
|
|
5485
|
+
if (!event || (event.value !== null && !momentImported.isMoment(event.value))) {
|
|
5486
|
+
console.warn('Invalid MatDatepicker event. Skipping', event);
|
|
5487
|
+
return; // Skip
|
|
5488
|
+
}
|
|
5489
|
+
var dateStr = null;
|
|
5490
|
+
if (event.value) {
|
|
5491
|
+
var date = event.value
|
|
5492
|
+
.locale(this.locale) // set as time as locale time
|
|
5493
|
+
.minute(0).seconds(0).millisecond(0) // Reset hour
|
|
5494
|
+
.utc(true);
|
|
5495
|
+
dateStr = this.dateAdapter.format(date, this.dayPattern) || null;
|
|
5496
|
+
}
|
|
5497
|
+
if (this.dayControl.value !== dateStr) {
|
|
5498
|
+
// DEBUG
|
|
5499
|
+
console.debug("[mat-date] onDatePickerChange() new value:", dateStr);
|
|
5500
|
+
this.dayControl.setValue(dateStr, {
|
|
5501
|
+
emitEvent: true // Will call onFormChange
|
|
5502
|
+
});
|
|
5503
|
+
}
|
|
5479
5504
|
};
|
|
5480
5505
|
MatDate.prototype.openDatePickerIfMobile = function (event, datePicker) {
|
|
5481
5506
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -5526,6 +5551,13 @@
|
|
|
5526
5551
|
}
|
|
5527
5552
|
});
|
|
5528
5553
|
};
|
|
5554
|
+
MatDate.prototype.clear = function () {
|
|
5555
|
+
this.dayControl.patchValue(null, { emitEvent: false });
|
|
5556
|
+
this.formControl.setValue(null, { emitEvent: false });
|
|
5557
|
+
this._onChangeCallback(null);
|
|
5558
|
+
this.markAsTouched();
|
|
5559
|
+
this.markAsDirty();
|
|
5560
|
+
};
|
|
5529
5561
|
/* -- private method -- */
|
|
5530
5562
|
MatDate.prototype.updatePattern = function (pattern) {
|
|
5531
5563
|
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
@@ -5535,36 +5567,30 @@
|
|
|
5535
5567
|
this.markForCheck();
|
|
5536
5568
|
}
|
|
5537
5569
|
};
|
|
5538
|
-
MatDate.prototype.onFormChange = function (dayValue) {
|
|
5539
|
-
if (this.writing)
|
|
5540
|
-
return; // Skip if call by self
|
|
5541
|
-
this.writing = true;
|
|
5542
|
-
// Make to remove placeholder chars
|
|
5543
|
-
while (dayValue && dayValue.indexOf(this.placeholderChar) !== -1) {
|
|
5544
|
-
dayValue = dayValue.replace(this.placeholderChar, '');
|
|
5545
|
-
}
|
|
5546
|
-
var date;
|
|
5547
|
-
// Parse day string
|
|
5548
|
-
date = dayValue && this.dateAdapter.parse(dayValue, this.dayPattern) || null;
|
|
5549
|
-
// Reset time
|
|
5550
|
-
date = date && date.utc(true).hour(0).minute(0).seconds(0).millisecond(0);
|
|
5551
|
-
// update date picker
|
|
5552
|
-
this._value = date && this.dateAdapter.parse(date.clone(), DATE_ISO_PATTERN);
|
|
5553
|
-
// Get the model value
|
|
5554
|
-
var dateStr = date && date.isValid() && this.dateAdapter.format(date, DATE_ISO_PATTERN).replace('+00:00', 'Z') || date;
|
|
5555
|
-
//console.debug("[mat-date-time] Setting date: ", dateStr);
|
|
5556
|
-
this.formControl.patchValue(dateStr, { emitEvent: false });
|
|
5557
|
-
//this.formControl.updateValueAndValidity();
|
|
5558
|
-
this.writing = false;
|
|
5559
|
-
this.markForCheck();
|
|
5560
|
-
this._onChangeCallback(dateStr);
|
|
5561
|
-
};
|
|
5562
5570
|
MatDate.prototype.checkIfTouched = function () {
|
|
5563
5571
|
if (this.dayControl.touched) {
|
|
5564
|
-
this.markForCheck();
|
|
5565
5572
|
this._onTouchedCallback();
|
|
5573
|
+
this.markForCheck();
|
|
5566
5574
|
}
|
|
5567
5575
|
};
|
|
5576
|
+
MatDate.prototype.onFormChange = function (dayStr) {
|
|
5577
|
+
if (this._writing)
|
|
5578
|
+
return; // Skip if call by self
|
|
5579
|
+
this._writing = true;
|
|
5580
|
+
// Make to remove placeholder chars
|
|
5581
|
+
while (dayStr && dayStr.indexOf(this.placeholderChar) !== -1) {
|
|
5582
|
+
dayStr = dayStr.replace(this.placeholderChar, '');
|
|
5583
|
+
}
|
|
5584
|
+
// Parse day
|
|
5585
|
+
var date = dayStr && this.dateAdapter.parse(dayStr, this.dayPattern);
|
|
5586
|
+
// Move to the expected TZ (keeping local hour - e.g. midnight)
|
|
5587
|
+
date = date && (this.timezone ? date.tz(this.timezone, true) : date);
|
|
5588
|
+
date = date && date.startOf('day') // Reset hrou
|
|
5589
|
+
.utc(); // Convert local date into utc (avoid TZ offset to be in the final string)
|
|
5590
|
+
// Set model value
|
|
5591
|
+
this.emitChange(date);
|
|
5592
|
+
this._writing = false;
|
|
5593
|
+
};
|
|
5568
5594
|
MatDate.prototype.waitKeyboardHide = function (waitKeyboardDelay) {
|
|
5569
5595
|
return __awaiter(this, void 0, void 0, function () {
|
|
5570
5596
|
return __generator(this, function (_a) {
|
|
@@ -5579,8 +5605,8 @@
|
|
|
5579
5605
|
case 1:
|
|
5580
5606
|
// Wait hide occur
|
|
5581
5607
|
_a.sent();
|
|
5582
|
-
if (!(this.
|
|
5583
|
-
return [4 /*yield*/, sleep(this.
|
|
5608
|
+
if (!(this._keyboardHideDelay > 0 && waitKeyboardDelay)) return [3 /*break*/, 3];
|
|
5609
|
+
return [4 /*yield*/, sleep(this._keyboardHideDelay)];
|
|
5584
5610
|
case 2:
|
|
5585
5611
|
_a.sent();
|
|
5586
5612
|
_a.label = 3;
|
|
@@ -5589,6 +5615,18 @@
|
|
|
5589
5615
|
});
|
|
5590
5616
|
});
|
|
5591
5617
|
};
|
|
5618
|
+
MatDate.prototype.emitChange = function (value) {
|
|
5619
|
+
// Get the model value
|
|
5620
|
+
var dateStr = toDateISOString(value) || null;
|
|
5621
|
+
if (this.formControl.value !== dateStr) {
|
|
5622
|
+
// DEBUG
|
|
5623
|
+
//console.debug('[matèdate-time] Emit new value: ' + dateStr);
|
|
5624
|
+
// Changes comes from inside function: use the callback
|
|
5625
|
+
this._onChangeCallback(dateStr);
|
|
5626
|
+
// Check if need to update controls
|
|
5627
|
+
this.checkIfTouched();
|
|
5628
|
+
}
|
|
5629
|
+
};
|
|
5592
5630
|
MatDate.prototype.updateTabIndex = function () {
|
|
5593
5631
|
var _this = this;
|
|
5594
5632
|
if (isNil(this._tabindex) || this._tabindex === -1)
|
|
@@ -5601,6 +5639,14 @@
|
|
|
5601
5639
|
_this.markForCheck();
|
|
5602
5640
|
});
|
|
5603
5641
|
};
|
|
5642
|
+
MatDate.prototype.markAsTouched = function (opts) {
|
|
5643
|
+
this.dayControl.markAsTouched(opts);
|
|
5644
|
+
this._onTouchedCallback();
|
|
5645
|
+
this.markForCheck();
|
|
5646
|
+
};
|
|
5647
|
+
MatDate.prototype.markAsDirty = function (opts) {
|
|
5648
|
+
this.formControl.markAsDirty(opts);
|
|
5649
|
+
};
|
|
5604
5650
|
MatDate.prototype.markForCheck = function () {
|
|
5605
5651
|
this.cd.markForCheck();
|
|
5606
5652
|
};
|
|
@@ -5609,7 +5655,7 @@
|
|
|
5609
5655
|
MatDate.decorators = [
|
|
5610
5656
|
{ type: i0.Component, args: [{
|
|
5611
5657
|
selector: 'mat-date-field',
|
|
5612
|
-
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\"
|
|
5658
|
+
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable -->\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dayControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dayControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final input -->\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix\n (click)=\"openDatePicker($event, datePicker)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <!-- errors -->\n <mat-error *ngIf=\"formControl.touched && formControl.errors|mapKeys|arrayFirst; let errorKey\">\n <ng-container [ngSwitch]=\"errorKey\">\n <span *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</span>\n <span *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE_TIME</span>\n <span *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</span>\n <span *ngSwitchCase=\"'dateIsBefore'\">{{'ERROR.FIELD_NOT_VALID_DATE_BEFORE' | translate: formControl.errors.dateIsBefore }}</span>\n <span *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</span>\n <span *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</span>\n <span *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</span>\n <span *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</span>\n </ng-container>\n </mat-error>\n <ng-content select=\"mat-error\"></ng-content>\n\n <!-- mat hint -->\n <div class=\"mat-form-field-hint-wrapper\" [class.cdk-visually-hidden]=\"formControl.invalid\">\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint\"></ng-content>\n </div>\n </mat-form-field>\n\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n\n\n\n</ng-template>\n\n<ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n</ng-template>\n\n<ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n</ng-template>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n",
|
|
5613
5659
|
providers: [
|
|
5614
5660
|
DEFAULT_VALUE_ACCESSOR$5,
|
|
5615
5661
|
],
|
|
@@ -5627,19 +5673,20 @@
|
|
|
5627
5673
|
{ type: i1.FormGroupDirective, decorators: [{ type: i0.Optional }] }
|
|
5628
5674
|
]; };
|
|
5629
5675
|
MatDate.propDecorators = {
|
|
5630
|
-
disabled: [{ type: i0.Input }],
|
|
5631
5676
|
formControl: [{ type: i0.Input }],
|
|
5632
5677
|
formControlName: [{ type: i0.Input }],
|
|
5633
5678
|
placeholder: [{ type: i0.Input }],
|
|
5634
5679
|
floatLabel: [{ type: i0.Input }],
|
|
5635
|
-
readonly: [{ type: i0.Input }],
|
|
5636
5680
|
required: [{ type: i0.Input }],
|
|
5681
|
+
mobile: [{ type: i0.Input }],
|
|
5637
5682
|
compact: [{ type: i0.Input }],
|
|
5638
5683
|
placeholderChar: [{ type: i0.Input }],
|
|
5639
5684
|
autofocus: [{ type: i0.Input }],
|
|
5640
|
-
tabindex: [{ type: i0.Input }],
|
|
5641
5685
|
startDate: [{ type: i0.Input }],
|
|
5642
5686
|
clearable: [{ type: i0.Input }],
|
|
5687
|
+
timezone: [{ type: i0.Input }],
|
|
5688
|
+
readonly: [{ type: i0.Input }],
|
|
5689
|
+
tabindex: [{ type: i0.Input }],
|
|
5643
5690
|
datePicker: [{ type: i0.ViewChild, args: ['datePicker',] }],
|
|
5644
5691
|
matInputs: [{ type: i0.ViewChildren, args: ['matInput',] }]
|
|
5645
5692
|
};
|
|
@@ -5652,8 +5699,7 @@
|
|
|
5652
5699
|
var DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
5653
5700
|
var HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
5654
5701
|
var HOUR_MASK$1 = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
5655
|
-
var noop$5 = function () {
|
|
5656
|
-
};
|
|
5702
|
+
var noop$5 = function () { };
|
|
5657
5703
|
var ɵ0$8 = noop$5;
|
|
5658
5704
|
var MatDateTime = /** @class */ (function () {
|
|
5659
5705
|
function MatDateTime(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
@@ -5667,8 +5713,8 @@
|
|
|
5667
5713
|
this._onChangeCallback = noop$5;
|
|
5668
5714
|
this._onTouchedCallback = noop$5;
|
|
5669
5715
|
this._subscription = new rxjs.Subscription();
|
|
5670
|
-
this.
|
|
5671
|
-
this.
|
|
5716
|
+
this._writing = true;
|
|
5717
|
+
this._disabling = false;
|
|
5672
5718
|
this._readonly = false;
|
|
5673
5719
|
this.dayMask = DAY_MASK$1;
|
|
5674
5720
|
this.hourMask = HOUR_MASK$1;
|
|
@@ -5715,7 +5761,7 @@
|
|
|
5715
5761
|
MatDateTime.prototype.ngOnInit = function () {
|
|
5716
5762
|
var _this = this;
|
|
5717
5763
|
this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
|
|
5718
|
-
this.
|
|
5764
|
+
this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
5719
5765
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
5720
5766
|
if (!this.formControl)
|
|
5721
5767
|
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-time-field>.');
|
|
@@ -5742,19 +5788,19 @@
|
|
|
5742
5788
|
.subscribe(function (event) { return _this.onFormChange(event); }));
|
|
5743
5789
|
// Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
|
|
5744
5790
|
this._subscription.add(this.formControl.statusChanges
|
|
5745
|
-
.pipe(operators.filter(function (_) { return !_this.readonly && !_this.
|
|
5791
|
+
.pipe(operators.filter(function (_) { return !_this.readonly && !_this._writing && !_this._disabling; }) // Skip
|
|
5746
5792
|
)
|
|
5747
5793
|
.subscribe(function () { return _this.markForCheck(); }));
|
|
5748
5794
|
this.updateTabIndex();
|
|
5749
|
-
this.
|
|
5795
|
+
this._writing = false;
|
|
5750
5796
|
};
|
|
5751
5797
|
MatDateTime.prototype.ngOnDestroy = function () {
|
|
5752
5798
|
this._subscription.unsubscribe();
|
|
5753
5799
|
};
|
|
5754
5800
|
MatDateTime.prototype.writeValue = function (valueStr) {
|
|
5755
|
-
if (this.
|
|
5801
|
+
if (this._writing)
|
|
5756
5802
|
return; // Skip
|
|
5757
|
-
this.
|
|
5803
|
+
this._writing = true;
|
|
5758
5804
|
// DEBUG
|
|
5759
5805
|
// console.debug("[mat-date-time] writeValue() with:", valueStr);
|
|
5760
5806
|
var value = fromDateISOString(valueStr);
|
|
@@ -5763,10 +5809,10 @@
|
|
|
5763
5809
|
this.timeFormControl.patchValue(null, { emitEvent: false });
|
|
5764
5810
|
}
|
|
5765
5811
|
else {
|
|
5766
|
-
//
|
|
5812
|
+
// Format day
|
|
5767
5813
|
var day = value.clone().startOf('day');
|
|
5768
5814
|
var dayStr = this.dateAdapter.format(day, this.dayPattern);
|
|
5769
|
-
//
|
|
5815
|
+
// Format time
|
|
5770
5816
|
// - Format hh
|
|
5771
5817
|
var hour = value.hour();
|
|
5772
5818
|
hour = hour < 10 ? ('0' + hour) : hour;
|
|
@@ -5778,46 +5824,9 @@
|
|
|
5778
5824
|
this.dateFormControl.patchValue(dayStr, { emitEvent: false });
|
|
5779
5825
|
this.timeFormControl.patchValue(timeStr, { emitEvent: false });
|
|
5780
5826
|
}
|
|
5781
|
-
this.
|
|
5827
|
+
this._writing = false;
|
|
5782
5828
|
this.markForCheck();
|
|
5783
5829
|
};
|
|
5784
|
-
MatDateTime.prototype.onFormChange = function (event) {
|
|
5785
|
-
if (this.writing)
|
|
5786
|
-
return; // Skip if call by self
|
|
5787
|
-
this.writing = true;
|
|
5788
|
-
var dayStr = this.dateFormControl.value;
|
|
5789
|
-
var time = this.timeFormControl.value;
|
|
5790
|
-
// DEBUG
|
|
5791
|
-
//console.debug(`[mat-date-time] onFormChange() from event: ${event} - controls values: `, [dayStr, time]);
|
|
5792
|
-
var incompleteValue = isNilOrBlank(time) !== isNilOrBlank(dayStr);
|
|
5793
|
-
if (incompleteValue || this.dateFormControl.invalid || this.timeFormControl.invalid) {
|
|
5794
|
-
this.formControl.markAsPending({ onlySelf: true });
|
|
5795
|
-
this.formControl.setErrors(Object.assign(Object.assign(Object.assign({ validDate: incompleteValue }, this.formControl.errors), this.dateFormControl.errors), this.timeFormControl.errors));
|
|
5796
|
-
this.formControl.markAsDirty();
|
|
5797
|
-
// Reset the value
|
|
5798
|
-
//this.emitChange(null);
|
|
5799
|
-
this.writing = false;
|
|
5800
|
-
return;
|
|
5801
|
-
}
|
|
5802
|
-
// Make to remove placeholder chars
|
|
5803
|
-
while (dayStr && dayStr.indexOf(this.placeholderChar) !== -1) {
|
|
5804
|
-
dayStr = dayStr.replace(this.placeholderChar, '');
|
|
5805
|
-
}
|
|
5806
|
-
// Parse day
|
|
5807
|
-
var day = dayStr && this.dateAdapter.parse(dayStr, this.dayPattern) || null;
|
|
5808
|
-
// Parse time
|
|
5809
|
-
var hourParts = (time || '').split(':');
|
|
5810
|
-
var hour = parseInt(hourParts[0] || 0);
|
|
5811
|
-
var minutes = parseInt(hourParts[1] || 0);
|
|
5812
|
-
var dateTime = day && day
|
|
5813
|
-
.locale(this.locale) // set as time as locale time
|
|
5814
|
-
.hour(hour).minute(minutes) // Set local hour
|
|
5815
|
-
.seconds(0).millisecond(0) // Reset seconds/millisecond
|
|
5816
|
-
.utc(); // Convert to UTC (avoid TZ offset in final string)
|
|
5817
|
-
// Set model value
|
|
5818
|
-
this.emitChange(dateTime);
|
|
5819
|
-
this.writing = false;
|
|
5820
|
-
};
|
|
5821
5830
|
MatDateTime.prototype.registerOnChange = function (fn) {
|
|
5822
5831
|
this._onChangeCallback = fn;
|
|
5823
5832
|
};
|
|
@@ -5825,9 +5834,9 @@
|
|
|
5825
5834
|
this._onTouchedCallback = fn;
|
|
5826
5835
|
};
|
|
5827
5836
|
MatDateTime.prototype.setDisabledState = function (isDisabled) {
|
|
5828
|
-
if (this.
|
|
5837
|
+
if (this._disabling)
|
|
5829
5838
|
return; // Skip
|
|
5830
|
-
this.
|
|
5839
|
+
this._disabling = true;
|
|
5831
5840
|
if (isDisabled) {
|
|
5832
5841
|
this.dateFormControl.disable({ emitEvent: false });
|
|
5833
5842
|
this.timeFormControl.disable({ emitEvent: false });
|
|
@@ -5836,7 +5845,7 @@
|
|
|
5836
5845
|
this.dateFormControl.enable({ emitEvent: false });
|
|
5837
5846
|
this.timeFormControl.enable({ emitEvent: false });
|
|
5838
5847
|
}
|
|
5839
|
-
this.
|
|
5848
|
+
this._disabling = false;
|
|
5840
5849
|
this.markForCheck();
|
|
5841
5850
|
};
|
|
5842
5851
|
MatDateTime.prototype.onDatePickerChange = function (event) {
|
|
@@ -5961,6 +5970,43 @@
|
|
|
5961
5970
|
this.markForCheck();
|
|
5962
5971
|
}
|
|
5963
5972
|
};
|
|
5973
|
+
MatDateTime.prototype.onFormChange = function (event) {
|
|
5974
|
+
if (this._writing)
|
|
5975
|
+
return; // Skip if call by self
|
|
5976
|
+
this._writing = true;
|
|
5977
|
+
var dayStr = this.dateFormControl.value;
|
|
5978
|
+
var time = this.timeFormControl.value;
|
|
5979
|
+
// DEBUG
|
|
5980
|
+
//console.debug(`[mat-date-time] onFormChange() from event: ${event} - controls values: `, [dayStr, time]);
|
|
5981
|
+
var incompleteValue = isNilOrBlank(time) !== isNilOrBlank(dayStr);
|
|
5982
|
+
if (incompleteValue || this.dateFormControl.invalid || this.timeFormControl.invalid) {
|
|
5983
|
+
this.formControl.markAsPending({ onlySelf: true });
|
|
5984
|
+
this.formControl.setErrors(Object.assign(Object.assign(Object.assign({ validDate: incompleteValue }, this.formControl.errors), this.dateFormControl.errors), this.timeFormControl.errors));
|
|
5985
|
+
this.formControl.markAsDirty();
|
|
5986
|
+
// Reset the value
|
|
5987
|
+
//this.emitChange(null);
|
|
5988
|
+
this._writing = false;
|
|
5989
|
+
return;
|
|
5990
|
+
}
|
|
5991
|
+
// Make to remove placeholder chars
|
|
5992
|
+
while (dayStr && dayStr.indexOf(this.placeholderChar) !== -1) {
|
|
5993
|
+
dayStr = dayStr.replace(this.placeholderChar, '');
|
|
5994
|
+
}
|
|
5995
|
+
// Parse day
|
|
5996
|
+
var day = dayStr && this.dateAdapter.parse(dayStr, this.dayPattern) || null;
|
|
5997
|
+
// Parse time
|
|
5998
|
+
var hourParts = (time || '').split(':');
|
|
5999
|
+
var hour = parseInt(hourParts[0] || 0);
|
|
6000
|
+
var minutes = parseInt(hourParts[1] || 0);
|
|
6001
|
+
var dateTime = day && day
|
|
6002
|
+
.locale(this.locale) // set as time as locale time
|
|
6003
|
+
.hour(hour).minute(minutes) // Set local hour
|
|
6004
|
+
.seconds(0).millisecond(0) // Reset seconds/millisecond
|
|
6005
|
+
.utc(); // Convert to UTC (avoid TZ offset in final string)
|
|
6006
|
+
// Set model value
|
|
6007
|
+
this.emitChange(dateTime);
|
|
6008
|
+
this._writing = false;
|
|
6009
|
+
};
|
|
5964
6010
|
MatDateTime.prototype.waitKeyboardHide = function (waitKeyboardDelay) {
|
|
5965
6011
|
return __awaiter(this, void 0, void 0, function () {
|
|
5966
6012
|
return __generator(this, function (_a) {
|
|
@@ -5975,8 +6021,8 @@
|
|
|
5975
6021
|
case 1:
|
|
5976
6022
|
// Wait hide occur
|
|
5977
6023
|
_a.sent();
|
|
5978
|
-
if (!(this.
|
|
5979
|
-
return [4 /*yield*/, sleep(this.
|
|
6024
|
+
if (!(this._keyboardHideDelay > 0 && waitKeyboardDelay)) return [3 /*break*/, 3];
|
|
6025
|
+
return [4 /*yield*/, sleep(this._keyboardHideDelay)];
|
|
5980
6026
|
case 2:
|
|
5981
6027
|
_a.sent();
|
|
5982
6028
|
_a.label = 3;
|
|
@@ -6009,9 +6055,9 @@
|
|
|
6009
6055
|
_this.markForCheck();
|
|
6010
6056
|
});
|
|
6011
6057
|
};
|
|
6012
|
-
MatDateTime.prototype.markAsTouched = function () {
|
|
6013
|
-
this.dateFormControl.markAsTouched();
|
|
6014
|
-
this.timeFormControl.markAsTouched();
|
|
6058
|
+
MatDateTime.prototype.markAsTouched = function (opts) {
|
|
6059
|
+
this.dateFormControl.markAsTouched(opts);
|
|
6060
|
+
this.timeFormControl.markAsTouched(opts);
|
|
6015
6061
|
this._onTouchedCallback();
|
|
6016
6062
|
this.markForCheck();
|
|
6017
6063
|
};
|
|
@@ -6026,7 +6072,7 @@
|
|
|
6026
6072
|
MatDateTime.decorators = [
|
|
6027
6073
|
{ type: i0.Component, args: [{
|
|
6028
6074
|
selector: 'mat-date-time-field',
|
|
6029
|
-
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable + time -->\n<ng-template #writable >\n <ion-grid class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding no-wrap\" nowrap>\n\n <!-- day -->\n <ion-col class=\"day ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dateFormControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dateFormControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix
|
|
6075
|
+
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable + time -->\n<ng-template #writable >\n <ion-grid class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding no-wrap\" nowrap>\n\n <!-- day -->\n <ion-col class=\"day ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dateFormControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dateFormControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final input -->\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix\n (click)=\"openDatePicker($event, datePicker)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n <div class=\"mat-form-field-subscript mat-form-field-subscript-wrapper\" >\n <!-- errors -->\n <ng-container [ngSwitch]=\"formControl.touched && formControl.errors|mapKeys|arrayFirst\">\n <mat-error *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE_TIME</mat-error>\n <mat-error *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngSwitchCase=\"'dateIsBefore'\">{{'ERROR.FIELD_NOT_VALID_DATE_BEFORE' | translate: formControl.errors.dateIsBefore }}</mat-error>\n <mat-error *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</mat-error>\n </ng-container>\n <ng-content select=\"mat-error\"></ng-content>\n\n <!-- mat hint -->\n <div class=\"mat-form-field-hint-wrapper\" [class.cdk-visually-hidden]=\"formControl.invalid\">\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint\"></ng-content>\n </div>\n </div>\n\n </ion-col>\n\n <!-- hour -->\n <ion-col class=\"hour ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && (timeFormControl.invalid || formControl.invalid)\">\n <mat-label *ngIf=\"placeholder && floatLabel != 'never'\" translate>COMMON.TIME</mat-label>\n <input matInput #matInput type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"timeFormControl\"\n autocomplete=\"off\"\n min=\"0\" max=\"23\"\n [textMask]=\"{mask: hourMask, keepCharPositions: true, placeholderChar: placeholderChar, guide: true}\"\n [placeholder]=\"'COMMON.TIME_PLACEHOLDER'|translate\"\n [required]=\"required\"\n (keyup.arrowdown)=\"openTimePicker($event)\"\n (keyup.escape)=\"preventEvent($event)\"\n (blur)=\"checkIfTouched()\"\n [tabindex]=\"tabindex !== undefined ? tabindex+1 : undefined\">\n\n <input matInput #matInput type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"timeFormControl\"\n (click)=\"openTimePickerIfMobile($event)\"\n readonly>\n\n <input matInput type=\"text\"\n [formControl]=\"timeFormControl\"\n hidden\n [ngxTimepicker]=\"timePicker\"\n [format]=\"24\">\n\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && !mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePicker($event)\" >\n <mat-icon>keyboard_arrow_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePickerIfMobile($event)\">\n <mat-icon>access_time</mat-icon>\n </button>\n\n <ngx-material-timepicker #timePicker [@.disabled]=\"true\"\n (timeSet)=\"onTimePickerChange($event)\"\n [ESC]=\"!mobile\"\n [defaultTime]=\"'00:00'\"\n [cancelBtnTmpl]=\"timePickerCancelButton\"\n [confirmBtnTmpl]=\"timePickerOkButton\"\n [preventOverlayClick]=\"mobile\"\n [enableKeyboardInput]=\"false\"\n [disableAnimation]=\"true\">\n <!-- cancel button -->\n <ng-template #timePickerCancelButton>\n <ion-button fill=\"clear\" color=\"dark\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n </ng-template>\n\n <!-- confirm button -->\n <ng-template #timePickerOkButton>\n <ion-button fill=\"solid\" color=\"tertiary\">\n <ion-label translate>COMMON.BTN_VALIDATE</ion-label>\n </ion-button>\n </ng-template>\n\n </ngx-material-timepicker>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n\n</ng-template>\n\n<ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n</ng-template>\n\n<ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n</ng-template>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n",
|
|
6030
6076
|
providers: [
|
|
6031
6077
|
DEFAULT_VALUE_ACCESSOR$4,
|
|
6032
6078
|
],
|
|
@@ -11529,7 +11575,7 @@
|
|
|
11529
11575
|
onRefresh: [{ type: i0.Input }]
|
|
11530
11576
|
};
|
|
11531
11577
|
|
|
11532
|
-
var moment$
|
|
11578
|
+
var moment$4 = momentImported__namespace;
|
|
11533
11579
|
var SETTINGS_STORAGE_KEY = 'settings';
|
|
11534
11580
|
var SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
11535
11581
|
// fixme: this constant points to static environment
|
|
@@ -11831,11 +11877,11 @@
|
|
|
11831
11877
|
if (!feature) {
|
|
11832
11878
|
feature = {
|
|
11833
11879
|
name: featureName.toLowerCase(),
|
|
11834
|
-
lastSyncDate: moment$
|
|
11880
|
+
lastSyncDate: moment$4().toISOString()
|
|
11835
11881
|
};
|
|
11836
11882
|
}
|
|
11837
11883
|
else {
|
|
11838
|
-
feature.lastSyncDate = moment$
|
|
11884
|
+
feature.lastSyncDate = moment$4().toISOString();
|
|
11839
11885
|
}
|
|
11840
11886
|
this.saveOfflineFeature(feature);
|
|
11841
11887
|
};
|
|
@@ -12029,7 +12075,7 @@
|
|
|
12029
12075
|
if (!page || !page.title || !page.path)
|
|
12030
12076
|
throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
|
|
12031
12077
|
// Set time
|
|
12032
|
-
page.time = page.time || moment$
|
|
12078
|
+
page.time = page.time || moment$4();
|
|
12033
12079
|
// Clean the title (remove <small> tags)
|
|
12034
12080
|
if (!opts || opts.removeTitleSmallTag !== false) {
|
|
12035
12081
|
var tagIndex = page.title.indexOf('</small>');
|
|
@@ -17673,7 +17719,7 @@
|
|
|
17673
17719
|
]; };
|
|
17674
17720
|
var templateObject_1$3, templateObject_2$3, templateObject_3$2, templateObject_4$2, templateObject_5$1;
|
|
17675
17721
|
|
|
17676
|
-
var moment$
|
|
17722
|
+
var moment$3 = momentImported__namespace;
|
|
17677
17723
|
var PlatformService = /** @class */ (function (_super) {
|
|
17678
17724
|
__extends(PlatformService, _super);
|
|
17679
17725
|
function PlatformService(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
@@ -17933,16 +17979,16 @@
|
|
|
17933
17979
|
}
|
|
17934
17980
|
// config moment lib
|
|
17935
17981
|
try {
|
|
17936
|
-
moment$
|
|
17982
|
+
moment$3.locale(event.lang);
|
|
17937
17983
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
17938
17984
|
}
|
|
17939
17985
|
// If error, fallback to en
|
|
17940
17986
|
catch (err) {
|
|
17941
|
-
moment$
|
|
17987
|
+
moment$3.locale('en');
|
|
17942
17988
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
17943
17989
|
}
|
|
17944
17990
|
// Config date adapter
|
|
17945
|
-
_this.dateAdapter.setLocale(moment$
|
|
17991
|
+
_this.dateAdapter.setLocale(moment$3.locale());
|
|
17946
17992
|
}
|
|
17947
17993
|
});
|
|
17948
17994
|
this.settings.onChange.subscribe(function (data) {
|
|
@@ -29883,13 +29929,13 @@
|
|
|
29883
29929
|
{ type: i1.FormBuilder }
|
|
29884
29930
|
]; };
|
|
29885
29931
|
|
|
29886
|
-
var moment$
|
|
29932
|
+
var moment$2 = momentImported__namespace;
|
|
29887
29933
|
var SwipeTestPage = /** @class */ (function () {
|
|
29888
29934
|
function SwipeTestPage(formBuilder, dateFormatPipe) {
|
|
29889
29935
|
this.formBuilder = formBuilder;
|
|
29890
29936
|
this.dateFormatPipe = dateFormatPipe;
|
|
29891
29937
|
this.$dates = new rxjs.BehaviorSubject(undefined);
|
|
29892
|
-
this._today = moment$
|
|
29938
|
+
this._today = moment$2().startOf('day');
|
|
29893
29939
|
this.form = formBuilder.group({
|
|
29894
29940
|
empty: [null, i1.Validators.required],
|
|
29895
29941
|
date: [null, i1.Validators.compose([i1.Validators.required, SharedValidators.validDate])],
|
|
@@ -29903,7 +29949,7 @@
|
|
|
29903
29949
|
var _this = this;
|
|
29904
29950
|
var dates = [];
|
|
29905
29951
|
for (var d = 0; d < 7; d++) {
|
|
29906
|
-
dates[d] = moment$
|
|
29952
|
+
dates[d] = moment$2(this._today).add(d - 3, 'day');
|
|
29907
29953
|
}
|
|
29908
29954
|
this.$dates.next(dates);
|
|
29909
29955
|
this.loadData();
|
|
@@ -29950,7 +29996,7 @@
|
|
|
29950
29996
|
{ type: DateFormatPipe }
|
|
29951
29997
|
]; };
|
|
29952
29998
|
|
|
29953
|
-
var moment = momentImported__namespace;
|
|
29999
|
+
var moment$1 = momentImported__namespace;
|
|
29954
30000
|
var DateTimeTestPage = /** @class */ (function () {
|
|
29955
30001
|
function DateTimeTestPage(platform, formBuilder, cd) {
|
|
29956
30002
|
this.platform = platform;
|
|
@@ -29986,7 +30032,7 @@
|
|
|
29986
30032
|
var now, data;
|
|
29987
30033
|
var _this = this;
|
|
29988
30034
|
return __generator(this, function (_a) {
|
|
29989
|
-
now = moment();
|
|
30035
|
+
now = moment$1();
|
|
29990
30036
|
data = {
|
|
29991
30037
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
29992
30038
|
enable: toDateISOString(now),
|
|
@@ -30262,9 +30308,118 @@
|
|
|
30262
30308
|
{ type: i1.FormBuilder }
|
|
30263
30309
|
]; };
|
|
30264
30310
|
|
|
30311
|
+
var moment = momentImported__namespace;
|
|
30312
|
+
var DateTestPage = /** @class */ (function () {
|
|
30313
|
+
function DateTestPage(platform, formBuilder, cd) {
|
|
30314
|
+
this.platform = platform;
|
|
30315
|
+
this.formBuilder = formBuilder;
|
|
30316
|
+
this.cd = cd;
|
|
30317
|
+
this.showLogPanel = true;
|
|
30318
|
+
this.logContent = '';
|
|
30319
|
+
this.memoryHide = false;
|
|
30320
|
+
this.memoryMobile = true;
|
|
30321
|
+
this.timezone = 'Indian/Mahe';
|
|
30322
|
+
this.stringify = JSON.stringify;
|
|
30323
|
+
this.form = formBuilder.group({
|
|
30324
|
+
empty: [null, i1.Validators.required],
|
|
30325
|
+
enable: [null, i1.Validators.required],
|
|
30326
|
+
disable: [null, i1.Validators.required],
|
|
30327
|
+
readonly: [null],
|
|
30328
|
+
timezone: [null]
|
|
30329
|
+
}, {
|
|
30330
|
+
validators: SharedFormGroupValidators.dateRange('empty', 'enable')
|
|
30331
|
+
});
|
|
30332
|
+
var disableControl = this.form.get('disable');
|
|
30333
|
+
disableControl.disable();
|
|
30334
|
+
// Copy the 'enable' value, into the disable control
|
|
30335
|
+
this.form.get('enable').valueChanges.subscribe(function (value) { return disableControl.setValue(value); });
|
|
30336
|
+
var mobile = platform.is('mobile');
|
|
30337
|
+
this.showLogPanel = this.showLogPanel || mobile;
|
|
30338
|
+
}
|
|
30339
|
+
DateTestPage.prototype.ngOnInit = function () {
|
|
30340
|
+
var _this = this;
|
|
30341
|
+
setTimeout(function () { return _this.loadData(); }, 250);
|
|
30342
|
+
};
|
|
30343
|
+
// Load the form with data
|
|
30344
|
+
DateTestPage.prototype.loadData = function () {
|
|
30345
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
30346
|
+
var now, nowAtMahe, data;
|
|
30347
|
+
var _this = this;
|
|
30348
|
+
return __generator(this, function (_a) {
|
|
30349
|
+
now = moment();
|
|
30350
|
+
nowAtMahe = now.clone().tz(this.timezone).startOf('day');
|
|
30351
|
+
data = {
|
|
30352
|
+
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
30353
|
+
enable: toDateISOString(now),
|
|
30354
|
+
disable: now.clone(),
|
|
30355
|
+
readonly: now.clone(),
|
|
30356
|
+
timezone: nowAtMahe
|
|
30357
|
+
};
|
|
30358
|
+
this.form.setValue(data);
|
|
30359
|
+
this.log('[test-page] Data loaded: ' + JSON.stringify(data));
|
|
30360
|
+
this.form.get('empty').valueChanges
|
|
30361
|
+
.pipe(operators.debounceTime(300))
|
|
30362
|
+
.subscribe(function (value) { return _this.log('[test-page] Value n°1: ' + JSON.stringify(value)); });
|
|
30363
|
+
this.form.get('enable').valueChanges
|
|
30364
|
+
.pipe(operators.debounceTime(300))
|
|
30365
|
+
.subscribe(function (value) { return _this.log('[test-page] Value n°2: ' + JSON.stringify(value)); });
|
|
30366
|
+
this.form.get('timezone').valueChanges
|
|
30367
|
+
.pipe(operators.debounceTime(300))
|
|
30368
|
+
.subscribe(function (value) { return _this.log('[test-page] Value with timezone: ' + JSON.stringify(value)); });
|
|
30369
|
+
return [2 /*return*/];
|
|
30370
|
+
});
|
|
30371
|
+
});
|
|
30372
|
+
};
|
|
30373
|
+
DateTestPage.prototype.doSubmit = function (event) {
|
|
30374
|
+
this.form.markAllAsTouched();
|
|
30375
|
+
this.log('[test-page] Form content: ' + JSON.stringify(this.form.value));
|
|
30376
|
+
this.log('[test-page] Form status: ' + this.form.status);
|
|
30377
|
+
if (this.form.invalid) {
|
|
30378
|
+
this.log('[test-page] Form errors: ' + JSON.stringify(this.form.errors));
|
|
30379
|
+
// DEBUG
|
|
30380
|
+
AppFormUtils.logFormErrors(this.form);
|
|
30381
|
+
}
|
|
30382
|
+
};
|
|
30383
|
+
DateTestPage.prototype.log = function (message) {
|
|
30384
|
+
console.debug(message);
|
|
30385
|
+
if (this.showLogPanel) {
|
|
30386
|
+
this.logContent += message + '<br/>';
|
|
30387
|
+
this.cd.markForCheck();
|
|
30388
|
+
}
|
|
30389
|
+
};
|
|
30390
|
+
DateTestPage.prototype.clearLogPanel = function () {
|
|
30391
|
+
this.logContent = '';
|
|
30392
|
+
this.cd.markForCheck();
|
|
30393
|
+
};
|
|
30394
|
+
DateTestPage.prototype.startMemoryTimer = function () {
|
|
30395
|
+
var _this = this;
|
|
30396
|
+
this.memoryTimer = setInterval(function () {
|
|
30397
|
+
_this.memoryHide = !_this.memoryHide;
|
|
30398
|
+
}, 50);
|
|
30399
|
+
};
|
|
30400
|
+
DateTestPage.prototype.stopMemoryTimer = function () {
|
|
30401
|
+
clearInterval(this.memoryTimer);
|
|
30402
|
+
this.memoryTimer = null;
|
|
30403
|
+
this.memoryHide = false;
|
|
30404
|
+
};
|
|
30405
|
+
return DateTestPage;
|
|
30406
|
+
}());
|
|
30407
|
+
DateTestPage.decorators = [
|
|
30408
|
+
{ type: i0.Component, args: [{
|
|
30409
|
+
selector: 'app-data-test',
|
|
30410
|
+
template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Date/Time field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <ion-grid>\n\n <!-- debugging memory leak -->\n <ion-row><ion-col><ion-text><h4>Debug memory leak</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col size=\"2\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\">Start timer</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\">Stop timer</ion-button>\n </ion-col>\n <ion-col size=\"2\">\n <mat-form-field floatLabel=\"never\">\n <input matInput type=\"text\" hidden>\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [value]=\"memoryMobile\">\n Mobile ?\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n <ion-col>\n <mat-date-field formControlName=\"empty\"\n *ngIf=\"!memoryHide\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"memoryMobile\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-col>\n </ion-row>\n\n <!-- Mobile mode -->\n <ion-row><ion-col><ion-text><h4>Mobile mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <!-- debug console -->\n <ion-row>\n <!-- buttons -->\n <ion-col size=\"2\">\n <!-- submit form -->\n <ion-button (click)=\"doSubmit($event)\"\n fill=\"outline\">\n <ion-icon name=\"checkmark\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n\n <!-- clear log -->\n <ion-button (click)=\"clearLogPanel()\"\n fill=\"outline\">\n <ion-icon name=\"trash\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </ion-col>\n <ion-col size=\"10\" *ngIf=\"showLogPanel\">\n <ion-text color=\"primary\">Log:<br/></ion-text>\n <div class=\"ion-padding-start\">\n <ion-text color=\"medium\">\n <small [innerHTML]=\"logContent\"></small>\n </ion-text>\n </div>\n </ion-col>\n </ion-row>\n\n <!-- Desktop mode -->\n <ion-row><ion-col><ion-text><h4>Desktop mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"false\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- TimeZone -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n TimeZone\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>timezone=\"{{timezone}}\" value=\"{{stringify(form.controls.timezone.value)}}\"</pre></small>\n <pre>Should display using the browser TZ,<br/>but serialize/deserialize for the given TZ</pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field #readonlyField formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"false\"\n [clearable]=\"true\"\n timezone=\"Indian/Mahe\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Readonly -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly toggle\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.readonly.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-field #readonlyField formControlName=\"readonly\"\n placeholder=\"Date/Time\"\n [readonly]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n </ion-grid>\n </form>\n\n</ion-content>\n"
|
|
30411
|
+
},] }
|
|
30412
|
+
];
|
|
30413
|
+
DateTestPage.ctorParameters = function () { return [
|
|
30414
|
+
{ type: i1$5.Platform },
|
|
30415
|
+
{ type: i1.FormBuilder },
|
|
30416
|
+
{ type: i0.ChangeDetectorRef }
|
|
30417
|
+
]; };
|
|
30418
|
+
|
|
30265
30419
|
var SHARED_MATERIAL_TESTING_PAGES = [
|
|
30266
30420
|
{ label: 'Shared Material components', divider: true },
|
|
30267
30421
|
{ label: 'Date/Time field', page: '/testing/shared/datetime' },
|
|
30422
|
+
{ label: 'Date field', page: '/testing/shared/date' },
|
|
30268
30423
|
{ label: 'Autocomplete field', page: '/testing/shared/autocomplete' },
|
|
30269
30424
|
{ label: 'Lat/Long field', page: '/testing/shared/latlong' },
|
|
30270
30425
|
{ label: 'Numeric pad component', page: '/testing/shared/numpad' },
|
|
@@ -30289,6 +30444,11 @@
|
|
|
30289
30444
|
pathMatch: 'full',
|
|
30290
30445
|
component: DateTimeTestPage
|
|
30291
30446
|
},
|
|
30447
|
+
{
|
|
30448
|
+
path: 'date',
|
|
30449
|
+
pathMatch: 'full',
|
|
30450
|
+
component: DateTestPage
|
|
30451
|
+
},
|
|
30292
30452
|
{
|
|
30293
30453
|
path: 'latlong',
|
|
30294
30454
|
pathMatch: 'full',
|
|
@@ -30332,6 +30492,7 @@
|
|
|
30332
30492
|
],
|
|
30333
30493
|
declarations: [
|
|
30334
30494
|
DateTimeTestPage,
|
|
30495
|
+
DateTestPage,
|
|
30335
30496
|
AutocompleteTestPage,
|
|
30336
30497
|
LatLongTestPage,
|
|
30337
30498
|
NumpadTestPage,
|
|
@@ -30343,6 +30504,7 @@
|
|
|
30343
30504
|
SharedMaterialModule,
|
|
30344
30505
|
i3.RouterModule,
|
|
30345
30506
|
DateTimeTestPage,
|
|
30507
|
+
DateTestPage,
|
|
30346
30508
|
AutocompleteTestPage,
|
|
30347
30509
|
LatLongTestPage,
|
|
30348
30510
|
NumpadTestPage,
|
|
@@ -31419,10 +31581,11 @@
|
|
|
31419
31581
|
exports["ɵg"] = UserSettingsValidatorService;
|
|
31420
31582
|
exports["ɵh"] = LocalSettingsValidatorService;
|
|
31421
31583
|
exports["ɵi"] = AppIconComponent;
|
|
31422
|
-
exports["ɵj"] =
|
|
31423
|
-
exports["ɵk"] =
|
|
31424
|
-
exports["ɵl"] =
|
|
31425
|
-
exports["ɵm"] =
|
|
31584
|
+
exports["ɵj"] = DateTestPage;
|
|
31585
|
+
exports["ɵk"] = NumpadTestPage;
|
|
31586
|
+
exports["ɵl"] = MatBadgeIconTestPage;
|
|
31587
|
+
exports["ɵm"] = ToastTestingModule;
|
|
31588
|
+
exports["ɵn"] = ToastTestingPage;
|
|
31426
31589
|
|
|
31427
31590
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
31428
31591
|
|