@wavemaker/app-runtime-wm-build 11.4.0-next.141076 → 11.4.0-next.141078
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.
- app-runtime-wm-build/package.json +1 -1
- app-runtime-wm-build/wmapp/scripts/wm-libs.js +16331 -273
- app-runtime-wm-build/wmapp/scripts/wm-libs.min.js +1252 -428
- app-runtime-wm-build/wmapp/scripts/wm-loader.js +125 -84
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +7 -7
- app-runtime-wm-build/wmapp/styles/css/wm-style.css +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-libs.js +16331 -273
- app-runtime-wm-build/wmmobile/scripts/wm-libs.min.js +1253 -429
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +147 -89
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +20 -20
- app-runtime-wm-build/wmmobile/styles/css/wm-style.css +1 -1
|
@@ -11229,7 +11229,7 @@
|
|
|
11229
11229
|
if (openedDialogs.indexOf(ref) !== -1) {
|
|
11230
11230
|
openedDialogs.splice(openedDialogs.indexOf(ref), 1);
|
|
11231
11231
|
}
|
|
11232
|
-
if (openedDialogs.length === 0 && core$1.isMobileApp()) {
|
|
11232
|
+
if (openedDialogs.length === 0 && (core$1.isMobile() || core$1.isMobileApp())) {
|
|
11233
11233
|
var parentSelector = $("body > app-root")[0];
|
|
11234
11234
|
parentSelector.removeAttribute("aria-hidden");
|
|
11235
11235
|
}
|
|
@@ -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,22 @@
|
|
|
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 =
|
|
36454
|
+
var ref = _this.dialogService.getDialogRefFromClosedDialogs();
|
|
36455
|
+
if (_this.dialogId && (closeReason === null || closeReason === void 0 ? void 0 : closeReason.id) === _this.dialogId) {
|
|
36456
|
+
ref = _this;
|
|
36457
|
+
} else if (closeReason === "esc" || closeReason === "backdrop-click") {
|
|
36458
|
+
ref = _this.dialogService.getLastOpenedDialog();
|
|
36459
|
+
}
|
|
36444
36460
|
if (ref === _this) {
|
|
36445
36461
|
_this.dialogService.removeFromOpenedDialogs(ref);
|
|
36446
36462
|
_this.dialogService.removeFromClosedDialogs(ref);
|
|
@@ -36480,7 +36496,7 @@
|
|
|
36480
36496
|
Object.assign(this.context, initState);
|
|
36481
36497
|
this.modalOptions.ariaLabelledBy = this.titleId;
|
|
36482
36498
|
this.dialogRef = this.bsModal.show(this.getTemplateRef(), this.modalOptions);
|
|
36483
|
-
if (this.dialogService.getOpenedDialogs().length === 1 && core.isMobileApp()) {
|
|
36499
|
+
if (this.dialogService.getOpenedDialogs().length === 1 && (core.isMobile() || core.isMobileApp())) {
|
|
36484
36500
|
var parentSelector = $("body > app-root")[0];
|
|
36485
36501
|
parentSelector.setAttribute("aria-hidden", "true");
|
|
36486
36502
|
}
|
|
@@ -42315,11 +42331,31 @@
|
|
|
42315
42331
|
$index: _this.dn.currentPage
|
|
42316
42332
|
});
|
|
42317
42333
|
_this.goToPage();
|
|
42334
|
+
if (_this.navigation === "Basic") {
|
|
42335
|
+
_this._setAriaForBasicNavigation();
|
|
42336
|
+
}
|
|
42318
42337
|
}
|
|
42319
42338
|
}), base.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME);
|
|
42320
42339
|
base.styler(_this.nativeElement, _this);
|
|
42321
42340
|
return _this;
|
|
42322
42341
|
}
|
|
42342
|
+
PaginationComponent.prototype._setAriaForBasicNavigation = function() {
|
|
42343
|
+
_.forEach(this.nativeElement.getElementsByTagName("a"), (function(item) {
|
|
42344
|
+
item.setAttribute("href", "javascript:void(0);");
|
|
42345
|
+
var childNode = item.querySelector("span");
|
|
42346
|
+
if ((childNode === null || childNode === void 0 ? void 0 : childNode.dataset.isacitvepage) === "true") {
|
|
42347
|
+
item.setAttribute("aria-current", "true");
|
|
42348
|
+
setTimeout((function() {
|
|
42349
|
+
return item.focus();
|
|
42350
|
+
}));
|
|
42351
|
+
}
|
|
42352
|
+
if ((childNode === null || childNode === void 0 ? void 0 : childNode.dataset.isdisabled) === "true") {
|
|
42353
|
+
item.setAttribute("aria-disabled", "true");
|
|
42354
|
+
} else {
|
|
42355
|
+
item.removeAttribute("aria-disabled");
|
|
42356
|
+
}
|
|
42357
|
+
}));
|
|
42358
|
+
};
|
|
42323
42359
|
PaginationComponent.prototype.setResult = function(result) {
|
|
42324
42360
|
this.result = result;
|
|
42325
42361
|
this.resultEmitter.emit(this.result);
|
|
@@ -42436,9 +42472,7 @@
|
|
|
42436
42472
|
this.resetPageNavigation();
|
|
42437
42473
|
}
|
|
42438
42474
|
if (this.navigation === "Basic") {
|
|
42439
|
-
|
|
42440
|
-
item.setAttribute("href", "javascript:void(0);");
|
|
42441
|
-
}));
|
|
42475
|
+
this._setAriaForBasicNavigation();
|
|
42442
42476
|
}
|
|
42443
42477
|
} else {
|
|
42444
42478
|
if (newVal && !_.isString(newVal)) {
|
|
@@ -42715,7 +42749,7 @@
|
|
|
42715
42749
|
type: core.Component,
|
|
42716
42750
|
args: [ {
|
|
42717
42751
|
selector: "[wmPagination]",
|
|
42718
|
-
template: '\n<ul class="pagination advanced {{navigationClass}}" *ngIf="navcontrols === \'Classic\'">\n <li [ngClass]="{\'disabled\':isDisableFirst}">\n <a [title]="appLocale.LABEL_FIRST" name="first" href="javascript:void(0);"
|
|
42752
|
+
template: '\n<ul class="pagination advanced {{navigationClass}}" *ngIf="navcontrols === \'Classic\'">\n <li [ngClass]="{\'disabled\':isDisableFirst}">\n <a [title]="appLocale.LABEL_FIRST" name="first" href="javascript:void(0);"\n [attr.aria-disabled]="isDisableFirst"\n (click)="navigatePage(\'first\', $event)">\n <span aria-hidden="true"><i class="wi wi-first-page"></i></span>\n <span class="sr-only">Go to first page {{ isDisableFirst ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n <li [ngClass]="{\'disabled\':isDisablePrevious}">\n <a [title]="appLocale.LABEL_PREVIOUS" name="prev" href="javascript:void(0);"\n [attr.aria-disabled]="isDisablePrevious"\n (click)="navigatePage(\'prev\', $event)">\n <span aria-hidden="true"><i class="wi wi-chevron-left"></i></span>\n <span class="sr-only">Go to previous page {{ isDisablePrevious ? \', Disabled\' : \'\'}}</span>\n </a>\n </li>\n <li class="pagecount disabled">\n <a href="javascript:void(0);">\n <input type="number" [disabled]="isDisableCurrent" [(ngModel)]="dn.currentPage" [attr.aria-label]="\'Showing Page \' + dn.currentPage + \' of \' + pageCount"\n (keydown)="onKeyDown($event)" (change)="onModelChange($event)" class="form-control"/>\n </a>\n </li>\n <li class="disabled">\n <a [hidden]="isDisableCount"> / {{pageCount}}</a>\n </li>\n <li [ngClass]="{\'disabled\':isDisableNext}">\n <a [title]="appLocale.LABEL_NEXT" name="next" href="javascript:void(0);"\n [attr.aria-disabled]="isDisableNext"\n (click)="navigatePage(\'next\', $event)">\n <span aria-hidden="true"><i class="wi wi-chevron-right"></i></span>\n <span class="sr-only">Go to next page {{ isDisableNext ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n <li [ngClass]="{\'disabled\':isDisableLast}">\n <a [title]="appLocale.LABEL_LAST" name="last" href="javascript:void(0);"\n [attr.aria-disabled]="isDisableLast"\n (click)="navigatePage(\'last\', $event)">\n <span aria-hidden="true"><i class="wi wi-last-page"></i></span>\n <span class="sr-only">Go to last page {{ isDisableLast ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n <li *ngIf="showrecordcount" class="totalcount disabled">\n <a href="javascript:void(0);" tabindex="-1" aria-disabled="true">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n</ul>\n<ul class="pager {{navigationClass}}" *ngIf="navcontrols === \'Pager\'">\n <li class="previous" [ngClass]="{\'disabled\':isDisablePrevious}">\n <a href="javascript:void(0);" (click)="navigatePage(\'prev\', $event)"\n [attr.aria-disabled]="isDisablePrevious">\n <span aria-hidden="true"><i class="wi wi-chevron-left"></i></span>\n {{appLocale.LABEL_PREVIOUS}}\n <span class="sr-only">{{ isDisablePrevious ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n <li class="next" [ngClass]="{\'disabled\':isDisableNext}">\n <a href="javascript:void(0);" (click)="navigatePage(\'next\', $event)"\n [attr.aria-disabled]="isDisableNext">\n <span aria-hidden="true"><i class="wi wi-chevron-right"></i></span>\n {{appLocale.LABEL_NEXT}}\n <span class="sr-only">{{ isDisableNext ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n</ul>\n\n<pagination class="pagination basic" [ngClass]="navigationClass" *ngIf="navcontrols === \'Basic\'" role="navigation"\n [itemsPerPage]="maxResults" [totalItems]="dataSize"\n [ngModel]="dn.currentPage" (pageChanged)="pageChanged($event)"\n [attr.aria-label]="\'Showing Page \' + dn.currentPage + \' of \' + pageCount + \' pages\'"\n [boundaryLinks]="boundarylinks" [maxSize]="maxsize"\n [directionLinks]="directionlinks"\n firstText="Firtst" lastText="Last"\n [customPreviousTemplate]="prevTemplate"\n [customNextTemplate]="nextTemplate"\n [customPageTemplate]="pageTemplate"></pagination>\n\n<ul *ngIf="navcontrols === \'Basic\' && showrecordcount" class="pagination">\n <li class="totalcount disabled basiccount">\n <a href="javascript:void(0);" tabindex="-1" aria-disabled="true">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n</ul>\n\n<ng-template #pageTemplate let-page>\n <span class="sr-only" [attr.data-isacitvepage]="page.active">{{\'Page \'}}</span>\n {{page.number}}\n <span class="sr-only" *ngIf="page.active"> {{\', Showing page \' + page.number + \' of \' + pageCount}}</span>\n</ng-template>\n<ng-template #prevTemplate let-disabled="disabled">\n <span class="sr-only" [attr.data-isdisabled]="disabled">Go to Previous page {{disabled ? \', Disabled\' : \'\'}}</span>\n</ng-template>\n<ng-template #nextTemplate let-disabled="disabled">\n <span class="sr-only" [attr.data-isdisabled]="disabled">Go to Next page {{disabled ? \', Disabled\' : \'\'}}</span>\n</ng-template>\n',
|
|
42719
42753
|
providers: [ base.provideAsWidgetRef(PaginationComponent) ]
|
|
42720
42754
|
} ]
|
|
42721
42755
|
} ];
|
|
@@ -44748,7 +44782,7 @@
|
|
|
44748
44782
|
return this.datasource.execute(operation, options);
|
|
44749
44783
|
};
|
|
44750
44784
|
ListComponent.prototype.handleKeyDown = function($event, action) {
|
|
44751
|
-
var
|
|
44785
|
+
var _d, _e;
|
|
44752
44786
|
$event.stopPropagation();
|
|
44753
44787
|
if ($event.keyCode !== 13 && $event.keyCode !== 9 && !(($event.target.classList.contains("form-control") || $event.target.classList.contains("note-editable")) && $event.keyCode === 32)) {
|
|
44754
44788
|
$event.preventDefault();
|
|
@@ -44790,27 +44824,21 @@
|
|
|
44790
44824
|
}
|
|
44791
44825
|
if (action === "focusPrev") {
|
|
44792
44826
|
if (this.isListElementMovable) {
|
|
44793
|
-
var prev_1;
|
|
44794
44827
|
presentIndex = presentIndex <= 0 ? 0 : presentIndex;
|
|
44795
|
-
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44796
44828
|
if (presentIndex === 0) {
|
|
44797
|
-
prev_1 = this.listItems.last;
|
|
44798
44829
|
return;
|
|
44799
44830
|
}
|
|
44800
|
-
this.
|
|
44801
|
-
|
|
44802
|
-
|
|
44803
|
-
|
|
44804
|
-
|
|
44805
|
-
|
|
44806
|
-
|
|
44807
|
-
|
|
44808
|
-
|
|
44809
|
-
|
|
44810
|
-
|
|
44811
|
-
}
|
|
44812
|
-
prev_1 = $liItem;
|
|
44813
|
-
}));
|
|
44831
|
+
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44832
|
+
var prevElt = this.getListItemByIndex(presentIndex - 1);
|
|
44833
|
+
prevElt.nativeElement.before(this.lastSelectedItem.nativeElement);
|
|
44834
|
+
this.lastSelectedItem.nativeElement.focus();
|
|
44835
|
+
this.statePersistence.removeWidgetState(this, "selectedItem");
|
|
44836
|
+
var arr = this.listItems.toArray();
|
|
44837
|
+
_d = __read([ arr[presentIndex], arr[presentIndex - 1] ], 2), arr[presentIndex - 1] = _d[0],
|
|
44838
|
+
arr[presentIndex] = _d[1];
|
|
44839
|
+
this.listItems.reset(arr);
|
|
44840
|
+
this.currentIndex = presentIndex;
|
|
44841
|
+
this.ariaText = "selected ";
|
|
44814
44842
|
} else {
|
|
44815
44843
|
presentIndex = presentIndex <= 0 ? 0 : presentIndex - 1;
|
|
44816
44844
|
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
@@ -44820,27 +44848,21 @@
|
|
|
44820
44848
|
}
|
|
44821
44849
|
} else if (action === "focusNext") {
|
|
44822
44850
|
if (this.isListElementMovable) {
|
|
44823
|
-
var prev_2;
|
|
44824
44851
|
presentIndex = presentIndex < listItems.length - 1 ? presentIndex : listItems.length - 1;
|
|
44825
|
-
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44826
44852
|
if (presentIndex === this.listItems.length - 1) {
|
|
44827
|
-
prev_2 = this.listItems.first;
|
|
44828
44853
|
return;
|
|
44829
44854
|
}
|
|
44830
|
-
this.
|
|
44831
|
-
|
|
44832
|
-
|
|
44833
|
-
|
|
44834
|
-
|
|
44835
|
-
|
|
44836
|
-
|
|
44837
|
-
|
|
44838
|
-
|
|
44839
|
-
|
|
44840
|
-
|
|
44841
|
-
}
|
|
44842
|
-
prev_2 = $liItem;
|
|
44843
|
-
}));
|
|
44855
|
+
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44856
|
+
var nextElt = this.getListItemByIndex(presentIndex + 1);
|
|
44857
|
+
nextElt.nativeElement.after(this.lastSelectedItem.nativeElement);
|
|
44858
|
+
this.lastSelectedItem.nativeElement.focus();
|
|
44859
|
+
this.statePersistence.removeWidgetState(this, "selectedItem");
|
|
44860
|
+
var arr = this.listItems.toArray();
|
|
44861
|
+
_e = __read([ arr[presentIndex + 1], arr[presentIndex] ], 2), arr[presentIndex] = _e[0],
|
|
44862
|
+
arr[presentIndex + 1] = _e[1];
|
|
44863
|
+
this.listItems.reset(arr);
|
|
44864
|
+
this.currentIndex = presentIndex + 2;
|
|
44865
|
+
this.ariaText = "selected ";
|
|
44844
44866
|
} else {
|
|
44845
44867
|
presentIndex = presentIndex < listItems.length - 1 ? presentIndex + 1 : listItems.length - 1;
|
|
44846
44868
|
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
@@ -44862,11 +44884,10 @@
|
|
|
44862
44884
|
this.isListElementMovable = !this.isListElementMovable;
|
|
44863
44885
|
this.onItemClick($event, this.getListItemByIndex(presentIndex));
|
|
44864
44886
|
this.currentIndex = presentIndex + 1;
|
|
44865
|
-
var name = this.getListItemByIndex(presentIndex).item.name;
|
|
44866
44887
|
if (this.isListElementMovable) {
|
|
44867
|
-
this.ariaText =
|
|
44888
|
+
this.ariaText = "Item " + this.currentIndex + " grabbed, current position ";
|
|
44868
44889
|
} else {
|
|
44869
|
-
this.ariaText =
|
|
44890
|
+
this.ariaText = "Item " + this.currentIndex + " dropped, final position ";
|
|
44870
44891
|
}
|
|
44871
44892
|
}
|
|
44872
44893
|
};
|
|
@@ -45104,7 +45125,7 @@
|
|
|
45104
45125
|
type: core$1.Component,
|
|
45105
45126
|
args: [ {
|
|
45106
45127
|
selector: "div[wmList]",
|
|
45107
|
-
template: '<div class="panel-heading" *ngIf="title || subheading || iconclass">\n <h3 class="panel-title">\n <div class="pull-left">\n <i class="app-icon panel-icon {{iconclass}}" aria-hidden="true" [hidden]="!iconclass"></i>\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n </h3>\n</div>\n\n<
|
|
45128
|
+
template: '<div class="panel-heading" *ngIf="title || subheading || iconclass">\n <h3 class="panel-title">\n <div class="pull-left">\n <i class="app-icon panel-icon {{iconclass}}" aria-hidden="true" [hidden]="!iconclass"></i>\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n </h3>\n</div>\n\n<div class="app-datanavigator" [attr.aria-disabled]="dataNavigator.isDisablePrevious" aria-label="Page navigation" *ngIf="navigation === \'Inline\' && !noDataFound">\n <ul class="pager">\n <li class="previous" [ngClass]="{\'disabled\': (dataNavigator ? dataNavigator.isDisablePrevious : true)}">\n <a href="javascript:void(0);" (click)="dataNavigator.navigatePage(\'prev\', $event)"\n [attr.aria-disabled]="dataNavigator.isDisablePrevious">\n <i class="wi wi-chevron-left" aria-hidden="true"></i>\n <span class="sr-only">Go to Previous page {{dataNavigator.isDisablePrevious ? \', Disabled\' : \'\'}}</span>\n </a>\n </li>\n </ul>\n</div>\n<div *ngIf="navigation === \'Inline\' && !noDataFound" aria-live="polite" aria-atomic="true" class="sr-only"> {{\'Page \' + dataNavigator.dn.currentPage + \' of \' + dataNavigator.pageCount }}</div>\n\n<div>\n <div id={{titleId}} class="sr-only" *ngIf="enablereorder">\n Press space bar to toggle drag drop mode, use arrow keys to move selected elements.\n </div>\n\n <div aria-live="assertive" *ngIf="listItems && enablereorder && currentIndex" class="sr-only" >\n {{ariaText + currentIndex + \' of \' + listItems.length}}\n </div>\n</div>\n\n<ul [attr.tabindex]="tabindex" [attr.aria-describedby] = "titleId" class="app-livelist-container clearfix {{direction === \'horizontal\' ? \'app-horizontal-list\': \'\'}} {{listclass}}" role="list"\n (keydown.enter)="handleKeyDown($event, \'select\')"\n\n (keydown.space)="handleKeyDown($event, \'space\')"\n\n (keydown.arrowup)="handleKeyDown($event, \'focusPrev\')"\n (keydown.arrowdown)="handleKeyDown($event, \'focusNext\')"\n (keydown.arrowleft)="handleKeyDown($event, \'focusPrev\')"\n (keydown.arrowright)="handleKeyDown($event, \'focusNext\')"\n\n (keydown.shift.arrowup)="handleKeyDown($event, \'selectPrev\')"\n (keydown.shift.arrowdown)="handleKeyDown($event, \'selectNext\')"\n (keydown.shift.arrowleft)="handleKeyDown($event, \'selectPrev\')"\n (keydown.shift.arrowright)="handleKeyDown($event, \'selectNext\')"\n [hidden]="noDataFound && !variableInflight"\n>\n <ng-template [ngIf]="!groupby" [ngIfElse]="groupedListTemplate">\n <li *ngFor="let item of fieldDefs; index as $index; first as $first; last as $last;" class="app-list-item {{direction === \'horizontal\' ? \'\' : itemsPerRowClass}}" [ngClass]="listItemRef.itemClass"\n [wmListItem]="item"\n #listItemRef="listItemRef"\n [attr.tabindex]="tabindex"\n role="listitem">\n <ng-container [ngTemplateOutlet]="listTemplate" [ngTemplateOutletContext]="{item: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}"></ng-container>\n </li>\n </ng-template>\n <ng-container [ngTemplateOutlet]="listLeftActionTemplate"></ng-container>\n <ng-container [ngTemplateOutlet]="listRightActionTemplate"></ng-container>\n</ul>\n\n<div class="no-data-msg" *ngIf="noDataFound && !variableInflight" [textContent]="nodatamessage"></div>\n\n<div class="loading-data-msg" *ngIf="variableInflight && !pulltorefresh">\n <span>\n <i class="app-icon panel-icon fa-spin" aria-hidden="true" [ngClass]="loadingicon"></i>\n <span class="sr-only">Loading</span>\n <span class="loading-text" [textContent]="loadingdatamsg"></span>\n </span>\n</div>\n\n<div class="app-datanavigator" [attr.aria-disabled]="dataNavigator.isDisableNext" *ngIf="navigation === \'Inline\' && !noDataFound">\n <ul class="pager">\n <li class="next" [ngClass]="{\'disabled\': (dataNavigator ? dataNavigator.isDisableNext : true)}">\n <a href="javascript:void(0);" (click)="dataNavigator.navigatePage(\'next\', $event)"\n [attr.aria-disabled]="dataNavigator.isDisableNext">\n <i class="wi wi-chevron-right" aria-hidden="true"></i>\n <span class="sr-only">Go to Next page {{dataNavigator.isDisableNext ? \', Disabled\' : \'\'}}</span>\n </a>\n </li>\n </ul>\n</div>\n\n<div class="panel-footer" *ngIf="navigation !== \'None\'" [hidden]="!showNavigation || (onDemandLoad && dataNavigator.isDisableNext) || (dataNavigator.dataSize <= pagesize) || (!dataNavigator.dataSize && !dataNavigator.datasource?.pagination?.next)">\n <nav wmPagination\n navigationalign.bind="navigationalign"\n navigation.bind="navControls"\n showrecordcount.bind="showrecordcount"\n maxsize.bind="maxsize"\n boundarylinks.bind="boundarylinks"\n forceellipses.bind="forceellipses"\n directionlinks.bind="directionlinks"\n show.bind="!onDemandLoad"\n paginationchange.event="beforePaginationChange($event, $index)"\n ></nav>\n <a *ngIf="onDemandLoad" href="javascript:void(0);"\n (click)="dataNavigator.navigatePage(\'next\', $event)"\n class="app-button btn btn-block"\n [ngClass]="paginationclass"\n [textContent]="ondemandmessage"\n ></a>\n</div>\n\n\x3c!--This template will be displayed when groupby is specified--\x3e\n<ng-template #groupedListTemplate>\n <li *ngFor="let groupObj of groupedData" class="app-list-item-group clearfix">\n <ul [attr.tabindex]="tabindex" class="list-group item-group" [ngClass]="listclass">\n <li class="app-list-item-header list-item list-group-header" (click)="handleHeaderClick($event)" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4>{{groupObj.key}}\n <div class="header-action">\n <i class="app-icon wi action wi-chevron-up" *ngIf="collapsible"></i>\n <span *ngIf="showcount" class="label label-default">{{groupObj.data.length}}</span>\n </div>\n </h4>\n </li>\n <ul class="list-group clearfix {{direction === \'horizontal\' ? \'app-horizontal-list\': \'\'}}">\n <li *ngFor="let item of groupObj.data; index as $index; first as $first; last as $last;" [attr.tabindex]="tabindex"\n class="app-list-item group-list-item {{itemsPerRowClass}}"\n [ngClass]="listItemRef.itemClass"\n [wmListItem]="item" #listItemRef="listItemRef">\n <ng-container [ngTemplateOutlet]="listTemplate" [ngTemplateOutletContext]="{item: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}"></ng-container>\n </li>\n </ul>\n </ul>\n </li>\n</ng-template>\n',
|
|
45108
45129
|
providers: [ base.provideAsWidgetRef(ListComponent) ]
|
|
45109
45130
|
} ]
|
|
45110
45131
|
} ];
|
|
@@ -58402,40 +58423,36 @@
|
|
|
58402
58423
|
var TabsAnimator = function(_super) {
|
|
58403
58424
|
__extends(TabsAnimator, _super);
|
|
58404
58425
|
function TabsAnimator(tabs) {
|
|
58405
|
-
var e_1, _a;
|
|
58406
58426
|
var _this = _super.call(this) || this;
|
|
58407
58427
|
_this.tabs = tabs;
|
|
58408
58428
|
_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
58429
|
_this.init(_this._$el);
|
|
58435
58430
|
return _this;
|
|
58436
58431
|
}
|
|
58432
|
+
TabsAnimator.prototype.calibrate = function() {
|
|
58433
|
+
var activeTabIndex = this.tabs.getActiveTabIndex();
|
|
58434
|
+
var panes = this._$el.find(">.tab-pane");
|
|
58435
|
+
var activeTabVisibleIndex = 0;
|
|
58436
|
+
var noOfVisiblePanes = 0;
|
|
58437
|
+
var visiblePanes = [];
|
|
58438
|
+
panes.each((function(i, p) {
|
|
58439
|
+
if (!$(p).prop("hidden")) {
|
|
58440
|
+
noOfVisiblePanes++;
|
|
58441
|
+
if (i === activeTabIndex) {
|
|
58442
|
+
activeTabVisibleIndex = noOfVisiblePanes - 1;
|
|
58443
|
+
}
|
|
58444
|
+
visiblePanes.push(p);
|
|
58445
|
+
}
|
|
58446
|
+
return true;
|
|
58447
|
+
}));
|
|
58448
|
+
return {
|
|
58449
|
+
activeTabIndex: activeTabVisibleIndex,
|
|
58450
|
+
noOfTabs: noOfVisiblePanes,
|
|
58451
|
+
panes: visiblePanes
|
|
58452
|
+
};
|
|
58453
|
+
};
|
|
58437
58454
|
TabsAnimator.prototype.bounds = function() {
|
|
58438
|
-
var
|
|
58455
|
+
var _a = this.calibrate(), activeTabIndex = _a.activeTabIndex, noOfTabs = _a.noOfTabs, panes = _a.panes, w = $(panes[0]).width(), centerVal = -1 * activeTabIndex * w;
|
|
58439
58456
|
this.clearContentFocus();
|
|
58440
58457
|
return {
|
|
58441
58458
|
strict: false,
|
|
@@ -58462,8 +58479,18 @@
|
|
|
58462
58479
|
}
|
|
58463
58480
|
};
|
|
58464
58481
|
TabsAnimator.prototype.transitionTabIntoView = function() {
|
|
58465
|
-
var
|
|
58466
|
-
|
|
58482
|
+
var _a = this.calibrate(), activeTabIndex = _a.activeTabIndex, noOfTabs = _a.noOfTabs, panes = _a.panes;
|
|
58483
|
+
var maxWidth = noOfTabs * 100 + "%";
|
|
58484
|
+
core.setCSSFromObj(this._$el[0], {
|
|
58485
|
+
maxWidth: maxWidth,
|
|
58486
|
+
width: maxWidth
|
|
58487
|
+
});
|
|
58488
|
+
core.addClass(this.tabs.getNativeElement(), "has-transition");
|
|
58489
|
+
var width = 100 / noOfTabs + "%";
|
|
58490
|
+
panes.forEach((function(p) {
|
|
58491
|
+
core.setCSS(p, "width", width);
|
|
58492
|
+
}));
|
|
58493
|
+
core.setCSS(this._$el[0], "transform", "translate3d(" + -1 * activeTabIndex / noOfTabs * 100 + "%, 0, 0)");
|
|
58467
58494
|
};
|
|
58468
58495
|
TabsAnimator.prototype.onUpper = function($event) {
|
|
58469
58496
|
this.tabs.prev($event);
|
|
@@ -58589,6 +58616,7 @@
|
|
|
58589
58616
|
};
|
|
58590
58617
|
TabPaneComponent.prototype.onPropertyChange = function(key, nv, ov) {
|
|
58591
58618
|
var _this = this;
|
|
58619
|
+
var _a;
|
|
58592
58620
|
if (key === "content") {
|
|
58593
58621
|
if (this.isActive) {
|
|
58594
58622
|
setTimeout((function() {
|
|
@@ -58599,6 +58627,10 @@
|
|
|
58599
58627
|
this.nativeElement.hidden = !nv;
|
|
58600
58628
|
if (this._isFirstLoad) {
|
|
58601
58629
|
this.tabsRef.selectDefaultPaneByIndex(this.tabsRef.defaultpaneindex);
|
|
58630
|
+
} else if (!nv && this.isActive) {
|
|
58631
|
+
this.tabsRef.next();
|
|
58632
|
+
} else if (nv || !this.isActive) {
|
|
58633
|
+
(_a = this.tabsRef.tabsAnimator) === null || _a === void 0 ? void 0 : _a.transitionTabIntoView();
|
|
58602
58634
|
}
|
|
58603
58635
|
this._isFirstLoad = false;
|
|
58604
58636
|
} else {
|
|
@@ -67554,10 +67586,10 @@
|
|
|
67554
67586
|
}));
|
|
67555
67587
|
|
|
67556
67588
|
(function(global, factory) {
|
|
67557
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@angular/core"), require("@wm/core"), require("@wm/components/base"), require("@wm/components/page"), require("@wm/mobile/core"), require("@angular/common")) : typeof define === "function" && define.amd ? define("@wm/mobile/components/page", [ "exports", "@angular/core", "@wm/core", "@wm/components/base", "@wm/components/page", "@wm/mobile/core", "@angular/common" ], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
|
|
67589
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@angular/core"), require("@wm/core"), require("@wm/components/base"), require("ngx-bootstrap/modal"), require("@wm/components/page"), require("@wm/mobile/core"), require("@angular/common")) : typeof define === "function" && define.amd ? define("@wm/mobile/components/page", [ "exports", "@angular/core", "@wm/core", "@wm/components/base", "ngx-bootstrap/modal", "@wm/components/page", "@wm/mobile/core", "@angular/common" ], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
|
|
67558
67590
|
factory((global.wm = global.wm || {}, global.wm.mobile = global.wm.mobile || {},
|
|
67559
|
-
global.wm.mobile.components = global.wm.mobile.components || {}, global.wm.mobile.components.page = {}), global.ng.core, global.wm.core, global.wm.components.base, global.wm.components.page, global.wm.mobile.core, global.ng.common));
|
|
67560
|
-
})(this, (function(exports, core$1, core, base, page, core$2, common) {
|
|
67591
|
+
global.wm.mobile.components = global.wm.mobile.components || {}, global.wm.mobile.components.page = {}), global.ng.core, global.wm.core, global.wm.components.base, global.modal, global.wm.components.page, global.wm.mobile.core, global.ng.common));
|
|
67592
|
+
})(this, (function(exports, core$1, core, base, modal, page, core$2, common) {
|
|
67561
67593
|
"use strict";
|
|
67562
67594
|
var PageContentLoaderComponent = function() {
|
|
67563
67595
|
function PageContentLoaderComponent(el) {
|
|
@@ -67579,18 +67611,30 @@
|
|
|
67579
67611
|
} ];
|
|
67580
67612
|
};
|
|
67581
67613
|
var MobilePageDirective = function() {
|
|
67582
|
-
function MobilePageDirective(app, elRef, deviceService, page, navigationService) {
|
|
67614
|
+
function MobilePageDirective(app, elRef, modalService, deviceService, page, navigationService) {
|
|
67583
67615
|
var _this = this;
|
|
67616
|
+
this.modalService = modalService;
|
|
67584
67617
|
this.deviceService = deviceService;
|
|
67585
67618
|
this.page = page;
|
|
67586
67619
|
this.navigationService = navigationService;
|
|
67620
|
+
this.subscriptions = [];
|
|
67587
67621
|
core.addClass(elRef.nativeElement, "mobile-app-page");
|
|
67588
67622
|
this._$ele = $(elRef.nativeElement);
|
|
67589
67623
|
page.subscribe("wmMobileTabbar:ready", (function() {
|
|
67590
67624
|
return _this._$ele.addClass("has-tabbar");
|
|
67591
67625
|
}));
|
|
67626
|
+
var modalsOpened = [];
|
|
67627
|
+
this.subscriptions = [ modalService.onShown.subscribe((function(_a) {
|
|
67628
|
+
var id = _a.id;
|
|
67629
|
+
id && modalsOpened.push(id);
|
|
67630
|
+
})), modalService.onHidden.subscribe((function(_a) {
|
|
67631
|
+
var id = _a.id;
|
|
67632
|
+
id && _.remove(modalsOpened, id);
|
|
67633
|
+
})) ];
|
|
67592
67634
|
this._backBtnListenerDestroyer = deviceService.onBackButtonTap((function($event) {
|
|
67593
|
-
if (
|
|
67635
|
+
if (modalsOpened.length > 0) {
|
|
67636
|
+
modalService.hide(modalsOpened.pop());
|
|
67637
|
+
} else if (app.landingPageName === app.activePageName) {
|
|
67594
67638
|
window.navigator["app"].exitApp();
|
|
67595
67639
|
} else {
|
|
67596
67640
|
_this.navigationService.goToPrevious();
|
|
@@ -67599,6 +67643,9 @@
|
|
|
67599
67643
|
}));
|
|
67600
67644
|
}
|
|
67601
67645
|
MobilePageDirective.prototype.ngOnDestroy = function() {
|
|
67646
|
+
this.subscriptions.map((function(s) {
|
|
67647
|
+
return s.unsubscribe();
|
|
67648
|
+
}));
|
|
67602
67649
|
this._backBtnListenerDestroyer();
|
|
67603
67650
|
};
|
|
67604
67651
|
return MobilePageDirective;
|
|
@@ -67614,6 +67661,8 @@
|
|
|
67614
67661
|
type: core.App
|
|
67615
67662
|
}, {
|
|
67616
67663
|
type: core$1.ElementRef
|
|
67664
|
+
}, {
|
|
67665
|
+
type: modal.BsModalService
|
|
67617
67666
|
}, {
|
|
67618
67667
|
type: core$2.DeviceService
|
|
67619
67668
|
}, {
|
|
@@ -72947,6 +72996,13 @@
|
|
|
72947
72996
|
type: core.AbstractHttpService
|
|
72948
72997
|
} ];
|
|
72949
72998
|
};
|
|
72999
|
+
var Formatter = function() {
|
|
73000
|
+
function Formatter() {}
|
|
73001
|
+
Formatter.prototype.format = function(value, format) {
|
|
73002
|
+
return exports.appManager.getPipe("date").transform(value, format);
|
|
73003
|
+
};
|
|
73004
|
+
return Formatter;
|
|
73005
|
+
}();
|
|
72950
73006
|
var VariablesService = function() {
|
|
72951
73007
|
function VariablesService(httpService, metadataService, navigationService, routerService, toasterService, oAuthService, securityService, dialogService) {
|
|
72952
73008
|
this.httpService = httpService;
|
|
@@ -73053,6 +73109,7 @@
|
|
|
73053
73109
|
if (this.isVariableSeperated(variablesJson, variableName)) {
|
|
73054
73110
|
this.processBinding(varInstance, scope, "dataBinding", this.getBindSourceTarget(varInstance));
|
|
73055
73111
|
varInstance.httpService = this.httpService;
|
|
73112
|
+
varInstance.dateFormatter = new Formatter;
|
|
73056
73113
|
varInstance.subscribe("afterInvoke", (function() {
|
|
73057
73114
|
return core.$invokeWatchers(true);
|
|
73058
73115
|
}));
|
|
@@ -73142,6 +73199,7 @@
|
|
|
73142
73199
|
exports.DB_CONSTANTS = DB_CONSTANTS;
|
|
73143
73200
|
exports.DeviceVariableManager = DeviceVariableManager;
|
|
73144
73201
|
exports.DeviceVariableService = DeviceVariableService;
|
|
73202
|
+
exports.Formatter = Formatter;
|
|
73145
73203
|
exports.MetadataService = MetadataService;
|
|
73146
73204
|
exports.SWAGGER_CONSTANTS = SWAGGER_CONSTANTS;
|
|
73147
73205
|
exports.VARIABLE_CONSTANTS = VARIABLE_CONSTANTS;
|