@wavemaker/app-runtime-wm-build 11.4.2-rc.5379 → 11.5.0-next.141080

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/app-runtime-wm-build",
3
- "version": "11.4.2-rc.5379",
3
+ "version": "11.5.0-next.141080",
4
4
  "description": "All modules required for a wavemaker application.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4168,7 +4168,7 @@
4168
4168
  EXCLUDEDAYS: "excludedays"
4169
4169
  };
4170
4170
  var transformFileURI = function(url) {
4171
- if (_.isString(url) && hasCordova() && url.startsWith("file://")) {
4171
+ if (url && hasCordova() && url.startsWith("file://")) {
4172
4172
  if (isIos()) {
4173
4173
  return url.replace("file://", "/_app_file_");
4174
4174
  } else if (isAndroid() && location.href.startsWith("http")) {
@@ -17281,9 +17281,6 @@
17281
17281
  core$1.$appDigest();
17282
17282
  }), 150);
17283
17283
  _this.handleHeaderClick = core$1.noop;
17284
- _this.cancelLocaleChangeSubscription = _this.getAppInstance().subscribe("locale-changed", (function() {
17285
- _this._debouncedInitDatasetItems();
17286
- }));
17287
17284
  return _this;
17288
17285
  }
17289
17286
  Object.defineProperty(DatasetAwareFormComponent.prototype, "modelByKey", {
@@ -17496,11 +17493,6 @@
17496
17493
  this.toggleAllHeaders = base.toggleAllHeaders.bind(undefined, this);
17497
17494
  }
17498
17495
  };
17499
- DatasetAwareFormComponent.prototype.ngOnDestroy = function() {
17500
- if (this.cancelLocaleChangeSubscription) {
17501
- this.cancelLocaleChangeSubscription();
17502
- }
17503
- };
17504
17496
  return DatasetAwareFormComponent;
17505
17497
  }(BaseFormCustomComponent);
17506
17498
  DatasetAwareFormComponent.decorators = [ {
@@ -24054,11 +24046,6 @@
24054
24046
  i18nService.initCalendarLocale();
24055
24047
  FullCalendar.__wm_locale_initialized = true;
24056
24048
  }
24057
- _this.cancelLocaleChangeSubscription = _this.getAppInstance().subscribe("locale-changed", (function(libLocale) {
24058
- _this.setLocale();
24059
- _this.applyCalendarOptions("option", "locale", libLocale.fullCalendar || "en");
24060
- _this.redraw();
24061
- }));
24062
24049
  return _this;
24063
24050
  }
24064
24051
  CalendarComponent.prototype.selectDate = function() {
@@ -24521,11 +24508,6 @@
24521
24508
  }));
24522
24509
  }));
24523
24510
  };
24524
- CalendarComponent.prototype.ngOnDestroy = function() {
24525
- if (this.cancelLocaleChangeSubscription) {
24526
- this.cancelLocaleChangeSubscription();
24527
- }
24528
- };
24529
24511
  return CalendarComponent;
24530
24512
  }(base.StylableComponent);
24531
24513
  CalendarComponent.initializeProps = registerProps();
@@ -27113,7 +27095,7 @@
27113
27095
  type: core.Component,
