@wavemaker/app-runtime-wm-build 11.3.6-next.25087 → 11.4.0-next.140411

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.
@@ -189959,11 +189959,6 @@ $.widget("wm.datatable", {
189959
189959
  var self = this, preparedData, $tbody, pageStartIndex = self.getPageStartIndex(), startRowIndex = self.options.startRowIndex, isScrollorOnDemand = self.options.isNavTypeScrollOrOndemand();
189960
189960
  if (isScrollorOnDemand) {
189961
189961
  $tbody = this.gridElement;
189962
- if (this.renderTableOnViewLess) {
189963
- $tbody = this.gridElement.empty();
189964
- this.hideLoadingIndicator();
189965
- this.renderTableOnViewLess = false;
189966
- }
189967
189962
  } else {
189968
189963
  $tbody = this.gridElement.empty();
189969
189964
  }
@@ -190431,40 +190426,17 @@ $.widget("wm.datatable", {
190431
190426
  }), 100);
190432
190427
  }
190433
190428
  },
190434
- addLoadMoreBtn: function(onDemandMsg, loadingdatamsg, cb, infScroll) {
190435
- var $btnEl;
190436
- if (!this.options.isLastPage || infScroll) {
190429
+ addLoadMoreBtn: function(onDemandMsg, loadingdatamsg, cb) {
190430
+ if (!this.options.isLastPage) {
190437
190431
  var self = this;
190438
190432
  var $parenEl = $('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>');
190439
- $btnEl = $parenEl.find("a");
190433
+ var $btnEl = $parenEl.find("a");
190440
190434
  $btnEl.append(onDemandMsg);
190441
190435
  this.element.find(".app-grid-header-inner").append($parenEl);
190442
- if (infScroll) {
190443
- if (this.element.find(".on-demand-load-btn").length) {
190444
- this.element.find(".on-demand-load-btn").text(this.options.viewlessmessage);
190445
- }
190446
- }
190447
190436
  $btnEl.on("click", (function(e) {
190448
- var lastPage = self.options.getCurrentPage() == self.options.getPageCount();
190449
- if (!lastPage) {
190450
- self.showLoadingIndicator(loadingdatamsg, false);
190451
- }
190452
- if (!self.options.showviewlessbutton) {
190453
- $btnEl.hide();
190454
- }
190455
- if (infScroll) {
190456
- if (lastPage) {
190457
- self.element.find(".on-demand-datagrid").remove();
190458
- }
190459
- }
190460
- if (lastPage && self.options.showviewlessbutton) {
190461
- $btnEl.hide();
190462
- self.renderTableOnViewLess = true;
190463
- self.renderPaginationOnViewLess = true;
190464
- self.options.enableNavigation();
190465
- self._renderGrid();
190466
- }
190467
190437
  if (cb && typeof cb === "function") {
190438
+ $btnEl.hide();
190439
+ self.showLoadingIndicator(loadingdatamsg, false);
190468
190440
  cb(e);
190469
190441
  }
190470
190442
  }));
@@ -190491,17 +190463,7 @@ $.widget("wm.datatable", {
190491
190463
  hideLoadingIndicator: function(showLoadBtn, infScroll) {
190492
190464
  if (!showLoadBtn && !infScroll) {
190493
190465
  this.element.find(".loading-data-msg").hide();
190494
- this.element.find(".on-demand-load-btn").text(this.options.ondemandmessage);
190495
190466
  this.element.find(".on-demand-load-btn").show();
190496
- } else if (this.options.getCurrentPage() == this.options.getPageCount() && this.options.showviewlessbutton) {
190497
- this.element.find(".on-demand-load-btn").show().text(this.options.viewlessmessage);
190498
- this.element.find(".loading-data-msg").hide();
190499
- if (infScroll) {
190500
- if (!this.element.find(".on-demand-load-btn").length) {
190501
- this.options.addLoadMoreBtn();
190502
- }
190503
- this.element.find(".loading-data-msg").hide();
190504
- }
190505
190467
  } else {
190506
190468
  this.element.find(".on-demand-datagrid").hide();
190507
190469
  }
@@ -192037,9 +191999,7 @@ $.widget("wm.datatable", {
192037
191999
  if (this.options.summaryRow) {
192038
192000
  var $summaryRowHtm = $(this._getSummaryRowTemplate());
192039
192001
  this.tableContainer.find("tfoot").remove();
192040
- if (this.options.data.length) {
192041
- this.tableContainer.append($summaryRowHtm);
192042
- }
192002
+ this.tableContainer.append($summaryRowHtm);
192043
192003
  }
192044
192004
  if (!this.options.data.length && this.dataStatus.state === "nodata") {
192045
192005
  this.setStatus("nodata");
@@ -192049,7 +192009,7 @@ $.widget("wm.datatable", {
192049
192009
  this.setStatus(this.dataStatus.state, this.dataStatus.message, isCreated);
192050
192010
  }
192051
192011
  this.gridBody = this.gridElement.find("tbody");
192052
- this.gridFooter = this.tableContainer.find("tfoot");
192012
+ this.gridFooter = this.gridElement.find("tfoot");
192053
192013
  this._findAndReplaceCompiledTemplates();
192054
192014
  this.options.clearRowActions();
192055
192015
  this._appendRowExpansionButtons($htm);
@@ -192109,9 +192069,6 @@ $.widget("wm.datatable", {
192109
192069
  this._toggleSpacingClasses("condensed");
192110
192070
  }
192111
192071
  this._renderGrid(isCreated);
192112
- this.addNavigationControls();
192113
- },
192114
- addNavigationControls: function() {
192115
192072
  if (this.options.isdynamictable) {
192116
192073
  this.element.find(".on-demand-datagrid").remove();
192117
192074
  if (this.options.navigation === "On-Demand" && !this.element.find(".on-demand-datagrid").length) {
@@ -192132,7 +192089,7 @@ $.widget("wm.datatable", {
192132
192089
  if (state === "ready") {
192133
192090
  this.dataStatusContainer.hide();
192134
192091
  } else {
192135
- if (this.options.isNavTypeScrollOrOndemand() && (state === "nodata" || this.options.getCurrentPage() == this.options.getPageCount() && !this.options.showviewlessbutton)) {
192092
+ if (this.options.isNavTypeScrollOrOndemand() && (state === "nodata" || this.options.isLastPage)) {
192136
192093
  this.element.find(".on-demand-datagrid a").hide();
192137
192094
  }
192138
192095
  this.dataStatusContainer.show();
@@ -219759,7 +219716,7 @@ window.requestAnimationFrame = function() {
219759
219716
  }));
219760
219717
 
219761
219718
  /*!
219762
- * tabbable 6.1.2
219719
+ * tabbable 6.2.0
219763
219720
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
219764
219721
  */
219765
219722
  (function(global, factory) {
@@ -219855,14 +219812,27 @@ window.requestAnimationFrame = function() {
219855
219812
  }
219856
219813
  return candidates;
219857
219814
  };
219858
- var getTabindex = function getTabindex(node, isScope) {
219815
+ var hasTabIndex = function hasTabIndex(node) {
219816
+ return !isNaN(parseInt(node.getAttribute("tabindex"), 10));
219817
+ };
219818
+ var getTabIndex = function getTabIndex(node) {
219819
+ if (!node) {
219820
+ throw new Error("No node provided");
219821
+ }
219859
219822
  if (node.tabIndex < 0) {
219860
- if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && isNaN(parseInt(node.getAttribute("tabindex"), 10))) {
219823
+ if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
219861
219824
  return 0;
219862
219825
  }
219863
219826
  }
219864
219827
  return node.tabIndex;
219865
219828
  };
219829
+ var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
219830
+ var tabIndex = getTabIndex(node);
219831
+ if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
219832
+ return 0;
219833
+ }
219834
+ return tabIndex;
219835
+ };
219866
219836
  var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
219867
219837
  return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
219868
219838
  };
@@ -219998,7 +219968,7 @@ window.requestAnimationFrame = function() {
219998
219968
  return true;
219999
219969
  };
220000
219970
  var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
220001
- if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
219971
+ if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
220002
219972
  return false;
220003
219973
  }
220004
219974
  return true;
@@ -220016,7 +219986,7 @@ window.requestAnimationFrame = function() {
220016
219986
  candidates.forEach((function(item, i) {
220017
219987
  var isScope = !!item.scopeParent;
220018
219988
  var element = isScope ? item.scopeParent : item;
220019
- var candidateTabindex = getTabindex(element, isScope);
219989
+ var candidateTabindex = getSortOrderTabIndex(element, isScope);
220020
219990
  var elements = isScope ? sortByOrder(item.candidates) : element;
220021
219991
  if (candidateTabindex === 0) {
220022
219992
  isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
@@ -220035,32 +220005,32 @@ window.requestAnimationFrame = function() {
220035
220005
  return acc;
220036
220006
  }), []).concat(regularTabbables);
220037
220007
  };
220038
- var tabbable = function tabbable(el, options) {
220008
+ var tabbable = function tabbable(container, options) {
220039
220009
  options = options || {};
220040
220010
  var candidates;
220041
220011
  if (options.getShadowRoot) {
220042
- candidates = getCandidatesIteratively([ el ], options.includeContainer, {
220012
+ candidates = getCandidatesIteratively([ container ], options.includeContainer, {
220043
220013
  filter: isNodeMatchingSelectorTabbable.bind(null, options),
220044
220014
  flatten: false,
220045
220015
  getShadowRoot: options.getShadowRoot,
220046
220016
  shadowRootFilter: isValidShadowRootTabbable
220047
220017
  });
220048
220018
  } else {
220049
- candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
220019
+ candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
220050
220020
  }
220051
220021
  return sortByOrder(candidates);
220052
220022
  };
220053
- var focusable = function focusable(el, options) {
220023
+ var focusable = function focusable(container, options) {
220054
220024
  options = options || {};
220055
220025
  var candidates;
220056
220026
  if (options.getShadowRoot) {
220057
- candidates = getCandidatesIteratively([ el ], options.includeContainer, {
220027
+ candidates = getCandidatesIteratively([ container ], options.includeContainer, {
220058
220028
  filter: isNodeMatchingSelectorFocusable.bind(null, options),
220059
220029
  flatten: true,
220060
220030
  getShadowRoot: options.getShadowRoot
220061
220031
  });
220062
220032
  } else {
220063
- candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
220033
+ candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
220064
220034
  }
220065
220035
  return candidates;
220066
220036
  };
@@ -220086,6 +220056,7 @@ window.requestAnimationFrame = function() {
220086
220056
  return isNodeMatchingSelectorFocusable(options, node);
220087
220057
  };
220088
220058
  exports.focusable = focusable;
220059
+ exports.getTabIndex = getTabIndex;
220089
220060
  exports.isFocusable = isFocusable;
220090
220061
  exports.isTabbable = isTabbable;
220091
220062
  exports.tabbable = tabbable;