@wavemaker/app-ng-runtime 11.8.2-next.27364 → 11.8.2-next.27366

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.
@@ -2173,9 +2173,8 @@ const registerProps$1 = () => {
2173
2173
  registerFormWidget(FormWidgetType.TIMESTAMP, new Map(dateTimeProps));
2174
2174
  };
2175
2175
 
2176
- const _c0$1 = ["dateInput"];
2177
- const _c1$1 = ["wmDateTime", ""];
2178
- const _c2 = () => ({ standalone: true });
2176
+ const _c0$1 = ["wmDateTime", ""];
2177
+ const _c1$1 = () => ({ standalone: true });
2179
2178
  function DatetimeComponent_div_10_Template(rf, ctx) { if (rf & 1) {
2180
2179
  const _r2 = i0.ɵɵgetCurrentView();
2181
2180
  i0.ɵɵelementStart(0, "div", 12);
@@ -2189,7 +2188,7 @@ function DatetimeComponent_div_10_Template(rf, ctx) { if (rf & 1) {
2189
2188
  i0.ɵɵadvance();
2190
2189
  i0.ɵɵproperty("showMeridian", ctx_r2.ismeridian)("readonlyInput", ctx_r2.disabled || ctx_r2.readonly || ctx_r2.isCurrentDate);
2191
2190
  i0.ɵɵtwoWayProperty("ngModel", ctx_r2.bsTimeValue);
2192
- i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(12, _c2))("min", ctx_r2.minTime)("max", ctx_r2.maxTime)("hourStep", ctx_r2.hourstep)("minuteStep", ctx_r2.minutestep)("secondsStep", ctx_r2.secondsstep)("mousewheel", true)("arrowkeys", true)("showSeconds", ctx_r2.showseconds);
2191
+ i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(12, _c1$1))("min", ctx_r2.minTime)("max", ctx_r2.maxTime)("hourStep", ctx_r2.hourstep)("minuteStep", ctx_r2.minutestep)("secondsStep", ctx_r2.secondsstep)("mousewheel", true)("arrowkeys", true)("showSeconds", ctx_r2.showseconds);
2193
2192
  } }
