@wavemaker/app-ng-runtime 11.4.0-next.28151 → 11.4.0-next.28701

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.
Files changed (77) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +1 -1
  2. app-ng-runtime/build-task/bundles/index.umd.js.map +1 -1
  3. app-ng-runtime/build-task/esm2015/data/form/form-field/form-field.build.js +2 -2
  4. app-ng-runtime/build-task/fesm2015/index.js +1 -1
  5. app-ng-runtime/build-task/fesm2015/index.js.map +1 -1
  6. app-ng-runtime/components/base/bundles/index.umd.js +23 -1
  7. app-ng-runtime/components/base/bundles/index.umd.js.map +1 -1
  8. app-ng-runtime/components/base/esm2015/public_api.js +2 -2
  9. app-ng-runtime/components/base/esm2015/utils/widget-utils.js +16 -1
  10. app-ng-runtime/components/base/esm2015/widgets/common/base/base-field-validations.js +3 -2
  11. app-ng-runtime/components/base/esm2015/widgets/common/dialog/dialog.service.js +7 -1
  12. app-ng-runtime/components/base/fesm2015/index.js +23 -2
  13. app-ng-runtime/components/base/fesm2015/index.js.map +1 -1
  14. app-ng-runtime/components/base/index.metadata.json +1 -1
  15. app-ng-runtime/components/base/public_api.d.ts +1 -1
  16. app-ng-runtime/components/base/utils/widget-utils.d.ts +7 -0
  17. app-ng-runtime/components/data/form/bundles/index.umd.js +37 -13
  18. app-ng-runtime/components/data/form/bundles/index.umd.js.map +1 -1
  19. app-ng-runtime/components/data/form/esm2015/form-field/form-field.directive.js +26 -7
  20. app-ng-runtime/components/data/form/esm2015/form.component.js +10 -5
  21. app-ng-runtime/components/data/form/fesm2015/index.js +34 -10
  22. app-ng-runtime/components/data/form/fesm2015/index.js.map +1 -1
  23. app-ng-runtime/components/data/form/index.metadata.json +1 -1
  24. app-ng-runtime/components/data/list/bundles/index.umd.js +2 -2
  25. app-ng-runtime/components/data/list/bundles/index.umd.js.map +1 -1
  26. app-ng-runtime/components/data/list/esm2015/list.component.js +3 -3
  27. app-ng-runtime/components/data/list/fesm2015/index.js +2 -2
  28. app-ng-runtime/components/data/list/fesm2015/index.js.map +1 -1
  29. app-ng-runtime/components/data/list/index.metadata.json +1 -1
  30. app-ng-runtime/components/data/list/list.component.d.ts +1 -1
  31. app-ng-runtime/components/data/pagination/bundles/index.umd.js +1 -1
  32. app-ng-runtime/components/data/pagination/bundles/index.umd.js.map +1 -1
  33. app-ng-runtime/components/data/pagination/esm2015/pagination.component.js +2 -2
  34. app-ng-runtime/components/data/pagination/fesm2015/index.js +1 -1
  35. app-ng-runtime/components/data/pagination/fesm2015/index.js.map +1 -1
  36. app-ng-runtime/components/data/table/bundles/index.umd.js +57 -12
  37. app-ng-runtime/components/data/table/bundles/index.umd.js.map +1 -1
  38. app-ng-runtime/components/data/table/esm2015/table.component.js +56 -13
  39. app-ng-runtime/components/data/table/esm2015/table.props.js +3 -1
  40. app-ng-runtime/components/data/table/fesm2015/index.js +57 -12
  41. app-ng-runtime/components/data/table/fesm2015/index.js.map +1 -1
  42. app-ng-runtime/components/data/table/index.metadata.json +1 -1
  43. app-ng-runtime/components/data/table/table.component.d.ts +9 -0
  44. app-ng-runtime/components/dialogs/default/bundles/index.umd.js +5 -0
  45. app-ng-runtime/components/dialogs/default/bundles/index.umd.js.map +1 -1
  46. app-ng-runtime/components/dialogs/default/esm2015/base-dialog.js +7 -2
  47. app-ng-runtime/components/dialogs/default/fesm2015/index.js +6 -1
  48. app-ng-runtime/components/dialogs/default/fesm2015/index.js.map +1 -1
  49. app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +1 -0
  50. app-ng-runtime/components/input/epoch/bundles/index.umd.js +13 -7
  51. app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
  52. app-ng-runtime/components/input/epoch/esm2015/base-date-time.component.js +13 -7
  53. app-ng-runtime/components/input/epoch/esm2015/date/date.component.js +2 -2
  54. app-ng-runtime/components/input/epoch/fesm2015/index.js +13 -7
  55. app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
  56. app-ng-runtime/components/input/epoch/index.metadata.json +1 -1
  57. app-ng-runtime/components/navigation/menu/bundles/index.umd.js +25 -19
  58. app-ng-runtime/components/navigation/menu/bundles/index.umd.js.map +1 -1
  59. app-ng-runtime/components/navigation/menu/esm2015/menu-dropdown-item/menu-dropdown-item.component.js +15 -5
  60. app-ng-runtime/components/navigation/menu/esm2015/menu.component.js +14 -19
  61. app-ng-runtime/components/navigation/menu/fesm2015/index.js +25 -20
  62. app-ng-runtime/components/navigation/menu/fesm2015/index.js.map +1 -1
  63. app-ng-runtime/components/navigation/menu/index.metadata.json +1 -1
  64. app-ng-runtime/components/navigation/menu/menu-dropdown-item/menu-dropdown-item.component.d.ts +7 -4
  65. app-ng-runtime/components/navigation/menu/menu.component.d.ts +3 -7
  66. app-ng-runtime/components/navigation/popover/bundles/index.umd.js +3 -0
  67. app-ng-runtime/components/navigation/popover/bundles/index.umd.js.map +1 -1
  68. app-ng-runtime/components/navigation/popover/esm2015/popover.component.js +4 -1
  69. app-ng-runtime/components/navigation/popover/fesm2015/index.js +3 -0
  70. app-ng-runtime/components/navigation/popover/fesm2015/index.js.map +1 -1
  71. app-ng-runtime/core/bundles/index.umd.js +7 -1
  72. app-ng-runtime/core/bundles/index.umd.js.map +1 -1
  73. app-ng-runtime/core/esm2015/services/pagination.service.js +8 -2
  74. app-ng-runtime/core/fesm2015/index.js +7 -1
  75. app-ng-runtime/core/fesm2015/index.js.map +1 -1
  76. app-ng-runtime/package.json +1 -1
  77. app-ng-runtime/scripts/datatable/datatable.js +63 -13
