@wavemaker/app-runtime-wm-build 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.
|
@@ -26924,22 +26924,24 @@
|
|
|
26924
26924
|
configurable: true
|
|
26925
26925
|
});
|
|
26926
26926
|
DateTimePickerComponent.prototype.validateSelectedDate = function() {
|
|
26927
|
-
var _a, _b, _c, _d, _e
|
|
26927
|
+
var _a, _b, _c, _d, _e;
|
|
26928
26928
|
if (!this.changedValue) {
|
|
26929
26929
|
return true;
|
|
26930
26930
|
}
|
|
26931
26931
|
var cd = moment(this.changedValue);
|
|
26932
|
-
|
|
26932
|
+
var minDate = (_a = this._bsDatepickerConfig) === null || _a === void 0 ? void 0 : _a.minDate;
|
|
26933
|
+
var maxDate = (_b = this._bsDatepickerConfig) === null || _b === void 0 ? void 0 : _b.maxDate;
|
|
26934
|
+
if (minDate && (this.mode === "DATE" && moment(minDate).startOf("day").toDate() > this.changedValue || this.mode !== "DATE" && minDate > this.changedValue)) {
|
|
26933
26935
|
return false;
|
|
26934
26936
|
}
|
|
26935
|
-
if (
|
|
26937
|
+
if (maxDate && (this.mode === "DATE" && moment(maxDate).endOf("day").toDate() < this.changedValue || this.mode !== "DATE" && maxDate < this.changedValue)) {
|
|
26936
26938
|
return false;
|
|
26937
26939
|
}
|
|
26938
|
-
if (((
|
|
26940
|
+
if (((_d = (_c = this._bsDatepickerConfig) === null || _c === void 0 ? void 0 : _c.daysDisabled) === null || _d === void 0 ? void 0 : _d.indexOf(cd.day())) >= 0) {
|
|
26939
26941
|
return false;
|
|
26940
26942
|
}
|
|
26941
26943
|
var cdSt = cd.startOf("day").toDate().getTime();
|
|
26942
|
-
if ((
|
|
26944
|
+
if ((_e = this.excludedDatesToDisable) === null || _e === void 0 ? void 0 : _e.find((function(d) {
|
|
26943
26945
|
return d.getTime() === cdSt;
|
|
26944
26946
|
}))) {
|
|
26945
26947
|
return false;
|
|
@@ -26988,6 +26990,9 @@
|
|
|
26988
26990
|
newVal.setMilliseconds(oldVal.getMilliseconds());
|
|
26989
26991
|
}
|
|
26990
26992
|
this.changedValue = newVal;
|
|
26993
|
+
if (this.mode === "DATE" && oldVal !== newVal && this.validateSelectedDate()) {
|
|
26994
|
+
this.onOkClick();
|
|
26995
|
+
}
|
|
26991
26996
|
};
|
|
26992
26997
|
DateTimePickerComponent.prototype.onTimeUpdate = function(newVal) {
|
|
26993
26998
|
this.changedValue = newVal;
|
|
@@ -27009,6 +27014,10 @@
|
|
|
27009
27014
|
this.triggerChange();
|
|
27010
27015
|
this.hideModal();
|
|
27011
27016
|
};
|
|
27017
|
+
DateTimePickerComponent.prototype.setToday = function() {
|
|
27018
|
+
var today = moment().startOf("day").toDate();
|
|
27019
|
+
this.onDateUpdate(today);
|
|
27020
|
+
};
|
|
27012
27021
|
DateTimePickerComponent.prototype.reset = function() {
|
|
27013
27022
|
this.changedValue = this._value;
|
|
27014
27023
|
};
|
|
@@ -27043,7 +27052,7 @@
|
|
|
27043
27052
|
type: core.Component,
|
|
27044
27053
|
args: [ {
|
|
27045
27054
|
selector: "wm-datetimepicker",
|
|
27046
|
-
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
|
|
27055
|
+
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 '
|
|
27047
27056
|
} ]
|
|
27048
27057
|
} ];
|
|
27049
27058
|
DateTimePickerComponent.ctorParameters = function() {
|
|
@@ -27126,8 +27135,8 @@
|
|
|
27126
27135
|
}
|
|
27127
27136
|
return arr;
|
|
27128
27137
|
};
|
|
27129
|
-
TimePickerComponent.prototype.set = function(
|
|
27130
|
-
var index =
|
|
27138
|
+
TimePickerComponent.prototype.set = function(_f, unit) {
|
|
27139
|
+
var index = _f.index, value = _f.value;
|
|
27131
27140
|
if (unit === "HOUR") {
|
|
27132
27141
|
this.value = moment(this.value).hour(parseInt(value)).toDate();
|
|
27133
27142
|
} else if (unit === "MINUTE") {
|
|
@@ -36432,15 +36441,17 @@
|
|
|
36432
36441
|
_this.dialogService = inj.get(core.AbstractDialogService);
|
|
36433
36442
|
_this.bsModal = inj.get(modal.BsModalService);
|
|
36434
36443
|
var router$1 = inj.get(router.Router);
|
|
36435
|
-
var subscriptions = [ _this.bsModal.onShown.subscribe((function() {
|
|
36444
|
+
var subscriptions = [ _this.bsModal.onShown.subscribe((function(_a) {
|
|
36445
|
+
var id = _a.id;
|
|
36436
36446
|
var ref = _this.dialogService.getLastOpenedDialog();
|
|
36437
36447
|
if (ref === _this) {
|
|
36438
36448
|
invokeOpenedCallback(ref);
|
|
36449
|
+
_this.dialogId = id;
|
|
36439
36450
|
}
|
|
36440
36451
|
})), _this.bsModal.onShow.subscribe((function() {
|
|
36441
36452
|
focusTrapObj.activeElement = document.activeElement;
|
|
36442
36453
|
})), _this.bsModal.onHidden.subscribe((function(closeReason) {
|
|
36443
|
-
var ref = closeReason === "esc" || closeReason === "backdrop-click" ? _this.dialogService.getLastOpenedDialog() : _this.dialogService.getDialogRefFromClosedDialogs();
|
|
36454
|
+
var ref = closeReason === "esc" || closeReason === "backdrop-click" || _this.dialogId && (closeReason === null || closeReason === void 0 ? void 0 : closeReason.id) === _this.dialogId ? _this.dialogService.getLastOpenedDialog() : _this.dialogService.getDialogRefFromClosedDialogs();
|
|
36444
36455
|
if (ref === _this) {
|
|
36445
36456
|
_this.dialogService.removeFromOpenedDialogs(ref);
|
|
36446
36457
|
_this.dialogService.removeFromClosedDialogs(ref);
|
|
@@ -58402,40 +58413,36 @@
|
|
|
58402
58413
|
var TabsAnimator = function(_super) {
|
|
58403
58414
|
__extends(TabsAnimator, _super);
|
|
58404
58415
|
function TabsAnimator(tabs) {
|
|
58405
|
-
var e_1, _a;
|
|
58406
58416
|
var _this = _super.call(this) || this;
|
|
58407
58417
|
_this.tabs = tabs;
|
|
58408
58418
|
_this._$el = $(_this.tabs.getNativeElement()).find(">.tab-content");
|
|
58409
|
-
var childEls = _this._$el.find(">[wmTabPane]");
|
|
58410
|
-
_this._noOfTabs = childEls.length;
|
|
58411
|
-
var maxWidth = _this._noOfTabs * 100 + "%";
|
|
58412
|
-
core.addClass(_this.tabs.getNativeElement(), "has-transition");
|
|
58413
|
-
core.setCSSFromObj(_this._$el[0], {
|
|
58414
|
-
maxWidth: maxWidth,
|
|
58415
|
-
width: maxWidth
|
|
58416
|
-
});
|
|
58417
|
-
var width = 100 / _this._noOfTabs + "%";
|
|
58418
|
-
try {
|
|
58419
|
-
for (var _b = __values(Array.from(childEls)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
58420
|
-
var child = _c.value;
|
|
58421
|
-
core.setCSS(child, "width", width);
|
|
58422
|
-
}
|
|
58423
|
-
} catch (e_1_1) {
|
|
58424
|
-
e_1 = {
|
|
58425
|
-
error: e_1_1
|
|
58426
|
-
};
|
|
58427
|
-
} finally {
|
|
58428
|
-
try {
|
|
58429
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
58430
|
-
} finally {
|
|
58431
|
-
if (e_1) throw e_1.error;
|
|
58432
|
-
}
|
|
58433
|
-
}
|
|
58434
58419
|
_this.init(_this._$el);
|
|
58435
58420
|
return _this;
|
|
58436
58421
|
}
|
|
58422
|
+
TabsAnimator.prototype.calibrate = function() {
|
|
58423
|
+
var activeTabIndex = this.tabs.getActiveTabIndex();
|
|
58424
|
+
var panes = this._$el.find(">.tab-pane");
|
|
58425
|
+
var activeTabVisibleIndex = 0;
|
|
58426
|
+
var noOfVisiblePanes = 0;
|
|
58427
|
+
var visiblePanes = [];
|
|
58428
|
+
panes.each((function(i, p) {
|
|
58429
|
+
if (!$(p).prop("hidden")) {
|
|
58430
|
+
noOfVisiblePanes++;
|
|
58431
|
+
if (i === activeTabIndex) {
|
|
58432
|
+
activeTabVisibleIndex = noOfVisiblePanes - 1;
|
|
58433
|
+
}
|
|
58434
|
+
visiblePanes.push(p);
|
|
58435
|
+
}
|
|
58436
|
+
return true;
|
|
58437
|
+
}));
|
|
58438
|
+
return {
|
|
58439
|
+
activeTabIndex: activeTabVisibleIndex,
|
|
58440
|
+
noOfTabs: noOfVisiblePanes,
|
|
58441
|
+
panes: visiblePanes
|
|
58442
|
+
};
|
|
58443
|
+
};
|
|
58437
58444
|
TabsAnimator.prototype.bounds = function() {
|
|
58438
|
-
var
|
|
58445
|
+
var _a = this.calibrate(), activeTabIndex = _a.activeTabIndex, noOfTabs = _a.noOfTabs, panes = _a.panes, w = $(panes[0]).width(), centerVal = -1 * activeTabIndex * w;
|
|
58439
58446
|
this.clearContentFocus();
|
|
58440
58447
|
return {
|
|
58441
58448
|
strict: false,
|
|
@@ -58462,8 +58469,18 @@
|
|
|
58462
58469
|
}
|
|
58463
58470
|
};
|
|
58464
58471
|
TabsAnimator.prototype.transitionTabIntoView = function() {
|
|
58465
|
-
var
|
|
58466
|
-
|
|
58472
|
+
var _a = this.calibrate(), activeTabIndex = _a.activeTabIndex, noOfTabs = _a.noOfTabs, panes = _a.panes;
|
|
58473
|
+
var maxWidth = noOfTabs * 100 + "%";
|
|
58474
|
+
core.setCSSFromObj(this._$el[0], {
|
|
58475
|
+
maxWidth: maxWidth,
|
|
58476
|
+
width: maxWidth
|
|
58477
|
+
});
|
|
58478
|
+
core.addClass(this.tabs.getNativeElement(), "has-transition");
|
|
58479
|
+
var width = 100 / noOfTabs + "%";
|
|
58480
|
+
panes.forEach((function(p) {
|
|
58481
|
+
core.setCSS(p, "width", width);
|
|
58482
|
+
}));
|
|
58483
|
+
core.setCSS(this._$el[0], "transform", "translate3d(" + -1 * activeTabIndex / noOfTabs * 100 + "%, 0, 0)");
|
|
58467
58484
|
};
|
|
58468
58485
|
TabsAnimator.prototype.onUpper = function($event) {
|
|
58469
58486
|
this.tabs.prev($event);
|
|
@@ -58589,6 +58606,7 @@
|
|
|
58589
58606
|
};
|
|
58590
58607
|
TabPaneComponent.prototype.onPropertyChange = function(key, nv, ov) {
|
|
58591
58608
|
var _this = this;
|
|
58609
|
+
var _a;
|
|
58592
58610
|
if (key === "content") {
|
|
58593
58611
|
if (this.isActive) {
|
|
58594
58612
|
setTimeout((function() {
|
|
@@ -58599,6 +58617,10 @@
|
|
|
58599
58617
|
this.nativeElement.hidden = !nv;
|
|
58600
58618
|
if (this._isFirstLoad) {
|
|
58601
58619
|
this.tabsRef.selectDefaultPaneByIndex(this.tabsRef.defaultpaneindex);
|
|
58620
|
+
} else if (!nv && this.isActive) {
|
|
58621
|
+
this.tabsRef.next();
|
|
58622
|
+
} else if (nv || !this.isActive) {
|
|
58623
|
+
(_a = this.tabsRef.tabsAnimator) === null || _a === void 0 ? void 0 : _a.transitionTabIntoView();
|
|
58602
58624
|
}
|
|
58603
58625
|
this._isFirstLoad = false;
|
|
58604
58626
|
} else {
|