@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
|
@@ -24571,7 +24571,7 @@ var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
24571
24571
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
24572
24572
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
24573
24573
|
};
|
|
24574
|
-
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
|
|
24574
|
+
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;
|
|
24575
24575
|
const dom = document.documentElement;
|
|
24576
24576
|
const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends H {
|
|
24577
24577
|
constructor() {
|
|
@@ -24843,28 +24843,40 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
24843
24843
|
'grid_off',
|
|
24844
24844
|
]);
|
|
24845
24845
|
_KupDataTable_addRowHandler.set(this, async (row) => {
|
|
24846
|
-
var _a, _b;
|
|
24847
|
-
var _c;
|
|
24848
24846
|
let newRow;
|
|
24847
|
+
// Retrieves the currently selected rows, if any. They will be used as a
|
|
24848
|
+
// template for the new row when available.
|
|
24849
24849
|
const selectedRows = await this.getSelectedRows();
|
|
24850
24850
|
if (selectedRows.length > 0) {
|
|
24851
|
-
newRow =
|
|
24852
|
-
}
|
|
24853
|
-
else if (((_b = (_a = __classPrivateFieldGet$3(this, _KupDataTable_originalDataLoaded, "f")) === null || _a === void 0 ? void 0 : _a.rows) === null || _b === void 0 ? void 0 : _b.length) > 0 && !row) {
|
|
24854
|
-
newRow = JSON.parse(JSON.stringify(__classPrivateFieldGet$3(this, _KupDataTable_originalDataLoaded, "f").rows[0]));
|
|
24851
|
+
newRow = __classPrivateFieldGet$3(this, _KupDataTable_createRowWithInputFields, "f").call(this, selectedRows[0]);
|
|
24855
24852
|
}
|
|
24856
24853
|
else if (row) {
|
|
24854
|
+
// An explicit row was provided: build the new row from it, applying
|
|
24855
|
+
// the column input-field configuration.
|
|
24857
24856
|
newRow = __classPrivateFieldGet$3(this, _KupDataTable_createRowWithInputFields, "f").call(this, row);
|
|
24858
24857
|
}
|
|
24859
24858
|
else {
|
|
24859
|
+
// Nothing to copy from: build a blank row with input fields based on
|
|
24860
|
+
// the current column definitions.
|
|
24860
24861
|
newRow = __classPrivateFieldGet$3(this, _KupDataTable_createRowWithInputFields, "f").call(this);
|
|
24861
24862
|
}
|
|
24863
|
+
// When no template was used (no selection and no explicit row), reset the
|
|
24864
|
+
// value of every cell so the new record is empty and ready for input.
|
|
24862
24865
|
Object.values(newRow.cells).forEach((cell) => {
|
|
24863
|
-
|
|
24866
|
+
var _a;
|
|
24867
|
+
if (selectedRows.length === 0 && !row) {
|
|
24864
24868
|
cell.value = '';
|
|
24869
|
+
if ((_a = cell === null || cell === void 0 ? void 0 : cell.data) === null || _a === void 0 ? void 0 : _a.initialValue) {
|
|
24870
|
+
cell.data.initialValue = '';
|
|
24871
|
+
}
|
|
24865
24872
|
}
|
|
24866
24873
|
});
|
|
24867
|
-
|
|
24874
|
+
// Assigns an id to the new row. The id is always the highest id
|
|
24875
|
+
// currently present in the data plus one, so inserted rows are always
|
|
24876
|
+
// ordered (0, 1, 2, 3, ...) regardless of insertions or deletions.
|
|
24877
|
+
const currentMaxId = this.data.rows.reduce((max, r) => Math.max(max, parseInt(r.id) || 0), __classPrivateFieldGet$3(this, _KupDataTable_originalDataLoadedMaxId, "f"));
|
|
24878
|
+
newRow.id = (currentMaxId + 1).toString();
|
|
24879
|
+
// Tracks the new row as inserted and prepends it to the table data.
|
|
24868
24880
|
__classPrivateFieldGet$3(this, _KupDataTable_insertedRowIds, "f").push(newRow.id);
|
|
24869
24881
|
this.insertNewRow(newRow, true);
|
|
24870
24882
|
});
|
|
@@ -24873,18 +24885,22 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
24873
24885
|
const row = { cells: {} };
|
|
24874
24886
|
(_a = this.data) === null || _a === void 0 ? void 0 : _a.columns.forEach((c) => {
|
|
24875
24887
|
var _a, _b, _c;
|
|
24888
|
+
const columnData = Object.assign(Object.assign({}, c === null || c === void 0 ? void 0 : c['data']), (c['length'] && c['maxLength']
|
|
24889
|
+
? {
|
|
24890
|
+
size: c['length'],
|
|
24891
|
+
maxLength: c['maxLength'],
|
|
24892
|
+
}
|
|
24893
|
+
: {}));
|
|
24876
24894
|
const cell = ((_a = rowToCopy === null || rowToCopy === void 0 ? void 0 : rowToCopy.cells) === null || _a === void 0 ? void 0 : _a[c.name])
|
|
24877
|
-
?
|
|
24895
|
+
? (() => {
|
|
24896
|
+
const clonedCell = JSON.parse(JSON.stringify(rowToCopy.cells[c.name]));
|
|
24897
|
+
return Object.assign(Object.assign({}, clonedCell), { data: Object.assign(Object.assign({}, columnData), clonedCell === null || clonedCell === void 0 ? void 0 : clonedCell.data) });
|
|
24898
|
+
})()
|
|
24878
24899
|
: {
|
|
24879
24900
|
shape: (_b = c.shape) !== null && _b !== void 0 ? _b : FCellShapes.TEXT_FIELD,
|
|
24880
24901
|
obj: Object.assign({}, c.obj),
|
|
24881
24902
|
isEditable: (_c = c.isEditable) !== null && _c !== void 0 ? _c : true,
|
|
24882
|
-
data:
|
|
24883
|
-
? {
|
|
24884
|
-
size: c['length'],
|
|
24885
|
-
maxLength: c['maxLength'],
|
|
24886
|
-
}
|
|
24887
|
-
: {},
|
|
24903
|
+
data: columnData,
|
|
24888
24904
|
};
|
|
24889
24905
|
row.cells[c.name] = cell;
|
|
24890
24906
|
});
|
|
@@ -24992,7 +25008,6 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
24992
25008
|
this.showFilters = state.showFilters;
|
|
24993
25009
|
this.showGroups = state.showGroups;
|
|
24994
25010
|
this.showHeader = state.showHeader;
|
|
24995
|
-
this.showLoadMore = state.showLoadMore;
|
|
24996
25011
|
this.showPaginator = state.showPaginator;
|
|
24997
25012
|
this.hiddenSubmitButton = state.hiddenSubmitButton;
|
|
24998
25013
|
this.sortEnabled = state.sortEnabled;
|
|
@@ -25105,7 +25120,9 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
25105
25120
|
if (originalDataRowIndex > -1) {
|
|
25106
25121
|
this.data.rows[originalDataRowIndex].cells =
|
|
25107
25122
|
structuredClone(row.cells);
|
|
25108
|
-
|
|
25123
|
+
// Track the row by its id (consistent with the other
|
|
25124
|
+
// places where #modifiedRowsIds is populated).
|
|
25125
|
+
__classPrivateFieldGet$3(this, _KupDataTable_modifiedRowsIds, "f").push(row.id);
|
|
25109
25126
|
}
|
|
25110
25127
|
else {
|
|
25111
25128
|
__classPrivateFieldGet$3(this, _KupDataTable_addRowHandler, "f").call(this, row);
|
|
@@ -25220,6 +25237,10 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
25220
25237
|
}
|
|
25221
25238
|
if (deletedRows.length > 0) {
|
|
25222
25239
|
this.data.rows = newRows;
|
|
25240
|
+
// Clean up the tracking arrays so deleted rows are no longer
|
|
25241
|
+
// considered inserted or modified.
|
|
25242
|
+
__classPrivateFieldSet$2(this, _KupDataTable_insertedRowIds, __classPrivateFieldGet$3(this, _KupDataTable_insertedRowIds, "f").filter((id) => !ids.includes(id)), "f");
|
|
25243
|
+
__classPrivateFieldSet$2(this, _KupDataTable_modifiedRowsIds, __classPrivateFieldGet$3(this, _KupDataTable_modifiedRowsIds, "f").filter((id) => !ids.includes(id)), "f");
|
|
25223
25244
|
await this.refresh(true);
|
|
25224
25245
|
}
|
|
25225
25246
|
return deletedRows;
|
|
@@ -26166,7 +26187,7 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
26166
26187
|
__classPrivateFieldSet$2(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getSizedColumns).call(this), "f");
|
|
26167
26188
|
let rows = null;
|
|
26168
26189
|
if (__classPrivateFieldGet$3(this, _KupDataTable_paginatedRowsLength, "f") === 0) {
|
|
26169
|
-
rows = (h$1("tr", { key: '
|
|
26190
|
+
rows = (h$1("tr", { key: '5d5bc9d717045ebacf203981e4cb82dc5e6743b3', ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").push(el) }, h$1("td", { key: 'edc985270001e7d4792aed4cadaf3b6ae8a9b16b', colSpan: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
|
|
26170
26191
|
}
|
|
26171
26192
|
else {
|
|
26172
26193
|
rows = [];
|
|
@@ -26242,7 +26263,7 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
26242
26263
|
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handleChipsContextMenu).call(this, chipArg.id, e);
|
|
26243
26264
|
});
|
|
26244
26265
|
}
|
|
26245
|
-
groupChips = h$1(FChip, Object.assign({ key: '
|
|
26266
|
+
groupChips = h$1(FChip, Object.assign({ key: 'ebf94e6578476caaf11d9b33d020c07444cebcb4' }, props));
|
|
26246
26267
|
}
|
|
26247
26268
|
}
|
|
26248
26269
|
const tableClass = {
|
|
@@ -26274,7 +26295,7 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
26274
26295
|
if (this.headerIsPersistent &&
|
|
26275
26296
|
this.tableHeight === undefined &&
|
|
26276
26297
|
this.tableWidth === undefined) {
|
|
26277
|
-
stickyEl = (h$1("sticky-header", { key: '
|
|
26298
|
+
stickyEl = (h$1("sticky-header", { key: 'adbf7ea77dd2538152d896c57f48aee731ec4bd0', class: "hover-scrolling-child", hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_stickyTheadRef, el, "f")) }, h$1("thead-sticky", { key: '65884ef4206bcf998229298e1c947b45985455a6' }, h$1("tr-sticky", { key: '2c77fb6204cc5eec25b7d445491f32525246b334' }, stickyHeader))));
|
|
26278
26299
|
}
|
|
26279
26300
|
let belowClass = 'below-wrapper';
|
|
26280
26301
|
if (!!this.tableHeight || !!this.tableWidth) {
|
|
@@ -26320,7 +26341,7 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
26320
26341
|
const useGlobalFilter = !this.legacyLook &&
|
|
26321
26342
|
(this.globalFilter ||
|
|
26322
26343
|
this.getRows().length > __classPrivateFieldGet$3(this, _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER, "f"));
|
|
26323
|
-
const compCreated = (h$1(Host, { key: '
|
|
26344
|
+
const compCreated = (h$1(Host, { key: '002d8689464677ac797f2c221e6f6498b5b7876c', "onKup-drop": (e) => {
|
|
26324
26345
|
this.kupDataTableDrop.emit(e.detail);
|
|
26325
26346
|
}, "onKup-cell-input": (e) => {
|
|
26326
26347
|
autoselectOnAction(e);
|
|
@@ -26339,11 +26360,11 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
26339
26360
|
this.kupDataTableObjectFieldOpenSearchMenu.emit(e.detail);
|
|
26340
26361
|
}, "onKup-objectfield-selectedmenuitem": (e) => {
|
|
26341
26362
|
this.kupDataTableObjectFieldSelectedMenuItem.emit(e.detail);
|
|
26342
|
-
} }, h$1("style", { key: '
|
|
26363
|
+
} }, h$1("style", { key: '969e09953a0852ddfb4f8cc09ae5c5eeaa7b31c1' }, __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), this.updatableData ? __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderUpdateButtons).call(this) : null, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderOtherButtons).call(this), h$1("div", { key: '2ef668f26fc73d8da695997815f8aefe31d622b8', id: componentWrapperId, class: wrapClass }, h$1("div", { key: 'f0b8d082c5b090e42a06805fde6a40ef7f320c1a', class: "group-wrapper" }, groupChips), h$1("div", { key: '1f6bf7d73994e3cfc0c923899e2eda527addb1bf', class: "actions-wrapper", style: actionWrapperWidth }, useGlobalFilter ? (h$1("div", { id: "global-filter" }, h$1(FTextField, { fullWidth: true, icon: KupThemeIconValues.SEARCH, label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), sizing: KupComponentSizing.EXTRA_SMALL, value: this.globalFilterValue, onInput: (event) => {
|
|
26343
26364
|
const t = event.target;
|
|
26344
26365
|
window.clearTimeout(__classPrivateFieldGet$3(this, _KupDataTable_globalFilterTimeout, "f"));
|
|
26345
26366
|
__classPrivateFieldSet$2(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
|
|
26346
|
-
} }))) : null, paginatorTop && (h$1("div", { key: '
|
|
26367
|
+
} }))) : null, paginatorTop && (h$1("div", { key: '0a20b56290794f7affeefd8160852c29187157e1', class: "above-wrapper paginator-top" }, paginatorTop)), this.insertMode !== '' &&
|
|
26347
26368
|
this.selectedRows.length > 0 ? (h$1(FButton, { icon: "save", onClick: () => {
|
|
26348
26369
|
this.kupSave.emit({
|
|
26349
26370
|
comp: this,
|
|
@@ -26393,9 +26414,9 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
26393
26414
|
this.data.rows.unshift(row);
|
|
26394
26415
|
await this.refresh(true);
|
|
26395
26416
|
}
|
|
26396
|
-
}, sizing: KupComponentSizing.MEDIUM, styling: FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), h$1("div", { key: '
|
|
26417
|
+
}, sizing: KupComponentSizing.MEDIUM, styling: FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), h$1("div", { key: 'cd25a52b1e91a96422b093fdc5bf04ee19550002', class: "droparea", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
|
|
26397
26418
|
? __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_columnRemoveArea).call(this)
|
|
26398
|
-
: null), h$1("div", { key: '
|
|
26419
|
+
: null), h$1("div", { key: '5fb2e944ff0d5380133194a808c3a501510384da', style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
|
|
26399
26420
|
? [
|
|
26400
26421
|
h$1("div", { class: "settings-trigger", onClick: () => {
|
|
26401
26422
|
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onCustomSettingsClick).call(this);
|
|
@@ -26404,7 +26425,7 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
26404
26425
|
} }, h$1(FImage, { color: `var(${KupThemeColorValues.TITLE})`, resource: "settings", sizeX: "10px" })),
|
|
26405
26426
|
this.renderCustomizePanel(),
|
|
26406
26427
|
]
|
|
26407
|
-
: null, h$1("table", { key: '
|
|
26428
|
+
: null, h$1("table", { key: '666019cd7acb30ee4b5599969a09def220a6ad38', class: tableClass, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_tableRef, el, "f")), onKeyDown: (e) => __classPrivateFieldGet$3(this, _KupDataTable_onKupKeyDown, "f").call(this, e), onMouseLeave: (ev) => {
|
|
26408
26429
|
ev.stopPropagation();
|
|
26409
26430
|
}, onPointerDown: (e) => {
|
|
26410
26431
|
__classPrivateFieldSet$2(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
|
|
@@ -26412,7 +26433,7 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class KupDataTable extends
|
|
|
26412
26433
|
__classPrivateFieldSet$2(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
|
|
26413
26434
|
}, onContextMenu: (e) => {
|
|
26414
26435
|
e.preventDefault();
|
|
26415
|
-
} }, h$1("thead", { key: '
|
|
26436
|
+
} }, h$1("thead", { key: '86df3ea65b8bb4bb5f825bb0f4b2603397cf2959', hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_theadRef, el, "f")) }, h$1("tr", { key: '50526a28db9536067341093310a8ee1d5aa0802e' }, header)), h$1("tbody", { key: '96ca0e2643e0c8a6c9634893c292a083dcc86890' }, rows), this.showFooter && this.renderFooter()), stickyEl), paginatorBottom)));
|
|
26416
26437
|
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").perfMonitoring.measure('componentRender', 'kup-data-table');
|
|
26417
26438
|
return compCreated;
|
|
26418
26439
|
}
|
|
@@ -26682,10 +26703,6 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
26682
26703
|
this.state.showHeader = this.showHeader;
|
|
26683
26704
|
somethingChanged = true;
|
|
26684
26705
|
}
|
|
26685
|
-
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showLoadMore, this.showLoadMore)) {
|
|
26686
|
-
this.state.showLoadMore = this.showLoadMore;
|
|
26687
|
-
somethingChanged = true;
|
|
26688
|
-
}
|
|
26689
26706
|
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showPaginator, this.showPaginator)) {
|
|
26690
26707
|
this.state.showPaginator = this.showPaginator;
|
|
26691
26708
|
somethingChanged = true;
|
|
@@ -29273,9 +29290,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
29273
29290
|
onClickHandler: () => {
|
|
29274
29291
|
const selectedRowsIds = this.selectedRows.map((row) => row.id);
|
|
29275
29292
|
const insertedRowsIds = __classPrivateFieldGet$3(this, _KupDataTable_insertedRowIds, "f");
|
|
29276
|
-
|
|
29277
|
-
|
|
29278
|
-
|
|
29293
|
+
// If every selected row is an inserted (unconfirmed) row,
|
|
29294
|
+
// delete them locally without calling the update.
|
|
29295
|
+
const allSelectedAreInserted = selectedRowsIds.every((id) => insertedRowsIds.includes(id));
|
|
29296
|
+
if (allSelectedAreInserted) {
|
|
29279
29297
|
this.deleteRows(selectedRowsIds);
|
|
29280
29298
|
}
|
|
29281
29299
|
else {
|
|
@@ -29309,12 +29327,6 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
29309
29327
|
return __classPrivateFieldGet$3(this, _KupDataTable_insertedRowIds, "f").includes(rowId);
|
|
29310
29328
|
}, _KupDataTable_isRowModified = function _KupDataTable_isRowModified(rowId) {
|
|
29311
29329
|
return __classPrivateFieldGet$3(this, _KupDataTable_modifiedRowsIds, "f").includes(rowId);
|
|
29312
|
-
}, _KupDataTable_arraysContainSameElements = function _KupDataTable_arraysContainSameElements(arr1, arr2) {
|
|
29313
|
-
if (arr1.length !== arr2.length)
|
|
29314
|
-
return false;
|
|
29315
|
-
const sorted1 = [...arr1].sort();
|
|
29316
|
-
const sorted2 = [...arr2].sort();
|
|
29317
|
-
return sorted1.every((val, index) => val === sorted2[index]);
|
|
29318
29330
|
};
|
|
29319
29331
|
function defineCustomElement$a() {
|
|
29320
29332
|
if (typeof customElements === "undefined") {
|
|
@@ -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, g as getProps, s as setProps } from './p-2b503f65.js';
|
|
3
|
-
import { c as componentWrapperId, d as defineCustomElement$1, a as defineCustomElement$2, b as defineCustomElement$3, e as defineCustomElement$4, f as defineCustomElement$5, g as defineCustomElement$6, h as defineCustomElement$7, i as defineCustomElement$8, j as defineCustomElement$9, k as defineCustomElement$a, l as defineCustomElement$b, m as defineCustomElement$c, n as defineCustomElement$d, o as defineCustomElement$e, p as defineCustomElement$f, q as defineCustomElement$g, r as defineCustomElement$h, s as defineCustomElement$i, t as defineCustomElement$j, u as defineCustomElement$k, v as defineCustomElement$l, w as defineCustomElement$m, x as defineCustomElement$n, y as defineCustomElement$o, z as defineCustomElement$p, A as defineCustomElement$q, B as defineCustomElement$r, C as defineCustomElement$s, D as defineCustomElement$t, E as defineCustomElement$u } from './p-
|
|
3
|
+
import { c as componentWrapperId, d as defineCustomElement$1, a as defineCustomElement$2, b as defineCustomElement$3, e as defineCustomElement$4, f as defineCustomElement$5, g as defineCustomElement$6, h as defineCustomElement$7, i as defineCustomElement$8, j as defineCustomElement$9, k as defineCustomElement$a, l as defineCustomElement$b, m as defineCustomElement$c, n as defineCustomElement$d, o as defineCustomElement$e, p as defineCustomElement$f, q as defineCustomElement$g, r as defineCustomElement$h, s as defineCustomElement$i, t as defineCustomElement$j, u as defineCustomElement$k, v as defineCustomElement$l, w as defineCustomElement$m, x as defineCustomElement$n, y as defineCustomElement$o, z as defineCustomElement$p, A as defineCustomElement$q, B as defineCustomElement$r, C as defineCustomElement$s, D as defineCustomElement$t, E as defineCustomElement$u } from './p-ad48e240.js';
|
|
4
4
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './p-0462f723.js';
|
|
5
5
|
|
|
6
6
|
var toastuiEditor = {exports: {}};
|
|
@@ -8741,7 +8741,7 @@ var __classPrivateFieldSet$4 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
8741
8741
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
8742
8742
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
8743
8743
|
};
|
|
8744
|
-
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
|
|
8744
|
+
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;
|
|
8745
8745
|
const dom$2 = document.documentElement;
|
|
8746
8746
|
const KupDataTable = class {
|
|
8747
8747
|
constructor(hostRef) {
|
|
@@ -9011,28 +9011,40 @@ const KupDataTable = class {
|
|
|
9011
9011
|
'grid_off',
|
|
9012
9012
|
]);
|
|
9013
9013
|
_KupDataTable_addRowHandler.set(this, async (row) => {
|
|
9014
|
-
var _a, _b;
|
|
9015
|
-
var _c;
|
|
9016
9014
|
let newRow;
|
|
9015
|
+
// Retrieves the currently selected rows, if any. They will be used as a
|
|
9016
|
+
// template for the new row when available.
|
|
9017
9017
|
const selectedRows = await this.getSelectedRows();
|
|
9018
9018
|
if (selectedRows.length > 0) {
|
|
9019
|
-
newRow =
|
|
9020
|
-
}
|
|
9021
|
-
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) {
|
|
9022
|
-
newRow = JSON.parse(JSON.stringify(__classPrivateFieldGet$8(this, _KupDataTable_originalDataLoaded, "f").rows[0]));
|
|
9019
|
+
newRow = __classPrivateFieldGet$8(this, _KupDataTable_createRowWithInputFields, "f").call(this, selectedRows[0]);
|
|
9023
9020
|
}
|
|
9024
9021
|
else if (row) {
|
|
9022
|
+
// An explicit row was provided: build the new row from it, applying
|
|
9023
|
+
// the column input-field configuration.
|
|
9025
9024
|
newRow = __classPrivateFieldGet$8(this, _KupDataTable_createRowWithInputFields, "f").call(this, row);
|
|
9026
9025
|
}
|
|
9027
9026
|
else {
|
|
9027
|
+
// Nothing to copy from: build a blank row with input fields based on
|
|
9028
|
+
// the current column definitions.
|
|
9028
9029
|
newRow = __classPrivateFieldGet$8(this, _KupDataTable_createRowWithInputFields, "f").call(this);
|
|
9029
9030
|
}
|
|
9031
|
+
// When no template was used (no selection and no explicit row), reset the
|
|
9032
|
+
// value of every cell so the new record is empty and ready for input.
|
|
9030
9033
|
Object.values(newRow.cells).forEach((cell) => {
|
|
9031
|
-
|
|
9034
|
+
var _a;
|
|
9035
|
+
if (selectedRows.length === 0 && !row) {
|
|
9032
9036
|
cell.value = '';
|
|
9037
|
+
if ((_a = cell === null || cell === void 0 ? void 0 : cell.data) === null || _a === void 0 ? void 0 : _a.initialValue) {
|
|
9038
|
+
cell.data.initialValue = '';
|
|
9039
|
+
}
|
|
9033
9040
|
}
|
|
9034
9041
|
});
|
|
9035
|
-
|
|
9042
|
+
// Assigns an id to the new row. The id is always the highest id
|
|
9043
|
+
// currently present in the data plus one, so inserted rows are always
|
|
9044
|
+
// ordered (0, 1, 2, 3, ...) regardless of insertions or deletions.
|
|
9045
|
+
const currentMaxId = this.data.rows.reduce((max, r) => Math.max(max, parseInt(r.id) || 0), __classPrivateFieldGet$8(this, _KupDataTable_originalDataLoadedMaxId, "f"));
|
|
9046
|
+
newRow.id = (currentMaxId + 1).toString();
|
|
9047
|
+
// Tracks the new row as inserted and prepends it to the table data.
|
|
9036
9048
|
__classPrivateFieldGet$8(this, _KupDataTable_insertedRowIds, "f").push(newRow.id);
|
|
9037
9049
|
this.insertNewRow(newRow, true);
|
|
9038
9050
|
});
|
|
@@ -9041,18 +9053,22 @@ const KupDataTable = class {
|
|
|
9041
9053
|
const row = { cells: {} };
|
|
9042
9054
|
(_a = this.data) === null || _a === void 0 ? void 0 : _a.columns.forEach((c) => {
|
|
9043
9055
|
var _a, _b, _c;
|
|
9056
|
+
const columnData = Object.assign(Object.assign({}, c === null || c === void 0 ? void 0 : c['data']), (c['length'] && c['maxLength']
|
|
9057
|
+
? {
|
|
9058
|
+
size: c['length'],
|
|
9059
|
+
maxLength: c['maxLength'],
|
|
9060
|
+
}
|
|
9061
|
+
: {}));
|
|
9044
9062
|
const cell = ((_a = rowToCopy === null || rowToCopy === void 0 ? void 0 : rowToCopy.cells) === null || _a === void 0 ? void 0 : _a[c.name])
|
|
9045
|
-
?
|
|
9063
|
+
? (() => {
|
|
9064
|
+
const clonedCell = JSON.parse(JSON.stringify(rowToCopy.cells[c.name]));
|
|
9065
|
+
return Object.assign(Object.assign({}, clonedCell), { data: Object.assign(Object.assign({}, columnData), clonedCell === null || clonedCell === void 0 ? void 0 : clonedCell.data) });
|
|
9066
|
+
})()
|
|
9046
9067
|
: {
|
|
9047
9068
|
shape: (_b = c.shape) !== null && _b !== void 0 ? _b : FCellShapes.TEXT_FIELD,
|
|
9048
9069
|
obj: Object.assign({}, c.obj),
|
|
9049
9070
|
isEditable: (_c = c.isEditable) !== null && _c !== void 0 ? _c : true,
|
|
9050
|
-
data:
|
|
9051
|
-
? {
|
|
9052
|
-
size: c['length'],
|
|
9053
|
-
maxLength: c['maxLength'],
|
|
9054
|
-
}
|
|
9055
|
-
: {},
|
|
9071
|
+
data: columnData,
|
|
9056
9072
|
};
|
|
9057
9073
|
row.cells[c.name] = cell;
|
|
9058
9074
|
});
|
|
@@ -9160,7 +9176,6 @@ const KupDataTable = class {
|
|
|
9160
9176
|
this.showFilters = state.showFilters;
|
|
9161
9177
|
this.showGroups = state.showGroups;
|
|
9162
9178
|
this.showHeader = state.showHeader;
|
|
9163
|
-
this.showLoadMore = state.showLoadMore;
|
|
9164
9179
|
this.showPaginator = state.showPaginator;
|
|
9165
9180
|
this.hiddenSubmitButton = state.hiddenSubmitButton;
|
|
9166
9181
|
this.sortEnabled = state.sortEnabled;
|
|
@@ -9273,7 +9288,9 @@ const KupDataTable = class {
|
|
|
9273
9288
|
if (originalDataRowIndex > -1) {
|
|
9274
9289
|
this.data.rows[originalDataRowIndex].cells =
|
|
9275
9290
|
structuredClone(row.cells);
|
|
9276
|
-
|
|
9291
|
+
// Track the row by its id (consistent with the other
|
|
9292
|
+
// places where #modifiedRowsIds is populated).
|
|
9293
|
+
__classPrivateFieldGet$8(this, _KupDataTable_modifiedRowsIds, "f").push(row.id);
|
|
9277
9294
|
}
|
|
9278
9295
|
else {
|
|
9279
9296
|
__classPrivateFieldGet$8(this, _KupDataTable_addRowHandler, "f").call(this, row);
|
|
@@ -9388,6 +9405,10 @@ const KupDataTable = class {
|
|
|
9388
9405
|
}
|
|
9389
9406
|
if (deletedRows.length > 0) {
|
|
9390
9407
|
this.data.rows = newRows;
|
|
9408
|
+
// Clean up the tracking arrays so deleted rows are no longer
|
|
9409
|
+
// considered inserted or modified.
|
|
9410
|
+
__classPrivateFieldSet$4(this, _KupDataTable_insertedRowIds, __classPrivateFieldGet$8(this, _KupDataTable_insertedRowIds, "f").filter((id) => !ids.includes(id)), "f");
|
|
9411
|
+
__classPrivateFieldSet$4(this, _KupDataTable_modifiedRowsIds, __classPrivateFieldGet$8(this, _KupDataTable_modifiedRowsIds, "f").filter((id) => !ids.includes(id)), "f");
|
|
9391
9412
|
await this.refresh(true);
|
|
9392
9413
|
}
|
|
9393
9414
|
return deletedRows;
|
|
@@ -10334,7 +10355,7 @@ const KupDataTable = class {
|
|
|
10334
10355
|
__classPrivateFieldSet$4(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_getSizedColumns).call(this), "f");
|
|
10335
10356
|
let rows = null;
|
|
10336
10357
|
if (__classPrivateFieldGet$8(this, _KupDataTable_paginatedRowsLength, "f") === 0) {
|
|
10337
|
-
rows = (h("tr", { key: '
|
|
10358
|
+
rows = (h("tr", { key: '5d5bc9d717045ebacf203981e4cb82dc5e6743b3', ref: (el) => __classPrivateFieldGet$8(this, _KupDataTable_rowsRefs, "f").push(el) }, h("td", { key: 'edc985270001e7d4792aed4cadaf3b6ae8a9b16b', colSpan: __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
|
|
10338
10359
|
}
|
|
10339
10360
|
else {
|
|
10340
10361
|
rows = [];
|
|
@@ -10410,7 +10431,7 @@ const KupDataTable = class {
|
|
|
10410
10431
|
__classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_handleChipsContextMenu).call(this, chipArg.id, e);
|
|
10411
10432
|
});
|
|
10412
10433
|
}
|
|
10413
|
-
groupChips = h(FChip, Object.assign({ key: '
|
|
10434
|
+
groupChips = h(FChip, Object.assign({ key: 'ebf94e6578476caaf11d9b33d020c07444cebcb4' }, props));
|
|
10414
10435
|
}
|
|
10415
10436
|
}
|
|
10416
10437
|
const tableClass = {
|
|
@@ -10442,7 +10463,7 @@ const KupDataTable = class {
|
|
|
10442
10463
|
if (this.headerIsPersistent &&
|
|
10443
10464
|
this.tableHeight === undefined &&
|
|
10444
10465
|
this.tableWidth === undefined) {
|
|
10445
|
-
stickyEl = (h("sticky-header", { key: '
|
|
10466
|
+
stickyEl = (h("sticky-header", { key: 'adbf7ea77dd2538152d896c57f48aee731ec4bd0', class: "hover-scrolling-child", hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$4(this, _KupDataTable_stickyTheadRef, el, "f")) }, h("thead-sticky", { key: '65884ef4206bcf998229298e1c947b45985455a6' }, h("tr-sticky", { key: '2c77fb6204cc5eec25b7d445491f32525246b334' }, stickyHeader))));
|
|
10446
10467
|
}
|
|
10447
10468
|
let belowClass = 'below-wrapper';
|
|
10448
10469
|
if (!!this.tableHeight || !!this.tableWidth) {
|
|
@@ -10488,7 +10509,7 @@ const KupDataTable = class {
|
|
|
10488
10509
|
const useGlobalFilter = !this.legacyLook &&
|
|
10489
10510
|
(this.globalFilter ||
|
|
10490
10511
|
this.getRows().length > __classPrivateFieldGet$8(this, _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER, "f"));
|
|
10491
|
-
const compCreated = (h(Host, { key: '
|
|
10512
|
+
const compCreated = (h(Host, { key: '002d8689464677ac797f2c221e6f6498b5b7876c', "onKup-drop": (e) => {
|
|
10492
10513
|
this.kupDataTableDrop.emit(e.detail);
|
|
10493
10514
|
}, "onKup-cell-input": (e) => {
|
|
10494
10515
|
autoselectOnAction(e);
|
|
@@ -10507,11 +10528,11 @@ const KupDataTable = class {
|
|
|
10507
10528
|
this.kupDataTableObjectFieldOpenSearchMenu.emit(e.detail);
|
|
10508
10529
|
}, "onKup-objectfield-selectedmenuitem": (e) => {
|
|
10509
10530
|
this.kupDataTableObjectFieldSelectedMenuItem.emit(e.detail);
|
|
10510
|
-
} }, h("style", { key: '
|
|
10531
|
+
} }, 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), 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$8(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), sizing: KupComponentSizing.EXTRA_SMALL, value: this.globalFilterValue, onInput: (event) => {
|
|
10511
10532
|
const t = event.target;
|
|
10512
10533
|
window.clearTimeout(__classPrivateFieldGet$8(this, _KupDataTable_globalFilterTimeout, "f"));
|
|
10513
10534
|
__classPrivateFieldSet$4(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
|
|
10514
|
-
} }))) : null, paginatorTop && (h("div", { key: '
|
|
10535
|
+
} }))) : null, paginatorTop && (h("div", { key: '0a20b56290794f7affeefd8160852c29187157e1', class: "above-wrapper paginator-top" }, paginatorTop)), this.insertMode !== '' &&
|
|
10515
10536
|
this.selectedRows.length > 0 ? (h(FButton, { icon: "save", onClick: () => {
|
|
10516
10537
|
this.kupSave.emit({
|
|
10517
10538
|
comp: this,
|
|
@@ -10561,9 +10582,9 @@ const KupDataTable = class {
|
|
|
10561
10582
|
this.data.rows.unshift(row);
|
|
10562
10583
|
await this.refresh(true);
|
|
10563
10584
|
}
|
|
10564
|
-
}, sizing: KupComponentSizing.MEDIUM, styling: FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), h("div", { key: '
|
|
10585
|
+
}, sizing: KupComponentSizing.MEDIUM, styling: FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), 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
|
|
10565
10586
|
? __classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_columnRemoveArea).call(this)
|
|
10566
|
-
: null), h("div", { key: '
|
|
10587
|
+
: null), h("div", { key: '5fb2e944ff0d5380133194a808c3a501510384da', style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet$4(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
|
|
10567
10588
|
? [
|
|
10568
10589
|
h("div", { class: "settings-trigger", onClick: () => {
|
|
10569
10590
|
__classPrivateFieldGet$8(this, _KupDataTable_instances, "m", _KupDataTable_onCustomSettingsClick).call(this);
|
|
@@ -10572,7 +10593,7 @@ const KupDataTable = class {
|
|
|
10572
10593
|
} }, h(FImage, { color: `var(${KupThemeColorValues.TITLE})`, resource: "settings", sizeX: "10px" })),
|
|
10573
10594
|
this.renderCustomizePanel(),
|
|
10574
10595
|
]
|
|
10575
|
-
: null, h("table", { key: '
|
|
10596
|
+
: null, 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) => {
|
|
10576
10597
|
ev.stopPropagation();
|
|
10577
10598
|
}, onPointerDown: (e) => {
|
|
10578
10599
|
__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");
|
|
@@ -10580,7 +10601,7 @@ const KupDataTable = class {
|
|
|
10580
10601
|
__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");
|
|
10581
10602
|
}, onContextMenu: (e) => {
|
|
10582
10603
|
e.preventDefault();
|
|
10583
|
-
} }, h("thead", { key: '
|
|
10604
|
+
} }, h("thead", { key: '86df3ea65b8bb4bb5f825bb0f4b2603397cf2959', hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$4(this, _KupDataTable_theadRef, el, "f")) }, h("tr", { key: '50526a28db9536067341093310a8ee1d5aa0802e' }, header)), h("tbody", { key: '96ca0e2643e0c8a6c9634893c292a083dcc86890' }, rows), this.showFooter && this.renderFooter()), stickyEl), paginatorBottom)));
|
|
10584
10605
|
__classPrivateFieldGet$8(this, _KupDataTable_kupManager, "f").perfMonitoring.measure('componentRender', 'kup-data-table');
|
|
10585
10606
|
return compCreated;
|
|
10586
10607
|
}
|
|
@@ -10726,10 +10747,6 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
10726
10747
|
this.state.showHeader = this.showHeader;
|
|
10727
10748
|
somethingChanged = true;
|
|
10728
10749
|
}
|
|
10729
|
-
if (!__classPrivateFieldGet$8(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showLoadMore, this.showLoadMore)) {
|
|
10730
|
-
this.state.showLoadMore = this.showLoadMore;
|
|
10731
|
-
somethingChanged = true;
|
|
10732
|
-
}
|
|
10733
10750
|
if (!__classPrivateFieldGet$8(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showPaginator, this.showPaginator)) {
|
|
10734
10751
|
this.state.showPaginator = this.showPaginator;
|
|
10735
10752
|
somethingChanged = true;
|
|
@@ -13317,9 +13334,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
13317
13334
|
onClickHandler: () => {
|
|
13318
13335
|
const selectedRowsIds = this.selectedRows.map((row) => row.id);
|
|
13319
13336
|
const insertedRowsIds = __classPrivateFieldGet$8(this, _KupDataTable_insertedRowIds, "f");
|
|
13320
|
-
|
|
13321
|
-
|
|
13322
|
-
|
|
13337
|
+
// If every selected row is an inserted (unconfirmed) row,
|
|
13338
|
+
// delete them locally without calling the update.
|
|
13339
|
+
const allSelectedAreInserted = selectedRowsIds.every((id) => insertedRowsIds.includes(id));
|
|
13340
|
+
if (allSelectedAreInserted) {
|
|
13323
13341
|
this.deleteRows(selectedRowsIds);
|
|
13324
13342
|
}
|
|
13325
13343
|
else {
|
|
@@ -13353,12 +13371,6 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_cellToFocus = new WeakM
|
|
|
13353
13371
|
return __classPrivateFieldGet$8(this, _KupDataTable_insertedRowIds, "f").includes(rowId);
|
|
13354
13372
|
}, _KupDataTable_isRowModified = function _KupDataTable_isRowModified(rowId) {
|
|
13355
13373
|
return __classPrivateFieldGet$8(this, _KupDataTable_modifiedRowsIds, "f").includes(rowId);
|
|
13356
|
-
}, _KupDataTable_arraysContainSameElements = function _KupDataTable_arraysContainSameElements(arr1, arr2) {
|
|
13357
|
-
if (arr1.length !== arr2.length)
|
|
13358
|
-
return false;
|
|
13359
|
-
const sorted1 = [...arr1].sort();
|
|
13360
|
-
const sorted2 = [...arr2].sort();
|
|
13361
|
-
return sorted1.every((val, index) => val === sorted2[index]);
|
|
13362
13374
|
};
|
|
13363
13375
|
KupDataTable.style = KupDataTableStyle0;
|
|
13364
13376
|
|