@wavemaker/app-ng-runtime 11.3.6-next.25096 → 11.3.6-next.25098

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 (29) hide show
  1. app-ng-runtime/components/containers/tabs/bundles/index.umd.js +39 -23
  2. app-ng-runtime/components/containers/tabs/bundles/index.umd.js.map +1 -1
  3. app-ng-runtime/components/containers/tabs/esm2015/tab-pane/tab-pane.component.js +8 -1
  4. app-ng-runtime/components/containers/tabs/esm2015/tabs.animator.js +33 -13
  5. app-ng-runtime/components/containers/tabs/fesm2015/index.js +40 -13
  6. app-ng-runtime/components/containers/tabs/fesm2015/index.js.map +1 -1
  7. app-ng-runtime/components/containers/tabs/tabs.animator.d.ts +5 -1
  8. app-ng-runtime/components/dialogs/default/base-dialog.d.ts +1 -0
  9. app-ng-runtime/components/dialogs/default/bundles/index.umd.js +6 -2
  10. app-ng-runtime/components/dialogs/default/bundles/index.umd.js.map +1 -1
  11. app-ng-runtime/components/dialogs/default/esm2015/base-dialog.js +6 -3
  12. app-ng-runtime/components/dialogs/default/fesm2015/index.js +5 -2
  13. app-ng-runtime/components/dialogs/default/fesm2015/index.js.map +1 -1
  14. app-ng-runtime/components/dialogs/default/index.metadata.json +1 -1
  15. app-ng-runtime/components/input/epoch/bundles/index.umd.js +27 -8
  16. app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
  17. app-ng-runtime/components/input/epoch/date-time/date-time-picker.component.d.ts +1 -0
  18. app-ng-runtime/components/input/epoch/esm2015/date-time/date-time-picker.component.js +31 -11
  19. app-ng-runtime/components/input/epoch/fesm2015/index.js +30 -10
  20. app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
  21. app-ng-runtime/components/input/epoch/index.metadata.json +1 -1
  22. app-ng-runtime/mobile/components/page/default/bundles/index.umd.js +24 -6
  23. app-ng-runtime/mobile/components/page/default/bundles/index.umd.js.map +1 -1
  24. app-ng-runtime/mobile/components/page/default/esm2015/page.directive.js +20 -3
  25. app-ng-runtime/mobile/components/page/default/fesm2015/index.js +19 -2
  26. app-ng-runtime/mobile/components/page/default/fesm2015/index.js.map +1 -1
  27. app-ng-runtime/mobile/components/page/default/index.metadata.json +1 -1
  28. app-ng-runtime/mobile/components/page/default/page.directive.d.ts +4 -1
  29. app-ng-runtime/package.json +1 -1
@@ -378,22 +378,32 @@
378
378
  configurable: true
379
379
  });
