@wavemaker/app-ng-runtime 11.14.1-18.6421 → 11.14.1-18.6427
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.
- package/components/base/bundles/index.umd.js +17 -81
- package/components/base/esm2022/pipes/custom-pipes.mjs +10 -10
- package/components/base/esm2022/utils/widget-utils.mjs +3 -3
- package/components/base/esm2022/widgets/common/base/base.component.mjs +6 -61
- package/components/base/esm2022/widgets/common/lazy-load/lazy-load.directive.mjs +3 -7
- package/components/base/esm2022/widgets/framework/property-change-handler.mjs +2 -7
- package/components/base/fesm2022/index.mjs +18 -82
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/base/pipes/custom-pipes.d.ts +5 -5
- package/components/basic/label/bundles/index.umd.js +1 -9
- package/components/basic/label/esm2022/label.directive.mjs +2 -10
- package/components/basic/label/fesm2022/index.mjs +1 -9
- package/components/basic/label/fesm2022/index.mjs.map +1 -1
- package/components/chart/bundles/index.umd.js +2 -2
- package/components/chart/esm2022/chart.utils.mjs +3 -3
- package/components/chart/fesm2022/index.mjs +2 -2
- package/components/chart/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/bundles/index.umd.js +2 -21
- package/components/containers/wizard/esm2022/wizard-step/wizard-step.component.mjs +1 -3
- package/components/containers/wizard/esm2022/wizard.component.mjs +3 -20
- package/components/containers/wizard/fesm2022/index.mjs +2 -21
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/wizard-step/wizard-step.component.d.ts +0 -2
- package/components/data/pagination/bundles/index.umd.js +0 -4
- package/components/data/pagination/esm2022/pagination.component.mjs +1 -5
- package/components/data/pagination/fesm2022/index.mjs +0 -4
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/table/bundles/index.umd.js +14 -370
- package/components/data/table/esm2022/table-action/table-action.directive.mjs +1 -8
- package/components/data/table/esm2022/table-column/table-column.directive.mjs +3 -107
- package/components/data/table/esm2022/table-column-group/table-column-group.directive.mjs +1 -9
- package/components/data/table/esm2022/table-cud.directive.mjs +2 -8
- package/components/data/table/esm2022/table-filter.directive.mjs +2 -12
- package/components/data/table/esm2022/table-row/table-row.directive.mjs +1 -8
- package/components/data/table/esm2022/table-row-action/table-row-action.directive.mjs +1 -8
- package/components/data/table/esm2022/table.component.mjs +12 -219
- package/components/data/table/fesm2022/index.mjs +15 -371
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/table-action/table-action.directive.d.ts +2 -3
- package/components/data/table/table-column/table-column.directive.d.ts +2 -3
- package/components/data/table/table-column-group/table-column-group.directive.d.ts +2 -3
- package/components/data/table/table-cud.directive.d.ts +1 -3
- package/components/data/table/table-filter.directive.d.ts +1 -3
- package/components/data/table/table-row/table-row.directive.d.ts +2 -3
- package/components/data/table/table-row-action/table-row-action.directive.d.ts +2 -3
- package/components/data/table/table.component.d.ts +2 -6
- package/components/navigation/menu/bundles/index.umd.js +0 -5
- package/components/navigation/menu/esm2022/menu.component.mjs +1 -6
- package/components/navigation/menu/fesm2022/index.mjs +0 -5
- package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/bundles/index.umd.js +6 -6
- package/components/navigation/popover/esm2022/popover.component.mjs +4 -4
- package/components/navigation/popover/fesm2022/index.mjs +3 -3
- package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/popover.component.d.ts +0 -6
- package/core/bundles/index.umd.js +15 -120
- package/core/esm2022/public_api.mjs +2 -2
- package/core/esm2022/utils/utils.mjs +2 -6
- package/core/esm2022/utils/watcher.mjs +15 -118
- package/core/fesm2022/index.mjs +15 -124
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/public_api.d.ts +1 -1
- package/core/utils/utils.d.ts +0 -1
- package/npm-shrinkwrap.json +2 -2
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +2 -3
- package/runtime/base/esm2022/components/base-page.component.mjs +1 -2
- package/runtime/base/esm2022/services/pipe-provider.service.mjs +4 -4
- package/runtime/base/fesm2022/index.mjs +2 -3
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/dynamic/bundles/index.umd.js +0 -4
- package/runtime/dynamic/esm2022/app/app.config.mjs +2 -6
- package/runtime/dynamic/fesm2022/index.mjs +1 -5
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/scripts/datatable/datatable.js +15 -103
|
@@ -507,22 +507,7 @@ $.widget('wm.datatable', {
|
|
|
507
507
|
|
|
508
508
|
/* function to get start index of the current active page */
|
|
509
509
|
getPageStartIndex: function() {
|
|
510
|
-
|
|
511
|
-
var getCurrentPageFn = this.options.getCurrentPage;
|
|
512
|
-
var getPageSizeFn = this.options.getPageSize;
|
|
513
|
-
var currentPage, pagesize;
|
|
514
|
-
if (!getCurrentPageFn || typeof getCurrentPageFn !== 'function') {
|
|
515
|
-
// Default to page 1 if getCurrentPage is not available
|
|
516
|
-
currentPage = 1;
|
|
517
|
-
} else {
|
|
518
|
-
currentPage = getCurrentPageFn();
|
|
519
|
-
}
|
|
520
|
-
if (!getPageSizeFn || typeof getPageSizeFn !== 'function') {
|
|
521
|
-
// Default to 10 if getPageSize is not available
|
|
522
|
-
pagesize = 10;
|
|
523
|
-
} else {
|
|
524
|
-
pagesize = getPageSizeFn();
|
|
525
|
-
}
|
|
510
|
+
var currentPage = this.options.getCurrentPage(), pagesize = this.options.getPageSize();
|
|
526
511
|
var isPrevPageUpdated = this.options.actionRowPage < currentPage;
|
|
527
512
|
var pageIndex = isPrevPageUpdated ? this.options.actionRowPage : currentPage;
|
|
528
513
|
return ((pageIndex - 1) * pagesize);
|
|
@@ -583,8 +568,6 @@ $.widget('wm.datatable', {
|
|
|
583
568
|
var self = this, preparedData,$tbody,pageStartIndex = self.getPageStartIndex(),
|
|
584
569
|
startRowIndex = self.options.startRowIndex,
|
|
585
570
|
isScrollorOnDemand = self.options.isNavTypeScrollOrOndemand();
|
|
586
|
-
var $activeRow = self.gridElement.find('tr.row-editing:not(.always-new-row)').first();
|
|
587
|
-
var index = $activeRow.index();
|
|
588
571
|
if(isScrollorOnDemand) {
|
|
589
572
|
$tbody = this.gridElement;
|
|
590
573
|
if(this.renderTableOnViewLess) {
|
|
@@ -640,16 +623,6 @@ $.widget('wm.datatable', {
|
|
|
640
623
|
this.options.setIsDataUpdatedByUser(false);
|
|
641
624
|
this.options.clearActionRowIndex();
|
|
642
625
|
}
|
|
643
|
-
if(this.options.editmode===this.CONSTANTS.QUICK_EDIT){
|
|
644
|
-
if (index>=0) {
|
|
645
|
-
const $newActiveRow = self.gridElement.find('tr').eq(index);
|
|
646
|
-
if ($newActiveRow && $newActiveRow.length) {
|
|
647
|
-
$newActiveRow.addClass('active');
|
|
648
|
-
$newActiveRow.trigger('click', [undefined, {action: 'edit', skipFocus:false}]);
|
|
649
|
-
self.setActiveRow($newActiveRow);
|
|
650
|
-
self.focusActiveRow();
|
|
651
|
-
}
|
|
652
|
-
}}
|
|
653
626
|
return $tbody;
|
|
654
627
|
},
|
|
655
628
|
|
|
@@ -1069,9 +1042,7 @@ $.widget('wm.datatable', {
|
|
|
1069
1042
|
'value': '',
|
|
1070
1043
|
'event': null
|
|
1071
1044
|
},
|
|
1072
|
-
compiledCellTemplates: {}
|
|
1073
|
-
// MEMORY LEAK FIX: Store bound function for proper event listener cleanup
|
|
1074
|
-
// boundRowClickHandlerOnCapture: null
|
|
1045
|
+
compiledCellTemplates: {}
|
|
1075
1046
|
});
|
|
1076
1047
|
// TODO: Variable loading status is getting updated before dataset update. This is resulting in loader going off before data is rendered.
|
|
1077
1048
|
// Need to update code with suitable fix. For now 250ms is added as workaround
|
|
@@ -1293,9 +1264,7 @@ $.widget('wm.datatable', {
|
|
|
1293
1264
|
this.element.find('.loading-data-msg').hide();
|
|
1294
1265
|
this.element.find('.on-demand-load-btn').text(this.options.ondemandmessage);
|
|
1295
1266
|
this.element.find('.on-demand-load-btn').show();
|
|
1296
|
-
} else if(this.options.getCurrentPage
|
|
1297
|
-
this.options.getPageCount && typeof this.options.getPageCount === 'function' &&
|
|
1298
|
-
(this.options.getCurrentPage() == this.options.getPageCount()) && this.options.showviewlessbutton) {
|
|
1267
|
+
} else if((this.options.getCurrentPage() == this.options.getPageCount()) && this.options.showviewlessbutton) {
|
|
1299
1268
|
this.element.find('.on-demand-load-btn').show().text(this.options.viewlessmessage);
|
|
1300
1269
|
this.element.find('.loading-data-msg').hide();
|
|
1301
1270
|
if(infScroll) {
|
|
@@ -1683,8 +1652,8 @@ $.widget('wm.datatable', {
|
|
|
1683
1652
|
},
|
|
1684
1653
|
|
|
1685
1654
|
/* Selects a row. */
|
|
1686
|
-
selectRow: function (row, value
|
|
1687
|
-
var rowIndex =
|
|
1655
|
+
selectRow: function (row, value) {
|
|
1656
|
+
var rowIndex = _.isNumber(row) ? row : this.Utils.getObjectIndex(this.options.data, row),
|
|
1688
1657
|
selector,
|
|
1689
1658
|
$row;
|
|
1690
1659
|
if (rowIndex !== -1) {
|
|
@@ -2109,11 +2078,10 @@ $.widget('wm.datatable', {
|
|
|
2109
2078
|
});
|
|
2110
2079
|
|
|
2111
2080
|
$editableElements = $row.find('td.cell-editing');
|
|
2112
|
-
|
|
2113
|
-
$row.on('click.cellEdit', 'td.cell-editing', function (e) {
|
|
2081
|
+
$editableElements.on('click', function (e) {
|
|
2114
2082
|
e.stopPropagation();
|
|
2115
2083
|
});
|
|
2116
|
-
$
|
|
2084
|
+
$editableElements.on('keydown', function (e) {
|
|
2117
2085
|
//To prevent up and down arrows, navigating to other rows in edit mode
|
|
2118
2086
|
if ((e.which === 38 || e.which === 40) && (e.currentTarget && !e.currentTarget.closest('.always-new-row'))) {
|
|
2119
2087
|
e.stopPropagation();
|
|
@@ -2182,8 +2150,7 @@ $.widget('wm.datatable', {
|
|
|
2182
2150
|
$requiredEls,
|
|
2183
2151
|
alwaysNewRow = $row.hasClass('always-new-row'),
|
|
2184
2152
|
advancedEdit = self.options.editmode === self.CONSTANTS.QUICK_EDIT,
|
|
2185
|
-
editOptions = {}
|
|
2186
|
-
rowindex=$row.attr('data-row-id');
|
|
2153
|
+
editOptions = {};
|
|
2187
2154
|
|
|
2188
2155
|
// when a row is edited set actionrow variables
|
|
2189
2156
|
this.options.setActionRowIndex($row.attr('data-row-id'));
|
|
@@ -2205,7 +2172,7 @@ $.widget('wm.datatable', {
|
|
|
2205
2172
|
}
|
|
2206
2173
|
//Select the current edited row
|
|
2207
2174
|
if (options.selectRow) {
|
|
2208
|
-
this.selectRow(rowData, true
|
|
2175
|
+
this.selectRow(rowData, true);
|
|
2209
2176
|
}
|
|
2210
2177
|
e = e || {};
|
|
2211
2178
|
e.data = e.data || {};
|
|
@@ -2360,9 +2327,6 @@ $.widget('wm.datatable', {
|
|
|
2360
2327
|
return;
|
|
2361
2328
|
}
|
|
2362
2329
|
}
|
|
2363
|
-
if(this.options?.getDataSource()?.category== "wm.Variable") {
|
|
2364
|
-
editOptions.rowindex = rowindex;
|
|
2365
|
-
}
|
|
2366
2330
|
this.options.afterRowUpdate(rowData, e, onSaveSuccess, editOptions);
|
|
2367
2331
|
}
|
|
2368
2332
|
} else {
|
|
@@ -2399,8 +2363,6 @@ $.widget('wm.datatable', {
|
|
|
2399
2363
|
|
|
2400
2364
|
this.disableActions(false);
|
|
2401
2365
|
$row.removeClass('row-editing');
|
|
2402
|
-
// PERFORMANCE FIX: Remove namespaced event listeners from row
|
|
2403
|
-
$row.off('.cellEdit');
|
|
2404
2366
|
$editableElements.off('click');
|
|
2405
2367
|
$editableElements.each(function () {
|
|
2406
2368
|
var $el = $(this),
|
|
@@ -2449,8 +2411,6 @@ $.widget('wm.datatable', {
|
|
|
2449
2411
|
$saveButton = $row.find('.save-edit-row-button'),
|
|
2450
2412
|
self = this;
|
|
2451
2413
|
$row.removeClass('row-editing');
|
|
2452
|
-
// PERFORMANCE FIX: Remove namespaced event listeners from row
|
|
2453
|
-
$row.off('.cellEdit');
|
|
2454
2414
|
$editableElements.off('click');
|
|
2455
2415
|
this.disableActions(false);
|
|
2456
2416
|
this._setGridEditMode(false);
|
|
@@ -2871,7 +2831,7 @@ $.widget('wm.datatable', {
|
|
|
2871
2831
|
var $cell = $target.closest('td.app-datagrid-cell'),
|
|
2872
2832
|
$editCells;
|
|
2873
2833
|
|
|
2874
|
-
if ($cell.is(':last-child')
|
|
2834
|
+
if ($cell.is(':last-child')) {
|
|
2875
2835
|
return true;
|
|
2876
2836
|
}
|
|
2877
2837
|
|
|
@@ -2899,17 +2859,8 @@ $.widget('wm.datatable', {
|
|
|
2899
2859
|
|
|
2900
2860
|
if (this.options.enableRowSelection) {
|
|
2901
2861
|
$htm[0].removeEventListener('click', this.rowClickHandlerOnCapture.bind(this));
|
|
2902
|
-
// MEMORY LEAK FIX: Remove old listener if exists before adding new one
|
|
2903
|
-
// if (this.boundRowClickHandlerOnCapture && $htm[0]) {
|
|
2904
|
-
// $htm[0].removeEventListener('click', this.boundRowClickHandlerOnCapture, true);
|
|
2905
|
-
// }
|
|
2906
2862
|
$htm.off();
|
|
2907
2863
|
$htm[0].addEventListener('click', this.rowClickHandlerOnCapture.bind(this));
|
|
2908
|
-
|
|
2909
|
-
// MEMORY LEAK FIX: Store bound function reference for proper removal
|
|
2910
|
-
// this.boundRowClickHandlerOnCapture = this.rowClickHandlerOnCapture.bind(this);
|
|
2911
|
-
// $htm[0].addEventListener('click', this.boundRowClickHandlerOnCapture, true);
|
|
2912
|
-
|
|
2913
2864
|
// add js click handler for capture phase in order to first listen on grid and
|
|
2914
2865
|
// assign selectedItems so that any child actions can have access to the selectedItems.
|
|
2915
2866
|
$htm.on('click', this.rowSelectionHandler.bind(this));
|
|
@@ -2955,9 +2906,6 @@ $.widget('wm.datatable', {
|
|
|
2955
2906
|
$htm.on('focus', 'tr.app-datagrid-row', function (e) {
|
|
2956
2907
|
var $row = $(e.currentTarget);
|
|
2957
2908
|
if (!$row.hasClass('row-editing')) {
|
|
2958
|
-
if(e.target===e.currentTarget && (e.which===0||!e.which)) {
|
|
2959
|
-
return;
|
|
2960
|
-
}
|
|
2961
2909
|
self.toggleEditRow(e, { $row: $row, action: 'edit'});
|
|
2962
2910
|
}
|
|
2963
2911
|
});
|
|
@@ -2996,7 +2944,7 @@ $.widget('wm.datatable', {
|
|
|
2996
2944
|
// triggered from the Row Actions
|
|
2997
2945
|
if (!isTargetGridAction && !isTargetRowAction) {
|
|
2998
2946
|
//Save the row on last column of the data table. Do not save the row if focus is out of input file.
|
|
2999
|
-
if (!isLastColumn || (isLastColumn &&
|
|
2947
|
+
if (!isLastColumn || (isLastColumn && e.relatedTarget === null) || $target.hasClass("file-upload")) {
|
|
3000
2948
|
return;
|
|
3001
2949
|
}
|
|
3002
2950
|
}
|
|
@@ -3546,11 +3494,7 @@ $.widget('wm.datatable', {
|
|
|
3546
3494
|
this.dataStatusContainer.hide();
|
|
3547
3495
|
} else {
|
|
3548
3496
|
// [WMS-23839] always show load more btn if show view less btn is true
|
|
3549
|
-
if (this.options.isNavTypeScrollOrOndemand() &&
|
|
3550
|
-
(state === 'nodata' ||
|
|
3551
|
-
(this.options.getCurrentPage && typeof this.options.getCurrentPage === 'function' &&
|
|
3552
|
-
this.options.getPageCount && typeof this.options.getPageCount === 'function' &&
|
|
3553
|
-
(this.options.getCurrentPage() == this.options.getPageCount()) && !this.options.showviewlessbutton))) {
|
|
3497
|
+
if (this.options.isNavTypeScrollOrOndemand() && (state === 'nodata' || ((this.options.getCurrentPage() == this.options.getPageCount()) && !this.options.showviewlessbutton))) {
|
|
3554
3498
|
this.element.find('.on-demand-datagrid a').hide();
|
|
3555
3499
|
}
|
|
3556
3500
|
this.dataStatusContainer.show();
|
|
@@ -3560,9 +3504,7 @@ $.widget('wm.datatable', {
|
|
|
3560
3504
|
if (state === 'nodata') {
|
|
3561
3505
|
this.dataStatusContainer.css('height', 'auto');
|
|
3562
3506
|
this.dataStatus.contentHeight = 0;
|
|
3563
|
-
} else if (this.options.isNavTypeScrollOrOndemand() &&
|
|
3564
|
-
this.options.getCurrentPage && typeof this.options.getCurrentPage === 'function' &&
|
|
3565
|
-
this.options.getCurrentPage() > 1){
|
|
3507
|
+
} else if (this.options.isNavTypeScrollOrOndemand() && this.options.getCurrentPage() > 1){
|
|
3566
3508
|
// showing the loading icon only for the first page
|
|
3567
3509
|
// from second page there is another loader which is being shown instead of LoadMore btn
|
|
3568
3510
|
this.dataStatusContainer.hide();
|
|
@@ -3572,9 +3514,7 @@ $.widget('wm.datatable', {
|
|
|
3572
3514
|
this.dataStatusContainer.css('height', this.dataStatus.height > this.dataStatus.contentHeight ? 'auto' : this.dataStatus.contentHeight);
|
|
3573
3515
|
}
|
|
3574
3516
|
}
|
|
3575
|
-
if (!isScrollOrOndemand || (isScrollOrOndemand &&
|
|
3576
|
-
this.options.getCurrentPage && typeof this.options.getCurrentPage === 'function' &&
|
|
3577
|
-
this.options.getCurrentPage() === 1)) {
|
|
3517
|
+
if (!isScrollOrOndemand || (isScrollOrOndemand && this.options.getCurrentPage() === 1)) {
|
|
3578
3518
|
this.gridContainer.addClass("show-msg");
|
|
3579
3519
|
}
|
|
3580
3520
|
} else {
|
|
@@ -3693,35 +3633,7 @@ $.widget('wm.datatable', {
|
|
|
3693
3633
|
},
|
|
3694
3634
|
|
|
3695
3635
|
_destroy: function () {
|
|
3696
|
-
// MEMORY LEAK FIX: Remove native event listener using stored bound function
|
|
3697
|
-
// if (this.gridElement && this.gridElement[0] && this.boundRowClickHandlerOnCapture) {
|
|
3698
|
-
// this.gridElement[0].removeEventListener('click', this.boundRowClickHandlerOnCapture, true);
|
|
3699
|
-
// this.boundRowClickHandlerOnCapture = null;
|
|
3700
|
-
// }
|
|
3701
|
-
|
|
3702
|
-
// MEMORY LEAK FIX: Remove all jQuery event handlers
|
|
3703
|
-
if (this.gridHeaderElement) {
|
|
3704
|
-
this.gridHeaderElement.off();
|
|
3705
|
-
}
|
|
3706
|
-
if (this.gridElement) {
|
|
3707
|
-
this.gridElement.off();
|
|
3708
|
-
}
|
|
3709
|
-
if (this.gridSearch) {
|
|
3710
|
-
this.gridSearch.off();
|
|
3711
|
-
}
|
|
3712
|
-
if (this.tableContainer) {
|
|
3713
|
-
this.tableContainer.off();
|
|
3714
|
-
}
|
|
3715
|
-
if (this.gridContainer) {
|
|
3716
|
-
this.gridContainer.off();
|
|
3717
|
-
}
|
|
3718
|
-
|
|
3719
|
-
// MEMORY LEAK FIX: Clear all internal structures
|
|
3720
|
-
this.preparedData = [];
|
|
3721
|
-
this.preparedHeaderData = [];
|
|
3722
|
-
this.compiledCellTemplates = {};
|
|
3723
|
-
|
|
3724
3636
|
this.element.text('');
|
|
3725
3637
|
window.clearTimeout(this.refreshGridTimeout);
|
|
3726
3638
|
}
|
|
3727
|
-
});
|
|
3639
|
+
});
|