@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.
@@ -5052,12 +5052,7 @@
5052
5052
  fieldDefs = [];
5053
5053
  parent.gridOptions.setCurrentPage(1);
5054
5054
  }
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
- }
5055
+ var currentPage = parent.currentPage;
5061
5056
  var dataNavigator = parent.dataNavigator;
5062
5057
  var pagesize = parent.pagesize;
5063
5058
  if (!isDefined(fieldDefs) || dataNavigator.isFirstPage()) {
@@ -8657,16 +8652,6 @@
8657
8652
  var routeRegex = new RegExp("^(#/|#)" + routeName + "$");
8658
8653
  return routeRegex.test(link);
8659
8654
  };
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
- };
8670
8655
  var getOrderByExpr = function(pageableObj) {
8671
8656
  pageableObj = pageableObj || [];
8672
8657
  var expressions = [], KEY_VAL_SEPARATOR = " ", FIELD_SEPARATOR = ",";
@@ -13037,7 +13022,6 @@
13037
13022
  exports.getWidgetPropsByType = getWidgetPropsByType;
13038
13023
  exports.groupData = groupData;
13039
13024
  exports.handleHeaderClick = handleHeaderClick;
13040
- exports.hasLinkToCurrentPage = hasLinkToCurrentPage;
13041
13025
  exports.interpolateBindExpressions = interpolateBindExpressions;
13042
13026
  exports.isActiveNavItem = isActiveNavItem;
13043
13027
  exports.isBooleanAttr = isBooleanAttr;
@@ -27387,7 +27371,6 @@
27387
27371
  };
27388
27372
  BaseDateTimeComponent.prototype.setActiveDateFocus = function(newDate, isMouseEvent) {
27389
27373
  var _this = this;
27390
- this.setNextData(newDate);
27391
27374
  var activeMonth = this.activeDate.getMonth();
27392
27375
  if (!isMouseEvent) {
27393
27376
  if (newDate.getMonth() < activeMonth) {
@@ -27469,8 +27452,8 @@
27469
27452
  _this.setFocusForMonthOrDay();
27470
27453
  }
27471
27454
  }));
27472
- datePickerHead.find(".next").attr("aria-label", "Next Month, " + this.next.fullMonth + " " + this.next.date.getFullYear());
27473
- datePickerHead.find(".previous").attr("aria-label", "Previous Month, " + this.prev.fullMonth + " " + this.prev.date.getFullYear());
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());
27474
27457
  };
27475
27458
  BaseDateTimeComponent.prototype.setFocusForMonthOrDay = function() {
27476
27459
  var activeMonthOrYear = $(".bs-datepicker-head .current").first().text();
@@ -27536,14 +27519,14 @@
27536
27519
  this.loadDays();
27537
27520
  this.setActiveDateFocus(this.activeDate);
27538
27521
  };
27539
- BaseDateTimeComponent.prototype.setNextData = function(nextDate) {
27540
- this.next = this.getMonth(nextDate, 1);
27541
- this.prev = this.getMonth(nextDate, -1);
27542
- };
27543
27522
  BaseDateTimeComponent.prototype.loadDays = function() {
27544
27523
  var _this = this;
27545
27524
  setTimeout((function() {
27546
27525
  $("[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
+ }
27547
27530
  _this.addKeyBoardEventsForDays();
27548
27531
  _this.addDatepickerMouseEvents();
27549
27532
  }));
@@ -27658,7 +27641,6 @@
27658
27641
  };