@@ -359,6 +359,8 @@
359
359
  ['navigationalign', Object.assign({ value: 'left' }, base.PROP_STRING)],
360
360
  ['nodatamessage', Object.assign({ value: 'No data found.' }, base.PROP_STRING)],
361
361
  ['ondemandmessage', Object.assign({ value: 'Load More' }, base.PROP_STRING)],
362
+ ['showviewlessbutton', Object.assign({ value: false }, base.PROP_BOOLEAN)],
363
+ ['viewlessmessage', Object.assign({ value: 'View Less' }, base.PROP_STRING)],
362
364
  ['pagesize', base.PROP_NUMBER],
363
365
  ['radioselect', base.PROP_BOOLEAN],
364
366
  ['rowclass', base.PROP_STRING],
@@ -437,6 +439,7 @@
437
439
  _this.columns = {};
438
440
  _this.formfields = {};
439
441
  _this.enablesort = true;
442
+ _this.showviewlessbutton = false;
440
443
  _this.primaryKey = [];
441
444
  _this.selectedItems = [];
442
445
  _this.selectedItemChange = new rxjs.Subject();
@@ -457,6 +460,7 @@
457
460
  _this.rowDef = {};
458
461
  _this.rowInstance = {};
459
462
  _this.fullFieldDefs = [];
463
+ _this.variableInflight = true;
460
464
  _this.applyProps = new Map();
461
465
  _this.redraw = _.debounce(_this._redraw, 150);
462
466
  _this.debouncedHandleLoading = _.debounce(_this.handleLoading, 350);
@@ -480,6 +484,7 @@
480
484
  data: [],
481
485
  colDefs: [],
482
486
  startRowIndex: 1,
