@wavemaker/app-runtime-wm-build 11.4.0-next.140429 → 11.4.0-next.140433
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 +29613 -9989
- app-runtime-wm-build/wmapp/scripts/wm-libs.min.js +1252 -428
- app-runtime-wm-build/wmapp/scripts/wm-loader.js +398 -373
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +10 -10
- app-runtime-wm-build/wmapp/styles/css/wm-style.css +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-libs.js +28557 -8933
- app-runtime-wm-build/wmmobile/scripts/wm-libs.min.js +1253 -429
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +420 -378
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +11 -11
- app-runtime-wm-build/wmmobile/styles/css/wm-style.css +1 -1
|
@@ -11229,7 +11229,7 @@
|
|
|
11229
11229
|
if (openedDialogs.indexOf(ref) !== -1) {
|
|
11230
11230
|
openedDialogs.splice(openedDialogs.indexOf(ref), 1);
|
|
11231
11231
|
}
|
|
11232
|
-
if (openedDialogs.length === 0 && core$1.isMobileApp()) {
|
|
11232
|
+
if (openedDialogs.length === 0 && (core$1.isMobile() || core$1.isMobileApp())) {
|
|
11233
11233
|
var parentSelector = $("body > app-root")[0];
|
|
11234
11234
|
parentSelector.removeAttribute("aria-hidden");
|
|
11235
11235
|
}
|
|
@@ -13440,21 +13440,19 @@
|
|
|
13440
13440
|
__proto__: null,
|
|
13441
13441
|
default: search_build
|
|
13442
13442
|
});
|
|
13443
|
-
var tagName$1o = "
|
|
13443
|
+
var tagName$1o = "ul";
|
|
13444
13444
|
transpiler.register("wm-tree", (function() {
|
|
13445
13445
|
return {
|
|
13446
13446
|
pre: function(attrs) {
|
|
13447
|
-
return "<" + tagName$1o +
|
|
13447
|
+
return "<" + tagName$1o + ' wmTree class="ztree" ' + transpiler.getAttrMarkup(attrs) + ">";
|
|
13448
13448
|
},
|
|
13449
13449
|
post: function() {
|
|
13450
13450
|
return "</" + tagName$1o + ">";
|
|
13451
13451
|
}
|
|
13452
13452
|
};
|
|
13453
13453
|
}));
|
|
13454
|
-
var tree_build =
|
|
13455
|
-
|
|
13456
|
-
__proto__: null,
|
|
13457
|
-
default: tree_build
|
|
13454
|
+
var tree_build = Object.freeze({
|
|
13455
|
+
__proto__: null
|
|
13458
13456
|
});
|
|
13459
13457
|
var tagName$1n = "div";
|
|
13460
13458
|
transpiler.register("wm-card", (function() {
|
|
@@ -16435,7 +16433,7 @@
|
|
|
16435
16433
|
exports.tileBuild = tile_build$1;
|
|
16436
16434
|
exports.timeBuild = time_build$1;
|
|
16437
16435
|
exports.topNavBuild = topNav_build$1;
|
|
16438
|
-
exports.treeBuild = tree_build
|
|
16436
|
+
exports.treeBuild = tree_build;
|
|
16439
16437
|
exports.videoBuild = video_build$1;
|
|
16440
16438
|
exports.wizardBuild = wizard_build$1;
|
|
16441
16439
|
exports.wizardStepBuild = wizardStep_build$1;
|
|
@@ -22781,10 +22779,10 @@
|
|
|
22781
22779
|
}));
|
|
22782
22780
|
|
|
22783
22781
|
(function(global, factory) {
|
|
22784
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@angular/core"), require("@angular/common"), require("@wm/components/base")
|
|
22782
|
+
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
22783
|
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
|
|
22784
|
+
global.wm.components.basic = global.wm.components.basic || {}, global.wm.components.basic.tree = {}), global.ng.core, global.ng.common, global.wm.components.base));
|
|
22785
|
+
})(this, (function(exports, core, common, base) {
|
|
22788
22786
|
"use strict";
|
|
22789
22787
|
/*! *****************************************************************************
|
|
22790
22788
|
Copyright (c) Microsoft Corporation.
|
|
@@ -23161,352 +23159,333 @@
|
|
|
23161
23159
|
value: 0
|
|
23162
23160
|
}, base.PROP_NUMBER) ], [ "treeicons", base.PROP_STRING ] ]));
|
|
23163
23161
|
};
|
|
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
23162
|
var WIDGET_INFO = {
|
|
23196
23163
|
widgetType: "wm-tree",
|
|
23197
23164
|
hostClass: "app-tree"
|
|
23198
23165
|
};
|
|
23199
|
-
var
|
|
23200
|
-
|
|
23201
|
-
|
|
23166
|
+
var defaultTreeIconClass = "plus-minus";
|
|
23167
|
+
var TreeComponent = function(_super) {
|
|
23168
|
+
__extends(TreeComponent, _super);
|
|
23169
|
+
function TreeComponent(inj) {
|
|
23202
23170
|
var _this = _super.call(this, inj, WIDGET_INFO) || this;
|
|
23203
|
-
_this.
|
|
23204
|
-
|
|
23205
|
-
|
|
23206
|
-
|
|
23207
|
-
|
|
23171
|
+
_this.setting = {
|
|
23172
|
+
data: {
|
|
23173
|
+
simpleData: {
|
|
23174
|
+
enable: true
|
|
23175
|
+
}
|
|
23176
|
+
},
|
|
23177
|
+
view: {
|
|
23178
|
+
dblClickExpand: false,
|
|
23179
|
+
fontCss: {
|
|
23180
|
+
"font-awesome": true
|
|
23181
|
+
},
|
|
23182
|
+
switchIcon: {}
|
|
23183
|
+
},
|
|
23184
|
+
check: {},
|
|
23185
|
+
callback: {}
|
|
23186
|
+
};
|
|
23208
23187
|
base.styler(_this.nativeElement, _this, base.APPLY_STYLES_TYPE.CONTAINER);
|
|
23209
|
-
_this.bindEvents();
|
|
23210
23188
|
return _this;
|
|
23211
23189
|
}
|
|
23212
|
-
|
|
23190
|
+
TreeComponent.prototype.onPropertyChange = function(key, nv, ov) {
|
|
23213
23191
|
switch (key) {
|
|
23214
23192
|
case "dataset":
|
|
23215
23193
|
this.nodes = this.getNodes(nv);
|
|
23216
|
-
this.
|
|
23194
|
+
if (this.level > 0) {
|
|
23195
|
+
this.expandTree(this.level, this.nodes, 0);
|
|
23196
|
+
}
|
|
23217
23197
|
this.renderTree();
|
|
23218
23198
|
break;
|
|
23219
23199
|
|
|
23220
|
-
case "
|
|
23221
|
-
|
|
23222
|
-
|
|
23223
|
-
|
|
23224
|
-
this.renderTree();
|
|
23200
|
+
case "levels":
|
|
23201
|
+
if (nv > 0) {
|
|
23202
|
+
this.level = nv;
|
|
23203
|
+
}
|
|
23225
23204
|
break;
|
|
23226
23205
|
|
|
23227
23206
|
case "treeicons":
|
|
23228
|
-
this.
|
|
23207
|
+
this.treeicon = nv;
|
|
23229
23208
|
break;
|
|
23230
23209
|
|
|
23231
|
-
case "
|
|
23232
|
-
this.
|
|
23210
|
+
case "nodelabel":
|
|
23211
|
+
this.nodelabel = nv;
|
|
23212
|
+
break;
|
|
23213
|
+
|
|
23214
|
+
case "icon":
|
|
23215
|
+
this.nodeicon = nv;
|
|
23216
|
+
|
|
23217
|
+
case "orderby":
|
|
23218
|
+
this.renderTree();
|
|
23219
|
+
break;
|
|
23220
|
+
|
|
23221
|
+
case "class":
|
|
23222
|
+
this.treeClass = nv;
|
|
23233
23223
|
break;
|
|
23234
23224
|
|
|
23235
23225
|
default:
|
|
23236
23226
|
_super.prototype.onPropertyChange.call(this, key, nv, ov);
|
|
23227
|
+
break;
|
|
23237
23228
|
}
|
|
23238
23229
|
};
|
|
23239
|
-
|
|
23230
|
+
TreeComponent.prototype.expandTree = function(level, node, childLevel) {
|
|
23240
23231
|
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);
|
|
23232
|
+
node.map((function(childNode) {
|
|
23233
|
+
if ("children" in childNode && !("open" in childNode) && childLevel < level) {
|
|
23234
|
+
childNode["open"] = true;
|
|
23235
|
+
_this.expandTree(level, childNode.children, childLevel + 1);
|
|
23294
23236
|
} else {
|
|
23295
|
-
|
|
23296
|
-
|
|
23297
|
-
}
|
|
23298
|
-
$li.addClass("leaf-node");
|
|
23237
|
+
childLevel = 0;
|
|
23238
|
+
return;
|
|
23299
23239
|
}
|
|
23300
23240
|
}));
|
|
23301
23241
|
};
|
|
23302
|
-
|
|
23242
|
+
TreeComponent.prototype.setTreeTemplate = function(value) {
|
|
23243
|
+
if (value === "Classic") {
|
|
23244
|
+
this.setting.check["enable"] = false;
|
|
23245
|
+
} else if (value === "Checkbox") {
|
|
23246
|
+
this.setting.check["enable"] = true;
|
|
23247
|
+
this.setting.check["chkStyle"] = "checkbox";
|
|
23248
|
+
} else if (value === "Radio") {
|
|
23249
|
+
this.setting.check["enable"] = true;
|
|
23250
|
+
this.setting.check["chkStyle"] = "radio";
|
|
23251
|
+
this.setting.check["radioType"] = "all";
|
|
23252
|
+
}
|
|
23253
|
+
};
|
|
23254
|
+
TreeComponent.prototype.getNodesFromString = function(value) {
|
|
23303
23255
|
return value.split(",").map((function(item) {
|
|
23304
23256
|
return {
|
|
23305
|
-
|
|
23257
|
+
name: item && item.trim()
|
|
23306
23258
|
};
|
|
23307
23259
|
}));
|
|
23308
23260
|
};
|
|
23309
|
-
|
|
23261
|
+
TreeComponent.prototype.getNodes = function(newVal) {
|
|
23310
23262
|
var nodes;
|
|
23311
|
-
if (_.
|
|
23263
|
+
if (_.isArray(newVal)) {
|
|
23264
|
+
nodes = base.getOrderedDataset(newVal, this.orderby);
|
|
23265
|
+
} else if (_.isObject(newVal)) {
|
|
23266
|
+
nodes = [ newVal ];
|
|
23267
|
+
} else if (_.isString(newVal) && !_.isEmpty(newVal)) {
|
|
23312
23268
|
newVal = newVal.trim();
|
|
23313
23269
|
if (newVal) {
|
|
23314
23270
|
nodes = this.getNodesFromString(newVal);
|
|
23315
23271
|
}
|
|
23316
|
-
} else if (_.isArray(newVal)) {
|
|
23317
|
-
newVal = base.getOrderedDataset(newVal, this.orderby);
|
|
23318
|
-
nodes = newVal;
|
|
23319
|
-
} else if (_.isObject(newVal)) {
|
|
23320
|
-
nodes = [ newVal ];
|
|
23321
23272
|
}
|
|
23322
23273
|
return nodes;
|
|
23323
23274
|
};
|
|
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
|
-
}
|
|
23275
|
+
TreeComponent.prototype.setNodeclasses = function(treeId, treeNode) {
|
|
23276
|
+
return treeNode.icon ? {
|
|
23277
|
+
add: [ "" + treeNode.icon ]
|
|
23278
|
+
} : "";
|
|
23353
23279
|
};
|
|
23354
|
-
|
|
23280
|
+
TreeComponent.prototype.setNodeData = function(nodes, depth, level, parentNode, type) {
|
|
23355
23281
|
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
|
-
|
|
23282
|
+
if (depth === 0) {
|
|
23283
|
+
nodes.map((function(node) {
|
|
23284
|
+
if (node.children) {
|
|
23285
|
+
_this.setNodeData(node.children, depth, level, parentNode, type);
|
|
23286
|
+
}
|
|
23287
|
+
if (node.icon && _this.nodelabel == "icon") {
|
|
23288
|
+
node[type] = node.icon;
|
|
23289
|
+
} else if (node.name && _this.nodelabel == "name") {
|
|
23290
|
+
node[type] = node.name;
|
|
23291
|
+
} else {
|
|
23292
|
+
return;
|
|
23293
|
+
}
|
|
23294
|
+
}));
|
|
23295
|
+
} else {
|
|
23296
|
+
nodes.map((function(node) {
|
|
23297
|
+
if (node.children && level > 1) {
|
|
23298
|
+
if (depth === level) {
|
|
23299
|
+
parentNode = node;
|
|
23300
|
+
}
|
|
23301
|
+
_this.setNodeData(node.children, depth, level - 1, parentNode, type);
|
|
23302
|
+
}
|
|
23303
|
+
if (level === 1 && (type === "name" ? _this.nodelabel.includes("label") || _this.nodelabel.includes("name") : _this.nodeicon.includes("label") || _this.nodeicon.includes("name"))) {
|
|
23304
|
+
parentNode[type] = node.name || node.label;
|
|
23305
|
+
return;
|
|
23306
|
+
} else if (level === 1 && node.icon !== undefined && (type === "name" ? _this.nodelabel.includes("icon") : _this.nodeicon.includes("icon"))) {
|
|
23307
|
+
parentNode[type] = node.icon;
|
|
23308
|
+
return;
|
|
23309
|
+
} else {
|
|
23310
|
+
return;
|
|
23311
|
+
}
|
|
23379
23312
|
}));
|
|
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
23313
|
}
|
|
23389
23314
|
};
|
|
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
|
-
}
|
|
23315
|
+
TreeComponent.prototype.changeTreeIcons = function(nv) {
|
|
23316
|
+
var eleClose = $('ul[name="' + this.name + '"] li span.button.switch');
|
|
23317
|
+
$(eleClose).map((function(idx, ele) {
|
|
23318
|
+
$(ele).addClass(nv);
|
|
23319
|
+
$(ele).on("click", (function(e) {
|
|
23320
|
+
setTimeout((function() {
|
|
23321
|
+
$(ele).addClass(nv);
|
|
23322
|
+
}), 0);
|
|
23323
|
+
}));
|
|
23324
|
+
}));
|
|
23325
|
+
};
|
|
23326
|
+
TreeComponent.prototype.getPath = function(treeNode, path) {
|
|
23327
|
+
if (treeNode.getParentNode() === null) {
|
|
23328
|
+
path = "/" + treeNode.name + path;
|
|
23421
23329
|
} else {
|
|
23422
|
-
this.
|
|
23330
|
+
path = this.getPath(treeNode.getParentNode(), path) + "/" + treeNode.name;
|
|
23423
23331
|
}
|
|
23424
|
-
|
|
23425
|
-
|
|
23332
|
+
return path;
|
|
23333
|
+
};
|
|
23334
|
+
TreeComponent.prototype.onClick = function(event, treeId, treeNode, clickFlag) {
|
|
23335
|
+
var treeObj = $.fn.zTree.getZTreeObj("" + this.name);
|
|
23336
|
+
if (this.nodeclick === "expand") {
|
|
23337
|
+
treeObj.expandNode(treeNode, treeNode.open ? false : true, false, true);
|
|
23338
|
+
this.changeTreeIcons(this.treeicon || defaultTreeIconClass);
|
|
23339
|
+
var path = this.getPath(treeNode, "");
|
|
23340
|
+
var eventParams = {
|
|
23341
|
+
$event: event,
|
|
23342
|
+
$item: treeNode,
|
|
23343
|
+
$path: path
|
|
23344
|
+
};
|
|
23345
|
+
this.invokeEventCallback("select", eventParams);
|
|
23346
|
+
if (treeNode.open) {} else {
|
|
23347
|
+
this.invokeEventCallback("collapse", eventParams);
|
|
23348
|
+
}
|
|
23426
23349
|
}
|
|
23427
|
-
this.invokeEventCallback("select", {
|
|
23428
|
-
$event: evt,
|
|
23429
|
-
$item: data,
|
|
23430
|
-
$path: path
|
|
23431
|
-
});
|
|
23432
|
-
core.$appDigest();
|
|
23433
23350
|
};
|
|
23434
|
-
|
|
23351
|
+
TreeComponent.prototype.onExpand = function(event, treeId, treeNode) {
|
|
23352
|
+
var self = this;
|
|
23353
|
+
treeNode.children ? treeNode.children.map((function(el) {
|
|
23354
|
+
if (el.isParent) {
|
|
23355
|
+
var ele_1 = $("#" + el.tId + "_switch");
|
|
23356
|
+
$(ele_1).addClass(self.treeicon || defaultTreeIconClass);
|
|
23357
|
+
$(ele_1).on("click", (function(e) {
|
|
23358
|
+
setTimeout((function() {
|
|
23359
|
+
$(ele_1).addClass(self.treeicon || defaultTreeIconClass);
|
|
23360
|
+
}), 0);
|
|
23361
|
+
}));
|
|
23362
|
+
}
|
|
23363
|
+
})) : "";
|
|
23364
|
+
};
|
|
23365
|
+
TreeComponent.prototype.modifyObjects = function(array) {
|
|
23435
23366
|
var _this = this;
|
|
23436
|
-
|
|
23437
|
-
|
|
23438
|
-
|
|
23439
|
-
|
|
23440
|
-
_this.selecteditem = {};
|
|
23441
|
-
_this.selectNode(evt, li);
|
|
23367
|
+
array.forEach((function(obj) {
|
|
23368
|
+
if (obj.label !== undefined) {
|
|
23369
|
+
obj.name = obj.label;
|
|
23370
|
+
delete obj.label;
|
|
23442
23371
|
}
|
|
23443
|
-
if (
|
|
23444
|
-
_this.
|
|
23372
|
+
if (obj.children !== undefined) {
|
|
23373
|
+
_this.modifyObjects(obj.children);
|
|
23445
23374
|
}
|
|
23446
23375
|
}));
|
|
23376
|
+
return array;
|
|
23447
23377
|
};
|
|
23448
|
-
|
|
23449
|
-
|
|
23378
|
+
TreeComponent.prototype.setNodeChildren = function(nodes, depth, level, parentNode) {
|
|
23379
|
+
if (depth <= 0) {
|
|
23380
|
+
return nodes;
|
|
23381
|
+
}
|
|
23382
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
23383
|
+
var node = nodes[i];
|
|
23384
|
+
if (depth === level) {
|
|
23385
|
+
parentNode = nodes[i];
|
|
23386
|
+
}
|
|
23387
|
+
if (node.children && node.children.length > 0) {
|
|
23388
|
+
if (level === 1) {
|
|
23389
|
+
parentNode.children = node.children.map((function(child) {
|
|
23390
|
+
return {
|
|
23391
|
+
name: child.name,
|
|
23392
|
+
children: child === null || child === void 0 ? void 0 : child.children
|
|
23393
|
+
};
|
|
23394
|
+
}));
|
|
23395
|
+
return;
|
|
23396
|
+
} else {
|
|
23397
|
+
this.setNodeChildren(node.children, depth, level - 1, parentNode);
|
|
23398
|
+
}
|
|
23399
|
+
}
|
|
23400
|
+
}
|
|
23401
|
+
return nodes;
|
|
23450
23402
|
};
|
|
23451
|
-
|
|
23452
|
-
|
|
23403
|
+
TreeComponent.prototype.countDepth = function(str) {
|
|
23404
|
+
var e_1, _a;
|
|
23405
|
+
var regex = /\[.*?\]/g;
|
|
23406
|
+
var matches = str.match(regex);
|
|
23407
|
+
var count = 1;
|
|
23408
|
+
if (matches === null) return count;
|
|
23409
|
+
try {
|
|
23410
|
+
for (var matches_1 = __values(matches), matches_1_1 = matches_1.next(); !matches_1_1.done; matches_1_1 = matches_1.next()) {
|
|
23411
|
+
var match = matches_1_1.value;
|
|
23412
|
+
count++;
|
|
23413
|
+
}
|
|
23414
|
+
} catch (e_1_1) {
|
|
23415
|
+
e_1 = {
|
|
23416
|
+
error: e_1_1
|
|
23417
|
+
};
|
|
23418
|
+
} finally {
|
|
23419
|
+
try {
|
|
23420
|
+
if (matches_1_1 && !matches_1_1.done && (_a = matches_1.return)) _a.call(matches_1);
|
|
23421
|
+
} finally {
|
|
23422
|
+
if (e_1) throw e_1.error;
|
|
23423
|
+
}
|
|
23424
|
+
}
|
|
23425
|
+
return count;
|
|
23453
23426
|
};
|
|
23454
|
-
|
|
23455
|
-
this.
|
|
23456
|
-
|
|
23427
|
+
TreeComponent.prototype.renderTree = function() {
|
|
23428
|
+
if (this.nodes) {
|
|
23429
|
+
this.nativeElement.setAttribute("id", this.name);
|
|
23430
|
+
this.nodes = this.modifyObjects(this.nodes);
|
|
23431
|
+
this.setTreeTemplate(this.treeClass);
|
|
23432
|
+
if (this.nodelabel) {
|
|
23433
|
+
var depth = 0;
|
|
23434
|
+
if (this.nodelabel.includes("children")) {
|
|
23435
|
+
depth = this.countDepth(this.nodelabel);
|
|
23436
|
+
}
|
|
23437
|
+
this.setNodeData(this.nodes, depth, depth, null, "name");
|
|
23438
|
+
}
|
|
23439
|
+
if (this.nodeicon) {
|
|
23440
|
+
var depth = 0;
|
|
23441
|
+
if (this.nodeicon.includes("children")) {
|
|
23442
|
+
depth = this.countDepth(this.nodeicon);
|
|
23443
|
+
}
|
|
23444
|
+
this.setNodeData(this.nodes, depth, depth, null, "icon");
|
|
23445
|
+
}
|
|
23446
|
+
if (this.nodechildren) {
|
|
23447
|
+
var depth = this.countDepth(this.nodechildren);
|
|
23448
|
+
if (depth > 1) {
|
|
23449
|
+
this.nodes = this.setNodeChildren(this.nodes, depth, depth, null);
|
|
23450
|
+
}
|
|
23451
|
+
}
|
|
23452
|
+
}
|
|
23453
|
+
this.setting.view["nodeClasses"] = this.setNodeclasses;
|
|
23454
|
+
this.setting.callback["onClick"] = this.onClick.bind(this);
|
|
23455
|
+
this.setting.callback["onExpand"] = this.onExpand.bind(this);
|
|
23456
|
+
var zTree = $.fn.zTree.init($('ul[name="' + this.name + '"]'), this.setting, this.nodes);
|
|
23457
|
+
$.fn.zTreeKeyboardNavigation(zTree, $('ul[name="' + this.name + '"]'), null, this.treeicon || defaultTreeIconClass);
|
|
23457
23458
|
};
|
|
23458
|
-
|
|
23459
|
+
TreeComponent.prototype.ngAfterViewInit = function() {
|
|
23460
|
+
var _this = this;
|
|
23461
|
+
setTimeout((function() {
|
|
23462
|
+
_this.changeTreeIcons(_this.treeicon || defaultTreeIconClass);
|
|
23463
|
+
}), 200);
|
|
23464
|
+
};
|
|
23465
|
+
return TreeComponent;
|
|
23459
23466
|
}(base.StylableComponent);
|
|
23460
|
-
|
|
23461
|
-
|
|
23462
|
-
type: core
|
|
23467
|
+
TreeComponent.initializeProps = registerProps();
|
|
23468
|
+
TreeComponent.decorators = [ {
|
|
23469
|
+
type: core.Component,
|
|
23463
23470
|
args: [ {
|
|
23464
|
-
selector: "
|
|
23465
|
-
|
|
23471
|
+
selector: "ul[wmTree]",
|
|
23472
|
+
template: '<ul #wmTree class="ztree" id="ztree"></ul> ',
|
|
23473
|
+
providers: [ base.provideAsWidgetRef(TreeComponent) ],
|
|
23474
|
+
encapsulation: core.ViewEncapsulation.None
|
|
23466
23475
|
} ]
|
|
23467
23476
|
} ];
|
|
23468
|
-
|
|
23477
|
+
TreeComponent.ctorParameters = function() {
|
|
23469
23478
|
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
|
-
} ]
|
|
23479
|
+
type: core.Injector
|
|
23501
23480
|
} ];
|
|
23502
23481
|
};
|
|
23503
|
-
var components = [
|
|
23482
|
+
var components = [ TreeComponent ];
|
|
23504
23483
|
var TreeModule = function() {
|
|
23505
23484
|
function TreeModule() {}
|
|
23506
23485
|
return TreeModule;
|
|
23507
23486
|
}();
|
|
23508
23487
|
TreeModule.decorators = [ {
|
|
23509
|
-
type: core
|
|
23488
|
+
type: core.NgModule,
|
|
23510
23489
|
args: [ {
|
|
23511
23490
|
imports: [ common.CommonModule, base.WmComponentsModule ],
|
|
23512
23491
|
declarations: __spreadArray([], __read(components)),
|
|
@@ -23514,7 +23493,7 @@
|
|
|
23514
23493
|
entryComponents: []
|
|
23515
23494
|
} ]
|
|
23516
23495
|
} ];
|
|
23517
|
-
exports.
|
|
23496
|
+
exports.TreeComponent = TreeComponent;
|
|
23518
23497
|
exports.TreeModule = TreeModule;
|
|
23519
23498
|
exports["\u0275a"] = registerProps;
|
|
23520
23499
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -26924,22 +26903,24 @@
|
|
|
26924
26903
|
configurable: true
|
|
26925
26904
|
});
|
|
26926
26905
|
DateTimePickerComponent.prototype.validateSelectedDate = function() {
|
|
26927
|
-
var _a, _b, _c, _d, _e
|
|
26906
|
+
var _a, _b, _c, _d, _e;
|
|
26928
26907
|
if (!this.changedValue) {
|
|
26929
26908
|
return true;
|
|
26930
26909
|
}
|
|
26931
26910
|
var cd = moment(this.changedValue);
|
|
26932
|
-
|
|
26911
|
+
var minDate = (_a = this._bsDatepickerConfig) === null || _a === void 0 ? void 0 : _a.minDate;
|
|
26912
|
+
var maxDate = (_b = this._bsDatepickerConfig) === null || _b === void 0 ? void 0 : _b.maxDate;
|
|
26913
|
+
if (minDate && (this.mode === "DATE" && moment(minDate).startOf("day").toDate() > this.changedValue || this.mode !== "DATE" && minDate > this.changedValue)) {
|
|
26933
26914
|
return false;
|
|
26934
26915
|
}
|
|
26935
|
-
if (
|
|
26916
|
+
if (maxDate && (this.mode === "DATE" && moment(maxDate).endOf("day").toDate() < this.changedValue || this.mode !== "DATE" && maxDate < this.changedValue)) {
|
|
26936
26917
|
return false;
|
|
26937
26918
|
}
|
|
26938
|
-
if (((
|
|
26919
|
+
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
26920
|
return false;
|
|
26940
26921
|
}
|
|
26941
26922
|
var cdSt = cd.startOf("day").toDate().getTime();
|
|
26942
|
-
if ((
|
|
26923
|
+
if ((_e = this.excludedDatesToDisable) === null || _e === void 0 ? void 0 : _e.find((function(d) {
|
|
26943
26924
|
return d.getTime() === cdSt;
|
|
26944
26925
|
}))) {
|
|
26945
26926
|
return false;
|
|
@@ -26988,6 +26969,9 @@
|
|
|
26988
26969
|
newVal.setMilliseconds(oldVal.getMilliseconds());
|
|
26989
26970
|
}
|
|
26990
26971
|
this.changedValue = newVal;
|
|
26972
|
+
if (this.mode === "DATE" && oldVal !== newVal && this.validateSelectedDate()) {
|
|
26973
|
+
this.onOkClick();
|
|
26974
|
+
}
|
|
26991
26975
|
};
|
|
26992
26976
|
DateTimePickerComponent.prototype.onTimeUpdate = function(newVal) {
|
|
26993
26977
|
this.changedValue = newVal;
|
|
@@ -27009,6 +26993,10 @@
|
|
|
27009
26993
|
this.triggerChange();
|
|
27010
26994
|
this.hideModal();
|
|
27011
26995
|
};
|
|
26996
|
+
DateTimePickerComponent.prototype.setToday = function() {
|
|
26997
|
+
var today = moment().startOf("day").toDate();
|
|
26998
|
+
this.onDateUpdate(today);
|
|
26999
|
+
};
|
|
27012
27000
|
DateTimePickerComponent.prototype.reset = function() {
|
|
27013
27001
|
this.changedValue = this._value;
|
|
27014
27002
|
};
|
|
@@ -27043,7 +27031,7 @@
|
|
|
27043
27031
|
type: core.Component,
|
|
27044
27032
|
args: [ {
|
|
27045
27033
|
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
|
|
27034
|
+
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
27035
|
} ]
|
|
27048
27036
|
} ];
|
|
27049
27037
|
DateTimePickerComponent.ctorParameters = function() {
|
|
@@ -27126,8 +27114,8 @@
|
|
|
27126
27114
|
}
|
|
27127
27115
|
return arr;
|
|
27128
27116
|
};
|
|
27129
|
-
TimePickerComponent.prototype.set = function(
|
|
27130
|
-
var index =
|
|
27117
|
+
TimePickerComponent.prototype.set = function(_f, unit) {
|
|
27118
|
+
var index = _f.index, value = _f.value;
|
|
27131
27119
|
if (unit === "HOUR") {
|
|
27132
27120
|
this.value = moment(this.value).hour(parseInt(value)).toDate();
|
|
27133
27121
|
} else if (unit === "MINUTE") {
|
|
@@ -36432,15 +36420,22 @@
|
|
|
36432
36420
|
_this.dialogService = inj.get(core.AbstractDialogService);
|
|
36433
36421
|
_this.bsModal = inj.get(modal.BsModalService);
|
|
36434
36422
|
var router$1 = inj.get(router.Router);
|
|
36435
|
-
var subscriptions = [ _this.bsModal.onShown.subscribe((function() {
|
|
36423
|
+
var subscriptions = [ _this.bsModal.onShown.subscribe((function(_a) {
|
|
36424
|
+
var id = _a.id;
|
|
36436
36425
|
var ref = _this.dialogService.getLastOpenedDialog();
|
|
36437
36426
|
if (ref === _this) {
|
|
36438
36427
|
invokeOpenedCallback(ref);
|
|
36428
|
+
_this.dialogId = id;
|
|
36439
36429
|
}
|
|
36440
36430
|
})), _this.bsModal.onShow.subscribe((function() {
|
|
36441
36431
|
focusTrapObj.activeElement = document.activeElement;
|
|
36442
36432
|
})), _this.bsModal.onHidden.subscribe((function(closeReason) {
|
|
36443
|
-
var ref =
|
|
36433
|
+
var ref = _this.dialogService.getDialogRefFromClosedDialogs();
|
|
36434
|
+
if (_this.dialogId && (closeReason === null || closeReason === void 0 ? void 0 : closeReason.id) === _this.dialogId) {
|
|
36435
|
+
ref = _this;
|
|
36436
|
+
} else if (closeReason === "esc" || closeReason === "backdrop-click") {
|
|
36437
|
+
ref = _this.dialogService.getLastOpenedDialog();
|
|
36438
|
+
}
|
|
36444
36439
|
if (ref === _this) {
|
|
36445
36440
|
_this.dialogService.removeFromOpenedDialogs(ref);
|
|
36446
36441
|
_this.dialogService.removeFromClosedDialogs(ref);
|
|
@@ -36480,7 +36475,7 @@
|
|
|
36480
36475
|
Object.assign(this.context, initState);
|
|
36481
36476
|
this.modalOptions.ariaLabelledBy = this.titleId;
|
|
36482
36477
|
this.dialogRef = this.bsModal.show(this.getTemplateRef(), this.modalOptions);
|
|
36483
|
-
if (this.dialogService.getOpenedDialogs().length === 1 && core.isMobileApp()) {
|
|
36478
|
+
if (this.dialogService.getOpenedDialogs().length === 1 && (core.isMobile() || core.isMobileApp())) {
|
|
36484
36479
|
var parentSelector = $("body > app-root")[0];
|
|
36485
36480
|
parentSelector.setAttribute("aria-hidden", "true");
|
|
36486
36481
|
}
|
|
@@ -42315,11 +42310,31 @@
|
|
|
42315
42310
|
$index: _this.dn.currentPage
|
|
42316
42311
|
});
|
|
42317
42312
|
_this.goToPage();
|
|
42313
|
+
if (_this.navigation === "Basic") {
|
|
42314
|
+
_this._setAriaForBasicNavigation();
|
|
42315
|
+
}
|
|
42318
42316
|
}
|
|
42319
42317
|
}), base.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME);
|
|
42320
42318
|
base.styler(_this.nativeElement, _this);
|
|
42321
42319
|
return _this;
|
|
42322
42320
|
}
|
|
42321
|
+
PaginationComponent.prototype._setAriaForBasicNavigation = function() {
|
|
42322
|
+
_.forEach(this.nativeElement.getElementsByTagName("a"), (function(item) {
|
|
42323
|
+
item.setAttribute("href", "javascript:void(0);");
|
|
42324
|
+
var childNode = item.querySelector("span");
|
|
42325
|
+
if ((childNode === null || childNode === void 0 ? void 0 : childNode.dataset.isacitvepage) === "true") {
|
|
42326
|
+
item.setAttribute("aria-current", "true");
|
|
42327
|
+
setTimeout((function() {
|
|
42328
|
+
return item.focus();
|
|
42329
|
+
}));
|
|
42330
|
+
}
|
|
42331
|
+
if ((childNode === null || childNode === void 0 ? void 0 : childNode.dataset.isdisabled) === "true") {
|
|
42332
|
+
item.setAttribute("aria-disabled", "true");
|
|
42333
|
+
} else {
|
|
42334
|
+
item.removeAttribute("aria-disabled");
|
|
42335
|
+
}
|
|
42336
|
+
}));
|
|
42337
|
+
};
|
|
42323
42338
|
PaginationComponent.prototype.setResult = function(result) {
|
|
42324
42339
|
this.result = result;
|
|
42325
42340
|
this.resultEmitter.emit(this.result);
|
|
@@ -42436,9 +42451,7 @@
|
|
|
42436
42451
|
this.resetPageNavigation();
|
|
42437
42452
|
}
|
|
42438
42453
|
if (this.navigation === "Basic") {
|
|
42439
|
-
|
|
42440
|
-
item.setAttribute("href", "javascript:void(0);");
|
|
42441
|
-
}));
|
|
42454
|
+
this._setAriaForBasicNavigation();
|
|
42442
42455
|
}
|
|
42443
42456
|
} else {
|
|
42444
42457
|
if (newVal && !_.isString(newVal)) {
|
|
@@ -42715,7 +42728,7 @@
|
|
|
42715
42728
|
type: core.Component,
|
|
42716
42729
|
args: [ {
|
|
42717
42730
|
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);"
|
|
42731
|
+
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
42732
|
providers: [ base.provideAsWidgetRef(PaginationComponent) ]
|
|
42720
42733
|
} ]
|
|
42721
42734
|
} ];
|
|
@@ -44748,7 +44761,7 @@
|
|
|
44748
44761
|
return this.datasource.execute(operation, options);
|
|
44749
44762
|
};
|
|
44750
44763
|
ListComponent.prototype.handleKeyDown = function($event, action) {
|
|
44751
|
-
var
|
|
44764
|
+
var _d, _e;
|
|
44752
44765
|
$event.stopPropagation();
|
|
44753
44766
|
if ($event.keyCode !== 13 && $event.keyCode !== 9 && !(($event.target.classList.contains("form-control") || $event.target.classList.contains("note-editable")) && $event.keyCode === 32)) {
|
|
44754
44767
|
$event.preventDefault();
|
|
@@ -44790,27 +44803,21 @@
|
|
|
44790
44803
|
}
|
|
44791
44804
|
if (action === "focusPrev") {
|
|
44792
44805
|
if (this.isListElementMovable) {
|
|
44793
|
-
var prev_1;
|
|
44794
44806
|
presentIndex = presentIndex <= 0 ? 0 : presentIndex;
|
|
44795
|
-
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44796
44807
|
if (presentIndex === 0) {
|
|
44797
|
-
prev_1 = this.listItems.last;
|
|
44798
44808
|
return;
|
|
44799
44809
|
}
|
|
44800
|
-
this.
|
|
44801
|
-
|
|
44802
|
-
|
|
44803
|
-
|
|
44804
|
-
|
|
44805
|
-
|
|
44806
|
-
|
|
44807
|
-
|
|
44808
|
-
|
|
44809
|
-
|
|
44810
|
-
|
|
44811
|
-
}
|
|
44812
|
-
prev_1 = $liItem;
|
|
44813
|
-
}));
|
|
44810
|
+
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44811
|
+
var prevElt = this.getListItemByIndex(presentIndex - 1);
|
|
44812
|
+
prevElt.nativeElement.before(this.lastSelectedItem.nativeElement);
|
|
44813
|
+
this.lastSelectedItem.nativeElement.focus();
|
|
44814
|
+
this.statePersistence.removeWidgetState(this, "selectedItem");
|
|
44815
|
+
var arr = this.listItems.toArray();
|
|
44816
|
+
_d = __read([ arr[presentIndex], arr[presentIndex - 1] ], 2), arr[presentIndex - 1] = _d[0],
|
|
44817
|
+
arr[presentIndex] = _d[1];
|
|
44818
|
+
this.listItems.reset(arr);
|
|
44819
|
+
this.currentIndex = presentIndex;
|
|
44820
|
+
this.ariaText = "selected ";
|
|
44814
44821
|
} else {
|
|
44815
44822
|
presentIndex = presentIndex <= 0 ? 0 : presentIndex - 1;
|
|
44816
44823
|
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
@@ -44820,27 +44827,21 @@
|
|
|
44820
44827
|
}
|
|
44821
44828
|
} else if (action === "focusNext") {
|
|
44822
44829
|
if (this.isListElementMovable) {
|
|
44823
|
-
var prev_2;
|
|
44824
44830
|
presentIndex = presentIndex < listItems.length - 1 ? presentIndex : listItems.length - 1;
|
|
44825
|
-
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44826
44831
|
if (presentIndex === this.listItems.length - 1) {
|
|
44827
|
-
prev_2 = this.listItems.first;
|
|
44828
44832
|
return;
|
|
44829
44833
|
}
|
|
44830
|
-
this.
|
|
44831
|
-
|
|
44832
|
-
|
|
44833
|
-
|
|
44834
|
-
|
|
44835
|
-
|
|
44836
|
-
|
|
44837
|
-
|
|
44838
|
-
|
|
44839
|
-
|
|
44840
|
-
|
|
44841
|
-
}
|
|
44842
|
-
prev_2 = $liItem;
|
|
44843
|
-
}));
|
|
44834
|
+
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
44835
|
+
var nextElt = this.getListItemByIndex(presentIndex + 1);
|
|
44836
|
+
nextElt.nativeElement.after(this.lastSelectedItem.nativeElement);
|
|
44837
|
+
this.lastSelectedItem.nativeElement.focus();
|
|
44838
|
+
this.statePersistence.removeWidgetState(this, "selectedItem");
|
|
44839
|
+
var arr = this.listItems.toArray();
|
|
44840
|
+
_e = __read([ arr[presentIndex + 1], arr[presentIndex] ], 2), arr[presentIndex] = _e[0],
|
|
44841
|
+
arr[presentIndex + 1] = _e[1];
|
|
44842
|
+
this.listItems.reset(arr);
|
|
44843
|
+
this.currentIndex = presentIndex + 2;
|
|
44844
|
+
this.ariaText = "selected ";
|
|
44844
44845
|
} else {
|
|
44845
44846
|
presentIndex = presentIndex < listItems.length - 1 ? presentIndex + 1 : listItems.length - 1;
|
|
44846
44847
|
this.lastSelectedItem = this.getListItemByIndex(presentIndex);
|
|
@@ -44862,11 +44863,10 @@
|
|
|
44862
44863
|
this.isListElementMovable = !this.isListElementMovable;
|
|
44863
44864
|
this.onItemClick($event, this.getListItemByIndex(presentIndex));
|
|
44864
44865
|
this.currentIndex = presentIndex + 1;
|
|
44865
|
-
var name = this.getListItemByIndex(presentIndex).item.name;
|
|
44866
44866
|
if (this.isListElementMovable) {
|
|
44867
|
-
this.ariaText =
|
|
44867
|
+
this.ariaText = "Item " + this.currentIndex + " grabbed, current position ";
|
|
44868
44868
|
} else {
|
|
44869
|
-
this.ariaText =
|
|
44869
|
+
this.ariaText = "Item " + this.currentIndex + " dropped, final position ";
|
|
44870
44870
|
}
|
|
44871
44871
|
}
|
|
44872
44872
|
};
|
|
@@ -45104,7 +45104,7 @@
|
|
|
45104
45104
|
type: core$1.Component,
|
|
45105
45105
|
args: [ {
|
|
45106
45106
|
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<
|
|
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<div class="app-datanavigator" [attr.aria-disabled]="dataNavigator.isDisablePrevious" aria-label="Page navigation" *ngIf="navigation === \'Inline\' && !noDataFound">\n <ul class="pager">\n <li class="previous" [ngClass]="{\'disabled\': (dataNavigator ? dataNavigator.isDisablePrevious : true)}">\n <a href="javascript:void(0);" (click)="dataNavigator.navigatePage(\'prev\', $event)"\n [attr.aria-disabled]="dataNavigator.isDisablePrevious">\n <i class="wi wi-chevron-left" aria-hidden="true"></i>\n <span class="sr-only">Go to Previous page {{dataNavigator.isDisablePrevious ? \', Disabled\' : \'\'}}</span>\n </a>\n </li>\n </ul>\n</div>\n<div *ngIf="navigation === \'Inline\' && !noDataFound" aria-live="polite" aria-atomic="true" class="sr-only"> {{\'Page \' + dataNavigator.dn.currentPage + \' of \' + dataNavigator.pageCount }}</div>\n\n<div>\n <div id={{titleId}} class="sr-only" *ngIf="enablereorder">\n Press space bar to toggle drag drop mode, use arrow keys to move selected elements.\n </div>\n\n <div aria-live="assertive" *ngIf="listItems && enablereorder && currentIndex" class="sr-only" >\n {{ariaText + currentIndex + \' of \' + listItems.length}}\n </div>\n</div>\n\n<ul [attr.tabindex]="tabindex" [attr.aria-describedby] = "titleId" class="app-livelist-container clearfix {{direction === \'horizontal\' ? \'app-horizontal-list\': \'\'}} {{listclass}}" role="list"\n (keydown.enter)="handleKeyDown($event, \'select\')"\n\n (keydown.space)="handleKeyDown($event, \'space\')"\n\n (keydown.arrowup)="handleKeyDown($event, \'focusPrev\')"\n (keydown.arrowdown)="handleKeyDown($event, \'focusNext\')"\n (keydown.arrowleft)="handleKeyDown($event, \'focusPrev\')"\n (keydown.arrowright)="handleKeyDown($event, \'focusNext\')"\n\n (keydown.shift.arrowup)="handleKeyDown($event, \'selectPrev\')"\n (keydown.shift.arrowdown)="handleKeyDown($event, \'selectNext\')"\n (keydown.shift.arrowleft)="handleKeyDown($event, \'selectPrev\')"\n (keydown.shift.arrowright)="handleKeyDown($event, \'selectNext\')"\n [hidden]="noDataFound && !variableInflight"\n>\n <ng-template [ngIf]="!groupby" [ngIfElse]="groupedListTemplate">\n <li *ngFor="let item of fieldDefs; index as $index; first as $first; last as $last;" class="app-list-item {{direction === \'horizontal\' ? \'\' : itemsPerRowClass}}" [ngClass]="listItemRef.itemClass"\n [wmListItem]="item"\n #listItemRef="listItemRef"\n [attr.tabindex]="tabindex"\n role="listitem">\n <ng-container [ngTemplateOutlet]="listTemplate" [ngTemplateOutletContext]="{item: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}"></ng-container>\n </li>\n </ng-template>\n <ng-container [ngTemplateOutlet]="listLeftActionTemplate"></ng-container>\n <ng-container [ngTemplateOutlet]="listRightActionTemplate"></ng-container>\n</ul>\n\n<div class="no-data-msg" *ngIf="noDataFound && !variableInflight" [textContent]="nodatamessage"></div>\n\n<div class="loading-data-msg" *ngIf="variableInflight && !pulltorefresh">\n <span>\n <i class="app-icon panel-icon fa-spin" aria-hidden="true" [ngClass]="loadingicon"></i>\n <span class="sr-only">Loading</span>\n <span class="loading-text" [textContent]="loadingdatamsg"></span>\n </span>\n</div>\n\n<div class="app-datanavigator" [attr.aria-disabled]="dataNavigator.isDisableNext" *ngIf="navigation === \'Inline\' && !noDataFound">\n <ul class="pager">\n <li class="next" [ngClass]="{\'disabled\': (dataNavigator ? dataNavigator.isDisableNext : true)}">\n <a href="javascript:void(0);" (click)="dataNavigator.navigatePage(\'next\', $event)"\n [attr.aria-disabled]="dataNavigator.isDisableNext">\n <i class="wi wi-chevron-right" aria-hidden="true"></i>\n <span class="sr-only">Go to Next page {{dataNavigator.isDisableNext ? \', Disabled\' : \'\'}}</span>\n </a>\n </li>\n </ul>\n</div>\n\n<div class="panel-footer" *ngIf="navigation !== \'None\'" [hidden]="!showNavigation || (onDemandLoad && dataNavigator.isDisableNext) || (dataNavigator.dataSize <= pagesize) || (!dataNavigator.dataSize && !dataNavigator.datasource?.pagination?.next)">\n <nav wmPagination\n navigationalign.bind="navigationalign"\n navigation.bind="navControls"\n showrecordcount.bind="showrecordcount"\n maxsize.bind="maxsize"\n boundarylinks.bind="boundarylinks"\n forceellipses.bind="forceellipses"\n directionlinks.bind="directionlinks"\n show.bind="!onDemandLoad"\n paginationchange.event="beforePaginationChange($event, $index)"\n ></nav>\n <a *ngIf="onDemandLoad" href="javascript:void(0);"\n (click)="dataNavigator.navigatePage(\'next\', $event)"\n class="app-button btn btn-block"\n [ngClass]="paginationclass"\n [textContent]="ondemandmessage"\n ></a>\n</div>\n\n\x3c!--This template will be displayed when groupby is specified--\x3e\n<ng-template #groupedListTemplate>\n <li *ngFor="let groupObj of groupedData" class="app-list-item-group clearfix">\n <ul [attr.tabindex]="tabindex" class="list-group item-group" [ngClass]="listclass">\n <li class="app-list-item-header list-item list-group-header" (click)="handleHeaderClick($event)" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4>{{groupObj.key}}\n <div class="header-action">\n <i class="app-icon wi action wi-chevron-up" *ngIf="collapsible"></i>\n <span *ngIf="showcount" class="label label-default">{{groupObj.data.length}}</span>\n </div>\n </h4>\n </li>\n <ul class="list-group clearfix {{direction === \'horizontal\' ? \'app-horizontal-list\': \'\'}}">\n <li *ngFor="let item of groupObj.data; index as $index; first as $first; last as $last;" [attr.tabindex]="tabindex"\n class="app-list-item group-list-item {{itemsPerRowClass}}"\n [ngClass]="listItemRef.itemClass"\n [wmListItem]="item" #listItemRef="listItemRef">\n <ng-container [ngTemplateOutlet]="listTemplate" [ngTemplateOutletContext]="{item: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}"></ng-container>\n </li>\n </ul>\n </ul>\n </li>\n</ng-template>\n',
|
|
45108
45108
|
providers: [ base.provideAsWidgetRef(ListComponent) ]
|
|
45109
45109
|
} ]
|
|
45110
45110
|
} ];
|
|
@@ -45724,6 +45724,7 @@
|
|
|
45724
45724
|
_this.rowDef = {};
|
|
45725
45725
|
_this.rowInstance = {};
|
|
45726
45726
|
_this.fullFieldDefs = [];
|
|
45727
|
+
_this.variableInflight = true;
|
|
45727
45728
|
_this.applyProps = new Map;
|
|
45728
45729
|
_this.redraw = _.debounce(_this._redraw, 150);
|
|
45729
45730
|
_this.debouncedHandleLoading = _.debounce(_this.handleLoading, 350);
|
|
@@ -46469,6 +46470,9 @@
|
|
|
46469
46470
|
set: function(newValue) {
|
|
46470
46471
|
var _a;
|
|
46471
46472
|
this.isDataLoading = false;
|
|
46473
|
+
if (this.variableInflight && _.isEmpty(newValue)) {
|
|
46474
|
+
return;
|
|
46475
|
+
}
|
|
46472
46476
|
this.variableInflight = false;
|
|
46473
46477
|
if (this.gridOptions.isNavTypeScrollOrOndemand()) {
|
|
46474
46478
|
_a = __read(this.paginationService.updateFieldsOnPagination(this, newValue), 2),
|
|
@@ -46922,6 +46926,9 @@
|
|
|
46922
46926
|
};
|
|
46923
46927
|
TableComponent.prototype.setGridData = function(serverData) {
|
|
46924
46928
|
var data = this.filternullrecords ? this.removeEmptyRecords(serverData) : serverData;
|
|
46929
|
+
if (_.get(this.datasource, "category") === "wm.Variable") {
|
|
46930
|
+
this.variableInflight = false;
|
|
46931
|
+
}
|
|
46925
46932
|
if (!this.variableInflight) {
|
|
46926
46933
|
if (data && data.length === 0) {
|
|
46927
46934
|
this.callDataGridMethod("setStatus", "nodata", this.nodatamessage);
|
|
@@ -47216,10 +47223,8 @@
|
|
|
47216
47223
|
this.variableInflight = false;
|
|
47217
47224
|
this.callDataGridMethod("setStatus", "nodata", this.nodatamessage);
|
|
47218
47225
|
}
|
|
47219
|
-
|
|
47220
|
-
|
|
47221
|
-
this.onDataSourceChange();
|
|
47222
|
-
}
|
|
47226
|
+
this.watchVariableDataSet(this.dataset);
|
|
47227
|
+
this.onDataSourceChange();
|
|
47223
47228
|
break;
|
|
47224
47229
|
|
|
47225
47230
|
case "dataset":
|
|
@@ -58397,40 +58402,36 @@
|
|
|
58397
58402
|
var TabsAnimator = function(_super) {
|
|
58398
58403
|
__extends(TabsAnimator, _super);
|
|
58399
58404
|
function TabsAnimator(tabs) {
|
|
58400
|
-
var e_1, _a;
|
|
58401
58405
|
var _this = _super.call(this) || this;
|
|
58402
58406
|
_this.tabs = tabs;
|
|
58403
58407
|
_this._$el = $(_this.tabs.getNativeElement()).find(">.tab-content");
|
|
58404
|
-
var childEls = _this._$el.find(">[wmTabPane]");
|
|
58405
|
-
_this._noOfTabs = childEls.length;
|
|
58406
|
-
var maxWidth = _this._noOfTabs * 100 + "%";
|
|
58407
|
-
core.addClass(_this.tabs.getNativeElement(), "has-transition");
|
|
58408
|
-
core.setCSSFromObj(_this._$el[0], {
|
|
58409
|
-
maxWidth: maxWidth,
|
|
58410
|
-
width: maxWidth
|
|
58411
|
-
});
|
|
58412
|
-
var width = 100 / _this._noOfTabs + "%";
|
|
58413
|
-
try {
|
|
58414
|
-
for (var _b = __values(Array.from(childEls)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
58415
|
-
var child = _c.value;
|
|
58416
|
-
core.setCSS(child, "width", width);
|
|
58417
|
-
}
|
|
58418
|
-
} catch (e_1_1) {
|
|
58419
|
-
e_1 = {
|
|
58420
|
-
error: e_1_1
|
|
58421
|
-
};
|
|
58422
|
-
} finally {
|
|
58423
|
-
try {
|
|
58424
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
58425
|
-
} finally {
|
|
58426
|
-
if (e_1) throw e_1.error;
|
|
58427
|
-
}
|
|
58428
|
-
}
|
|
58429
58408
|
_this.init(_this._$el);
|
|
58430
58409
|
return _this;
|
|
58431
58410
|
}
|
|
58411
|
+
TabsAnimator.prototype.calibrate = function() {
|
|
58412
|
+
var activeTabIndex = this.tabs.getActiveTabIndex();
|
|
58413
|
+
var panes = this._$el.find(">.tab-pane");
|
|
58414
|
+
var activeTabVisibleIndex = 0;
|
|
58415
|
+
var noOfVisiblePanes = 0;
|
|
58416
|
+
var visiblePanes = [];
|
|
58417
|
+
panes.each((function(i, p) {
|
|
58418
|
+
if (!$(p).prop("hidden")) {
|
|
58419
|
+
noOfVisiblePanes++;
|
|
58420
|
+
if (i === activeTabIndex) {
|
|
58421
|
+
activeTabVisibleIndex = noOfVisiblePanes - 1;
|
|
58422
|
+
}
|
|
58423
|
+
visiblePanes.push(p);
|
|
58424
|
+
}
|
|
58425
|
+
return true;
|
|
58426
|
+
}));
|
|
58427
|
+
return {
|
|
58428
|
+
activeTabIndex: activeTabVisibleIndex,
|
|
58429
|
+
noOfTabs: noOfVisiblePanes,
|
|
58430
|
+
panes: visiblePanes
|
|
58431
|
+
};
|
|
58432
|
+
};
|
|
58432
58433
|
TabsAnimator.prototype.bounds = function() {
|
|
58433
|
-
var
|
|
58434
|
+
var _a = this.calibrate(), activeTabIndex = _a.activeTabIndex, noOfTabs = _a.noOfTabs, panes = _a.panes, w = $(panes[0]).width(), centerVal = -1 * activeTabIndex * w;
|
|
58434
58435
|
this.clearContentFocus();
|
|
58435
58436
|
return {
|
|
58436
58437
|
strict: false,
|
|
@@ -58457,8 +58458,18 @@
|
|
|
58457
58458
|
}
|
|
58458
58459
|
};
|
|
58459
58460
|
TabsAnimator.prototype.transitionTabIntoView = function() {
|
|
58460
|
-
var
|
|
58461
|
-
|
|
58461
|
+
var _a = this.calibrate(), activeTabIndex = _a.activeTabIndex, noOfTabs = _a.noOfTabs, panes = _a.panes;
|
|
58462
|
+
var maxWidth = noOfTabs * 100 + "%";
|
|
58463
|
+
core.setCSSFromObj(this._$el[0], {
|
|
58464
|
+
maxWidth: maxWidth,
|
|
58465
|
+
width: maxWidth
|
|
58466
|
+
});
|
|
58467
|
+
core.addClass(this.tabs.getNativeElement(), "has-transition");
|
|
58468
|
+
var width = 100 / noOfTabs + "%";
|
|
58469
|
+
panes.forEach((function(p) {
|
|
58470
|
+
core.setCSS(p, "width", width);
|
|
58471
|
+
}));
|
|
58472
|
+
core.setCSS(this._$el[0], "transform", "translate3d(" + -1 * activeTabIndex / noOfTabs * 100 + "%, 0, 0)");
|
|
58462
58473
|
};
|
|
58463
58474
|
TabsAnimator.prototype.onUpper = function($event) {
|
|
58464
58475
|
this.tabs.prev($event);
|
|
@@ -58584,6 +58595,7 @@
|
|
|
58584
58595
|
};
|
|
58585
58596
|
TabPaneComponent.prototype.onPropertyChange = function(key, nv, ov) {
|
|
58586
58597
|
var _this = this;
|
|
58598
|
+
var _a;
|
|
58587
58599
|
if (key === "content") {
|
|
58588
58600
|
if (this.isActive) {
|
|
58589
58601
|
setTimeout((function() {
|
|
@@ -58594,6 +58606,10 @@
|
|
|
58594
58606
|
this.nativeElement.hidden = !nv;
|
|
58595
58607
|
if (this._isFirstLoad) {
|
|
58596
58608
|
this.tabsRef.selectDefaultPaneByIndex(this.tabsRef.defaultpaneindex);
|
|
58609
|
+
} else if (!nv && this.isActive) {
|
|
58610
|
+
this.tabsRef.next();
|
|
58611
|
+
} else if (nv || !this.isActive) {
|
|
58612
|
+
(_a = this.tabsRef.tabsAnimator) === null || _a === void 0 ? void 0 : _a.transitionTabIntoView();
|
|
58597
58613
|
}
|
|
58598
58614
|
this._isFirstLoad = false;
|
|
58599
58615
|
} else {
|
|
@@ -67549,10 +67565,10 @@
|
|
|
67549
67565
|
}));
|
|
67550
67566
|
|
|
67551
67567
|
(function(global, factory) {
|
|
67552
|
-
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,
|
|
67568
|
+
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,
|
|
67553
67569
|
factory((global.wm = global.wm || {}, global.wm.mobile = global.wm.mobile || {},
|
|
67554
|
-
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));
|
|
67555
|
-
})(this, (function(exports, core$1, core, base, page, core$2, common) {
|
|
67570
|
+
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));
|
|
67571
|
+
})(this, (function(exports, core$1, core, base, modal, page, core$2, common) {
|
|
67556
67572
|
"use strict";
|
|
67557
67573
|
var PageContentLoaderComponent = function() {
|
|
67558
67574
|
function PageContentLoaderComponent(el) {
|
|
@@ -67574,18 +67590,30 @@
|
|
|
67574
67590
|
} ];
|
|
67575
67591
|
};
|
|
67576
67592
|
var MobilePageDirective = function() {
|
|
67577
|
-
function MobilePageDirective(app, elRef, deviceService, page, navigationService) {
|
|
67593
|
+
function MobilePageDirective(app, elRef, modalService, deviceService, page, navigationService) {
|
|
67578
67594
|
var _this = this;
|
|
67595
|
+
this.modalService = modalService;
|
|
67579
67596
|
this.deviceService = deviceService;
|
|
67580
67597
|
this.page = page;
|
|
67581
67598
|
this.navigationService = navigationService;
|
|
67599
|
+
this.subscriptions = [];
|
|
67582
67600
|
core.addClass(elRef.nativeElement, "mobile-app-page");
|
|
67583
67601
|
this._$ele = $(elRef.nativeElement);
|
|
67584
67602
|
page.subscribe("wmMobileTabbar:ready", (function() {
|
|
67585
67603
|
return _this._$ele.addClass("has-tabbar");
|
|
67586
67604
|
}));
|
|
67605
|
+
var modalsOpened = [];
|
|
67606
|
+
this.subscriptions = [ modalService.onShown.subscribe((function(_a) {
|
|
67607
|
+
var id = _a.id;
|
|
67608
|
+
id && modalsOpened.push(id);
|
|
67609
|
+
})), modalService.onHidden.subscribe((function(_a) {
|
|
67610
|
+
var id = _a.id;
|
|
67611
|
+
id && _.remove(modalsOpened, id);
|
|
67612
|
+
})) ];
|
|
67587
67613
|
this._backBtnListenerDestroyer = deviceService.onBackButtonTap((function($event) {
|
|
67588
|
-
if (
|
|
67614
|
+
if (modalsOpened.length > 0) {
|
|
67615
|
+
modalService.hide(modalsOpened.pop());
|
|
67616
|
+
} else if (app.landingPageName === app.activePageName) {
|
|
67589
67617
|
window.navigator["app"].exitApp();
|
|
67590
67618
|
} else {
|
|
67591
67619
|
_this.navigationService.goToPrevious();
|
|
@@ -67594,6 +67622,9 @@
|
|
|
67594
67622
|
}));
|
|
67595
67623
|
}
|
|
67596
67624
|
MobilePageDirective.prototype.ngOnDestroy = function() {
|
|
67625
|
+
this.subscriptions.map((function(s) {
|
|
67626
|
+
return s.unsubscribe();
|
|
67627
|
+
}));
|
|
67597
67628
|
this._backBtnListenerDestroyer();
|
|
67598
67629
|
};
|
|
67599
67630
|
return MobilePageDirective;
|
|
@@ -67609,6 +67640,8 @@
|
|
|
67609
67640
|
type: core.App
|
|
67610
67641
|
}, {
|
|
67611
67642
|
type: core$1.ElementRef
|
|
67643
|
+
}, {
|
|
67644
|
+
type: modal.BsModalService
|
|
67612
67645
|
}, {
|
|
67613
67646
|
type: core$2.DeviceService
|
|
67614
67647
|
}, {
|
|
@@ -72942,6 +72975,13 @@
|
|
|
72942
72975
|
type: core.AbstractHttpService
|
|
72943
72976
|
} ];
|
|
72944
72977
|
};
|
|
72978
|
+
var Formatter = function() {
|
|
72979
|
+
function Formatter() {}
|
|
72980
|
+
Formatter.prototype.format = function(value, format) {
|
|
72981
|
+
return exports.appManager.getPipe("date").transform(value, format);
|
|
72982
|
+
};
|
|
72983
|
+
return Formatter;
|
|
72984
|
+
}();
|
|
72945
72985
|
var VariablesService = function() {
|
|
72946
72986
|
function VariablesService(httpService, metadataService, navigationService, routerService, toasterService, oAuthService, securityService, dialogService) {
|
|
72947
72987
|
this.httpService = httpService;
|
|
@@ -73048,6 +73088,7 @@
|
|
|
73048
73088
|
if (this.isVariableSeperated(variablesJson, variableName)) {
|
|
73049
73089
|
this.processBinding(varInstance, scope, "dataBinding", this.getBindSourceTarget(varInstance));
|
|
73050
73090
|
varInstance.httpService = this.httpService;
|
|
73091
|
+
varInstance.dateFormatter = new Formatter;
|
|
73051
73092
|
varInstance.subscribe("afterInvoke", (function() {
|
|
73052
73093
|
return core.$invokeWatchers(true);
|
|
73053
73094
|
}));
|
|
@@ -73137,6 +73178,7 @@
|
|
|
73137
73178
|
exports.DB_CONSTANTS = DB_CONSTANTS;
|
|
73138
73179
|
exports.DeviceVariableManager = DeviceVariableManager;
|
|
73139
73180
|
exports.DeviceVariableService = DeviceVariableService;
|
|
73181
|
+
exports.Formatter = Formatter;
|
|
73140
73182
|
exports.MetadataService = MetadataService;
|
|
73141
73183
|
exports.SWAGGER_CONSTANTS = SWAGGER_CONSTANTS;
|
|
73142
73184
|
exports.VARIABLE_CONSTANTS = VARIABLE_CONSTANTS;
|