27659
27642
  BaseDateTimeComponent.prototype.setActiveMonthFocus = function(newDate, isMoouseEvent) {
27660
27643
  var _this = this;
27661
- this.setNextData(newDate);
27662
27644
  var newMonth = months[newDate.getMonth()];
27663
27645
  if (!isMoouseEvent) {
27664
27646
  if (newDate.getFullYear() < this.activeDate.getFullYear()) {
@@ -33614,10 +33596,9 @@
33614
33596
  };
33615
33597
  var MenuComponent = function(_super) {
33616
33598
  __extends(MenuComponent, _super);
33617
- function MenuComponent(inj, route, app, userDefinedExecutionContext, bsDropdown, parentNav, selectEventCB) {
33599
+ function MenuComponent(inj, route, userDefinedExecutionContext, bsDropdown, parentNav, selectEventCB) {
33618
33600
  var _this = _super.call(this, inj, WIDGET_CONFIG$1) || this;
33619
33601
  _this.route = route;
33620
- _this.app = app;
33621
33602
  _this.userDefinedExecutionContext = userDefinedExecutionContext;
33622
33603
  _this.bsDropdown = bsDropdown;
33623
33604
  _this.parentNav = parentNav;
@@ -33631,9 +33612,6 @@
33631
33612
  }
33632
33613
  var datasetSubscription = _this.nodes$.subscribe((function() {
33633
33614
  if (!_.isEmpty(_this.nodes)) {
33634
- if (base.hasLinkToCurrentPage(_this.nodes, _this.route.url)) {
33635
- core.addClass(_this.nativeElement.querySelector(".dropdown-toggle"), "active");
33636
- }
33637
33615
  if (_this.parentNav) {
33638
33616
  return;
33639
33617
  }
@@ -33708,22 +33686,26 @@
33708
33686
  }
33709
33687
  $event.preventDefault();
33710
33688
  };
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
+ };
33711
33700
  MenuComponent.prototype.resetNodes = function() {
33712
33701
  _super.prototype.resetNodes.call(this);
33713
- if (this.autoopen === AUTO_OPEN.ACTIVE_PAGE && base.hasLinkToCurrentPage(this.nodes, this.route.url) || this.autoopen === AUTO_OPEN.ALWAYS) {
33702
+ if (this.autoopen === AUTO_OPEN.ACTIVE_PAGE && this.hasLinkToCurrentPage(this.nodes) || this.autoopen === AUTO_OPEN.ALWAYS) {
33714
33703
  this.bsDropdown.show();
33715
33704
  }
33716
33705
  };
33717
33706
  MenuComponent.prototype.ngOnInit = function() {
33718
- var _this = this;
33719
33707
  _super.prototype.ngOnInit.call(this);
33720
33708
  this.setMenuPosition();
33721
- var cancelSubscription = this.app.subscribe("highlightActiveLink", (function(data) {
33722
- core.toggleClass(_this.nativeElement.querySelector(".dropdown-toggle"), "active", base.hasLinkToCurrentPage(_this.nodes, _this.route.url));
33723
- }));
33724
- this.registerDestroyListener((function() {
33725
- return cancelSubscription();
33726
- }));
33727
33709
  };
33728
33710
  MenuComponent.prototype.onPropertyChange = function(key, nv, ov) {
33729
33711
  if (key === "tabindex") {
@@ -33794,8 +33776,6 @@
33794
33776
  type: core$1.Injector
33795
33777
  }, {
33796
33778
  type: router.Router
33797
- }, {
33798
- type: core.App
33799
33779
  }, {
33800
33780
  type: core.UserDefinedExecutionContext
33801
33781
  }, {
@@ -33913,9 +33893,8 @@
33913
33893
  VERTICAL: "vertical"
33914
33894
  };
33915
33895
  var MenuDropdownItemComponent = function() {
33916
- function MenuDropdownItemComponent(app, menuRef, userDefinedExecutionContext, parentNav, elRef) {
33896
+ function MenuDropdownItemComponent(menuRef, userDefinedExecutionContext, parentNav, elRef) {
33917
33897
  var _this = this;
33918
- this.app = app;
33919
33898
  this.menuRef = menuRef;
33920
33899
  this.userDefinedExecutionContext = userDefinedExecutionContext;
33921
33900
  this.parentNav = parentNav;
@@ -33941,14 +33920,10 @@
33941
33920
  this.menualign = menuAlignClass[this.menuRef.menualign] || menuAlignClass["pull-left"];
33942
33921
  }
33943
33922
  MenuDropdownItemComponent.prototype.ngOnInit = function() {
33944
- var _this = this;
33945
33923
  if (this.parentNav) {
33946
- if (base.hasLinkToCurrentPage([ this.item ], this.menuRef.route.url)) {
33924
+ if (base.isActiveNavItem(this.item.link, this.menuRef.route.url)) {
33947
33925
  core.addClass(this.nativeElement, "active");
33948
33926
  }
33949
- this.highlightActiveLinkSubscription = this.app.subscribe("highlightActiveLink", (function(data) {
33950
- core.toggleClass(_this.nativeElement, "active", base.hasLinkToCurrentPage([ _this.item ], _this.menuRef.route.url));
33951
- }));
33952
33927
  }
33953
33928
  };
33954
33929
  MenuDropdownItemComponent.prototype.getInitialKeyMovements = function() {
@@ -34017,11 +33992,6 @@
34017
33992
  $event.stopPropagation();
34018
33993
  }
34019
33994
  };
34020
- MenuDropdownItemComponent.prototype.ngOnDestroy = function() {
34021
- if (this.highlightActiveLinkSubscription) {
34022
- this.highlightActiveLinkSubscription();
34023
- }
34024
- };
34025
33995
  return MenuDropdownItemComponent;
34026
33996
  }();
34027
33997
  MenuDropdownItemComponent.decorators = [ {
@@ -34033,8 +34003,6 @@
34033
34003
  } ];
34034
34004
  MenuDropdownItemComponent.ctorParameters = function() {
34035
34005
  return [ {
34036
- type: core.App
34037
- }, {
34038
34006
  type: MenuComponent
34039
34007
  }, {
34040
34008
  type: core.UserDefinedExecutionContext
@@ -42370,7 +42338,7 @@
42370
42338
  }
42371
42339
  this.isDisableCurrent = isCurrentPageFirst && isCurrentPageLast;
42372
42340
  if (this.dataset && this.dataset.length && this.isDisableNext && this.parent.onDemandLoad && this.parent.widgetType === "wm-table") {
42373
- this.parent.callDataGridMethod("hideLoadingIndicator", this.isDisableNext, this.parent.infScroll);
42341
+ this.parent.callDataGridMethod("hideLoadingIndicator", this.isDisableNext, false);
42374
42342
  }
42375
42343
  };
42376
42344
  PaginationComponent.prototype.isDataSourceHasPaging = function() {
@@ -44739,7 +44707,7 @@
44739
44707
  ListComponent.prototype.handleKeyDown = function($event, action) {
44740
44708
  var _this = this;
44741
44709
  $event.stopPropagation();
44742
- if ($event.keyCode !== 13 && $event.keyCode !== 9 && !(($event.target.classList.contains("form-control") || $event.target.classList.contains("note-editable")) && $event.keyCode === 32)) {
44710
+ if ($event.keyCode !== 13 && $event.keyCode !== 9 && !($event.target.classList.contains("form-control") && $event.keyCode === 32)) {
44743
44711
  $event.preventDefault();
44744
44712
  }
44745
44713
  var listItems = this.listItems;
@@ -45608,10 +45576,6 @@
45608
45576
  value: "No data found."
45609
45577
  }, base.PROP_STRING) ], [ "ondemandmessage", Object.assign({
45610
45578
  value: "Load More"
45611
- }, base.PROP_STRING) ], [ "showviewlessbutton", Object.assign({
45612
- value: false
45613
- }, base.PROP_BOOLEAN) ], [ "viewlessmessage", Object.assign({
45614
- value: "View Less"
45615
45579
  }, base.PROP_STRING) ], [ "pagesize", base.PROP_NUMBER ], [ "radioselect", base.PROP_BOOLEAN ], [ "rowclass", base.PROP_STRING ], [ "rowngclass", base.PROP_STRING ], [ "searchlabel", Object.assign({
45616
45580
  value: "Search"
45617
45581
  }, base.PROP_STRING) ], [ "show", Object.assign({
@@ -45692,7 +45656,6 @@
45692
45656
  _this.columns = {};
45693
45657
  _this.formfields = {};
45694
45658
  _this.enablesort = true;
45695
- _this.showviewlessbutton = false;
45696
45659
  _this.primaryKey = [];
45697
45660
  _this.selectedItems = [];
45698
45661
  _this.selectedItemChange = new rxjs.Subject;
@@ -45735,7 +45698,6 @@
45735
45698
  data: [],
45736
45699
  colDefs: [],
45737
45700
  startRowIndex: 1,
45738
- mode: "",
45739
45701
  sortInfo: {
45740
45702
  field: "",
45741
45703
  direction: ""
@@ -45766,10 +45728,6 @@
45766
45728
  isSearchTrigerred: false,
45767
45729
  isDatasetUpdated: false,
45768
45730
  isDataUpdatedByUser: false,
45769
- showviewlessbutton: false,
45770
- ondemandmessage: "",
45771
- viewlessmessage: "",
45772
- loadingdatamsg: "",
45773
45731
  isNextPageData: undefined,
45774
45732
  ACTIONS: {
45775
45733
  DELETE: "delete",
@@ -45794,14 +45752,6 @@
45794
45752
  getPageSize: function() {
45795
45753
  return _this.pagesize;
45796
45754
  },
45797
- getPageCount: function() {
45798
- return _this.dataNavigator.pageCount;
45799
- },
45800
- enableNavigation: function() {
45801
- _this.dataNavigator.widget.isDisableNext = false;
45802
- _this.dataNavigator.widget.isDisableLast = false;
45803
- _this.gridOptions.mode = "viewless";
45804
- },
45805
45755
  setDeletedRowIndex: function(id) {
45806
45756
  _this.setDataGridOption("deletedRowIndex", id);
45807
45757
  },
@@ -45836,9 +45786,7 @@
45836
45786
  }
45837
45787
  _this.callDataGridMethod("selectRows", _this.items);
45838
45788
  _this.selectedItems = _this.callDataGridMethod("getSelectedRows");
45839
- if (_this.selectedItems.length) {
45840
- _this.selectedItemChange.next(_this.selectedItems);
45841
- }
45789
+ _this.selectedItemChange.next(_this.selectedItems);
45842
45790
  if (_this._isPageSearch && _this.filterInfo) {
45843
45791
  _this.searchSortHandler(_this.filterInfo, undefined, "search");
45844
45792
  }
@@ -45847,11 +45795,9 @@
45847
45795
  onRowSelect: function(row, e) {
45848
45796
  _this.ngZone.run((function() {
45849
45797
  _this.selectedItems = _this.callDataGridMethod("getSelectedRows");
45850
- if (_this.selectedItems.length) {
45851
- _this.selectedItemChange.next(_this.selectedItems);
45852
- }
45798
+ _this.selectedItemChange.next(_this.selectedItems);
45853
45799
  var rowData = _this.addRowIndex(row);
45854
- if (_this.selectedItems.length && rowData.$index && _this.getConfiguredState() !== "none" && _this.dataNavigator && base.unsupportedStatePersistenceTypes.indexOf(_this.navigation) < 0) {
45800
+ if (rowData.$index && _this.getConfiguredState() !== "none" && _this.dataNavigator && base.unsupportedStatePersistenceTypes.indexOf(_this.navigation) < 0) {
45855
45801
  var obj = {
45856
45802
  page: _this.dataNavigator.dn.currentPage,
45857
45803
  index: rowData.$index - 1
@@ -46291,14 +46237,9 @@
46291
46237
  _this.callDataGridMethod("addLoadMoreBtn", _this.ondemandmessage, _this.loadingdatamsg, (function($event) {
46292
46238
  _this.gridOptions.setIsNextPageData(true);
46293
46239
  _this.gridOptions.setIsDataUpdatedByUser(false);
46294
- if (_this.gridOptions.mode === "viewless") {
46295
- _this.dataNavigator.navigatePage("first", $event, true);
46296
- _this.gridOptions.mode = "";
46297
- } else {
46298
- _this.dataNavigator.navigatePage("next", $event);
46299
- _this.isDataLoading = true;
46300
- }
46301
- }), _this.infScroll);
46240
+ _this.dataNavigator.navigatePage("next", $event);
46241
+ _this.isDataLoading = true;
46242
+ }));
46302
46243
  },
46303
46244
  bindScrollEvt: function() {
46304
46245
  if (_this._gridData && _this._gridData.length && _this.infScroll) {
@@ -46576,10 +46517,6 @@
46576
46517
  this.gridOptions.securityUtils.pipeTransform = this.trustAsPipe;
46577
46518
  this.gridOptions.navigation = this.navigation;
46578
46519
  this.gridOptions.isdynamictable = this.isdynamictable;
46579
- this.gridOptions.showviewlessbutton = this.showviewlessbutton;
46580
- this.gridOptions.ondemandmessage = this.ondemandmessage;
46581
- this.gridOptions.viewlessmessage = this.viewlessmessage;
46582
- this.gridOptions.loadingdatamsg = this.loadingdatamsg;
46583
46520
  if (!_.isEmpty(this.gridData)) {
46584
46521
  this.gridOptions.data = core.getClonedObject(this.gridData);
46585
46522
  }
@@ -47317,11 +47254,6 @@
47317
47254
  if (nv) {
47318
47255
  this.$element.find(".on-demand-datagrid > a").text(nv);
47319
47256
  }
47320
- this.gridOptions.ondemandmessage = nv;
47321
- break;
47322
-
47323
- case "viewlessmessage":
47324
- this.gridOptions.viewlessmessage = nv;
47325
47257
  break;
47326
47258
 
47327
47259
  case "show":