@sumaris-net/ngx-components 1.14.2 → 1.15.1

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.
@@ -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.momentTZImported, 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"]));
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$6 = momentImported__namespace;
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$6.duration(endDate.diff(startDate));
2112
+ var duration = moment$7.duration(endDate.diff(startDate));
2113
2113
  if (duration.asMinutes() < 0)
2114
2114
  return '';
2115
- var timeDuration = moment$6(0)
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$5 = momentImported__namespace;
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,8 +2601,9 @@
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);
@@ -2611,10 +2612,8 @@
2611
2612
  return date.clone().startOf('day');
2612
2613
  }
2613
2614
  // Use timezone
2614
- return moment$5.tz(timezone)
2615
- .set('year', date.get('year'))
2616
- .set('month', date.get('month'))
2617
- .set('day', date.get('day'))
2615
+ return date.clone() // clone the original date
2616
+ .tz(timezone, keepLocalTime)
2618
2617
  .startOf('day');
2619
2618
  };
2620
2619
  return DateUtils;
@@ -2637,32 +2636,32 @@
2637
2636
  if (!value || momentImported.isMoment(value))
2638
2637
  return value;
2639
2638
  // Parse the input value, as a ISO date time
2640
- var date = moment$5(value, DATE_ISO_PATTERN);
2639
+ var date = moment$6(value, DATE_ISO_PATTERN);
2641
2640
  if (date.isValid())
2642
2641
  return date;
2643
2642
  // Not valid: trying to convert from unix timestamp
2644
2643
  if (typeof value === 'string') {
2645
2644
  console.warn('Wrong date format - Trying to convert from local time: ' + value);
2646
2645
  if (value.length === 10) {
2647
- return moment$5(value, DATE_UNIX_TIMESTAMP);
2646
+ return moment$6(value, DATE_UNIX_TIMESTAMP);
2648
2647
  }
2649
2648
  else if (value.length === 13) {
2650
- return moment$5(value, DATE_UNIX_MS_TIMESTAMP);
2649
+ return moment$6(value, DATE_UNIX_MS_TIMESTAMP);
2651
2650
  }
2652
2651
  }
2653
2652
  console.warn('Unable to parse date: ' + value);
2654
2653
  return undefined;
2655
2654
  }
2656
2655
  function fromUnixTimestamp(timeInSec) {
2657
- return moment$5(timeInSec, DATE_UNIX_TIMESTAMP);
2656
+ return moment$6(timeInSec, DATE_UNIX_TIMESTAMP);
2658
2657
  }
2659
2658
  function fromUnixMsTimestamp(timeInMs) {
2660
- return moment$5(timeInMs, DATE_UNIX_MS_TIMESTAMP);
2659
+ return moment$6(timeInMs, DATE_UNIX_MS_TIMESTAMP);
2661
2660
  }