380
380
  DateTimePickerComponent.prototype.validateSelectedDate = function () {
381
- var _a, _b, _c, _d, _e, _f, _g;
381
+ var _a, _b, _c, _d, _e;
382
382
  if (!this.changedValue) {
383
383
  return true;
384
384
  }
385
385
  var cd = moment(this.changedValue);
386
- if (((_a = this._bsDatepickerConfig) === null || _a === void 0 ? void 0 : _a.minDate) && ((_b = this._bsDatepickerConfig) === null || _b === void 0 ? void 0 : _b.minDate) > this.changedValue) {
386
+ var minDate = (_a = this._bsDatepickerConfig) === null || _a === void 0 ? void 0 : _a.minDate;
387
+ var maxDate = (_b = this._bsDatepickerConfig) === null || _b === void 0 ? void 0 : _b.maxDate;
388
+ if (minDate
389
+ && ((this.mode === 'DATE'
390
+ && moment(minDate).startOf('day').toDate() > this.changedValue)
391
+ || (this.mode !== 'DATE'
392
+ && minDate > this.changedValue))) {
387
393
  return false;
388
394
  }
389
- if (((_c = this._bsDatepickerConfig) === null || _c === void 0 ? void 0 : _c.maxDate) && ((_d = this._bsDatepickerConfig) === null || _d === void 0 ? void 0 : _d.maxDate) < this.changedValue) {
395
+ if (maxDate
396
+ && ((this.mode === 'DATE'
397
+ && moment(maxDate).endOf('day').toDate() < this.changedValue)
398
+ || (this.mode !== 'DATE'
399
+ && maxDate < this.changedValue))) {
390
400
  return false;
391
401
  }
392
- if (((_f = (_e = this._bsDatepickerConfig) === null || _e === void 0 ? void 0 : _e.daysDisabled) === null || _f === void 0 ? void 0 : _f.indexOf(cd.day())) >= 0) {
402
+ if (((_d = (_c = this._bsDatepickerConfig) === null || _c === void 0 ? void 0 : _c.daysDisabled) === null || _d === void 0 ? void 0 : _d.indexOf(cd.day())) >= 0) {
393
403
  return false;
394
404
  }
395
405
  var cdSt = cd.startOf('day').toDate().getTime();
396
- if ((_g = this.excludedDatesToDisable) === null || _g === void 0 ? void 0 : _g.find(function (d) { return d.getTime() === cdSt; })) {
406
+ if ((_e = this.excludedDatesToDisable) === null || _e === void 0 ? void 0 : _e.find(function (d) { return d.getTime() === cdSt; })) {
397
407
  return false;
398
408
  }
399
409
  return true;
@@ -442,6 +452,11 @@
442
452
  newVal.setMilliseconds(oldVal.getMilliseconds());
443
453
  }
444
454
  this.changedValue = newVal;
455
+ if (this.mode === 'DATE'
456
+ && oldVal !== newVal
457
+ && this.validateSelectedDate()) {
458
+ this.onOkClick();
459
+ }
445
460
  };
446
461
  DateTimePickerComponent.prototype.onTimeUpdate = function (newVal) {
447
462
  this.changedValue = newVal;
@@ -461,6 +476,10 @@
461
476
  this.triggerChange();
462
477
  this.hideModal();
463
478
  };
479
+ DateTimePickerComponent.prototype.setToday = function () {
480
+ var today = moment().startOf('day').toDate();
481
+ this.onDateUpdate(today);
482
+ };
464
483
  DateTimePickerComponent.prototype.reset = function () {
465
484
  this.changedValue = this._value;
466
485
  };
@@ -495,7 +514,7 @@
495
514
  DateTimePickerComponent.decorators = [
496
515
  { type: core.Component, args: [{
497
516
  selector: 'wm-datetimepicker',
498
- 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 class=\"btn btn-secondary clear-btn\"\n (click)=\"clear()\">{{appLocale.MESSAGE_DATE_PICKER_CLEAR || \"Clear\" }}</button>\n <button\n class=\"btn btn-primary pull-right ok-btn\"\n (click)=\"onOkClick()\">{{appLocale.MESSAGE_DATE_PICKER_OK || \"Ok\" }}</button>\n <button\n class=\"btn btn-secondary pull-right cancel-btn\"\n (click)=\"hideModal()\">{{appLocale.MESSAGE_DATE_PICKER_CANCEL || \"Cancel\" }}</button>\n \n </div>\n </div>\n </ng-template>\n "
517
+ 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 "
499
518
  },] }
500
519
  ];
501
520
  DateTimePickerComponent.ctorParameters = function () { return [
@@ -544,8 +563,8 @@
544
563
  }
545
564
  return arr;
546
565
  };
547
- TimePickerComponent.prototype.set = function (_h, unit) {
548
- var index = _h.index, value = _h.value;
566
+ TimePickerComponent.prototype.set = function (_f, unit) {
567
+ var index = _f.index, value = _f.value;
549
568
  if (unit === 'HOUR') {
550
569
  this.value = moment(this.value).hour(parseInt(value)).toDate();
551
570
  }