487
+ mode: '',
483
488
  sortInfo: {
484
489
  field: '',
485
490
  direction: ''
@@ -510,6 +515,10 @@
510
515
  isSearchTrigerred: false,
511
516
  isDatasetUpdated: false,
512
517
  isDataUpdatedByUser: false,
518
+ showviewlessbutton: false,
519
+ ondemandmessage: '',
520
+ viewlessmessage: '',
521
+ loadingdatamsg: '',
513
522
  isNextPageData: undefined,
514
523
  ACTIONS: {
515
524
  'DELETE': 'delete',
@@ -537,6 +546,14 @@
537
546
  getPageSize: function () {
538
547
  return _this.pagesize;
539
548
  },
549
+ getPageCount: function () {
550
+ return _this.dataNavigator.pageCount;
551
+ },
552
+ enableNavigation: function () {
553
+ _this.dataNavigator.widget.isDisableNext = false;
554
+ _this.dataNavigator.widget.isDisableLast = false;
555
+ _this.gridOptions.mode = 'viewless';
556
+ },
540
557
  // set the deleted row index
541
558
  setDeletedRowIndex: function (id) {
542
559
  _this.setDataGridOption('deletedRowIndex', id);
@@ -573,7 +590,9 @@
573
590
  }
574
591
  _this.callDataGridMethod('selectRows', _this.items);
575
592
  _this.selectedItems = _this.callDataGridMethod('getSelectedRows');
576
- _this.selectedItemChange.next(_this.selectedItems);
593
+ if (_this.selectedItems.length) {
594
+ _this.selectedItemChange.next(_this.selectedItems);
595
+ }
577
596
  // On render, apply the filters set for query service variable
578
597
  if (_this._isPageSearch && _this.filterInfo) {
579
598
  _this.searchSortHandler(_this.filterInfo, undefined, 'search');
@@ -583,9 +602,11 @@
583
602
  onRowSelect: function (row, e) {
584
603
  _this.ngZone.run(function () {
585
604
  _this.selectedItems = _this.callDataGridMethod('getSelectedRows');
586
- _this.selectedItemChange.next(_this.selectedItems);
605
+ if (_this.selectedItems.length) {
606
+ _this.selectedItemChange.next(_this.selectedItems);
607
+ }
587
608
  var rowData = _this.addRowIndex(row);
588
- if (rowData.$index && _this.getConfiguredState() !== 'none' && _this.dataNavigator && base.unsupportedStatePersistenceTypes.indexOf(_this.navigation) < 0) {
609
+ if (_this.selectedItems.length && rowData.$index && _this.getConfiguredState() !== 'none' && _this.dataNavigator && base.unsupportedStatePersistenceTypes.indexOf(_this.navigation) < 0) {
589
610
  var obj = { page: _this.dataNavigator.dn.currentPage, index: rowData.$index - 1 };
590
611
  var widgetState = _this.statePersistence.getWidgetState(_this);
591
612
  if (_.get(widgetState, 'selectedItem') && _this.multiselect) {
@@ -945,12 +966,17 @@
945
966
  // function to add load more button to table
946
967
  addLoadMoreBtn: function () {
947
968
  _this.callDataGridMethod('addLoadMoreBtn', _this.ondemandmessage, _this.loadingdatamsg, function ($event) {
948
- // set 'isNextPageData' flag to true & 'isDataUpdatedByUser' to false as next page data is being rendered
949
969
  _this.gridOptions.setIsNextPageData(true);
950
970
  _this.gridOptions.setIsDataUpdatedByUser(false);
951
- _this.dataNavigator.navigatePage('next', $event);
952
- _this.isDataLoading = true;
953
- });
971
+ if (_this.gridOptions.mode === 'viewless') {
972
+ _this.dataNavigator.navigatePage('first', $event, true);
973
+ _this.gridOptions.mode = '';
974
+ }
975
+ else {
976
+ _this.dataNavigator.navigatePage('next', $event);
977
+ _this.isDataLoading = true;
978
+ }
979
+ }, _this.infScroll);
954
980
  },
955
981
  // function to bind scroll event
956
982
  bindScrollEvt: function () {
@@ -1135,6 +1161,10 @@
1135
1161
  set: function (newValue) {
1136
1162
  var _a;
1137
1163
  this.isDataLoading = false;
1164
+ // Fix for [WMS-24012]: hide no datafound msg when variableInflight is true and dataset is empty
1165
+ if (this.variableInflight && _.isEmpty(newValue)) {
1166
+ return;
1167
+ }
1138
1168
  this.variableInflight = false;
1139
1169
  if (this.gridOptions.isNavTypeScrollOrOndemand()) {
1140
1170
  // update the _gridData field with the next set of items and modify the current page
@@ -1256,6 +1286,10 @@
1256
1286
  this.gridOptions.securityUtils.pipeTransform = this.trustAsPipe;
1257
1287
  this.gridOptions.navigation = this.navigation;
1258
1288
  this.gridOptions.isdynamictable = this.isdynamictable;
1289
+ this.gridOptions.showviewlessbutton = this.showviewlessbutton;
1290
+ this.gridOptions.ondemandmessage = this.ondemandmessage;
1291
+ this.gridOptions.viewlessmessage = this.viewlessmessage;
1292
+ this.gridOptions.loadingdatamsg = this.loadingdatamsg;
1259
1293
  // When loadondemand property is enabled(deferload="true") and show is true, only the column titles of the datatable are rendered, the data(body of the datatable) is not at all rendered.
1260
1294
  // Because the griddata is setting before the datatable dom is rendered but we are sending empty data to the datatable.
1261
1295
  if (!_.isEmpty(this.gridData)) {
@@ -1279,6 +1313,11 @@
1279
1313
  this.gridOptions.colDefs = this.fieldDefs;
1280
1314
  this.datagridElement.datatable(this.gridOptions);
1281
1315
  this.callDataGridMethod('setStatus', 'loading', this.loadingdatamsg);
1316
+ // if(this.gridOptions.data.length || this.variableInflight) {
1317
+ // this.callDataGridMethod('setStatus', 'loading', this.loadingdatamsg);
1318
+ // } else {
1319
+ // this.callDataGridMethod('setStatus', 'nodata', this.nodatamessage);
1320
+ // }
1282
1321
  this.applyProps.forEach(function (args) { return _this.callDataGridMethod.apply(_this, __spreadArray([], __read(args))); });
1283
1322
  if (this.editmode === base.EDIT_MODE.QUICK_EDIT) {
1284
1323
  this.documentClickBind = this._documentClickBind.bind(this);
@@ -1605,8 +1644,12 @@
1605
1644
  };
1606
1645
  TableComponent.prototype.setGridData = function (serverData) {
1607
1646
  var data = this.filternullrecords ? this.removeEmptyRecords(serverData) : serverData;
1647
+ // fix for [WMS-24012] set variableinflight flag to false for static variables
1648
+ if (_.get(this.datasource, 'category') === 'wm.Variable') {
1649
+ this.variableInflight = false;
1650
+ }
1608
1651
  if (!this.variableInflight) {
1609
- if (data && data.length === 0) {
1652
+ if (data && (data.length) === 0) {
1610
1653
  this.callDataGridMethod('setStatus', 'nodata', this.nodatamessage);
1611
1654
  }
1612
1655
  else {
@@ -1927,10 +1970,8 @@
1927
1970
  this.variableInflight = false;
1928
1971
  this.callDataGridMethod('setStatus', 'nodata', this.nodatamessage);
1929
1972
  }
1930
- if (this.dataset) {
1931
- this.watchVariableDataSet(this.dataset);
1932
- this.onDataSourceChange();
1933
- }
1973
+ this.watchVariableDataSet(this.dataset);
1974
+ this.onDataSourceChange();
1934
1975
  break;
1935
1976
  case 'dataset':
1936
1977
  if (this.gridOptions.isNavTypeScrollOrOndemand() && this.gridOptions.getCurrentPage() === 1) {
@@ -2032,6 +2073,10 @@
2032
2073
  if (nv) {
2033
2074
  this.$element.find('.on-demand-datagrid > a').text(nv);
2034
2075
  }
2076
+ this.gridOptions.ondemandmessage = nv;
2077
+ break;
2078
+ case 'viewlessmessage':
2079
+ this.gridOptions.viewlessmessage = nv;
2035
2080
  break;
2036
2081
  case 'show':
2037
2082
  if (nv) {