2662
2661
  function toDuration(value, unit) {
2663
2662
  if (!value)
2664
2663
  return undefined;
2665
- var duration = moment$5.duration(value, unit);
2664
+ var duration = moment$6.duration(value, unit);
2666
2665
  // fix 990+ ms
2667
2666
  if (duration.milliseconds() >= 990) {
2668
2667
  duration.add(1000 - duration.milliseconds(), 'ms');
@@ -3162,7 +3161,7 @@
3162
3161
  ngInit: [{ type: i0.Output }]
3163
3162
  };
3164
3163
 
3165
- var moment$4 = momentImported__namespace;
3164
+ var moment$5 = momentImported__namespace;
3166
3165
  // @dynamic
3167
3166
  var SharedValidators = /** @class */ (function () {
3168
3167
  function SharedValidators() {
@@ -3179,14 +3178,6 @@
3179
3178
  this._REGEXP_CACHE.DOUBLE_BY_MAX_DECIMALS[maxDecimals] = new RegExp("^[-]?[0-9]+([.,][0-9]{1," + maxDecimals + "})?$");
3180
3179
  return this._REGEXP_CACHE.DOUBLE_BY_MAX_DECIMALS[maxDecimals];
3181
3180
  };
3182
- SharedValidators.validDate = function (control) {
3183
- var value = control.value;
3184
- var date = !value || moment$4.isMoment(value) ? value : moment$4(control.value, DATE_ISO_PATTERN);
3185
- if (date && (!date.isValid() || date.year() < 1970)) {
3186
- return { validDate: true };
3187
- }
3188
- return null;
3189
- };
3190
3181
  SharedValidators.latitude = function (control) {
3191
3182
  var value = control.value;
3192
3183
  if (isNotNil(value) && (value < -90 || value > 90)) {
@@ -3251,6 +3242,14 @@
3251
3242
  return null;
3252
3243
  };
3253
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
+ };
3254
3253
  SharedValidators.dateIsAfter = function (previousValue, errorParam, granularity) {
3255
3254
  return function (control) {
3256
3255
  var value = fromDateISOString(control.value);
@@ -3261,6 +3260,16 @@
3261
3260
  return null;
3262
3261
  };
3263
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
+ };
3264
3273
  SharedValidators.dateRangeEnd = function (startDateFieldName, msg) {
3265
3274
  var errorCode = msg ? 'msg' : 'dateRange';
3266
3275
  var error = msg ? { msg: msg } : { dateRange: true };
@@ -3356,6 +3365,7 @@
3356
3365
  pubkey: 'ERROR.FIELD_NOT_VALID_PUBKEY',
3357
3366
  validDate: 'ERROR.FIELD_NOT_VALID_DATE',
3358
3367
  dateIsAfter: 'ERROR.FIELD_NOT_VALID_DATE_AFTER',
3368
+ dateIsBefore: 'ERROR.FIELD_NOT_VALID_DATE_BEFORE',
3359
3369
  dateRange: 'ERROR.FIELD_NOT_VALID_DATE_RANGE',
3360
3370
  dateMinDuration: 'ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION',
3361
3371
  dateMaxDuration: 'ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION',
@@ -5333,6 +5343,7 @@
5333
5343
  var ɵ0$9 = noop$6;
5334
5344
  var MatDate = /** @class */ (function () {
5335
5345
  function MatDate(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
5346
+ this.platform = platform;
5336
5347
  this.dateAdapter = dateAdapter;
5337
5348
  this.translate = translate;
5338
5349
  this.formBuilder = formBuilder;
@@ -5342,21 +5353,30 @@
5342
5353
  this._onChangeCallback = noop$6;
5343
5354
  this._onTouchedCallback = noop$6;
5344
5355
  this._subscription = new rxjs.Subscription();
5345
- this.writing = true;
5346
- this.disabling = false;
5356
+ this._writing = true;
5357
+ this._disabling = false;
5358
+ this._readonly = false;
5347
5359
  this.dayMask = DAY_MASK$2;
5348
- this.disabled = false;
5349
5360
  this.floatLabel = 'auto';
5350
- this.readonly = false;
5351
5361
  this.compact = false;
5352
5362
  this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
5353
5363
  this.autofocus = false;
5364
+ this.startDate = null;
5354
5365
  this.clearable = false;
5355
- // Workaround because ion-datetime has issue (do not returned a ISO date)
5356
- this.mobile = platform.is('mobile');
5357
- this.keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
5366
+ this.timezone = null;
5358
5367
  this.locale = (translate.currentLang || translate.defaultLang).substr(0, 2);
5359
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
+ });
5360
5380
  Object.defineProperty(MatDate.prototype, "tabindex", {
5361
5381
  get: function () {
5362
5382
  return this._tabindex;
@@ -5373,71 +5393,72 @@
5373
5393
  });
5374
5394
  Object.defineProperty(MatDate.prototype, "value", {
5375
5395
  get: function () {
5376
- return toDateISOString(this._value);
5396
+ return this.formControl.value;
5377
5397
  },
5378
5398
  enumerable: false,
5379
5399
  configurable: true
5380
5400
  });
5381
5401
  MatDate.prototype.ngOnInit = function () {
5382
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;
5383
5405
  this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
5384
5406
  if (!this.formControl)
5385
5407
  throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-field>.');
5386
5408
  this.required = toBoolean(this.required, this.formControl.validator === i1.Validators.required);
5387
- // Redirect errors from main control, into day sub control
5388
- var $error = new rxjs.BehaviorSubject(null);
5389
- this.dayControl = this.formBuilder.control(null, function () { return $error.getValue(); });
5390
- // Add custom 'validDate' validator
5391
- this.formControl.setValidators(this.required ? [i1.Validators.required, SharedValidators.validDate] : SharedValidators.validDate);
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; });
5392
5418
  // Get patterns to display date
5393
- this.updatePattern(this.translate.instant('COMMON.DATE_PATTERN'));
5394
5419
  this._subscription.add(this.translate.get('COMMON.DATE_PATTERN')
5395
5420
  .subscribe(function (pattern) { return _this.updatePattern(pattern); }));
5396
5421
  this._subscription.add(this.dayControl.valueChanges
5397
5422
  .subscribe(function (value) { return _this.onFormChange(value); }));
5398
- // Listen status changes outside the component (e.g. when setErrors() is calling on the formControl)
5423
+ // Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
5399
5424
  this._subscription.add(this.formControl.statusChanges
5400
- .pipe(operators.filter(function () { return !_this.readonly && !_this.writing && !_this.disabling; })) // Skip
5401
- .subscribe(function (status) {
5402
- if (status === 'INVALID') {
5403
- $error.next(_this.formControl.errors);
5404
- }
5405
- else if (status === 'VALID') {
5406
- $error.next(null);
5407
- }
5408
- _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 });
5409
5429
  _this.markForCheck();
5410
5430
  }));
5411
5431
  this.updateTabIndex();
5412
- this.writing = false;
5432
+ this._writing = false;
5413
5433
  };
5414
5434
  MatDate.prototype.ngOnDestroy = function () {
5415
5435
  this._subscription.unsubscribe();
5416
5436
  };
5417
- MatDate.prototype.writeValue = function (obj) {
5418
- if (this.writing)
5419
- return;
5420
- // console.debug('[mat-date] writeValue:', obj);
5421
- if (isNilOrBlank(obj)) {
5422
- this.writing = true;
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()) {
5423
5445
  this.dayControl.patchValue(null, { emitEvent: false });
5424
- this._value = undefined;
5425
5446
  if (this.formControl.value) {
5426
5447
  this.formControl.patchValue(null, { emitEvent: false });
5427
5448
  this._onChangeCallback(null);
5428
5449
  }
5429
- this.writing = false;
5430
- this.markForCheck();
5431
- return;
5432
5450
  }
5433
- this._value = this.dateAdapter.parse(obj, DATE_ISO_PATTERN);
5434
- if (!this._value) { // invalid date
5435
- return;
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 });
5436
5460
  }
5437
- this.writing = true;
5438
- // Set form value
5439
- this.dayControl.patchValue(this.dateAdapter.format(this._value.clone().startOf('day'), this.dayPattern), { emitEvent: false });
5440
- this.writing = false;
5461
+ this._writing = false;
5441
5462
  this.markForCheck();
5442
5463
  };
