@wavemaker/app-runtime-wm-build 11.4.0-next.28152 → 11.4.0-rc.5339

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.
@@ -5052,7 +5052,12 @@
5052
5052
  fieldDefs = [];
5053
5053
  parent.gridOptions.setCurrentPage(1);
5054
5054
  }
5055
- var currentPage = parent.currentPage;
5055
+ var currentPage;
5056
+ if (parent.widgetType === "wm-table") {
5057
+ currentPage = parent.gridOptions.showviewlessbutton && parent.gridOptions.mode === "viewless" ? parent.gridOptions.getCurrentPage() : parent.currentPage;
5058
+ } else {
5059
+ currentPage = parent.currentPage;
5060
+ }
5056
5061
  var dataNavigator = parent.dataNavigator;
5057
5062
  var pagesize = parent.pagesize;
5058
5063
  if (!isDefined(fieldDefs) || dataNavigator.isFirstPage()) {
@@ -8652,6 +8657,16 @@
8652
8657
  var routeRegex = new RegExp("^(#/|#)" + routeName + "$");
8653
8658
  return routeRegex.test(link);
8654
8659
  };
8660
+ var hasLinkToCurrentPage = function(nodes, routeUrl) {
8661
+ return nodes.some((function(node) {
8662
+ if (isActiveNavItem(node.link, routeUrl)) {
8663
+ return true;
8664
+ }
8665
+ if (node.children) {
8666
+ return hasLinkToCurrentPage(node.children, routeUrl);
8667
+ }
8668
+ }));
8669
+ };
8655
8670
  var getOrderByExpr = function(pageableObj) {
8656
8671
  pageableObj = pageableObj || [];
8657
8672
  var expressions = [], KEY_VAL_SEPARATOR = " ", FIELD_SEPARATOR = ",";
@@ -8958,9 +8973,11 @@
8958
8973
  });
8959
8974
  };
8960
8975
  var getKeyboardFocusableElements = function(element) {
8961
- return [ element.querySelectorAll('a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable], [tabindex]:not([tabindex="-1"])') ].filter((function(el) {
8962
- return !el[0].hasAttribute("disabled") && !el[0].hasAttribute("hidden");
8963
- }))[0];
8976
+ var elementNodeList = element.querySelectorAll("a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable]");
8977
+ var elements = Array.from(elementNodeList);
8978
+ return elements.filter((function(el) {
8979
+ return !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && (!el.hasAttribute("tabindex") || el.hasAttribute("tabindex") && !el.getAttribute("tabindex").startsWith("-"));
8980
+ }));
8964
8981
  };
8965
8982
  exports.APPLY_STYLES_TYPE = void 0;
8966
8983
  (function(APPLY_STYLES_TYPE) {
@@ -11214,6 +11231,10 @@
11214
11231
  if (openedDialogs.indexOf(ref) !== -1) {
11215
11232
  openedDialogs.splice(openedDialogs.indexOf(ref), 1);
11216
11233
  }
11234
+ if (openedDialogs.length === 0 && (core$1.isMobile() || core$1.isMobileApp())) {
11235
+ var parentSelector = $("body > app-root")[0];
11236
+ parentSelector.removeAttribute("aria-hidden");
11237
+ }
11217
11238
  };
11218
11239
  DialogServiceImpl.prototype.getOpenedDialogs = function() {
11219
11240
  return openedDialogs;
@@ -12389,7 +12410,8 @@
12389
12410
  mindate: "mindate",
12390
12411
  maxdate: "maxdate",
12391
12412
  excludedates: "excludedates",
12392
- excludedays: "excludedays"
12413
+ excludedays: "excludedays",
12414
+ invalidNumber: "invalidNumber"
12393
12415
  };
12394
12416
  var BaseFieldValidations = function() {
12395
12417
  function BaseFieldValidations(instance, formwidget, widgettype, widgetControl, widgetContext, tableFieldType) {
@@ -13022,6 +13044,7 @@
13022
13044
  exports.getWidgetPropsByType = getWidgetPropsByType;
13023
13045
  exports.groupData = groupData;
13024
13046
  exports.handleHeaderClick = handleHeaderClick;
13047
+ exports.hasLinkToCurrentPage = hasLinkToCurrentPage;
13025
13048
  exports.interpolateBindExpressions = interpolateBindExpressions;
13026
13049
  exports.isActiveNavItem = isActiveNavItem;
13027
13050
  exports.isBooleanAttr = isBooleanAttr;
@@ -13419,21 +13442,19 @@
13419
13442
  __proto__: null,
13420
13443
  default: search_build
13421
13444
  });
13422
- var tagName$1o = "div";
13445
+ var tagName$1o = "ul";
13423
13446
  transpiler.register("wm-tree", (function() {
13424
13447
  return {
13425
13448
  pre: function(attrs) {
13426
- return "<" + tagName$1o + " wmTree " + transpiler.getAttrMarkup(attrs) + ">";
13449
+ return "<" + tagName$1o + ' wmTree class="ztree" ' + transpiler.getAttrMarkup(attrs) + ">";
13427
13450
  },
13428
13451
  post: function() {
13429
13452
  return "</" + tagName$1o + ">";
13430
13453
  }
13431
13454
  };
13432
13455
  }));
13433
- var tree_build = function() {};
13434
- var tree_build$1 = Object.freeze({
13435
- __proto__: null,
13436
- default: tree_build
13456
+ var tree_build = Object.freeze({
13457
+ __proto__: null
13437
13458
  });
13438
13459
  var tagName$1n = "div";
13439
13460
  transpiler.register("wm-card", (function() {
@@ -14199,7 +14220,7 @@
14199
14220
  var eventsTmpl = widgetType === core.FormWidgetType.UPLOAD ? "" : getEventsTemplate(attrs);
14200
14221
  var controlLayout = core.isMobileApp() ? "col-xs-12" : "col-sm-12";
14201
14222
  var isInList = pCounter === (parentList && parentList.get("parent_form_reference"));
14202
- attrs.set("__errormsg", formFieldErrorMsgId);
14223
+ attrs.set("__validationId", formFieldErrorMsgId);
14203
14224
  attrs.set("__widgetType", widgetType);
14204
14225
  attrs.delete("widget");
14205
14226
  shared.set("counter", counter);
@@ -15039,7 +15060,7 @@
15039
15060
  }
15040
15061
  var markup = "<" + tagName$q + " wmPopover " + transpiler.getAttrMarkup(attrs) + ">";
15041
15062
  var contextAttrs = table ? 'let-row="row"' : "";
15042
- markup += "<ng-template " + contextAttrs + '><button class="popover-start"></button>';
15063
+ markup += "<ng-template " + contextAttrs + '><div tabindex="0" class="popover-start sr-only" aria-label="">popover content start</div>';
15043
15064
  if (popoverTemplate) {
15044
15065
  markup += "" + (popoverTemplate ? popoverTemplate : "");
15045
15066
  }
@@ -15050,7 +15071,7 @@
15050
15071
  if (shared.get("hasPopoverContent")) {
15051
15072
  markup += "</div>";
15052
15073
  }
15053
- return markup + '<button class="popover-end"></button></ng-template></' + tagName$q + ">";
15074
+ return markup + '<div tabindex="0" class="popover-end sr-only" aria-label="">popover content ended</div></ng-template></' + tagName$q + ">";
15054
15075
  }
15055
15076
  };
15056
15077
  }));
@@ -16414,7 +16435,7 @@
16414
16435
  exports.tileBuild = tile_build$1;
16415
16436
  exports.timeBuild = time_build$1;
16416
16437
  exports.topNavBuild = topNav_build$1;
16417
- exports.treeBuild = tree_build$1;
16438
+ exports.treeBuild = tree_build;
16418
16439
  exports.videoBuild = video_build$1;
16419
16440
  exports.wizardBuild = wizard_build$1;
16420
16441
  exports.wizardStepBuild = wizardStep_build$1;
@@ -22760,10 +22781,10 @@
22760
22781
  }));
22761
22782
 