27114
27096
  args: [ {
27115
27097
  selector: "wm-datetimepicker",
27116
- template: '\n <ng-template #datetimepickerTemplate>\n <div class="app-datetime-picker">\n <div class="modal-body">\n <div class="mobile-datetime-picker-options">\n\n </div>\n <bs-datepicker-inline\n [bsConfig]="bsDatepickerConfig"\n [datesDisabled]="excludedDatesToDisable"\n bsDatepicker\n [bsValue]="changedValue"\n (bsValueChange)="onDateUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'">\n </bs-datepicker-inline>\n <wm-timepicker\n [value]="changedValue"\n [min]="minTime"\n [max]="maxTime"\n (change)="onTimeUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"></wm-timepicker>\n <span class="text-primary date-picker-value">\n {{getDateLabel()}}\n </span>\n </div>\n <div class="modal-footer">\n <button\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'"\n class="btn btn-secondary today-btn"\n (click)="setToday()">{{appLocale.LABEL_TODAY_DATE || "Today" }}</button>\n <button\n class="btn btn-primary pull-right ok-btn"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"\n (click)="onOkClick()">{{appLocale.LABEL_OK || "Ok" }}</button>\n <button\n class="btn btn-secondary pull-right clear-btn"\n (click)="clear()">{{appLocale.LABEL_CLEAR_DATE || "Clear" }}</button>\n </div>\n </div>\n </ng-template>\n '
27098
+ template: ' \n <ng-template #datetimepickerTemplate>\n <div class="app-datetime-picker">\n <div class="modal-body">\n <div class="mobile-datetime-picker-options">\n \n </div>\n <bs-datepicker-inline\n [bsConfig]="bsDatepickerConfig"\n [datesDisabled]="excludedDatesToDisable"\n bsDatepicker\n [bsValue]="changedValue"\n (bsValueChange)="onDateUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'">\n </bs-datepicker-inline>\n <wm-timepicker\n [value]="changedValue"\n [min]="minTime"\n [max]="maxTime"\n (change)="onTimeUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"></wm-timepicker>\n <span class="text-primary date-picker-value">\n {{getDateLabel()}}\n </span>\n </div>\n <div class="modal-footer">\n <button\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'"\n class="btn btn-secondary today-btn"\n (click)="setToday()">{{appLocale.MESSAGE_DATE_PICKER_TODAY || "Today" }}</button>\n <button\n class="btn btn-primary pull-right ok-btn"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"\n (click)="onOkClick()">{{appLocale.MESSAGE_DATE_PICKER_OK || "Ok" }}</button>\n <button\n class="btn btn-secondary pull-right clear-btn"\n (click)="clear()">{{appLocale.MESSAGE_DATE_PICKER_CLEAR || "Clear" }}</button>\n </div>\n </div>\n </ng-template>\n '
27117
27099
  } ]
27118
27100
  } ];
27119
27101
  DateTimePickerComponent.ctorParameters = function() {
@@ -27253,7 +27235,7 @@
27253
27235
  type: core.Component,
27254
27236
  args: [ {
27255
27237
  selector: "wm-timepicker",
27256
- template: '\n <wm-pickergroup>\n <wm-picker\n [options]="options.hour"\n [selectedValue]="hour"\n (change)="set($event, \'HOUR\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="minute"\n (change)="set($event, \'MINUTE\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="second"\n (change)="set($event, \'SECOND\')"></wm-picker>\n </wm-pickergroup>\n '
27238
+ template: ' \n <wm-pickergroup>\n <wm-picker \n [options]="options.hour"\n [selectedValue]="hour"\n (change)="set($event, \'HOUR\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker \n [options]="options.minute"\n [selectedValue]="minute"\n (change)="set($event, \'MINUTE\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker \n [options]="options.minute"\n [selectedValue]="second"\n (change)="set($event, \'SECOND\')"></wm-picker>\n </wm-pickergroup>\n '
27257
27239
  } ]
27258
27240
  } ];
27259
27241
  TimePickerComponent.ctorParameters = function() {
@@ -27308,11 +27290,6 @@
27308
27290
  _this._dateOptions.clearPosition = "right";
27309
27291
  _this.meridians = common.getLocaleDayPeriods(_this.selectedLocale, common.FormStyle.Format, common.TranslationWidth.Abbreviated);
27310
27292
  _this.loadNativeDateInput = core$1.isMobile() && !_this.showcustompicker;
27311
- _this.cancelLocaleChangeSubscription = _this.getAppInstance().subscribe("locale-changed", (function(locale) {
27312
- _this.datePipe.datePipe.locale = locale.angular;
27313
- _this._dateOptions.todayButtonLabel = _this.i18nService.getLocalizedMessage("LABEL_TODAY_DATE");
27314
- _this._dateOptions.clearButtonLabel = _this.i18nService.getLocalizedMessage("LABEL_CLEAR_DATE");
27315
- }));
27316
27293
  return _this;
27317
27294
  }
27318
27295
  Object.defineProperty(BaseDateTimeComponent.prototype, "timeZone", {
@@ -27533,8 +27510,6 @@
27533
27510
  if (event.originalEvent) {
27534
27511
  _this.setFocusForDate(-1);
27535
27512
  }
27536
- var prevMon = _this.getMonth(_this.activeDate, -1);
27537
- $(".bs-datepicker-head .previous").prepend('<p aria-hidden="false" class="sr-only">Changed to Previous Month, ' + prevMon.fullMonth + " and year " + prevMon.date.getFullYear() + "</p>");
27538
27513
  setTimeout((function() {
27539
27514
  $(".bs-datepicker-head .previous").focus();
27540
27515
  }));
@@ -27546,8 +27521,6 @@
27546
27521
  if (event.originalEvent) {
27547
27522
  _this.setFocusForDate(1);
27548
27523
  }
27549
- var nextMon = _this.getMonth(_this.activeDate, 1);
27550
- $(".bs-datepicker-head .next").prepend('<p aria-hidden="false" class="sr-only">Changed to Next Month, ' + nextMon.fullMonth + " and year " + nextMon.date.getFullYear() + "</p>");
27551
27524
  setTimeout((function() {
27552
27525
  $(".bs-datepicker-head .next").focus();
27553
27526
  }));
@@ -27563,10 +27536,21 @@
27563
27536
  _this.setFocusForMonthOrDay();
27564
27537
  }
27565
27538
  }));