5443
5464
  MatDate.prototype.registerOnChange = function (fn) {
@@ -5447,37 +5468,39 @@
5447
5468
  this._onTouchedCallback = fn;
5448
5469
  };
5449
5470
  MatDate.prototype.setDisabledState = function (isDisabled) {
5450
- if (this.disabling)
5471
+ if (this._disabling)
5451
5472
  return;
5452
- this.disabling = true;
5453
- this.disabled = isDisabled;
5473
+ this._disabling = true;
5454
5474
  if (isDisabled) {
5455
- this.dayControl.disable({ onlySelf: true, emitEvent: false });
5475
+ this.dayControl.disable({ emitEvent: false });
5456
5476
  }
5457
5477
  else {
5458
- this.dayControl.enable({ onlySelf: true, emitEvent: false });
5478
+ this.dayControl.enable({ emitEvent: false });
5459
5479
  }
5460
- this.disabling = false;
5480
+ this._disabling = false;
5461
5481
  this.markForCheck();
5462
5482
  };
5463
5483
  MatDate.prototype.onDatePickerChange = function (event) {
5464
- if (this.writing || !(event && event.value))
5465
- return; // Skip if call by self
5466
- this.writing = true;
5467
- var date = event.value;
5468
- date = typeof date === 'string' && this.dateAdapter.parse(date, DATE_ISO_PATTERN) || date;
5469
- var day;
5470
- // avoid to have TZ offset
5471
- date = date && date.utc(true).hour(0).minute(0).seconds(0).millisecond(0);
5472
- day = date && date.clone().startOf('day');
5473
- // update day value
5474
- this.dayControl.setValue(date && this.dateAdapter.format(day, this.dayPattern), { emitEvent: false });
5475
- // Get the model value
5476
- var dateStr = date && this.dateAdapter.format(date, DATE_ISO_PATTERN).replace('+00:00', 'Z');
5477
- this.formControl.patchValue(dateStr, { emitEvent: false });
5478
- this.writing = false;
5479
- this.markForCheck();
5480
- this._onChangeCallback(dateStr);
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
+ }
5481
5504
  };
5482
5505
  MatDate.prototype.openDatePickerIfMobile = function (event, datePicker) {
5483
5506
  return __awaiter(this, void 0, void 0, function () {
@@ -5528,6 +5551,13 @@
5528
5551
  }
5529
5552
  });
5530
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
+ };
5531
5561
  /* -- private method -- */
5532
5562
  MatDate.prototype.updatePattern = function (pattern) {
5533
5563
  pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
@@ -5537,36 +5567,29 @@
5537
5567
  this.markForCheck();
5538
5568
  }
5539
5569
  };
5540
- MatDate.prototype.onFormChange = function (dayValue) {
5541
- if (this.writing)
5542
- return; // Skip if call by self
5543
- this.writing = true;
5544
- // Make to remove placeholder chars
5545
- while (dayValue && dayValue.indexOf(this.placeholderChar) !== -1) {
5546
- dayValue = dayValue.replace(this.placeholderChar, '');
5547
- }
5548
- var date;
5549
- // Parse day string
5550
- date = dayValue && this.dateAdapter.parse(dayValue, this.dayPattern) || null;
5551
- // Reset time
5552
- date = date && date.utc(true).hour(0).minute(0).seconds(0).millisecond(0);
5553
- // update date picker
5554
- this._value = date && this.dateAdapter.parse(date.clone(), DATE_ISO_PATTERN);
5555
- // Get the model value
5556
- var dateStr = date && date.isValid() && this.dateAdapter.format(date, DATE_ISO_PATTERN).replace('+00:00', 'Z') || date;
5557
- //console.debug("[mat-date-time] Setting date: ", dateStr);
5558
- this.formControl.patchValue(dateStr, { emitEvent: false });
5559
- //this.formControl.updateValueAndValidity();
5560
- this.writing = false;
5561
- this.markForCheck();
5562
- this._onChangeCallback(dateStr);
5563
- };
5564
5570
  MatDate.prototype.checkIfTouched = function () {
5565
5571
  if (this.dayControl.touched) {
5566
- this.markForCheck();
5567
5572
  this._onTouchedCallback();
5573
+ this.markForCheck();
5568
5574
  }
5569
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 === null || date === void 0 ? void 0 : date.startOf('day').utc(); // Convert local date into utc (avoid TZ offset to be in the final string)
5589
+ // Set model value
5590
+ this.emitChange(date);
5591
+ this._writing = false;
5592
+ };
5570
5593
  MatDate.prototype.waitKeyboardHide = function (waitKeyboardDelay) {
5571
5594
  return __awaiter(this, void 0, void 0, function () {
5572
5595
  return __generator(this, function (_a) {
@@ -5581,8 +5604,8 @@
5581
5604
  case 1:
5582
5605
  // Wait hide occur
5583
5606
  _a.sent();
5584
- if (!(this.keyboardHideDelay > 0 && waitKeyboardDelay)) return [3 /*break*/, 3];
5585
- return [4 /*yield*/, sleep(this.keyboardHideDelay)];
5607
+ if (!(this._keyboardHideDelay > 0 && waitKeyboardDelay)) return [3 /*break*/, 3];
5608
+ return [4 /*yield*/, sleep(this._keyboardHideDelay)];
5586
5609
  case 2:
5587
5610
  _a.sent();
5588
5611
  _a.label = 3;
@@ -5591,6 +5614,18 @@
5591
5614
  });
5592
5615
  });
5593
5616
  };