2194
2193
  function DatetimeComponent_ng_template_11_Template(rf, ctx) { if (rf & 1) {
2195
2194
  const _r4 = i0.ɵɵgetCurrentView();
@@ -2222,10 +2221,7 @@ class DatetimeComponent extends BaseDateTimeComponent {
2222
2221
  * @returns {any|string}
2223
2222
  */
2224
2223
  get displayValue() {
2225
- if (this.showdateformatasplaceholder && this.imask?.maskRef && this.maskDateInputFormat) {
2226
- return getFormattedDate(this.datePipe, this.bsDateValue, this.maskDateInputFormat, this.timeZone, null, this.isCurrentDate, this) || '';
2227
- }
2228
- return getFormattedDate(this.datePipe, this.bsDateValue, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this) || '';
2224
+ return getFormattedDate(this.datePipe, this.proxyModel, this.dateInputFormat, this.timeZone, this.key, this.isCurrentDate, this) || '';
2229
2225
  }
2230
2226
  get nativeDisplayValue() {
2231
2227
  return getFormattedDate(this.datePipe, this.proxyModel, 'yyyy-MM-ddTHH:mm:ss', this.timeZone, this.key, this.isCurrentDate, this) || '';
@@ -2260,7 +2256,6 @@ class DatetimeComponent extends BaseDateTimeComponent {
2260
2256
  this.cdRef = cdRef;
2261
2257
  this.appDefaults = appDefaults;
2262
2258
  this.isEnterPressedOnDateInput = false;
2263
- this.showdateformatasplaceholder = false;
2264
2259
  /**
2265
2260
  * This property checks if the timePicker is Open
2266
2261
  */
@@ -2376,23 +2371,12 @@ class DatetimeComponent extends BaseDateTimeComponent {
2376
2371
  const datePickerContainer = $('.bs-datepicker-container')[0];
2377
2372
  this.focusTrap = setFocusTrap(datePickerContainer, true);
2378
2373
  this.focusTrap.activate();
2379
- this.activeDate = this.bsDateValue ? this.bsDateValue : (this.timeZone ? getMomentLocaleObject(this.timeZone) : new Date());
2374
+ this.bsDateValue ? this.activeDate = this.bsDateValue : this.activeDate = new Date();
2380
2375
  if (!this.bsDateValue) {
2381
2376
  this.hightlightToday(this.activeDate);
2382
2377
  }
2383
2378
  this.addDatepickerKeyboardEvents(this, true);
2384
2379
  adjustContainerPosition($('bs-datepicker-container'), this.nativeElement, this.bsDatePickerDirective._datepicker);
2385
- if (this.timeZone) {
2386
- const todayBtn = document.querySelector(`.${this.dateContainerCls} .bs-datepicker-buttons .btn-today-wrapper button`);
2387
- const setTodayTZHandler = (event) => {
2388
- const todayTZ = getMomentLocaleObject(this.timeZone);
2389
- if (new Date(this.bsDateValue).toDateString() !== new Date(todayTZ).toDateString()) {
2390
- this.bsDateValue = todayTZ;
2391
- }
2392
- todayBtn.removeEventListener('click', setTodayTZHandler);
2393
- };
2394
- todayBtn.addEventListener('click', setTodayTZHandler);
2395
- }
2396
2380
  }
2397
2381
  /**
2398
2382
  * This is an internal method to update the model
@@ -2404,9 +2388,6 @@ class DatetimeComponent extends BaseDateTimeComponent {
2404
2388
  $(this.nativeElement).find('.display-input').val(this.displayValue);
2405
2389
  }
2406
2390
  }
2407
- if (newVal && !this.bsDateValue && this.timeZone) {
2408
- newVal = getMomentLocaleObject(this.timeZone, newVal);
2409
- }
2410
2391
  // min date and max date validation in web.
2411
2392
  // if invalid dates are entered, device is showing validation message.
2412
2393
  this.minDateMaxDateValidationOnInput(newVal);
@@ -2617,17 +2598,15 @@ class DatetimeComponent extends BaseDateTimeComponent {
2617
2598
  static { this.ɵfac = function DatetimeComponent_Factory(t) { return new (t || DatetimeComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.AppDefaults), i0.ɵɵdirectiveInject(i1$1.App), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
2618
2599
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimeComponent, selectors: [["", "wmDateTime", ""]], viewQuery: function DatetimeComponent_Query(rf, ctx) { if (rf & 1) {
2619
2600
  i0.ɵɵviewQuery(BsDatepickerDirective, 5);
2620
- i0.ɵɵviewQuery(_c0$1, 5, IMaskDirective);
2621
2601
  } if (rf & 2) {
2622
2602
  let _t;
2623
2603
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.bsDatePickerDirective = _t.first);
2624
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.imask = _t.first);
2625
2604
  } }, features: [i0.ɵɵProvidersFeature([
2626
2605
  provideAs(DatetimeComponent, NG_VALUE_ACCESSOR, true),
2627
2606
  provideAs(DatetimeComponent, NG_VALIDATORS, true),
2628
2607
  provideAsWidgetRef(DatetimeComponent),
2629
2608
  { provide: TimepickerConfig, deps: [AbstractI18nService], useFactory: getTimepickerConfig }
2630
- ]), i0.ɵɵInheritDefinitionFeature], attrs: _c1$1, decls: 12, vars: 30, consts: [["datepicker", "bsDatepicker"], ["dropdown", "", "autoClose", "false", 2, "display", "inherit", 3, "onShown", "isOpen", "container"], ["focus-target", "", "type", "text", 1, "form-control", "app-textbox", "display-input", 3, "click", "focus", "blur", "change", "keydown", "name", "tabindex", "value", "autofocus", "disabled", "required", "readOnly"], [1, "input-group-btn"], ["type", "button", "aria-haspopup", "true", "aria-expanded", "false", 1, "btn", "btn-default", "btn-date", 3, "click", "tabindex", "disabled"], ["aria-hidden", "true", 1, "app-icon", "wm-sl-l", "sl-calendar"], ["type", "button", "aria-label", "Select time", "aria-haspopup", "true", "aria-expanded", "false", 1, "btn", "btn-default", "btn-time", 3, "click", "tabindex", "disabled"], ["aria-hidden", "true", 1, "app-icon", "wm-sl-l", "sl-time"], [2, "width", "0", "display", "inline-block"], ["aria-label", "datepicker dropdownmenu", "aria-controls", "date", "focus-target", "", "placement", "bottom right", "bsDatepicker", "", 1, "model-holder", 3, "onShown", "onHidden", "bsValueChange", "tabindex", "container", "bsConfig", "isOpen", "daysDisabled", "datesDisabled", "isDisabled", "bsValue"], ["class", "dropdown-menu", "aria-label", "timepicker dropdown", "aria-controls", "time", 3, "click", 4, "dropdownMenu"], [3, "ngIf"], ["aria-label", "timepicker dropdown", "aria-controls", "time", 1, "dropdown-menu", 3, "click"], [1, "model-holder", 3, "ngModelChange", "isValid", "showMeridian", "readonlyInput", "ngModel", "ngModelOptions", "min", "max", "hourStep", "minuteStep", "secondsStep", "mousewheel", "arrowkeys", "showSeconds"], ["dateTimePicker", "", 3, "change", "config", "placement", "excludedDaysToDisable", "excludedDatesToDisable", "displayFormat", "value"], ["role", "button", 1, "mobile-input", "mobile-datepicker-container", 3, "click", "focus", "blur", "tabindex"]], template: function DatetimeComponent_Template(rf, ctx) { if (rf & 1) {
2609
+ ]), i0.ɵɵInheritDefinitionFeature], attrs: _c0$1, decls: 12, vars: 30, consts: [["datepicker", "bsDatepicker"], ["dropdown", "", "autoClose", "false", 2, "display", "inherit", 3, "onShown", "isOpen", "container"], ["focus-target", "", "type", "text", 1, "form-control", "app-textbox", "display-input", 3, "click", "focus", "blur", "change", "keydown", "name", "tabindex", "value", "autofocus", "disabled", "required", "readOnly"], [1, "input-group-btn"], ["type", "button", "aria-haspopup", "true", "aria-expanded", "false", 1, "btn", "btn-default", "btn-date", 3, "click", "tabindex", "disabled"], ["aria-hidden", "true", 1, "app-icon", "wm-sl-l", "sl-calendar"], ["type", "button", "aria-label", "Select time", "aria-haspopup", "true", "aria-expanded", "false", 1, "btn", "btn-default", "btn-time", 3, "click", "tabindex", "disabled"], ["aria-hidden", "true", 1, "app-icon", "wm-sl-l", "sl-time"], [2, "width", "0", "display", "inline-block"], ["aria-label", "datepicker dropdownmenu", "aria-controls", "date", "focus-target", "", "placement", "bottom right", "bsDatepicker", "", 1, "model-holder", 3, "onShown", "onHidden", "bsValueChange", "tabindex", "container", "bsConfig", "isOpen", "daysDisabled", "datesDisabled", "isDisabled", "bsValue"], ["class", "dropdown-menu", "aria-label", "timepicker dropdown", "aria-controls", "time", 3, "click", 4, "dropdownMenu"], [3, "ngIf"], ["aria-label", "timepicker dropdown", "aria-controls", "time", 1, "dropdown-menu", 3, "click"], [1, "model-holder", 3, "ngModelChange", "isValid", "showMeridian", "readonlyInput", "ngModel", "ngModelOptions", "min", "max", "hourStep", "minuteStep", "secondsStep", "mousewheel", "arrowkeys", "showSeconds"], ["dateTimePicker", "", 3, "change", "config", "placement", "excludedDaysToDisable", "excludedDatesToDisable", "displayFormat", "value"], ["role", "button", 1, "mobile-input", "mobile-datepicker-container", 3, "click", "focus", "blur", "tabindex"]], template: function DatetimeComponent_Template(rf, ctx) { if (rf & 1) {
2631
2610
  const _r1 = i0.ɵɵgetCurrentView();
2632
2611
  i0.ɵɵelementStart(0, "div", 1);
2633
2612
  i0.ɵɵlistener("onShown", function DatetimeComponent_Template_div_onShown_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onTimepickerOpen()); });
@@ -2682,11 +2661,8 @@ class DatetimeComponent extends BaseDateTimeComponent {
2682
2661
  }] }], { bsDatePickerDirective: [{
2683
2662
  type: ViewChild,
2684
2663
  args: [BsDatepickerDirective]
2685
- }], imask: [{
2686
- type: ViewChild,
2687
- args: ['dateInput', { read: IMaskDirective }]
2688
2664
  }] }); })();
2689
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DatetimeComponent, { className: "DatetimeComponent", filePath: "date-time/date-time.component.ts", lineNumber: 57 }); })();
2665
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DatetimeComponent, { className: "DatetimeComponent", filePath: "date-time/date-time.component.ts", lineNumber: 56 }); })();
2690
2666
 
2691
2667
  const timeProps = new Map([
2692
2668
  ['autofocus', PROP_BOOLEAN],