@sme.up/ketchup 11.0.10 → 11.0.11
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/dist/cjs/kup-autocomplete_30.cjs.entry.js +53 -41
- package/dist/collection/components/kup-data-table/kup-data-table.js +53 -41
- package/dist/components/kup-accordion.js +1 -1
- package/dist/components/kup-activity-timeline.js +1 -1
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +1 -1
- package/dist/components/kup-card-list.js +2 -2
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +1 -1
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +1 -1
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +1 -1
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +2 -2
- package/dist/components/kup-file-upload.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +1 -1
- package/dist/components/kup-iframe.js +1 -1
- package/dist/components/kup-image-list.js +1 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +2 -2
- package/dist/components/kup-lazy.js +1 -1
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +3 -3
- package/dist/components/kup-nav-bar.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-object-field.js +1 -1
- package/dist/components/kup-planner.js +1 -1
- package/dist/components/kup-probe.js +1 -1
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +1 -1
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +1 -1
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +1 -1
- package/dist/components/kup-typography-list.js +1 -1
- package/dist/components/kup-typography.js +1 -1
- package/dist/components/{p-f8e06edf.js → p-1b4df416.js} +1 -1
- package/dist/components/{p-fd66b3e0.js → p-3af86b4f.js} +1 -1
- package/dist/components/{p-44a1dec0.js → p-47e215d3.js} +1 -1
- package/dist/components/{p-7e61d7bf.js → p-ad48e240.js} +53 -41
- package/dist/components/{p-bf7d326c.js → p-d18420d7.js} +1 -1
- package/dist/esm/kup-autocomplete_30.entry.js +53 -41
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-e6906751.entry.js +8 -0
- package/package.json +1 -1
- package/dist/ketchup/p-7f84b3a5.entry.js +0 -8
|
@@ -8745,7 +8745,7 @@ var __classPrivateFieldSet$4 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
8745
8745
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
8746
8746
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
8747
8747
|
};
|
|
8748
|
-
var _KupDataTable_instances, _KupDataTable_checkUpdateState, _KupDataTable_initialized, _KupDataTable_cellToFocus, _KupDataTable_rows, _KupDataTable_rowsLength, _KupDataTable_paginatedRows, _KupDataTable_paginatedRowsLength, _KupDataTable_footer, _KupDataTable_kupManager, _KupDataTable_renderedRows, _KupDataTable_loadMoreEventCounter, _KupDataTable_loadMoreEventPreviousQuantity, _KupDataTable_theadRef, _KupDataTable_tableRef, _KupDataTable_originalData, _KupDataTable_originalDataLoaded, _KupDataTable_originalDataLoadedMaxId, _KupDataTable_insertedRowIds, _KupDataTable_modifiedRowsIds, _KupDataTable_tableAreaRef, _KupDataTable_stickyTheadRef, _KupDataTable_lastPointerDetails, _KupDataTable_customizeTopButtonRef, _KupDataTable_customizeTopPanelRef, _KupDataTable_sizedColumns, _KupDataTable_intObserver, _KupDataTable_navBarHeight, _KupDataTable_theadIntersecting, _KupDataTable_tableIntersecting, _KupDataTable_isSafariBrowser, _KupDataTable_isRestoringState, _KupDataTable_globalFilterTimeout, _KupDataTable_totalMenuCoords, _KupDataTable_clickTimeout, _KupDataTable_thRefs, _KupDataTable_rowsRefs, _KupDataTable_oldWidth, _KupDataTable_hold, _KupDataTable_interactableDrag, _KupDataTable_interactableDrop, _KupDataTable_interactableResize, _KupDataTable_interactableTouch, _KupDataTable_dropareaRef, _KupDataTable_removeDropareaRef, _KupDataTable_groupsDropareaRef, _KupDataTable_clickCb, _KupDataTable_clickCbCustomPanel, _KupDataTable_clickCbDropCard, _KupDataTable_resizeTimeout, _KupDataTable_columnMenuInstance, _KupDataTable_filtersColumnMenuInstance, _KupDataTable_filtersRowsInstance, _KupDataTable_detailCard, _KupDataTable_insertCard, _KupDataTable_actionsCard, _KupDataTable_confirmDeleteCard, _KupDataTable_confirmDeleteDialog, _KupDataTable_columnMenuCard, _KupDataTable_columnDropCard, _KupDataTable_columnDropCardAnchor, _KupDataTable_dropDownActionCardAnchor, _KupDataTable_insertCount, _KupDataTable_lastFocusedColumn, _KupDataTable_lastFocusedCell, _KupDataTable_lastFocusedRow, _KupDataTable_maxRowsPerPage, _KupDataTable_readyPromise, _KupDataTable_readyResolve, _KupDataTable_BUTTON_CANCEL_ID, _KupDataTable_BUTTON_SUBMIT_ID, _KupDataTable_FIELDS_FORM_ID, _KupDataTable_MESSAGE_ID, _KupDataTable_MESSAGE_WRAPPER_ID, _KupDataTable_INSERT_PREFIX, _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER, _KupDataTable_insertNewColumnInVisibleColumnsList, _KupDataTable_closeDropCard, _KupDataTable_createDropCard, _KupDataTable_calculateData, _KupDataTable_getRow, _KupDataTable__getRow, _KupDataTable_getTransposedData, _KupDataTable_setTransposedData, _KupDataTable_stickyHeaderPosition, _KupDataTable_updateStickyHeaderSize, _KupDataTable_setObserver, _KupDataTable_didLoadInteractables, _KupDataTable_didRenderInteractables, _KupDataTable_didLoadObservers, _KupDataTable_didRenderObservers, _KupDataTable_didLoadEventHandling, _KupDataTable_scrollStickyHeader, _KupDataTable_checkScrollOnHover, _KupDataTable_customizePanelPosition, _KupDataTable_rowsPointLength, _KupDataTable_paginatedRowsPointLength, _KupDataTable__rowsLength, _KupDataTable_resetSelectedRows, _KupDataTable_getSizedColumns, _KupDataTable_rowDetail, _KupDataTable_dropDownActions, _KupDataTable_createDropDownActionsCard, _KupDataTable_clearSearchActionsCard, _KupDataTable_filterRowActionsCard, _KupDataTable_closeRowActionsCard, _KupDataTable_closeColumnMenuCard, _KupDataTable_prepareDataForActionsCard, _KupDataTable_rowInsertForm, _KupDataTable_rowsDelete, _KupDataTable_getEventDetails, _KupDataTable_getEventDetailsForCurrentSelection, _KupDataTable_getSourceElementCoordsForCurrentSelection, _KupDataTable_clickHandler, _KupDataTable_cellActionsMenuHandler, _KupDataTable_contextMenuHandler, _KupDataTable_tooltipRequestHandler, _KupDataTable_contextMenuHandlerDetailsManager, _KupDataTable_dblClickHandler, _KupDataTable_initRows, _KupDataTable_filterRows, _KupDataTable_isGrouping, _KupDataTable_hasRowActions, _KupDataTable_removeGroup, _KupDataTable_hasTotals, _KupDataTable_tableHasAutoWidth, _KupDataTable_forceGroupExpansion, _KupDataTable_forceRowGroupExpansion, _KupDataTable_adjustPaginator, _KupDataTable_getCellEditability, _KupDataTable_composeFixedCellStyleAndClass, _KupDataTable_updateFixedRowsAndColumnsCssVariables, _KupDataTable_horNav, _KupDataTable_verNav, _KupDataTable_onKupKeyDown, _KupDataTable_onColumnSort, _KupDataTable_onRemoveFilter, _KupDataTable_getFilterValueForTooltip, _KupDataTable_onGlobalFilterChange, _KupDataTable_handlePageChange, _KupDataTable_handleRowsPerPageChange, _KupDataTable_onRowClick, _KupDataTable_selectColumn, _KupDataTable_deselectColumn, _KupDataTable_onRowActionExpanderClick, _KupDataTable_handleRowSelect, _KupDataTable_onRowExpand, _KupDataTable_onSelectAll, _KupDataTable_openTotalMenu, _KupDataTable_closeTotalMenu, _KupDataTable_isOpenedTotalMenuForColumn, _KupDataTable_groupRows, _KupDataTable_onLoadMoreClick, _KupDataTable_adjustGroupState, _KupDataTable_adjustGroupStateFromRow, _KupDataTable_sortRows, _KupDataTable_getSortIcon, _KupDataTable_getSortDecode, _KupDataTable_calculateColspan, _KupDataTable_isGroupExpanded, _KupDataTable_handleColumnSort, _KupDataTable_moveSortedColumns, _KupDataTable_handleUpdateClick, _KupDataTable_onBlurHandler, _KupDataTable_applyLineBreaks, _KupDataTable_composeHeaderCellClassAndStyle, _KupDataTable_renderHeader, _KupDataTable_renderStickyHeader, _KupDataTable_totalMenuPosition, _KupDataTable_onTotalMenuOpen, _KupDataTable_renderRow, _KupDataTable_onCustomSettingsClick, _KupDataTable_openCustomSettings, _KupDataTable_closeCustomSettings, _KupDataTable_renderPaginator, _KupDataTable_columnRemoveArea, _KupDataTable_columnGroupArea, _KupDataTable_hideShowColumnDropArea, _KupDataTable_handleColumnGroup, _KupDataTable_transcodeItem, _KupDataTable_createListData, _KupDataTable_FONTSIZE_CODES, _KupDataTable_FONTSIZE_DECODES, _KupDataTable_FONTSIZE_ICONS, _KupDataTable_getFontSizeCodeFromDecode, _KupDataTable_renderFontSizePanel, _KupDataTable_DENSITY_DECODES, _KupDataTable_DENSITY_ICONS, _KupDataTable_getDensityCodeFromDecode, _KupDataTable_renderDensityPanel, _KupDataTable_GRID_CODES, _KupDataTable_GRID_DECODES, _KupDataTable_GRID_ICONS, _KupDataTable_getGridCodeFromDecode, _KupDataTable_renderTransposeSwitch, _KupDataTable_renderGridPanel, _KupDataTable_renderCommandButton, _KupDataTable_handleChipsContextMenu, _KupDataTable_renderCommandDropDownButton, _KupDataTable_renderOtherButtons, _KupDataTable_addRowHandler, _KupDataTable_createRowWithInputFields, _KupDataTable_renderUpdateButtons, _KupDataTable_createDeletePayload, _KupDataTable_isRowInserted, _KupDataTable_isRowModified
|
|
8748
|
+
var _KupDataTable_instances, _KupDataTable_checkUpdateState, _KupDataTable_initialized, _KupDataTable_cellToFocus, _KupDataTable_rows, _KupDataTable_rowsLength, _KupDataTable_paginatedRows, _KupDataTable_paginatedRowsLength, _KupDataTable_footer, _KupDataTable_kupManager, _KupDataTable_renderedRows, _KupDataTable_loadMoreEventCounter, _KupDataTable_loadMoreEventPreviousQuantity, _KupDataTable_theadRef, _KupDataTable_tableRef, _KupDataTable_originalData, _KupDataTable_originalDataLoaded, _KupDataTable_originalDataLoadedMaxId, _KupDataTable_insertedRowIds, _KupDataTable_modifiedRowsIds, _KupDataTable_tableAreaRef, _KupDataTable_stickyTheadRef, _KupDataTable_lastPointerDetails, _KupDataTable_customizeTopButtonRef, _KupDataTable_customizeTopPanelRef, _KupDataTable_sizedColumns, _KupDataTable_intObserver, _KupDataTable_navBarHeight, _KupDataTable_theadIntersecting, _KupDataTable_tableIntersecting, _KupDataTable_isSafariBrowser, _KupDataTable_isRestoringState, _KupDataTable_globalFilterTimeout, _KupDataTable_totalMenuCoords, _KupDataTable_clickTimeout, _KupDataTable_thRefs, _KupDataTable_rowsRefs, _KupDataTable_oldWidth, _KupDataTable_hold, _KupDataTable_interactableDrag, _KupDataTable_interactableDrop, _KupDataTable_interactableResize, _KupDataTable_interactableTouch, _KupDataTable_dropareaRef, _KupDataTable_removeDropareaRef, _KupDataTable_groupsDropareaRef, _KupDataTable_clickCb, _KupDataTable_clickCbCustomPanel, _KupDataTable_clickCbDropCard, _KupDataTable_resizeTimeout, _KupDataTable_columnMenuInstance, _KupDataTable_filtersColumnMenuInstance, _KupDataTable_filtersRowsInstance, _KupDataTable_detailCard, _KupDataTable_insertCard, _KupDataTable_actionsCard, _KupDataTable_confirmDeleteCard, _KupDataTable_confirmDeleteDialog, _KupDataTable_columnMenuCard, _KupDataTable_columnDropCard, _KupDataTable_columnDropCardAnchor, _KupDataTable_dropDownActionCardAnchor, _KupDataTable_insertCount, _KupDataTable_lastFocusedColumn, _KupDataTable_lastFocusedCell, _KupDataTable_lastFocusedRow, _KupDataTable_maxRowsPerPage, _KupDataTable_readyPromise, _KupDataTable_readyResolve, _KupDataTable_BUTTON_CANCEL_ID, _KupDataTable_BUTTON_SUBMIT_ID, _KupDataTable_FIELDS_FORM_ID, _KupDataTable_MESSAGE_ID, _KupDataTable_MESSAGE_WRAPPER_ID, _KupDataTable_INSERT_PREFIX, _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER, _KupDataTable_insertNewColumnInVisibleColumnsList, _KupDataTable_closeDropCard, _KupDataTable_createDropCard, _KupDataTable_calculateData, _KupDataTable_getRow, _KupDataTable__getRow, _KupDataTable_getTransposedData, _KupDataTable_setTransposedData, _KupDataTable_stickyHeaderPosition, _KupDataTable_updateStickyHeaderSize, _KupDataTable_setObserver, _KupDataTable_didLoadInteractables, _KupDataTable_didRenderInteractables, _KupDataTable_didLoadObservers, _KupDataTable_didRenderObservers, _KupDataTable_didLoadEventHandling, _KupDataTable_scrollStickyHeader, _KupDataTable_checkScrollOnHover, _KupDataTable_customizePanelPosition, _KupDataTable_rowsPointLength, _KupDataTable_paginatedRowsPointLength, _KupDataTable__rowsLength, _KupDataTable_resetSelectedRows, _KupDataTable_getSizedColumns, _KupDataTable_rowDetail, _KupDataTable_dropDownActions, _KupDataTable_createDropDownActionsCard, _KupDataTable_clearSearchActionsCard, _KupDataTable_filterRowActionsCard, _KupDataTable_closeRowActionsCard, _KupDataTable_closeColumnMenuCard, _KupDataTable_prepareDataForActionsCard, _KupDataTable_rowInsertForm, _KupDataTable_rowsDelete, _KupDataTable_getEventDetails, _KupDataTable_getEventDetailsForCurrentSelection, _KupDataTable_getSourceElementCoordsForCurrentSelection, _KupDataTable_clickHandler, _KupDataTable_cellActionsMenuHandler, _KupDataTable_contextMenuHandler, _KupDataTable_tooltipRequestHandler, _KupDataTable_contextMenuHandlerDetailsManager, _KupDataTable_dblClickHandler, _KupDataTable_initRows, _KupDataTable_filterRows, _KupDataTable_isGrouping, _KupDataTable_hasRowActions, _KupDataTable_removeGroup, _KupDataTable_hasTotals, _KupDataTable_tableHasAutoWidth, _KupDataTable_forceGroupExpansion, _KupDataTable_forceRowGroupExpansion, _KupDataTable_adjustPaginator, _KupDataTable_getCellEditability, _KupDataTable_composeFixedCellStyleAndClass, _KupDataTable_updateFixedRowsAndColumnsCssVariables, _KupDataTable_horNav, _KupDataTable_verNav, _KupDataTable_onKupKeyDown, _KupDataTable_onColumnSort, _KupDataTable_onRemoveFilter, _KupDataTable_getFilterValueForTooltip, _KupDataTable_onGlobalFilterChange, _KupDataTable_handlePageChange, _KupDataTable_handleRowsPerPageChange, _KupDataTable_onRowClick, _KupDataTable_selectColumn, _KupDataTable_deselectColumn, _KupDataTable_onRowActionExpanderClick, _KupDataTable_handleRowSelect, _KupDataTable_onRowExpand, _KupDataTable_onSelectAll, _KupDataTable_openTotalMenu, _KupDataTable_closeTotalMenu, _KupDataTable_isOpenedTotalMenuForColumn, _KupDataTable_groupRows, _KupDataTable_onLoadMoreClick, _KupDataTable_adjustGroupState, _KupDataTable_adjustGroupStateFromRow, _KupDataTable_sortRows, _KupDataTable_getSortIcon, _KupDataTable_getSortDecode, _KupDataTable_calculateColspan, _KupDataTable_isGroupExpanded, _KupDataTable_handleColumnSort, _KupDataTable_moveSortedColumns, _KupDataTable_handleUpdateClick, _KupDataTable_onBlurHandler, _KupDataTable_applyLineBreaks, _KupDataTable_composeHeaderCellClassAndStyle, _KupDataTable_renderHeader, _KupDataTable_renderStickyHeader, _KupDataTable_totalMenuPosition, _KupDataTable_onTotalMenuOpen, _KupDataTable_renderRow, _KupDataTable_onCustomSettingsClick, _KupDataTable_openCustomSettings, _KupDataTable_closeCustomSettings, _KupDataTable_renderPaginator, _KupDataTable_columnRemoveArea, _KupDataTable_columnGroupArea, _KupDataTable_hideShowColumnDropArea, _KupDataTable_handleColumnGroup, _KupDataTable_transcodeItem, _KupDataTable_createListData, _KupDataTable_FONTSIZE_CODES, _KupDataTable_FONTSIZE_DECODES, _KupDataTable_FONTSIZE_ICONS, _KupDataTable_getFontSizeCodeFromDecode, _KupDataTable_renderFontSizePanel, _KupDataTable_DENSITY_DECODES, _KupDataTable_DENSITY_ICONS, _KupDataTable_getDensityCodeFromDecode, _KupDataTable_renderDensityPanel, _KupDataTable_GRID_CODES, _KupDataTable_GRID_DECODES, _KupDataTable_GRID_ICONS, _KupDataTable_getGridCodeFromDecode, _KupDataTable_renderTransposeSwitch, _KupDataTable_renderGridPanel, _KupDataTable_renderCommandButton, _KupDataTable_handleChipsContextMenu, _KupDataTable_renderCommandDropDownButton, _KupDataTable_renderOtherButtons, _KupDataTable_addRowHandler, _KupDataTable_createRowWithInputFields, _KupDataTable_renderUpdateButtons, _KupDataTable_createDeletePayload, _KupDataTable_isRowInserted, _KupDataTable_isRowModified;
|
|
8749
8749
|
const dom$2 = document.documentElement;
|
|
8750
8750
|
const KupDataTable = class {
|
|
8751
8751
|
constructor(hostRef) {
|
|
@@ -9015,28 +9015,40 @@ const KupDataTable = class {
|
|
|
9015
9015
|
'grid_off',
|
|
9016
9016
|
]);
|
|
9017
9017
|
_KupDataTable_addRowHandler.set(this, async (row) => {
|
|
9018
|
-
var _a, _b;
|
|
9019
|
-
var _c;
|
|
9020
9018
|
let newRow;
|
|
9019
|
+
// Retrieves the currently selected rows, if any. They will be used as a
|
|
9020
|
+
// template for the new row when available.
|
|
9021
9021
|
const selectedRows = await this.getSelectedRows();
|
|
9022
9022
|
if (selectedRows.length > 0) {
|
|
9023
|
-
newRow =
|
|
9024
|
-
}
|
|
9025
|
-
else if (((_b = (_a = __classPrivateFieldGet$8(this, _KupDataTable_originalDataLoaded, "f")) === null || _a === void 0 ? void 0 : _a.rows) === null || _b === void 0 ? void 0 : _b.length) > 0 && !row) {
|
|
9026
|
-
newRow = JSON.parse(JSON.stringify(__classPrivateFieldGet$8(this, _KupDataTable_originalDataLoaded, "f").rows[0]));
|
|
9023
|
+
newRow = __classPrivateFieldGet$8(this, _KupDataTable_createRowWithInputFields, "f").call(this, selectedRows[0]);
|
|
9027
9024
|
}
|
|
9028
9025
|
else if (row) {
|
|
9026
|
+
// An explicit row was provided: build the new row from it, applying
|
|
9027
|
+
// the column input-field configuration.
|
|
9029
9028
|
newRow = __classPrivateFieldGet$8(this, _KupDataTable_createRowWithInputFields, "f").call(this, row);
|
|
9030
9029
|
}
|
|
9031
9030
|
else {
|
|
9031
|
+
// Nothing to copy from: build a blank row with input fields based on
|
|
9032
|
+
// the current column definitions.
|
|
9032
9033
|
newRow = __classPrivateFieldGet$8(this, _KupDataTable_createRowWithInputFields, "f").call(this);
|
|
9033
9034
|
}
|
|
9035
|
+
// When no template was used (no selection and no explicit row), reset the
|
|
9036
|
+
// value of every cell so the new record is empty and ready for input.
|
|
9034
9037
|
Object.values(newRow.cells).forEach((cell) => {
|
|
9035
|
-
|
|
9038
|
+
var _a;
|
|
9039
|
+
if (selectedRows.length === 0 && !row) {
|
|
9036
9040
|
cell.value = '';
|
|
9041
|
+
if ((_a = cell === null || cell === void 0 ? void 0 : cell.data) === null || _a === void 0 ? void 0 : _a.initialValue) {
|
|
9042
|
+
cell.data.initialValue = '';
|
|
9043
|
+
}
|
|
9037
9044
|
}
|
|
9038
9045
|
});
|
|
9039
|
-
|
|
9046
|
+
// Assigns an id to the new row. The id is always the highest id
|
|
9047
|
+
// currently present in the data plus one, so inserted rows are always
|
|
9048
|
+
// ordered (0, 1, 2, 3, ...) regardless of insertions or deletions.
|
|
9049
|
+
const currentMaxId = this.data.rows.reduce((max, r) => Math.max(max, parseInt(r.id) || 0), __classPrivateFieldGet$8(this, _KupDataTable_originalDataLoadedMaxId, "f"));
|
|
9050
|
+
newRow.id = (currentMaxId + 1).toString();
|
|
9051
|
+
// Tracks the new row as inserted and prepends it to the table data.
|
|
9040
9052
|
__classPrivateFieldGet$8(this, _KupDataTable_insertedRowIds, "f").push(newRow.id);
|
|
9041
9053
|
this.insertNewRow(newRow, true);
|
|
9042
9054
|
});
|
|
@@ -9045,18 +9057,22 @@ const KupDataTable = class {
|
|
|
9045
9057
|
const row = { cells: {} };
|
|
9046
9058
|
(_a = this.data) === null || _a === void 0 ? void 0 : _a.columns.forEach((c) => {
|
|
9047
9059
|
var _a, _b, _c;
|
|
9060
|
+
const columnData = Object.assign(Object.assign({}, c === null || c === void 0 ? void 0 : c['data']), (c['length'] && c['maxLength']
|
|
9061
|
+
? {
|
|
9062
|
+
size: c['length'],
|
|
9063
|
+
maxLength: c['maxLength'],
|
|
9064
|
+
}
|
|
9065
|
+
: {}));
|
|
9048
9066
|
const cell = ((_a = rowToCopy === null || rowToCopy === void 0 ? void 0 : rowToCopy.cells) === null || _a === void 0 ? void 0 : _a[c.name])
|
|
9049
|
-
?
|
|
9067
|
+
? (() => {
|
|
9068
|
+
const clonedCell = JSON.parse(JSON.stringify(rowToCopy.cells[c.name]));
|
|
9069
|
+
return Object.assign(Object.assign({}, clonedCell), { data: Object.assign(Object.assign({}, columnData), clonedCell === null || clonedCell === void 0 ? void 0 : clonedCell.data) });
|
|
9070
|
+
})()
|
|
9050
9071
|
: {
|
|
9051
9072
|
shape: (_b = c.shape) !== null && _b !== void 0 ? _b : kupManager$2.FCellShapes.TEXT_FIELD,
|
|
9052
9073
|
obj: Object.assign({}, c.obj),
|
|
9053
9074
|
isEditable: (_c = c.isEditable) !== null && _c !== void 0 ? _c : true,
|
|
9054
|
-
data:
|
|
9055
|
-
? {
|
|
9056
|
-
size: c['length'],
|
|
9057
|
-
maxLength: c['maxLength'],
|
|
9058
|
-
}
|
|
9059
|
-
: {},
|
|
9075
|
+
data: columnData,
|
|
9060
9076
|
};
|
|
9061
9077
|
row.cells[c.name] = cell;
|
|
9062
9078
|
});
|
|
@@ -9164,7 +9180,6 @@ const KupDataTable = class {
|
|
|
9164
9180
|
this.showFilters = state.showFilters;
|
|
9165
9181
|
this.showGroups = state.showGroups;
|
|
9166
9182
|
this.showHeader = state.showHeader;
|
|
9167
|
-
this.showLoadMore = state.showLoadMore;
|
|
9168
9183
|
this.showPaginator = state.showPaginator;
|
|
9169
9184
|
this.hiddenSubmitButton = state.hiddenSubmitButton;
|
|
9170
9185
|
this.sortEnabled = state.sortEnabled;
|
|
@@ -9277,7 +9292,9 @@ const KupDataTable = class {
|
|
|
9277
9292
|
if (originalDataRowIndex > -1) {
|
|
9278
9293
|
this.data.rows[originalDataRowIndex].cells =
|
|
9279
9294
|
structuredClone(row.cells);
|
|
9280
|
-
|
|
9295
|
+
// Track the row by its id (consistent with the other
|
|
9296
|
+
// places where #modifiedRowsIds is populated).
|
|
9297
|
+
__classPrivateFieldGet$8(this, _KupDataTable_modifiedRowsIds, "f").push(row.id);
|
|
9281
9298
|
}
|
|
9282
9299
|
else {
|
|
9283
9300
|
__classPrivateFieldGet$8(this, _KupDataTable_addRowHandler, "f").call(this, row);
|
|
@@ -9392,6 +9409,10 @@ const KupDataTable = class {
|
|
|
9392
9409
|
}
|
|
9393
9410
|
if (deletedRows.length > 0) {
|
|
9394
9411
|
this.data.rows = newRows;
|
|
9412
|
+
// Clean up the tracking arrays so deleted rows are no longer
|
|
9413
|
+
// considered inserted or modified.
|
|
9414
|
+
__classPrivateFieldSet$4(this, _KupDataTable_insertedRowIds, __classPrivateFieldGet$8(this, _KupDataTable_insertedRowIds, "f").filter((id) => !ids.includes(id)), "f");
|
|
9415
|
+
__classPrivateFieldSet$4(this, _KupDataTable_modifiedRowsIds, __classPrivateFieldGet$8(this, _KupDataTable_modifiedRowsIds, "f").filter((id) => !ids.includes(id)), "f");
|
|
9395
9416
|
await this.refresh(true);
|
|
9396
9417
|
}
|
|
9397
9418
|
return deletedRows;
|
|
@@ -10338,7 +10359,7 @@ const KupDataTable = class {
|
|
|
10338
10359
|
__classPrivateFieldSet$4(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_getSizedColumns).call(this), "f");
|
|
10339
10360
|
let rows = null;
|
|
10340
10361
|
if (__classPrivateFieldGet$8(this, _KupDataTable_paginatedRowsLength, "f") === 0) {
|
|
10341
|
-
rows = (index.h("tr", { key: '
|
|
10362
|
+
rows = (index.h("tr", { key: '5d5bc9d717045ebacf203981e4cb82dc5e6743b3', ref: (el) => __classPrivateFieldGet$8(this, _KupDataTable_rowsRefs, "f").push(el) }, index.h("td", { key: 'edc985270001e7d4792aed4cadaf3b6ae8a9b16b', colSpan: __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
|
|
10342
10363
|
}
|
|
10343
10364
|
else {
|
|
10344
10365
|
rows = [];
|
|
@@ -10414,7 +10435,7 @@ const KupDataTable = class {
|
|
|
10414
10435
|
__classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_handleChipsContextMenu).call(this, chipArg.id, e);
|
|
10415
10436
|
});
|
|
10416
10437
|
}
|
|
10417
|
-
groupChips = index.h(fChip.FChip, Object.assign({ key: '
|
|
10438
|
+
groupChips = index.h(fChip.FChip, Object.assign({ key: 'ebf94e6578476caaf11d9b33d020c07444cebcb4' }, props));
|
|
10418
10439
|
}
|
|
10419
10440
|
}
|
|
10420
10441
|
const tableClass = {
|
|
@@ -10446,7 +10467,7 @@ const KupDataTable = class {
|
|
|
10446
10467
|
if (this.headerIsPersistent &&
|
|
10447
10468
|
this.tableHeight === undefined &&
|
|
10448
10469
|
this.tableWidth === undefined) {
|
|
10449
|
-
stickyEl = (index.h("sticky-header", { key: '
|
|
10470
|
+
stickyEl = (index.h("sticky-header", { key: 'adbf7ea77dd2538152d896c57f48aee731ec4bd0', class: "hover-scrolling-child", hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$4(this, _KupDataTable_stickyTheadRef, el, "f")) }, index.h("thead-sticky", { key: '65884ef4206bcf998229298e1c947b45985455a6' }, index.h("tr-sticky", { key: '2c77fb6204cc5eec25b7d445491f32525246b334' }, stickyHeader))));
|
|
10450
10471
|
}
|
|
10451
10472
|
let belowClass = 'below-wrapper';
|
|
10452
10473
|
if (!!this.tableHeight || !!this.tableWidth) {
|
|
@@ -10492,7 +10513,7 @@ const KupDataTable = class {
|
|
|
10492
10513
|
const useGlobalFilter = !this.legacyLook &&
|
|
10493
10514
|
(this.globalFilter ||
|
|
10494
10515
|
this.getRows().length > __classPrivateFieldGet$8(this, _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER, "f"));
|
|
10495
|
-
const compCreated = (index.h(index.Host, { key: '
|
|
10516
|
+
const compCreated = (index.h(index.Host, { key: '002d8689464677ac797f2c221e6f6498b5b7876c', "onKup-drop": (e) => {
|
|
10496
10517
|
this.kupDataTableDrop.emit(e.detail);
|
|
10497
10518
|
}, "onKup-cell-input": (e) => {
|
|
10498
10519
|
autoselectOnAction(e);
|
|
@@ -10511,11 +10532,11 @@ const KupDataTable = class {
|
|
|
10511
10532
|
this.kupDataTableObjectFieldOpenSearchMenu.emit(e.detail);
|
|
10512
10533
|
}, "onKup-objectfield-selectedmenuitem": (e) => {
|
|
10513
10534
|
this.kupDataTableObjectFieldSelectedMenuItem.emit(e.detail);
|
|
10514
|
-
} }, index.h("style", { key: '
|
|
10535
|
+
} }, index.h("style", { key: '969e09953a0852ddfb4f8cc09ae5c5eeaa7b31c1' }, __classPrivateFieldGet$8(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), this.updatableData ? __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_renderUpdateButtons).call(this) : null, __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_renderOtherButtons).call(this), index.h("div", { key: '2ef668f26fc73d8da695997815f8aefe31d622b8', id: GenericVariables.componentWrapperId, class: wrapClass }, index.h("div", { key: 'f0b8d082c5b090e42a06805fde6a40ef7f320c1a', class: "group-wrapper" }, groupChips), index.h("div", { key: '1f6bf7d73994e3cfc0c923899e2eda527addb1bf', class: "actions-wrapper", style: actionWrapperWidth }, useGlobalFilter ? (index.h("div", { id: "global-filter" }, index.h(fTextField.FTextField, { fullWidth: true, icon: kupManager$2.KupThemeIconValues.SEARCH, label: __classPrivateFieldGet$8(this, _KupDataTable_kupManager, "f").language.translate(kupManager$2.KupLanguageSearch.SEARCH), sizing: kupManager$2.KupComponentSizing.EXTRA_SMALL, value: this.globalFilterValue, onInput: (event) => {
|
|
10515
10536
|
const t = event.target;
|
|
10516
10537
|
window.clearTimeout(__classPrivateFieldGet$8(this, _KupDataTable_globalFilterTimeout, "f"));
|
|
10517
10538
|
__classPrivateFieldSet$4(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
|
|
10518
|
-
} }))) : null, paginatorTop && (index.h("div", { key: '
|
|
10539
|
+
} }))) : null, paginatorTop && (index.h("div", { key: '0a20b56290794f7affeefd8160852c29187157e1', class: "above-wrapper paginator-top" }, paginatorTop)), this.insertMode !== '' &&
|
|
10519
10540
|
this.selectedRows.length > 0 ? (index.h(fButton.FButton, { icon: "save", onClick: () => {
|
|
10520
10541
|
this.kupSave.emit({
|
|
10521
10542
|
comp: this,
|
|
@@ -10565,9 +10586,9 @@ const KupDataTable = class {
|
|
|
10565
10586
|
this.data.rows.unshift(row);
|
|
10566
10587
|
await this.refresh(true);
|
|
10567
10588
|
}
|
|
10568
|
-
}, sizing: kupManager$2.KupComponentSizing.MEDIUM, styling: fButtonDeclarations.FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), index.h("div", { key: '
|
|
10589
|
+
}, sizing: kupManager$2.KupComponentSizing.MEDIUM, styling: fButtonDeclarations.FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), index.h("div", { key: 'cd25a52b1e91a96422b093fdc5bf04ee19550002', class: "droparea", ref: (el) => (__classPrivateFieldSet$4(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
|
|
10569
10590
|
? __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_columnRemoveArea).call(this)
|
|
10570
|
-
: null), index.h("div", { key: '
|
|
10591
|
+
: null), index.h("div", { key: '5fb2e944ff0d5380133194a808c3a501510384da', style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet$4(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
|
|
10571
10592
|
? [
|
|
10572
10593
|
index.h("div", { class: "settings-trigger", onClick: () => {
|
|
10573
10594
|
__classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_onCustomSettingsClick).call(this);
|
|
@@ -10576,7 +10597,7 @@ const KupDataTable = class {
|
|
|
10576
10597
|
} }, index.h(fImage.FImage, { color: `var(${kupManager$2.KupThemeColorValues.TITLE})`, resource: "settings", sizeX: "10px" })),
|
|
10577
10598
|
this.renderCustomizePanel(),
|
|
10578
10599
|
]
|
|
10579
|
-
: null, index.h("table", { key: '
|
|
10600
|
+
: null, index.h("table", { key: '666019cd7acb30ee4b5599969a09def220a6ad38', class: tableClass, ref: (el) => (__classPrivateFieldSet$4(this, _KupDataTable_tableRef, el, "f")), onKeyDown: (e) => __classPrivateFieldGet$8(this, _KupDataTable_onKupKeyDown, "f").call(this, e), onMouseLeave: (ev) => {
|
|
10580
10601
|
ev.stopPropagation();
|
|
10581
10602
|
}, onPointerDown: (e) => {
|
|
10582
10603
|
__classPrivateFieldSet$4(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$8(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
|
|
@@ -10584,7 +10605,7 @@ const KupDataTable = class {
|
|
|
10584
10605
|
__classPrivateFieldSet$4(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$8(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
|
|
10585
10606
|
}, onContextMenu: (e) => {
|
|
10586
10607
|
e.preventDefault();
|
|
10587
|
-
} }, index.h("thead", { key: '
|
|
10608
|
+
} }, index.h("thead", { key: '86df3ea65b8bb4bb5f825bb0f4b2603397cf2959', hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$4(this, _KupDataTable_theadRef, el, "f")) }, index.h("tr", { key: '50526a28db9536067341093310a8ee1d5aa0802e' }, header)), index.h("tbody", { key: '96ca0e2643e0c8a6c9634893c292a083dcc86890' }, rows), this.showFooter && this.renderFooter()), stickyEl), paginatorBottom)));
|
|
10588
10609
|
__classPrivateFieldGet$8(this, _KupDataTable_kupManager, "f").perfMonitoring.measure('componentRender', 'kup-data-table');
|
|
10589
10610
|
return compCreated;
|
|
10590
10611
|
}
|
|
@@ -10730,10 +10751,6 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
10730
10751
|
this.state.showHeader = this.showHeader;
|
|
10731
10752
|
somethingChanged = true;
|
|
10732
10753
|
}
|
|
10733
|
-
if (!__classPrivateFieldGet$8(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showLoadMore, this.showLoadMore)) {
|
|
10734
|
-
this.state.showLoadMore = this.showLoadMore;
|
|
10735
|
-
somethingChanged = true;
|
|
10736
|
-
}
|
|
10737
10754
|
if (!__classPrivateFieldGet$8(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showPaginator, this.showPaginator)) {
|
|
10738
10755
|
this.state.showPaginator = this.showPaginator;
|
|
10739
10756
|
somethingChanged = true;
|
|
@@ -13321,9 +13338,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
13321
13338
|
onClickHandler: () => {
|
|
13322
13339
|
const selectedRowsIds = this.selectedRows.map((row) => row.id);
|
|
13323
13340
|
const insertedRowsIds = __classPrivateFieldGet$8(this, _KupDataTable_insertedRowIds, "f");
|
|
13324
|
-
|
|
13325
|
-
|
|
13326
|
-
|
|
13341
|
+
// If every selected row is an inserted (unconfirmed) row,
|
|
13342
|
+
// delete them locally without calling the update.
|
|
13343
|
+
const allSelectedAreInserted = selectedRowsIds.every((id) => insertedRowsIds.includes(id));
|
|
13344
|
+
if (allSelectedAreInserted) {
|
|
13327
13345
|
this.deleteRows(selectedRowsIds);
|
|
13328
13346
|
}
|
|
13329
13347
|
else {
|
|
@@ -13357,12 +13375,6 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
13357
13375
|
return __classPrivateFieldGet$8(this, _KupDataTable_insertedRowIds, "f").includes(rowId);
|
|
13358
13376
|
}, _KupDataTable_isRowModified = function _KupDataTable_isRowModified(rowId) {
|
|
13359
13377
|
return __classPrivateFieldGet$8(this, _KupDataTable_modifiedRowsIds, "f").includes(rowId);
|
|
13360
|
-
}, _KupDataTable_arraysContainSameElements = function _KupDataTable_arraysContainSameElements(arr1, arr2) {
|
|
13361
|
-
if (arr1.length !== arr2.length)
|
|
13362
|
-
return false;
|
|
13363
|
-
const sorted1 = [...arr1].sort();
|
|
13364
|
-
const sorted2 = [...arr2].sort();
|
|
13365
|
-
return sorted1.every((val, index) => val === sorted2[index]);
|
|
13366
13378
|
};
|
|
13367
13379
|
KupDataTable.style = KupDataTableStyle0;
|
|
13368
13380
|
|
|
@@ -14,7 +14,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
14
14
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
15
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
16
|
};
|
|
17
|
-
var _KupDataTable_instances, _KupDataTable_checkUpdateState, _KupDataTable_initialized, _KupDataTable_cellToFocus, _KupDataTable_rows, _KupDataTable_rowsLength, _KupDataTable_paginatedRows, _KupDataTable_paginatedRowsLength, _KupDataTable_footer, _KupDataTable_kupManager, _KupDataTable_renderedRows, _KupDataTable_loadMoreEventCounter, _KupDataTable_loadMoreEventPreviousQuantity, _KupDataTable_theadRef, _KupDataTable_tableRef, _KupDataTable_originalData, _KupDataTable_originalDataLoaded, _KupDataTable_originalDataLoadedMaxId, _KupDataTable_insertedRowIds, _KupDataTable_modifiedRowsIds, _KupDataTable_tableAreaRef, _KupDataTable_stickyTheadRef, _KupDataTable_lastPointerDetails, _KupDataTable_customizeTopButtonRef, _KupDataTable_customizeTopPanelRef, _KupDataTable_sizedColumns, _KupDataTable_intObserver, _KupDataTable_navBarHeight, _KupDataTable_theadIntersecting, _KupDataTable_tableIntersecting, _KupDataTable_isSafariBrowser, _KupDataTable_isRestoringState, _KupDataTable_globalFilterTimeout, _KupDataTable_totalMenuCoords, _KupDataTable_clickTimeout, _KupDataTable_thRefs, _KupDataTable_rowsRefs, _KupDataTable_oldWidth, _KupDataTable_hold, _KupDataTable_interactableDrag, _KupDataTable_interactableDrop, _KupDataTable_interactableResize, _KupDataTable_interactableTouch, _KupDataTable_dropareaRef, _KupDataTable_removeDropareaRef, _KupDataTable_groupsDropareaRef, _KupDataTable_clickCb, _KupDataTable_clickCbCustomPanel, _KupDataTable_clickCbDropCard, _KupDataTable_resizeTimeout, _KupDataTable_columnMenuInstance, _KupDataTable_filtersColumnMenuInstance, _KupDataTable_filtersRowsInstance, _KupDataTable_detailCard, _KupDataTable_insertCard, _KupDataTable_actionsCard, _KupDataTable_confirmDeleteCard, _KupDataTable_confirmDeleteDialog, _KupDataTable_columnMenuCard, _KupDataTable_columnDropCard, _KupDataTable_columnDropCardAnchor, _KupDataTable_dropDownActionCardAnchor, _KupDataTable_insertCount, _KupDataTable_lastFocusedColumn, _KupDataTable_lastFocusedCell, _KupDataTable_lastFocusedRow, _KupDataTable_maxRowsPerPage, _KupDataTable_readyPromise, _KupDataTable_readyResolve, _KupDataTable_BUTTON_CANCEL_ID, _KupDataTable_BUTTON_SUBMIT_ID, _KupDataTable_FIELDS_FORM_ID, _KupDataTable_MESSAGE_ID, _KupDataTable_MESSAGE_WRAPPER_ID, _KupDataTable_INSERT_PREFIX, _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER, _KupDataTable_insertNewColumnInVisibleColumnsList, _KupDataTable_closeDropCard, _KupDataTable_createDropCard, _KupDataTable_calculateData, _KupDataTable_getRow, _KupDataTable__getRow, _KupDataTable_getTransposedData, _KupDataTable_setTransposedData, _KupDataTable_stickyHeaderPosition, _KupDataTable_updateStickyHeaderSize, _KupDataTable_setObserver, _KupDataTable_didLoadInteractables, _KupDataTable_didRenderInteractables, _KupDataTable_didLoadObservers, _KupDataTable_didRenderObservers, _KupDataTable_didLoadEventHandling, _KupDataTable_scrollStickyHeader, _KupDataTable_checkScrollOnHover, _KupDataTable_customizePanelPosition, _KupDataTable_rowsPointLength, _KupDataTable_paginatedRowsPointLength, _KupDataTable__rowsLength, _KupDataTable_resetSelectedRows, _KupDataTable_getSizedColumns, _KupDataTable_rowDetail, _KupDataTable_dropDownActions, _KupDataTable_createDropDownActionsCard, _KupDataTable_clearSearchActionsCard, _KupDataTable_filterRowActionsCard, _KupDataTable_closeRowActionsCard, _KupDataTable_closeColumnMenuCard, _KupDataTable_prepareDataForActionsCard, _KupDataTable_rowInsertForm, _KupDataTable_rowsDelete, _KupDataTable_getEventDetails, _KupDataTable_getEventDetailsForCurrentSelection, _KupDataTable_getSourceElementCoordsForCurrentSelection, _KupDataTable_clickHandler, _KupDataTable_cellActionsMenuHandler, _KupDataTable_contextMenuHandler, _KupDataTable_tooltipRequestHandler, _KupDataTable_contextMenuHandlerDetailsManager, _KupDataTable_dblClickHandler, _KupDataTable_initRows, _KupDataTable_filterRows, _KupDataTable_isGrouping, _KupDataTable_hasRowActions, _KupDataTable_removeGroup, _KupDataTable_hasTotals, _KupDataTable_tableHasAutoWidth, _KupDataTable_forceGroupExpansion, _KupDataTable_forceRowGroupExpansion, _KupDataTable_adjustPaginator, _KupDataTable_getCellEditability, _KupDataTable_composeFixedCellStyleAndClass, _KupDataTable_updateFixedRowsAndColumnsCssVariables, _KupDataTable_horNav, _KupDataTable_verNav, _KupDataTable_onKupKeyDown, _KupDataTable_onColumnSort, _KupDataTable_onRemoveFilter, _KupDataTable_getFilterValueForTooltip, _KupDataTable_onGlobalFilterChange, _KupDataTable_handlePageChange, _KupDataTable_handleRowsPerPageChange, _KupDataTable_onRowClick, _KupDataTable_selectColumn, _KupDataTable_deselectColumn, _KupDataTable_onRowActionExpanderClick, _KupDataTable_handleRowSelect, _KupDataTable_onRowExpand, _KupDataTable_onSelectAll, _KupDataTable_openTotalMenu, _KupDataTable_closeTotalMenu, _KupDataTable_isOpenedTotalMenuForColumn, _KupDataTable_groupRows, _KupDataTable_onLoadMoreClick, _KupDataTable_adjustGroupState, _KupDataTable_adjustGroupStateFromRow, _KupDataTable_sortRows, _KupDataTable_getSortIcon, _KupDataTable_getSortDecode, _KupDataTable_calculateColspan, _KupDataTable_isGroupExpanded, _KupDataTable_handleColumnSort, _KupDataTable_moveSortedColumns, _KupDataTable_handleUpdateClick, _KupDataTable_onBlurHandler, _KupDataTable_applyLineBreaks, _KupDataTable_composeHeaderCellClassAndStyle, _KupDataTable_renderHeader, _KupDataTable_renderStickyHeader, _KupDataTable_totalMenuPosition, _KupDataTable_onTotalMenuOpen, _KupDataTable_renderRow, _KupDataTable_onCustomSettingsClick, _KupDataTable_openCustomSettings, _KupDataTable_closeCustomSettings, _KupDataTable_renderPaginator, _KupDataTable_columnRemoveArea, _KupDataTable_columnGroupArea, _KupDataTable_hideShowColumnDropArea, _KupDataTable_handleColumnGroup, _KupDataTable_transcodeItem, _KupDataTable_createListData, _KupDataTable_FONTSIZE_CODES, _KupDataTable_FONTSIZE_DECODES, _KupDataTable_FONTSIZE_ICONS, _KupDataTable_getFontSizeCodeFromDecode, _KupDataTable_renderFontSizePanel, _KupDataTable_DENSITY_DECODES, _KupDataTable_DENSITY_ICONS, _KupDataTable_getDensityCodeFromDecode, _KupDataTable_renderDensityPanel, _KupDataTable_GRID_CODES, _KupDataTable_GRID_DECODES, _KupDataTable_GRID_ICONS, _KupDataTable_getGridCodeFromDecode, _KupDataTable_renderTransposeSwitch, _KupDataTable_renderGridPanel, _KupDataTable_renderCommandButton, _KupDataTable_handleChipsContextMenu, _KupDataTable_renderCommandDropDownButton, _KupDataTable_renderOtherButtons, _KupDataTable_addRowHandler, _KupDataTable_createRowWithInputFields, _KupDataTable_renderUpdateButtons, _KupDataTable_createDeletePayload, _KupDataTable_isRowInserted, _KupDataTable_isRowModified
|
|
17
|
+
var _KupDataTable_instances, _KupDataTable_checkUpdateState, _KupDataTable_initialized, _KupDataTable_cellToFocus, _KupDataTable_rows, _KupDataTable_rowsLength, _KupDataTable_paginatedRows, _KupDataTable_paginatedRowsLength, _KupDataTable_footer, _KupDataTable_kupManager, _KupDataTable_renderedRows, _KupDataTable_loadMoreEventCounter, _KupDataTable_loadMoreEventPreviousQuantity, _KupDataTable_theadRef, _KupDataTable_tableRef, _KupDataTable_originalData, _KupDataTable_originalDataLoaded, _KupDataTable_originalDataLoadedMaxId, _KupDataTable_insertedRowIds, _KupDataTable_modifiedRowsIds, _KupDataTable_tableAreaRef, _KupDataTable_stickyTheadRef, _KupDataTable_lastPointerDetails, _KupDataTable_customizeTopButtonRef, _KupDataTable_customizeTopPanelRef, _KupDataTable_sizedColumns, _KupDataTable_intObserver, _KupDataTable_navBarHeight, _KupDataTable_theadIntersecting, _KupDataTable_tableIntersecting, _KupDataTable_isSafariBrowser, _KupDataTable_isRestoringState, _KupDataTable_globalFilterTimeout, _KupDataTable_totalMenuCoords, _KupDataTable_clickTimeout, _KupDataTable_thRefs, _KupDataTable_rowsRefs, _KupDataTable_oldWidth, _KupDataTable_hold, _KupDataTable_interactableDrag, _KupDataTable_interactableDrop, _KupDataTable_interactableResize, _KupDataTable_interactableTouch, _KupDataTable_dropareaRef, _KupDataTable_removeDropareaRef, _KupDataTable_groupsDropareaRef, _KupDataTable_clickCb, _KupDataTable_clickCbCustomPanel, _KupDataTable_clickCbDropCard, _KupDataTable_resizeTimeout, _KupDataTable_columnMenuInstance, _KupDataTable_filtersColumnMenuInstance, _KupDataTable_filtersRowsInstance, _KupDataTable_detailCard, _KupDataTable_insertCard, _KupDataTable_actionsCard, _KupDataTable_confirmDeleteCard, _KupDataTable_confirmDeleteDialog, _KupDataTable_columnMenuCard, _KupDataTable_columnDropCard, _KupDataTable_columnDropCardAnchor, _KupDataTable_dropDownActionCardAnchor, _KupDataTable_insertCount, _KupDataTable_lastFocusedColumn, _KupDataTable_lastFocusedCell, _KupDataTable_lastFocusedRow, _KupDataTable_maxRowsPerPage, _KupDataTable_readyPromise, _KupDataTable_readyResolve, _KupDataTable_BUTTON_CANCEL_ID, _KupDataTable_BUTTON_SUBMIT_ID, _KupDataTable_FIELDS_FORM_ID, _KupDataTable_MESSAGE_ID, _KupDataTable_MESSAGE_WRAPPER_ID, _KupDataTable_INSERT_PREFIX, _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER, _KupDataTable_insertNewColumnInVisibleColumnsList, _KupDataTable_closeDropCard, _KupDataTable_createDropCard, _KupDataTable_calculateData, _KupDataTable_getRow, _KupDataTable__getRow, _KupDataTable_getTransposedData, _KupDataTable_setTransposedData, _KupDataTable_stickyHeaderPosition, _KupDataTable_updateStickyHeaderSize, _KupDataTable_setObserver, _KupDataTable_didLoadInteractables, _KupDataTable_didRenderInteractables, _KupDataTable_didLoadObservers, _KupDataTable_didRenderObservers, _KupDataTable_didLoadEventHandling, _KupDataTable_scrollStickyHeader, _KupDataTable_checkScrollOnHover, _KupDataTable_customizePanelPosition, _KupDataTable_rowsPointLength, _KupDataTable_paginatedRowsPointLength, _KupDataTable__rowsLength, _KupDataTable_resetSelectedRows, _KupDataTable_getSizedColumns, _KupDataTable_rowDetail, _KupDataTable_dropDownActions, _KupDataTable_createDropDownActionsCard, _KupDataTable_clearSearchActionsCard, _KupDataTable_filterRowActionsCard, _KupDataTable_closeRowActionsCard, _KupDataTable_closeColumnMenuCard, _KupDataTable_prepareDataForActionsCard, _KupDataTable_rowInsertForm, _KupDataTable_rowsDelete, _KupDataTable_getEventDetails, _KupDataTable_getEventDetailsForCurrentSelection, _KupDataTable_getSourceElementCoordsForCurrentSelection, _KupDataTable_clickHandler, _KupDataTable_cellActionsMenuHandler, _KupDataTable_contextMenuHandler, _KupDataTable_tooltipRequestHandler, _KupDataTable_contextMenuHandlerDetailsManager, _KupDataTable_dblClickHandler, _KupDataTable_initRows, _KupDataTable_filterRows, _KupDataTable_isGrouping, _KupDataTable_hasRowActions, _KupDataTable_removeGroup, _KupDataTable_hasTotals, _KupDataTable_tableHasAutoWidth, _KupDataTable_forceGroupExpansion, _KupDataTable_forceRowGroupExpansion, _KupDataTable_adjustPaginator, _KupDataTable_getCellEditability, _KupDataTable_composeFixedCellStyleAndClass, _KupDataTable_updateFixedRowsAndColumnsCssVariables, _KupDataTable_horNav, _KupDataTable_verNav, _KupDataTable_onKupKeyDown, _KupDataTable_onColumnSort, _KupDataTable_onRemoveFilter, _KupDataTable_getFilterValueForTooltip, _KupDataTable_onGlobalFilterChange, _KupDataTable_handlePageChange, _KupDataTable_handleRowsPerPageChange, _KupDataTable_onRowClick, _KupDataTable_selectColumn, _KupDataTable_deselectColumn, _KupDataTable_onRowActionExpanderClick, _KupDataTable_handleRowSelect, _KupDataTable_onRowExpand, _KupDataTable_onSelectAll, _KupDataTable_openTotalMenu, _KupDataTable_closeTotalMenu, _KupDataTable_isOpenedTotalMenuForColumn, _KupDataTable_groupRows, _KupDataTable_onLoadMoreClick, _KupDataTable_adjustGroupState, _KupDataTable_adjustGroupStateFromRow, _KupDataTable_sortRows, _KupDataTable_getSortIcon, _KupDataTable_getSortDecode, _KupDataTable_calculateColspan, _KupDataTable_isGroupExpanded, _KupDataTable_handleColumnSort, _KupDataTable_moveSortedColumns, _KupDataTable_handleUpdateClick, _KupDataTable_onBlurHandler, _KupDataTable_applyLineBreaks, _KupDataTable_composeHeaderCellClassAndStyle, _KupDataTable_renderHeader, _KupDataTable_renderStickyHeader, _KupDataTable_totalMenuPosition, _KupDataTable_onTotalMenuOpen, _KupDataTable_renderRow, _KupDataTable_onCustomSettingsClick, _KupDataTable_openCustomSettings, _KupDataTable_closeCustomSettings, _KupDataTable_renderPaginator, _KupDataTable_columnRemoveArea, _KupDataTable_columnGroupArea, _KupDataTable_hideShowColumnDropArea, _KupDataTable_handleColumnGroup, _KupDataTable_transcodeItem, _KupDataTable_createListData, _KupDataTable_FONTSIZE_CODES, _KupDataTable_FONTSIZE_DECODES, _KupDataTable_FONTSIZE_ICONS, _KupDataTable_getFontSizeCodeFromDecode, _KupDataTable_renderFontSizePanel, _KupDataTable_DENSITY_DECODES, _KupDataTable_DENSITY_ICONS, _KupDataTable_getDensityCodeFromDecode, _KupDataTable_renderDensityPanel, _KupDataTable_GRID_CODES, _KupDataTable_GRID_DECODES, _KupDataTable_GRID_ICONS, _KupDataTable_getGridCodeFromDecode, _KupDataTable_renderTransposeSwitch, _KupDataTable_renderGridPanel, _KupDataTable_renderCommandButton, _KupDataTable_handleChipsContextMenu, _KupDataTable_renderCommandDropDownButton, _KupDataTable_renderOtherButtons, _KupDataTable_addRowHandler, _KupDataTable_createRowWithInputFields, _KupDataTable_renderUpdateButtons, _KupDataTable_createDeletePayload, _KupDataTable_isRowInserted, _KupDataTable_isRowModified;
|
|
18
18
|
import { forceUpdate, h, Host, } from "@stencil/core";
|
|
19
19
|
import { FixedCellsClasses, FixedCellsCSSVarsBase, GroupLabelDisplayMode, LoadMoreMode, PaginatorPos, ShowGrid, SortMode, TotalMode, TotalLabel, KupDataTableProps, fieldColumn, iconColumn, keyColumn, SelectionMode, DataTableAreasEnum, TypesToDuplicate, } from "./kup-data-table-declarations";
|
|
20
20
|
import { getColumnByName, getValueForDisplay, isNegativeNumber, } from "../../utils/cell-utils";
|
|
@@ -288,28 +288,40 @@ export class KupDataTable {
|
|
|
288
288
|
'grid_off',
|
|
289
289
|
]);
|
|
290
290
|
_KupDataTable_addRowHandler.set(this, async (row) => {
|
|
291
|
-
var _a, _b;
|
|
292
|
-
var _c;
|
|
293
291
|
let newRow;
|
|
292
|
+
// Retrieves the currently selected rows, if any. They will be used as a
|
|
293
|
+
// template for the new row when available.
|
|
294
294
|
const selectedRows = await this.getSelectedRows();
|
|
295
295
|
if (selectedRows.length > 0) {
|
|
296
|
-
newRow =
|
|
297
|
-
}
|
|
298
|
-
else if (((_b = (_a = __classPrivateFieldGet(this, _KupDataTable_originalDataLoaded, "f")) === null || _a === void 0 ? void 0 : _a.rows) === null || _b === void 0 ? void 0 : _b.length) > 0 && !row) {
|
|
299
|
-
newRow = JSON.parse(JSON.stringify(__classPrivateFieldGet(this, _KupDataTable_originalDataLoaded, "f").rows[0]));
|
|
296
|
+
newRow = __classPrivateFieldGet(this, _KupDataTable_createRowWithInputFields, "f").call(this, selectedRows[0]);
|
|
300
297
|
}
|
|
301
298
|
else if (row) {
|
|
299
|
+
// An explicit row was provided: build the new row from it, applying
|
|
300
|
+
// the column input-field configuration.
|
|
302
301
|
newRow = __classPrivateFieldGet(this, _KupDataTable_createRowWithInputFields, "f").call(this, row);
|
|
303
302
|
}
|
|
304
303
|
else {
|
|
304
|
+
// Nothing to copy from: build a blank row with input fields based on
|
|
305
|
+
// the current column definitions.
|
|
305
306
|
newRow = __classPrivateFieldGet(this, _KupDataTable_createRowWithInputFields, "f").call(this);
|
|
306
307
|
}
|
|
308
|
+
// When no template was used (no selection and no explicit row), reset the
|
|
309
|
+
// value of every cell so the new record is empty and ready for input.
|
|
307
310
|
Object.values(newRow.cells).forEach((cell) => {
|
|
308
|
-
|
|
311
|
+
var _a;
|
|
312
|
+
if (selectedRows.length === 0 && !row) {
|
|
309
313
|
cell.value = '';
|
|
314
|
+
if ((_a = cell === null || cell === void 0 ? void 0 : cell.data) === null || _a === void 0 ? void 0 : _a.initialValue) {
|
|
315
|
+
cell.data.initialValue = '';
|
|
316
|
+
}
|
|
310
317
|
}
|
|
311
318
|
});
|
|
312
|
-
|
|
319
|
+
// Assigns an id to the new row. The id is always the highest id
|
|
320
|
+
// currently present in the data plus one, so inserted rows are always
|
|
321
|
+
// ordered (0, 1, 2, 3, ...) regardless of insertions or deletions.
|
|
322
|
+
const currentMaxId = this.data.rows.reduce((max, r) => Math.max(max, parseInt(r.id) || 0), __classPrivateFieldGet(this, _KupDataTable_originalDataLoadedMaxId, "f"));
|
|
323
|
+
newRow.id = (currentMaxId + 1).toString();
|
|
324
|
+
// Tracks the new row as inserted and prepends it to the table data.
|
|
313
325
|
__classPrivateFieldGet(this, _KupDataTable_insertedRowIds, "f").push(newRow.id);
|
|
314
326
|
this.insertNewRow(newRow, true);
|
|
315
327
|
});
|
|
@@ -318,18 +330,22 @@ export class KupDataTable {
|
|
|
318
330
|
const row = { cells: {} };
|
|
319
331
|
(_a = this.data) === null || _a === void 0 ? void 0 : _a.columns.forEach((c) => {
|
|
320
332
|
var _a, _b, _c;
|
|
333
|
+
const columnData = Object.assign(Object.assign({}, c === null || c === void 0 ? void 0 : c['data']), (c['length'] && c['maxLength']
|
|
334
|
+
? {
|
|
335
|
+
size: c['length'],
|
|
336
|
+
maxLength: c['maxLength'],
|
|
337
|
+
}
|
|
338
|
+
: {}));
|
|
321
339
|
const cell = ((_a = rowToCopy === null || rowToCopy === void 0 ? void 0 : rowToCopy.cells) === null || _a === void 0 ? void 0 : _a[c.name])
|
|
322
|
-
?
|
|
340
|
+
? (() => {
|
|
341
|
+
const clonedCell = JSON.parse(JSON.stringify(rowToCopy.cells[c.name]));
|
|
342
|
+
return Object.assign(Object.assign({}, clonedCell), { data: Object.assign(Object.assign({}, columnData), clonedCell === null || clonedCell === void 0 ? void 0 : clonedCell.data) });
|
|
343
|
+
})()
|
|
323
344
|
: {
|
|
324
345
|
shape: (_b = c.shape) !== null && _b !== void 0 ? _b : FCellShapes.TEXT_FIELD,
|
|
325
346
|
obj: Object.assign({}, c.obj),
|
|
326
347
|
isEditable: (_c = c.isEditable) !== null && _c !== void 0 ? _c : true,
|
|
327
|
-
data:
|
|
328
|
-
? {
|
|
329
|
-
size: c['length'],
|
|
330
|
-
maxLength: c['maxLength'],
|
|
331
|
-
}
|
|
332
|
-
: {},
|
|
348
|
+
data: columnData,
|
|
333
349
|
};
|
|
334
350
|
row.cells[c.name] = cell;
|
|
335
351
|
});
|
|
@@ -437,7 +453,6 @@ export class KupDataTable {
|
|
|
437
453
|
this.showFilters = state.showFilters;
|
|
438
454
|
this.showGroups = state.showGroups;
|
|
439
455
|
this.showHeader = state.showHeader;
|
|
440
|
-
this.showLoadMore = state.showLoadMore;
|
|
441
456
|
this.showPaginator = state.showPaginator;
|
|
442
457
|
this.hiddenSubmitButton = state.hiddenSubmitButton;
|
|
443
458
|
this.sortEnabled = state.sortEnabled;
|
|
@@ -550,7 +565,9 @@ export class KupDataTable {
|
|
|
550
565
|
if (originalDataRowIndex > -1) {
|
|
551
566
|
this.data.rows[originalDataRowIndex].cells =
|
|
552
567
|
structuredClone(row.cells);
|
|
553
|
-
|
|
568
|
+
// Track the row by its id (consistent with the other
|
|
569
|
+
// places where #modifiedRowsIds is populated).
|
|
570
|
+
__classPrivateFieldGet(this, _KupDataTable_modifiedRowsIds, "f").push(row.id);
|
|
554
571
|
}
|
|
555
572
|
else {
|
|
556
573
|
__classPrivateFieldGet(this, _KupDataTable_addRowHandler, "f").call(this, row);
|
|
@@ -665,6 +682,10 @@ export class KupDataTable {
|
|
|
665
682
|
}
|
|
666
683
|
if (deletedRows.length > 0) {
|
|
667
684
|
this.data.rows = newRows;
|
|
685
|
+
// Clean up the tracking arrays so deleted rows are no longer
|
|
686
|
+
// considered inserted or modified.
|
|
687
|
+
__classPrivateFieldSet(this, _KupDataTable_insertedRowIds, __classPrivateFieldGet(this, _KupDataTable_insertedRowIds, "f").filter((id) => !ids.includes(id)), "f");
|
|
688
|
+
__classPrivateFieldSet(this, _KupDataTable_modifiedRowsIds, __classPrivateFieldGet(this, _KupDataTable_modifiedRowsIds, "f").filter((id) => !ids.includes(id)), "f");
|
|
668
689
|
await this.refresh(true);
|
|
669
690
|
}
|
|
670
691
|
return deletedRows;
|
|
@@ -1613,7 +1634,7 @@ export class KupDataTable {
|
|
|
1613
1634
|
__classPrivateFieldSet(this, _KupDataTable_sizedColumns, __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_getSizedColumns).call(this), "f");
|
|
1614
1635
|
let rows = null;
|
|
1615
1636
|
if (__classPrivateFieldGet(this, _KupDataTable_paginatedRowsLength, "f") === 0) {
|
|
1616
|
-
rows = (h("tr", { key: '
|
|
1637
|
+
rows = (h("tr", { key: '5d5bc9d717045ebacf203981e4cb82dc5e6743b3', ref: (el) => __classPrivateFieldGet(this, _KupDataTable_rowsRefs, "f").push(el) }, h("td", { key: 'edc985270001e7d4792aed4cadaf3b6ae8a9b16b', colSpan: __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
|
|
1617
1638
|
}
|
|
1618
1639
|
else {
|
|
1619
1640
|
rows = [];
|
|
@@ -1689,7 +1710,7 @@ export class KupDataTable {
|
|
|
1689
1710
|
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_handleChipsContextMenu).call(this, chipArg.id, e);
|
|
1690
1711
|
});
|
|
1691
1712
|
}
|
|
1692
|
-
groupChips = h(FChip, Object.assign({ key: '
|
|
1713
|
+
groupChips = h(FChip, Object.assign({ key: 'ebf94e6578476caaf11d9b33d020c07444cebcb4' }, props));
|
|
1693
1714
|
}
|
|
1694
1715
|
}
|
|
1695
1716
|
const tableClass = {
|
|
@@ -1721,7 +1742,7 @@ export class KupDataTable {
|
|
|
1721
1742
|
if (this.headerIsPersistent &&
|
|
1722
1743
|
this.tableHeight === undefined &&
|
|
1723
1744
|
this.tableWidth === undefined) {
|
|
1724
|
-
stickyEl = (h("sticky-header", { key: '
|
|
1745
|
+
stickyEl = (h("sticky-header", { key: 'adbf7ea77dd2538152d896c57f48aee731ec4bd0', class: "hover-scrolling-child", hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_stickyTheadRef, el, "f")) }, h("thead-sticky", { key: '65884ef4206bcf998229298e1c947b45985455a6' }, h("tr-sticky", { key: '2c77fb6204cc5eec25b7d445491f32525246b334' }, stickyHeader))));
|
|
1725
1746
|
}
|
|
1726
1747
|
let belowClass = 'below-wrapper';
|
|
1727
1748
|
if (!!this.tableHeight || !!this.tableWidth) {
|
|
@@ -1767,7 +1788,7 @@ export class KupDataTable {
|
|
|
1767
1788
|
const useGlobalFilter = !this.legacyLook &&
|
|
1768
1789
|
(this.globalFilter ||
|
|
1769
1790
|
this.getRows().length > __classPrivateFieldGet(this, _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER, "f"));
|
|
1770
|
-
const compCreated = (h(Host, { key: '
|
|
1791
|
+
const compCreated = (h(Host, { key: '002d8689464677ac797f2c221e6f6498b5b7876c', "onKup-drop": (e) => {
|
|
1771
1792
|
this.kupDataTableDrop.emit(e.detail);
|
|
1772
1793
|
}, "onKup-cell-input": (e) => {
|
|
1773
1794
|
autoselectOnAction(e);
|
|
@@ -1786,11 +1807,11 @@ export class KupDataTable {
|
|
|
1786
1807
|
this.kupDataTableObjectFieldOpenSearchMenu.emit(e.detail);
|
|
1787
1808
|
}, "onKup-objectfield-selectedmenuitem": (e) => {
|
|
1788
1809
|
this.kupDataTableObjectFieldSelectedMenuItem.emit(e.detail);
|
|
1789
|
-
} }, h("style", { key: '
|
|
1810
|
+
} }, h("style", { key: '969e09953a0852ddfb4f8cc09ae5c5eeaa7b31c1' }, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), this.updatableData ? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_renderUpdateButtons).call(this) : null, __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_renderOtherButtons).call(this), h("div", { key: '2ef668f26fc73d8da695997815f8aefe31d622b8', id: componentWrapperId, class: wrapClass }, h("div", { key: 'f0b8d082c5b090e42a06805fde6a40ef7f320c1a', class: "group-wrapper" }, groupChips), h("div", { key: '1f6bf7d73994e3cfc0c923899e2eda527addb1bf', class: "actions-wrapper", style: actionWrapperWidth }, useGlobalFilter ? (h("div", { id: "global-filter" }, h(FTextField, { fullWidth: true, icon: KupThemeIconValues.SEARCH, label: __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), sizing: KupComponentSizing.EXTRA_SMALL, value: this.globalFilterValue, onInput: (event) => {
|
|
1790
1811
|
const t = event.target;
|
|
1791
1812
|
window.clearTimeout(__classPrivateFieldGet(this, _KupDataTable_globalFilterTimeout, "f"));
|
|
1792
1813
|
__classPrivateFieldSet(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
|
|
1793
|
-
} }))) : null, paginatorTop && (h("div", { key: '
|
|
1814
|
+
} }))) : null, paginatorTop && (h("div", { key: '0a20b56290794f7affeefd8160852c29187157e1', class: "above-wrapper paginator-top" }, paginatorTop)), this.insertMode !== '' &&
|
|
1794
1815
|
this.selectedRows.length > 0 ? (h(FButton, { icon: "save", onClick: () => {
|
|
1795
1816
|
this.kupSave.emit({
|
|
1796
1817
|
comp: this,
|
|
@@ -1840,9 +1861,9 @@ export class KupDataTable {
|
|
|
1840
1861
|
this.data.rows.unshift(row);
|
|
1841
1862
|
await this.refresh(true);
|
|
1842
1863
|
}
|
|
1843
|
-
}, sizing: KupComponentSizing.MEDIUM, styling: FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), h("div", { key: '
|
|
1864
|
+
}, sizing: KupComponentSizing.MEDIUM, styling: FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), h("div", { key: 'cd25a52b1e91a96422b093fdc5bf04ee19550002', class: "droparea", ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
|
|
1844
1865
|
? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_columnRemoveArea).call(this)
|
|
1845
|
-
: null), h("div", { key: '
|
|
1866
|
+
: null), h("div", { key: '5fb2e944ff0d5380133194a808c3a501510384da', style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
|
|
1846
1867
|
? [
|
|
1847
1868
|
h("div", { class: "settings-trigger", onClick: () => {
|
|
1848
1869
|
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onCustomSettingsClick).call(this);
|
|
@@ -1851,7 +1872,7 @@ export class KupDataTable {
|
|
|
1851
1872
|
} }, h(FImage, { color: `var(${KupThemeColorValues.TITLE})`, resource: "settings", sizeX: "10px" })),
|
|
1852
1873
|
this.renderCustomizePanel(),
|
|
1853
1874
|
]
|
|
1854
|
-
: null, h("table", { key: '
|
|
1875
|
+
: null, h("table", { key: '666019cd7acb30ee4b5599969a09def220a6ad38', class: tableClass, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_tableRef, el, "f")), onKeyDown: (e) => __classPrivateFieldGet(this, _KupDataTable_onKupKeyDown, "f").call(this, e), onMouseLeave: (ev) => {
|
|
1855
1876
|
ev.stopPropagation();
|
|
1856
1877
|
}, onPointerDown: (e) => {
|
|
1857
1878
|
__classPrivateFieldSet(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
|
|
@@ -1859,7 +1880,7 @@ export class KupDataTable {
|
|
|
1859
1880
|
__classPrivateFieldSet(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
|
|
1860
1881
|
}, onContextMenu: (e) => {
|
|
1861
1882
|
e.preventDefault();
|
|
1862
|
-
} }, h("thead", { key: '
|
|
1883
|
+
} }, h("thead", { key: '86df3ea65b8bb4bb5f825bb0f4b2603397cf2959', hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_theadRef, el, "f")) }, h("tr", { key: '50526a28db9536067341093310a8ee1d5aa0802e' }, header)), h("tbody", { key: '96ca0e2643e0c8a6c9634893c292a083dcc86890' }, rows), this.showFooter && this.renderFooter()), stickyEl), paginatorBottom)));
|
|
1863
1884
|
__classPrivateFieldGet(this, _KupDataTable_kupManager, "f").perfMonitoring.measure('componentRender', 'kup-data-table');
|
|
1864
1885
|
return compCreated;
|
|
1865
1886
|
}
|
|
@@ -4819,10 +4840,6 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
4819
4840
|
this.state.showHeader = this.showHeader;
|
|
4820
4841
|
somethingChanged = true;
|
|
4821
4842
|
}
|
|
4822
|
-
if (!__classPrivateFieldGet(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showLoadMore, this.showLoadMore)) {
|
|
4823
|
-
this.state.showLoadMore = this.showLoadMore;
|
|
4824
|
-
somethingChanged = true;
|
|
4825
|
-
}
|
|
4826
4843
|
if (!__classPrivateFieldGet(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showPaginator, this.showPaginator)) {
|
|
4827
4844
|
this.state.showPaginator = this.showPaginator;
|
|
4828
4845
|
somethingChanged = true;
|
|
@@ -7421,9 +7438,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
7421
7438
|
onClickHandler: () => {
|
|
7422
7439
|
const selectedRowsIds = this.selectedRows.map((row) => row.id);
|
|
7423
7440
|
const insertedRowsIds = __classPrivateFieldGet(this, _KupDataTable_insertedRowIds, "f");
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7441
|
+
// If every selected row is an inserted (unconfirmed) row,
|
|
7442
|
+
// delete them locally without calling the update.
|
|
7443
|
+
const allSelectedAreInserted = selectedRowsIds.every((id) => insertedRowsIds.includes(id));
|
|
7444
|
+
if (allSelectedAreInserted) {
|
|
7427
7445
|
this.deleteRows(selectedRowsIds);
|
|
7428
7446
|
}
|
|
7429
7447
|
else {
|
|
@@ -7457,10 +7475,4 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
7457
7475
|
return __classPrivateFieldGet(this, _KupDataTable_insertedRowIds, "f").includes(rowId);
|
|
7458
7476
|
}, _KupDataTable_isRowModified = function _KupDataTable_isRowModified(rowId) {
|
|
7459
7477
|
return __classPrivateFieldGet(this, _KupDataTable_modifiedRowsIds, "f").includes(rowId);
|
|
7460
|
-
}, _KupDataTable_arraysContainSameElements = function _KupDataTable_arraysContainSameElements(arr1, arr2) {
|
|
7461
|
-
if (arr1.length !== arr2.length)
|
|
7462
|
-
return false;
|
|
7463
|
-
const sorted1 = [...arr1].sort();
|
|
7464
|
-
const sorted2 = [...arr2].sort();
|
|
7465
|
-
return sorted1.every((val, index) => val === sorted2[index]);
|
|
7466
7478
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, d as Host } from './p-ef8cbd35.js';
|
|
2
2
|
import { k as kupManagerInstance, a as KupComponentSizing, g as getProps, s as setProps, b as KupThemeIconValues, c as KupThemeColorValues, d as KupDynamicPositionPlacement } from './p-2b503f65.js';
|
|
3
|
-
import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v } from './p-
|
|
3
|
+
import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v } from './p-ad48e240.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Props of the kup-accordion component.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, F as Fragment, d as Host } from './p-ef8cbd35.js';
|
|
2
2
|
import { k as kupManagerInstance, g as getProps, s as setProps, u as KupDebugCategory, n as getCellValueForDisplay } from './p-2b503f65.js';
|
|
3
|
-
import { c as componentWrapperId, G as sortRows, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v, F as FImage } from './p-
|
|
3
|
+
import { c as componentWrapperId, G as sortRows, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v, F as FImage } from './p-ad48e240.js';
|
|
4
4
|
|
|
5
5
|
var KupActivityTimelineProps;
|
|
6
6
|
(function (KupActivityTimelineProps) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KupAutocomplete$1, E as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KupAutocomplete$1, E as defineCustomElement$1 } from './p-ad48e240.js';
|
|
2
2
|
|
|
3
3
|
const KupAutocomplete = KupAutocomplete$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|