5617
+ MatDate.prototype.emitChange = function (value) {
5618
+ // Get the model value
5619
+ var dateStr = toDateISOString(value) || null;
5620
+ if (this.formControl.value !== dateStr) {
5621
+ // DEBUG
5622
+ //console.debug('[matèdate-time] Emit new value: ' + dateStr);
5623
+ // Changes comes from inside function: use the callback
5624
+ this._onChangeCallback(dateStr);
5625
+ // Check if need to update controls
5626
+ this.checkIfTouched();
5627
+ }
5628
+ };
5594
5629
  MatDate.prototype.updateTabIndex = function () {
5595
5630
  var _this = this;
5596
5631
  if (isNil(this._tabindex) || this._tabindex === -1)
@@ -5603,6 +5638,14 @@
5603
5638
  _this.markForCheck();
5604
5639
  });
5605
5640
  };
5641
+ MatDate.prototype.markAsTouched = function (opts) {
5642
+ this.dayControl.markAsTouched(opts);
5643
+ this._onTouchedCallback();
5644
+ this.markForCheck();
5645
+ };
5646
+ MatDate.prototype.markAsDirty = function (opts) {
5647
+ this.formControl.markAsDirty(opts);
5648
+ };
5606
5649
  MatDate.prototype.markForCheck = function () {
5607
5650
  this.cd.markForCheck();
5608
5651
  };
