@wavemaker/app-ng-runtime 11.4.3-next.25756 → 11.4.3-next.25758

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.
Files changed (40) hide show
  1. app-ng-runtime/components/input/calendar/bundles/index.umd.js +11 -1
  2. app-ng-runtime/components/input/calendar/bundles/index.umd.js.map +1 -1
  3. app-ng-runtime/components/input/calendar/calendar.component.d.ts +4 -2
  4. app-ng-runtime/components/input/calendar/esm2015/calendar.component.js +12 -2
  5. app-ng-runtime/components/input/calendar/fesm2015/index.js +11 -1
  6. app-ng-runtime/components/input/calendar/fesm2015/index.js.map +1 -1
  7. app-ng-runtime/components/input/calendar/index.metadata.json +1 -1
  8. app-ng-runtime/components/input/default/bundles/index.umd.js +9 -3
  9. app-ng-runtime/components/input/default/bundles/index.umd.js.map +1 -1
  10. app-ng-runtime/components/input/default/dataset-aware-form.component.d.ts +4 -2
  11. app-ng-runtime/components/input/default/esm2015/base-form-custom.component.js +2 -4
  12. app-ng-runtime/components/input/default/esm2015/dataset-aware-form.component.js +9 -1
  13. app-ng-runtime/components/input/default/fesm2015/index.js +9 -3
  14. app-ng-runtime/components/input/default/fesm2015/index.js.map +1 -1
  15. app-ng-runtime/components/input/default/index.metadata.json +1 -1
  16. app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +1 -0
  17. app-ng-runtime/components/input/epoch/bundles/index.umd.js +21 -23
  18. app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
  19. app-ng-runtime/components/input/epoch/esm2015/base-date-time.component.js +17 -19
  20. app-ng-runtime/components/input/epoch/esm2015/date/date.component.js +2 -2
  21. app-ng-runtime/components/input/epoch/esm2015/date-time/date-time-picker.component.js +10 -10
  22. app-ng-runtime/components/input/epoch/esm2015/date-time/date-time.component.js +2 -2
  23. app-ng-runtime/components/input/epoch/esm2015/time/time.component.js +2 -2
  24. app-ng-runtime/components/input/epoch/fesm2015/index.js +28 -30
  25. app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
  26. app-ng-runtime/components/input/epoch/index.metadata.json +1 -1
  27. app-ng-runtime/core/bundles/index.umd.js +4 -2
  28. app-ng-runtime/core/bundles/index.umd.js.map +1 -1
  29. app-ng-runtime/core/esm2015/services/state-persistence.service.js +4 -2
  30. app-ng-runtime/core/esm2015/utils/utils.js +2 -2
  31. app-ng-runtime/core/fesm2015/index.js +4 -2
  32. app-ng-runtime/core/fesm2015/index.js.map +1 -1
  33. app-ng-runtime/package.json +1 -1
  34. app-ng-runtime/runtime/base/bundles/index.umd.js +35 -2
  35. app-ng-runtime/runtime/base/bundles/index.umd.js.map +1 -1
  36. app-ng-runtime/runtime/base/esm2015/services/i18n.service.js +35 -3
  37. app-ng-runtime/runtime/base/fesm2015/index.js +34 -2
  38. app-ng-runtime/runtime/base/fesm2015/index.js.map +1 -1
  39. app-ng-runtime/runtime/base/index.metadata.json +1 -1
  40. app-ng-runtime/runtime/base/services/i18n.service.d.ts +2 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/app-ng-runtime",
3
- "version": "11.4.3-next.25756",
3
+ "version": "11.4.3-next.25758",
4
4
  "description": "All modules required for a wavemaker application.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -3070,6 +3070,7 @@
3070
3070
  _this.defaultSupportedLocale = 'en';
3071
3071
  _this._isAngularLocaleLoaded = false;
3072
3072
  _this.formatsByLocale = { 'timezone': '', 'number': '' };
3073
+ _this.bundleLoaded = {};
3073
3074
  _this.appLocale = {};
3074
3075
  _this.prefabLocale = new Map();
3075
3076
  return _this;
@@ -3138,6 +3139,8 @@
3138
3139
  _this.extendMessages(bundle.messages);
3139
3140
  _this.extendPrefabMessages(bundle);
3140
3141
  _this.appDefaults.setFormats(bundle.formats);
3142
+ _this.bundleLoaded.app = true;
3143
+ _this.notifyLocaleChanged();
3141
3144
  });
3142
3145
  };
