@wavemaker/app-runtime-wm-build 11.4.0-next.28701 → 11.4.0-rc.5342
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 +29641 -10013
- app-runtime-wm-build/wmapp/scripts/wm-libs.min.js +1252 -428
- app-runtime-wm-build/wmapp/scripts/wm-loader.js +482 -404
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +19 -19
- app-runtime-wm-build/wmapp/styles/css/wm-style.css +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-libs.js +28578 -8950
- app-runtime-wm-build/wmmobile/scripts/wm-libs.min.js +1253 -429
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +504 -409
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +12 -12
- app-runtime-wm-build/wmmobile/styles/css/wm-style.css +1 -1
|
@@ -8973,9 +8973,11 @@
|
|
|
8973
8973
|
});
|
|
8974
8974
|
};
|
|
8975
8975
|
var getKeyboardFocusableElements = function(element) {
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
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
|
+
}));
|
|
8979
8981
|
};
|
|
8980
8982
|
exports.APPLY_STYLES_TYPE = void 0;
|
|
8981
8983
|
(function(APPLY_STYLES_TYPE) {
|
|
@@ -11229,7 +11231,7 @@
|
|
|
11229
11231
|
if (openedDialogs.indexOf(ref) !== -1) {
|
|
11230
11232
|
openedDialogs.splice(openedDialogs.indexOf(ref), 1);
|
|
11231
11233
|
}
|
|
11232
|
-
if (openedDialogs.length === 0 && core$1.isMobileApp()) {
|
|
11234
|
+
if (openedDialogs.length === 0 && (core$1.isMobile() || core$1.isMobileApp())) {
|
|
11233
11235
|
var parentSelector = $("body > app-root")[0];
|
|
11234
11236
|
parentSelector.removeAttribute("aria-hidden");
|
|
11235
11237
|
}
|
|
@@ -13440,21 +13442,19 @@
|
|
|
13440
13442
|
__proto__: null,
|
|
13441
13443
|
default: search_build
|
|
13442
13444
|
});
|
|
13443
|
-
var tagName$1o = "
|
|
13445
|
+
var tagName$1o = "ul";
|
|
13444
13446
|
transpiler.register("wm-tree", (function() {
|
|
13445
13447
|
return {
|
|
13446
13448
|
pre: function(attrs) {
|
|
13447
|
-
return "<" + tagName$1o +
|
|
13449
|
+
return "<" + tagName$1o + ' wmTree class="ztree" ' + transpiler.getAttrMarkup(attrs) + ">";
|
|
13448
13450
|
},
|
|
13449
13451
|
post: function() {
|
|
13450
13452
|
return "</" + tagName$1o + ">";
|
|
13451
13453
|
}
|
|
13452
13454
|
};
|
|
13453
13455
|
}));
|
|
13454
|
-
var tree_build =
|
|
13455
|
-
|
|
13456
|
-
__proto__: null,
|
|
13457
|
-
default: tree_build
|
|
13456
|
+
var tree_build = Object.freeze({
|
|
13457
|
+
__proto__: null
|
|
13458
13458
|
});
|
|
13459
13459
|
var tagName$1n = "div";
|
|
13460
13460
|
transpiler.register("wm-card", (function() {
|
|
@@ -15060,7 +15060,7 @@
|
|
|
15060
15060
|
}
|
|
15061
15061
|
var markup = "<" + tagName$q + " wmPopover " + transpiler.getAttrMarkup(attrs) + ">";
|
|
15062
15062
|
var contextAttrs = table ? 'let-row="row"' : "";
|
|
15063
|
-
markup += "<ng-template " + contextAttrs + '><
|
|
15063
|
+
markup += "<ng-template " + contextAttrs + '><div tabindex="0" class="popover-start sr-only" aria-label="">popover content start</div>';
|
|
15064
15064
|
if (popoverTemplate) {
|
|
15065
15065
|
markup += "" + (popoverTemplate ? popoverTemplate : "");
|
|
15066
15066
|
}
|
|
@@ -15071,7 +15071,7 @@
|
|
|
15071
15071
|
if (shared.get("hasPopoverContent")) {
|
|
15072
15072
|
markup += "</div>";
|
|
15073
15073
|
}
|
|
15074
|
-
return markup + '<
|
|
15074
|
+
return markup + '<div tabindex="0" class="popover-end sr-only" aria-label="">popover content ended</div></ng-template></' + tagName$q + ">";
|
|
15075
15075
|
}
|
|
15076
15076
|
};
|
|
15077
15077
|
}));
|
|
@@ -16435,7 +16435,7 @@
|
|
|
16435
16435
|
exports.tileBuild = tile_build$1;
|
|
16436
16436
|
exports.timeBuild = time_build$1;
|
|
16437
16437
|
exports.topNavBuild = topNav_build$1;
|
|
16438
|
-
exports.treeBuild = tree_build
|
|
16438
|
+
exports.treeBuild = tree_build;
|
|
16439
16439
|
exports.videoBuild = video_build$1;
|
|
16440
16440
|
exports.wizardBuild = wizard_build$1;
|
|
16441
16441
|
exports.wizardStepBuild = wizardStep_build$1;
|
|
@@ -22781,10 +22781,10 @@
|
|
|
22781
22781
|
}));
|
|
22782
22782
|
|
|
22783
22783
|
(function(global, factory) {
|
|
22784
|
-
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,
|
|
22785
22785
|
factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {},
|
|
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
|
|
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) {
|
|
22788
22788
|
"use strict";
|
|
22789
22789
|
/*! *****************************************************************************
|
|
22790
22790
|
Copyright (c) Microsoft Corporation.
|
|
@@ -23161,352 +23161,344 @@
|
|
|
23161
23161
|
value: 0
|
|
23162
23162
|
}, base.PROP_NUMBER) ], [ "treeicons", base.PROP_STRING ] ]));
|
|
23163
23163
|
};
|
|
23164
|
-
var defaultTreeIconClass = "plus-minus";
|
|
23165
|
-
var ICON_CLASSES = {
|
|
23166
|
-
folder: {
|
|
23167
|
-
expanded: "wi-folder-open",
|
|
23168
|
-
collapsed: "wi-folder"
|
|
23169
|
-
},
|
|
23170
|
-
"circle-plus-minus": {
|
|
23171
|
-
expanded: "wi-remove-circle-outline",
|
|
23172
|
-
collapsed: "wi-add-circle-outline"
|
|
23173
|
-
},
|
|
23174
|
-
chevron: {
|
|
23175
|
-
expanded: "wi-keyboard-arrow-down",
|
|
23176
|
-
collapsed: "wi-keyboard-arrow-right"
|
|
23177
|
-
},
|
|
23178
|
-
menu: {
|
|
23179
|
-
expanded: "wi-arrow-down",
|
|
23180
|
-
collapsed: "wi-arrow-right"
|
|
23181
|
-
},
|
|
23182
|
-
triangle: {
|
|
23183
|
-
expanded: "wi-arrow-drop-down-circle",
|
|
23184
|
-
collapsed: "wi-play-circle-filled"
|
|
23185
|
-
},
|
|
23186
|
-
"expand-collapse": {
|
|
23187
|
-
expanded: "wi-expand-less",
|
|
23188
|
-
collapsed: "wi-expand-more"
|
|
23189
|
-
},
|
|
23190
|
-
"plus-minus": {
|
|
23191
|
-
expanded: "wi-minus",
|
|
23192
|
-
collapsed: "wi-plus"
|
|
23193
|
-
}
|
|
23194
|
-
};
|
|
23195
23164
|
var WIDGET_INFO = {
|
|
23196
23165
|
widgetType: "wm-tree",
|
|
23197
23166
|
hostClass: "app-tree"
|
|
23198
23167
|
};
|
|
23199
|
-
var
|
|
23200
|
-
|
|
23201
|
-
|
|
23168
|
+
var defaultTreeIconClass = "plus-minus";
|
|
23169
|
+
var TreeComponent = function(_super) {
|
|
23170
|
+
__extends(TreeComponent, _super);
|
|
23171
|
+
function TreeComponent(inj) {
|
|
23202
23172
|
var _this = _super.call(this, inj, WIDGET_INFO) || this;
|
|
23203
|
-
_this.
|
|
23204
|
-
|
|
23205
|
-
|
|
23206
|
-
|
|
23207
|
-
|
|
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
|
+
};
|
|
23208
23189
|
base.styler(_this.nativeElement, _this, base.APPLY_STYLES_TYPE.CONTAINER);
|
|
23209
|
-
_this.bindEvents();
|
|
23210
23190
|
return _this;
|
|
23211
23191
|
}
|
|
23212
|
-
|
|
23192
|
+
TreeComponent.prototype.onPropertyChange = function(key, nv, ov) {
|
|
23213
23193
|
switch (key) {
|
|
23214
23194
|
case "dataset":
|
|
23215
23195
|
this.nodes = this.getNodes(nv);
|
|
23216
|
-
this.
|
|
23196
|
+
if (this.level > 0) {
|
|
23197
|
+
this.expandTree(this.level, this.nodes, 0);
|
|
23198
|
+
}
|
|
23217
23199
|
this.renderTree();
|
|
23218
23200
|
break;
|
|
23219
23201
|
|
|
23220
|
-
case "
|
|
23221
|
-
|
|
23222
|
-
|
|
23223
|
-
|
|
23224
|
-
this.renderTree();
|
|
23202
|
+
case "levels":
|
|
23203
|
+
if (nv > 0) {
|
|
23204
|
+
this.level = nv;
|
|
23205
|
+
}
|
|
23225
23206
|
break;
|
|
23226
23207
|
|
|
23227
23208
|
case "treeicons":
|
|
23228
|
-
this.
|
|
23209
|
+
this.treeicon = nv;
|
|
23229
23210
|
break;
|
|
23230
23211
|
|
|
23231
|
-
case "
|
|
23232
|
-
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;
|
|
23233
23225
|
break;
|
|
23234
23226
|
|
|
23235
23227
|
default:
|
|
23236
23228
|
_super.prototype.onPropertyChange.call(this, key, nv, ov);
|
|
23229
|
+
break;
|
|
23237
23230
|
}
|
|
23238
23231
|
};
|
|
23239
|
-
|
|
23232
|
+
TreeComponent.prototype.expandTree = function(level, node, childLevel) {
|
|
23240
23233
|
var _this = this;
|
|
23241
|
-
|
|
23242
|
-
|
|
23243
|
-
|
|
23244
|
-
|
|
23245
|
-
_cls = levels > 0 ? " expanded " : " collapsed ";
|
|
23246
|
-
_iconCls = _cls + (levels > 0 ? _iconClses.expanded : _iconClses.collapsed);
|
|
23247
|
-
deep = deep || 0;
|
|
23248
|
-
parent.append($ul);
|
|
23249
|
-
nodes.forEach((function(node, idx) {
|
|
23250
|
-
var $li = $("<li></li>"), $iconNode = $("<i></i>"), nodeLabel = base.getEvaluatedData(node, {
|
|
23251
|
-
field: _this.nodelabel,
|
|
23252
|
-
bindExpression: _this.bindnodelabel
|
|
23253
|
-
}, _this.viewParent) || node.label, nodeIcon = base.getEvaluatedData(node, {
|
|
23254
|
-
field: _this.nodeicon,
|
|
23255
|
-
bindExpression: _this.bindnodeicon
|
|
23256
|
-
}, _this.viewParent) || node.icon, nodeChildren = base.getEvaluatedData(node, {
|
|
23257
|
-
field: _this.nodechildren,
|
|
23258
|
-
bindExpression: _this.bindnodechildren
|
|
23259
|
-
}, _this.viewParent) || node.children;
|
|
23260
|
-
var nodeIdValue = base.getEvaluatedData(node, {
|
|
23261
|
-
field: _this.nodeid,
|
|
23262
|
-
bindExpression: _this.bindnodeid
|
|
23263
|
-
}, _this.viewParent);
|
|
23264
|
-
if (nodeIdValue === undefined) {
|
|
23265
|
-
nodeIdValue = node.children;
|
|
23266
|
-
}
|
|
23267
|
-
var isNodeMatched = false, expandCollapseIcon;
|
|
23268
|
-
$li.data("nodedata", node).append($iconNode).append('<span class="title">' + nodeLabel + "</span>").appendTo($ul);
|
|
23269
|
-
if (_this.bindnodeid || _this.nodeid) {
|
|
23270
|
-
isNodeMatched = _this.binddatavalue ? nodeIdValue === _evalDataValue : nodeIdValue === _expr;
|
|
23271
|
-
if (nodeIdValue !== undefined) {
|
|
23272
|
-
$li.attr("id", nodeIdValue);
|
|
23273
|
-
}
|
|
23274
|
-
} else if (_this.binddatavalue) {
|
|
23275
|
-
isNodeMatched = !!core.$parseExpr(_expr)(_this, node);
|
|
23276
|
-
}
|
|
23277
|
-
if (!_this._selectNode) {
|
|
23278
|
-
if (_expr === "FirstNode" && idx === 0 || !deep && _expr === "LastNode" && idx === nodes.length - 1 || isNodeMatched) {
|
|
23279
|
-
_this._selectNode = $li;
|
|
23280
|
-
_this.datavalue = nodeIdValue;
|
|
23281
|
-
}
|
|
23282
|
-
}
|
|
23283
|
-
if (nodeIcon) {
|
|
23284
|
-
$iconNode.addClass(nodeIcon);
|
|
23285
|
-
}
|
|
23286
|
-
if (nodeChildren && nodeChildren.length) {
|
|
23287
|
-
$li.addClass("parent-node " + _cls);
|
|
23288
|
-
expandCollapseIcon = $('<i class="wi ' + _iconCls + '"></i>');
|
|
23289
|
-
if (nodeIcon) {
|
|
23290
|
-
$iconNode.addClass(nodeIcon);
|
|
23291
|
-
}
|
|
23292
|
-
$li.prepend(expandCollapseIcon);
|
|
23293
|
-
_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);
|
|
23294
23238
|
} else {
|
|
23295
|
-
|
|
23296
|
-
|
|
23297
|
-
}
|
|
23298
|
-
$li.addClass("leaf-node");
|
|
23239
|
+
childLevel = 0;
|
|
23240
|
+
return;
|
|
23299
23241
|
}
|
|
23300
23242
|
}));
|
|
23301
23243
|
};
|
|
23302
|
-
|
|
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) {
|
|
23303
23257
|
return value.split(",").map((function(item) {
|
|
23304
23258
|
return {
|
|
23305
|
-
|
|
23259
|
+
name: item && item.trim()
|
|
23306
23260
|
};
|
|
23307
23261
|
}));
|
|
23308
23262
|
};
|
|
23309
|
-
|
|
23263
|
+
TreeComponent.prototype.getNodes = function(newVal) {
|
|
23310
23264
|
var nodes;
|
|
23311
|
-
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)) {
|
|
23312
23270
|
newVal = newVal.trim();
|
|
23313
23271
|
if (newVal) {
|
|
23314
23272
|
nodes = this.getNodesFromString(newVal);
|
|
23315
23273
|
}
|
|
23316
|
-
} else if (_.isArray(newVal)) {
|
|
23317
|
-
newVal = base.getOrderedDataset(newVal, this.orderby);
|
|
23318
|
-
nodes = newVal;
|
|
23319
|
-
} else if (_.isObject(newVal)) {
|
|
23320
|
-
nodes = [ newVal ];
|
|
23321
23274
|
}
|
|
23322
23275
|
return nodes;
|
|
23323
23276
|
};
|
|
23324
|
-
|
|
23325
|
-
|
|
23326
|
-
|
|
23327
|
-
|
|
23328
|
-
$el.find("i.expanded").removeClass(ICON_CLASSES[ov].expanded).addClass(ICON_CLASSES[nv].expanded);
|
|
23329
|
-
$el.find("i.collapsed").removeClass(ICON_CLASSES[ov].collapsed).addClass(ICON_CLASSES[nv].collapsed);
|
|
23330
|
-
};
|
|
23331
|
-
TreeDirective.prototype.toggleExpandCollapseNode = function($event, $i, $li) {
|
|
23332
|
-
var treeIcons = ICON_CLASSES[this.treeicons || defaultTreeIconClass];
|
|
23333
|
-
var $liPath = this.findSelectedNodeParent($li);
|
|
23334
|
-
var path = "";
|
|
23335
|
-
$liPath.each((function(i, el) {
|
|
23336
|
-
var current = $(el).children(".title").text();
|
|
23337
|
-
path = "/" + (current + path);
|
|
23338
|
-
}));
|
|
23339
|
-
var eventParams = {
|
|
23340
|
-
$event: $event,
|
|
23341
|
-
$item: $li.data("nodedata"),
|
|
23342
|
-
$path: path
|
|
23343
|
-
};
|
|
23344
|
-
if ($i.hasClass("collapsed")) {
|
|
23345
|
-
$i.removeClass("collapsed " + treeIcons.collapsed).addClass("expanded " + treeIcons.expanded);
|
|
23346
|
-
$li.removeClass("collapsed").addClass("expanded");
|
|
23347
|
-
this.invokeEventCallback("expand", eventParams);
|
|
23348
|
-
} else if ($i.hasClass("expanded")) {
|
|
23349
|
-
$i.removeClass("expanded " + treeIcons.expanded).addClass("collapsed " + treeIcons.collapsed);
|
|
23350
|
-
$li.removeClass("expanded").addClass("collapsed");
|
|
23351
|
-
this.invokeEventCallback("collapse", eventParams);
|
|
23352
|
-
}
|
|
23277
|
+
TreeComponent.prototype.setNodeclasses = function(treeId, treeNode) {
|
|
23278
|
+
return treeNode.icon ? {
|
|
23279
|
+
add: [ "" + treeNode.icon ]
|
|
23280
|
+
} : "";
|
|
23353
23281
|
};
|
|
23354
|
-
|
|
23282
|
+
TreeComponent.prototype.setNodeData = function(nodes, depth, level, parentNode, type) {
|
|
23355
23283
|
var _this = this;
|
|
23356
|
-
|
|
23357
|
-
|
|
23358
|
-
|
|
23359
|
-
|
|
23360
|
-
|
|
23361
|
-
|
|
23362
|
-
|
|
23363
|
-
|
|
23364
|
-
|
|
23365
|
-
|
|
23366
|
-
|
|
23367
|
-
|
|
23368
|
-
|
|
23369
|
-
|
|
23370
|
-
|
|
23371
|
-
|
|
23372
|
-
|
|
23373
|
-
|
|
23374
|
-
|
|
23375
|
-
|
|
23376
|
-
|
|
23377
|
-
_this.
|
|
23378
|
-
|
|
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
|
+
}
|
|
23379
23314
|
}));
|
|
23380
|
-
this.selecteditem = core.getClonedObject(data) || {};
|
|
23381
|
-
this.selecteditem.path = path;
|
|
23382
|
-
this.invokeEventCallback("select", {
|
|
23383
|
-
$event: undefined,
|
|
23384
|
-
$item: data,
|
|
23385
|
-
$path: path
|
|
23386
|
-
});
|
|
23387
|
-
core.$appDigest();
|
|
23388
23315
|
}
|
|
23389
23316
|
};
|
|
23390
|
-
|
|
23391
|
-
var
|
|
23392
|
-
|
|
23393
|
-
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
|
|
23400
|
-
|
|
23401
|
-
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
path = "/" + (current + path);
|
|
23405
|
-
}));
|
|
23406
|
-
$li.parentsUntil($el, "li.parent-node.collapsed").each((function(index, el) {
|
|
23407
|
-
var $current = $(el), $i = $current.children("i.collapsed");
|
|
23408
|
-
_this.toggleExpandCollapseNode(undefined, $i, $current);
|
|
23409
|
-
}));
|
|
23410
|
-
this.selecteditem = core.getClonedObject(data) || {};
|
|
23411
|
-
this.selecteditem.path = path;
|
|
23412
|
-
if (target) {
|
|
23413
|
-
if (this.nodeid || this.bindnodeid) {
|
|
23414
|
-
this.datavalue = base.getEvaluatedData(data, {
|
|
23415
|
-
field: this.nodeid,
|
|
23416
|
-
bindExpression: this.bindnodeid
|
|
23417
|
-
}, this.viewParent);
|
|
23418
|
-
} else {
|
|
23419
|
-
this.datavalue = core.getClonedObject(data) || {};
|
|
23420
|
-
}
|
|
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;
|
|
23421
23331
|
} else {
|
|
23422
|
-
this.
|
|
23423
|
-
}
|
|
23424
|
-
if (nodeAction) {
|
|
23425
|
-
core.$parseEvent(nodeAction)(this);
|
|
23332
|
+
path = this.getPath(treeNode.getParentNode(), path) + "/" + treeNode.name;
|
|
23426
23333
|
}
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
|
|
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,
|
|
23430
23342
|
$path: path
|
|
23431
|
-
}
|
|
23432
|
-
|
|
23343
|
+
};
|
|
23344
|
+
this.invokeEventCallback("select", eventParams);
|
|
23345
|
+
};
|
|
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
|
+
})) : "";
|
|
23433
23366
|
};
|
|
23434
|
-
|
|
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) {
|
|
23435
23377
|
var _this = this;
|
|
23436
|
-
|
|
23437
|
-
|
|
23438
|
-
|
|
23439
|
-
|
|
23440
|
-
_this.selecteditem = {};
|
|
23441
|
-
_this.selectNode(evt, li);
|
|
23378
|
+
array.forEach((function(obj) {
|
|
23379
|
+
if (obj.label !== undefined) {
|
|
23380
|
+
obj.name = obj.label;
|
|
23381
|
+
delete obj.label;
|
|
23442
23382
|
}
|
|
23443
|
-
if (
|
|
23444
|
-
_this.
|
|
23383
|
+
if (obj.children !== undefined) {
|
|
23384
|
+
_this.modifyObjects(obj.children);
|
|
23445
23385
|
}
|
|
23446
23386
|
}));
|
|
23387
|
+
return array;
|
|
23388
|
+
};
|
|
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;
|
|
23447
23413
|
};
|
|
23448
|
-
|
|
23449
|
-
|
|
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;
|
|
23450
23437
|
};
|
|
23451
|
-
|
|
23452
|
-
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);
|
|
23453
23471
|
};
|
|
23454
|
-
|
|
23455
|
-
|
|
23456
|
-
|
|
23472
|
+
TreeComponent.prototype.ngAfterViewInit = function() {
|
|
23473
|
+
var _this = this;
|
|
23474
|
+
setTimeout((function() {
|
|
23475
|
+
_this.changeTreeIcons(_this.treeicon || defaultTreeIconClass);
|
|
23476
|
+
}), 200);
|
|
23457
23477
|
};
|
|
23458
|
-
return
|
|
23478
|
+
return TreeComponent;
|
|
23459
23479
|
}(base.StylableComponent);
|
|
23460
|
-
|
|
23461
|
-
|
|
23462
|
-
type: core
|
|
23480
|
+
TreeComponent.initializeProps = registerProps();
|
|
23481
|
+
TreeComponent.decorators = [ {
|
|
23482
|
+
type: core.Component,
|
|
23463
23483
|
args: [ {
|
|
23464
|
-
selector: "
|
|
23465
|
-
|
|
23484
|
+
selector: "ul[wmTree]",
|
|
23485
|
+
template: '<ul #wmTree class="ztree" id="ztree"></ul> ',
|
|
23486
|
+
providers: [ base.provideAsWidgetRef(TreeComponent) ],
|
|
23487
|
+
encapsulation: core.ViewEncapsulation.None
|
|
23466
23488
|
} ]
|
|
23467
23489
|
} ];
|
|
23468
|
-
|
|
23490
|
+
TreeComponent.ctorParameters = function() {
|
|
23469
23491
|
return [ {
|
|
23470
|
-
type: core
|
|
23471
|
-
}, {
|
|
23472
|
-
type: undefined,
|
|
23473
|
-
decorators: [ {
|
|
23474
|
-
type: core$1.Attribute,
|
|
23475
|
-
args: [ "datavalue.bind" ]
|
|
23476
|
-
} ]
|
|
23477
|
-
}, {
|
|
23478
|
-
type: undefined,
|
|
23479
|
-
decorators: [ {
|
|
23480
|
-
type: core$1.Attribute,
|
|
23481
|
-
args: [ "nodelabel.bind" ]
|
|
23482
|
-
} ]
|
|
23483
|
-
}, {
|
|
23484
|
-
type: undefined,
|
|
23485
|
-
decorators: [ {
|
|
23486
|
-
type: core$1.Attribute,
|
|
23487
|
-
args: [ "nodeicon.bind" ]
|
|
23488
|
-
} ]
|
|
23489
|
-
}, {
|
|
23490
|
-
type: undefined,
|
|
23491
|
-
decorators: [ {
|
|
23492
|
-
type: core$1.Attribute,
|
|
23493
|
-
args: [ "nodechildren.bind" ]
|
|
23494
|
-
} ]
|
|
23495
|
-
}, {
|
|
23496
|
-
type: undefined,
|
|
23497
|
-
decorators: [ {
|
|
23498
|
-
type: core$1.Attribute,
|
|
23499
|
-
args: [ "nodeid.bind" ]
|
|
23500
|
-
} ]
|
|
23492
|
+
type: core.Injector
|
|
23501
23493
|
} ];
|
|
23502
23494
|
};
|
|
23503
|
-
var components = [
|
|
23495
|
+
var components = [ TreeComponent ];
|
|
23504
23496
|
var TreeModule = function() {
|
|
23505
23497
|
function TreeModule() {}
|
|
23506
23498
|
return TreeModule;
|
|
23507
23499
|
}();
|
|
23508
23500
|
TreeModule.decorators = [ {
|
|
23509
|
-
type: core
|
|
23501
|
+
type: core.NgModule,
|
|
23510
23502
|
args: [ {
|
|
23511
23503
|
imports: [ common.CommonModule, base.WmComponentsModule ],
|
|
23512
23504
|
declarations: __spreadArray([], __read(components)),
|
|
@@ -23514,7 +23506,7 @@
|
|
|
23514
23506
|
entryComponents: []
|
|
23515
23507
|
} ]
|
|
23516
23508
|
} ];
|
|
23517
|
-
exports.
|
|
23509
|
+
exports.TreeComponent = TreeComponent;
|
|
23518
23510
|
exports.TreeModule = TreeModule;
|
|
23519
23511
|
exports["\u0275a"] = registerProps;
|
|
23520
23512
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -26924,22 +26916,24 @@
|
|
|
26924
26916
|
configurable: true
|
|
26925
26917
|
});
|
|
26926
26918
|
DateTimePickerComponent.prototype.validateSelectedDate = function() {
|
|
26927
|
-
var _a, _b, _c, _d, _e
|
|
26919
|
+
var _a, _b, _c, _d, _e;
|
|
26928
26920
|
if (!this.changedValue) {
|
|
26929
26921
|
return true;
|
|
26930
26922
|
}
|
|
26931
26923
|
var cd = moment(this.changedValue);
|
|
26932
|
-
|
|
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)) {
|
|
26933
26927
|
return false;
|
|
26934
26928
|
}
|
|
26935
|
-
if (
|
|
26929
|
+
if (maxDate && (this.mode === "DATE" && moment(maxDate).endOf("day").toDate() < this.changedValue || this.mode !== "DATE" && maxDate < this.changedValue)) {
|
|
26936
26930
|
return false;
|
|
26937
26931
|
}
|
|
26938
|
-
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) {
|
|
26939
26933
|
return false;
|
|
26940
26934
|
}
|
|
26941
26935
|
var cdSt = cd.startOf("day").toDate().getTime();
|
|
26942
|
-
if ((
|
|
26936
|
+
if ((_e = this.excludedDatesToDisable) === null || _e === void 0 ? void 0 : _e.find((function(d) {
|
|
26943
26937
|
return d.getTime() === cdSt;
|
|
26944
26938
|
}))) {
|
|
26945
26939
|
return false;
|
|
@@ -26988,6 +26982,9 @@
|
|
|
26988
26982
|
newVal.setMilliseconds(oldVal.getMilliseconds());
|
|
26989
26983
|
}
|
|
26990
26984
|
this.changedValue = newVal;
|
|
26985
|
+
if (this.mode === "DATE" && oldVal !== newVal && this.validateSelectedDate()) {
|
|
26986
|
+
this.onOkClick();
|
|
26987
|
+
}
|
|
26991
26988
|
};
|
|
26992
26989
|
DateTimePickerComponent.prototype.onTimeUpdate = function(newVal) {
|
|
26993
26990
|
this.changedValue = newVal;
|
|
@@ -27009,6 +27006,10 @@
|
|
|
27009
27006
|
this.triggerChange();
|
|
27010
27007
|
this.hideModal();
|
|
27011
27008
|
};
|
|
27009
|
+
DateTimePickerComponent.prototype.setToday = function() {
|
|
27010
|
+
var today = moment().startOf("day").toDate();
|
|
27011
|
+
this.onDateUpdate(today);
|
|
27012
|
+
};
|
|
27012
27013
|
DateTimePickerComponent.prototype.reset = function() {
|
|
27013
27014
|
this.changedValue = this._value;
|
|
27014
27015
|
};
|
|
@@ -27043,7 +27044,7 @@
|
|
|
27043
27044
|
type: core.Component,
|
|
27044
27045
|
args: [ {
|
|
27045
27046
|
selector: "wm-datetimepicker",
|
|
27046
|
-
template: ' \n <ng-template #datetimepickerTemplate>\n <div class="app-datetime-picker">\n <div class="modal-body">\n <div class="mobile-datetime-picker-options">\n \n </div>\n <bs-datepicker-inline\n [bsConfig]="bsDatepickerConfig"\n [datesDisabled]="excludedDatesToDisable"\n bsDatepicker\n [bsValue]="changedValue"\n (bsValueChange)="onDateUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'">\n </bs-datepicker-inline>\n <wm-timepicker\n [value]="changedValue"\n [min]="minTime"\n [max]="maxTime"\n (change)="onTimeUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"></wm-timepicker>\n <span class="text-primary date-picker-value">\n {{getDateLabel()}}\n </span>\n </div>\n <div class="modal-footer">\n <button\n class="btn btn-secondary
|
|
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 '
|
|
27047
27048
|
} ]
|
|
27048
27049
|
} ];
|
|
27049
27050
|
DateTimePickerComponent.ctorParameters = function() {
|
|
@@ -27126,8 +27127,8 @@
|
|
|
27126
27127
|
}
|
|
27127
27128
|
return arr;
|
|
27128
27129
|
};
|
|
27129
|
-
TimePickerComponent.prototype.set = function(
|
|
27130
|
-
var index =
|
|
27130
|
+
TimePickerComponent.prototype.set = function(_f, unit) {
|
|
27131
|
+
var index = _f.index, value = _f.value;
|
|
27131
27132
|
if (unit === "HOUR") {
|
|
27132
27133
|
this.value = moment(this.value).hour(parseInt(value)).toDate();
|
|
27133
27134
|
} else if (unit === "MINUTE") {
|
|
@@ -27405,14 +27406,18 @@
|
|
|
27405
27406
|
var newDay = newDate.getDate().toString();
|
|
27406
27407
|
_.filter($("span:contains(" + newDay + ")").not(".is-other-month"), (function(obj) {
|
|
27407
27408
|
if ($(obj).text() === newDay) {
|
|
27409
|
+
if ($(obj).hasClass("selected")) {
|
|
27410
|
+
$(obj).parent().attr("aria-selected", "true");
|
|
27411
|
+
}
|
|
27408
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");
|
|
27409
27415
|
$(obj).focus();
|
|
27410
27416
|
_this.activeDate = newDate;
|
|
27411
27417
|
}
|
|
27412
27418
|
}));
|
|
27413
27419
|
if (newDate.getMonth() === (new Date).getMonth() && newDate.getFullYear() === (new Date).getFullYear()) {
|
|
27414
27420
|
_this.hightlightToday();
|
|
27415
|
-
$("span:contains(" + (new Date).getDate().toString() + ")").not(".is-other-month").parent().attr("aria-selected", "true");
|
|
27416
27421
|
}
|
|
27417
27422
|
}));
|
|
27418
27423
|
};
|
|
@@ -27454,6 +27459,9 @@
|
|
|
27454
27459
|
if (event.originalEvent) {
|
|
27455
27460
|
_this.setFocusForDate(-1);
|
|
27456
27461
|
}
|
|
27462
|
+
setTimeout((function() {
|
|
27463
|
+
$(".bs-datepicker-head .previous").focus();
|
|
27464
|
+
}));
|
|
27457
27465
|
}));
|
|
27458
27466
|
datePickerHead.find(".next").click((function(event) {
|
|
27459
27467
|
_this.next = _this.getMonth(_this.activeDate, 2);
|
|
@@ -27462,6 +27470,9 @@
|
|
|
27462
27470
|
if (event.originalEvent) {
|
|
27463
27471
|
_this.setFocusForDate(1);
|
|
27464
27472
|
}
|
|
27473
|
+
setTimeout((function() {
|
|
27474
|
+
$(".bs-datepicker-head .next").focus();
|
|
27475
|
+
}));
|
|
27465
27476
|
}));
|
|
27466
27477
|
datePickerHead.find(".current").click((function(event) {
|
|
27467
27478
|
if (event.originalEvent) {
|
|
@@ -27476,6 +27487,19 @@
|
|
|
27476
27487
|
}));
|
|
27477
27488
|
datePickerHead.find(".next").attr("aria-label", "Next Month, " + this.next.fullMonth + " " + this.next.date.getFullYear());
|
|
27478
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
|
+
}));
|
|
27479
27503
|
};
|
|
27480
27504
|
BaseDateTimeComponent.prototype.setFocusForMonthOrDay = function() {
|
|
27481
27505
|
var activeMonthOrYear = $(".bs-datepicker-head .current").first().text();
|
|
@@ -27611,8 +27635,6 @@
|
|
|
27611
27635
|
BaseDateTimeComponent.prototype.loadMonths = function() {
|
|
27612
27636
|
var _this = this;
|
|
27613
27637
|
setTimeout((function() {
|
|
27614
|
-
var datePickerBody = $(".bs-datepicker-body");
|
|
27615
|
-
datePickerBody.find("table.months span").attr("tabindex", "0");
|
|
27616
27638
|
_this.addKeyBoardEventsForMonths();
|
|
27617
27639
|
_this.addDatepickerMouseEvents();
|
|
27618
27640
|
}));
|
|
@@ -27655,8 +27677,6 @@
|
|
|
27655
27677
|
BaseDateTimeComponent.prototype.loadYears = function() {
|
|
27656
27678
|
var _this = this;
|
|
27657
27679
|
setTimeout((function() {
|
|
27658
|
-
var datePickerBody = $(".bs-datepicker-body");
|
|
27659
|
-
datePickerBody.find("table.years span").attr("tabindex", "0");
|
|
27660
27680
|
_this.addKeyBoardEventsForYears();
|
|
27661
27681
|
_this.addDatepickerMouseEvents();
|
|
27662
27682
|
}));
|
|
@@ -27673,6 +27693,8 @@
|
|
|
27673
27693
|
}
|
|
27674
27694
|
}
|
|
27675
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");
|
|
27676
27698
|
$(".bs-datepicker-body table.months span:contains(" + newMonth + ")").focus();
|
|
27677
27699
|
_this.activeDate = newDate;
|
|
27678
27700
|
}));
|
|
@@ -27721,6 +27743,8 @@
|
|
|
27721
27743
|
}
|
|
27722
27744
|
}
|
|
27723
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");
|
|
27724
27748
|
$(".bs-datepicker-body table.years span:contains(" + newYear + ")").focus();
|
|
27725
27749
|
_this.activeDate = newDate;
|
|
27726
27750
|
}));
|
|
@@ -27887,11 +27911,6 @@
|
|
|
27887
27911
|
children[i].classList.remove("add-opacity");
|
|
27888
27912
|
}
|
|
27889
27913
|
displayInputElem.classList.remove("remove-opacity");
|
|
27890
|
-
var allDateTimeElements = this.nativeElement.getElementsByTagName("*");
|
|
27891
|
-
for (var i = 0; i < allDateTimeElements.length; i++) {
|
|
27892
|
-
allDateTimeElements[i].setAttribute("tabindex", this.tabindex);
|
|
27893
|
-
}
|
|
27894
|
-
displayInputElem.removeAttribute("tabindex");
|
|
27895
27914
|
}
|
|
27896
27915
|
};
|
|
27897
27916
|
BaseDateTimeComponent.prototype.onDateTimeInputFocus = function(skipFocus) {
|
|
@@ -27908,11 +27927,6 @@
|
|
|
27908
27927
|
children[i].classList.add("add-opacity");
|
|
27909
27928
|
}
|
|
27910
27929
|
displayInputElem.classList.add("remove-opacity");
|
|
27911
|
-
var allDateTimeElements = this.nativeElement.getElementsByTagName("*");
|
|
27912
|
-
for (var i = 0; i < allDateTimeElements.length; i++) {
|
|
27913
|
-
allDateTimeElements[i].setAttribute("tabindex", "-1");
|
|
27914
|
-
}
|
|
27915
|
-
displayInputElem.setAttribute("tabindex", this.tabindex);
|
|
27916
27930
|
return;
|
|
27917
27931
|
}
|
|
27918
27932
|
if (displayInputElem && this._triggeredByUser) {
|
|
@@ -27995,7 +28009,10 @@
|
|
|
27995
28009
|
this.isReadOnly = this.dataentrymode != "undefined" && !this.isDataEntryModeEnabledOnInput(this.dataentrymode);
|
|
27996
28010
|
var mobileInput = this.getMobileInput();
|
|
27997
28011
|
if (mobileInput) {
|
|
27998
|
-
|
|
28012
|
+
setTimeout((function() {
|
|
28013
|
+
mobileInput.style.width = "100%";
|
|
28014
|
+
mobileInput.style.height = "100%";
|
|
28015
|
+
}));
|
|
27999
28016
|
}
|
|
28000
28017
|
};
|
|
28001
28018
|
BaseDateTimeComponent.prototype.ngOnDestroy = function() {
|
|
@@ -28258,7 +28275,7 @@
|
|
|
28258
28275
|
if (this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
28259
28276
|
event.stopPropagation();
|
|
28260
28277
|
var action = this.keyEventPlugin.constructor.getEventFullKey(event);
|
|
28261
|
-
if (action === "enter"
|
|
28278
|
+
if (action === "enter") {
|
|
28262
28279
|
var newVal = core$1.getDateObj(event.target.value, {
|
|
28263
28280
|
pattern: this.datepattern
|
|
28264
28281
|
});
|
|
@@ -28300,7 +28317,7 @@
|
|
|
28300
28317
|
type: core.Component,
|
|
28301
28318
|
args: [ {
|
|
28302
28319
|
selector: "[wmDate]",
|
|
28303
|
-
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
|
|
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',
|
|
28304
28321
|
providers: [ base.provideAs(DateComponent, forms.NG_VALUE_ACCESSOR, true), base.provideAs(DateComponent, forms.NG_VALIDATORS, true), base.provideAsWidgetRef(DateComponent) ]
|
|
28305
28322
|
} ]
|
|
28306
28323
|
} ];
|
|
@@ -28752,7 +28769,7 @@
|
|
|
28752
28769
|
type: core.Component,
|
|
28753
28770
|
args: [ {
|
|
28754
28771
|
selector: "[wmDateTime]",
|
|
28755
|
-
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',
|
|
28756
28773
|
providers: [ base.provideAs(DatetimeComponent, forms.NG_VALUE_ACCESSOR, true), base.provideAs(DatetimeComponent, forms.NG_VALIDATORS, true), base.provideAsWidgetRef(DatetimeComponent), {
|
|
28757
28774
|
provide: timepicker.TimepickerConfig,
|
|
28758
28775
|
deps: [ core$1.AbstractI18nService ],
|
|
@@ -35724,6 +35741,9 @@
|
|
|
35724
35741
|
return _this.hidePopover();
|
|
35725
35742
|
};
|
|
35726
35743
|
}
|
|
35744
|
+
setTimeout((function() {
|
|
35745
|
+
_this.anchorRef.nativeElement.removeAttribute("aria-describedby");
|
|
35746
|
+
}));
|
|
35727
35747
|
var deRegister = this.eventManager.addEventListener(popoverContainer, "keydown.esc", (function() {
|
|
35728
35748
|
_this.isOpen = false;
|
|
35729
35749
|
_this.setFocusToPopoverLink();
|
|
@@ -35731,8 +35751,6 @@
|
|
|
35731
35751
|
}));
|
|
35732
35752
|
var popoverStartBtn = popoverContainer.querySelector(".popover-start");
|
|
35733
35753
|
var popoverEndBtn = popoverContainer.querySelector(".popover-end");
|
|
35734
|
-
popoverStartBtn.setAttribute("aria-hidden", "true");
|
|
35735
|
-
popoverEndBtn.setAttribute("aria-hidden", "true");
|
|
35736
35754
|
popoverStartBtn.onkeydown = function(event) {
|
|
35737
35755
|
var action = _this.keyEventPlugin.constructor.getEventFullKey(event);
|
|
35738
35756
|
if (action === "shift.tab") {
|
|
@@ -35756,7 +35774,6 @@
|
|
|
35756
35774
|
return _this.close();
|
|
35757
35775
|
};
|
|
35758
35776
|
}
|
|
35759
|
-
core.setAttr(popoverContainer, "tabindex", 0);
|
|
35760
35777
|
setTimeout((function() {
|
|
35761
35778
|
return popoverStartBtn.focus();
|
|
35762
35779
|
}), 50);
|
|
@@ -36432,16 +36449,24 @@
|
|
|
36432
36449
|
_this.dialogService = inj.get(core.AbstractDialogService);
|
|
36433
36450
|
_this.bsModal = inj.get(modal.BsModalService);
|
|
36434
36451
|
var router$1 = inj.get(router.Router);
|
|
36435
|
-
var subscriptions = [ _this.bsModal.onShown.subscribe((function() {
|
|
36452
|
+
var subscriptions = [ _this.bsModal.onShown.subscribe((function(_a) {
|
|
36453
|
+
var id = _a.id;
|
|
36436
36454
|
var ref = _this.dialogService.getLastOpenedDialog();
|
|
36437
|
-
if (ref === _this) {
|
|
36455
|
+
if (ref === _this && !_this.dialogId) {
|
|
36438
36456
|
invokeOpenedCallback(ref);
|
|
36457
|
+
_this.dialogId = id;
|
|
36439
36458
|
}
|
|
36440
36459
|
})), _this.bsModal.onShow.subscribe((function() {
|
|
36441
36460
|
focusTrapObj.activeElement = document.activeElement;
|
|
36442
36461
|
})), _this.bsModal.onHidden.subscribe((function(closeReason) {
|
|
36443
|
-
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
|
+
}
|
|
36444
36468
|
if (ref === _this) {
|
|
36469
|
+
_this.dialogId = null;
|
|
36445
36470
|
_this.dialogService.removeFromOpenedDialogs(ref);
|
|
36446
36471
|
_this.dialogService.removeFromClosedDialogs(ref);
|
|
36447
36472
|
invokeClosedCallback(ref);
|
|
@@ -36480,7 +36505,7 @@
|
|
|
36480
36505
|
Object.assign(this.context, initState);
|
|
36481
36506
|
this.modalOptions.ariaLabelledBy = this.titleId;
|
|
36482
36507
|
this.dialogRef = this.bsModal.show(this.getTemplateRef(), this.modalOptions);
|
|
36483
|
-
if (this.dialogService.getOpenedDialogs().length === 1 && core.isMobileApp()) {
|
|
36508
|
+
if (this.dialogService.getOpenedDialogs().length === 1 && (core.isMobile() || core.isMobileApp())) {
|
|
36484
36509
|
var parentSelector = $("body > app-root")[0];
|
|
36485
36510
|
parentSelector.setAttribute("aria-hidden", "true");
|
|
36486
36511
|
}
|
|
@@ -42315,11 +42340,31 @@
|
|
|
42315
42340
|
$index: _this.dn.currentPage
|
|
42316
42341
|
});
|
|
42317
42342
|
_this.goToPage();
|
|
42343
|
+
if (_this.navigation === "Basic") {
|
|
42344
|
+
_this._setAriaForBasicNavigation();
|
|
42345
|
+
}
|
|
42318
42346
|
}
|
|
42319
42347
|
}), base.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME);
|
|
42320
42348
|
base.styler(_this.nativeElement, _this);
|
|
42321
42349
|
return _this;
|
|
42322
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
|
+
};
|
|
42323
42368
|
PaginationComponent.prototype.setResult = function(result) {
|
|
42324
42369
|
this.result = result;
|
|
42325
42370
|
this.resultEmitter.emit(this.result);
|
|
@@ -42436,9 +42481,7 @@
|
|
|
42436
42481
|
this.resetPageNavigation();
|
|
42437
42482
|
}
|
|
42438
42483
|
if (this.navigation === "Basic") {
|
|
42439
|
-
|
|
42440
|
-
item.setAttribute("href", "javascript:void(0);");
|
|
42441
|
-
}));
|
|
42484
|
+
this._setAriaForBasicNavigation();
|
|
42442
42485
|
}
|
|
42443
42486
|
} else {
|
|
42444
42487
|
if (newVal && !_.isString(newVal)) {
|
|
@@ -42715,7 +42758,7 @@
|
|
|
42715
42758
|
type: core.Component,
|
|
42716
42759
|
args: [ {
|
|
42717
42760
|
selector: "[wmPagination]",
|
|
42718
|
-
template: '\n<ul class="pagination advanced {{navigationClass}}" *ngIf="navcontrols === \'Classic\'">\n <li [ngClass]="{\'disabled\':isDisableFirst}">\n <a [title]="appLocale.LABEL_FIRST" name="first" href="javascript:void(0);"
|
|
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',
|
|
42719
42762
|
providers: [ base.provideAsWidgetRef(PaginationComponent) ]
|
|
42720
42763
|
} ]
|
|
42721
42764
|
} ];
|
|
@@ -44654,9 +44697,9 @@
|
|
|
44654
44697
|
}
|
|
44655
44698
|
}
|
|
44656
44699
|
};
|
|
44657
|
-
ListComponent.prototype.onUpdate = function(evt, ui) {
|
|
44700
|
+
ListComponent.prototype.onUpdate = function(evt, ui, presentIndex) {
|
|
44658
44701
|
var data = this.fieldDefs;
|
|
44659
|
-
var newIndex = ui.item.index();
|
|
44702
|
+
var newIndex = ui === undefined ? presentIndex : ui.item.index();
|
|
44660
44703
|
var oldIndex = this.$ulEle.data("oldIndex");
|
|
44661
44704
|
var minIndex = _.min([ newIndex, oldIndex ]);
|
|
44662
44705
|
var maxIndex = _.max([ newIndex, oldIndex ]);
|
|
@@ -44748,7 +44791,7 @@
|
|
|
44748
44791
|
return this.datasource.execute(operation, options);
|
|
44749
44792
|
};
|
|
44750
44793
|
ListComponent.prototype.handleKeyDown = function($event, action) {
|
|
44751
|
-
var
|
|
44794
|
+
var _d, _e;
|
|
44752
44795
|
$event.stopPropagation();
|
|
44753
44796
|
if ($event.keyCode !== 13 && $event.keyCode !== 9 && !(($event.target.classList.contains("form-control") || $event.target.classList.contains("note-editable")) && $event.keyCode === 32)) {
|
|
44754
44797
|
$event.preventDefault();
|
|
@@ -44790,27 +44833,21 @@
|
|
|
44790
44833
|
}
|
|
44791
44834
|
if (action === "focusPrev") {
|
|
44792
44835
|
if (this.isListElementMovable) {
|
|
44793
|
-
var prev_1;
|
|
44794
44836
|
presentIndex = presentIndex <= 0 ? 0 : presentIndex;
|
|
44795
|
-
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44796
44837
|
if (presentIndex === 0) {
|
|
44797
|
-
prev_1 = this.listItems.last;
|
|
44798
44838
|
return;
|
|
44799
44839
|
}
|
|
44800
|
-
this.
|
|
44801
|
-
|
|
44802
|
-
|
|
44803
|
-
|
|
44804
|
-
|
|
44805
|
-
|
|
44806
|
-
|
|
44807
|
-
|
|
44808
|
-
|
|
44809
|
-
|
|
44810
|
-
|
|
44811
|
-
}
|
|
44812
|
-
prev_1 = $liItem;
|
|
44813
|
-
}));
|
|
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 ";
|
|
44814
44851
|
} else {
|
|
44815
44852
|
presentIndex = presentIndex <= 0 ? 0 : presentIndex - 1;
|
|
44816
44853
|
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
@@ -44820,27 +44857,21 @@
|
|
|
44820
44857
|
}
|
|
44821
44858
|
} else if (action === "focusNext") {
|
|
44822
44859
|
if (this.isListElementMovable) {
|
|
44823
|
-
var prev_2;
|
|
44824
44860
|
presentIndex = presentIndex < listItems.length - 1 ? presentIndex : listItems.length - 1;
|
|
44825
|
-
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44826
44861
|
if (presentIndex === this.listItems.length - 1) {
|
|
44827
|
-
prev_2 = this.listItems.first;
|
|
44828
44862
|
return;
|
|
44829
44863
|
}
|
|
44830
|
-
this.
|
|
44831
|
-
|
|
44832
|
-
|
|
44833
|
-
|
|
44834
|
-
|
|
44835
|
-
|
|
44836
|
-
|
|
44837
|
-
|
|
44838
|
-
|
|
44839
|
-
|
|
44840
|
-
|
|
44841
|
-
}
|
|
44842
|
-
prev_2 = $liItem;
|
|
44843
|
-
}));
|
|
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 ";
|
|
44844
44875
|
} else {
|
|
44845
44876
|
presentIndex = presentIndex < listItems.length - 1 ? presentIndex + 1 : listItems.length - 1;
|
|
44846
44877
|
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
@@ -44862,11 +44893,12 @@
|
|
|
44862
44893
|
this.isListElementMovable = !this.isListElementMovable;
|
|
44863
44894
|
this.onItemClick($event, this.getListItemByIndex(presentIndex));
|
|
44864
44895
|
this.currentIndex = presentIndex + 1;
|
|
44865
|
-
var name = this.getListItemByIndex(presentIndex).item.name;
|
|
44866
44896
|
if (this.isListElementMovable) {
|
|
44867
|
-
this.ariaText =
|
|
44897
|
+
this.ariaText = "Item " + this.currentIndex + " grabbed, current position ";
|
|
44898
|
+
this.$ulEle.data("oldIndex", presentIndex);
|
|
44868
44899
|
} else {
|
|
44869
|
-
this.ariaText =
|
|
44900
|
+
this.ariaText = "Item " + this.currentIndex + " dropped, final position ";
|
|
44901
|
+
this.onUpdate($event, undefined, presentIndex);
|
|
44870
44902
|
}
|
|
44871
44903
|
}
|
|
44872
44904
|
};
|
|
@@ -44911,10 +44943,12 @@
|
|
|
44911
44943
|
this.dataNavigator.widget.maxResults = nv;
|
|
44912
44944
|
this.dataNavigator.maxResults = nv;
|
|
44913
44945
|
} else if (key === "enablereorder") {
|
|
44914
|
-
if (nv) {
|
|
44946
|
+
if (nv && this.$ulEle) {
|
|
44947
|
+
this.$ulEle.attr("aria-describedby", this.titleId);
|
|
44915
44948
|
this.configureDnD();
|
|
44916
44949
|
this.$ulEle.sortable("enable");
|
|
44917
44950
|
} else if (this.$ulEle && !nv) {
|
|
44951
|
+
this.$ulEle.removeAttr("aria-describedby");
|
|
44918
44952
|
this.$ulEle.sortable("disable");
|
|
44919
44953
|
}
|
|
44920
44954
|
} else {
|
|
@@ -45068,9 +45102,18 @@
|
|
|
45068
45102
|
_super.prototype.ngAfterViewInit.call(_this);
|
|
45069
45103
|
_this.setUpCUDHandlers();
|
|
45070
45104
|
_this.selectedItemWidgets = _this.multiselect ? [] : {};
|
|
45105
|
+
var ele = $(_this.nativeElement).find(".app-livelist-container");
|
|
45071
45106
|
if (_this.enablereorder && !_this.groupby) {
|
|
45107
|
+
if (ele) {
|
|
45108
|
+
ele.attr("aria-describedby", _this.titleId);
|
|
45109
|
+
}
|
|
45072
45110
|
_this.configureDnD();
|
|
45073
45111
|
}
|
|
45112
|
+
if (!_this.enablereorder) {
|
|
45113
|
+
if (ele) {
|
|
45114
|
+
ele.removeAttr("aria-describedby");
|
|
45115
|
+
}
|
|
45116
|
+
}
|
|
45074
45117
|
if (_this.groupby && _this.collapsible) {
|
|
45075
45118
|
_this.handleHeaderClick = base.handleHeaderClick;
|
|
45076
45119
|
_this.toggleAllHeaders = base.toggleAllHeaders.bind(undefined, _this);
|
|
@@ -45080,6 +45123,16 @@
|
|
|
45080
45123
|
this.setupHandlers();
|
|
45081
45124
|
var $ul = this.nativeElement.querySelector("ul.app-livelist-container");
|
|
45082
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
|
+
}
|
|
45083
45136
|
if (core.isMobileApp() && $ul.querySelector(".app-list-item-action-panel")) {
|
|
45084
45137
|
this._listAnimator = new ListAnimator(this);
|
|
45085
45138
|
}
|
|
@@ -45104,7 +45157,7 @@
|
|
|
45104
45157
|
type: core$1.Component,
|
|
45105
45158
|
args: [ {
|
|
45106
45159
|
selector: "div[wmList]",
|
|
45107
|
-
template: '<div class="panel-heading" *ngIf="title || subheading || iconclass">\n <h3 class="panel-title">\n <div class="pull-left">\n <i class="app-icon panel-icon {{iconclass}}" aria-hidden="true" [hidden]="!iconclass"></i>\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n </h3>\n</div>\n\n<
|
|
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',
|
|
45108
45161
|
providers: [ base.provideAsWidgetRef(ListComponent) ]
|
|
45109
45162
|
} ]
|
|
45110
45163
|
} ];
|
|
@@ -46474,6 +46527,11 @@
|
|
|
46474
46527
|
return;
|
|
46475
46528
|
}
|
|
46476
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
|
+
}
|
|
46477
46535
|
if (this.gridOptions.isNavTypeScrollOrOndemand()) {
|
|
46478
46536
|
_a = __read(this.paginationService.updateFieldsOnPagination(this, newValue), 2),
|
|
46479
46537
|
this._gridData = _a[0], this.currentPage = _a[1];
|
|
@@ -58402,40 +58460,36 @@
|
|
|
58402
58460
|
var TabsAnimator = function(_super) {
|
|
58403
58461
|
__extends(TabsAnimator, _super);
|
|
58404
58462
|
function TabsAnimator(tabs) {
|
|
58405
|
-
var e_1, _a;
|
|
58406
58463
|
var _this = _super.call(this) || this;
|
|
58407
58464
|
_this.tabs = tabs;
|
|
58408
58465
|
_this._$el = $(_this.tabs.getNativeElement()).find(">.tab-content");
|
|
58409
|
-
var childEls = _this._$el.find(">[wmTabPane]");
|
|
58410
|
-
_this._noOfTabs = childEls.length;
|
|
58411
|
-
var maxWidth = _this._noOfTabs * 100 + "%";
|
|
58412
|
-
core.addClass(_this.tabs.getNativeElement(), "has-transition");
|
|
58413
|
-
core.setCSSFromObj(_this._$el[0], {
|
|
58414
|
-
maxWidth: maxWidth,
|
|
58415
|
-
width: maxWidth
|
|
58416
|
-
});
|
|
58417
|
-
var width = 100 / _this._noOfTabs + "%";
|
|
58418
|
-
try {
|
|
58419
|
-
for (var _b = __values(Array.from(childEls)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
58420
|
-
var child = _c.value;
|
|
58421
|
-
core.setCSS(child, "width", width);
|
|
58422
|
-
}
|
|
58423
|
-
} catch (e_1_1) {
|
|
58424
|
-
e_1 = {
|
|
58425
|
-
error: e_1_1
|
|
58426
|
-
};
|
|
58427
|
-
} finally {
|
|
58428
|
-
try {
|
|
58429
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
58430
|
-
} finally {
|
|
58431
|
-
if (e_1) throw e_1.error;
|
|
58432
|
-
}
|
|
58433
|
-
}
|
|
58434
58466
|
_this.init(_this._$el);
|
|
58435
58467
|
return _this;
|
|
58436
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
|
+
};
|
|
58437
58491
|
TabsAnimator.prototype.bounds = function() {
|
|
58438
|
-
var
|
|
58492
|
+
var _a = this.calibrate(), activeTabIndex = _a.activeTabIndex, noOfTabs = _a.noOfTabs, panes = _a.panes, w = $(panes[0]).width(), centerVal = -1 * activeTabIndex * w;
|
|
58439
58493
|
this.clearContentFocus();
|
|
58440
58494
|
return {
|
|
58441
58495
|
strict: false,
|
|
@@ -58462,8 +58516,18 @@
|
|
|
58462
58516
|
}
|
|
58463
58517
|
};
|
|
58464
58518
|
TabsAnimator.prototype.transitionTabIntoView = function() {
|
|
58465
|
-
var
|
|
58466
|
-
|
|
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)");
|
|
58467
58531
|
};
|
|
58468
58532
|
TabsAnimator.prototype.onUpper = function($event) {
|
|
58469
58533
|
this.tabs.prev($event);
|
|
@@ -58589,6 +58653,7 @@
|
|
|
58589
58653
|
};
|
|
58590
58654
|
TabPaneComponent.prototype.onPropertyChange = function(key, nv, ov) {
|
|
58591
58655
|
var _this = this;
|
|
58656
|
+
var _a;
|
|
58592
58657
|
if (key === "content") {
|
|
58593
58658
|
if (this.isActive) {
|
|
58594
58659
|
setTimeout((function() {
|
|
@@ -58599,6 +58664,10 @@
|
|
|
58599
58664
|
this.nativeElement.hidden = !nv;
|
|
58600
58665
|
if (this._isFirstLoad) {
|
|
58601
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();
|
|
58602
58671
|
}
|
|
58603
58672
|
this._isFirstLoad = false;
|
|
58604
58673
|
} else {
|
|
@@ -67554,10 +67623,10 @@
|
|
|
67554
67623
|
}));
|
|
67555
67624
|
|
|
67556
67625
|
(function(global, factory) {
|
|
67557
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@angular/core"), require("@wm/core"), require("@wm/components/base"), require("@wm/components/page"), require("@wm/mobile/core"), require("@angular/common")) : typeof define === "function" && define.amd ? define("@wm/mobile/components/page", [ "exports", "@angular/core", "@wm/core", "@wm/components/base", "@wm/components/page", "@wm/mobile/core", "@angular/common" ], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
|
|
67626
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@angular/core"), require("@wm/core"), require("@wm/components/base"), require("ngx-bootstrap/modal"), require("@wm/components/page"), require("@wm/mobile/core"), require("@angular/common")) : typeof define === "function" && define.amd ? define("@wm/mobile/components/page", [ "exports", "@angular/core", "@wm/core", "@wm/components/base", "ngx-bootstrap/modal", "@wm/components/page", "@wm/mobile/core", "@angular/common" ], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
|
|
67558
67627
|
factory((global.wm = global.wm || {}, global.wm.mobile = global.wm.mobile || {},
|
|
67559
|
-
global.wm.mobile.components = global.wm.mobile.components || {}, global.wm.mobile.components.page = {}), global.ng.core, global.wm.core, global.wm.components.base, global.wm.components.page, global.wm.mobile.core, global.ng.common));
|
|
67560
|
-
})(this, (function(exports, core$1, core, base, page, core$2, common) {
|
|
67628
|
+
global.wm.mobile.components = global.wm.mobile.components || {}, global.wm.mobile.components.page = {}), global.ng.core, global.wm.core, global.wm.components.base, global.modal, global.wm.components.page, global.wm.mobile.core, global.ng.common));
|
|
67629
|
+
})(this, (function(exports, core$1, core, base, modal, page, core$2, common) {
|
|
67561
67630
|
"use strict";
|
|
67562
67631
|
var PageContentLoaderComponent = function() {
|
|
67563
67632
|
function PageContentLoaderComponent(el) {
|
|
@@ -67579,18 +67648,30 @@
|
|
|
67579
67648
|
} ];
|
|
67580
67649
|
};
|
|
67581
67650
|
var MobilePageDirective = function() {
|
|
67582
|
-
function MobilePageDirective(app, elRef, deviceService, page, navigationService) {
|
|
67651
|
+
function MobilePageDirective(app, elRef, modalService, deviceService, page, navigationService) {
|
|
67583
67652
|
var _this = this;
|
|
67653
|
+
this.modalService = modalService;
|
|
67584
67654
|
this.deviceService = deviceService;
|
|
67585
67655
|
this.page = page;
|
|
67586
67656
|
this.navigationService = navigationService;
|
|
67657
|
+
this.subscriptions = [];
|
|
67587
67658
|
core.addClass(elRef.nativeElement, "mobile-app-page");
|
|
67588
67659
|
this._$ele = $(elRef.nativeElement);
|
|
67589
67660
|
page.subscribe("wmMobileTabbar:ready", (function() {
|
|
67590
67661
|
return _this._$ele.addClass("has-tabbar");
|
|
67591
67662
|
}));
|
|
67663
|
+
var modalsOpened = [];
|
|
67664
|
+
this.subscriptions = [ modalService.onShown.subscribe((function(_a) {
|
|
67665
|
+
var id = _a.id;
|
|
67666
|
+
id && modalsOpened.push(id);
|
|
67667
|
+
})), modalService.onHidden.subscribe((function(_a) {
|
|
67668
|
+
var id = _a.id;
|
|
67669
|
+
id && _.remove(modalsOpened, id);
|
|
67670
|
+
})) ];
|
|
67592
67671
|
this._backBtnListenerDestroyer = deviceService.onBackButtonTap((function($event) {
|
|
67593
|
-
if (
|
|
67672
|
+
if (modalsOpened.length > 0) {
|
|
67673
|
+
modalService.hide(modalsOpened.pop());
|
|
67674
|
+
} else if (app.landingPageName === app.activePageName) {
|
|
67594
67675
|
window.navigator["app"].exitApp();
|
|
67595
67676
|
} else {
|
|
67596
67677
|
_this.navigationService.goToPrevious();
|
|
@@ -67599,6 +67680,9 @@
|
|
|
67599
67680
|
}));
|
|
67600
67681
|
}
|
|
67601
67682
|
MobilePageDirective.prototype.ngOnDestroy = function() {
|
|
67683
|
+
this.subscriptions.map((function(s) {
|
|
67684
|
+
return s.unsubscribe();
|
|
67685
|
+
}));
|
|
67602
67686
|
this._backBtnListenerDestroyer();
|
|
67603
67687
|
};
|
|
67604
67688
|
return MobilePageDirective;
|
|
@@ -67614,6 +67698,8 @@
|
|
|
67614
67698
|
type: core.App
|
|
67615
67699
|
}, {
|
|
67616
67700
|
type: core$1.ElementRef
|
|
67701
|
+
}, {
|
|
67702
|
+
type: modal.BsModalService
|
|
67617
67703
|
}, {
|
|
67618
67704
|
type: core$2.DeviceService
|
|
67619
67705
|
}, {
|
|
@@ -71496,11 +71582,11 @@
|
|
|
71496
71582
|
}
|
|
71497
71583
|
};
|
|
71498
71584
|
NotificationActionManager.prototype.notifyViaDialog = function(variable, options) {
|
|
71499
|
-
var commonPageDialogId = "Common" + _.capitalize(variable.operation) + "Dialog",
|
|
71585
|
+
var commonPageDialogId = "Common" + _.capitalize(variable.operation) + "Dialog", dialogId = commonPageDialogId;
|
|
71500
71586
|
var closeCallBackFn = function() {
|
|
71501
71587
|
return initiateCallback("onOk", variable, options.data);
|
|
71502
71588
|
};
|
|
71503
|
-
exports.dialogService.open(dialogId,
|
|
71589
|
+
exports.dialogService.open(dialogId, undefined, {
|
|
71504
71590
|
notification: {
|
|
71505
71591
|
title: options.title || variable.dataBinding.title,
|
|
71506
71592
|
text: options.message || variable.dataBinding.text,
|
|
@@ -71508,11 +71594,11 @@
|
|
|
71508
71594
|
cancelButtonText: options.cancelButtonText || variable.dataBinding.cancelButtonText || "CANCEL",
|
|
71509
71595
|
alerttype: options.alerttype || variable.dataBinding.alerttype || "information",
|
|
71510
71596
|
onOk: function() {
|
|
71511
|
-
exports.dialogService.close(dialogId,
|
|
71597
|
+
exports.dialogService.close(dialogId, undefined, closeCallBackFn);
|
|
71512
71598
|
},
|
|
71513
71599
|
onCancel: function() {
|
|
71514
71600
|
initiateCallback("onCancel", variable, options.data);
|
|
71515
|
-
exports.dialogService.close(dialogId,
|
|
71601
|
+
exports.dialogService.close(dialogId, undefined);
|
|
71516
71602
|
},
|
|
71517
71603
|
onClose: function() {
|
|
71518
71604
|
initiateCallback("onClose", variable, options.data);
|
|
@@ -72947,6 +73033,13 @@
|
|
|
72947
73033
|
type: core.AbstractHttpService
|
|
72948
73034
|
} ];
|
|
72949
73035
|
};
|
|
73036
|
+
var Formatter = function() {
|
|
73037
|
+
function Formatter() {}
|
|
73038
|
+
Formatter.prototype.format = function(value, format) {
|
|
73039
|
+
return exports.appManager.getPipe("date").transform(value, format);
|
|
73040
|
+
};
|
|
73041
|
+
return Formatter;
|
|
73042
|
+
}();
|
|
72950
73043
|
var VariablesService = function() {
|
|
72951
73044
|
function VariablesService(httpService, metadataService, navigationService, routerService, toasterService, oAuthService, securityService, dialogService) {
|
|
72952
73045
|
this.httpService = httpService;
|
|
@@ -73053,6 +73146,7 @@
|
|
|
73053
73146
|
if (this.isVariableSeperated(variablesJson, variableName)) {
|
|
73054
73147
|
this.processBinding(varInstance, scope, "dataBinding", this.getBindSourceTarget(varInstance));
|
|
73055
73148
|
varInstance.httpService = this.httpService;
|
|
73149
|
+
varInstance.dateFormatter = new Formatter;
|
|
73056
73150
|
varInstance.subscribe("afterInvoke", (function() {
|
|
73057
73151
|
return core.$invokeWatchers(true);
|
|
73058
73152
|
}));
|
|
@@ -73142,6 +73236,7 @@
|
|
|
73142
73236
|
exports.DB_CONSTANTS = DB_CONSTANTS;
|
|
73143
73237
|
exports.DeviceVariableManager = DeviceVariableManager;
|
|
73144
73238
|
exports.DeviceVariableService = DeviceVariableService;
|
|
73239
|
+
exports.Formatter = Formatter;
|
|
73145
73240
|
exports.MetadataService = MetadataService;
|
|
73146
73241
|
exports.SWAGGER_CONSTANTS = SWAGGER_CONSTANTS;
|
|
73147
73242
|
exports.VARIABLE_CONSTANTS = VARIABLE_CONSTANTS;
|