@wavemaker/app-runtime-wm-build 11.4.0-next.25501 → 11.4.0-next.25701
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 +41679 -19991
- app-runtime-wm-build/wmapp/scripts/wm-libs.min.js +1265 -428
- app-runtime-wm-build/wmapp/scripts/wm-loader.js +672 -465
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +20 -20
- app-runtime-wm-build/wmapp/styles/css/wm-style.css +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-libs.js +39082 -17394
- app-runtime-wm-build/wmmobile/scripts/wm-libs.min.js +1266 -429
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +699 -473
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +18 -18
- app-runtime-wm-build/wmmobile/styles/css/wm-style.css +1 -1
|
@@ -5052,7 +5052,12 @@
|
|
|
5052
5052
|
fieldDefs = [];
|
|
5053
5053
|
parent.gridOptions.setCurrentPage(1);
|
|
5054
5054
|
}
|
|
5055
|
-
var currentPage
|
|
5055
|
+
var currentPage;
|
|
5056
|
+
if (parent.widgetType === "wm-table") {
|
|
5057
|
+
currentPage = parent.gridOptions.showviewlessbutton && parent.gridOptions.mode === "viewless" ? parent.gridOptions.getCurrentPage() : parent.currentPage;
|
|
5058
|
+
} else {
|
|
5059
|
+
currentPage = parent.currentPage;
|
|
5060
|
+
}
|
|
5056
5061
|
var dataNavigator = parent.dataNavigator;
|
|
5057
5062
|
var pagesize = parent.pagesize;
|
|
5058
5063
|
if (!isDefined(fieldDefs) || dataNavigator.isFirstPage()) {
|
|
@@ -8652,6 +8657,16 @@
|
|
|
8652
8657
|
var routeRegex = new RegExp("^(#/|#)" + routeName + "$");
|
|
8653
8658
|
return routeRegex.test(link);
|
|
8654
8659
|
};
|
|
8660
|
+
var hasLinkToCurrentPage = function(nodes, routeUrl) {
|
|
8661
|
+
return nodes.some((function(node) {
|
|
8662
|
+
if (isActiveNavItem(node.link, routeUrl)) {
|
|
8663
|
+
return true;
|
|
8664
|
+
}
|
|
8665
|
+
if (node.children) {
|
|
8666
|
+
return hasLinkToCurrentPage(node.children, routeUrl);
|
|
8667
|
+
}
|
|
8668
|
+
}));
|
|
8669
|
+
};
|
|
8655
8670
|
var getOrderByExpr = function(pageableObj) {
|
|
8656
8671
|
pageableObj = pageableObj || [];
|
|
8657
8672
|
var expressions = [], KEY_VAL_SEPARATOR = " ", FIELD_SEPARATOR = ",";
|
|
@@ -8958,9 +8973,11 @@
|
|
|
8958
8973
|
});
|
|
8959
8974
|
};
|
|
8960
8975
|
var getKeyboardFocusableElements = function(element) {
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8976
|
+
var elementNodeList = element.querySelectorAll("a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable]");
|
|
8977
|
+
var elements = Array.from(elementNodeList);
|
|
8978
|
+
return elements.filter((function(el) {
|
|
8979
|
+
return !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && (!el.hasAttribute("tabindex") || el.hasAttribute("tabindex") && !el.getAttribute("tabindex").startsWith("-"));
|
|
8980
|
+
}));
|
|
8964
8981
|
};
|
|
8965
8982
|
exports.APPLY_STYLES_TYPE = void 0;
|
|
8966
8983
|
(function(APPLY_STYLES_TYPE) {
|
|
@@ -11214,6 +11231,10 @@
|
|
|
11214
11231
|
if (openedDialogs.indexOf(ref) !== -1) {
|
|
11215
11232
|
openedDialogs.splice(openedDialogs.indexOf(ref), 1);
|
|
11216
11233
|
}
|
|
11234
|
+
if (openedDialogs.length === 0 && (core$1.isMobile() || core$1.isMobileApp())) {
|
|
11235
|
+
var parentSelector = $("body > app-root")[0];
|
|
11236
|
+
parentSelector.removeAttribute("aria-hidden");
|
|
11237
|
+
}
|
|
11217
11238
|
};
|
|
11218
11239
|
DialogServiceImpl.prototype.getOpenedDialogs = function() {
|
|
11219
11240
|
return openedDialogs;
|
|
@@ -12389,7 +12410,8 @@
|
|
|
12389
12410
|
mindate: "mindate",
|
|
12390
12411
|
maxdate: "maxdate",
|
|
12391
12412
|
excludedates: "excludedates",
|
|
12392
|
-
excludedays: "excludedays"
|
|
12413
|
+
excludedays: "excludedays",
|
|
12414
|
+
invalidNumber: "invalidNumber"
|
|
12393
12415
|
};
|
|
12394
12416
|
var BaseFieldValidations = function() {
|
|
12395
12417
|
function BaseFieldValidations(instance, formwidget, widgettype, widgetControl, widgetContext, tableFieldType) {
|
|
@@ -13022,6 +13044,7 @@
|
|
|
13022
13044
|
exports.getWidgetPropsByType = getWidgetPropsByType;
|
|
13023
13045
|
exports.groupData = groupData;
|
|
13024
13046
|
exports.handleHeaderClick = handleHeaderClick;
|
|
13047
|
+
exports.hasLinkToCurrentPage = hasLinkToCurrentPage;
|
|
13025
13048
|
exports.interpolateBindExpressions = interpolateBindExpressions;
|
|
13026
13049
|
exports.isActiveNavItem = isActiveNavItem;
|
|
13027
13050
|
exports.isBooleanAttr = isBooleanAttr;
|
|
@@ -13419,21 +13442,19 @@
|
|
|
13419
13442
|
__proto__: null,
|
|
13420
13443
|
default: search_build
|
|
13421
13444
|
});
|
|
13422
|
-
var tagName$1o = "
|
|
13445
|
+
var tagName$1o = "ul";
|
|
13423
13446
|
transpiler.register("wm-tree", (function() {
|
|
13424
13447
|
return {
|
|
13425
13448
|
pre: function(attrs) {
|
|
13426
|
-
return "<" + tagName$1o +
|
|
13449
|
+
return "<" + tagName$1o + ' wmTree class="ztree" ' + transpiler.getAttrMarkup(attrs) + ">";
|
|
13427
13450
|
},
|
|
13428
13451
|
post: function() {
|
|
13429
13452
|
return "</" + tagName$1o + ">";
|
|
13430
13453
|
}
|
|
13431
13454
|
};
|
|
13432
13455
|
}));
|
|
13433
|
-
var tree_build =
|
|
13434
|
-
|
|
13435
|
-
__proto__: null,
|
|
13436
|
-
default: tree_build
|
|
13456
|
+
var tree_build = Object.freeze({
|
|
13457
|
+
__proto__: null
|
|
13437
13458
|
});
|
|
13438
13459
|
var tagName$1n = "div";
|
|
13439
13460
|
transpiler.register("wm-card", (function() {
|
|
@@ -14199,7 +14220,7 @@
|
|
|
14199
14220
|
var eventsTmpl = widgetType === core.FormWidgetType.UPLOAD ? "" : getEventsTemplate(attrs);
|
|
14200
14221
|
var controlLayout = core.isMobileApp() ? "col-xs-12" : "col-sm-12";
|
|
14201
14222
|
var isInList = pCounter === (parentList && parentList.get("parent_form_reference"));
|
|
14202
|
-
attrs.set("
|
|
14223
|
+
attrs.set("__validationId", formFieldErrorMsgId);
|
|
14203
14224
|
attrs.set("__widgetType", widgetType);
|
|
14204
14225
|
attrs.delete("widget");
|
|
14205
14226
|
shared.set("counter", counter);
|
|
@@ -14209,7 +14230,7 @@
|
|
|
14209
14230
|
} else {
|
|
14210
14231
|
setDefaultPlaceholder(attrs, widgetType, 2);
|
|
14211
14232
|
}
|
|
14212
|
-
return "<" + tagName$X + ' data-role="' + dataRole + '" [formGroup]="' + pCounter + '.ngform" wmFormField captionPosition #' + counter + '="wmFormField" widgettype="' + widgetType + '" ' + transpiler.getFormMarkupAttr(attrs) + '>\n <div class="live-field form-group app-composite-widget clearfix caption-{{' + pCounter + '.captionposition}}" widget="' + widgetType + '">\n <label [hidden]="!' + counter + '.displayname" class="app-label control-label formfield-label {{' + pCounter + '._captionClass}}"\n [ngStyle]="{width: ' + pCounter + ".captionsize}\" [ngClass]=\"{'text-danger': " + counter + "._control?.invalid && " + counter + "._control?.touched && " + pCounter + ".isUpdateMode,\n required: " + pCounter + ".isUpdateMode && " + counter + '.required}" [textContent]="' + counter + '.displayname"> </label>\n <div [ngClass]="' + counter + ".displayname ? " + pCounter + "._widgetClass : '" + controlLayout + '\'">\n <label class="form-control-static app-label"
|
|
14233
|
+
return "<" + tagName$X + ' data-role="' + dataRole + '" [formGroup]="' + pCounter + '.ngform" wmFormField captionPosition #' + counter + '="wmFormField" widgettype="' + widgetType + '" ' + transpiler.getFormMarkupAttr(attrs) + '>\n <div class="live-field form-group app-composite-widget clearfix caption-{{' + pCounter + '.captionposition}}" widget="' + widgetType + '">\n <label [hidden]="!' + counter + '.displayname" class="app-label control-label formfield-label {{' + pCounter + '._captionClass}}"\n [ngStyle]="{width: ' + pCounter + ".captionsize}\" [ngClass]=\"{'text-danger': " + counter + "._control?.invalid && " + counter + "._control?.touched && " + pCounter + ".isUpdateMode,\n required: " + pCounter + ".isUpdateMode && " + counter + '.required}" [textContent]="' + counter + '.displayname"> </label>\n <div [ngClass]="' + counter + ".displayname ? " + pCounter + "._widgetClass : '" + controlLayout + '\'">\n <label class="form-control-static app-label"\n [hidden]="' + pCounter + ".isUpdateMode || " + counter + ".viewmodewidget === 'default' || " + counter + ".widgettype === 'upload'\" [innerHTML]=\"" + getCaptionByWidget(attrs, widgetType, counter) + '"></label>\n ' + getTemplate(attrs, widgetType, eventsTmpl, counter, pCounter, isInList) + '\n <span aria-hidden="true" *ngIf="' + counter + '.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>\n <p *ngIf="!(' + counter + "._control?.invalid && " + counter + "._control?.touched) && " + pCounter + '.isUpdateMode"\n class="help-block" aria-hidden="true" role="alert" aria-live="polite" [textContent]="' + counter + '.hint"></p>\n ' + validationMsg + "\n </div>\n </div>";
|
|
14213
14234
|
},
|
|
14214
14235
|
post: function() {
|
|
14215
14236
|
return "</" + tagName$X + ">";
|
|
@@ -15039,7 +15060,7 @@
|
|
|
15039
15060
|
}
|
|
15040
15061
|
var markup = "<" + tagName$q + " wmPopover " + transpiler.getAttrMarkup(attrs) + ">";
|
|
15041
15062
|
var contextAttrs = table ? 'let-row="row"' : "";
|
|
15042
|
-
markup += "<ng-template " + contextAttrs + '><
|
|
15063
|
+
markup += "<ng-template " + contextAttrs + '><div tabindex="0" class="popover-start sr-only" aria-label="">popover content start</div>';
|
|
15043
15064
|
if (popoverTemplate) {
|
|
15044
15065
|
markup += "" + (popoverTemplate ? popoverTemplate : "");
|
|
15045
15066
|
}
|
|
@@ -15050,7 +15071,7 @@
|
|
|
15050
15071
|
if (shared.get("hasPopoverContent")) {
|
|
15051
15072
|
markup += "</div>";
|
|
15052
15073
|
}
|
|
15053
|
-
return markup + '<
|
|
15074
|
+
return markup + '<div tabindex="0" class="popover-end sr-only" aria-label="">popover content ended</div></ng-template></' + tagName$q + ">";
|
|
15054
15075
|
}
|
|
15055
15076
|
};
|
|
15056
15077
|
}));
|
|
@@ -16414,7 +16435,7 @@
|
|
|
16414
16435
|
exports.tileBuild = tile_build$1;
|
|
16415
16436
|
exports.timeBuild = time_build$1;
|
|
16416
16437
|
exports.topNavBuild = topNav_build$1;
|
|
16417
|
-
exports.treeBuild = tree_build
|
|
16438
|
+
exports.treeBuild = tree_build;
|
|
16418
16439
|
exports.videoBuild = video_build$1;
|
|
16419
16440
|
exports.wizardBuild = wizard_build$1;
|
|
16420
16441
|
exports.wizardStepBuild = wizardStep_build$1;
|
|
@@ -21253,8 +21274,8 @@
|
|
|
21253
21274
|
var \u02750 = getChangeEvt;
|
|
21254
21275
|
var overrideSummerNote = function() {
|
|
21255
21276
|
if (!$.summernote.__overidden) {
|
|
21256
|
-
var origFn_1 = $.summernote.
|
|
21257
|
-
$.summernote.
|
|
21277
|
+
var origFn_1 = $.summernote.ui_template().button.bind($.summernote);
|
|
21278
|
+
$.summernote.ui_template.button = function() {
|
|
21258
21279
|
var args = [];
|
|
21259
21280
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
21260
21281
|
args[_i] = arguments[_i];
|
|
@@ -22760,10 +22781,10 @@
|
|
|
22760
22781
|
}));
|
|
22761
22782
|
|
|
22762
22783
|
(function(global, factory) {
|
|
22763
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@angular/core"), require("@angular/common"), require("@wm/components/base")
|
|
22784
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@angular/core"), require("@angular/common"), require("@wm/components/base")) : typeof define === "function" && define.amd ? define("@wm/components/basic/tree", [ "exports", "@angular/core", "@angular/common", "@wm/components/base" ], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
|
|
22764
22785
|
factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {},
|
|
22765
|
-
global.wm.components.basic = global.wm.components.basic || {}, global.wm.components.basic.tree = {}), global.ng.core, global.ng.common, global.wm.components.base
|
|
22766
|
-
})(this, (function(exports, core
|
|
22786
|
+
global.wm.components.basic = global.wm.components.basic || {}, global.wm.components.basic.tree = {}), global.ng.core, global.ng.common, global.wm.components.base));
|
|
22787
|
+
})(this, (function(exports, core, common, base) {
|
|
22767
22788
|
"use strict";
|
|
22768
22789
|
/*! *****************************************************************************
|
|
22769
22790
|
Copyright (c) Microsoft Corporation.
|
|
@@ -23140,352 +23161,344 @@
|
|
|
23140
23161
|
value: 0
|
|
23141
23162
|
}, base.PROP_NUMBER) ], [ "treeicons", base.PROP_STRING ] ]));
|
|
23142
23163
|
};
|
|
23143
|
-
var defaultTreeIconClass = "plus-minus";
|
|
23144
|
-
var ICON_CLASSES = {
|
|
23145
|
-
folder: {
|
|
23146
|
-
expanded: "wi-folder-open",
|
|
23147
|
-
collapsed: "wi-folder"
|
|
23148
|
-
},
|
|
23149
|
-
"circle-plus-minus": {
|
|
23150
|
-
expanded: "wi-remove-circle-outline",
|
|
23151
|
-
collapsed: "wi-add-circle-outline"
|
|
23152
|
-
},
|
|
23153
|
-
chevron: {
|
|
23154
|
-
expanded: "wi-keyboard-arrow-down",
|
|
23155
|
-
collapsed: "wi-keyboard-arrow-right"
|
|
23156
|
-
},
|
|
23157
|
-
menu: {
|
|
23158
|
-
expanded: "wi-arrow-down",
|
|
23159
|
-
collapsed: "wi-arrow-right"
|
|
23160
|
-
},
|
|
23161
|
-
triangle: {
|
|
23162
|
-
expanded: "wi-arrow-drop-down-circle",
|
|
23163
|
-
collapsed: "wi-play-circle-filled"
|
|
23164
|
-
},
|
|
23165
|
-
"expand-collapse": {
|
|
23166
|
-
expanded: "wi-expand-less",
|
|
23167
|
-
collapsed: "wi-expand-more"
|
|
23168
|
-
},
|
|
23169
|
-
"plus-minus": {
|
|
23170
|
-
expanded: "wi-minus",
|
|
23171
|
-
collapsed: "wi-plus"
|
|
23172
|
-
}
|
|
23173
|
-
};
|
|
23174
23164
|
var WIDGET_INFO = {
|
|
23175
23165
|
widgetType: "wm-tree",
|
|
23176
23166
|
hostClass: "app-tree"
|
|
23177
23167
|
};
|
|
23178
|
-
var
|
|
23179
|
-
|
|
23180
|
-
|
|
23168
|
+
var defaultTreeIconClass = "plus-minus";
|
|
23169
|
+
var TreeComponent = function(_super) {
|
|
23170
|
+
__extends(TreeComponent, _super);
|
|
23171
|
+
function TreeComponent(inj) {
|
|
23181
23172
|
var _this = _super.call(this, inj, WIDGET_INFO) || this;
|
|
23182
|
-
_this.
|
|
23183
|
-
|
|
23184
|
-
|
|
23185
|
-
|
|
23186
|
-
|
|
23173
|
+
_this.setting = {
|
|
23174
|
+
data: {
|
|
23175
|
+
simpleData: {
|
|
23176
|
+
enable: true
|
|
23177
|
+
}
|
|
23178
|
+
},
|
|
23179
|
+
view: {
|
|
23180
|
+
dblClickExpand: false,
|
|
23181
|
+
fontCss: {
|
|
23182
|
+
"font-awesome": true
|
|
23183
|
+
},
|
|
23184
|
+
switchIcon: {}
|
|
23185
|
+
},
|
|
23186
|
+
check: {},
|
|
23187
|
+
callback: {}
|
|
23188
|
+
};
|
|
23187
23189
|
base.styler(_this.nativeElement, _this, base.APPLY_STYLES_TYPE.CONTAINER);
|
|
23188
|
-
_this.bindEvents();
|
|
23189
23190
|
return _this;
|
|
23190
23191
|
}
|
|
23191
|
-
|
|
23192
|
+
TreeComponent.prototype.onPropertyChange = function(key, nv, ov) {
|
|
23192
23193
|
switch (key) {
|
|
23193
23194
|
case "dataset":
|
|
23194
23195
|
this.nodes = this.getNodes(nv);
|
|
23195
|
-
this.
|
|
23196
|
+
if (this.level > 0) {
|
|
23197
|
+
this.expandTree(this.level, this.nodes, 0);
|
|
23198
|
+
}
|
|
23196
23199
|
this.renderTree();
|
|
23197
23200
|
break;
|
|
23198
23201
|
|
|
23199
|
-
case "
|
|
23200
|
-
|
|
23201
|
-
|
|
23202
|
-
|
|
23203
|
-
this.renderTree();
|
|
23202
|
+
case "levels":
|
|
23203
|
+
if (nv > 0) {
|
|
23204
|
+
this.level = nv;
|
|
23205
|
+
}
|
|
23204
23206
|
break;
|
|
23205
23207
|
|
|
23206
23208
|
case "treeicons":
|
|
23207
|
-
this.
|
|
23209
|
+
this.treeicon = nv;
|
|
23208
23210
|
break;
|
|
23209
23211
|
|
|
23210
|
-
case "
|
|
23211
|
-
this.
|
|
23212
|
+
case "nodelabel":
|
|
23213
|
+
this.nodelabel = nv;
|
|
23214
|
+
break;
|
|
23215
|
+
|
|
23216
|
+
case "icon":
|
|
23217
|
+
this.nodeicon = nv;
|
|
23218
|
+
|
|
23219
|
+
case "orderby":
|
|
23220
|
+
this.renderTree();
|
|
23221
|
+
break;
|
|
23222
|
+
|
|
23223
|
+
case "class":
|
|
23224
|
+
this.treeClass = nv;
|
|
23212
23225
|
break;
|
|
23213
23226
|
|
|
23214
23227
|
default:
|
|
23215
23228
|
_super.prototype.onPropertyChange.call(this, key, nv, ov);
|
|
23229
|
+
break;
|
|
23216
23230
|
}
|
|
23217
23231
|
};
|
|
23218
|
-
|
|
23232
|
+
TreeComponent.prototype.expandTree = function(level, node, childLevel) {
|
|
23219
23233
|
var _this = this;
|
|
23220
|
-
|
|
23221
|
-
|
|
23222
|
-
|
|
23223
|
-
|
|
23224
|
-
_cls = levels > 0 ? " expanded " : " collapsed ";
|
|
23225
|
-
_iconCls = _cls + (levels > 0 ? _iconClses.expanded : _iconClses.collapsed);
|
|
23226
|
-
deep = deep || 0;
|
|
23227
|
-
parent.append($ul);
|
|
23228
|
-
nodes.forEach((function(node, idx) {
|
|
23229
|
-
var $li = $("<li></li>"), $iconNode = $("<i></i>"), nodeLabel = base.getEvaluatedData(node, {
|
|
23230
|
-
field: _this.nodelabel,
|
|
23231
|
-
bindExpression: _this.bindnodelabel
|
|
23232
|
-
}, _this.viewParent) || node.label, nodeIcon = base.getEvaluatedData(node, {
|
|
23233
|
-
field: _this.nodeicon,
|
|
23234
|
-
bindExpression: _this.bindnodeicon
|
|
23235
|
-
}, _this.viewParent) || node.icon, nodeChildren = base.getEvaluatedData(node, {
|
|
23236
|
-
field: _this.nodechildren,
|
|
23237
|
-
bindExpression: _this.bindnodechildren
|
|
23238
|
-
}, _this.viewParent) || node.children;
|
|
23239
|
-
var nodeIdValue = base.getEvaluatedData(node, {
|
|
23240
|
-
field: _this.nodeid,
|
|
23241
|
-
bindExpression: _this.bindnodeid
|
|
23242
|
-
}, _this.viewParent);
|
|
23243
|
-
if (nodeIdValue === undefined) {
|
|
23244
|
-
nodeIdValue = node.children;
|
|
23245
|
-
}
|
|
23246
|
-
var isNodeMatched = false, expandCollapseIcon;
|
|
23247
|
-
$li.data("nodedata", node).append($iconNode).append('<span class="title">' + nodeLabel + "</span>").appendTo($ul);
|
|
23248
|
-
if (_this.bindnodeid || _this.nodeid) {
|
|
23249
|
-
isNodeMatched = _this.binddatavalue ? nodeIdValue === _evalDataValue : nodeIdValue === _expr;
|
|
23250
|
-
if (nodeIdValue !== undefined) {
|
|
23251
|
-
$li.attr("id", nodeIdValue);
|
|
23252
|
-
}
|
|
23253
|
-
} else if (_this.binddatavalue) {
|
|
23254
|
-
isNodeMatched = !!core.$parseExpr(_expr)(_this, node);
|
|
23255
|
-
}
|
|
23256
|
-
if (!_this._selectNode) {
|
|
23257
|
-
if (_expr === "FirstNode" && idx === 0 || !deep && _expr === "LastNode" && idx === nodes.length - 1 || isNodeMatched) {
|
|
23258
|
-
_this._selectNode = $li;
|
|
23259
|
-
_this.datavalue = nodeIdValue;
|
|
23260
|
-
}
|
|
23261
|
-
}
|
|
23262
|
-
if (nodeIcon) {
|
|
23263
|
-
$iconNode.addClass(nodeIcon);
|
|
23264
|
-
}
|
|
23265
|
-
if (nodeChildren && nodeChildren.length) {
|
|
23266
|
-
$li.addClass("parent-node " + _cls);
|
|
23267
|
-
expandCollapseIcon = $('<i class="wi ' + _iconCls + '"></i>');
|
|
23268
|
-
if (nodeIcon) {
|
|
23269
|
-
$iconNode.addClass(nodeIcon);
|
|
23270
|
-
}
|
|
23271
|
-
$li.prepend(expandCollapseIcon);
|
|
23272
|
-
_this.constructNodes(nodeChildren, $li, levels - 1, deep + 1, _evalDataValue);
|
|
23234
|
+
node.map((function(childNode) {
|
|
23235
|
+
if ("children" in childNode && !("open" in childNode) && childLevel < level) {
|
|
23236
|
+
childNode["open"] = true;
|
|
23237
|
+
_this.expandTree(level, childNode.children, childLevel + 1);
|
|
23273
23238
|
} else {
|
|
23274
|
-
|
|
23275
|
-
|
|
23276
|
-
}
|
|
23277
|
-
$li.addClass("leaf-node");
|
|
23239
|
+
childLevel = 0;
|
|
23240
|
+
return;
|
|
23278
23241
|
}
|
|
23279
23242
|
}));
|
|
23280
23243
|
};
|
|
23281
|
-
|
|
23244
|
+
TreeComponent.prototype.setTreeTemplate = function(value) {
|
|
23245
|
+
if (value === "Classic") {
|
|
23246
|
+
this.setting.check["enable"] = false;
|
|
23247
|
+
} else if (value === "Checkbox") {
|
|
23248
|
+
this.setting.check["enable"] = true;
|
|
23249
|
+
this.setting.check["chkStyle"] = "checkbox";
|
|
23250
|
+
} else if (value === "Radio") {
|
|
23251
|
+
this.setting.check["enable"] = true;
|
|
23252
|
+
this.setting.check["chkStyle"] = "radio";
|
|
23253
|
+
this.setting.check["radioType"] = "all";
|
|
23254
|
+
}
|
|
23255
|
+
};
|
|
23256
|
+
TreeComponent.prototype.getNodesFromString = function(value) {
|
|
23282
23257
|
return value.split(",").map((function(item) {
|
|
23283
23258
|
return {
|
|
23284
|
-
|
|
23259
|
+
name: item && item.trim()
|
|
23285
23260
|
};
|
|
23286
23261
|
}));
|
|
23287
23262
|
};
|
|
23288
|
-
|
|
23263
|
+
TreeComponent.prototype.getNodes = function(newVal) {
|
|
23289
23264
|
var nodes;
|
|
23290
|
-
if (_.
|
|
23265
|
+
if (_.isArray(newVal)) {
|
|
23266
|
+
nodes = base.getOrderedDataset(newVal, this.orderby);
|
|
23267
|
+
} else if (_.isObject(newVal)) {
|
|
23268
|
+
nodes = [ newVal ];
|
|
23269
|
+
} else if (_.isString(newVal) && !_.isEmpty(newVal)) {
|
|
23291
23270
|
newVal = newVal.trim();
|
|
23292
23271
|
if (newVal) {
|
|
23293
23272
|
nodes = this.getNodesFromString(newVal);
|
|
23294
23273
|
}
|
|
23295
|
-
} else if (_.isArray(newVal)) {
|
|
23296
|
-
newVal = base.getOrderedDataset(newVal, this.orderby);
|
|
23297
|
-
nodes = newVal;
|
|
23298
|
-
} else if (_.isObject(newVal)) {
|
|
23299
|
-
nodes = [ newVal ];
|
|
23300
23274
|
}
|
|
23301
23275
|
return nodes;
|
|
23302
23276
|
};
|
|
23303
|
-
|
|
23304
|
-
|
|
23305
|
-
|
|
23306
|
-
|
|
23307
|
-
$el.find("i.expanded").removeClass(ICON_CLASSES[ov].expanded).addClass(ICON_CLASSES[nv].expanded);
|
|
23308
|
-
$el.find("i.collapsed").removeClass(ICON_CLASSES[ov].collapsed).addClass(ICON_CLASSES[nv].collapsed);
|
|
23309
|
-
};
|
|
23310
|
-
TreeDirective.prototype.toggleExpandCollapseNode = function($event, $i, $li) {
|
|
23311
|
-
var treeIcons = ICON_CLASSES[this.treeicons || defaultTreeIconClass];
|
|
23312
|
-
var $liPath = this.findSelectedNodeParent($li);
|
|
23313
|
-
var path = "";
|
|
23314
|
-
$liPath.each((function(i, el) {
|
|
23315
|
-
var current = $(el).children(".title").text();
|
|
23316
|
-
path = "/" + (current + path);
|
|
23317
|
-
}));
|
|
23318
|
-
var eventParams = {
|
|
23319
|
-
$event: $event,
|
|
23320
|
-
$item: $li.data("nodedata"),
|
|
23321
|
-
$path: path
|
|
23322
|
-
};
|
|
23323
|
-
if ($i.hasClass("collapsed")) {
|
|
23324
|
-
$i.removeClass("collapsed " + treeIcons.collapsed).addClass("expanded " + treeIcons.expanded);
|
|
23325
|
-
$li.removeClass("collapsed").addClass("expanded");
|
|
23326
|
-
this.invokeEventCallback("expand", eventParams);
|
|
23327
|
-
} else if ($i.hasClass("expanded")) {
|
|
23328
|
-
$i.removeClass("expanded " + treeIcons.expanded).addClass("collapsed " + treeIcons.collapsed);
|
|
23329
|
-
$li.removeClass("expanded").addClass("collapsed");
|
|
23330
|
-
this.invokeEventCallback("collapse", eventParams);
|
|
23331
|
-
}
|
|
23277
|
+
TreeComponent.prototype.setNodeclasses = function(treeId, treeNode) {
|
|
23278
|
+
return treeNode.icon ? {
|
|
23279
|
+
add: [ "" + treeNode.icon ]
|
|
23280
|
+
} : "";
|
|
23332
23281
|
};
|
|
23333
|
-
|
|
23282
|
+
TreeComponent.prototype.setNodeData = function(nodes, depth, level, parentNode, type) {
|
|
23334
23283
|
var _this = this;
|
|
23335
|
-
|
|
23336
|
-
|
|
23337
|
-
|
|
23338
|
-
|
|
23339
|
-
|
|
23340
|
-
|
|
23341
|
-
|
|
23342
|
-
|
|
23343
|
-
|
|
23344
|
-
|
|
23345
|
-
|
|
23346
|
-
|
|
23347
|
-
|
|
23348
|
-
|
|
23349
|
-
|
|
23350
|
-
|
|
23351
|
-
|
|
23352
|
-
|
|
23353
|
-
|
|
23354
|
-
|
|
23355
|
-
|
|
23356
|
-
_this.
|
|
23357
|
-
|
|
23284
|
+
if (depth === 0) {
|
|
23285
|
+
nodes.map((function(node) {
|
|
23286
|
+
if (node.children) {
|
|
23287
|
+
_this.setNodeData(node.children, depth, level, parentNode, type);
|
|
23288
|
+
}
|
|
23289
|
+
if (node.icon && _this.nodelabel == "icon") {
|
|
23290
|
+
node[type] = node.icon;
|
|
23291
|
+
} else if (node.name && _this.nodelabel == "name") {
|
|
23292
|
+
node[type] = node.name;
|
|
23293
|
+
} else {
|
|
23294
|
+
return;
|
|
23295
|
+
}
|
|
23296
|
+
}));
|
|
23297
|
+
} else {
|
|
23298
|
+
nodes.map((function(node) {
|
|
23299
|
+
if (node.children && level > 1) {
|
|
23300
|
+
if (depth === level) {
|
|
23301
|
+
parentNode = node;
|
|
23302
|
+
}
|
|
23303
|
+
_this.setNodeData(node.children, depth, level - 1, parentNode, type);
|
|
23304
|
+
}
|
|
23305
|
+
if (level === 1 && (type === "name" ? _this.nodelabel.includes("label") || _this.nodelabel.includes("name") : _this.nodeicon.includes("label") || _this.nodeicon.includes("name"))) {
|
|
23306
|
+
parentNode[type] = node.name || node.label;
|
|
23307
|
+
return;
|
|
23308
|
+
} else if (level === 1 && node.icon !== undefined && (type === "name" ? _this.nodelabel.includes("icon") : _this.nodeicon.includes("icon"))) {
|
|
23309
|
+
parentNode[type] = node.icon;
|
|
23310
|
+
return;
|
|
23311
|
+
} else {
|
|
23312
|
+
return;
|
|
23313
|
+
}
|
|
23358
23314
|
}));
|
|
23359
|
-
this.selecteditem = core.getClonedObject(data) || {};
|
|
23360
|
-
this.selecteditem.path = path;
|
|
23361
|
-
this.invokeEventCallback("select", {
|
|
23362
|
-
$event: undefined,
|
|
23363
|
-
$item: data,
|
|
23364
|
-
$path: path
|
|
23365
|
-
});
|
|
23366
|
-
core.$appDigest();
|
|
23367
23315
|
}
|
|
23368
23316
|
};
|
|
23369
|
-
|
|
23370
|
-
var
|
|
23371
|
-
|
|
23372
|
-
|
|
23373
|
-
|
|
23374
|
-
|
|
23375
|
-
|
|
23376
|
-
|
|
23377
|
-
|
|
23378
|
-
|
|
23379
|
-
|
|
23380
|
-
|
|
23381
|
-
|
|
23382
|
-
|
|
23383
|
-
path = "/" + (current + path);
|
|
23384
|
-
}));
|
|
23385
|
-
$li.parentsUntil($el, "li.parent-node.collapsed").each((function(index, el) {
|
|
23386
|
-
var $current = $(el), $i = $current.children("i.collapsed");
|
|
23387
|
-
_this.toggleExpandCollapseNode(undefined, $i, $current);
|
|
23388
|
-
}));
|
|
23389
|
-
this.selecteditem = core.getClonedObject(data) || {};
|
|
23390
|
-
this.selecteditem.path = path;
|
|
23391
|
-
if (target) {
|
|
23392
|
-
if (this.nodeid || this.bindnodeid) {
|
|
23393
|
-
this.datavalue = base.getEvaluatedData(data, {
|
|
23394
|
-
field: this.nodeid,
|
|
23395
|
-
bindExpression: this.bindnodeid
|
|
23396
|
-
}, this.viewParent);
|
|
23397
|
-
} else {
|
|
23398
|
-
this.datavalue = core.getClonedObject(data) || {};
|
|
23399
|
-
}
|
|
23317
|
+
TreeComponent.prototype.changeTreeIcons = function(nv) {
|
|
23318
|
+
var eleClose = $('ul[name="' + this.name + '"] li span.button.switch');
|
|
23319
|
+
$(eleClose).map((function(idx, ele) {
|
|
23320
|
+
$(ele).addClass(nv);
|
|
23321
|
+
$(ele).on("click", (function(e) {
|
|
23322
|
+
setTimeout((function() {
|
|
23323
|
+
$(ele).addClass(nv);
|
|
23324
|
+
}), 0);
|
|
23325
|
+
}));
|
|
23326
|
+
}));
|
|
23327
|
+
};
|
|
23328
|
+
TreeComponent.prototype.getPath = function(treeNode, path) {
|
|
23329
|
+
if (treeNode.getParentNode() === null) {
|
|
23330
|
+
path = "/" + treeNode.name + path;
|
|
23400
23331
|
} else {
|
|
23401
|
-
this.
|
|
23332
|
+
path = this.getPath(treeNode.getParentNode(), path) + "/" + treeNode.name;
|
|
23402
23333
|
}
|
|
23403
|
-
|
|
23404
|
-
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23334
|
+
return path;
|
|
23335
|
+
};
|
|
23336
|
+
TreeComponent.prototype.onClick = function(event, treeId, treeNode, clickFlag) {
|
|
23337
|
+
var treeObj = $.fn.zTree.getZTreeObj("" + this.name);
|
|
23338
|
+
var path = this.getPath(treeNode, "");
|
|
23339
|
+
var eventParams = {
|
|
23340
|
+
$event: event,
|
|
23341
|
+
$item: treeNode,
|
|
23409
23342
|
$path: path
|
|
23410
|
-
}
|
|
23411
|
-
|
|
23343
|
+
};
|
|
23344
|
+
this.invokeEventCallback("select", eventParams);
|
|
23412
23345
|
};
|
|
23413
|
-
|
|
23346
|
+
TreeComponent.prototype.onExpand = function(event, treeId, treeNode) {
|
|
23347
|
+
var self = this;
|
|
23348
|
+
var path = this.getPath(treeNode, "");
|
|
23349
|
+
var eventParams = {
|
|
23350
|
+
$event: event,
|
|
23351
|
+
$item: treeNode,
|
|
23352
|
+
$path: path
|
|
23353
|
+
};
|
|
23354
|
+
this.invokeEventCallback("expand", eventParams);
|
|
23355
|
+
treeNode.children ? treeNode.children.map((function(el) {
|
|
23356
|
+
if (el.isParent) {
|
|
23357
|
+
var ele_1 = $("#" + el.tId + "_switch");
|
|
23358
|
+
$(ele_1).addClass(self.treeicon || defaultTreeIconClass);
|
|
23359
|
+
$(ele_1).on("click", (function(e) {
|
|
23360
|
+
setTimeout((function() {
|
|
23361
|
+
$(ele_1).addClass(self.treeicon || defaultTreeIconClass);
|
|
23362
|
+
}), 0);
|
|
23363
|
+
}));
|
|
23364
|
+
}
|
|
23365
|
+
})) : "";
|
|
23366
|
+
};
|
|
23367
|
+
TreeComponent.prototype.onCollapse = function(event, treeId, treeNode) {
|
|
23368
|
+
var path = this.getPath(treeNode, "");
|
|
23369
|
+
var eventParams = {
|
|
23370
|
+
$event: event,
|
|
23371
|
+
$item: treeNode,
|
|
23372
|
+
$path: path
|
|
23373
|
+
};
|
|
23374
|
+
this.invokeEventCallback("collapse", eventParams);
|
|
23375
|
+
};
|
|
23376
|
+
TreeComponent.prototype.modifyObjects = function(array) {
|
|
23414
23377
|
var _this = this;
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
|
|
23418
|
-
|
|
23419
|
-
_this.selecteditem = {};
|
|
23420
|
-
_this.selectNode(evt, li);
|
|
23378
|
+
array.forEach((function(obj) {
|
|
23379
|
+
if (obj.label !== undefined) {
|
|
23380
|
+
obj.name = obj.label;
|
|
23381
|
+
delete obj.label;
|
|
23421
23382
|
}
|
|
23422
|
-
if (
|
|
23423
|
-
_this.
|
|
23383
|
+
if (obj.children !== undefined) {
|
|
23384
|
+
_this.modifyObjects(obj.children);
|
|
23424
23385
|
}
|
|
23425
23386
|
}));
|
|
23387
|
+
return array;
|
|
23426
23388
|
};
|
|
23427
|
-
|
|
23428
|
-
|
|
23389
|
+
TreeComponent.prototype.setNodeChildren = function(nodes, depth, level, parentNode) {
|
|
23390
|
+
if (depth <= 0) {
|
|
23391
|
+
return nodes;
|
|
23392
|
+
}
|
|
23393
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
23394
|
+
var node = nodes[i];
|
|
23395
|
+
if (depth === level) {
|
|
23396
|
+
parentNode = nodes[i];
|
|
23397
|
+
}
|
|
23398
|
+
if (node.children && node.children.length > 0) {
|
|
23399
|
+
if (level === 1) {
|
|
23400
|
+
parentNode.children = node.children.map((function(child) {
|
|
23401
|
+
return {
|
|
23402
|
+
name: child.name,
|
|
23403
|
+
children: child === null || child === void 0 ? void 0 : child.children
|
|
23404
|
+
};
|
|
23405
|
+
}));
|
|
23406
|
+
return;
|
|
23407
|
+
} else {
|
|
23408
|
+
this.setNodeChildren(node.children, depth, level - 1, parentNode);
|
|
23409
|
+
}
|
|
23410
|
+
}
|
|
23411
|
+
}
|
|
23412
|
+
return nodes;
|
|
23429
23413
|
};
|
|
23430
|
-
|
|
23431
|
-
|
|
23414
|
+
TreeComponent.prototype.countDepth = function(str) {
|
|
23415
|
+
var e_1, _a;
|
|
23416
|
+
var regex = /\[.*?\]/g;
|
|
23417
|
+
var matches = str.match(regex);
|
|
23418
|
+
var count = 1;
|
|
23419
|
+
if (matches === null) return count;
|
|
23420
|
+
try {
|
|
23421
|
+
for (var matches_1 = __values(matches), matches_1_1 = matches_1.next(); !matches_1_1.done; matches_1_1 = matches_1.next()) {
|
|
23422
|
+
var match = matches_1_1.value;
|
|
23423
|
+
count++;
|
|
23424
|
+
}
|
|
23425
|
+
} catch (e_1_1) {
|
|
23426
|
+
e_1 = {
|
|
23427
|
+
error: e_1_1
|
|
23428
|
+
};
|
|
23429
|
+
} finally {
|
|
23430
|
+
try {
|
|
23431
|
+
if (matches_1_1 && !matches_1_1.done && (_a = matches_1.return)) _a.call(matches_1);
|
|
23432
|
+
} finally {
|
|
23433
|
+
if (e_1) throw e_1.error;
|
|
23434
|
+
}
|
|
23435
|
+
}
|
|
23436
|
+
return count;
|
|
23432
23437
|
};
|
|
23433
|
-
|
|
23434
|
-
this.
|
|
23435
|
-
this.
|
|
23438
|
+
TreeComponent.prototype.renderTree = function() {
|
|
23439
|
+
console.log(this.nodes, "this.nodes");
|
|
23440
|
+
if (this.nodes) {
|
|
23441
|
+
this.nativeElement.setAttribute("id", this.name);
|
|
23442
|
+
this.nodes = this.modifyObjects(this.nodes);
|
|
23443
|
+
this.setTreeTemplate(this.treeClass);
|
|
23444
|
+
if (this.nodelabel) {
|
|
23445
|
+
var depth = 0;
|
|
23446
|
+
if (this.nodelabel.includes("children")) {
|
|
23447
|
+
depth = this.countDepth(this.nodelabel);
|
|
23448
|
+
}
|
|
23449
|
+
this.setNodeData(this.nodes, depth, depth, null, "name");
|
|
23450
|
+
}
|
|
23451
|
+
if (this.nodeicon) {
|
|
23452
|
+
var depth = 0;
|
|
23453
|
+
if (this.nodeicon.includes("children")) {
|
|
23454
|
+
depth = this.countDepth(this.nodeicon);
|
|
23455
|
+
}
|
|
23456
|
+
this.setNodeData(this.nodes, depth, depth, null, "icon");
|
|
23457
|
+
}
|
|
23458
|
+
if (this.nodechildren) {
|
|
23459
|
+
var depth = this.countDepth(this.nodechildren);
|
|
23460
|
+
if (depth > 1) {
|
|
23461
|
+
this.nodes = this.setNodeChildren(this.nodes, depth, depth, null);
|
|
23462
|
+
}
|
|
23463
|
+
}
|
|
23464
|
+
}
|
|
23465
|
+
this.setting.view["nodeClasses"] = this.setNodeclasses;
|
|
23466
|
+
this.setting.callback["onClick"] = this.onClick.bind(this);
|
|
23467
|
+
this.setting.callback["onExpand"] = this.onExpand.bind(this);
|
|
23468
|
+
this.setting.callback["onCollapse"] = this.onCollapse.bind(this);
|
|
23469
|
+
var zTree = $.fn.zTree.init($('ul[name="' + this.name + '"]'), this.setting, this.nodes);
|
|
23470
|
+
$.fn.zTreeKeyboardNavigation(zTree, $('ul[name="' + this.name + '"]'), null, this.treeicon || defaultTreeIconClass);
|
|
23471
|
+
};
|
|
23472
|
+
TreeComponent.prototype.ngAfterViewInit = function() {
|
|
23473
|
+
var _this = this;
|
|
23474
|
+
setTimeout((function() {
|
|
23475
|
+
_this.changeTreeIcons(_this.treeicon || defaultTreeIconClass);
|
|
23476
|
+
}), 200);
|
|
23436
23477
|
};
|
|
23437
|
-
return
|
|
23478
|
+
return TreeComponent;
|
|
23438
23479
|
}(base.StylableComponent);
|
|
23439
|
-
|
|
23440
|
-
|
|
23441
|
-
type: core
|
|
23480
|
+
TreeComponent.initializeProps = registerProps();
|
|
23481
|
+
TreeComponent.decorators = [ {
|
|
23482
|
+
type: core.Component,
|
|
23442
23483
|
args: [ {
|
|
23443
|
-
selector: "
|
|
23444
|
-
|
|
23484
|
+
selector: "ul[wmTree]",
|
|
23485
|
+
template: '<ul #wmTree class="ztree" id="ztree"></ul> ',
|
|
23486
|
+
providers: [ base.provideAsWidgetRef(TreeComponent) ],
|
|
23487
|
+
encapsulation: core.ViewEncapsulation.None
|
|
23445
23488
|
} ]
|
|
23446
23489
|
} ];
|
|
23447
|
-
|
|
23490
|
+
TreeComponent.ctorParameters = function() {
|
|
23448
23491
|
return [ {
|
|
23449
|
-
type: core
|
|
23450
|
-
}, {
|
|
23451
|
-
type: undefined,
|
|
23452
|
-
decorators: [ {
|
|
23453
|
-
type: core$1.Attribute,
|
|
23454
|
-
args: [ "datavalue.bind" ]
|
|
23455
|
-
} ]
|
|
23456
|
-
}, {
|
|
23457
|
-
type: undefined,
|
|
23458
|
-
decorators: [ {
|
|
23459
|
-
type: core$1.Attribute,
|
|
23460
|
-
args: [ "nodelabel.bind" ]
|
|
23461
|
-
} ]
|
|
23462
|
-
}, {
|
|
23463
|
-
type: undefined,
|
|
23464
|
-
decorators: [ {
|
|
23465
|
-
type: core$1.Attribute,
|
|
23466
|
-
args: [ "nodeicon.bind" ]
|
|
23467
|
-
} ]
|
|
23468
|
-
}, {
|
|
23469
|
-
type: undefined,
|
|
23470
|
-
decorators: [ {
|
|
23471
|
-
type: core$1.Attribute,
|
|
23472
|
-
args: [ "nodechildren.bind" ]
|
|
23473
|
-
} ]
|
|
23474
|
-
}, {
|
|
23475
|
-
type: undefined,
|
|
23476
|
-
decorators: [ {
|
|
23477
|
-
type: core$1.Attribute,
|
|
23478
|
-
args: [ "nodeid.bind" ]
|
|
23479
|
-
} ]
|
|
23492
|
+
type: core.Injector
|
|
23480
23493
|
} ];
|
|
23481
23494
|
};
|
|
23482
|
-
var components = [
|
|
23495
|
+
var components = [ TreeComponent ];
|
|
23483
23496
|
var TreeModule = function() {
|
|
23484
23497
|
function TreeModule() {}
|
|
23485
23498
|
return TreeModule;
|
|
23486
23499
|
}();
|
|
23487
23500
|
TreeModule.decorators = [ {
|
|
23488
|
-
type: core
|
|
23501
|
+
type: core.NgModule,
|
|
23489
23502
|
args: [ {
|
|
23490
23503
|
imports: [ common.CommonModule, base.WmComponentsModule ],
|
|
23491
23504
|
declarations: __spreadArray([], __read(components)),
|
|
@@ -23493,7 +23506,7 @@
|
|
|
23493
23506
|
entryComponents: []
|
|
23494
23507
|
} ]
|
|
23495
23508
|
} ];
|
|
23496
|
-
exports.
|
|
23509
|
+
exports.TreeComponent = TreeComponent;
|
|
23497
23510
|
exports.TreeModule = TreeModule;
|
|
23498
23511
|
exports["\u0275a"] = registerProps;
|
|
23499
23512
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -26903,22 +26916,24 @@
|
|
|
26903
26916
|
configurable: true
|
|
26904
26917
|
});
|
|
26905
26918
|
DateTimePickerComponent.prototype.validateSelectedDate = function() {
|
|
26906
|
-
var _a, _b, _c, _d, _e
|
|
26919
|
+
var _a, _b, _c, _d, _e;
|
|
26907
26920
|
if (!this.changedValue) {
|
|
26908
26921
|
return true;
|
|
26909
26922
|
}
|
|
26910
26923
|
var cd = moment(this.changedValue);
|
|
26911
|
-
|
|
26924
|
+
var minDate = (_a = this._bsDatepickerConfig) === null || _a === void 0 ? void 0 : _a.minDate;
|
|
26925
|
+
var maxDate = (_b = this._bsDatepickerConfig) === null || _b === void 0 ? void 0 : _b.maxDate;
|
|
26926
|
+
if (minDate && (this.mode === "DATE" && moment(minDate).startOf("day").toDate() > this.changedValue || this.mode !== "DATE" && minDate > this.changedValue)) {
|
|
26912
26927
|
return false;
|
|
26913
26928
|
}
|
|
26914
|
-
if (
|
|
26929
|
+
if (maxDate && (this.mode === "DATE" && moment(maxDate).endOf("day").toDate() < this.changedValue || this.mode !== "DATE" && maxDate < this.changedValue)) {
|
|
26915
26930
|
return false;
|
|
26916
26931
|
}
|
|
26917
|
-
if (((
|
|
26932
|
+
if (((_d = (_c = this._bsDatepickerConfig) === null || _c === void 0 ? void 0 : _c.daysDisabled) === null || _d === void 0 ? void 0 : _d.indexOf(cd.day())) >= 0) {
|
|
26918
26933
|
return false;
|
|
26919
26934
|
}
|
|
26920
26935
|
var cdSt = cd.startOf("day").toDate().getTime();
|
|
26921
|
-
if ((
|
|
26936
|
+
if ((_e = this.excludedDatesToDisable) === null || _e === void 0 ? void 0 : _e.find((function(d) {
|
|
26922
26937
|
return d.getTime() === cdSt;
|
|
26923
26938
|
}))) {
|
|
26924
26939
|
return false;
|
|
@@ -26967,6 +26982,9 @@
|
|
|
26967
26982
|
newVal.setMilliseconds(oldVal.getMilliseconds());
|
|
26968
26983
|
}
|
|
26969
26984
|
this.changedValue = newVal;
|
|
26985
|
+
if (this.mode === "DATE" && oldVal !== newVal && this.validateSelectedDate()) {
|
|
26986
|
+
this.onOkClick();
|
|
26987
|
+
}
|
|
26970
26988
|
};
|
|
26971
26989
|
DateTimePickerComponent.prototype.onTimeUpdate = function(newVal) {
|
|
26972
26990
|
this.changedValue = newVal;
|
|
@@ -26988,6 +27006,10 @@
|
|
|
26988
27006
|
this.triggerChange();
|
|
26989
27007
|
this.hideModal();
|
|
26990
27008
|
};
|
|
27009
|
+
DateTimePickerComponent.prototype.setToday = function() {
|
|
27010
|
+
var today = moment().startOf("day").toDate();
|
|
27011
|
+
this.onDateUpdate(today);
|
|
27012
|
+
};
|
|
26991
27013
|
DateTimePickerComponent.prototype.reset = function() {
|
|
26992
27014
|
this.changedValue = this._value;
|
|
26993
27015
|
};
|
|
@@ -27022,7 +27044,7 @@
|
|
|
27022
27044
|
type: core.Component,
|
|
27023
27045
|
args: [ {
|
|
27024
27046
|
selector: "wm-datetimepicker",
|
|
27025
|
-
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
|
|
27047
|
+
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 '
|
|
27026
27048
|
} ]
|
|
27027
27049
|
} ];
|
|
27028
27050
|
DateTimePickerComponent.ctorParameters = function() {
|
|
@@ -27105,8 +27127,8 @@
|
|
|
27105
27127
|
}
|
|
27106
27128
|
return arr;
|
|
27107
27129
|
};
|
|
27108
|
-
TimePickerComponent.prototype.set = function(
|
|
27109
|
-
var index =
|
|
27130
|
+
TimePickerComponent.prototype.set = function(_f, unit) {
|
|
27131
|
+
var index = _f.index, value = _f.value;
|
|
27110
27132
|
if (unit === "HOUR") {
|
|
27111
27133
|
this.value = moment(this.value).hour(parseInt(value)).toDate();
|
|
27112
27134
|
} else if (unit === "MINUTE") {
|
|
@@ -27204,6 +27226,7 @@
|
|
|
27204
27226
|
function BaseDateTimeComponent(inj, WIDGET_CONFIG) {
|
|
27205
27227
|
var _this = _super.call(this, inj, WIDGET_CONFIG) || this;
|
|
27206
27228
|
_this.isReadOnly = false;
|
|
27229
|
+
_this.clicked = false;
|
|
27207
27230
|
_this.formatsByLocale = {
|
|
27208
27231
|
timezone: ""
|
|
27209
27232
|
};
|
|
@@ -27370,6 +27393,7 @@
|
|
|
27370
27393
|
};
|
|
27371
27394
|
BaseDateTimeComponent.prototype.setActiveDateFocus = function(newDate, isMouseEvent) {
|
|
27372
27395
|
var _this = this;
|
|
27396
|
+
this.setNextData(newDate);
|
|
27373
27397
|
var activeMonth = this.activeDate.getMonth();
|
|
27374
27398
|
if (!isMouseEvent) {
|
|
27375
27399
|
if (newDate.getMonth() < activeMonth) {
|
|
@@ -27382,14 +27406,18 @@
|
|
|
27382
27406
|
var newDay = newDate.getDate().toString();
|
|
27383
27407
|
_.filter($("span:contains(" + newDay + ")").not(".is-other-month"), (function(obj) {
|
|
27384
27408
|
if ($(obj).text() === newDay) {
|
|
27409
|
+
if ($(obj).hasClass("selected")) {
|
|
27410
|
+
$(obj).parent().attr("aria-selected", "true");
|
|
27411
|
+
}
|
|
27385
27412
|
$(obj).attr("aria-label", moment(newDate).format("dddd, MMMM Do YYYY"));
|
|
27413
|
+
$("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex", "-1");
|
|
27414
|
+
$(obj).attr("tabindex", "0");
|
|
27386
27415
|
$(obj).focus();
|
|
27387
27416
|
_this.activeDate = newDate;
|
|
27388
27417
|
}
|
|
27389
27418
|
}));
|
|
27390
27419
|
if (newDate.getMonth() === (new Date).getMonth() && newDate.getFullYear() === (new Date).getFullYear()) {
|
|
27391
27420
|
_this.hightlightToday();
|
|
27392
|
-
$("span:contains(" + (new Date).getDate().toString() + ")").not(".is-other-month").parent().attr("aria-selected", "true");
|
|
27393
27421
|
}
|
|
27394
27422
|
}));
|
|
27395
27423
|
};
|
|
@@ -27407,18 +27435,44 @@
|
|
|
27407
27435
|
this.loadYears();
|
|
27408
27436
|
}
|
|
27409
27437
|
};
|
|
27438
|
+
BaseDateTimeComponent.prototype.getMonth = function(date, inc) {
|
|
27439
|
+
var currentMonth = new Date(date);
|
|
27440
|
+
var month = currentMonth.getMonth();
|
|
27441
|
+
var year = currentMonth.getFullYear();
|
|
27442
|
+
month += inc;
|
|
27443
|
+
var newDate = new Date(year, month);
|
|
27444
|
+
var fullMonth = newDate.toLocaleString("en-US", {
|
|
27445
|
+
month: "long"
|
|
27446
|
+
});
|
|
27447
|
+
return {
|
|
27448
|
+
date: newDate,
|
|
27449
|
+
fullMonth: fullMonth
|
|
27450
|
+
};
|
|
27451
|
+
};
|
|
27410
27452
|
BaseDateTimeComponent.prototype.addDatepickerMouseEvents = function() {
|
|
27411
27453
|
var _this = this;
|
|
27412
27454
|
var datePickerHead = $(".bs-datepicker-head");
|
|
27413
27455
|
datePickerHead.find(".previous").click((function(event) {
|
|
27456
|
+
_this.next = _this.getMonth(_this.activeDate, 0);
|
|
27457
|
+
_this.prev = _this.getMonth(_this.activeDate, -2);
|
|
27458
|
+
_this.clicked = true;
|
|
27414
27459
|
if (event.originalEvent) {
|
|
27415
27460
|
_this.setFocusForDate(-1);
|
|
27416
27461
|
}
|
|
27462
|
+
setTimeout((function() {
|
|
27463
|
+
$(".bs-datepicker-head .previous").focus();
|
|
27464
|
+
}));
|
|
27417
27465
|
}));
|
|
27418
27466
|
datePickerHead.find(".next").click((function(event) {
|
|
27467
|
+
_this.next = _this.getMonth(_this.activeDate, 2);
|
|
27468
|
+
_this.prev = _this.getMonth(_this.activeDate, 0);
|
|
27469
|
+
_this.clicked = true;
|
|
27419
27470
|
if (event.originalEvent) {
|
|
27420
27471
|
_this.setFocusForDate(1);
|
|
27421
27472
|
}
|
|
27473
|
+
setTimeout((function() {
|
|
27474
|
+
$(".bs-datepicker-head .next").focus();
|
|
27475
|
+
}));
|
|
27422
27476
|
}));
|
|
27423
27477
|
datePickerHead.find(".current").click((function(event) {
|
|
27424
27478
|
if (event.originalEvent) {
|
|
@@ -27431,8 +27485,21 @@
|
|
|
27431
27485
|
_this.setFocusForMonthOrDay();
|
|
27432
27486
|
}
|
|
27433
27487
|
}));
|
|
27434
|
-
datePickerHead.find(".next").attr("aria-label", "Next");
|
|
27435
|
-
datePickerHead.find(".previous").attr("aria-label", "Previous");
|
|
27488
|
+
datePickerHead.find(".next").attr("aria-label", "Next Month, " + this.next.fullMonth + " " + this.next.date.getFullYear());
|
|
27489
|
+
datePickerHead.find(".previous").attr("aria-label", "Previous Month, " + this.prev.fullMonth + " " + this.prev.date.getFullYear());
|
|
27490
|
+
setTimeout((function() {
|
|
27491
|
+
var currentNodes = datePickerHead.find(".current span");
|
|
27492
|
+
var msg = "Changed to month ";
|
|
27493
|
+
datePickerHead.find(".current").attr("aria-live", "assertive").attr("aria-atomic", "false");
|
|
27494
|
+
if (_this.clicked) {
|
|
27495
|
+
if ($(currentNodes[0]).text()) {
|
|
27496
|
+
datePickerHead.find(".ng-star-inserted").prepend('<div class="sr-only">' + msg + "</div>");
|
|
27497
|
+
}
|
|
27498
|
+
if ($(currentNodes[1]).text()) {
|
|
27499
|
+
datePickerHead.find(".current").last().prepend('<div class="sr-only"> and year </div>');
|
|
27500
|
+
}
|
|
27501
|
+
}
|
|
27502
|
+
}));
|
|
27436
27503
|
};
|
|
27437
27504
|
BaseDateTimeComponent.prototype.setFocusForMonthOrDay = function() {
|
|
27438
27505
|
var activeMonthOrYear = $(".bs-datepicker-head .current").first().text();
|
|
@@ -27498,6 +27565,10 @@
|
|
|
27498
27565
|
this.loadDays();
|
|
27499
27566
|
this.setActiveDateFocus(this.activeDate);
|
|
27500
27567
|
};
|
|
27568
|
+
BaseDateTimeComponent.prototype.setNextData = function(nextDate) {
|
|
27569
|
+
this.next = this.getMonth(nextDate, 1);
|
|
27570
|
+
this.prev = this.getMonth(nextDate, -1);
|
|
27571
|
+
};
|
|
27501
27572
|
BaseDateTimeComponent.prototype.loadDays = function() {
|
|
27502
27573
|
var _this = this;
|
|
27503
27574
|
setTimeout((function() {
|
|
@@ -27564,8 +27635,6 @@
|
|
|
27564
27635
|
BaseDateTimeComponent.prototype.loadMonths = function() {
|
|
27565
27636
|
var _this = this;
|
|
27566
27637
|
setTimeout((function() {
|
|
27567
|
-
var datePickerBody = $(".bs-datepicker-body");
|
|
27568
|
-
datePickerBody.find("table.months span").attr("tabindex", "0");
|
|
27569
27638
|
_this.addKeyBoardEventsForMonths();
|
|
27570
27639
|
_this.addDatepickerMouseEvents();
|
|
27571
27640
|
}));
|
|
@@ -27608,14 +27677,13 @@
|
|
|
27608
27677
|
BaseDateTimeComponent.prototype.loadYears = function() {
|
|
27609
27678
|
var _this = this;
|
|
27610
27679
|
setTimeout((function() {
|
|
27611
|
-
var datePickerBody = $(".bs-datepicker-body");
|
|
27612
|
-
datePickerBody.find("table.years span").attr("tabindex", "0");
|
|
27613
27680
|
_this.addKeyBoardEventsForYears();
|
|
27614
27681
|
_this.addDatepickerMouseEvents();
|
|
27615
27682
|
}));
|
|
27616
27683
|
};
|
|
27617
27684
|
BaseDateTimeComponent.prototype.setActiveMonthFocus = function(newDate, isMoouseEvent) {
|
|
27618
27685
|
var _this = this;
|
|
27686
|
+
this.setNextData(newDate);
|
|
27619
27687
|
var newMonth = months[newDate.getMonth()];
|
|
27620
27688
|
if (!isMoouseEvent) {
|
|
27621
27689
|
if (newDate.getFullYear() < this.activeDate.getFullYear()) {
|
|
@@ -27625,6 +27693,8 @@
|
|
|
27625
27693
|
}
|
|
27626
27694
|
}
|
|
27627
27695
|
setTimeout((function() {
|
|
27696
|
+
$(".bs-datepicker-body table.months span").attr("tabindex", "-1");
|
|
27697
|
+
$(".bs-datepicker-body table.months span:contains(" + newMonth + ")").attr("tabindex", "0");
|
|
27628
27698
|
$(".bs-datepicker-body table.months span:contains(" + newMonth + ")").focus();
|
|
27629
27699
|
_this.activeDate = newDate;
|
|
27630
27700
|
}));
|
|
@@ -27673,6 +27743,8 @@
|
|
|
27673
27743
|
}
|
|
27674
27744
|
}
|
|
27675
27745
|
setTimeout((function() {
|
|
27746
|
+
$(".bs-datepicker-body table.years span").attr("tabindex", "-1");
|
|
27747
|
+
$(".bs-datepicker-body table.years span:contains(" + newYear + ")").attr("tabindex", "0");
|
|
27676
27748
|
$(".bs-datepicker-body table.years span:contains(" + newYear + ")").focus();
|
|
27677
27749
|
_this.activeDate = newDate;
|
|
27678
27750
|
}));
|
|
@@ -27839,11 +27911,6 @@
|
|
|
27839
27911
|
children[i].classList.remove("add-opacity");
|
|
27840
27912
|
}
|
|
27841
27913
|
displayInputElem.classList.remove("remove-opacity");
|
|
27842
|
-
var allDateTimeElements = this.nativeElement.getElementsByTagName("*");
|
|
27843
|
-
for (var i = 0; i < allDateTimeElements.length; i++) {
|
|
27844
|
-
allDateTimeElements[i].setAttribute("tabindex", this.tabindex);
|
|
27845
|
-
}
|
|
27846
|
-
displayInputElem.removeAttribute("tabindex");
|
|
27847
27914
|
}
|
|
27848
27915
|
};
|
|
27849
27916
|
BaseDateTimeComponent.prototype.onDateTimeInputFocus = function(skipFocus) {
|
|
@@ -27860,11 +27927,6 @@
|
|
|
27860
27927
|
children[i].classList.add("add-opacity");
|
|
27861
27928
|
}
|
|
27862
27929
|
displayInputElem.classList.add("remove-opacity");
|
|
27863
|
-
var allDateTimeElements = this.nativeElement.getElementsByTagName("*");
|
|
27864
|
-
for (var i = 0; i < allDateTimeElements.length; i++) {
|
|
27865
|
-
allDateTimeElements[i].setAttribute("tabindex", "-1");
|
|
27866
|
-
}
|
|
27867
|
-
displayInputElem.setAttribute("tabindex", this.tabindex);
|
|
27868
27930
|
return;
|
|
27869
27931
|
}
|
|
27870
27932
|
if (displayInputElem && this._triggeredByUser) {
|
|
@@ -27947,7 +28009,10 @@
|
|
|
27947
28009
|
this.isReadOnly = this.dataentrymode != "undefined" && !this.isDataEntryModeEnabledOnInput(this.dataentrymode);
|
|
27948
28010
|
var mobileInput = this.getMobileInput();
|
|
27949
28011
|
if (mobileInput) {
|
|
27950
|
-
|
|
28012
|
+
setTimeout((function() {
|
|
28013
|
+
mobileInput.style.width = "100%";
|
|
28014
|
+
mobileInput.style.height = "100%";
|
|
28015
|
+
}));
|
|
27951
28016
|
}
|
|
27952
28017
|
};
|
|
27953
28018
|
BaseDateTimeComponent.prototype.ngOnDestroy = function() {
|
|
@@ -28179,7 +28244,6 @@
|
|
|
28179
28244
|
if (!skipFocus) {
|
|
28180
28245
|
this.onDateTimeInputFocus();
|
|
28181
28246
|
}
|
|
28182
|
-
return;
|
|
28183
28247
|
}
|
|
28184
28248
|
if ($event.type === "click") {
|
|
28185
28249
|
this.invokeEventCallback("click", {
|
|
@@ -28211,7 +28275,7 @@
|
|
|
28211
28275
|
if (this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
28212
28276
|
event.stopPropagation();
|
|
28213
28277
|
var action = this.keyEventPlugin.constructor.getEventFullKey(event);
|
|
28214
|
-
if (action === "enter"
|
|
28278
|
+
if (action === "enter") {
|
|
28215
28279
|
var newVal = core$1.getDateObj(event.target.value, {
|
|
28216
28280
|
pattern: this.datepattern
|
|
28217
28281
|
});
|
|
@@ -28253,7 +28317,7 @@
|
|
|
28253
28317
|
type: core.Component,
|
|
28254
28318
|
args: [ {
|
|
28255
28319
|
selector: "[wmDate]",
|
|
28256
|
-
template: ' <input class="form-control app-textbox app-dateinput display-input"\n focus-target\n type="text"\n [name]="name"\n [tabindex]="tabindex"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n [disabled]="disabled || readonly"\n [autofocus]="autofocus"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n (change)="onDisplayDateChange($event)"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event);">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isOpen"\n #datepicker="bsDatepicker"\n bsDatepicker\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n placement="bottom right"\n [isDisabled]="disabled || readonly"\n [bsValue]="bsDataValue"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n (bsValueChange)="onDateChange($event)">\n</div>\n\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n mode="DATE"\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDataValue"\n (change)="onDateChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n tabindex="
|
|
28320
|
+
template: ' <input class="form-control app-textbox app-dateinput display-input"\n focus-target\n type="text"\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n [disabled]="disabled || readonly"\n [autofocus]="autofocus"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n (change)="onDisplayDateChange($event)"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event);">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isOpen"\n #datepicker="bsDatepicker"\n bsDatepicker\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n placement="bottom right"\n [isDisabled]="disabled || readonly"\n [bsValue]="bsDataValue"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n (bsValueChange)="onDateChange($event)">\n</div>\n\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n mode="DATE"\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDataValue"\n (change)="onDateChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event);"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n [attr.aria-label]="displayValue ? \'Change Date\' + displayValue : \'Choose Date\'"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\n',
|
|
28257
28321
|
providers: [ base.provideAs(DateComponent, forms.NG_VALUE_ACCESSOR, true), base.provideAs(DateComponent, forms.NG_VALIDATORS, true), base.provideAsWidgetRef(DateComponent) ]
|
|
28258
28322
|
} ]
|
|
28259
28323
|
} ];
|
|
@@ -28705,7 +28769,7 @@
|
|
|
28705
28769
|
type: core.Component,
|
|
28706
28770
|
args: [ {
|
|
28707
28771
|
selector: "[wmDateTime]",
|
|
28708
|
-
template: ' <div dropdown\n [isOpen]="isTimeOpen"\n autoClose="false"\n [container]="\'body\'"\n (onShown)="onTimepickerOpen()"\n style="display: inherit;">\n <input class="form-control app-textbox display-input"\n [attr.aria-label]="hint"\n focus-target\n [name]="name"\n [tabindex]="tabindex"\n type="text"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDateChange($event)"\n [autofocus]="autofocus"\n [disabled]="disabled || readonly || isCurrentDate"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event)">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-date"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly || isCurrentDate"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly || isCurrentDate"\n aria-label="Select time"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleTimePicker(!isTimeOpen, $event)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-time"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n focus-target\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isDateOpen"\n placement="bottom right"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n #datepicker=bsDatepicker\n bsDatepicker\n [isDisabled]="disabled || readonly || isCurrentDate"\n [bsValue]="bsDateValue"\n (bsValueChange)="onModelUpdate($event, \'date\')">\n </div>\n <div *dropdownMenu\n class="dropdown-menu"\n aria-label="timepicker dropdown"\n aria-controls="time"\n (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="disabled || readonly || isCurrentDate"\n [(ngModel)]="bsTimeValue"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds"\n (ngModelChange)="onModelUpdate($event, \'time\')"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDateValue"\n (change)="onModelUpdate($event, \'date\')">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n tabindex="
|
|
28772
|
+
template: ' <div dropdown\n [isOpen]="isTimeOpen"\n autoClose="false"\n [container]="\'body\'"\n (onShown)="onTimepickerOpen()"\n style="display: inherit;">\n <input class="form-control app-textbox display-input"\n [attr.aria-label]="hint"\n focus-target\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n type="text"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDateChange($event)"\n [autofocus]="autofocus"\n [disabled]="disabled || readonly || isCurrentDate"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event)">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-date"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n aria-label="Select time"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleTimePicker(!isTimeOpen, $event)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-time"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n focus-target\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isDateOpen"\n placement="bottom right"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n #datepicker=bsDatepicker\n bsDatepicker\n [isDisabled]="disabled || readonly || isCurrentDate"\n [bsValue]="bsDateValue"\n (bsValueChange)="onModelUpdate($event, \'date\')">\n </div>\n <div *dropdownMenu\n class="dropdown-menu"\n aria-label="timepicker dropdown"\n aria-controls="time"\n (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="disabled || readonly || isCurrentDate"\n [(ngModel)]="bsTimeValue"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds"\n (ngModelChange)="onModelUpdate($event, \'time\')"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDateValue"\n (change)="onModelUpdate($event, \'date\')">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event)"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\n',
|
|
28709
28773
|
providers: [ base.provideAs(DatetimeComponent, forms.NG_VALUE_ACCESSOR, true), base.provideAs(DatetimeComponent, forms.NG_VALIDATORS, true), base.provideAsWidgetRef(DatetimeComponent), {
|
|
28710
28774
|
provide: timepicker.TimepickerConfig,
|
|
28711
28775
|
deps: [ core$1.AbstractI18nService ],
|
|
@@ -33572,9 +33636,10 @@
|
|
|
33572
33636
|
};
|
|
33573
33637
|
var MenuComponent = function(_super) {
|
|
33574
33638
|
__extends(MenuComponent, _super);
|
|
33575
|
-
function MenuComponent(inj, route, userDefinedExecutionContext, bsDropdown, parentNav, selectEventCB) {
|
|
33639
|
+
function MenuComponent(inj, route, app, userDefinedExecutionContext, bsDropdown, parentNav, selectEventCB) {
|
|
33576
33640
|
var _this = _super.call(this, inj, WIDGET_CONFIG$1) || this;
|
|
33577
33641
|
_this.route = route;
|
|
33642
|
+
_this.app = app;
|
|
33578
33643
|
_this.userDefinedExecutionContext = userDefinedExecutionContext;
|
|
33579
33644
|
_this.bsDropdown = bsDropdown;
|
|
33580
33645
|
_this.parentNav = parentNav;
|
|
@@ -33588,6 +33653,9 @@
|
|
|
33588
33653
|
}
|
|
33589
33654
|
var datasetSubscription = _this.nodes$.subscribe((function() {
|
|
33590
33655
|
if (!_.isEmpty(_this.nodes)) {
|
|
33656
|
+
if (base.hasLinkToCurrentPage(_this.nodes, _this.route.url)) {
|
|
33657
|
+
core.addClass(_this.nativeElement.querySelector(".dropdown-toggle"), "active");
|
|
33658
|
+
}
|
|
33591
33659
|
if (_this.parentNav) {
|
|
33592
33660
|
return;
|
|
33593
33661
|
}
|
|
@@ -33662,26 +33730,22 @@
|
|
|
33662
33730
|
}
|
|
33663
33731
|
$event.preventDefault();
|
|
33664
33732
|
};
|
|
33665
|
-
MenuComponent.prototype.hasLinkToCurrentPage = function(nodes) {
|
|
33666
|
-
var _this = this;
|
|
33667
|
-
return nodes.some((function(node) {
|
|
33668
|
-
if (base.isActiveNavItem(node.link, _this.route.url)) {
|
|
33669
|
-
return true;
|
|
33670
|
-
}
|
|
33671
|
-
if (node.children) {
|
|
33672
|
-
return _this.hasLinkToCurrentPage(node.children);
|
|
33673
|
-
}
|
|
33674
|
-
}));
|
|
33675
|
-
};
|
|
33676
33733
|
MenuComponent.prototype.resetNodes = function() {
|
|
33677
33734
|
_super.prototype.resetNodes.call(this);
|
|
33678
|
-
if (this.autoopen === AUTO_OPEN.ACTIVE_PAGE &&
|
|
33735
|
+
if (this.autoopen === AUTO_OPEN.ACTIVE_PAGE && base.hasLinkToCurrentPage(this.nodes, this.route.url) || this.autoopen === AUTO_OPEN.ALWAYS) {
|
|
33679
33736
|
this.bsDropdown.show();
|
|
33680
33737
|
}
|
|
33681
33738
|
};
|
|
33682
33739
|
MenuComponent.prototype.ngOnInit = function() {
|
|
33740
|
+
var _this = this;
|
|
33683
33741
|
_super.prototype.ngOnInit.call(this);
|
|
33684
33742
|
this.setMenuPosition();
|
|
33743
|
+
var cancelSubscription = this.app.subscribe("highlightActiveLink", (function(data) {
|
|
33744
|
+
core.toggleClass(_this.nativeElement.querySelector(".dropdown-toggle"), "active", base.hasLinkToCurrentPage(_this.nodes, _this.route.url));
|
|
33745
|
+
}));
|
|
33746
|
+
this.registerDestroyListener((function() {
|
|
33747
|
+
return cancelSubscription();
|
|
33748
|
+
}));
|
|
33685
33749
|
};
|
|
33686
33750
|
MenuComponent.prototype.onPropertyChange = function(key, nv, ov) {
|
|
33687
33751
|
if (key === "tabindex") {
|
|
@@ -33752,6 +33816,8 @@
|
|
|
33752
33816
|
type: core$1.Injector
|
|
33753
33817
|
}, {
|
|
33754
33818
|
type: router.Router
|
|
33819
|
+
}, {
|
|
33820
|
+
type: core.App
|
|
33755
33821
|
}, {
|
|
33756
33822
|
type: core.UserDefinedExecutionContext
|
|
33757
33823
|
}, {
|
|
@@ -33869,8 +33935,9 @@
|
|
|
33869
33935
|
VERTICAL: "vertical"
|
|
33870
33936
|
};
|
|
33871
33937
|
var MenuDropdownItemComponent = function() {
|
|
33872
|
-
function MenuDropdownItemComponent(menuRef, userDefinedExecutionContext, parentNav, elRef) {
|
|
33938
|
+
function MenuDropdownItemComponent(app, menuRef, userDefinedExecutionContext, parentNav, elRef) {
|
|
33873
33939
|
var _this = this;
|
|
33940
|
+
this.app = app;
|
|
33874
33941
|
this.menuRef = menuRef;
|
|
33875
33942
|
this.userDefinedExecutionContext = userDefinedExecutionContext;
|
|
33876
33943
|
this.parentNav = parentNav;
|
|
@@ -33896,10 +33963,14 @@
|
|
|
33896
33963
|
this.menualign = menuAlignClass[this.menuRef.menualign] || menuAlignClass["pull-left"];
|
|
33897
33964
|
}
|
|
33898
33965
|
MenuDropdownItemComponent.prototype.ngOnInit = function() {
|
|
33966
|
+
var _this = this;
|
|
33899
33967
|
if (this.parentNav) {
|
|
33900
|
-
if (base.
|
|
33968
|
+
if (base.hasLinkToCurrentPage([ this.item ], this.menuRef.route.url)) {
|
|
33901
33969
|
core.addClass(this.nativeElement, "active");
|
|
33902
33970
|
}
|
|
33971
|
+
this.highlightActiveLinkSubscription = this.app.subscribe("highlightActiveLink", (function(data) {
|
|
33972
|
+
core.toggleClass(_this.nativeElement, "active", base.hasLinkToCurrentPage([ _this.item ], _this.menuRef.route.url));
|
|
33973
|
+
}));
|
|
33903
33974
|
}
|
|
33904
33975
|
};
|
|
33905
33976
|
MenuDropdownItemComponent.prototype.getInitialKeyMovements = function() {
|
|
@@ -33968,6 +34039,11 @@
|
|
|
33968
34039
|
$event.stopPropagation();
|
|
33969
34040
|
}
|
|
33970
34041
|
};
|
|
34042
|
+
MenuDropdownItemComponent.prototype.ngOnDestroy = function() {
|
|
34043
|
+
if (this.highlightActiveLinkSubscription) {
|
|
34044
|
+
this.highlightActiveLinkSubscription();
|
|
34045
|
+
}
|
|
34046
|
+
};
|
|
33971
34047
|
return MenuDropdownItemComponent;
|
|
33972
34048
|
}();
|
|
33973
34049
|
MenuDropdownItemComponent.decorators = [ {
|
|
@@ -33979,6 +34055,8 @@
|
|
|
33979
34055
|
} ];
|
|
33980
34056
|
MenuDropdownItemComponent.ctorParameters = function() {
|
|
33981
34057
|
return [ {
|
|
34058
|
+
type: core.App
|
|
34059
|
+
}, {
|
|
33982
34060
|
type: MenuComponent
|
|
33983
34061
|
}, {
|
|
33984
34062
|
type: core.UserDefinedExecutionContext
|
|
@@ -35663,6 +35741,9 @@
|
|
|
35663
35741
|
return _this.hidePopover();
|
|
35664
35742
|
};
|
|
35665
35743
|
}
|
|
35744
|
+
setTimeout((function() {
|
|
35745
|
+
_this.anchorRef.nativeElement.removeAttribute("aria-describedby");
|
|
35746
|
+
}));
|
|
35666
35747
|
var deRegister = this.eventManager.addEventListener(popoverContainer, "keydown.esc", (function() {
|
|
35667
35748
|
_this.isOpen = false;
|
|
35668
35749
|
_this.setFocusToPopoverLink();
|
|
@@ -35693,7 +35774,6 @@
|
|
|
35693
35774
|
return _this.close();
|
|
35694
35775
|
};
|
|
35695
35776
|
}
|
|
35696
|
-
core.setAttr(popoverContainer, "tabindex", 0);
|
|
35697
35777
|
setTimeout((function() {
|
|
35698
35778
|
return popoverStartBtn.focus();
|
|
35699
35779
|
}), 50);
|
|
@@ -36369,16 +36449,24 @@
|
|
|
36369
36449
|
_this.dialogService = inj.get(core.AbstractDialogService);
|
|
36370
36450
|
_this.bsModal = inj.get(modal.BsModalService);
|
|
36371
36451
|
var router$1 = inj.get(router.Router);
|
|
36372
|
-
var subscriptions = [ _this.bsModal.onShown.subscribe((function() {
|
|
36452
|
+
var subscriptions = [ _this.bsModal.onShown.subscribe((function(_a) {
|
|
36453
|
+
var id = _a.id;
|
|
36373
36454
|
var ref = _this.dialogService.getLastOpenedDialog();
|
|
36374
|
-
if (ref === _this) {
|
|
36455
|
+
if (ref === _this && !_this.dialogId) {
|
|
36375
36456
|
invokeOpenedCallback(ref);
|
|
36457
|
+
_this.dialogId = id;
|
|
36376
36458
|
}
|
|
36377
36459
|
})), _this.bsModal.onShow.subscribe((function() {
|
|
36378
36460
|
focusTrapObj.activeElement = document.activeElement;
|
|
36379
36461
|
})), _this.bsModal.onHidden.subscribe((function(closeReason) {
|
|
36380
|
-
var ref =
|
|
36462
|
+
var ref = _this.dialogService.getDialogRefFromClosedDialogs();
|
|
36463
|
+
if (_this.dialogId && (closeReason === null || closeReason === void 0 ? void 0 : closeReason.id) === _this.dialogId) {
|
|
36464
|
+
ref = _this;
|
|
36465
|
+
} else if (closeReason === "esc" || closeReason === "backdrop-click") {
|
|
36466
|
+
ref = _this.dialogService.getLastOpenedDialog();
|
|
36467
|
+
}
|
|
36381
36468
|
if (ref === _this) {
|
|
36469
|
+
_this.dialogId = null;
|
|
36382
36470
|
_this.dialogService.removeFromOpenedDialogs(ref);
|
|
36383
36471
|
_this.dialogService.removeFromClosedDialogs(ref);
|
|
36384
36472
|
invokeClosedCallback(ref);
|
|
@@ -36417,6 +36505,10 @@
|
|
|
36417
36505
|
Object.assign(this.context, initState);
|
|
36418
36506
|
this.modalOptions.ariaLabelledBy = this.titleId;
|
|
36419
36507
|
this.dialogRef = this.bsModal.show(this.getTemplateRef(), this.modalOptions);
|
|
36508
|
+
if (this.dialogService.getOpenedDialogs().length === 1 && (core.isMobile() || core.isMobileApp())) {
|
|
36509
|
+
var parentSelector = $("body > app-root")[0];
|
|
36510
|
+
parentSelector.setAttribute("aria-hidden", "true");
|
|
36511
|
+
}
|
|
36420
36512
|
};
|
|
36421
36513
|
BaseDialog.prototype.close = function() {
|
|
36422
36514
|
if (this.dialogRef) {
|
|
@@ -42248,11 +42340,31 @@
|
|
|
42248
42340
|
$index: _this.dn.currentPage
|
|
42249
42341
|
});
|
|
42250
42342
|
_this.goToPage();
|
|
42343
|
+
if (_this.navigation === "Basic") {
|
|
42344
|
+
_this._setAriaForBasicNavigation();
|
|
42345
|
+
}
|
|
42251
42346
|
}
|
|
42252
42347
|
}), base.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME);
|
|
42253
42348
|
base.styler(_this.nativeElement, _this);
|
|
42254
42349
|
return _this;
|
|
42255
42350
|
}
|
|
42351
|
+
PaginationComponent.prototype._setAriaForBasicNavigation = function() {
|
|
42352
|
+
_.forEach(this.nativeElement.getElementsByTagName("a"), (function(item) {
|
|
42353
|
+
item.setAttribute("href", "javascript:void(0);");
|
|
42354
|
+
var childNode = item.querySelector("span");
|
|
42355
|
+
if ((childNode === null || childNode === void 0 ? void 0 : childNode.dataset.isacitvepage) === "true") {
|
|
42356
|
+
item.setAttribute("aria-current", "true");
|
|
42357
|
+
setTimeout((function() {
|
|
42358
|
+
return item.focus();
|
|
42359
|
+
}));
|
|
42360
|
+
}
|
|
42361
|
+
if ((childNode === null || childNode === void 0 ? void 0 : childNode.dataset.isdisabled) === "true") {
|
|
42362
|
+
item.setAttribute("aria-disabled", "true");
|
|
42363
|
+
} else {
|
|
42364
|
+
item.removeAttribute("aria-disabled");
|
|
42365
|
+
}
|
|
42366
|
+
}));
|
|
42367
|
+
};
|
|
42256
42368
|
PaginationComponent.prototype.setResult = function(result) {
|
|
42257
42369
|
this.result = result;
|
|
42258
42370
|
this.resultEmitter.emit(this.result);
|
|
@@ -42314,7 +42426,7 @@
|
|
|
42314
42426
|
}
|
|
42315
42427
|
this.isDisableCurrent = isCurrentPageFirst && isCurrentPageLast;
|
|
42316
42428
|
if (this.dataset && this.dataset.length && this.isDisableNext && this.parent.onDemandLoad && this.parent.widgetType === "wm-table") {
|
|
42317
|
-
this.parent.callDataGridMethod("hideLoadingIndicator", this.isDisableNext,
|
|
42429
|
+
this.parent.callDataGridMethod("hideLoadingIndicator", this.isDisableNext, this.parent.infScroll);
|
|
42318
42430
|
}
|
|
42319
42431
|
};
|
|
42320
42432
|
PaginationComponent.prototype.isDataSourceHasPaging = function() {
|
|
@@ -42369,9 +42481,7 @@
|
|
|
42369
42481
|
this.resetPageNavigation();
|
|
42370
42482
|
}
|
|
42371
42483
|
if (this.navigation === "Basic") {
|
|
42372
|
-
|
|
42373
|
-
item.setAttribute("href", "javascript:void(0);");
|
|
42374
|
-
}));
|
|
42484
|
+
this._setAriaForBasicNavigation();
|
|
42375
42485
|
}
|
|
42376
42486
|
} else {
|
|
42377
42487
|
if (newVal && !_.isString(newVal)) {
|
|
@@ -42648,7 +42758,7 @@
|
|
|
42648
42758
|
type: core.Component,
|
|
42649
42759
|
args: [ {
|
|
42650
42760
|
selector: "[wmPagination]",
|
|
42651
|
-
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);"
|
|
42761
|
+
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',
|
|
42652
42762
|
providers: [ base.provideAsWidgetRef(PaginationComponent) ]
|
|
42653
42763
|
} ]
|
|
42654
42764
|
} ];
|
|
@@ -44220,10 +44330,15 @@
|
|
|
44220
44330
|
var dataSource = this.datasource;
|
|
44221
44331
|
if (dataSource && dataSource.execute(core.DataSource.Operation.IS_API_AWARE) && core.isDataSourceEqual(data.variable, dataSource)) {
|
|
44222
44332
|
this.ngZone.run((function() {
|
|
44223
|
-
var _a;
|
|
44333
|
+
var _a, _b, _c;
|
|
44224
44334
|
_this.handleStateParams(data);
|
|
44225
44335
|
_this.variableInflight = data.active;
|
|
44226
|
-
|
|
44336
|
+
var totalEle = (_b = (_a = data.data) === null || _a === void 0 ? void 0 : _a.pagination) === null || _b === void 0 ? void 0 : _b.totalElements;
|
|
44337
|
+
if (!_.isUndefined(totalEle)) {
|
|
44338
|
+
_this.noDataFound = totalEle === 0 ? true : false;
|
|
44339
|
+
} else {
|
|
44340
|
+
_this.noDataFound = _.isEmpty((_c = data.data) === null || _c === void 0 ? void 0 : _c.data);
|
|
44341
|
+
}
|
|
44227
44342
|
}));
|
|
44228
44343
|
}
|
|
44229
44344
|
};
|
|
@@ -44293,10 +44408,10 @@
|
|
|
44293
44408
|
}
|
|
44294
44409
|
};
|
|
44295
44410
|
ListComponent.prototype.updateFieldDefs = function(newVal) {
|
|
44296
|
-
var
|
|
44411
|
+
var _d;
|
|
44297
44412
|
if (this.infScroll || this.onDemandLoad) {
|
|
44298
|
-
|
|
44299
|
-
this.currentPage =
|
|
44413
|
+
_d = __read(this.paginationService.updateFieldsOnPagination(this, newVal), 2), this.fieldDefs = _d[0],
|
|
44414
|
+
this.currentPage = _d[1];
|
|
44300
44415
|
} else {
|
|
44301
44416
|
this.fieldDefs = newVal;
|
|
44302
44417
|
}
|
|
@@ -44582,9 +44697,9 @@
|
|
|
44582
44697
|
}
|
|
44583
44698
|
}
|
|
44584
44699
|
};
|
|
44585
|
-
ListComponent.prototype.onUpdate = function(evt, ui) {
|
|
44700
|
+
ListComponent.prototype.onUpdate = function(evt, ui, presentIndex) {
|
|
44586
44701
|
var data = this.fieldDefs;
|
|
44587
|
-
var newIndex = ui.item.index();
|
|
44702
|
+
var newIndex = ui === undefined ? presentIndex : ui.item.index();
|
|
44588
44703
|
var oldIndex = this.$ulEle.data("oldIndex");
|
|
44589
44704
|
var minIndex = _.min([ newIndex, oldIndex ]);
|
|
44590
44705
|
var maxIndex = _.max([ newIndex, oldIndex ]);
|
|
@@ -44676,9 +44791,9 @@
|
|
|
44676
44791
|
return this.datasource.execute(operation, options);
|
|
44677
44792
|
};
|
|
44678
44793
|
ListComponent.prototype.handleKeyDown = function($event, action) {
|
|
44679
|
-
var
|
|
44794
|
+
var _d, _e;
|
|
44680
44795
|
$event.stopPropagation();
|
|
44681
|
-
if ($event.keyCode !== 13 && $event.keyCode !== 9 && !($event.target.classList.contains("form-control") && $event.keyCode === 32)) {
|
|
44796
|
+
if ($event.keyCode !== 13 && $event.keyCode !== 9 && !(($event.target.classList.contains("form-control") || $event.target.classList.contains("note-editable")) && $event.keyCode === 32)) {
|
|
44682
44797
|
$event.preventDefault();
|
|
44683
44798
|
}
|
|
44684
44799
|
var listItems = this.listItems;
|
|
@@ -44718,27 +44833,21 @@
|
|
|
44718
44833
|
}
|
|
44719
44834
|
if (action === "focusPrev") {
|
|
44720
44835
|
if (this.isListElementMovable) {
|
|
44721
|
-
var prev_1;
|
|
44722
44836
|
presentIndex = presentIndex <= 0 ? 0 : presentIndex;
|
|
44723
|
-
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44724
44837
|
if (presentIndex === 0) {
|
|
44725
|
-
prev_1 = this.listItems.last;
|
|
44726
44838
|
return;
|
|
44727
44839
|
}
|
|
44728
|
-
this.
|
|
44729
|
-
|
|
44730
|
-
|
|
44731
|
-
|
|
44732
|
-
|
|
44733
|
-
|
|
44734
|
-
|
|
44735
|
-
|
|
44736
|
-
|
|
44737
|
-
|
|
44738
|
-
|
|
44739
|
-
}
|
|
44740
|
-
prev_1 = $liItem;
|
|
44741
|
-
}));
|
|
44840
|
+
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44841
|
+
var prevElt = this.getListItemByIndex(presentIndex - 1);
|
|
44842
|
+
prevElt.nativeElement.before(this.lastSelectedItem.nativeElement);
|
|
44843
|
+
this.lastSelectedItem.nativeElement.focus();
|
|
44844
|
+
this.statePersistence.removeWidgetState(this, "selectedItem");
|
|
44845
|
+
var arr = this.listItems.toArray();
|
|
44846
|
+
_d = __read([ arr[presentIndex], arr[presentIndex - 1] ], 2), arr[presentIndex - 1] = _d[0],
|
|
44847
|
+
arr[presentIndex] = _d[1];
|
|
44848
|
+
this.listItems.reset(arr);
|
|
44849
|
+
this.currentIndex = presentIndex;
|
|
44850
|
+
this.ariaText = "selected ";
|
|
44742
44851
|
} else {
|
|
44743
44852
|
presentIndex = presentIndex <= 0 ? 0 : presentIndex - 1;
|
|
44744
44853
|
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
@@ -44748,27 +44857,21 @@
|
|
|
44748
44857
|
}
|
|
44749
44858
|
} else if (action === "focusNext") {
|
|
44750
44859
|
if (this.isListElementMovable) {
|
|
44751
|
-
var prev_2;
|
|
44752
44860
|
presentIndex = presentIndex < listItems.length - 1 ? presentIndex : listItems.length - 1;
|
|
44753
|
-
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44754
44861
|
if (presentIndex === this.listItems.length - 1) {
|
|
44755
|
-
prev_2 = this.listItems.first;
|
|
44756
44862
|
return;
|
|
44757
44863
|
}
|
|
44758
|
-
this.
|
|
44759
|
-
|
|
44760
|
-
|
|
44761
|
-
|
|
44762
|
-
|
|
44763
|
-
|
|
44764
|
-
|
|
44765
|
-
|
|
44766
|
-
|
|
44767
|
-
|
|
44768
|
-
|
|
44769
|
-
}
|
|
44770
|
-
prev_2 = $liItem;
|
|
44771
|
-
}));
|
|
44864
|
+
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44865
|
+
var nextElt = this.getListItemByIndex(presentIndex + 1);
|
|
44866
|
+
nextElt.nativeElement.after(this.lastSelectedItem.nativeElement);
|
|
44867
|
+
this.lastSelectedItem.nativeElement.focus();
|
|
44868
|
+
this.statePersistence.removeWidgetState(this, "selectedItem");
|
|
44869
|
+
var arr = this.listItems.toArray();
|
|
44870
|
+
_e = __read([ arr[presentIndex + 1], arr[presentIndex] ], 2), arr[presentIndex] = _e[0],
|
|
44871
|
+
arr[presentIndex + 1] = _e[1];
|
|
44872
|
+
this.listItems.reset(arr);
|
|
44873
|
+
this.currentIndex = presentIndex + 2;
|
|
44874
|
+
this.ariaText = "selected ";
|
|
44772
44875
|
} else {
|
|
44773
44876
|
presentIndex = presentIndex < listItems.length - 1 ? presentIndex + 1 : listItems.length - 1;
|
|
44774
44877
|
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
@@ -44790,11 +44893,12 @@
|
|
|
44790
44893
|
this.isListElementMovable = !this.isListElementMovable;
|
|
44791
44894
|
this.onItemClick($event, this.getListItemByIndex(presentIndex));
|
|
44792
44895
|
this.currentIndex = presentIndex + 1;
|
|
44793
|
-
var name = this.getListItemByIndex(presentIndex).item.name;
|
|
44794
44896
|
if (this.isListElementMovable) {
|
|
44795
|
-
this.ariaText =
|
|
44897
|
+
this.ariaText = "Item " + this.currentIndex + " grabbed, current position ";
|
|
44898
|
+
this.$ulEle.data("oldIndex", presentIndex);
|
|
44796
44899
|
} else {
|
|
44797
|
-
this.ariaText =
|
|
44900
|
+
this.ariaText = "Item " + this.currentIndex + " dropped, final position ";
|
|
44901
|
+
this.onUpdate($event, undefined, presentIndex);
|
|
44798
44902
|
}
|
|
44799
44903
|
}
|
|
44800
44904
|
};
|
|
@@ -44839,10 +44943,12 @@
|
|
|
44839
44943
|
this.dataNavigator.widget.maxResults = nv;
|
|
44840
44944
|
this.dataNavigator.maxResults = nv;
|
|
44841
44945
|
} else if (key === "enablereorder") {
|
|
44842
|
-
if (nv) {
|
|
44946
|
+
if (nv && this.$ulEle) {
|
|
44947
|
+
this.$ulEle.attr("aria-describedby", this.titleId);
|
|
44843
44948
|
this.configureDnD();
|
|
44844
44949
|
this.$ulEle.sortable("enable");
|
|
44845
44950
|
} else if (this.$ulEle && !nv) {
|
|
44951
|
+
this.$ulEle.removeAttr("aria-describedby");
|
|
44846
44952
|
this.$ulEle.sortable("disable");
|
|
44847
44953
|
}
|
|
44848
44954
|
} else {
|
|
@@ -44996,9 +45102,18 @@
|
|
|
44996
45102
|
_super.prototype.ngAfterViewInit.call(_this);
|
|
44997
45103
|
_this.setUpCUDHandlers();
|
|
44998
45104
|
_this.selectedItemWidgets = _this.multiselect ? [] : {};
|
|
45105
|
+
var ele = $(_this.nativeElement).find(".app-livelist-container");
|
|
44999
45106
|
if (_this.enablereorder && !_this.groupby) {
|
|
45107
|
+
if (ele) {
|
|
45108
|
+
ele.attr("aria-describedby", _this.titleId);
|
|
45109
|
+
}
|
|
45000
45110
|
_this.configureDnD();
|
|
45001
45111
|
}
|
|
45112
|
+
if (!_this.enablereorder) {
|
|
45113
|
+
if (ele) {
|
|
45114
|
+
ele.removeAttr("aria-describedby");
|
|
45115
|
+
}
|
|
45116
|
+
}
|
|
45002
45117
|
if (_this.groupby && _this.collapsible) {
|
|
45003
45118
|
_this.handleHeaderClick = base.handleHeaderClick;
|
|
45004
45119
|
_this.toggleAllHeaders = base.toggleAllHeaders.bind(undefined, _this);
|
|
@@ -45008,6 +45123,16 @@
|
|
|
45008
45123
|
this.setupHandlers();
|
|
45009
45124
|
var $ul = this.nativeElement.querySelector("ul.app-livelist-container");
|
|
45010
45125
|
base.styler($ul, this, base.APPLY_STYLES_TYPE.SCROLLABLE_CONTAINER);
|
|
45126
|
+
if (this.enablereorder) {
|
|
45127
|
+
if ($ul) {
|
|
45128
|
+
$ul.setAttribute("aria-describedby", this.titleId);
|
|
45129
|
+
}
|
|
45130
|
+
}
|
|
45131
|
+
if (!this.enablereorder) {
|
|
45132
|
+
if ($ul) {
|
|
45133
|
+
$ul.removeAttribute("aria-describedby");
|
|
45134
|
+
}
|
|
45135
|
+
}
|
|
45011
45136
|
if (core.isMobileApp() && $ul.querySelector(".app-list-item-action-panel")) {
|
|
45012
45137
|
this._listAnimator = new ListAnimator(this);
|
|
45013
45138
|
}
|
|
@@ -45032,7 +45157,7 @@
|
|
|
45032
45157
|
type: core$1.Component,
|
|
45033
45158
|
args: [ {
|
|
45034
45159
|
selector: "div[wmList]",
|
|
45035
|
-
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<
|
|
45160
|
+
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" 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',
|
|
45036
45161
|
providers: [ base.provideAsWidgetRef(ListComponent) ]
|
|
45037
45162
|
} ]
|
|
45038
45163
|
} ];
|
|
@@ -45547,6 +45672,10 @@
|
|
|
45547
45672
|
value: "No data found."
|
|
45548
45673
|
}, base.PROP_STRING) ], [ "ondemandmessage", Object.assign({
|
|
45549
45674
|
value: "Load More"
|
|
45675
|
+
}, base.PROP_STRING) ], [ "showviewlessbutton", Object.assign({
|
|
45676
|
+
value: false
|
|
45677
|
+
}, base.PROP_BOOLEAN) ], [ "viewlessmessage", Object.assign({
|
|
45678
|
+
value: "View Less"
|
|
45550
45679
|
}, base.PROP_STRING) ], [ "pagesize", base.PROP_NUMBER ], [ "radioselect", base.PROP_BOOLEAN ], [ "rowclass", base.PROP_STRING ], [ "rowngclass", base.PROP_STRING ], [ "searchlabel", Object.assign({
|
|
45551
45680
|
value: "Search"
|
|
45552
45681
|
}, base.PROP_STRING) ], [ "show", Object.assign({
|
|
@@ -45627,6 +45756,7 @@
|
|
|
45627
45756
|
_this.columns = {};
|
|
45628
45757
|
_this.formfields = {};
|
|
45629
45758
|
_this.enablesort = true;
|
|
45759
|
+
_this.showviewlessbutton = false;
|
|
45630
45760
|
_this.primaryKey = [];
|
|
45631
45761
|
_this.selectedItems = [];
|
|
45632
45762
|
_this.selectedItemChange = new rxjs.Subject;
|
|
@@ -45647,6 +45777,7 @@
|
|
|
45647
45777
|
_this.rowDef = {};
|
|
45648
45778
|
_this.rowInstance = {};
|
|
45649
45779
|
_this.fullFieldDefs = [];
|
|
45780
|
+
_this.variableInflight = true;
|
|
45650
45781
|
_this.applyProps = new Map;
|
|
45651
45782
|
_this.redraw = _.debounce(_this._redraw, 150);
|
|
45652
45783
|
_this.debouncedHandleLoading = _.debounce(_this.handleLoading, 350);
|
|
@@ -45669,6 +45800,7 @@
|
|
|
45669
45800
|
data: [],
|
|
45670
45801
|
colDefs: [],
|
|
45671
45802
|
startRowIndex: 1,
|
|
45803
|
+
mode: "",
|
|
45672
45804
|
sortInfo: {
|
|
45673
45805
|
field: "",
|
|
45674
45806
|
direction: ""
|
|
@@ -45699,6 +45831,10 @@
|
|
|
45699
45831
|
isSearchTrigerred: false,
|
|
45700
45832
|
isDatasetUpdated: false,
|
|
45701
45833
|
isDataUpdatedByUser: false,
|
|
45834
|
+
showviewlessbutton: false,
|
|
45835
|
+
ondemandmessage: "",
|
|
45836
|
+
viewlessmessage: "",
|
|
45837
|
+
loadingdatamsg: "",
|
|
45702
45838
|
isNextPageData: undefined,
|
|
45703
45839
|
ACTIONS: {
|
|
45704
45840
|
DELETE: "delete",
|
|
@@ -45723,6 +45859,14 @@
|
|
|
45723
45859
|
getPageSize: function() {
|
|
45724
45860
|
return _this.pagesize;
|
|
45725
45861
|
},
|
|
45862
|
+
getPageCount: function() {
|
|
45863
|
+
return _this.dataNavigator.pageCount;
|
|
45864
|
+
},
|
|
45865
|
+
enableNavigation: function() {
|
|
45866
|
+
_this.dataNavigator.widget.isDisableNext = false;
|
|
45867
|
+
_this.dataNavigator.widget.isDisableLast = false;
|
|
45868
|
+
_this.gridOptions.mode = "viewless";
|
|
45869
|
+
},
|
|
45726
45870
|
setDeletedRowIndex: function(id) {
|
|
45727
45871
|
_this.setDataGridOption("deletedRowIndex", id);
|
|
45728
45872
|
},
|
|
@@ -45757,7 +45901,9 @@
|
|
|
45757
45901
|
}
|
|
45758
45902
|
_this.callDataGridMethod("selectRows", _this.items);
|
|
45759
45903
|
_this.selectedItems = _this.callDataGridMethod("getSelectedRows");
|
|
45760
|
-
|
|
45904
|
+
if (_this.selectedItems.length) {
|
|
45905
|
+
_this.selectedItemChange.next(_this.selectedItems);
|
|
45906
|
+
}
|
|
45761
45907
|
if (_this._isPageSearch && _this.filterInfo) {
|
|
45762
45908
|
_this.searchSortHandler(_this.filterInfo, undefined, "search");
|
|
45763
45909
|
}
|
|
@@ -45766,9 +45912,11 @@
|
|
|
45766
45912
|
onRowSelect: function(row, e) {
|
|
45767
45913
|
_this.ngZone.run((function() {
|
|
45768
45914
|
_this.selectedItems = _this.callDataGridMethod("getSelectedRows");
|
|
45769
|
-
|
|
45915
|
+
if (_this.selectedItems.length) {
|
|
45916
|
+
_this.selectedItemChange.next(_this.selectedItems);
|
|
45917
|
+
}
|
|
45770
45918
|
var rowData = _this.addRowIndex(row);
|
|
45771
|
-
if (rowData.$index && _this.getConfiguredState() !== "none" && _this.dataNavigator && base.unsupportedStatePersistenceTypes.indexOf(_this.navigation) < 0) {
|
|
45919
|
+
if (_this.selectedItems.length && rowData.$index && _this.getConfiguredState() !== "none" && _this.dataNavigator && base.unsupportedStatePersistenceTypes.indexOf(_this.navigation) < 0) {
|
|
45772
45920
|
var obj = {
|
|
45773
45921
|
page: _this.dataNavigator.dn.currentPage,
|
|
45774
45922
|
index: rowData.$index - 1
|
|
@@ -46208,9 +46356,14 @@
|
|
|
46208
46356
|
_this.callDataGridMethod("addLoadMoreBtn", _this.ondemandmessage, _this.loadingdatamsg, (function($event) {
|
|
46209
46357
|
_this.gridOptions.setIsNextPageData(true);
|
|
46210
46358
|
_this.gridOptions.setIsDataUpdatedByUser(false);
|
|
46211
|
-
_this.
|
|
46212
|
-
|
|
46213
|
-
|
|
46359
|
+
if (_this.gridOptions.mode === "viewless") {
|
|
46360
|
+
_this.dataNavigator.navigatePage("first", $event, true);
|
|
46361
|
+
_this.gridOptions.mode = "";
|
|
46362
|
+
} else {
|
|
46363
|
+
_this.dataNavigator.navigatePage("next", $event);
|
|
46364
|
+
_this.isDataLoading = true;
|
|
46365
|
+
}
|
|
46366
|
+
}), _this.infScroll);
|
|
46214
46367
|
},
|
|
46215
46368
|
bindScrollEvt: function() {
|
|
46216
46369
|
if (_this._gridData && _this._gridData.length && _this.infScroll) {
|
|
@@ -46370,7 +46523,15 @@
|
|
|
46370
46523
|
set: function(newValue) {
|
|
46371
46524
|
var _a;
|
|
46372
46525
|
this.isDataLoading = false;
|
|
46526
|
+
if (this.variableInflight && _.isEmpty(newValue)) {
|
|
46527
|
+
return;
|
|
46528
|
+
}
|
|
46373
46529
|
this.variableInflight = false;
|
|
46530
|
+
if (newValue && newValue.length === 0) {
|
|
46531
|
+
this.callDataGridMethod("setStatus", "nodata", this.nodatamessage);
|
|
46532
|
+
} else {
|
|
46533
|
+
this.callDataGridMethod("setStatus", "ready");
|
|
46534
|
+
}
|
|
46374
46535
|
if (this.gridOptions.isNavTypeScrollOrOndemand()) {
|
|
46375
46536
|
_a = __read(this.paginationService.updateFieldsOnPagination(this, newValue), 2),
|
|
46376
46537
|
this._gridData = _a[0], this.currentPage = _a[1];
|
|
@@ -46488,6 +46649,10 @@
|
|
|
46488
46649
|
this.gridOptions.securityUtils.pipeTransform = this.trustAsPipe;
|
|
46489
46650
|
this.gridOptions.navigation = this.navigation;
|
|
46490
46651
|
this.gridOptions.isdynamictable = this.isdynamictable;
|
|
46652
|
+
this.gridOptions.showviewlessbutton = this.showviewlessbutton;
|
|
46653
|
+
this.gridOptions.ondemandmessage = this.ondemandmessage;
|
|
46654
|
+
this.gridOptions.viewlessmessage = this.viewlessmessage;
|
|
46655
|
+
this.gridOptions.loadingdatamsg = this.loadingdatamsg;
|
|
46491
46656
|
if (!_.isEmpty(this.gridData)) {
|
|
46492
46657
|
this.gridOptions.data = core.getClonedObject(this.gridData);
|
|
46493
46658
|
}
|
|
@@ -46819,6 +46984,9 @@
|
|
|
46819
46984
|
};
|
|
46820
46985
|
TableComponent.prototype.setGridData = function(serverData) {
|
|
46821
46986
|
var data = this.filternullrecords ? this.removeEmptyRecords(serverData) : serverData;
|
|
46987
|
+
if (_.get(this.datasource, "category") === "wm.Variable") {
|
|
46988
|
+
this.variableInflight = false;
|
|
46989
|
+
}
|
|
46822
46990
|
if (!this.variableInflight) {
|
|
46823
46991
|
if (data && data.length === 0) {
|
|
46824
46992
|
this.callDataGridMethod("setStatus", "nodata", this.nodatamessage);
|
|
@@ -47113,10 +47281,8 @@
|
|
|
47113
47281
|
this.variableInflight = false;
|
|
47114
47282
|
this.callDataGridMethod("setStatus", "nodata", this.nodatamessage);
|
|
47115
47283
|
}
|
|
47116
|
-
|
|
47117
|
-
|
|
47118
|
-
this.onDataSourceChange();
|
|
47119
|
-
}
|
|
47284
|
+
this.watchVariableDataSet(this.dataset);
|
|
47285
|
+
this.onDataSourceChange();
|
|
47120
47286
|
break;
|
|
47121
47287
|
|
|
47122
47288
|
case "dataset":
|
|
@@ -47225,6 +47391,11 @@
|
|
|
47225
47391
|
if (nv) {
|
|
47226
47392
|
this.$element.find(".on-demand-datagrid > a").text(nv);
|
|
47227
47393
|
}
|
|
47394
|
+
this.gridOptions.ondemandmessage = nv;
|
|
47395
|
+
break;
|
|
47396
|
+
|
|
47397
|
+
case "viewlessmessage":
|
|
47398
|
+
this.gridOptions.viewlessmessage = nv;
|
|
47228
47399
|
break;
|
|
47229
47400
|
|
|
47230
47401
|
case "show":
|
|
@@ -50949,15 +51120,20 @@
|
|
|
50949
51120
|
};
|
|
50950
51121
|
};
|
|
50951
51122
|
var \u02752 = findInvalidElement;
|
|
50952
|
-
var setTouchedState = function(ngForm) {
|
|
51123
|
+
var setTouchedState = function(self, ngForm, fieldName) {
|
|
51124
|
+
var _a, _b;
|
|
50953
51125
|
if (ngForm.valid) {
|
|
50954
51126
|
return;
|
|
50955
51127
|
}
|
|
50956
51128
|
if (ngForm.controls) {
|
|
50957
|
-
_.forEach(ngForm.controls, (function(ctrl) {
|
|
50958
|
-
setTouchedState(ctrl);
|
|
51129
|
+
_.forEach(ngForm.controls, (function(ctrl, fieldName) {
|
|
51130
|
+
setTouchedState(self, ctrl, fieldName);
|
|
50959
51131
|
}));
|
|
50960
51132
|
} else {
|
|
51133
|
+
var element = self.$element.find('[wmformfield][key="' + fieldName + '"]');
|
|
51134
|
+
element[0].setAttribute("__errormsg", element[0].getAttribute("__validationId"));
|
|
51135
|
+
(_a = element[0].querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", ngForm.invalid);
|
|
51136
|
+
(_b = element[0].querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", element[0].getAttribute("__validationId"));
|
|
50961
51137
|
ngForm.markAsTouched();
|
|
50962
51138
|
}
|
|
50963
51139
|
};
|
|
@@ -51254,7 +51430,7 @@
|
|
|
51254
51430
|
}));
|
|
51255
51431
|
};
|
|
51256
51432
|
FormComponent.prototype.highlightInvalidFields = function() {
|
|
51257
|
-
setTouchedState(this.ngform);
|
|
51433
|
+
setTouchedState(this, this.ngform, "");
|
|
51258
51434
|
};
|
|
51259
51435
|
FormComponent.prototype.validateFieldsOnSubmit = function() {
|
|
51260
51436
|
this.setValidationMsgs();
|
|
@@ -51783,8 +51959,8 @@
|
|
|
51783
51959
|
FormComponent.prototype.generateFormFields = function() {
|
|
51784
51960
|
return __awaiter(this, void 0, void 0, (function() {
|
|
51785
51961
|
var noOfColumns, $gridLayout, columnWidth, fieldTemplate, colCount, index, userFields, fields, colTmpl, componentFactoryRef, component;
|
|
51786
|
-
return __generator(this, (function(
|
|
51787
|
-
switch (
|
|
51962
|
+
return __generator(this, (function(_c) {
|
|
51963
|
+
switch (_c.label) {
|
|
51788
51964
|
case 0:
|
|
51789
51965
|
if (_.isUndefined(this._isGridLayoutPresent)) {
|
|
51790
51966
|
this._isGridLayoutPresent = this.$element.find(".panel-body [wmlayoutgrid]").length > 0;
|
|
@@ -51843,7 +52019,7 @@
|
|
|
51843
52019
|
}) ];
|
|
51844
52020
|
|
|
51845
52021
|
case 1:
|
|
51846
|
-
componentFactoryRef =
|
|
52022
|
+
componentFactoryRef = _c.sent();
|
|
51847
52023
|
component = this.dynamicFormRef.createComponent(componentFactoryRef, 0, this.inj);
|
|
51848
52024
|
core.extendProto(component.instance, this._dynamicContext);
|
|
51849
52025
|
$gridLayout[0].appendChild(component.location.nativeElement);
|
|
@@ -52364,10 +52540,18 @@
|
|
|
52364
52540
|
$($evt.target).closest(".live-field").addClass("active");
|
|
52365
52541
|
};
|
|
52366
52542
|
FormFieldDirective.prototype._onBlurField = function($evt) {
|
|
52367
|
-
var _a, _b;
|
|
52543
|
+
var _a, _b, _c, _d;
|
|
52368
52544
|
$($evt.target).closest(".live-field").removeClass("active");
|
|
52369
|
-
|
|
52370
|
-
(
|
|
52545
|
+
var ele = this.nativeElement.querySelector("p.text-danger");
|
|
52546
|
+
if (this.ngform.controls[this._fieldName].invalid && this.ngform.controls[this._fieldName].touched && this.form.isUpdateMode) {
|
|
52547
|
+
this.nativeElement.setAttribute("__errormsg", "" + this.nativeElement.getAttribute("__validationId"));
|
|
52548
|
+
(_a = this.nativeElement.querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", "" + this.ngform.controls[this._fieldName].invalid);
|
|
52549
|
+
(_b = this.nativeElement.querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", "" + this.nativeElement.getAttribute("__validationId"));
|
|
52550
|
+
} else {
|
|
52551
|
+
this.nativeElement.removeAttribute("__errormsg");
|
|
52552
|
+
(_c = this.nativeElement.querySelector("input")) === null || _c === void 0 ? void 0 : _c.removeAttribute("aria-invalid");
|
|
52553
|
+
(_d = this.nativeElement.querySelector("input")) === null || _d === void 0 ? void 0 : _d.removeAttribute("aria-describedby");
|
|
52554
|
+
}
|
|
52371
52555
|
this._activeField = false;
|
|
52372
52556
|
this._triggeredByUser = false;
|
|
52373
52557
|
this._clicktriggeredByUser = false;
|
|
@@ -52589,7 +52773,7 @@
|
|
|
52589
52773
|
});
|
|
52590
52774
|
};
|
|
52591
52775
|
FormFieldDirective.prototype.onValueChange = function(val) {
|
|
52592
|
-
var _a, _b;
|
|
52776
|
+
var _a, _b, _c, _d;
|
|
52593
52777
|
if (!this.isDestroyed) {
|
|
52594
52778
|
var captionEl = $(this.nativeElement).find(".caption-floating");
|
|
52595
52779
|
if (captionEl.length > 0) {
|
|
@@ -52601,8 +52785,15 @@
|
|
|
52601
52785
|
isFocused: this._activeField
|
|
52602
52786
|
});
|
|
52603
52787
|
}
|
|
52604
|
-
(
|
|
52605
|
-
|
|
52788
|
+
if (this.ngform.controls[this._fieldName].invalid && this.ngform.controls[this._fieldName].touched && this.form.isUpdateMode) {
|
|
52789
|
+
this.nativeElement.setAttribute("__errormsg", "" + this.nativeElement.getAttribute("__validationId"));
|
|
52790
|
+
(_a = this.nativeElement.querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", this._triggeredByUser && this.ngform.controls[this._fieldName].invalid ? "true" : "false");
|
|
52791
|
+
(_b = this.nativeElement.querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", "" + this.nativeElement.getAttribute("__validationId"));
|
|
52792
|
+
} else {
|
|
52793
|
+
this.nativeElement.removeAttribute("__errormsg");
|
|
52794
|
+
(_c = this.nativeElement.querySelector("input")) === null || _c === void 0 ? void 0 : _c.removeAttribute("aria-invalid");
|
|
52795
|
+
(_d = this.nativeElement.querySelector("input")) === null || _d === void 0 ? void 0 : _d.removeAttribute("aria-describedby");
|
|
52796
|
+
}
|
|
52606
52797
|
this.form.onFieldValueChange(this, val);
|
|
52607
52798
|
this.notifyChanges();
|
|
52608
52799
|
if (this.$element.find(".active").length > 0 || this.form.touched) {
|
|
@@ -58269,40 +58460,36 @@
|
|
|
58269
58460
|
var TabsAnimator = function(_super) {
|
|
58270
58461
|
__extends(TabsAnimator, _super);
|
|
58271
58462
|
function TabsAnimator(tabs) {
|
|
58272
|
-
var e_1, _a;
|
|
58273
58463
|
var _this = _super.call(this) || this;
|
|
58274
58464
|
_this.tabs = tabs;
|
|
58275
58465
|
_this._$el = $(_this.tabs.getNativeElement()).find(">.tab-content");
|
|
58276
|
-
var childEls = _this._$el.find(">[wmTabPane]");
|
|
58277
|
-
_this._noOfTabs = childEls.length;
|
|
58278
|
-
var maxWidth = _this._noOfTabs * 100 + "%";
|
|
58279
|
-
core.addClass(_this.tabs.getNativeElement(), "has-transition");
|
|
58280
|
-
core.setCSSFromObj(_this._$el[0], {
|
|
58281
|
-
maxWidth: maxWidth,
|
|
58282
|
-
width: maxWidth
|
|
58283
|
-
});
|
|
58284
|
-
var width = 100 / _this._noOfTabs + "%";
|
|
58285
|
-
try {
|
|
58286
|
-
for (var _b = __values(Array.from(childEls)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
58287
|
-
var child = _c.value;
|
|
58288
|
-
core.setCSS(child, "width", width);
|
|
58289
|
-
}
|
|
58290
|
-
} catch (e_1_1) {
|
|
58291
|
-
e_1 = {
|
|
58292
|
-
error: e_1_1
|
|
58293
|
-
};
|
|
58294
|
-
} finally {
|
|
58295
|
-
try {
|
|
58296
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
58297
|
-
} finally {
|
|
58298
|
-
if (e_1) throw e_1.error;
|
|
58299
|
-
}
|
|
58300
|
-
}
|
|
58301
58466
|
_this.init(_this._$el);
|
|
58302
58467
|
return _this;
|
|
58303
58468
|
}
|
|
58469
|
+
TabsAnimator.prototype.calibrate = function() {
|
|
58470
|
+
var activeTabIndex = this.tabs.getActiveTabIndex();
|
|
58471
|
+
var panes = this._$el.find(">.tab-pane");
|
|
58472
|
+
var activeTabVisibleIndex = 0;
|
|
58473
|
+
var noOfVisiblePanes = 0;
|
|
58474
|
+
var visiblePanes = [];
|
|
58475
|
+
panes.each((function(i, p) {
|
|
58476
|
+
if (!$(p).prop("hidden")) {
|
|
58477
|
+
noOfVisiblePanes++;
|
|
58478
|
+
if (i === activeTabIndex) {
|
|
58479
|
+
activeTabVisibleIndex = noOfVisiblePanes - 1;
|
|
58480
|
+
}
|
|
58481
|
+
visiblePanes.push(p);
|
|
58482
|
+
}
|
|
58483
|
+
return true;
|
|
58484
|
+
}));
|
|
58485
|
+
return {
|
|
58486
|
+
activeTabIndex: activeTabVisibleIndex,
|
|
58487
|
+
noOfTabs: noOfVisiblePanes,
|
|
58488
|
+
panes: visiblePanes
|
|
58489
|
+
};
|
|
58490
|
+
};
|
|
58304
58491
|
TabsAnimator.prototype.bounds = function() {
|
|
58305
|
-
var
|
|
58492
|
+
var _a = this.calibrate(), activeTabIndex = _a.activeTabIndex, noOfTabs = _a.noOfTabs, panes = _a.panes, w = $(panes[0]).width(), centerVal = -1 * activeTabIndex * w;
|
|
58306
58493
|
this.clearContentFocus();
|
|
58307
58494
|
return {
|
|
58308
58495
|
strict: false,
|
|
@@ -58329,8 +58516,18 @@
|
|
|
58329
58516
|
}
|
|
58330
58517
|
};
|
|
58331
58518
|
TabsAnimator.prototype.transitionTabIntoView = function() {
|
|
58332
|
-
var
|
|
58333
|
-
|
|
58519
|
+
var _a = this.calibrate(), activeTabIndex = _a.activeTabIndex, noOfTabs = _a.noOfTabs, panes = _a.panes;
|
|
58520
|
+
var maxWidth = noOfTabs * 100 + "%";
|
|
58521
|
+
core.setCSSFromObj(this._$el[0], {
|
|
58522
|
+
maxWidth: maxWidth,
|
|
58523
|
+
width: maxWidth
|
|
58524
|
+
});
|
|
58525
|
+
core.addClass(this.tabs.getNativeElement(), "has-transition");
|
|
58526
|
+
var width = 100 / noOfTabs + "%";
|
|
58527
|
+
panes.forEach((function(p) {
|
|
58528
|
+
core.setCSS(p, "width", width);
|
|
58529
|
+
}));
|
|
58530
|
+
core.setCSS(this._$el[0], "transform", "translate3d(" + -1 * activeTabIndex / noOfTabs * 100 + "%, 0, 0)");
|
|
58334
58531
|
};
|
|
58335
58532
|
TabsAnimator.prototype.onUpper = function($event) {
|
|
58336
58533
|
this.tabs.prev($event);
|
|
@@ -58456,6 +58653,7 @@
|
|
|
58456
58653
|
};
|
|
58457
58654
|
TabPaneComponent.prototype.onPropertyChange = function(key, nv, ov) {
|
|
58458
58655
|
var _this = this;
|
|
58656
|
+
var _a;
|
|
58459
58657
|
if (key === "content") {
|
|
58460
58658
|
if (this.isActive) {
|
|
58461
58659
|
setTimeout((function() {
|
|
@@ -58466,6 +58664,10 @@
|
|
|
58466
58664
|
this.nativeElement.hidden = !nv;
|
|
58467
58665
|
if (this._isFirstLoad) {
|
|
58468
58666
|
this.tabsRef.selectDefaultPaneByIndex(this.tabsRef.defaultpaneindex);
|
|
58667
|
+
} else if (!nv && this.isActive) {
|
|
58668
|
+
this.tabsRef.next();
|
|
58669
|
+
} else if (nv || !this.isActive) {
|
|
58670
|
+
(_a = this.tabsRef.tabsAnimator) === null || _a === void 0 ? void 0 : _a.transitionTabIntoView();
|
|
58469
58671
|
}
|
|
58470
58672
|
this._isFirstLoad = false;
|
|
58471
58673
|
} else {
|
|
@@ -61798,9 +62000,9 @@
|
|
|
61798
62000
|
}));
|
|
61799
62001
|
|
|
61800
62002
|
(function(global, factory) {
|
|
61801
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@wm/core"), require("angular2-websocket/angular2-websocket"), require("@metrichor/jmespath"), require("@angular/core"), require("@angular/router"), require("@wm/oAuth"), require("@wm/security"), require("@
|
|
61802
|
-
factory((global.wm = global.wm || {}, global.wm.variables = {}), global.wm.core, global.angularWebSocket, global.jmespath, global.ng.core, global.ng.router, global.wm.oAuth, global.wm.security, global.
|
|
61803
|
-
})(this, (function(exports, core, angular2Websocket, jmespath, core$1, router, oAuth, security,
|
|
62003
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@wavemaker/variables"), require("@wm/core"), require("angular2-websocket/angular2-websocket"), require("@metrichor/jmespath"), require("@angular/core"), require("@angular/router"), require("@wm/oAuth"), require("@wm/security"), require("@angular/common"), require("@angular/common/http"), require("ngx-toastr"), require("@wm/http")) : typeof define === "function" && define.amd ? define("@wm/variables", [ "exports", "@wavemaker/variables", "@wm/core", "angular2-websocket/angular2-websocket", "@metrichor/jmespath", "@angular/core", "@angular/router", "@wm/oAuth", "@wm/security", "@angular/common", "@angular/common/http", "ngx-toastr", "@wm/http" ], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
|
|
62004
|
+
factory((global.wm = global.wm || {}, global.wm.variables = {}), global.wm_common_variables, global.wm.core, global.angularWebSocket, global.jmespath, global.ng.core, global.ng.router, global.wm.oAuth, global.wm.security, global.ng.common, global.ng.common.http, global.ngxToastr, global.wm.http));
|
|
62005
|
+
})(this, (function(exports, variables, core, angular2Websocket, jmespath, core$1, router, oAuth, security, common, http, ngxToastr, http$1) {
|
|
61804
62006
|
"use strict";
|
|
61805
62007
|
var CONSTANTS = {
|
|
61806
62008
|
hasCordova: window["cordova"] !== undefined,
|
|
@@ -62102,14 +62304,7 @@
|
|
|
62102
62304
|
}
|
|
62103
62305
|
}
|
|
62104
62306
|
};
|
|
62105
|
-
var $rootScope =
|
|
62106
|
-
project: {
|
|
62107
|
-
deployedUrl: "./",
|
|
62108
|
-
id: "temp_id"
|
|
62109
|
-
},
|
|
62110
|
-
projectName: "test_project_name",
|
|
62111
|
-
isApplicationType: true
|
|
62112
|
-
};
|
|
62307
|
+
var $rootScope = variables.$rootScope;
|
|
62113
62308
|
/*! *****************************************************************************
|
|
62114
62309
|
Copyright (c) Microsoft Corporation.
|
|
62115
62310
|
|
|
@@ -63165,11 +63360,11 @@
|
|
|
63165
63360
|
}
|
|
63166
63361
|
};
|
|
63167
63362
|
NotificationActionManager.prototype.notifyViaDialog = function(variable, options) {
|
|
63168
|
-
var commonPageDialogId = "Common" + _.capitalize(variable.operation) + "Dialog",
|
|
63363
|
+
var commonPageDialogId = "Common" + _.capitalize(variable.operation) + "Dialog", dialogId = commonPageDialogId;
|
|
63169
63364
|
var closeCallBackFn = function() {
|
|
63170
63365
|
return initiateCallback("onOk", variable, options.data);
|
|
63171
63366
|
};
|
|
63172
|
-
exports.dialogService.open(dialogId,
|
|
63367
|
+
exports.dialogService.open(dialogId, undefined, {
|
|
63173
63368
|
notification: {
|
|
63174
63369
|
title: options.title || variable.dataBinding.title,
|
|
63175
63370
|
text: options.message || variable.dataBinding.text,
|
|
@@ -63177,11 +63372,11 @@
|
|
|
63177
63372
|
cancelButtonText: options.cancelButtonText || variable.dataBinding.cancelButtonText || "CANCEL",
|
|
63178
63373
|
alerttype: options.alerttype || variable.dataBinding.alerttype || "information",
|
|
63179
63374
|
onOk: function() {
|
|
63180
|
-
exports.dialogService.close(dialogId,
|
|
63375
|
+
exports.dialogService.close(dialogId, undefined, closeCallBackFn);
|
|
63181
63376
|
},
|
|
63182
63377
|
onCancel: function() {
|
|
63183
63378
|
initiateCallback("onCancel", variable, options.data);
|
|
63184
|
-
exports.dialogService.close(dialogId,
|
|
63379
|
+
exports.dialogService.close(dialogId, undefined);
|
|
63185
63380
|
},
|
|
63186
63381
|
onClose: function() {
|
|
63187
63382
|
initiateCallback("onClose", variable, options.data);
|
|
@@ -64616,6 +64811,13 @@
|
|
|
64616
64811
|
type: core.AbstractHttpService
|
|
64617
64812
|
} ];
|
|
64618
64813
|
};
|
|
64814
|
+
var Formatter = function() {
|
|
64815
|
+
function Formatter() {}
|
|
64816
|
+
Formatter.prototype.format = function(value, format) {
|
|
64817
|
+
return exports.appManager.getPipe("date").transform(value, format);
|
|
64818
|
+
};
|
|
64819
|
+
return Formatter;
|
|
64820
|
+
}();
|
|
64619
64821
|
var VariablesService = function() {
|
|
64620
64822
|
function VariablesService(httpService, metadataService, navigationService, routerService, toasterService, oAuthService, securityService, dialogService) {
|
|
64621
64823
|
this.httpService = httpService;
|
|
@@ -64722,6 +64924,7 @@
|
|
|
64722
64924
|
if (this.isVariableSeperated(variablesJson, variableName)) {
|
|
64723
64925
|
this.processBinding(varInstance, scope, "dataBinding", this.getBindSourceTarget(varInstance));
|
|
64724
64926
|
varInstance.httpService = this.httpService;
|
|
64927
|
+
varInstance.dateFormatter = new Formatter;
|
|
64725
64928
|
varInstance.subscribe("afterInvoke", (function() {
|
|
64726
64929
|
return core.$invokeWatchers(true);
|
|
64727
64930
|
}));
|
|
@@ -64811,6 +65014,7 @@
|
|
|
64811
65014
|
exports.DB_CONSTANTS = DB_CONSTANTS;
|
|
64812
65015
|
exports.DeviceVariableManager = DeviceVariableManager;
|
|
64813
65016
|
exports.DeviceVariableService = DeviceVariableService;
|
|
65017
|
+
exports.Formatter = Formatter;
|
|
64814
65018
|
exports.MetadataService = MetadataService;
|
|
64815
65019
|
exports.SWAGGER_CONSTANTS = SWAGGER_CONSTANTS;
|
|
64816
65020
|
exports.VARIABLE_CONSTANTS = VARIABLE_CONSTANTS;
|
|
@@ -65413,6 +65617,9 @@
|
|
|
65413
65617
|
}
|
|
65414
65618
|
} : _a, scripts = _b.resources.scripts;
|
|
65415
65619
|
var baseUrl = getPrefabBaseUrl(prefabName);
|
|
65620
|
+
scripts = scripts.filter((function(script) {
|
|
65621
|
+
return !script.startsWith("npm://");
|
|
65622
|
+
}));
|
|
65416
65623
|
var _scripts = scripts.map((function(url) {
|
|
65417
65624
|
return getPrefabResourceUrl(url, baseUrl);
|
|
65418
65625
|
}));
|