22762
22783
  (function(global, factory) {
22763
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@angular/core"), require("@angular/common"), require("@wm/components/base"), require("@wm/core")) : typeof define === "function" && define.amd ? define("@wm/components/basic/tree", [ "exports", "@angular/core", "@angular/common", "@wm/components/base", "@wm/core" ], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
22784
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@angular/core"), require("@angular/common"), require("@wm/components/base")) : typeof define === "function" && define.amd ? define("@wm/components/basic/tree", [ "exports", "@angular/core", "@angular/common", "@wm/components/base" ], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
22764
22785
  factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {},
22765
- global.wm.components.basic = global.wm.components.basic || {}, global.wm.components.basic.tree = {}), global.ng.core, global.ng.common, global.wm.components.base, global.wm.core));
22766
- })(this, (function(exports, core$1, common, base, core) {
22786
+ global.wm.components.basic = global.wm.components.basic || {}, global.wm.components.basic.tree = {}), global.ng.core, global.ng.common, global.wm.components.base));
22787
+ })(this, (function(exports, core, common, base) {
22767
22788
  "use strict";
22768
22789
  /*! *****************************************************************************
22769
22790
  Copyright (c) Microsoft Corporation.
@@ -23140,352 +23161,344 @@
23140
23161
  value: 0
23141
23162
  }, base.PROP_NUMBER) ], [ "treeicons", base.PROP_STRING ] ]));
23142
23163
  };
23143
- var defaultTreeIconClass = "plus-minus";
23144
- var ICON_CLASSES = {
23145
- folder: {
23146
- expanded: "wi-folder-open",
23147
- collapsed: "wi-folder"
23148
- },
23149
- "circle-plus-minus": {
23150
- expanded: "wi-remove-circle-outline",
23151
- collapsed: "wi-add-circle-outline"
23152
- },
23153
- chevron: {
23154
- expanded: "wi-keyboard-arrow-down",
23155
- collapsed: "wi-keyboard-arrow-right"
23156
- },
23157
- menu: {
23158
- expanded: "wi-arrow-down",
23159
- collapsed: "wi-arrow-right"
23160
- },
23161
- triangle: {
23162
- expanded: "wi-arrow-drop-down-circle",
23163
- collapsed: "wi-play-circle-filled"
23164
- },
23165
- "expand-collapse": {
23166
- expanded: "wi-expand-less",
23167
- collapsed: "wi-expand-more"
23168
- },
23169
- "plus-minus": {
23170
- expanded: "wi-minus",
23171
- collapsed: "wi-plus"
23172
- }
23173
- };
23174
23164
  var WIDGET_INFO = {
23175
23165
  widgetType: "wm-tree",
23176
23166
  hostClass: "app-tree"
23177
23167
  };
23178
- var TreeDirective = function(_super) {
23179
- __extends(TreeDirective, _super);
23180
- function TreeDirective(inj, binddatavalue, bindnodelabel, bindnodeicon, bindnodechildren, bindnodeid) {
23168
+ var defaultTreeIconClass = "plus-minus";
23169
+ var TreeComponent = function(_super) {
23170
+ __extends(TreeComponent, _super);
23171
+ function TreeComponent(inj) {
23181
23172
  var _this = _super.call(this, inj, WIDGET_INFO) || this;
23182
- _this.binddatavalue = binddatavalue;
23183
- _this.bindnodelabel = bindnodelabel;
23184
- _this.bindnodeicon = bindnodeicon;
23185
- _this.bindnodechildren = bindnodechildren;
23186
- _this.bindnodeid = bindnodeid;
23173
+ _this.setting = {
23174
+ data: {
23175
+ simpleData: {
23176
+ enable: true
23177
+ }
23178
+ },
23179
+ view: {
23180
+ dblClickExpand: false,
23181
+ fontCss: {
23182
+ "font-awesome": true
23183
+ },
23184
+ switchIcon: {}
23185
+ },
23186
+ check: {},
23187
+ callback: {}
23188
+ };
23187
23189
  base.styler(_this.nativeElement, _this, base.APPLY_STYLES_TYPE.CONTAINER);
23188
- _this.bindEvents();
23189
23190
  return _this;
23190
23191
  }
23191
- TreeDirective.prototype.onPropertyChange = function(key, nv, ov) {
23192
+ TreeComponent.prototype.onPropertyChange = function(key, nv, ov) {
23192
23193
  switch (key) {
23193
23194
  case "dataset":
23194
23195
  this.nodes = this.getNodes(nv);
23195
- this._selectNode = undefined;
23196
+ if (this.level > 0) {
23197
+ this.expandTree(this.level, this.nodes, 0);
23198
+ }
23196
23199
  this.renderTree();
23197
23200
  break;
23198
23201
 
23199
- case "nodeicon":
23200
- case "nodelabel":
23201
- case "nodechildren":
23202
- case "orderby":
23203
- this.renderTree();
23202
+ case "levels":
23203
+ if (nv > 0) {
23204
+ this.level = nv;
23205
+ }
23204
23206
  break;
23205
23207
 
23206
23208
  case "treeicons":
23207
- this.changeTreeIcons(nv, ov);
23209
+ this.treeicon = nv;
23208
23210
  break;
23209
23211
 
23210
- case "datavalue":
23211
- this.selectById(nv);
23212
+ case "nodelabel":
23213
+ this.nodelabel = nv;
23214
+ break;
23215
+
23216
+ case "icon":
23217
+ this.nodeicon = nv;
23218
+
23219
+ case "orderby":
23220
+ this.renderTree();
23221
+ break;
23222
+
23223
+ case "class":
23224
+ this.treeClass = nv;
23212
23225
  break;
23213
23226
 
23214
23227
  default:
23215
23228
  _super.prototype.onPropertyChange.call(this, key, nv, ov);
23229
+ break;
23216
23230
  }
23217
23231
  };
23218
- TreeDirective.prototype.constructNodes = function(nodes, parent, levels, deep, _evalDataValue) {
23232
+ TreeComponent.prototype.expandTree = function(level, node, childLevel) {
23219
23233
  var _this = this;
23220
- var $ul = $("<ul></ul>");
23221
- var _iconClses = ICON_CLASSES[this.treeicons || defaultTreeIconClass];
23222
- var _expr = this.binddatavalue || this.datavalue;
23223
- var _iconCls, _cls;
23224
- _cls = levels > 0 ? " expanded " : " collapsed ";
23225
- _iconCls = _cls + (levels > 0 ? _iconClses.expanded : _iconClses.collapsed);
23226
- deep = deep || 0;
23227
- parent.append($ul);
23228
- nodes.forEach((function(node, idx) {
23229
- var $li = $("<li></li>"), $iconNode = $("<i></i>"), nodeLabel = base.getEvaluatedData(node, {
23230
- field: _this.nodelabel,
23231
- bindExpression: _this.bindnodelabel
23232
- }, _this.viewParent) || node.label, nodeIcon = base.getEvaluatedData(node, {
23233
- field: _this.nodeicon,
23234
- bindExpression: _this.bindnodeicon
23235
- }, _this.viewParent) || node.icon, nodeChildren = base.getEvaluatedData(node, {
23236
- field: _this.nodechildren,
23237
- bindExpression: _this.bindnodechildren
23238
- }, _this.viewParent) || node.children;
23239
- var nodeIdValue = base.getEvaluatedData(node, {
23240
- field: _this.nodeid,
23241
- bindExpression: _this.bindnodeid
23242
- }, _this.viewParent);
23243
- if (nodeIdValue === undefined) {
23244
- nodeIdValue = node.children;
23245
- }
23246
- var isNodeMatched = false, expandCollapseIcon;
23247
- $li.data("nodedata", node).append($iconNode).append('<span class="title">' + nodeLabel + "</span>").appendTo($ul);
23248
- if (_this.bindnodeid || _this.nodeid) {
23249
- isNodeMatched = _this.binddatavalue ? nodeIdValue === _evalDataValue : nodeIdValue === _expr;
23250
- if (nodeIdValue !== undefined) {
23251
- $li.attr("id", nodeIdValue);
23252
- }
23253
- } else if (_this.binddatavalue) {
23254
- isNodeMatched = !!core.$parseExpr(_expr)(_this, node);
23255
- }
23256
- if (!_this._selectNode) {
23257
- if (_expr === "FirstNode" && idx === 0 || !deep && _expr === "LastNode" && idx === nodes.length - 1 || isNodeMatched) {
23258
- _this._selectNode = $li;
23259
- _this.datavalue = nodeIdValue;
23260
- }
23261
- }
23262
- if (nodeIcon) {
23263
- $iconNode.addClass(nodeIcon);
23264
- }
23265
- if (nodeChildren && nodeChildren.length) {
23266
- $li.addClass("parent-node " + _cls);
23267
- expandCollapseIcon = $('<i class="wi ' + _iconCls + '"></i>');
23268
- if (nodeIcon) {
23269
- $iconNode.addClass(nodeIcon);
23270
- }
23271
- $li.prepend(expandCollapseIcon);
23272
- _this.constructNodes(nodeChildren, $li, levels - 1, deep + 1, _evalDataValue);
23234
+ node.map((function(childNode) {
23235
+ if ("children" in childNode && !("open" in childNode) && childLevel < level) {
23236
+ childNode["open"] = true;
23237
+ _this.expandTree(level, childNode.children, childLevel + 1);
23273
23238
  } else {
23274
- if (!nodeIcon) {
23275
- $iconNode.addClass("leaf-node");
23276
- }
23277
- $li.addClass("leaf-node");
23239
+ childLevel = 0;
23240
+ return;
23278
23241
  }
23279
23242
  }));
23280
23243
  };
23281
- TreeDirective.prototype.getNodesFromString = function(value) {
23244
+ TreeComponent.prototype.setTreeTemplate = function(value) {
23245
+ if (value === "Classic") {
23246
+ this.setting.check["enable"] = false;
23247
+ } else if (value === "Checkbox") {
23248
+ this.setting.check["enable"] = true;
23249
+ this.setting.check["chkStyle"] = "checkbox";
23250
+ } else if (value === "Radio") {
23251
+ this.setting.check["enable"] = true;
23252
+ this.setting.check["chkStyle"] = "radio";
23253
+ this.setting.check["radioType"] = "all";
23254
+ }
23255
+ };
23256
+ TreeComponent.prototype.getNodesFromString = function(value) {
23282
23257
  return value.split(",").map((function(item) {
23283
23258
  return {
23284
- label: item && item.trim()
23259
+ name: item && item.trim()
23285
23260
  };
23286
23261
  }));
23287
23262
  };
23288
- TreeDirective.prototype.getNodes = function(newVal) {
23263
+ TreeComponent.prototype.getNodes = function(newVal) {
23289
23264
  var nodes;
23290
- if (_.isString(newVal) && !_.isEmpty(newVal)) {
23265
+ if (_.isArray(newVal)) {
23266
+ nodes = base.getOrderedDataset(newVal, this.orderby);
23267
+ } else if (_.isObject(newVal)) {
23268
+ nodes = [ newVal ];
23269
+ } else if (_.isString(newVal) && !_.isEmpty(newVal)) {
23291
23270
  newVal = newVal.trim();
23292
23271
  if (newVal) {
23293
23272
  nodes = this.getNodesFromString(newVal);
23294
23273
  }
23295
- } else if (_.isArray(newVal)) {
23296
- newVal = base.getOrderedDataset(newVal, this.orderby);
23297
- nodes = newVal;
23298
- } else if (_.isObject(newVal)) {
23299
- nodes = [ newVal ];
23300
23274
  }
23301
23275
  return nodes;
23302
23276
  };
23303
- TreeDirective.prototype.changeTreeIcons = function(nv, ov) {
23304
- var $el = $(this.nativeElement);
23305
- nv = nv || defaultTreeIconClass;
23306
- ov = ov || defaultTreeIconClass;
23307
- $el.find("i.expanded").removeClass(ICON_CLASSES[ov].expanded).addClass(ICON_CLASSES[nv].expanded);
23308
- $el.find("i.collapsed").removeClass(ICON_CLASSES[ov].collapsed).addClass(ICON_CLASSES[nv].collapsed);
23309
- };
23310
- TreeDirective.prototype.toggleExpandCollapseNode = function($event, $i, $li) {
23311
- var treeIcons = ICON_CLASSES[this.treeicons || defaultTreeIconClass];
23312
- var $liPath = this.findSelectedNodeParent($li);
23313
- var path = "";
23314
- $liPath.each((function(i, el) {
23315
- var current = $(el).children(".title").text();
23316
- path = "/" + (current + path);
23317
- }));
23318
- var eventParams = {
23319
- $event: $event,
23320
- $item: $li.data("nodedata"),
23321
- $path: path
23322
- };
23323
- if ($i.hasClass("collapsed")) {
23324
- $i.removeClass("collapsed " + treeIcons.collapsed).addClass("expanded " + treeIcons.expanded);
23325
- $li.removeClass("collapsed").addClass("expanded");
23326
- this.invokeEventCallback("expand", eventParams);
23327
- } else if ($i.hasClass("expanded")) {
23328
- $i.removeClass("expanded " + treeIcons.expanded).addClass("collapsed " + treeIcons.collapsed);
23329
- $li.removeClass("expanded").addClass("collapsed");
23330
- this.invokeEventCallback("collapse", eventParams);
23331
- }
23277
+ TreeComponent.prototype.setNodeclasses = function(treeId, treeNode) {
23278
+ return treeNode.icon ? {
23279
+ add: [ "" + treeNode.icon ]
23280
+ } : "";
23332
23281
  };
23333
- TreeDirective.prototype.renderTree = function(forceRender) {
23282
+ TreeComponent.prototype.setNodeData = function(nodes, depth, level, parentNode, type) {
23334
23283
  var _this = this;
23335
- var docFrag, $li, $liPath, data, path = "";
23336
- var levels = +this.nativeElement.getAttribute("levels") || 0, $el = $(this.nativeElement);
23337
- $el.empty();
23338
- if (forceRender) {
23339
- this._selectNode = undefined;
23340
- }
23341
- if (this.nodes && this.nodes.length) {
23342
- docFrag = document.createDocumentFragment();
23343
- this.constructNodes(this.nodes, $(docFrag), levels, 0, this.datavalue);
23344
- $el.append(docFrag);
23345
- }
23346
- if (this._selectNode) {
23347
- $li = this._selectNode;
23348
- $li.addClass("selected");
23349
- data = $li.data("nodedata");
23350
- $liPath = this.findSelectedNodeParent($li);
23351
- if (!$liPath.length) {
23352
- $liPath = $li;
23353
- }
23354
- $liPath.each((function(i, el) {
23355
- var $current = $(el), $i = $current.children("i.collapsed"), $title = $current.children(".title");
23356
- _this.toggleExpandCollapseNode(undefined, $i, $current);
23357
- path = "/" + ($title.text() + path);
23284
+ if (depth === 0) {
23285
+ nodes.map((function(node) {
23286
+ if (node.children) {
23287
+ _this.setNodeData(node.children, depth, level, parentNode, type);
23288
+ }
23289
+ if (node.icon && _this.nodelabel == "icon") {
23290
+ node[type] = node.icon;
23291
+ } else if (node.name && _this.nodelabel == "name") {
23292
+ node[type] = node.name;
23293
+ } else {
23294
+ return;
23295
+ }
23296
+ }));
23297
+ } else {
23298
+ nodes.map((function(node) {
23299
+ if (node.children && level > 1) {
23300
+ if (depth === level) {
23301
+ parentNode = node;
23302
+ }
23303
+ _this.setNodeData(node.children, depth, level - 1, parentNode, type);
23304
+ }
23305
+ if (level === 1 && (type === "name" ? _this.nodelabel.includes("label") || _this.nodelabel.includes("name") : _this.nodeicon.includes("label") || _this.nodeicon.includes("name"))) {
23306
+ parentNode[type] = node.name || node.label;
23307
+ return;
23308
+ } else if (level === 1 && node.icon !== undefined && (type === "name" ? _this.nodelabel.includes("icon") : _this.nodeicon.includes("icon"))) {
23309
+ parentNode[type] = node.icon;
23310
+ return;
23311
+ } else {
23312
+ return;
23313
+ }
23358
23314
  }));
23359
- this.selecteditem = core.getClonedObject(data) || {};
23360
- this.selecteditem.path = path;
23361
- this.invokeEventCallback("select", {
23362
- $event: undefined,
23363
- $item: data,
23364
- $path: path
23365
- });
23366
- core.$appDigest();
23367
23315
  }
23368
23316
  };
23369
- TreeDirective.prototype.selectNode = function(evt, value) {
23370
- var _this = this;
23371
- var target = evt && $(evt.target), $el = $(this.nativeElement), $li = _.isObject(value) ? value : $el.find('li[id="' + value + '"]').first();
23372
- var data, path = "", $liPath, nodeAction;
23373
- $el.find(".selected").removeClass("selected");
23374
- if (!$li.length) {
23375
- return;
23376
- }
23377
- $li.addClass("selected");
23378
- data = $li.data("nodedata");
23379
- nodeAction = data[this.nodeaction || "action"];
23380
- $liPath = target ? target.parents(".app-tree li") : this.findSelectedNodeParent($li);
23381
- $liPath.each((function(i, el) {
23382
- var current = $(el).children(".title").text();
23383
- path = "/" + (current + path);
23384
- }));
23385
- $li.parentsUntil($el, "li.parent-node.collapsed").each((function(index, el) {
23386
- var $current = $(el), $i = $current.children("i.collapsed");
23387
- _this.toggleExpandCollapseNode(undefined, $i, $current);
23388
- }));
23389
- this.selecteditem = core.getClonedObject(data) || {};
23390
- this.selecteditem.path = path;
23391
- if (target) {
23392
- if (this.nodeid || this.bindnodeid) {
23393
- this.datavalue = base.getEvaluatedData(data, {
23394
- field: this.nodeid,
23395
- bindExpression: this.bindnodeid
23396
- }, this.viewParent);
23397
- } else {
23398
- this.datavalue = core.getClonedObject(data) || {};
23399
- }
23317
+ TreeComponent.prototype.changeTreeIcons = function(nv) {
23318
+ var eleClose = $('ul[name="' + this.name + '"] li span.button.switch');
23319
+ $(eleClose).map((function(idx, ele) {
23320
+ $(ele).addClass(nv);
23321
+ $(ele).on("click", (function(e) {
23322
+ setTimeout((function() {
23323
+ $(ele).addClass(nv);
23324
+ }), 0);
23325
+ }));
23326
+ }));
23327
+ };
23328
+ TreeComponent.prototype.getPath = function(treeNode, path) {
23329
+ if (treeNode.getParentNode() === null) {
23330
+ path = "/" + treeNode.name + path;
23400
23331
  } else {
23401
- this.datavalue = value;
23402
- }
23403
- if (nodeAction) {
23404
- core.$parseEvent(nodeAction)(this);
23332
+ path = this.getPath(treeNode.getParentNode(), path) + "/" + treeNode.name;
23405
23333
  }
23406
- this.invokeEventCallback("select", {
23407
- $event: evt,
23408
- $item: data,
23334
+ return path;
23335
+ };
23336
+ TreeComponent.prototype.onClick = function(event, treeId, treeNode, clickFlag) {
23337
+ var treeObj = $.fn.zTree.getZTreeObj("" + this.name);
23338
+ var path = this.getPath(treeNode, "");
23339
+ var eventParams = {
23340
+ $event: event,
23341
+ $item: treeNode,
23409
23342
  $path: path
23410
- });
23411
- core.$appDigest();
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
+ })) : "";
23412
23366
  };
23413
- TreeDirective.prototype.bindEvents = function() {
23367
+ TreeComponent.prototype.onCollapse = function(event, treeId, treeNode) {
23368
+ var path = this.getPath(treeNode, "");
23369
+ var eventParams = {
23370
+ $event: event,
23371
+ $item: treeNode,
23372
+ $path: path
23373
+ };
23374
+ this.invokeEventCallback("collapse", eventParams);
23375
+ };
23376
+ TreeComponent.prototype.modifyObjects = function(array) {
23414
23377
  var _this = this;
23415
- $(this.nativeElement).on("click", (function(evt) {
23416
- var target = $(evt.target), li = target.closest("li"), $i = target.is("i") ? target : target.siblings("i.collapsed,i.expanded");
23417
- evt.stopPropagation();
23418
- if (target.is("span.title")) {
23419
- _this.selecteditem = {};
23420
- _this.selectNode(evt, li);
23378
+ array.forEach((function(obj) {
23379
+ if (obj.label !== undefined) {
23380
+ obj.name = obj.label;
23381
+ delete obj.label;
23421
23382
  }
23422
- if (target.is("i") || target.is("span.title") && _this.nodeclick === "expand") {
23423
- _this.toggleExpandCollapseNode(evt, $i, li);
23383
+ if (obj.children !== undefined) {
23384
+ _this.modifyObjects(obj.children);
23424
23385
  }
23425
23386
  }));
23387
+ return array;
23426
23388
  };
23427
- TreeDirective.prototype.findSelectedNodeParent = function($li) {
23428
- return $li.find("> span.title").parents(".app-tree li");
23389
+ TreeComponent.prototype.setNodeChildren = function(nodes, depth, level, parentNode) {
23390
+ if (depth <= 0) {
23391
+ return nodes;
23392
+ }
23393
+ for (var i = 0; i < nodes.length; i++) {
23394
+ var node = nodes[i];
23395
+ if (depth === level) {
23396
+ parentNode = nodes[i];
23397
+ }
23398
+ if (node.children && node.children.length > 0) {
23399
+ if (level === 1) {
23400
+ parentNode.children = node.children.map((function(child) {
23401
+ return {
23402
+ name: child.name,
23403
+ children: child === null || child === void 0 ? void 0 : child.children
23404
+ };
23405
+ }));
23406
+ return;
23407
+ } else {
23408
+ this.setNodeChildren(node.children, depth, level - 1, parentNode);
23409
+ }
23410
+ }
23411
+ }
23412
+ return nodes;
23429
23413
  };
23430
- TreeDirective.prototype.selectById = function(value) {
23431
- this.selectNode(undefined, value);
23414
+ TreeComponent.prototype.countDepth = function(str) {
23415
+ var e_1, _a;
23416
+ var regex = /\[.*?\]/g;
23417
+ var matches = str.match(regex);
23418
+ var count = 1;
23419
+ if (matches === null) return count;
23420
+ try {
23421
+ for (var matches_1 = __values(matches), matches_1_1 = matches_1.next(); !matches_1_1.done; matches_1_1 = matches_1.next()) {
23422
+ var match = matches_1_1.value;
23423
+ count++;
23424
+ }
23425
+ } catch (e_1_1) {
23426
+ e_1 = {
23427
+ error: e_1_1
23428
+ };
23429
+ } finally {
23430
+ try {
23431
+ if (matches_1_1 && !matches_1_1.done && (_a = matches_1.return)) _a.call(matches_1);
23432
+ } finally {
23433
+ if (e_1) throw e_1.error;
23434
+ }
23435
+ }
23436
+ return count;
23432
23437
  };
23433
- TreeDirective.prototype.deselectById = function(value) {
23434
- this.selecteditem = {};
23435
- this.selectById();
23438
+ TreeComponent.prototype.renderTree = function() {
23439
+ console.log(this.nodes, "this.nodes");
23440
+ if (this.nodes) {
23441
+ this.nativeElement.setAttribute("id", this.name);
23442
+ this.nodes = this.modifyObjects(this.nodes);
23443
+ this.setTreeTemplate(this.treeClass);
23444
+ if (this.nodelabel) {
23445
+ var depth = 0;
23446
+ if (this.nodelabel.includes("children")) {
23447
+ depth = this.countDepth(this.nodelabel);
23448
+ }
23449
+ this.setNodeData(this.nodes, depth, depth, null, "name");
23450
+ }
23451
+ if (this.nodeicon) {
23452
+ var depth = 0;
23453
+ if (this.nodeicon.includes("children")) {
23454
+ depth = this.countDepth(this.nodeicon);
23455
+ }
23456
+ this.setNodeData(this.nodes, depth, depth, null, "icon");
23457
+ }
23458
+ if (this.nodechildren) {
23459
+ var depth = this.countDepth(this.nodechildren);
23460
+ if (depth > 1) {
23461
+ this.nodes = this.setNodeChildren(this.nodes, depth, depth, null);
23462
+ }
23463
+ }
23464
+ }
23465
+ this.setting.view["nodeClasses"] = this.setNodeclasses;
23466
+ this.setting.callback["onClick"] = this.onClick.bind(this);
23467
+ this.setting.callback["onExpand"] = this.onExpand.bind(this);
23468
+ this.setting.callback["onCollapse"] = this.onCollapse.bind(this);
23469
+ var zTree = $.fn.zTree.init($('ul[name="' + this.name + '"]'), this.setting, this.nodes);
23470
+ $.fn.zTreeKeyboardNavigation(zTree, $('ul[name="' + this.name + '"]'), null, this.treeicon || defaultTreeIconClass);
23471
+ };
23472
+ TreeComponent.prototype.ngAfterViewInit = function() {
23473
+ var _this = this;
23474
+ setTimeout((function() {
23475
+ _this.changeTreeIcons(_this.treeicon || defaultTreeIconClass);
23476
+ }), 200);
23436
23477
  };
23437
- return TreeDirective;
23478
+ return TreeComponent;
23438
23479
  }(base.StylableComponent);
23439
- TreeDirective.initializeProps = registerProps();
23440
- TreeDirective.decorators = [ {
23441
- type: core$1.Directive,
23480
+ TreeComponent.initializeProps = registerProps();
23481
+ TreeComponent.decorators = [ {
23482
+ type: core.Component,
23442
23483
  args: [ {
23443
- selector: "div[wmTree]",
23444
- providers: [ base.provideAsWidgetRef(TreeDirective) ]
23484
+ selector: "ul[wmTree]",
23485
+ template: '<ul #wmTree class="ztree" id="ztree"></ul> ',
23486
+ providers: [ base.provideAsWidgetRef(TreeComponent) ],
23487
+ encapsulation: core.ViewEncapsulation.None
23445
23488
  } ]
23446
23489
  } ];
23447
- TreeDirective.ctorParameters = function() {
23490
+ TreeComponent.ctorParameters = function() {
23448
23491
  return [ {
23449
- type: core$1.Injector
23450
- }, {
23451
- type: undefined,
23452
- decorators: [ {
23453
- type: core$1.Attribute,
23454
- args: [ "datavalue.bind" ]
23455
- } ]
23456
- }, {
23457
- type: undefined,
23458
- decorators: [ {
23459
- type: core$1.Attribute,
23460
- args: [ "nodelabel.bind" ]
23461
- } ]
23462
- }, {
23463
- type: undefined,
23464
- decorators: [ {
23465
- type: core$1.Attribute,
23466
- args: [ "nodeicon.bind" ]
23467
- } ]
23468
- }, {
23469
- type: undefined,
23470
- decorators: [ {
23471
- type: core$1.Attribute,
23472
- args: [ "nodechildren.bind" ]
23473
- } ]
23474
- }, {
23475
- type: undefined,
23476
- decorators: [ {
23477
- type: core$1.Attribute,
23478
- args: [ "nodeid.bind" ]
23479
- } ]
23492
+ type: core.Injector
23480
23493
  } ];
23481
23494
  };
23482
- var components = [ TreeDirective ];
23495
+ var components = [ TreeComponent ];
23483
23496
  var TreeModule = function() {
23484
23497
  function TreeModule() {}
23485
23498
  return TreeModule;
23486
23499
  }();
23487
23500
  TreeModule.decorators = [ {
23488
- type: core$1.NgModule,
23501
+ type: core.NgModule,
23489
23502
  args: [ {
23490
23503
  imports: [ common.CommonModule, base.WmComponentsModule ],
23491
23504
  declarations: __spreadArray([], __read(components)),
@@ -23493,7 +23506,7 @@
23493
23506
  entryComponents: []
23494
23507
  } ]
23495
23508
  } ];
23496
- exports.TreeDirective = TreeDirective;
23509
+ exports.TreeComponent = TreeComponent;
23497
23510
  exports.TreeModule = TreeModule;
23498
23511
  exports["\u0275a"] = registerProps;
23499
23512
  Object.defineProperty(exports, "__esModule", {
@@ -26903,22 +26916,24 @@
26903
26916
  configurable: true
26904
26917
  });
26905
26918
  DateTimePickerComponent.prototype.validateSelectedDate = function() {
26906
- var _a, _b, _c, _d, _e, _f, _g;
26919
+ var _a, _b, _c, _d, _e;
26907
26920
  if (!this.changedValue) {
26908
26921
  return true;
26909
26922
  }
26910
26923
  var cd = moment(this.changedValue);
26911
- if (((_a = this._bsDatepickerConfig) === null || _a === void 0 ? void 0 : _a.minDate) && ((_b = this._bsDatepickerConfig) === null || _b === void 0 ? void 0 : _b.minDate) > this.changedValue) {
26924
+ var minDate = (_a = this._bsDatepickerConfig) === null || _a === void 0 ? void 0 : _a.minDate;
26925
+ var maxDate = (_b = this._bsDatepickerConfig) === null || _b === void 0 ? void 0 : _b.maxDate;
26926
+ if (minDate && (this.mode === "DATE" && moment(minDate).startOf("day").toDate() > this.changedValue || this.mode !== "DATE" && minDate > this.changedValue)) {
26912
26927
  return false;
26913
26928
  }
26914
- if (((_c = this._bsDatepickerConfig) === null || _c === void 0 ? void 0 : _c.maxDate) && ((_d = this._bsDatepickerConfig) === null || _d === void 0 ? void 0 : _d.maxDate) < this.changedValue) {
26929
+ if (maxDate && (this.mode === "DATE" && moment(maxDate).endOf("day").toDate() < this.changedValue || this.mode !== "DATE" && maxDate < this.changedValue)) {
26915
26930
  return false;
26916
26931
  }
26917
- if (((_f = (_e = this._bsDatepickerConfig) === null || _e === void 0 ? void 0 : _e.daysDisabled) === null || _f === void 0 ? void 0 : _f.indexOf(cd.day())) >= 0) {
26932
+ if (((_d = (_c = this._bsDatepickerConfig) === null || _c === void 0 ? void 0 : _c.daysDisabled) === null || _d === void 0 ? void 0 : _d.indexOf(cd.day())) >= 0) {
26918
26933
  return false;
26919
26934
  }
26920
26935
  var cdSt = cd.startOf("day").toDate().getTime();
26921
- if ((_g = this.excludedDatesToDisable) === null || _g === void 0 ? void 0 : _g.find((function(d) {
26936
+ if ((_e = this.excludedDatesToDisable) === null || _e === void 0 ? void 0 : _e.find((function(d) {
26922
26937
  return d.getTime() === cdSt;
26923
26938
  }))) {
26924
26939
  return false;
@@ -26967,6 +26982,9 @@
26967
26982
  newVal.setMilliseconds(oldVal.getMilliseconds());
26968
26983
  }
26969
26984
  this.changedValue = newVal;
26985
+ if (this.mode === "DATE" && oldVal !== newVal && this.validateSelectedDate()) {
26986
+ this.onOkClick();
26987
+ }
26970
26988
  };
26971
26989
  DateTimePickerComponent.prototype.onTimeUpdate = function(newVal) {
26972
26990
  this.changedValue = newVal;
@@ -26988,6 +27006,10 @@
26988
27006
  this.triggerChange();
26989
27007
  this.hideModal();
26990
27008
  };
27009
+ DateTimePickerComponent.prototype.setToday = function() {
27010
+ var today = moment().startOf("day").toDate();
27011
+ this.onDateUpdate(today);
27012
+ };
26991
27013
  DateTimePickerComponent.prototype.reset = function() {
26992
27014
  this.changedValue = this._value;
26993
27015
  };
@@ -27022,7 +27044,7 @@
27022
27044
  type: core.Component,
27023
27045
  args: [ {
27024
27046
  selector: "wm-datetimepicker",
27025
- template: ' \n <ng-template #datetimepickerTemplate>\n <div class="app-datetime-picker">\n <div class="modal-body">\n <div class="mobile-datetime-picker-options">\n \n </div>\n <bs-datepicker-inline\n [bsConfig]="bsDatepickerConfig"\n [datesDisabled]="excludedDatesToDisable"\n bsDatepicker\n [bsValue]="changedValue"\n (bsValueChange)="onDateUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'">\n </bs-datepicker-inline>\n <wm-timepicker\n [value]="changedValue"\n [min]="minTime"\n [max]="maxTime"\n (change)="onTimeUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"></wm-timepicker>\n <span class="text-primary date-picker-value">\n {{getDateLabel()}}\n </span>\n </div>\n <div class="modal-footer">\n <button\n class="btn btn-secondary clear-btn"\n (click)="clear()">{{appLocale.MESSAGE_DATE_PICKER_CLEAR || "Clear" }}</button>\n <button\n class="btn btn-primary pull-right ok-btn"\n (click)="onOkClick()">{{appLocale.MESSAGE_DATE_PICKER_OK || "Ok" }}</button>\n <button\n class="btn btn-secondary pull-right cancel-btn"\n (click)="hideModal()">{{appLocale.MESSAGE_DATE_PICKER_CANCEL || "Cancel" }}</button>\n \n </div>\n </div>\n </ng-template>\n '
27047
+ template: ' \n <ng-template #datetimepickerTemplate>\n <div class="app-datetime-picker">\n <div class="modal-body">\n <div class="mobile-datetime-picker-options">\n \n </div>\n <bs-datepicker-inline\n [bsConfig]="bsDatepickerConfig"\n [datesDisabled]="excludedDatesToDisable"\n bsDatepicker\n [bsValue]="changedValue"\n (bsValueChange)="onDateUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'">\n </bs-datepicker-inline>\n <wm-timepicker\n [value]="changedValue"\n [min]="minTime"\n [max]="maxTime"\n (change)="onTimeUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"></wm-timepicker>\n <span class="text-primary date-picker-value">\n {{getDateLabel()}}\n </span>\n </div>\n <div class="modal-footer">\n <button\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'"\n class="btn btn-secondary today-btn"\n (click)="setToday()">{{appLocale.MESSAGE_DATE_PICKER_TODAY || "Today" }}</button>\n <button\n class="btn btn-primary pull-right ok-btn"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"\n (click)="onOkClick()">{{appLocale.MESSAGE_DATE_PICKER_OK || "Ok" }}</button>\n <button\n class="btn btn-secondary pull-right clear-btn"\n (click)="clear()">{{appLocale.MESSAGE_DATE_PICKER_CLEAR || "Clear" }}</button>\n </div>\n </div>\n </ng-template>\n '
27026
27048
  } ]
27027
27049
  } ];
27028
27050
  DateTimePickerComponent.ctorParameters = function() {
@@ -27105,8 +27127,8 @@
27105
27127
  }
27106
27128
  return arr;
27107
27129
  };
27108
- TimePickerComponent.prototype.set = function(_h, unit) {
27109
- var index = _h.index, value = _h.value;
27130
+ TimePickerComponent.prototype.set = function(_f, unit) {
27131
+ var index = _f.index, value = _f.value;
27110
27132
  if (unit === "HOUR") {
27111
27133
  this.value = moment(this.value).hour(parseInt(value)).toDate();
27112
27134
  } else if (unit === "MINUTE") {
@@ -27371,6 +27393,7 @@
27371
27393
  };
27372
27394
  BaseDateTimeComponent.prototype.setActiveDateFocus = function(newDate, isMouseEvent) {
27373
27395
  var _this = this;
27396
+ this.setNextData(newDate);
27374
27397
  var activeMonth = this.activeDate.getMonth();
27375
27398
  if (!isMouseEvent) {
27376
27399
  if (newDate.getMonth() < activeMonth) {
@@ -27383,14 +27406,18 @@
27383
27406
  var newDay = newDate.getDate().toString();
27384
27407
  _.filter($("span:contains(" + newDay + ")").not(".is-other-month"), (function(obj) {
27385
27408
  if ($(obj).text() === newDay) {
27409
+ if ($(obj).hasClass("selected")) {
27410
+ $(obj).parent().attr("aria-selected", "true");
27411
+ }
27386
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");
27387
27415
  $(obj).focus();
27388
27416
  _this.activeDate = newDate;
27389
27417
  }
27390
27418
  }));
27391
27419
  if (newDate.getMonth() === (new Date).getMonth() && newDate.getFullYear() === (new Date).getFullYear()) {
27392
27420
  _this.hightlightToday();
27393
- $("span:contains(" + (new Date).getDate().toString() + ")").not(".is-other-month").parent().attr("aria-selected", "true");
27394
27421
  }
27395
27422
  }));
27396
27423
  };
@@ -27432,6 +27459,9 @@
27432
27459
  if (event.originalEvent) {
27433
27460
  _this.setFocusForDate(-1);
27434
27461
  }
27462
+ setTimeout((function() {
27463
+ $(".bs-datepicker-head .previous").focus();
27464
+ }));
27435
27465
  }));
27436
27466
  datePickerHead.find(".next").click((function(event) {
27437
27467
  _this.next = _this.getMonth(_this.activeDate, 2);
@@ -27440,6 +27470,9 @@
27440
27470
  if (event.originalEvent) {
27441
27471
  _this.setFocusForDate(1);
27442
27472
  }
27473
+ setTimeout((function() {
27474
+ $(".bs-datepicker-head .next").focus();
27475
+ }));
27443
27476
  }));
27444
27477
  datePickerHead.find(".current").click((function(event) {
27445
27478
  if (event.originalEvent) {
@@ -27452,8 +27485,21 @@
27452
27485
  _this.setFocusForMonthOrDay();
27453
27486
  }
27454
27487
  }));
27455
- datePickerHead.find(".next").attr("aria-label", "Next Month " + this.next.fullMonth + " " + this.next.date.getFullYear());
27456
- datePickerHead.find(".previous").attr("aria-label", "Previous Month " + this.prev.fullMonth + " " + this.prev.date.getFullYear());
27488
+ datePickerHead.find(".next").attr("aria-label", "Next Month, " + this.next.fullMonth + " " + this.next.date.getFullYear());
27489
+ datePickerHead.find(".previous").attr("aria-label", "Previous Month, " + this.prev.fullMonth + " " + this.prev.date.getFullYear());
27490
+ setTimeout((function() {
27491
+ var currentNodes = datePickerHead.find(".current span");
27492
+ var msg = "Changed to month ";
27493
+ datePickerHead.find(".current").attr("aria-live", "assertive").attr("aria-atomic", "false");
27494
+ if (_this.clicked) {
27495
+ if ($(currentNodes[0]).text()) {
27496
+ datePickerHead.find(".ng-star-inserted").prepend('<div class="sr-only">' + msg + "</div>");
27497
+ }
27498
+ if ($(currentNodes[1]).text()) {
27499
+ datePickerHead.find(".current").last().prepend('<div class="sr-only"> and year </div>');
27500
+ }
27501
+ }
27502
+ }));
27457
27503
  };
27458
27504
  BaseDateTimeComponent.prototype.setFocusForMonthOrDay = function() {
27459
27505
  var activeMonthOrYear = $(".bs-datepicker-head .current").first().text();
@@ -27519,14 +27565,14 @@
27519
27565
  this.loadDays();
27520
27566
  this.setActiveDateFocus(this.activeDate);
27521
27567
  };
27568
+ BaseDateTimeComponent.prototype.setNextData = function(nextDate) {
27569
+ this.next = this.getMonth(nextDate, 1);
27570
+ this.prev = this.getMonth(nextDate, -1);
27571
+ };
27522
27572
  BaseDateTimeComponent.prototype.loadDays = function() {
27523
27573
  var _this = this;
27524
27574
  setTimeout((function() {
27525
27575
  $("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex", "0");
27526
- if (_this.clicked === false) {
27527
- _this.next = _this.getMonth(_this.activeDate, 1);
27528
- _this.prev = _this.getMonth(_this.activeDate, -1);
27529
- }
27530
27576
  _this.addKeyBoardEventsForDays();
27531
27577
  _this.addDatepickerMouseEvents();
27532
27578
  }));
@@ -27589,8 +27635,6 @@
27589
27635
  BaseDateTimeComponent.prototype.loadMonths = function() {
27590
27636
  var _this = this;
27591
27637
  setTimeout((function() {
27592
- var datePickerBody = $(".bs-datepicker-body");
27593
- datePickerBody.find("table.months span").attr("tabindex", "0");
27594
27638
  _this.addKeyBoardEventsForMonths();
27595
27639
  _this.addDatepickerMouseEvents();
27596
27640
  }));
@@ -27633,14 +27677,13 @@
27633
27677
  BaseDateTimeComponent.prototype.loadYears = function() {
27634
27678
  var _this = this;
27635
27679
  setTimeout((function() {
27636
- var datePickerBody = $(".bs-datepicker-body");
27637
- datePickerBody.find("table.years span").attr("tabindex", "0");
27638
27680
  _this.addKeyBoardEventsForYears();
27639
27681
  _this.addDatepickerMouseEvents();
27640
27682
  }));
27641
27683
  };
27642
27684
  BaseDateTimeComponent.prototype.setActiveMonthFocus = function(newDate, isMoouseEvent) {
27643
27685
  var _this = this;
27686
+ this.setNextData(newDate);
27644
27687
  var newMonth = months[newDate.getMonth()];
27645
27688
  if (!isMoouseEvent) {
27646
27689
  if (newDate.getFullYear() < this.activeDate.getFullYear()) {
@@ -27650,6 +27693,8 @@
27650
27693
  }
27651
27694
  }
27652
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");
27653
27698
  $(".bs-datepicker-body table.months span:contains(" + newMonth + ")").focus();
27654
27699
  _this.activeDate = newDate;
27655
27700
  }));
@@ -27698,6 +27743,8 @@
27698
27743
  }
27699
27744
  }
27700
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");
27701
27748
  $(".bs-datepicker-body table.years span:contains(" + newYear + ")").focus();
27702
27749
  _this.activeDate = newDate;
27703
27750
  }));
@@ -27864,11 +27911,6 @@
27864
27911
  children[i].classList.remove("add-opacity");
27865
27912
  }
27866
27913
  displayInputElem.classList.remove("remove-opacity");
27867
- var allDateTimeElements = this.nativeElement.getElementsByTagName("*");
27868
- for (var i = 0; i < allDateTimeElements.length; i++) {
27869
- allDateTimeElements[i].setAttribute("tabindex", this.tabindex);
27870
- }
27871
- displayInputElem.removeAttribute("tabindex");
27872
27914
  }
27873
27915
  };
27874
27916
  BaseDateTimeComponent.prototype.onDateTimeInputFocus = function(skipFocus) {
@@ -27885,11 +27927,6 @@
27885
27927
  children[i].classList.add("add-opacity");
27886
27928
  }
27887
27929
  displayInputElem.classList.add("remove-opacity");
27888
- var allDateTimeElements = this.nativeElement.getElementsByTagName("*");
27889
- for (var i = 0; i < allDateTimeElements.length; i++) {
27890
- allDateTimeElements[i].setAttribute("tabindex", "-1");
27891
- }
27892
- displayInputElem.setAttribute("tabindex", this.tabindex);
27893
27930
  return;
27894
27931
  }
27895
27932
  if (displayInputElem && this._triggeredByUser) {
@@ -27972,7 +28009,10 @@
27972
28009
  this.isReadOnly = this.dataentrymode != "undefined" && !this.isDataEntryModeEnabledOnInput(this.dataentrymode);
27973
28010
  var mobileInput = this.getMobileInput();
27974
28011
  if (mobileInput) {
27975
- mobileInput.style.width = mobileInput.parentElement.clientWidth + "px";
28012
+ setTimeout((function() {
28013
+ mobileInput.style.width = "100%";
28014
+ mobileInput.style.height = "100%";
28015
+ }));
27976
28016
  }
27977
28017
  };
27978
28018
  BaseDateTimeComponent.prototype.ngOnDestroy = function() {
@@ -28235,7 +28275,7 @@
28235
28275
  if (this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
28236
28276
  event.stopPropagation();
28237
28277
  var action = this.keyEventPlugin.constructor.getEventFullKey(event);
28238
- if (action === "enter" || action === "arrowdown") {
28278
+ if (action === "enter") {
28239
28279
  var newVal = core$1.getDateObj(event.target.value, {
28240
28280
  pattern: this.datepattern
28241
28281
  });
@@ -28277,7 +28317,7 @@
28277
28317
  type: core.Component,
28278
28318
  args: [ {
28279
28319
  selector: "[wmDate]",
28280
- template: ' <input class="form-control app-textbox app-dateinput display-input"\n focus-target\n type="text"\n [name]="name"\n [tabindex]="tabindex"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n [disabled]="disabled || readonly"\n [autofocus]="autofocus"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n (change)="onDisplayDateChange($event)"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event);">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isOpen"\n #datepicker="bsDatepicker"\n bsDatepicker\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n placement="bottom right"\n [isDisabled]="disabled || readonly"\n [bsValue]="bsDataValue"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n (bsValueChange)="onDateChange($event)">\n</div>\n\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n mode="DATE"\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDataValue"\n (change)="onDateChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n tabindex="1000000"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event);"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\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',
28281
28321
  providers: [ base.provideAs(DateComponent, forms.NG_VALUE_ACCESSOR, true), base.provideAs(DateComponent, forms.NG_VALIDATORS, true), base.provideAsWidgetRef(DateComponent) ]
28282
28322
  } ]
28283
28323
  } ];
@@ -28729,7 +28769,7 @@
28729
28769
  type: core.Component,
28730
28770
  args: [ {
28731
28771
  selector: "[wmDateTime]",
28732
- 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="1000000"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event)"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\n',
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',
28733
28773
  providers: [ base.provideAs(DatetimeComponent, forms.NG_VALUE_ACCESSOR, true), base.provideAs(DatetimeComponent, forms.NG_VALIDATORS, true), base.provideAsWidgetRef(DatetimeComponent), {
28734
28774
  provide: timepicker.TimepickerConfig,
28735
28775
  deps: [ core$1.AbstractI18nService ],
@@ -33596,9 +33636,10 @@
33596
33636
  };
33597
33637
  var MenuComponent = function(_super) {
33598
33638
  __extends(MenuComponent, _super);
33599
- function MenuComponent(inj, route, userDefinedExecutionContext, bsDropdown, parentNav, selectEventCB) {
33639
+ function MenuComponent(inj, route, app, userDefinedExecutionContext, bsDropdown, parentNav, selectEventCB) {
33600
33640
  var _this = _super.call(this, inj, WIDGET_CONFIG$1) || this;
33601
33641
  _this.route = route;
33642
+ _this.app = app;
33602
33643
  _this.userDefinedExecutionContext = userDefinedExecutionContext;
33603
33644
  _this.bsDropdown = bsDropdown;
33604
33645
  _this.parentNav = parentNav;
@@ -33612,6 +33653,9 @@
33612
33653
  }
33613
33654
  var datasetSubscription = _this.nodes$.subscribe((function() {
33614
33655
  if (!_.isEmpty(_this.nodes)) {
33656
+ if (base.hasLinkToCurrentPage(_this.nodes, _this.route.url)) {
33657
+ core.addClass(_this.nativeElement.querySelector(".dropdown-toggle"), "active");
33658
+ }
33615
33659
  if (_this.parentNav) {
33616
33660
  return;
33617
33661
  }
@@ -33686,26 +33730,22 @@
33686
33730
  }
33687
33731
  $event.preventDefault();
33688
33732
  };
33689
- MenuComponent.prototype.hasLinkToCurrentPage = function(nodes) {
33690
- var _this = this;
33691
- return nodes.some((function(node) {
33692
- if (base.isActiveNavItem(node.link, _this.route.url)) {
33693
- return true;
33694
- }
33695
- if (node.children) {
33696
- return _this.hasLinkToCurrentPage(node.children);
33697
- }
33698
- }));
33699
- };
33700
33733
  MenuComponent.prototype.resetNodes = function() {
33701
33734
  _super.prototype.resetNodes.call(this);
33702
- if (this.autoopen === AUTO_OPEN.ACTIVE_PAGE && this.hasLinkToCurrentPage(this.nodes) || this.autoopen === AUTO_OPEN.ALWAYS) {
33735
+ if (this.autoopen === AUTO_OPEN.ACTIVE_PAGE && base.hasLinkToCurrentPage(this.nodes, this.route.url) || this.autoopen === AUTO_OPEN.ALWAYS) {
33703
33736
  this.bsDropdown.show();
33704
33737
  }
33705
33738
  };
33706
33739
  MenuComponent.prototype.ngOnInit = function() {
33740
+ var _this = this;
33707
33741
  _super.prototype.ngOnInit.call(this);
33708
33742
  this.setMenuPosition();
33743
+ var cancelSubscription = this.app.subscribe("highlightActiveLink", (function(data) {
33744
+ core.toggleClass(_this.nativeElement.querySelector(".dropdown-toggle"), "active", base.hasLinkToCurrentPage(_this.nodes, _this.route.url));
33745
+ }));
33746
+ this.registerDestroyListener((function() {
33747
+ return cancelSubscription();
33748
+ }));
33709
33749
  };
33710
33750
  MenuComponent.prototype.onPropertyChange = function(key, nv, ov) {
33711
33751
  if (key === "tabindex") {
@@ -33776,6 +33816,8 @@
33776
33816
  type: core$1.Injector
33777
33817
  }, {
33778
33818
  type: router.Router
33819
+ }, {
33820
+ type: core.App
33779
33821
  }, {
33780
33822
  type: core.UserDefinedExecutionContext
33781
33823
  }, {
@@ -33893,8 +33935,9 @@
33893
33935
  VERTICAL: "vertical"
33894
33936
  };
33895
33937
  var MenuDropdownItemComponent = function() {
33896
- function MenuDropdownItemComponent(menuRef, userDefinedExecutionContext, parentNav, elRef) {
33938
+ function MenuDropdownItemComponent(app, menuRef, userDefinedExecutionContext, parentNav, elRef) {
33897
33939
  var _this = this;
33940
+ this.app = app;
33898
33941
  this.menuRef = menuRef;
33899
33942
  this.userDefinedExecutionContext = userDefinedExecutionContext;
33900
33943
  this.parentNav = parentNav;
@@ -33920,10 +33963,14 @@
33920
33963
  this.menualign = menuAlignClass[this.menuRef.menualign] || menuAlignClass["pull-left"];
33921
33964
  }
33922
33965
  MenuDropdownItemComponent.prototype.ngOnInit = function() {
33966
+ var _this = this;
33923
33967
  if (this.parentNav) {
33924
- if (base.isActiveNavItem(this.item.link, this.menuRef.route.url)) {
33968
+ if (base.hasLinkToCurrentPage([ this.item ], this.menuRef.route.url)) {
33925
33969
  core.addClass(this.nativeElement, "active");
33926
33970
  }
33971
+ this.highlightActiveLinkSubscription = this.app.subscribe("highlightActiveLink", (function(data) {
33972
+ core.toggleClass(_this.nativeElement, "active", base.hasLinkToCurrentPage([ _this.item ], _this.menuRef.route.url));
33973
+ }));
33927
33974
  }
33928
33975
  };
33929
33976
  MenuDropdownItemComponent.prototype.getInitialKeyMovements = function() {
@@ -33992,6 +34039,11 @@
33992
34039
  $event.stopPropagation();
33993
34040
  }
33994
34041
  };
34042
+ MenuDropdownItemComponent.prototype.ngOnDestroy = function() {
34043
+ if (this.highlightActiveLinkSubscription) {
34044
+ this.highlightActiveLinkSubscription();
34045
+ }
34046
+ };
33995
34047
  return MenuDropdownItemComponent;
33996
34048
  }();
33997
34049
  MenuDropdownItemComponent.decorators = [ {
@@ -34003,6 +34055,8 @@
34003
34055
  } ];
34004
34056
  MenuDropdownItemComponent.ctorParameters = function() {
34005
34057
  return [ {
34058
+ type: core.App
34059
+ }, {
34006
34060
  type: MenuComponent
34007
34061
  }, {
34008
34062
  type: core.UserDefinedExecutionContext
@@ -35687,6 +35741,9 @@
35687
35741
  return _this.hidePopover();
35688
35742
  };
35689
35743
  }
35744
+ setTimeout((function() {
35745
+ _this.anchorRef.nativeElement.removeAttribute("aria-describedby");
35746
+ }));
35690
35747
  var deRegister = this.eventManager.addEventListener(popoverContainer, "keydown.esc", (function() {
35691
35748
  _this.isOpen = false;
35692
35749
  _this.setFocusToPopoverLink();
@@ -35717,7 +35774,6 @@
35717
35774
  return _this.close();
35718
35775
  };
35719
35776
  }
35720
- core.setAttr(popoverContainer, "tabindex", 0);
35721
35777
  setTimeout((function() {
35722
35778
  return popoverStartBtn.focus();
35723
35779
  }), 50);
@@ -36393,16 +36449,24 @@
36393
36449
  _this.dialogService = inj.get(core.AbstractDialogService);
36394
36450
  _this.bsModal = inj.get(modal.BsModalService);
36395
36451
  var router$1 = inj.get(router.Router);
36396
- var subscriptions = [ _this.bsModal.onShown.subscribe((function() {
36452
+ var subscriptions = [ _this.bsModal.onShown.subscribe((function(_a) {
36453
+ var id = _a.id;
36397
36454
  var ref = _this.dialogService.getLastOpenedDialog();
36398
- if (ref === _this) {
36455
+ if (ref === _this && !_this.dialogId) {
36399
36456
  invokeOpenedCallback(ref);
36457
+ _this.dialogId = id;
36400
36458
  }
36401
36459
  })), _this.bsModal.onShow.subscribe((function() {
36402
36460
  focusTrapObj.activeElement = document.activeElement;
36403
36461
  })), _this.bsModal.onHidden.subscribe((function(closeReason) {
36404
- var ref = closeReason === "esc" || closeReason === "backdrop-click" ? _this.dialogService.getLastOpenedDialog() : _this.dialogService.getDialogRefFromClosedDialogs();
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
+ }
36405
36468
  if (ref === _this) {
36469
+ _this.dialogId = null;
36406
36470
  _this.dialogService.removeFromOpenedDialogs(ref);
36407
36471
  _this.dialogService.removeFromClosedDialogs(ref);
36408
36472
  invokeClosedCallback(ref);
@@ -36441,6 +36505,10 @@
36441
36505
  Object.assign(this.context, initState);
36442
36506
  this.modalOptions.ariaLabelledBy = this.titleId;
36443
36507
  this.dialogRef = this.bsModal.show(this.getTemplateRef(), this.modalOptions);
36508
+ if (this.dialogService.getOpenedDialogs().length === 1 && (core.isMobile() || core.isMobileApp())) {
36509
+ var parentSelector = $("body > app-root")[0];
36510
+ parentSelector.setAttribute("aria-hidden", "true");
36511
+ }
36444
36512
  };
36445
36513
  BaseDialog.prototype.close = function() {
36446
36514
  if (this.dialogRef) {
@@ -42272,11 +42340,31 @@
42272
42340
  $index: _this.dn.currentPage
42273
42341
  });
42274
42342
  _this.goToPage();
42343
+ if (_this.navigation === "Basic") {
42344
+ _this._setAriaForBasicNavigation();
42345
+ }
42275
42346
  }
42276
42347
  }), base.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME);
42277
42348
  base.styler(_this.nativeElement, _this);
42278
42349
  return _this;
42279
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
+ };
42280
42368
  PaginationComponent.prototype.setResult = function(result) {
42281
42369
  this.result = result;
42282
42370
  this.resultEmitter.emit(this.result);
@@ -42338,7 +42426,7 @@
42338
42426
  }
42339
42427
  this.isDisableCurrent = isCurrentPageFirst && isCurrentPageLast;
42340
42428
  if (this.dataset && this.dataset.length && this.isDisableNext && this.parent.onDemandLoad && this.parent.widgetType === "wm-table") {
42341
- this.parent.callDataGridMethod("hideLoadingIndicator", this.isDisableNext, false);
42429
+ this.parent.callDataGridMethod("hideLoadingIndicator", this.isDisableNext, this.parent.infScroll);
42342
42430
  }
42343
42431
  };
42344
42432
  PaginationComponent.prototype.isDataSourceHasPaging = function() {
@@ -42393,9 +42481,7 @@
42393
42481
  this.resetPageNavigation();
42394
42482
  }
42395
42483
  if (this.navigation === "Basic") {
42396
- _.forEach(this.nativeElement.getElementsByTagName("a"), (function(item) {
42397
- item.setAttribute("href", "javascript:void(0);");
42398
- }));
42484
+ this._setAriaForBasicNavigation();
42399
42485
  }
42400
42486
  } else {
42401
42487
  if (newVal && !_.isString(newVal)) {
@@ -42672,7 +42758,7 @@
42672
42758
  type: core.Component,
42673
42759
  args: [ {
42674
42760
  selector: "[wmPagination]",
42675
- 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);" aria-label="First"\n (click)="navigatePage(\'first\', $event)">\n <span aria-hidden="true"><i class="wi wi-first-page"></i></span>\n <span class="sr-only">{{appLocale.LABEL_FIRST}}</span>\n </a>\n </li>\n <li [ngClass]="{\'disabled\':isDisablePrevious}">\n <a [title]="appLocale.LABEL_PREVIOUS" name="prev" href="javascript:void(0);" aria-label="Previous"\n (click)="navigatePage(\'prev\', $event)">\n <span aria-hidden="true"><i class="wi wi-chevron-left"></i></span>\n <span class="sr-only">{{appLocale.LABEL_PREVIOUS}}</span>\n </a>\n </li>\n <li class="pagecount disabled">\n <a><input type="number" [disabled]="isDisableCurrent" [(ngModel)]="dn.currentPage" [attr.aria-label]="\'Page Navigation \' + dn.currentPage"\n (keydown)="onKeyDown($event)" (change)="onModelChange($event)" class="form-control"/></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);" aria-label="Next"\n (click)="navigatePage(\'next\', $event)">\n <span aria-hidden="true"><i class="wi wi-chevron-right"></i></span>\n <span class="sr-only">{{appLocale.LABEL_NEXT}}</span>\n </a>\n </li>\n <li [ngClass]="{\'disabled\':isDisableLast}">\n <a [title]="appLocale.LABEL_LAST" name="last" href="javascript:void(0);" aria-label="Last"\n (click)="navigatePage(\'last\', $event)">\n <span aria-hidden="true"><i class="wi wi-last-page"></i></span>\n <span class="sr-only">{{appLocale.LABEL_LAST}}</span>\n </a>\n </li>\n <li *ngIf="showrecordcount" class="totalcount disabled">\n <a>{{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)" aria-label="Previous">\n <span aria-hidden="true"><i class="wi wi-chevron-left"></i></span>\n {{appLocale.LABEL_PREVIOUS}}\n <span class="sr-only">{{appLocale.LABEL_PREVIOUS}}</span>\n </a>\n </li>\n <li class="next" [ngClass]="{\'disabled\':isDisableNext}">\n <a href="javascript:void(0);" (click)="navigatePage(\'next\', $event)" aria-label="Next">\n {{appLocale.LABEL_NEXT}}\n <span aria-hidden="true"><i class="wi wi-chevron-right"></i></span>\n <span class="sr-only">{{appLocale.LABEL_NEXT}}</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]="\'Page \' + dn.currentPage + \' of \' + pageCount + \' pages\'"\n [boundaryLinks]="boundarylinks" [maxSize]="maxsize"\n [directionLinks]="directionlinks" previousText="." nextText="." firstText="." lastText="."></pagination>\n\n<ul *ngIf="navcontrols === \'Basic\' && showrecordcount" class="pagination">\n <li class="totalcount disabled basiccount"><a>{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a></li>\n</ul>\n',
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',
42676
42762
  providers: [ base.provideAsWidgetRef(PaginationComponent) ]
42677
42763
  } ]
42678
42764
  } ];
@@ -44611,9 +44697,9 @@
44611
44697
  }
44612
44698
  }
44613
44699
  };
44614
- ListComponent.prototype.onUpdate = function(evt, ui) {
44700
+ ListComponent.prototype.onUpdate = function(evt, ui, presentIndex) {
44615
44701
  var data = this.fieldDefs;
44616
- var newIndex = ui.item.index();
44702
+ var newIndex = ui === undefined ? presentIndex : ui.item.index();
44617
44703
  var oldIndex = this.$ulEle.data("oldIndex");
44618
44704
  var minIndex = _.min([ newIndex, oldIndex ]);
44619
44705
  var maxIndex = _.max([ newIndex, oldIndex ]);
@@ -44705,9 +44791,9 @@
44705
44791
  return this.datasource.execute(operation, options);
44706
44792
  };
44707
44793
  ListComponent.prototype.handleKeyDown = function($event, action) {
44708
- var _this = this;
44794
+ var _d, _e;
44709
44795
  $event.stopPropagation();
44710
- if ($event.keyCode !== 13 && $event.keyCode !== 9 && !($event.target.classList.contains("form-control") && $event.keyCode === 32)) {
44796
+ if ($event.keyCode !== 13 && $event.keyCode !== 9 && !(($event.target.classList.contains("form-control") || $event.target.classList.contains("note-editable")) && $event.keyCode === 32)) {
44711
44797
  $event.preventDefault();
44712
44798
  }
44713
44799
  var listItems = this.listItems;
@@ -44747,27 +44833,21 @@
44747
44833
  }
44748
44834
  if (action === "focusPrev") {
44749
44835
  if (this.isListElementMovable) {
44750
- var prev_1;
44751
44836
  presentIndex = presentIndex <= 0 ? 0 : presentIndex;
44752
- this.lastSelectedItem = this.getListItemByIndex(presentIndex);
44753
44837
  if (presentIndex === 0) {
44754
- prev_1 = this.listItems.last;
44755
44838
  return;
44756
44839
  }
44757
- this.listItems.forEach((function($liItem, idx) {
44758
- if (idx === presentIndex) {
44759
- prev_1.nativeElement.before($liItem.nativeElement);
44760
- _this.lastSelectedItem.nativeElement.focus();
44761
- var arr = _this.listItems.toArray();
44762
- var temp = arr[presentIndex];
44763
- arr[presentIndex] = arr[presentIndex - 1];
44764
- arr[presentIndex - 1] = temp;
44765
- _this.listItems.reset(arr);
44766
- _this.currentIndex = presentIndex;
44767
- _this.ariaText = "selected ";
44768
- }
44769
- prev_1 = $liItem;
44770
- }));
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 ";
44771
44851
  } else {
44772
44852
  presentIndex = presentIndex <= 0 ? 0 : presentIndex - 1;
44773
44853
  this.lastSelectedItem = this.getListItemByIndex(presentIndex);
@@ -44777,27 +44857,21 @@
44777
44857
  }
44778
44858
  } else if (action === "focusNext") {
44779
44859
  if (this.isListElementMovable) {
44780
- var prev_2;
44781
44860
  presentIndex = presentIndex < listItems.length - 1 ? presentIndex : listItems.length - 1;
44782
- this.lastSelectedItem = this.getListItemByIndex(presentIndex);
44783
44861
  if (presentIndex === this.listItems.length - 1) {
44784
- prev_2 = this.listItems.first;
44785
44862
  return;
44786
44863
  }
44787
- this.listItems.forEach((function($liItem, idx) {
44788
- if (idx === presentIndex + 1) {
44789
- prev_2.nativeElement.before($liItem.nativeElement);
44790
- _this.lastSelectedItem.nativeElement.focus();
44791
- var arr = _this.listItems.toArray();
44792
- var temp = arr[presentIndex + 1];
44793
- arr[presentIndex + 1] = arr[presentIndex];
44794
- arr[presentIndex] = temp;
44795
- _this.listItems.reset(arr);
44796
- _this.currentIndex = idx + 1;
44797
- _this.ariaText = "selected ";
44798
- }
44799
- prev_2 = $liItem;
44800
- }));
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 ";
44801
44875
  } else {
44802
44876
  presentIndex = presentIndex < listItems.length - 1 ? presentIndex + 1 : listItems.length - 1;
44803
44877
  this.lastSelectedItem = this.getListItemByIndex(presentIndex);
@@ -44819,11 +44893,12 @@
44819
44893
  this.isListElementMovable = !this.isListElementMovable;
44820
44894
  this.onItemClick($event, this.getListItemByIndex(presentIndex));
44821
44895
  this.currentIndex = presentIndex + 1;
44822
- var name = this.getListItemByIndex(presentIndex).item.name;
44823
44896
  if (this.isListElementMovable) {
44824
- this.ariaText = name + " grabbed, current position ";
44897
+ this.ariaText = "Item " + this.currentIndex + " grabbed, current position ";
44898
+ this.$ulEle.data("oldIndex", presentIndex);
44825
44899
  } else {
44826
- this.ariaText = name + " dropped, final position ";
44900
+ this.ariaText = "Item " + this.currentIndex + " dropped, final position ";
44901
+ this.onUpdate($event, undefined, presentIndex);
44827
44902
  }
44828
44903
  }
44829
44904
  };
@@ -44868,10 +44943,12 @@
44868
44943
  this.dataNavigator.widget.maxResults = nv;
44869
44944
  this.dataNavigator.maxResults = nv;
44870
44945
  } else if (key === "enablereorder") {
44871
- if (nv) {
44946
+ if (nv && this.$ulEle) {
44947
+ this.$ulEle.attr("aria-describedby", this.titleId);
44872
44948
  this.configureDnD();
44873
44949
  this.$ulEle.sortable("enable");
44874
44950
  } else if (this.$ulEle && !nv) {
44951
+ this.$ulEle.removeAttr("aria-describedby");
44875
44952
  this.$ulEle.sortable("disable");
44876
44953
  }
44877
44954
  } else {
@@ -45025,9 +45102,18 @@
45025
45102
  _super.prototype.ngAfterViewInit.call(_this);
45026
45103
  _this.setUpCUDHandlers();
45027
45104
  _this.selectedItemWidgets = _this.multiselect ? [] : {};
45105
+ var ele = $(_this.nativeElement).find(".app-livelist-container");
45028
45106
  if (_this.enablereorder && !_this.groupby) {
45107
+ if (ele) {
45108
+ ele.attr("aria-describedby", _this.titleId);
45109
+ }
45029
45110
  _this.configureDnD();
45030
45111
  }
45112
+ if (!_this.enablereorder) {
45113
+ if (ele) {
45114
+ ele.removeAttr("aria-describedby");
45115
+ }
45116
+ }
45031
45117
  if (_this.groupby && _this.collapsible) {
45032
45118
  _this.handleHeaderClick = base.handleHeaderClick;
45033
45119
  _this.toggleAllHeaders = base.toggleAllHeaders.bind(undefined, _this);
@@ -45037,6 +45123,16 @@
45037
45123
  this.setupHandlers();
45038
45124
  var $ul = this.nativeElement.querySelector("ul.app-livelist-container");
45039
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
+ }
45040
45136
  if (core.isMobileApp() && $ul.querySelector(".app-list-item-action-panel")) {
45041
45137
  this._listAnimator = new ListAnimator(this);
45042
45138
  }
@@ -45061,7 +45157,7 @@
45061
45157
  type: core$1.Component,
45062
45158
  args: [ {
45063
45159
  selector: "div[wmList]",
45064
- 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<nav 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 <i class="wi wi-chevron-left" aria-hidden="true"></i>\n <span class="sr-only">Previous</span>\n </a>\n </li>\n </ul>\n</nav>\n<div *ngIf="navigation === \'Inline\' && !noDataFound" aria-live="polite" aria-atomic="true" class="sr-only"> {{\'Item \' + dataNavigator.dn.currentPage + \' of \' + dataNavigator.pageCount }}</div>\n\n<div>\n <div id={{titleId}} class="sr-only" >\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" 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<nav 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 <i class="wi wi-chevron-right" aria-hidden="true"></i>\n <span class="sr-only">Next</span>\n </a>\n </li>\n </ul>\n</nav>\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',
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',
45065
45161
  providers: [ base.provideAsWidgetRef(ListComponent) ]
45066
45162
  } ]
45067
45163
  } ];
@@ -45576,6 +45672,10 @@
45576
45672
  value: "No data found."
45577
45673
  }, base.PROP_STRING) ], [ "ondemandmessage", Object.assign({
45578
45674
  value: "Load More"
45675
+ }, base.PROP_STRING) ], [ "showviewlessbutton", Object.assign({
45676
+ value: false
45677
+ }, base.PROP_BOOLEAN) ], [ "viewlessmessage", Object.assign({
45678
+ value: "View Less"
45579
45679
  }, base.PROP_STRING) ], [ "pagesize", base.PROP_NUMBER ], [ "radioselect", base.PROP_BOOLEAN ], [ "rowclass", base.PROP_STRING ], [ "rowngclass", base.PROP_STRING ], [ "searchlabel", Object.assign({
45580
45680
  value: "Search"
45581
45681
  }, base.PROP_STRING) ], [ "show", Object.assign({
@@ -45656,6 +45756,7 @@
45656
45756
  _this.columns = {};
45657
45757
  _this.formfields = {};
45658
45758
  _this.enablesort = true;
45759
+ _this.showviewlessbutton = false;
45659
45760
  _this.primaryKey = [];
45660
45761
  _this.selectedItems = [];
45661
45762
  _this.selectedItemChange = new rxjs.Subject;
@@ -45676,6 +45777,7 @@
45676
45777
  _this.rowDef = {};
45677
45778
  _this.rowInstance = {};
45678
45779
  _this.fullFieldDefs = [];
45780
+ _this.variableInflight = true;
45679
45781
  _this.applyProps = new Map;
45680
45782
  _this.redraw = _.debounce(_this._redraw, 150);
45681
45783
  _this.debouncedHandleLoading = _.debounce(_this.handleLoading, 350);
@@ -45698,6 +45800,7 @@
45698
45800
  data: [],
45699
45801
  colDefs: [],
45700
45802
  startRowIndex: 1,
45803
+ mode: "",
45701
45804
  sortInfo: {
45702
45805
  field: "",
45703
45806
  direction: ""
@@ -45728,6 +45831,10 @@
45728
45831
  isSearchTrigerred: false,
45729
45832
  isDatasetUpdated: false,
45730
45833
  isDataUpdatedByUser: false,
45834
+ showviewlessbutton: false,
45835
+ ondemandmessage: "",
45836
+ viewlessmessage: "",
45837
+ loadingdatamsg: "",
45731
45838
  isNextPageData: undefined,
45732
45839
  ACTIONS: {
45733
45840
  DELETE: "delete",
@@ -45752,6 +45859,14 @@
45752
45859
  getPageSize: function() {
45753
45860
  return _this.pagesize;
45754
45861
  },
45862
+ getPageCount: function() {
45863
+ return _this.dataNavigator.pageCount;
45864
+ },
45865
+ enableNavigation: function() {
45866
+ _this.dataNavigator.widget.isDisableNext = false;
45867
+ _this.dataNavigator.widget.isDisableLast = false;
45868
+ _this.gridOptions.mode = "viewless";
45869
+ },
45755
45870
  setDeletedRowIndex: function(id) {
45756
45871
  _this.setDataGridOption("deletedRowIndex", id);
45757
45872
  },
@@ -45786,7 +45901,9 @@
45786
45901
  }
45787
45902
  _this.callDataGridMethod("selectRows", _this.items);
45788
45903
  _this.selectedItems = _this.callDataGridMethod("getSelectedRows");
45789
- _this.selectedItemChange.next(_this.selectedItems);
45904
+ if (_this.selectedItems.length) {
45905
+ _this.selectedItemChange.next(_this.selectedItems);
45906
+ }
45790
45907
  if (_this._isPageSearch && _this.filterInfo) {
45791
45908
  _this.searchSortHandler(_this.filterInfo, undefined, "search");
45792
45909
  }
@@ -45795,9 +45912,11 @@
45795
45912
  onRowSelect: function(row, e) {
45796
45913
  _this.ngZone.run((function() {
45797
45914
  _this.selectedItems = _this.callDataGridMethod("getSelectedRows");
45798
- _this.selectedItemChange.next(_this.selectedItems);
45915
+ if (_this.selectedItems.length) {
45916
+ _this.selectedItemChange.next(_this.selectedItems);
45917
+ }
45799
45918
  var rowData = _this.addRowIndex(row);
45800
- if (rowData.$index && _this.getConfiguredState() !== "none" && _this.dataNavigator && base.unsupportedStatePersistenceTypes.indexOf(_this.navigation) < 0) {
45919
+ if (_this.selectedItems.length && rowData.$index && _this.getConfiguredState() !== "none" && _this.dataNavigator && base.unsupportedStatePersistenceTypes.indexOf(_this.navigation) < 0) {
45801
45920
  var obj = {
45802
45921
  page: _this.dataNavigator.dn.currentPage,
45803
45922
  index: rowData.$index - 1
@@ -46237,9 +46356,14 @@
46237
46356
  _this.callDataGridMethod("addLoadMoreBtn", _this.ondemandmessage, _this.loadingdatamsg, (function($event) {
46238
46357
  _this.gridOptions.setIsNextPageData(true);
46239
46358
  _this.gridOptions.setIsDataUpdatedByUser(false);
46240
- _this.dataNavigator.navigatePage("next", $event);
46241
- _this.isDataLoading = true;
46242
- }));
46359
+ if (_this.gridOptions.mode === "viewless") {
46360
+ _this.dataNavigator.navigatePage("first", $event, true);
46361
+ _this.gridOptions.mode = "";
46362
+ } else {
46363
+ _this.dataNavigator.navigatePage("next", $event);
46364
+ _this.isDataLoading = true;
46365
+ }
46366
+ }), _this.infScroll);
46243
46367
  },
46244
46368
  bindScrollEvt: function() {
46245
46369
  if (_this._gridData && _this._gridData.length && _this.infScroll) {
@@ -46399,7 +46523,15 @@
46399
46523
  set: function(newValue) {
46400
46524
  var _a;
46401
46525
  this.isDataLoading = false;
46526
+ if (this.variableInflight && _.isEmpty(newValue)) {
46527
+ return;
46528
+ }
46402
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
+ }
46403
46535
  if (this.gridOptions.isNavTypeScrollOrOndemand()) {
46404
46536
  _a = __read(this.paginationService.updateFieldsOnPagination(this, newValue), 2),
46405
46537
  this._gridData = _a[0], this.currentPage = _a[1];
@@ -46517,6 +46649,10 @@
46517
46649
  this.gridOptions.securityUtils.pipeTransform = this.trustAsPipe;
46518
46650
  this.gridOptions.navigation = this.navigation;
46519
46651
  this.gridOptions.isdynamictable = this.isdynamictable;
46652
+ this.gridOptions.showviewlessbutton = this.showviewlessbutton;
46653
+ this.gridOptions.ondemandmessage = this.ondemandmessage;
46654
+ this.gridOptions.viewlessmessage = this.viewlessmessage;
46655
+ this.gridOptions.loadingdatamsg = this.loadingdatamsg;
46520
46656
  if (!_.isEmpty(this.gridData)) {
46521
46657
  this.gridOptions.data = core.getClonedObject(this.gridData);
46522
46658
  }
@@ -46848,6 +46984,9 @@
46848
46984
  };
46849
46985
  TableComponent.prototype.setGridData = function(serverData) {
46850
46986
  var data = this.filternullrecords ? this.removeEmptyRecords(serverData) : serverData;
46987
+ if (_.get(this.datasource, "category") === "wm.Variable") {
46988
+ this.variableInflight = false;
46989
+ }
46851
46990
  if (!this.variableInflight) {
46852
46991
  if (data && data.length === 0) {
46853
46992
  this.callDataGridMethod("setStatus", "nodata", this.nodatamessage);
@@ -47142,10 +47281,8 @@
47142
47281
  this.variableInflight = false;
47143
47282
  this.callDataGridMethod("setStatus", "nodata", this.nodatamessage);
47144
47283
  }
47145
- if (this.dataset) {
47146
- this.watchVariableDataSet(this.dataset);
47147
- this.onDataSourceChange();
47148
- }
47284
+ this.watchVariableDataSet(this.dataset);
47285
+ this.onDataSourceChange();
47149
47286
  break;
47150
47287
 
47151
47288
  case "dataset":
@@ -47254,6 +47391,11 @@
47254
47391
  if (nv) {
47255
47392
  this.$element.find(".on-demand-datagrid > a").text(nv);
47256
47393
  }
47394
+ this.gridOptions.ondemandmessage = nv;
47395
+ break;
47396
+
47397
+ case "viewlessmessage":
47398
+ this.gridOptions.viewlessmessage = nv;
47257
47399
  break;
47258
47400
 
47259
47401
  case "show":
@@ -50978,15 +51120,20 @@
50978
51120
  };
50979
51121
  };
50980
51122
  var \u02752 = findInvalidElement;
50981
- var setTouchedState = function(ngForm) {
51123
+ var setTouchedState = function(self, ngForm, fieldName) {
51124
+ var _a, _b;
50982
51125
  if (ngForm.valid) {
50983
51126
  return;
50984
51127
  }
50985
51128
  if (ngForm.controls) {
50986
- _.forEach(ngForm.controls, (function(ctrl) {
50987
- setTouchedState(ctrl);
51129
+ _.forEach(ngForm.controls, (function(ctrl, fieldName) {
51130
+ setTouchedState(self, ctrl, fieldName);
50988
51131
  }));
50989
51132
  } else {
51133
+ var element = self.$element.find('[wmformfield][key="' + fieldName + '"]');
51134
+ element[0].setAttribute("__errormsg", element[0].getAttribute("__validationId"));
51135
+ (_a = element[0].querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", ngForm.invalid);
51136
+ (_b = element[0].querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", element[0].getAttribute("__validationId"));
50990
51137
  ngForm.markAsTouched();
50991
51138
  }
50992
51139
  };
@@ -51283,7 +51430,7 @@
51283
51430
  }));
51284
51431
  };
51285
51432
  FormComponent.prototype.highlightInvalidFields = function() {
51286
- setTouchedState(this.ngform);
51433
+ setTouchedState(this, this.ngform, "");
51287
51434
  };
51288
51435
  FormComponent.prototype.validateFieldsOnSubmit = function() {
51289
51436
  this.setValidationMsgs();
@@ -51812,8 +51959,8 @@
51812
51959
  FormComponent.prototype.generateFormFields = function() {
51813
51960
  return __awaiter(this, void 0, void 0, (function() {
51814
51961
  var noOfColumns, $gridLayout, columnWidth, fieldTemplate, colCount, index, userFields, fields, colTmpl, componentFactoryRef, component;
51815
- return __generator(this, (function(_b) {
51816
- switch (_b.label) {
51962
+ return __generator(this, (function(_c) {
51963
+ switch (_c.label) {
51817
51964
  case 0:
51818
51965
  if (_.isUndefined(this._isGridLayoutPresent)) {
51819
51966
  this._isGridLayoutPresent = this.$element.find(".panel-body [wmlayoutgrid]").length > 0;
@@ -51872,7 +52019,7 @@
51872
52019
  }) ];
51873
52020
 
51874
52021
  case 1:
51875
- componentFactoryRef = _b.sent();
52022
+ componentFactoryRef = _c.sent();
51876
52023
  component = this.dynamicFormRef.createComponent(componentFactoryRef, 0, this.inj);
51877
52024
  core.extendProto(component.instance, this._dynamicContext);
51878
52025
  $gridLayout[0].appendChild(component.location.nativeElement);
@@ -52393,10 +52540,18 @@
52393
52540
  $($evt.target).closest(".live-field").addClass("active");
52394
52541
  };
52395
52542
  FormFieldDirective.prototype._onBlurField = function($evt) {
52396
- var _a, _b;
52543
+ var _a, _b, _c, _d;
52397
52544
  $($evt.target).closest(".live-field").removeClass("active");
52398
- (_a = this.nativeElement.querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", "" + this.ngform.controls[this._fieldName].invalid);
52399
- (_b = this.nativeElement.querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", "" + this.nativeElement.getAttribute("__errormsg"));
52545
+ var ele = this.nativeElement.querySelector("p.text-danger");
52546
+ if (this.ngform.controls[this._fieldName].invalid && this.ngform.controls[this._fieldName].touched && this.form.isUpdateMode) {
52547
+ this.nativeElement.setAttribute("__errormsg", "" + this.nativeElement.getAttribute("__validationId"));
52548
+ (_a = this.nativeElement.querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", "" + this.ngform.controls[this._fieldName].invalid);
52549
+ (_b = this.nativeElement.querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", "" + this.nativeElement.getAttribute("__validationId"));
52550
+ } else {
52551
+ this.nativeElement.removeAttribute("__errormsg");
52552
+ (_c = this.nativeElement.querySelector("input")) === null || _c === void 0 ? void 0 : _c.removeAttribute("aria-invalid");
52553
+ (_d = this.nativeElement.querySelector("input")) === null || _d === void 0 ? void 0 : _d.removeAttribute("aria-describedby");
52554
+ }
52400
52555
  this._activeField = false;
52401
52556
  this._triggeredByUser = false;
52402
52557
  this._clicktriggeredByUser = false;
@@ -52618,7 +52773,7 @@
52618
52773
  });
52619
52774
  };
52620
52775
  FormFieldDirective.prototype.onValueChange = function(val) {
52621
- var _a, _b;
52776
+ var _a, _b, _c, _d;
52622
52777
  if (!this.isDestroyed) {
52623
52778
  var captionEl = $(this.nativeElement).find(".caption-floating");
52624
52779
  if (captionEl.length > 0) {
@@ -52630,8 +52785,15 @@
52630
52785
  isFocused: this._activeField
52631
52786
  });
52632
52787
  }
52633
- (_a = this.nativeElement.querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", this._triggeredByUser && this.ngform.controls[this._fieldName].invalid ? "true" : "false");
52634
- (_b = this.nativeElement.querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", "" + this.nativeElement.getAttribute("__errormsg"));
52788
+ if (this.ngform.controls[this._fieldName].invalid && this.ngform.controls[this._fieldName].touched && this.form.isUpdateMode) {
52789
+ this.nativeElement.setAttribute("__errormsg", "" + this.nativeElement.getAttribute("__validationId"));
52790
+ (_a = this.nativeElement.querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", this._triggeredByUser && this.ngform.controls[this._fieldName].invalid ? "true" : "false");
52791
+ (_b = this.nativeElement.querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", "" + this.nativeElement.getAttribute("__validationId"));
52792
+ } else {
52793
+ this.nativeElement.removeAttribute("__errormsg");
52794
+ (_c = this.nativeElement.querySelector("input")) === null || _c === void 0 ? void 0 : _c.removeAttribute("aria-invalid");
52795
+ (_d = this.nativeElement.querySelector("input")) === null || _d === void 0 ? void 0 : _d.removeAttribute("aria-describedby");
52796
+ }
52635
52797
  this.form.onFieldValueChange(this, val);
52636
52798
  this.notifyChanges();
52637
52799
  if (this.$element.find(".active").length > 0 || this.form.touched) {
@@ -58298,40 +58460,36 @@
58298
58460
  var TabsAnimator = function(_super) {
58299
58461
  __extends(TabsAnimator, _super);
58300
58462
  function TabsAnimator(tabs) {
58301
- var e_1, _a;
58302
58463
  var _this = _super.call(this) || this;
58303
58464
  _this.tabs = tabs;
58304
58465
  _this._$el = $(_this.tabs.getNativeElement()).find(">.tab-content");
58305
- var childEls = _this._$el.find(">[wmTabPane]");
58306
- _this._noOfTabs = childEls.length;
58307
- var maxWidth = _this._noOfTabs * 100 + "%";
58308
- core.addClass(_this.tabs.getNativeElement(), "has-transition");
58309
- core.setCSSFromObj(_this._$el[0], {
58310
- maxWidth: maxWidth,
58311
- width: maxWidth
58312
- });
58313
- var width = 100 / _this._noOfTabs + "%";
58314
- try {
58315
- for (var _b = __values(Array.from(childEls)), _c = _b.next(); !_c.done; _c = _b.next()) {
58316
- var child = _c.value;
58317
- core.setCSS(child, "width", width);
58318
- }
58319
- } catch (e_1_1) {
58320
- e_1 = {
58321
- error: e_1_1
58322
- };
58323
- } finally {
58324
- try {
58325
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
58326
- } finally {
58327
- if (e_1) throw e_1.error;
58328
- }
58329
- }
58330
58466
  _this.init(_this._$el);
58331
58467
  return _this;
58332
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
+ };
58333
58491
  TabsAnimator.prototype.bounds = function() {
58334
- var activeTabIndex = this.tabs.getActiveTabIndex(), w = this._$el.find(">.tab-pane").first().width(), noOfTabs = this._$el.find(">.tab-pane:visible").length, centerVal = -1 * activeTabIndex * w;
58492
+ var _a = this.calibrate(), activeTabIndex = _a.activeTabIndex, noOfTabs = _a.noOfTabs, panes = _a.panes, w = $(panes[0]).width(), centerVal = -1 * activeTabIndex * w;
58335
58493
  this.clearContentFocus();
58336
58494
  return {
58337
58495
  strict: false,
@@ -58358,8 +58516,18 @@
58358
58516
  }
58359
58517
  };
58360
58518
  TabsAnimator.prototype.transitionTabIntoView = function() {
58361
- var activeTabIndex = this.tabs.getActiveTabIndex();
58362
- core.setCSS(this._$el[0], "transform", "translate3d(" + -1 * activeTabIndex / this._noOfTabs * 100 + "%, 0, 0)");
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)");
58363
58531
  };
58364
58532
  TabsAnimator.prototype.onUpper = function($event) {
58365
58533
  this.tabs.prev($event);
@@ -58485,6 +58653,7 @@
58485
58653
  };
58486
58654
  TabPaneComponent.prototype.onPropertyChange = function(key, nv, ov) {
58487
58655
  var _this = this;
58656
+ var _a;
58488
58657
  if (key === "content") {
58489
58658
  if (this.isActive) {
58490
58659
  setTimeout((function() {
@@ -58495,6 +58664,10 @@
58495
58664
  this.nativeElement.hidden = !nv;
58496
58665
  if (this._isFirstLoad) {
58497
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();
58498
58671
  }
58499
58672
  this._isFirstLoad = false;
58500
58673
  } else {
@@ -67450,10 +67623,10 @@
67450
67623
  }));
67451
67624
 
67452
67625
  (function(global, factory) {
67453
- 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,
67454
67627
  factory((global.wm = global.wm || {}, global.wm.mobile = global.wm.mobile || {},
67455
- 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));
67456
- })(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) {
67457
67630
  "use strict";
67458
67631
  var PageContentLoaderComponent = function() {
67459
67632
  function PageContentLoaderComponent(el) {
@@ -67475,18 +67648,30 @@
67475
67648
  } ];
67476
67649
  };
67477
67650
  var MobilePageDirective = function() {
67478
- function MobilePageDirective(app, elRef, deviceService, page, navigationService) {
67651
+ function MobilePageDirective(app, elRef, modalService, deviceService, page, navigationService) {
67479
67652
  var _this = this;
67653
+ this.modalService = modalService;
67480
67654
  this.deviceService = deviceService;
67481
67655
  this.page = page;
67482
67656
  this.navigationService = navigationService;
67657
+ this.subscriptions = [];
67483
67658
  core.addClass(elRef.nativeElement, "mobile-app-page");
67484
67659
  this._$ele = $(elRef.nativeElement);
67485
67660
  page.subscribe("wmMobileTabbar:ready", (function() {
67486
67661
  return _this._$ele.addClass("has-tabbar");
67487
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
+ })) ];
67488
67671
  this._backBtnListenerDestroyer = deviceService.onBackButtonTap((function($event) {
67489
- if (app.landingPageName === app.activePageName) {
67672
+ if (modalsOpened.length > 0) {
67673
+ modalService.hide(modalsOpened.pop());
67674
+ } else if (app.landingPageName === app.activePageName) {
67490
67675
  window.navigator["app"].exitApp();
67491
67676
  } else {
67492
67677
  _this.navigationService.goToPrevious();
@@ -67495,6 +67680,9 @@
67495
67680
  }));
67496
67681
  }
67497
67682
  MobilePageDirective.prototype.ngOnDestroy = function() {
67683
+ this.subscriptions.map((function(s) {
67684
+ return s.unsubscribe();
67685
+ }));
67498
67686
  this._backBtnListenerDestroyer();
67499
67687
  };
67500
67688
  return MobilePageDirective;
@@ -67510,6 +67698,8 @@
67510
67698
  type: core.App
67511
67699
  }, {
67512
67700
  type: core$1.ElementRef
67701
+ }, {
67702
+ type: modal.BsModalService
67513
67703
  }, {
67514
67704
  type: core$2.DeviceService
67515
67705
  }, {
@@ -71392,11 +71582,11 @@
71392
71582
  }
71393
71583
  };
71394
71584
  NotificationActionManager.prototype.notifyViaDialog = function(variable, options) {
71395
- var commonPageDialogId = "Common" + _.capitalize(variable.operation) + "Dialog", variableOwner = variable.owner, dialogId = variableOwner === VARIABLE_CONSTANTS.OWNER.APP ? commonPageDialogId : "notification" + variable.operation + "dialog";
71585
+ var commonPageDialogId = "Common" + _.capitalize(variable.operation) + "Dialog", dialogId = commonPageDialogId;
71396
71586
  var closeCallBackFn = function() {
71397
71587
  return initiateCallback("onOk", variable, options.data);
71398
71588
  };
71399
- exports.dialogService.open(dialogId, variable._context, {
71589
+ exports.dialogService.open(dialogId, undefined, {
71400
71590
  notification: {
71401
71591
  title: options.title || variable.dataBinding.title,
71402
71592
  text: options.message || variable.dataBinding.text,
@@ -71404,11 +71594,11 @@
71404
71594
  cancelButtonText: options.cancelButtonText || variable.dataBinding.cancelButtonText || "CANCEL",
71405
71595
  alerttype: options.alerttype || variable.dataBinding.alerttype || "information",
71406
71596
  onOk: function() {
71407
- exports.dialogService.close(dialogId, variable._context, closeCallBackFn);
71597
+ exports.dialogService.close(dialogId, undefined, closeCallBackFn);
71408
71598
  },
71409
71599
  onCancel: function() {
71410
71600
  initiateCallback("onCancel", variable, options.data);
71411
- exports.dialogService.close(dialogId, variable._context);
71601
+ exports.dialogService.close(dialogId, undefined);
71412
71602
  },
71413
71603
  onClose: function() {
71414
71604
  initiateCallback("onClose", variable, options.data);
@@ -72843,6 +73033,13 @@
72843
73033
  type: core.AbstractHttpService
72844
73034
  } ];
72845
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
+ }();
72846
73043
  var VariablesService = function() {
72847
73044
  function VariablesService(httpService, metadataService, navigationService, routerService, toasterService, oAuthService, securityService, dialogService) {
72848
73045
  this.httpService = httpService;
@@ -72949,6 +73146,7 @@
72949
73146
  if (this.isVariableSeperated(variablesJson, variableName)) {
72950
73147
  this.processBinding(varInstance, scope, "dataBinding", this.getBindSourceTarget(varInstance));
72951
73148
  varInstance.httpService = this.httpService;
73149
+ varInstance.dateFormatter = new Formatter;
72952
73150
  varInstance.subscribe("afterInvoke", (function() {
72953
73151
  return core.$invokeWatchers(true);
72954
73152
  }));
@@ -73038,6 +73236,7 @@
73038
73236
  exports.DB_CONSTANTS = DB_CONSTANTS;
73039
73237
  exports.DeviceVariableManager = DeviceVariableManager;
73040
73238
  exports.DeviceVariableService = DeviceVariableService;
73239
+ exports.Formatter = Formatter;
73041
73240
  exports.MetadataService = MetadataService;
73042
73241
  exports.SWAGGER_CONSTANTS = SWAGGER_CONSTANTS;
73043
73242
  exports.VARIABLE_CONSTANTS = VARIABLE_CONSTANTS;