@wavemaker/app-ng-runtime 11.4.0-next.141707 → 11.4.0-next.1417071

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 (105) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +2 -2
  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 +3 -3
  4. app-ng-runtime/build-task/fesm2015/index.js +2 -2
  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/basic/rich-text-editor/bundles/index.umd.js +2 -2
  18. app-ng-runtime/components/basic/rich-text-editor/bundles/index.umd.js.map +1 -1
  19. app-ng-runtime/components/basic/rich-text-editor/esm2015/rich-text-editor.component.js +3 -3
  20. app-ng-runtime/components/basic/rich-text-editor/fesm2015/index.js +2 -2
  21. app-ng-runtime/components/basic/rich-text-editor/fesm2015/index.js.map +1 -1
  22. app-ng-runtime/components/data/form/bundles/index.umd.js +37 -13
  23. app-ng-runtime/components/data/form/bundles/index.umd.js.map +1 -1
  24. app-ng-runtime/components/data/form/esm2015/form-field/form-field.directive.js +26 -7
  25. app-ng-runtime/components/data/form/esm2015/form.component.js +10 -5
  26. app-ng-runtime/components/data/form/fesm2015/index.js +34 -10
  27. app-ng-runtime/components/data/form/fesm2015/index.js.map +1 -1
  28. app-ng-runtime/components/data/form/index.metadata.json +1 -1
  29. app-ng-runtime/components/data/list/bundles/index.umd.js +13 -7
  30. app-ng-runtime/components/data/list/bundles/index.umd.js.map +1 -1
  31. app-ng-runtime/components/data/list/esm2015/list.component.js +12 -6
  32. app-ng-runtime/components/data/list/fesm2015/index.js +11 -5
  33. app-ng-runtime/components/data/list/fesm2015/index.js.map +1 -1
  34. app-ng-runtime/components/data/list/index.metadata.json +1 -1
  35. app-ng-runtime/components/data/list/list.component.d.ts +1 -1
  36. app-ng-runtime/components/data/pagination/bundles/index.umd.js +1 -1
  37. app-ng-runtime/components/data/pagination/bundles/index.umd.js.map +1 -1
  38. app-ng-runtime/components/data/pagination/esm2015/pagination.component.js +2 -2
  39. app-ng-runtime/components/data/pagination/fesm2015/index.js +1 -1
  40. app-ng-runtime/components/data/pagination/fesm2015/index.js.map +1 -1
  41. app-ng-runtime/components/data/table/bundles/index.umd.js +48 -9
  42. app-ng-runtime/components/data/table/bundles/index.umd.js.map +1 -1
  43. app-ng-runtime/components/data/table/esm2015/table-filter.directive.js +3 -2
  44. app-ng-runtime/components/data/table/esm2015/table.component.js +45 -9
  45. app-ng-runtime/components/data/table/esm2015/table.props.js +3 -1
  46. app-ng-runtime/components/data/table/fesm2015/index.js +48 -9
  47. app-ng-runtime/components/data/table/fesm2015/index.js.map +1 -1
  48. app-ng-runtime/components/data/table/index.metadata.json +1 -1
  49. app-ng-runtime/components/data/table/table.component.d.ts +9 -0
  50. app-ng-runtime/components/dialogs/default/bundles/index.umd.js +5 -0
  51. app-ng-runtime/components/dialogs/default/bundles/index.umd.js.map +1 -1
  52. app-ng-runtime/components/dialogs/default/esm2015/base-dialog.js +7 -2
  53. app-ng-runtime/components/dialogs/default/fesm2015/index.js +6 -1
  54. app-ng-runtime/components/dialogs/default/fesm2015/index.js.map +1 -1
  55. app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +5 -0
  56. app-ng-runtime/components/input/epoch/bundles/index.umd.js +32 -4
  57. app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
  58. app-ng-runtime/components/input/epoch/esm2015/base-date-time.component.js +32 -3
  59. app-ng-runtime/components/input/epoch/esm2015/date/date.component.js +2 -3
  60. app-ng-runtime/components/input/epoch/fesm2015/index.js +32 -4
  61. app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
  62. app-ng-runtime/components/input/epoch/index.metadata.json +1 -1
  63. app-ng-runtime/components/navigation/menu/bundles/index.umd.js +25 -19
  64. app-ng-runtime/components/navigation/menu/bundles/index.umd.js.map +1 -1
  65. app-ng-runtime/components/navigation/menu/esm2015/menu-dropdown-item/menu-dropdown-item.component.js +15 -5
  66. app-ng-runtime/components/navigation/menu/esm2015/menu.component.js +14 -19
  67. app-ng-runtime/components/navigation/menu/fesm2015/index.js +25 -20
  68. app-ng-runtime/components/navigation/menu/fesm2015/index.js.map +1 -1
  69. app-ng-runtime/components/navigation/menu/index.metadata.json +1 -1
  70. app-ng-runtime/components/navigation/menu/menu-dropdown-item/menu-dropdown-item.component.d.ts +7 -4
  71. app-ng-runtime/components/navigation/menu/menu.component.d.ts +3 -7
  72. app-ng-runtime/components/navigation/popover/bundles/index.umd.js +3 -0
  73. app-ng-runtime/components/navigation/popover/bundles/index.umd.js.map +1 -1
  74. app-ng-runtime/components/navigation/popover/esm2015/popover.component.js +4 -1
  75. app-ng-runtime/components/navigation/popover/fesm2015/index.js +3 -0
  76. app-ng-runtime/components/navigation/popover/fesm2015/index.js.map +1 -1
  77. app-ng-runtime/core/bundles/index.umd.js +7 -1
  78. app-ng-runtime/core/bundles/index.umd.js.map +1 -1
  79. app-ng-runtime/core/esm2015/services/pagination.service.js +8 -2
  80. app-ng-runtime/core/fesm2015/index.js +7 -1
  81. app-ng-runtime/core/fesm2015/index.js.map +1 -1
  82. app-ng-runtime/mobile/core/bundles/index.umd.js +2 -1
  83. app-ng-runtime/mobile/core/bundles/index.umd.js.map +1 -1
  84. app-ng-runtime/mobile/core/esm2015/services/device.service.js +3 -2
  85. app-ng-runtime/mobile/core/fesm2015/index.js +2 -1
  86. app-ng-runtime/mobile/core/fesm2015/index.js.map +1 -1
  87. app-ng-runtime/mobile/runtime-dynamic/bundles/index.umd.js +3 -2
  88. app-ng-runtime/mobile/runtime-dynamic/bundles/index.umd.js.map +1 -1
  89. app-ng-runtime/mobile/runtime-dynamic/esm2015/services/live-sync.service.js +4 -3
  90. app-ng-runtime/mobile/runtime-dynamic/fesm2015/index.js +3 -2
  91. app-ng-runtime/mobile/runtime-dynamic/fesm2015/index.js.map +1 -1
  92. app-ng-runtime/package.json +1 -1
  93. app-ng-runtime/runtime/base/bundles/index.umd.js +1 -0
  94. app-ng-runtime/runtime/base/bundles/index.umd.js.map +1 -1
  95. app-ng-runtime/runtime/base/esm2015/services/prefab-manager.service.js +2 -1
  96. app-ng-runtime/runtime/base/fesm2015/index.js +1 -0
  97. app-ng-runtime/runtime/base/fesm2015/index.js.map +1 -1
  98. app-ng-runtime/scripts/datatable/datatable.js +94 -25
  99. app-ng-runtime/scripts/summernote/dist/summernote-lite.min.js +3 -3
  100. app-ng-runtime/variables/bundles/index.umd.js +5 -12
  101. app-ng-runtime/variables/bundles/index.umd.js.map +1 -1
  102. app-ng-runtime/variables/esm2015/constants/variables.constants.js +3 -9
  103. app-ng-runtime/variables/fesm2015/index.js +2 -9
  104. app-ng-runtime/variables/fesm2015/index.js.map +1 -1
  105. app-ng-runtime/variables/index.metadata.json +1 -1