27566
- if (!this.clicked) {
27567
- datePickerHead.find(".next").attr("aria-label", "Next Month, " + this.next.fullMonth + " " + this.next.date.getFullYear());
27568
- datePickerHead.find(".previous").attr("aria-label", "Previous Month, " + this.prev.fullMonth + " " + this.prev.date.getFullYear());
27569
- }
27539
+ datePickerHead.find(".next").attr("aria-label", "Next Month, " + this.next.fullMonth + " " + this.next.date.getFullYear());
27540
+ datePickerHead.find(".previous").attr("aria-label", "Previous Month, " + this.prev.fullMonth + " " + this.prev.date.getFullYear());
27541
+ setTimeout((function() {
27542
+ var currentNodes = datePickerHead.find(".current span");
27543
+ var msg = "Changed to month ";
27544
+ datePickerHead.find(".current").attr("aria-live", "assertive").attr("aria-atomic", "false");
27545
+ if (_this.clicked) {
27546
+ if ($(currentNodes[0]).text()) {
27547
+ datePickerHead.find(".ng-star-inserted").prepend('<div class="sr-only">' + msg + "</div>");
27548
+ }
27549
+ if ($(currentNodes[1]).text()) {
27550
+ datePickerHead.find(".current").last().prepend('<div class="sr-only"> and year </div>');
27551
+ }
27552
+ }
27553
+ }));
27570
27554
  };
27571
27555
  BaseDateTimeComponent.prototype.setFocusForMonthOrDay = function() {
27572
27556
  var activeMonthOrYear = $(".bs-datepicker-head .current").first().text();
@@ -28086,9 +28070,6 @@
28086
28070
  if (this.dateOnShowSubscription) {
28087
28071
  this.dateOnShowSubscription.unsubscribe();
28088
28072
  }
28089
- if (this.cancelLocaleChangeSubscription) {
28090
- this.cancelLocaleChangeSubscription();
28091
- }
28092
28073
  _super.prototype.ngOnDestroy.call(this);
28093
28074
  };
28094
28075
  BaseDateTimeComponent.prototype.ngOnDetach = function() {
@@ -28322,6 +28303,7 @@
28322
28303
  this.invokeEventCallback("click", {
28323
28304
  $event: $event
28324
28305
  });
28306
+ this.focusOnInputEl();
28325
28307
  }
28326
28308
  if ($event.target && $($event.target).is("input") && !this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
28327
28309
  $event.stopPropagation();
@@ -28708,6 +28690,7 @@
28708
28690
  this.invokeEventCallback("click", {
28709
28691
  $event: $event
28710
28692
  });
28693
+ this.focusOnInputEl();
28711
28694
  }
28712
28695
  if ($event.target && $($event.target).is("input") && !this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
28713
28696
  $event.stopPropagation();
@@ -29029,6 +29012,7 @@
29029
29012
  this.invokeEventCallback("click", {
29030
29013
  $event: $event
29031
29014
  });
29015
+ this.focusOnInputEl();
29032
29016
  }
29033
29017
  if ($event.target && $($event.target).is("input") && !this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
29034
29018
  return;
@@ -68325,7 +68309,6 @@
68325
68309
  timezone: "",
68326
68310
  number: ""
68327
68311
  };
68328
- _this.bundleLoaded = {};
68329
68312
  _this.appLocale = {};
68330
68313
  _this.prefabLocale = new Map;
68331
68314
  return _this;
@@ -68392,8 +68375,6 @@
68392
68375
  _this.extendMessages(bundle.messages);
68393
68376
  _this.extendPrefabMessages(bundle);
68394
68377
  _this.appDefaults.setFormats(bundle.formats);
68395
- _this.bundleLoaded.app = true;
68396
- _this.notifyLocaleChanged();
68397
68378
  }));