@@ -5611,7 +5654,7 @@
5611
5654
  MatDate.decorators = [
5612
5655
  { type: i0.Component, args: [{
5613
5656
  selector: 'mat-date-field',
5614
- template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></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 control -->\n <input matInput type=\"text\"\n [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\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)=\"writeValue(null)\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('validDate')\" translate>ERROR.FIELD_NOT_VALID_DATE</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateIsAfter')\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateRange')\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMaxDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMinDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngIf=\"formControl.hasError('msg')\">{{formControl.errors.msg}}</mat-error>\n </mat-form-field>\n\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\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>\n\n",
5657
+ 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",
5615
5658
  providers: [
5616
5659
  DEFAULT_VALUE_ACCESSOR$5,
5617
5660
  ],
@@ -5629,19 +5672,20 @@
5629
5672
  { type: i1.FormGroupDirective, decorators: [{ type: i0.Optional }] }
5630
5673
  ]; };
5631
5674
  MatDate.propDecorators = {
5632
- disabled: [{ type: i0.Input }],
5633
5675
  formControl: [{ type: i0.Input }],
5634
5676
  formControlName: [{ type: i0.Input }],
5635
5677
  placeholder: [{ type: i0.Input }],
5636
5678
  floatLabel: [{ type: i0.Input }],
5637
- readonly: [{ type: i0.Input }],
5638
5679
  required: [{ type: i0.Input }],
5680
+ mobile: [{ type: i0.Input }],
5639
5681
  compact: [{ type: i0.Input }],
5640
5682
  placeholderChar: [{ type: i0.Input }],
5641
5683
  autofocus: [{ type: i0.Input }],
5642
- tabindex: [{ type: i0.Input }],
5643
5684
  startDate: [{ type: i0.Input }],
5644
5685
  clearable: [{ type: i0.Input }],
5686
+ timezone: [{ type: i0.Input }],
5687
+ readonly: [{ type: i0.Input }],
5688
+ tabindex: [{ type: i0.Input }],
5645
5689
  datePicker: [{ type: i0.ViewChild, args: ['datePicker',] }],
5646
5690
  matInputs: [{ type: i0.ViewChildren, args: ['matInput',] }]
5647
5691
  };
@@ -5654,8 +5698,7 @@
5654
5698
  var DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
5655
5699
  var HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
5656
5700
  var HOUR_MASK$1 = [/[012]/, /\d/, ':', /[012345]/, /\d/];
5657
- var noop$5 = function () {
5658
- };
5701
+ var noop$5 = function () { };
5659
5702
  var ɵ0$8 = noop$5;
5660
5703
  var MatDateTime = /** @class */ (function () {
5661
5704
  function MatDateTime(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
@@ -5669,8 +5712,8 @@
5669
5712
  this._onChangeCallback = noop$5;
5670
5713
  this._onTouchedCallback = noop$5;
5671
5714
  this._subscription = new rxjs.Subscription();
5672
- this.writing = true;
5673
- this.disabling = false;
5715
+ this._writing = true;
5716
+ this._disabling = false;
5674
5717
  this._readonly = false;
5675
5718
  this.dayMask = DAY_MASK$1;
5676
5719
  this.hourMask = HOUR_MASK$1;
@@ -5717,7 +5760,7 @@
5717
5760
  MatDateTime.prototype.ngOnInit = function () {
5718
5761
  var _this = this;
5719
5762
  this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
5720
- this.keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
5763
+ this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
5721
5764
  this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
5722
5765
  if (!this.formControl)
5723
5766
  throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-time-field>.');
@@ -5744,19 +5787,19 @@
5744
5787
  .subscribe(function (event) { return _this.onFormChange(event); }));
5745
5788
  // Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
5746
5789
  this._subscription.add(this.formControl.statusChanges
5747
- .pipe(operators.filter(function (_) { return !_this.readonly && !_this.writing && !_this.disabling; }) // Skip
5790
+ .pipe(operators.filter(function (_) { return !_this.readonly && !_this._writing && !_this._disabling; }) // Skip
5748
5791
  )
5749
5792
  .subscribe(function () { return _this.markForCheck(); }));
5750
5793
  this.updateTabIndex();
5751
- this.writing = false;
5794
+ this._writing = false;
5752
5795
  };
5753
5796
  MatDateTime.prototype.ngOnDestroy = function () {
5754
5797
  this._subscription.unsubscribe();
5755
5798
  };
5756
5799
  MatDateTime.prototype.writeValue = function (valueStr) {
5757
- if (this.writing)
5800
+ if (this._writing)
5758
5801
  return; // Skip
5759
- this.writing = true;
5802
+ this._writing = true;
5760
5803
  // DEBUG
5761
5804
  // console.debug("[mat-date-time] writeValue() with:", valueStr);
5762
5805
  var value = fromDateISOString(valueStr);
@@ -5765,10 +5808,10 @@
5765
5808
  this.timeFormControl.patchValue(null, { emitEvent: false });
5766
5809
  }
5767
5810
  else {
5768
- // Parse day
5811
+ // Format day
5769
5812
  var day = value.clone().startOf('day');
5770
5813
  var dayStr = this.dateAdapter.format(day, this.dayPattern);
5771
- // Parse time
5814
+ // Format time
5772
5815
  // - Format hh
5773
5816
  var hour = value.hour();
5774
5817
  hour = hour < 10 ? ('0' + hour) : hour;
@@ -5780,46 +5823,9 @@
5780
5823
  this.dateFormControl.patchValue(dayStr, { emitEvent: false });
5781
5824
  this.timeFormControl.patchValue(timeStr, { emitEvent: false });
5782
5825
  }
5783
- this.writing = false;
5826
+ this._writing = false;
5784
5827
  this.markForCheck();
5785
5828
  };
5786
- MatDateTime.prototype.onFormChange = function (event) {
5787
- if (this.writing)
5788
- return; // Skip if call by self
5789
- this.writing = true;
5790
- var dayStr = this.dateFormControl.value;
5791
- var time = this.timeFormControl.value;
5792
- // DEBUG
5793
- //console.debug(`[mat-date-time] onFormChange() from event: ${event} - controls values: `, [dayStr, time]);
5794
- var incompleteValue = isNilOrBlank(time) !== isNilOrBlank(dayStr);
5795
- if (incompleteValue || this.dateFormControl.invalid || this.timeFormControl.invalid) {
5796
- this.formControl.markAsPending({ onlySelf: true });
5797
- this.formControl.setErrors(Object.assign(Object.assign(Object.assign({ validDate: incompleteValue }, this.formControl.errors), this.dateFormControl.errors), this.timeFormControl.errors));
5798
- this.formControl.markAsDirty();
5799
- // Reset the value
5800
- //this.emitChange(null);
5801
- this.writing = false;
5802
- return;
5803
- }
5804
- // Make to remove placeholder chars
5805
- while (dayStr && dayStr.indexOf(this.placeholderChar) !== -1) {
5806
- dayStr = dayStr.replace(this.placeholderChar, '');
5807
- }
5808
- // Parse day
5809
- var day = dayStr && this.dateAdapter.parse(dayStr, this.dayPattern) || null;
5810
- // Parse time
5811
- var hourParts = (time || '').split(':');
5812
- var hour = parseInt(hourParts[0] || 0);
5813
- var minutes = parseInt(hourParts[1] || 0);
5814
- var dateTime = day && day
5815
- .locale(this.locale) // set as time as locale time
5816
- .hour(hour).minute(minutes) // Set local hour
5817
- .seconds(0).millisecond(0) // Reset seconds/millisecond
5818
- .utc(); // Convert to UTC (avoid TZ offset in final string)
5819
- // Set model value
5820
- this.emitChange(dateTime);
5821
- this.writing = false;
5822
- };
5823
5829
  MatDateTime.prototype.registerOnChange = function (fn) {
5824
5830
  this._onChangeCallback = fn;
5825
5831
  };
@@ -5827,9 +5833,9 @@
5827
5833
  this._onTouchedCallback = fn;
5828
5834
  };
5829
5835
  MatDateTime.prototype.setDisabledState = function (isDisabled) {
5830
- if (this.disabling)
5836
+ if (this._disabling)
5831
5837
  return; // Skip
5832
- this.disabling = true;
5838
+ this._disabling = true;
5833
5839
  if (isDisabled) {
5834
5840
  this.dateFormControl.disable({ emitEvent: false });
5835
5841
  this.timeFormControl.disable({ emitEvent: false });
@@ -5838,7 +5844,7 @@
5838
5844
  this.dateFormControl.enable({ emitEvent: false });
5839
5845
  this.timeFormControl.enable({ emitEvent: false });
5840
5846
  }
5841
- this.disabling = false;
5847
+ this._disabling = false;
5842
5848
  this.markForCheck();
5843
5849
  };
5844
5850
  MatDateTime.prototype.onDatePickerChange = function (event) {
@@ -5963,6 +5969,43 @@
5963
5969
  this.markForCheck();
5964
5970
  }
5965
5971
  };
5972
+ MatDateTime.prototype.onFormChange = function (event) {
5973
+ if (this._writing)
5974
+ return; // Skip if call by self
5975
+ this._writing = true;
5976
+ var dayStr = this.dateFormControl.value;
5977
+ var time = this.timeFormControl.value;
5978
+ // DEBUG
5979
+ //console.debug(`[mat-date-time] onFormChange() from event: ${event} - controls values: `, [dayStr, time]);
5980
+ var incompleteValue = isNilOrBlank(time) !== isNilOrBlank(dayStr);
5981
+ if (incompleteValue || this.dateFormControl.invalid || this.timeFormControl.invalid) {
5982
+ this.formControl.markAsPending({ onlySelf: true });
5983
+ this.formControl.setErrors(Object.assign(Object.assign(Object.assign({ validDate: incompleteValue }, this.formControl.errors), this.dateFormControl.errors), this.timeFormControl.errors));
5984
+ this.formControl.markAsDirty();
5985
+ // Reset the value
5986
+ //this.emitChange(null);
5987
+ this._writing = false;
5988
+ return;
5989
+ }
5990
+ // Make to remove placeholder chars
5991
+ while (dayStr && dayStr.indexOf(this.placeholderChar) !== -1) {
5992
+ dayStr = dayStr.replace(this.placeholderChar, '');
5993
+ }
5994
+ // Parse day
5995
+ var day = dayStr && this.dateAdapter.parse(dayStr, this.dayPattern) || null;
5996
+ // Parse time
5997
+ var hourParts = (time || '').split(':');
5998
+ var hour = parseInt(hourParts[0] || 0);
5999
+ var minutes = parseInt(hourParts[1] || 0);
6000
+ var dateTime = day && day
6001
+ .locale(this.locale) // set as time as locale time
6002
+ .hour(hour).minute(minutes) // Set local hour
6003
+ .seconds(0).millisecond(0) // Reset seconds/millisecond
6004
+ .utc(); // Convert to UTC (avoid TZ offset in final string)
6005
+ // Set model value
6006
+ this.emitChange(dateTime);
6007
+ this._writing = false;
6008
+ };
5966
6009
  MatDateTime.prototype.waitKeyboardHide = function (waitKeyboardDelay) {
5967
6010
  return __awaiter(this, void 0, void 0, function () {
5968
6011
  return __generator(this, function (_a) {
@@ -5977,8 +6020,8 @@
5977
6020
  case 1:
5978
6021
  // Wait hide occur
5979
6022
  _a.sent();
5980
- if (!(this.keyboardHideDelay > 0 && waitKeyboardDelay)) return [3 /*break*/, 3];
5981
- return [4 /*yield*/, sleep(this.keyboardHideDelay)];
6023
+ if (!(this._keyboardHideDelay > 0 && waitKeyboardDelay)) return [3 /*break*/, 3];
6024
+ return [4 /*yield*/, sleep(this._keyboardHideDelay)];
5982
6025
  case 2:
5983
6026
  _a.sent();
5984
6027
  _a.label = 3;
@@ -6011,9 +6054,9 @@
6011
6054
  _this.markForCheck();
6012
6055
  });
6013
6056
  };
6014
- MatDateTime.prototype.markAsTouched = function () {
6015
- this.dateFormControl.markAsTouched();
6016
- this.timeFormControl.markAsTouched();
6057
+ MatDateTime.prototype.markAsTouched = function (opts) {
6058
+ this.dateFormControl.markAsTouched(opts);
6059
+ this.timeFormControl.markAsTouched(opts);
6017
6060
  this._onTouchedCallback();
6018
6061
  this.markForCheck();
6019
6062
  };
@@ -6028,7 +6071,7 @@
6028
6071
  MatDateTime.decorators = [
6029
6072
  { type: i0.Component, args: [{
6030
6073
  selector: 'mat-date-time-field',
6031
- 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 #datePickerButton2 (click)=\"openDatePicker($event, datePicker)\" [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=\"'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",
6074
+ 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",
6032
6075
  providers: [
6033
6076
  DEFAULT_VALUE_ACCESSOR$4,
6034
6077
  ],
@@ -11531,7 +11574,7 @@
11531
11574
  onRefresh: [{ type: i0.Input }]
11532
11575
  };
11533
11576
 
11534
- var moment$3 = momentImported__namespace;
11577
+ var moment$4 = momentImported__namespace;
11535
11578
  var SETTINGS_STORAGE_KEY = 'settings';
11536
11579
  var SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
11537
11580
  // fixme: this constant points to static environment
@@ -11833,11 +11876,11 @@
11833
11876
  if (!feature) {
11834
11877
  feature = {
11835
11878
  name: featureName.toLowerCase(),
11836
- lastSyncDate: moment$3().toISOString()
11879
+ lastSyncDate: moment$4().toISOString()
11837
11880
  };
11838
11881
  }
11839
11882
  else {
11840
- feature.lastSyncDate = moment$3().toISOString();
11883
+ feature.lastSyncDate = moment$4().toISOString();
11841
11884
  }
11842
11885
  this.saveOfflineFeature(feature);
11843
11886
  };
@@ -12031,7 +12074,7 @@
12031
12074
  if (!page || !page.title || !page.path)
12032
12075
  throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
12033
12076
  // Set time
12034
- page.time = page.time || moment$3();
12077
+ page.time = page.time || moment$4();
12035
12078
  // Clean the title (remove <small> tags)
12036
12079
  if (!opts || opts.removeTitleSmallTag !== false) {
12037
12080
  var tagIndex = page.title.indexOf('</small>');
@@ -17675,7 +17718,7 @@
17675
17718
  ]; };
17676
17719
  var templateObject_1$3, templateObject_2$3, templateObject_3$2, templateObject_4$2, templateObject_5$1;
17677
17720
 
17678
- var moment$2 = momentImported__namespace;
17721
+ var moment$3 = momentImported__namespace;
17679
17722
  var PlatformService = /** @class */ (function (_super) {
17680
17723
  __extends(PlatformService, _super);
17681
17724
  function PlatformService(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
@@ -17935,16 +17978,16 @@
17935
17978
  }
17936
17979
  // config moment lib
17937
17980
  try {
17938
- moment$2.locale(event.lang);
17981
+ moment$3.locale(event.lang);
17939
17982
  console.debug('[platform] Use locale {' + event.lang + '}');
17940
17983
  }
17941
17984
  // If error, fallback to en
17942
17985
  catch (err) {
17943
- moment$2.locale('en');
17986
+ moment$3.locale('en');
17944
17987
  console.warn('[platform] Unknown local for moment lib. Using default [en]');
17945
17988
  }
17946
17989
  // Config date adapter
17947
- _this.dateAdapter.setLocale(moment$2.locale());
17990
+ _this.dateAdapter.setLocale(moment$3.locale());
17948
17991
  }
17949
17992
  });
17950
17993
  this.settings.onChange.subscribe(function (data) {
@@ -29885,13 +29928,13 @@
29885
29928
  { type: i1.FormBuilder }
29886
29929
  ]; };
29887
29930
 
29888
- var moment$1 = momentImported__namespace;
29931
+ var moment$2 = momentImported__namespace;
29889
29932
  var SwipeTestPage = /** @class */ (function () {
29890
29933
  function SwipeTestPage(formBuilder, dateFormatPipe) {
29891
29934
  this.formBuilder = formBuilder;
29892
29935
  this.dateFormatPipe = dateFormatPipe;
29893
29936
  this.$dates = new rxjs.BehaviorSubject(undefined);
29894
- this._today = moment$1().startOf('day');
29937
+ this._today = moment$2().startOf('day');
29895
29938
  this.form = formBuilder.group({
29896
29939
  empty: [null, i1.Validators.required],
29897
29940
  date: [null, i1.Validators.compose([i1.Validators.required, SharedValidators.validDate])],
@@ -29905,7 +29948,7 @@
29905
29948
  var _this = this;
29906
29949
  var dates = [];
29907
29950
  for (var d = 0; d < 7; d++) {
29908
- dates[d] = moment$1(this._today).add(d - 3, 'day');
29951
+ dates[d] = moment$2(this._today).add(d - 3, 'day');
29909
29952
  }
29910
29953
  this.$dates.next(dates);
29911
29954
  this.loadData();
@@ -29952,7 +29995,7 @@
29952
29995
  { type: DateFormatPipe }
29953
29996
  ]; };
29954
29997
 
29955
- var moment = momentImported__namespace;
29998
+ var moment$1 = momentImported__namespace;
29956
29999
  var DateTimeTestPage = /** @class */ (function () {
29957
30000
  function DateTimeTestPage(platform, formBuilder, cd) {
29958
30001
  this.platform = platform;
@@ -29988,7 +30031,7 @@
29988
30031
  var now, data;
29989
30032
  var _this = this;
29990
30033
  return __generator(this, function (_a) {
29991
- now = moment();
30034
+ now = moment$1();
29992
30035
  data = {
29993
30036
  empty: toDateISOString(now.clone().add(2, 'hours')),
29994
30037
  enable: toDateISOString(now),
@@ -30264,9 +30307,118 @@
30264
30307
  { type: i1.FormBuilder }
30265
30308
  ]; };
30266
30309
 
30310
+ var moment = momentImported__namespace;
30311
+ var DateTestPage = /** @class */ (function () {
30312
+ function DateTestPage(platform, formBuilder, cd) {
30313
+ this.platform = platform;
30314
+ this.formBuilder = formBuilder;
30315
+ this.cd = cd;
30316
+ this.showLogPanel = true;
30317
+ this.logContent = '';
30318
+ this.memoryHide = false;
30319
+ this.memoryMobile = true;
30320
+ this.timezone = 'Indian/Mahe';
30321
+ this.stringify = JSON.stringify;
30322
+ this.form = formBuilder.group({
30323
+ empty: [null, i1.Validators.required],
30324
+ enable: [null, i1.Validators.required],
30325
+ disable: [null, i1.Validators.required],
30326
+ readonly: [null],
30327
+ timezone: [null]
30328
+ }, {
30329
+ validators: SharedFormGroupValidators.dateRange('empty', 'enable')
30330
+ });
30331
+ var disableControl = this.form.get('disable');
30332
+ disableControl.disable();
30333
+ // Copy the 'enable' value, into the disable control
30334
+ this.form.get('enable').valueChanges.subscribe(function (value) { return disableControl.setValue(value); });
30335
+ var mobile = platform.is('mobile');
30336
+ this.showLogPanel = this.showLogPanel || mobile;
30337
+ }
30338
+ DateTestPage.prototype.ngOnInit = function () {
30339
+ var _this = this;
30340
+ setTimeout(function () { return _this.loadData(); }, 250);
30341
+ };
30342
+ // Load the form with data
30343
+ DateTestPage.prototype.loadData = function () {
30344
+ return __awaiter(this, void 0, void 0, function () {
30345
+ var now, nowAtMahe, data;
30346
+ var _this = this;
30347
+ return __generator(this, function (_a) {
30348
+ now = moment();
30349
+ nowAtMahe = now.clone().tz(this.timezone).startOf('day');
30350
+ data = {
30351
+ empty: toDateISOString(now.clone().add(2, 'hours')),
30352
+ enable: toDateISOString(now),
30353
+ disable: now.clone(),
30354
+ readonly: now.clone(),
30355
+ timezone: nowAtMahe
30356
+ };
30357
+ this.form.setValue(data);
30358
+ this.log('[test-page] Data loaded: ' + JSON.stringify(data));
30359
+ this.form.get('empty').valueChanges
30360
+ .pipe(operators.debounceTime(300))
30361
+ .subscribe(function (value) { return _this.log('[test-page] Value n°1: ' + JSON.stringify(value)); });
30362
+ this.form.get('enable').valueChanges
30363
+ .pipe(operators.debounceTime(300))
30364
+ .subscribe(function (value) { return _this.log('[test-page] Value n°2: ' + JSON.stringify(value)); });
30365
+ this.form.get('timezone').valueChanges
30366
+ .pipe(operators.debounceTime(300))
30367
+ .subscribe(function (value) { return _this.log('[test-page] Value with timezone: ' + JSON.stringify(value)); });
30368
+ return [2 /*return*/];
30369
+ });
30370
+ });
30371
+ };
30372
+ DateTestPage.prototype.doSubmit = function (event) {
30373
+ this.form.markAllAsTouched();
30374
+ this.log('[test-page] Form content: ' + JSON.stringify(this.form.value));
30375
+ this.log('[test-page] Form status: ' + this.form.status);
30376
+ if (this.form.invalid) {
30377
+ this.log('[test-page] Form errors: ' + JSON.stringify(this.form.errors));
30378
+ // DEBUG
30379
+ AppFormUtils.logFormErrors(this.form);
30380
+ }
30381
+ };
30382
+ DateTestPage.prototype.log = function (message) {
30383
+ console.debug(message);
30384
+ if (this.showLogPanel) {
30385
+ this.logContent += message + '<br/>';
30386
+ this.cd.markForCheck();
30387
+ }
30388
+ };
30389
+ DateTestPage.prototype.clearLogPanel = function () {
30390
+ this.logContent = '';
30391
+ this.cd.markForCheck();
30392
+ };
30393
+ DateTestPage.prototype.startMemoryTimer = function () {
30394
+ var _this = this;
30395
+ this.memoryTimer = setInterval(function () {
30396
+ _this.memoryHide = !_this.memoryHide;
30397
+ }, 50);
30398
+ };
30399
+ DateTestPage.prototype.stopMemoryTimer = function () {
30400
+ clearInterval(this.memoryTimer);
30401
+ this.memoryTimer = null;
30402
+ this.memoryHide = false;
30403
+ };
30404
+ return DateTestPage;
30405
+ }());
30406
+ DateTestPage.decorators = [
30407
+ { type: i0.Component, args: [{
30408
+ selector: 'app-data-test',
30409
+ 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"
30410
+ },] }
30411
+ ];
30412
+ DateTestPage.ctorParameters = function () { return [
30413
+ { type: i1$5.Platform },
30414
+ { type: i1.FormBuilder },
30415
+ { type: i0.ChangeDetectorRef }
30416
+ ]; };
30417
+
30267
30418
  var SHARED_MATERIAL_TESTING_PAGES = [
30268
30419
  { label: 'Shared Material components', divider: true },
30269
30420
  { label: 'Date/Time field', page: '/testing/shared/datetime' },
30421
+ { label: 'Date field', page: '/testing/shared/date' },
30270
30422
  { label: 'Autocomplete field', page: '/testing/shared/autocomplete' },
30271
30423
  { label: 'Lat/Long field', page: '/testing/shared/latlong' },
30272
30424
  { label: 'Numeric pad component', page: '/testing/shared/numpad' },
@@ -30291,6 +30443,11 @@
30291
30443
  pathMatch: 'full',
30292
30444
  component: DateTimeTestPage
30293
30445
  },
30446
+ {
30447
+ path: 'date',
30448
+ pathMatch: 'full',
30449
+ component: DateTestPage
30450
+ },
30294
30451
  {
30295
30452
  path: 'latlong',
30296
30453
  pathMatch: 'full',
@@ -30334,6 +30491,7 @@
30334
30491
  ],
30335
30492
  declarations: [
30336
30493
  DateTimeTestPage,
30494
+ DateTestPage,
30337
30495
  AutocompleteTestPage,
30338
30496
  LatLongTestPage,
30339
30497
  NumpadTestPage,
@@ -30345,6 +30503,7 @@
30345
30503
  SharedMaterialModule,
30346
30504
  i3.RouterModule,
30347
30505
  DateTimeTestPage,
30506
+ DateTestPage,
30348
30507
  AutocompleteTestPage,
30349
30508
  LatLongTestPage,
30350
30509
  NumpadTestPage,
@@ -31421,10 +31580,11 @@
31421
31580
  exports["ɵg"] = UserSettingsValidatorService;
31422
31581
  exports["ɵh"] = LocalSettingsValidatorService;
31423
31582
  exports["ɵi"] = AppIconComponent;
31424
- exports["ɵj"] = NumpadTestPage;
31425
- exports["ɵk"] = MatBadgeIconTestPage;
31426
- exports["ɵl"] = ToastTestingModule;
31427
- exports["ɵm"] = ToastTestingPage;
31583
+ exports["ɵj"] = DateTestPage;
31584
+ exports["ɵk"] = NumpadTestPage;
31585
+ exports["ɵl"] = MatBadgeIconTestPage;
31586
+ exports["ɵm"] = ToastTestingModule;
31587
+ exports["ɵn"] = ToastTestingPage;
31428
31588
 
31429
31589
  Object.defineProperty(exports, '__esModule', { value: true });
31430
31590