@@ -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();
@@ -480,6 +483,7 @@
480
483
  data: [],
481
484
  colDefs: [],
482
485
  startRowIndex: 1,
486
+ mode: '',
483
487
  sortInfo: {
484
488
  field: '',
485
489
  direction: ''
@@ -510,6 +514,10 @@
510
514
  isSearchTrigerred: false,
511
515
  isDatasetUpdated: false,
512
516
  isDataUpdatedByUser: false,
517
+ showviewlessbutton: false,
518
+ ondemandmessage: '',
519
+ viewlessmessage: '',
520
+ loadingdatamsg: '',
513
521
  isNextPageData: undefined,
514
522
  ACTIONS: {
515
523
  'DELETE': 'delete',
@@ -537,6 +545,14 @@
537
545
  getPageSize: function () {
538
546
  return _this.pagesize;
539
547
  },
548
+ getPageCount: function () {
549
+ return _this.dataNavigator.pageCount;
550
+ },
551
+ enableNavigation: function () {
552
+ _this.dataNavigator.widget.isDisableNext = false;
553
+ _this.dataNavigator.widget.isDisableLast = false;
554
+ _this.gridOptions.mode = 'viewless';
555
+ },
540
556
  // set the deleted row index
541
557
  setDeletedRowIndex: function (id) {
542
558
  _this.setDataGridOption('deletedRowIndex', id);
@@ -573,7 +589,9 @@
573
589
  }
574
590
  _this.callDataGridMethod('selectRows', _this.items);
575
591
  _this.selectedItems = _this.callDataGridMethod('getSelectedRows');
576
- _this.selectedItemChange.next(_this.selectedItems);
592
+ if (_this.selectedItems.length) {
593
+ _this.selectedItemChange.next(_this.selectedItems);
594
+ }
577
595
  // On render, apply the filters set for query service variable
578
596
  if (_this._isPageSearch && _this.filterInfo) {
579
597
  _this.searchSortHandler(_this.filterInfo, undefined, 'search');
@@ -583,9 +601,11 @@
583
601
  onRowSelect: function (row, e) {
584
602
  _this.ngZone.run(function () {
585
603
  _this.selectedItems = _this.callDataGridMethod('getSelectedRows');
586
- _this.selectedItemChange.next(_this.selectedItems);
604
+ if (_this.selectedItems.length) {
605
+ _this.selectedItemChange.next(_this.selectedItems);
606
+ }
587
607
  var rowData = _this.addRowIndex(row);
588
- if (rowData.$index && _this.getConfiguredState() !== 'none' && _this.dataNavigator && base.unsupportedStatePersistenceTypes.indexOf(_this.navigation) < 0) {
608
+ if (_this.selectedItems.length && rowData.$index && _this.getConfiguredState() !== 'none' && _this.dataNavigator && base.unsupportedStatePersistenceTypes.indexOf(_this.navigation) < 0) {
589
609
  var obj = { page: _this.dataNavigator.dn.currentPage, index: rowData.$index - 1 };
590
610
  var widgetState = _this.statePersistence.getWidgetState(_this);
591
611
  if (_.get(widgetState, 'selectedItem') && _this.multiselect) {
@@ -945,12 +965,17 @@
945
965
  // function to add load more button to table
946
966
  addLoadMoreBtn: function () {
947
967
  _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
968
  _this.gridOptions.setIsNextPageData(true);
950
969
  _this.gridOptions.setIsDataUpdatedByUser(false);
951
- _this.dataNavigator.navigatePage('next', $event);
952
- _this.isDataLoading = true;
953
- });
970
+ if (_this.gridOptions.mode === 'viewless') {
971
+ _this.dataNavigator.navigatePage('first', $event, true);
972
+ _this.gridOptions.mode = '';
973
+ }
974
+ else {
975
+ _this.dataNavigator.navigatePage('next', $event);
976
+ _this.isDataLoading = true;
977
+ }
978
+ }, _this.infScroll);
954
979
  },
955
980
  // function to bind scroll event
956
981
  bindScrollEvt: function () {
@@ -1256,6 +1281,10 @@
1256
1281
  this.gridOptions.securityUtils.pipeTransform = this.trustAsPipe;
1257
1282
  this.gridOptions.navigation = this.navigation;
1258
1283
  this.gridOptions.isdynamictable = this.isdynamictable;
1284
+ this.gridOptions.showviewlessbutton = this.showviewlessbutton;
1285
+ this.gridOptions.ondemandmessage = this.ondemandmessage;
1286
+ this.gridOptions.viewlessmessage = this.viewlessmessage;
1287
+ this.gridOptions.loadingdatamsg = this.loadingdatamsg;
1259
1288
  // 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
1289
  // Because the griddata is setting before the datatable dom is rendered but we are sending empty data to the datatable.
1261
1290
  if (!_.isEmpty(this.gridData)) {
@@ -1279,6 +1308,11 @@
1279
1308
  this.gridOptions.colDefs = this.fieldDefs;
1280
1309
  this.datagridElement.datatable(this.gridOptions);
1281
1310
  this.callDataGridMethod('setStatus', 'loading', this.loadingdatamsg);
1311
+ // if(this.gridOptions.data.length || this.variableInflight) {
1312
+ // this.callDataGridMethod('setStatus', 'loading', this.loadingdatamsg);
1313
+ // } else {
1314
+ // this.callDataGridMethod('setStatus', 'nodata', this.nodatamessage);
1315
+ // }
1282
1316
  this.applyProps.forEach(function (args) { return _this.callDataGridMethod.apply(_this, __spreadArray([], __read(args))); });
1283
1317
  if (this.editmode === base.EDIT_MODE.QUICK_EDIT) {
1284
1318
  this.documentClickBind = this._documentClickBind.bind(this);
@@ -1606,7 +1640,7 @@
1606
1640
  TableComponent.prototype.setGridData = function (serverData) {
1607
1641
  var data = this.filternullrecords ? this.removeEmptyRecords(serverData) : serverData;
1608
1642
  if (!this.variableInflight) {
1609
- if (data && data.length === 0) {
1643
+ if (data && (data.length) === 0) {
1610
1644
  this.callDataGridMethod('setStatus', 'nodata', this.nodatamessage);
1611
1645
  }
1612
1646
  else {
@@ -2032,6 +2066,10 @@
2032
2066
  if (nv) {
2033
2067
  this.$element.find('.on-demand-datagrid > a').text(nv);
2034
2068
  }
2069
+ this.gridOptions.ondemandmessage = nv;
2070
+ break;
2071
+ case 'viewlessmessage':
2072
+ this.gridOptions.viewlessmessage = nv;
2035
2073
  break;
2036
2074
  case 'show':
2037
2075
  if (nv) {
@@ -3228,7 +3266,8 @@
3228
3266
  data: data,
3229
3267
  sortDirection: sortObj.direction,
3230
3268
  colDef: _this.table.columns[sortObj.field]
3231
- } });
3269
+ }
3270
+ });
3232
3271
  });
3233
3272
  };
3234
3273
  TableFilterSortDirective.prototype.searchHandler = function (searchSortObj, e, type, statePersistenceTriggered) {