3143
3146
  I18nServiceImpl.prototype.loadMomentLocaleBundle = function (momentLocale) {
@@ -3156,6 +3159,8 @@
3156
3159
  _config = _config && _config._config;
3157
3160
  chronos.defineLocale(_this.selectedLocale, _config);
3158
3161
  _this.bsLocaleService.use(_this.getSelectedLocale() || _this.defaultSupportedLocale);
3162
+ _this.bundleLoaded.moment = true;
3163
+ _this.notifyLocaleChanged();
3159
3164
  });
3160
3165
  };
3161
3166
  I18nServiceImpl.prototype.loadAngularLocaleBundle = function (angLocale) {
@@ -3185,6 +3190,7 @@
3185
3190
  }
3186
3191
  // return in case of mobile app or if selected locale is default supported locale.
3187
3192
  if (!force && (i2.isMobile() || i2.isMobileApp() || this.selectedLocale === this.defaultSupportedLocale)) {
3193
+ this.bundleLoaded.fullCalendar = true;
3188
3194
  return;
3189
3195
  }
3190
3196
  // Call the script. In script, moment defines the loaded locale
@@ -3219,11 +3225,23 @@
3219
3225
  });
3220
3226
  };
3221
3227
  I18nServiceImpl.prototype.loadLocaleBundles = function (libLocale) {
3228
+ var _this = this;
3229
+ var _a;
3222
3230
  if (libLocale.moment) {
3223
3231
  this.loadMomentLocaleBundle(libLocale.moment);
3224
3232
  }
3233
+ else if (this.selectedLocale === this.defaultSupportedLocale) {
3234
+ this.bsLocaleService.use(this.getSelectedLocale() || this.defaultSupportedLocale);
3235
+ this.bundleLoaded.moment = true;
3236
+ }
3225
3237
  if (libLocale.fullCalendar && window['FullCalendar']) {
3226
- this.loadCalendarLocaleBundle(libLocale.fullCalendar);
3238
+ (_a = this.loadCalendarLocaleBundle(libLocale.fullCalendar)) === null || _a === void 0 ? void 0 : _a.then(function () {
3239
+ _this.bundleLoaded.fullCalendar = true;
3240
+ _this.notifyLocaleChanged();
3241
+ });
3242
+ }
3243
+ else {
3244
+ this.bundleLoaded.fullCalendar = true;
3227
3245
  }
3228
3246
  if (libLocale.angular) {
3229
3247
  this.loadAppLocaleBundle();
@@ -3267,8 +3285,17 @@
3267
3285
  this.selectedLocale = locale;
3268
3286
  // reset the localeData object
3269
3287
  this.init();
3288
+ this.bundleLoaded.moment = false;
3289
+ this.bundleLoaded.fullCalendar = false;
3290
+ this.bundleLoaded.app = false;
3291
+ this.bundleLoaded.angular = false;
3292
+ this.bundleLoaded.libLocale = libLocale;
3270
3293
  // load the locale bundles of the selected locale
3271
- return this.loadLocaleBundles(libLocale).then(function () { return _this.updateLocaleDirection(); });
3294
+ return this.loadLocaleBundles(libLocale).then(function () {
3295
+ _this.updateLocaleDirection();
3296
+ _this.bundleLoaded.angular = true;
3297
+ _this.notifyLocaleChanged();
3298
+ });
3272
3299
  };
3273
3300
  I18nServiceImpl.prototype.deduceAppLocale = function () {
3274
3301
  // computation to find app default locale
@@ -3310,6 +3337,7 @@
3310
3337
  return defaultLanguage;
3311
3338
  };
3312
3339
  I18nServiceImpl.prototype.loadDefaultLocale = function () {
3340
+ Date.prototype["month"] = Date.prototype.getMonth;
3313
3341
  var locale = this.deduceAppLocale();
3314
3342
  return this.setSelectedLocale(locale);
3315
3343
  };
@@ -3356,6 +3384,11 @@
3356
3384
  I18nServiceImpl.prototype.getwidgetLocale = function () {
3357
3385
  return this.formatsByLocale;
3358
3386
  };
3387
+ I18nServiceImpl.prototype.notifyLocaleChanged = function () {
3388
+ if (this.bundleLoaded.moment && this.bundleLoaded.fullCalendar && this.bundleLoaded.angular && this.bundleLoaded.app) {
3389
+ this.app.notify('locale-changed', this.bundleLoaded.libLocale);
3390
+ }
3391
+ };
3359
3392
  return I18nServiceImpl;
3360
3393
  }(i2.AbstractI18nService));
3361
3394
  I18nServiceImpl.decorators = [