68398
68379
  };
68399
68380
  I18nServiceImpl.prototype.loadMomentLocaleBundle = function(momentLocale) {
@@ -68410,8 +68391,6 @@
68410
68391
  _config = _config && _config._config;
68411
68392
  chronos.defineLocale(_this.selectedLocale, _config);
68412
68393
  _this.bsLocaleService.use(_this.getSelectedLocale() || _this.defaultSupportedLocale);
68413
- _this.bundleLoaded.moment = true;
68414
- _this.notifyLocaleChanged();
68415
68394
  }));
68416
68395
  };
68417
68396
  I18nServiceImpl.prototype.loadAngularLocaleBundle = function(angLocale) {
@@ -68441,7 +68420,6 @@
68441
68420
  return Promise.resolve();
68442
68421
  }
68443
68422
  if (!force && (i2.isMobile() || i2.isMobileApp() || this.selectedLocale === this.defaultSupportedLocale)) {
68444
- this.bundleLoaded.fullCalendar = true;
68445
68423
  return;
68446
68424
  }
68447
68425
  return i2.loadScripts([ path ], true);
@@ -68471,21 +68449,11 @@
68471
68449
  }));
68472
68450
  };
68473
68451
  I18nServiceImpl.prototype.loadLocaleBundles = function(libLocale) {
68474
- var _this = this;
68475
- var _a;
68476
68452
  if (libLocale.moment) {
68477
68453
  this.loadMomentLocaleBundle(libLocale.moment);
68478
- } else if (this.selectedLocale === this.defaultSupportedLocale) {
68479
- this.bsLocaleService.use(this.getSelectedLocale() || this.defaultSupportedLocale);
68480
- this.bundleLoaded.moment = true;
68481
68454
  }
68482
68455
  if (libLocale.fullCalendar && window["FullCalendar"]) {
68483
- (_a = this.loadCalendarLocaleBundle(libLocale.fullCalendar)) === null || _a === void 0 ? void 0 : _a.then((function() {
68484
- _this.bundleLoaded.fullCalendar = true;
68485
- _this.notifyLocaleChanged();
68486
- }));
68487
- } else {
68488
- this.bundleLoaded.fullCalendar = true;
68456
+ this.loadCalendarLocaleBundle(libLocale.fullCalendar);
68489
68457
  }
68490
68458
  if (libLocale.angular) {
68491
68459
  this.loadAppLocaleBundle();
@@ -68525,15 +68493,8 @@
68525
68493
  i2.setSessionStorageItem("selectedLocale", locale);
68526
68494
  this.selectedLocale = locale;
68527
68495
  this.init();
68528
- this.bundleLoaded.moment = false;
68529
- this.bundleLoaded.fullCalendar = false;
68530
- this.bundleLoaded.app = false;
68531
- this.bundleLoaded.angular = false;
68532
- this.bundleLoaded.libLocale = libLocale;
68533
68496
  return this.loadLocaleBundles(libLocale).then((function() {
68534
- _this.updateLocaleDirection();
68535
- _this.bundleLoaded.angular = true;
68536
- _this.notifyLocaleChanged();
68497
+ return _this.updateLocaleDirection();
68537
68498
  }));
68538
68499
  };
68539
68500
  I18nServiceImpl.prototype.deduceAppLocale = function() {
@@ -68569,7 +68530,6 @@
68569
68530
  return defaultLanguage;
68570
68531
  };
68571
68532
  I18nServiceImpl.prototype.loadDefaultLocale = function() {
68572
- Date.prototype["month"] = Date.prototype.getMonth;
68573
68533
  var locale = this.deduceAppLocale();
68574
68534
  return this.setSelectedLocale(locale);
68575
68535
  };
@@ -68607,11 +68567,6 @@
68607
68567
  I18nServiceImpl.prototype.getwidgetLocale = function() {
68608
68568
  return this.formatsByLocale;
68609
68569
  };
68610
- I18nServiceImpl.prototype.notifyLocaleChanged = function() {
68611
- if (this.bundleLoaded.moment && this.bundleLoaded.fullCalendar && this.bundleLoaded.angular && this.bundleLoaded.app) {
68612
- this.app.notify("locale-changed", this.bundleLoaded.libLocale);
68613
- }
68614
- };
68615
68570
  return I18nServiceImpl;
68616
68571
  }(i2.AbstractI18nService);
68617
68572
  I18nServiceImpl.decorators = [ {