@sme.up/ketchup 11.0.0-SNAPSHOT-20250623143442 → 11.0.0-SNAPSHOT-20250625150034
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-input-panel.cjs.entry.js +118 -17
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +118 -17
- package/dist/components/kup-input-panel.js +118 -17
- package/dist/esm/kup-input-panel.entry.js +118 -17
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-a47935a9.entry.js +1 -0
- package/package.json +1 -1
- package/dist/ketchup/p-42074c8f.entry.js +0 -1
|
@@ -176,7 +176,7 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
176
176
|
}
|
|
177
177
|
return t;
|
|
178
178
|
};
|
|
179
|
-
var _KupInputPanel_instances, _KupInputPanel_kupManager, _KupInputPanel_formRef, _KupInputPanel_optionsAdapterMap, _KupInputPanel_originalData, _KupInputPanel_listeners, _KupInputPanel_cellTypeComponents, _KupInputPanel_cellTypesNeedingReset, _KupInputPanel_cellCustomRender, _KupInputPanel_sectionRenderMap, _KupInputPanel_readyPromise, _KupInputPanel_readyResolve, _KupInputPanel_getCell, _KupInputPanel_renderRow, _KupInputPanel_renderCell, _KupInputPanel_renderButton, _KupInputPanel_renderDropDownButton, _KupInputPanel_renderDataTable, _KupInputPanel_renderLabel, _KupInputPanel_getLabelComponent, _KupInputPanel_renderGridLayout, _KupInputPanel_renderAbsoluteLayout, _KupInputPanel_renderSection, _KupInputPanel_renderAbsoluteSection, _KupInputPanel_extractContentIds, _KupInputPanel_renderSectionTab, _KupInputPanel_skipRenderField, _KupInputPanel_renderField, _KupInputPanel_renderAbsoluteField, _KupInputPanel_mapCommands, _KupInputPanel_mapCells, _KupInputPanel_setData, _KupInputPanel_deepObjectsMerge, _KupInputPanel_reverseMapCells, _KupInputPanel_mapData, _KupInputPanel_slotData, _KupInputPanel_CHIAdapter, _KupInputPanel_GRAAdapter, _KupInputPanel_BTNAdapter, _KupInputPanel_CMBandACPAdapter, _KupInputPanel_getOptionHandler, _KupInputPanel_CHKAdapter, _KupInputPanel_CLPAdapter, _KupInputPanel_EDTAdapter, _KupInputPanel_ITXAdapter, _KupInputPanel_RADAdapter, _KupInputPanel_SWTAdapter, _KupInputPanel_DateAdapter, _KupInputPanel_ObjectAdapter, _KupInputPanel_ImageListAdapter, _KupInputPanel_FileUploadAdapter, _KupInputPanel_TimeAdapter, _KupInputPanel_NumberAdapter, _KupInputPanel_DataTableAdapter, _KupInputPanel_getTableUpdatedCell, _KupInputPanel_optionsTreeComboAdapter, _KupInputPanel_treeOptionsNodeAdapter, _KupInputPanel_dataTreeOptionsChildrenAdapter, _KupInputPanel_tableOptionsAdapter, _KupInputPanel_commandAdapter, _KupInputPanel_getAutocompleteEventCallback, _KupInputPanel_manageInputPanelCheck, _KupInputPanel_onCellUpdate, _KupInputPanel_setCellError, _KupInputPanel_areValuesUpdated, _KupInputPanel_getFunctionOnClickBTN, _KupInputPanel_findTraversedFCell, _KupInputPanel_getEventDetails, _KupInputPanel_didLoadInteractables, _KupInputPanel_setFocusOnInputElement, _KupInputPanel_findFirstInput, _KupInputPanel_setAutoSkip, _KupInputPanel_upload;
|
|
179
|
+
var _KupInputPanel_instances, _KupInputPanel_kupManager, _KupInputPanel_formRef, _KupInputPanel_optionsAdapterMap, _KupInputPanel_originalData, _KupInputPanel_listeners, _KupInputPanel_cellTypeComponents, _KupInputPanel_cellTypesNeedingReset, _KupInputPanel_cellCustomRender, _KupInputPanel_sectionRenderMap, _KupInputPanel_readyPromise, _KupInputPanel_readyResolve, _KupInputPanel_getCell, _KupInputPanel_renderRow, _KupInputPanel_renderCell, _KupInputPanel_renderButton, _KupInputPanel_renderDropDownButton, _KupInputPanel_renderDataTable, _KupInputPanel_renderLabel, _KupInputPanel_getLabelComponent, _KupInputPanel_renderGridLayout, _KupInputPanel_renderAbsoluteLayout, _KupInputPanel_renderSection, _KupInputPanel_renderAbsoluteSection, _KupInputPanel_extractContentIds, _KupInputPanel_renderSectionTab, _KupInputPanel_skipRenderField, _KupInputPanel_renderField, _KupInputPanel_renderAbsoluteField, _KupInputPanel_mapCommands, _KupInputPanel_mapCells, _KupInputPanel_setData, _KupInputPanel_deepObjectsMerge, _KupInputPanel_reverseMapCells, _KupInputPanel_mapData, _KupInputPanel_slotData, _KupInputPanel_CHIAdapter, _KupInputPanel_GRAAdapter, _KupInputPanel_BTNAdapter, _KupInputPanel_CMBandACPAdapter, _KupInputPanel_getOptionHandler, _KupInputPanel_isFCellEventPayload, _KupInputPanel_CHKAdapter, _KupInputPanel_CLPAdapter, _KupInputPanel_EDTAdapter, _KupInputPanel_ITXAdapter, _KupInputPanel_RADAdapter, _KupInputPanel_SWTAdapter, _KupInputPanel_DateAdapter, _KupInputPanel_ObjectAdapter, _KupInputPanel_ImageListAdapter, _KupInputPanel_FileUploadAdapter, _KupInputPanel_TimeAdapter, _KupInputPanel_NumberAdapter, _KupInputPanel_DataTableAdapter, _KupInputPanel_getTableUpdatedCell, _KupInputPanel_optionsTreeComboAdapter, _KupInputPanel_treeOptionsNodeAdapter, _KupInputPanel_dataTreeOptionsChildrenAdapter, _KupInputPanel_tableOptionsAdapter, _KupInputPanel_commandAdapter, _KupInputPanel_getAutocompleteEventCallback, _KupInputPanel_getTblAutocompleteEventCallback, _KupInputPanel_manageTblItemClick, _KupInputPanel_manageInputPanelCheck, _KupInputPanel_onCellUpdate, _KupInputPanel_setCellError, _KupInputPanel_areValuesUpdated, _KupInputPanel_getFunctionOnClickBTN, _KupInputPanel_findTraversedFCell, _KupInputPanel_getEventDetails, _KupInputPanel_didLoadInteractables, _KupInputPanel_setFocusOnInputElement, _KupInputPanel_findFirstInput, _KupInputPanel_setAutoSkip, _KupInputPanel_upload;
|
|
180
180
|
const dom = document.documentElement;
|
|
181
181
|
const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel extends H {
|
|
182
182
|
constructor() {
|
|
@@ -390,15 +390,17 @@ const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel ext
|
|
|
390
390
|
h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
|
|
391
391
|
]
|
|
392
392
|
: this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
|
|
393
|
-
return (h(Host, { key: '
|
|
393
|
+
return (h(Host, { key: '4f83260012e56d294d98bfb0c311306f618f2090', "onKup-cell-blur": (e) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_manageInputPanelCheck).call(this, e, CheckTriggeringEvents.BLUR), "onKup-cell-update": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_onCellUpdate).bind(this), "onKup-tabbar-click": (e) => {
|
|
394
394
|
this.tabSelected = e.detail.node.id;
|
|
395
|
-
}, "onKup-autocomplete-input": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-autocomplete-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-combobox-iconclick": (e) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).call(this, e, true), "onKup-cell-itemclick": (e) =>
|
|
395
|
+
}, "onKup-autocomplete-input": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-autocomplete-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-combobox-iconclick": (e) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).call(this, e, true), "onKup-cell-itemclick": (e) => {
|
|
396
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_manageInputPanelCheck).call(this, e, CheckTriggeringEvents.ITEMCLICK);
|
|
397
|
+
}, "onKup-objectfield-searchpayload": (e) => {
|
|
396
398
|
this.kupInputPanelObjectFieldSearchPayload.emit(e.detail);
|
|
397
399
|
}, "onKup-objectfield-opensearchmenu": (e) => {
|
|
398
400
|
this.kupInputPanelObjectFieldOpenSearchMenu.emit(e.detail);
|
|
399
401
|
}, "onKup-objectfield-selectedmenuitem": (e) => {
|
|
400
402
|
this.kupInputPanelObjectFieldSelectedMenuItem.emit(e.detail);
|
|
401
|
-
}, "onKup-file-upload-upload": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_upload).bind(this) }, h("style", { key: '
|
|
403
|
+
}, "onKup-file-upload-upload": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_upload).bind(this) }, h("style", { key: '90c43ddf4ab75a9811ad94064dee5760a8ad7cf6' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'eb842ea71f9a4a1900333d180bca051e79d59d1f', id: componentWrapperId }, inputPanelContent)));
|
|
402
404
|
}
|
|
403
405
|
disconnectedCallback() {
|
|
404
406
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
|
|
@@ -560,7 +562,27 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
560
562
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, e.detail.node, e.detail.node.id);
|
|
561
563
|
} })));
|
|
562
564
|
}, _KupInputPanel_renderDataTable = function _KupInputPanel_renderDataTable(cell, { name }) {
|
|
563
|
-
return (h("kup-data-table", Object.assign({ id: name, editableData: true, showGroups: true, showFilters: true }, cell.data)
|
|
565
|
+
return (h("kup-data-table", Object.assign({ id: name, editableData: true, showGroups: true, showFilters: true }, cell.data, { "onKup-autocomplete-iconclick": (e) => {
|
|
566
|
+
e.preventDefault();
|
|
567
|
+
e.stopPropagation();
|
|
568
|
+
}, "onKup-autocomplete-input": (e) => {
|
|
569
|
+
e.preventDefault();
|
|
570
|
+
e.stopPropagation();
|
|
571
|
+
}, "onKup-datatable-cell-iconclick": (e) => {
|
|
572
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).call(this, e);
|
|
573
|
+
e.preventDefault();
|
|
574
|
+
e.stopPropagation();
|
|
575
|
+
}, "onKup-datatable-cell-input": (e) => {
|
|
576
|
+
if (e.detail.type === 'autocomplete') {
|
|
577
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).call(this, e);
|
|
578
|
+
}
|
|
579
|
+
e.preventDefault();
|
|
580
|
+
e.stopPropagation();
|
|
581
|
+
}, "onKup-cell-itemclick": (e) => {
|
|
582
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_manageTblItemClick).call(this, e);
|
|
583
|
+
e.preventDefault();
|
|
584
|
+
e.stopPropagation();
|
|
585
|
+
} })));
|
|
564
586
|
}, _KupInputPanel_renderLabel = function _KupInputPanel_renderLabel(cell, column, isAbsoluteLayout) {
|
|
565
587
|
const isNumberType = dom.ketchup.objects.isNumber(cell.obj);
|
|
566
588
|
const isFormattableType = isNumberType ||
|
|
@@ -813,11 +835,8 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
813
835
|
.flat();
|
|
814
836
|
}, _KupInputPanel_mapCells = function _KupInputPanel_mapCells(data) {
|
|
815
837
|
var _a, _b, _c, _d;
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
}
|
|
819
|
-
const layout = (_c = data === null || data === void 0 ? void 0 : data.rows[0]) === null || _c === void 0 ? void 0 : _c.layout;
|
|
820
|
-
const inpuPanelCells = ((_d = data === null || data === void 0 ? void 0 : data.rows) === null || _d === void 0 ? void 0 : _d.length)
|
|
838
|
+
const layout = (_a = data === null || data === void 0 ? void 0 : data.rows[0]) === null || _a === void 0 ? void 0 : _a.layout;
|
|
839
|
+
const inpuPanelCells = ((_b = data === null || data === void 0 ? void 0 : data.rows) === null || _b === void 0 ? void 0 : _b.length)
|
|
821
840
|
? data.rows.reduce((inpuPanelCells, row) => {
|
|
822
841
|
const cells = data.columns.map((column) => {
|
|
823
842
|
const cell = structuredClone(row.cells[column.name]);
|
|
@@ -841,6 +860,9 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
841
860
|
queryCompNeedsReset ? el === null || el === void 0 ? void 0 : el.reset() : (_a = el === null || el === void 0 ? void 0 : el.setValue) === null || _a === void 0 ? void 0 : _a.call(el, cell.value);
|
|
842
861
|
}));
|
|
843
862
|
this.inputPanelCells = inpuPanelCells;
|
|
863
|
+
if ((_d = (_c = data.setup) === null || _c === void 0 ? void 0 : _c.commands) === null || _d === void 0 ? void 0 : _d.length) {
|
|
864
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapCommands).call(this);
|
|
865
|
+
}
|
|
844
866
|
}, _KupInputPanel_setData = function _KupInputPanel_setData(cell, column, layout) {
|
|
845
867
|
const defaultProps = Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapData).call(this, cell, column, layout)), { disabled: !cell.isEditable || column.useAs === UseAsValue.KEY, id: column.name });
|
|
846
868
|
const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
|
|
@@ -962,10 +984,21 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
962
984
|
},
|
|
963
985
|
};
|
|
964
986
|
}, _KupInputPanel_BTNAdapter = function _KupInputPanel_BTNAdapter(_options, _fieldLabel, _currentValue, cell, id) {
|
|
987
|
+
var _a, _b;
|
|
965
988
|
cell.data = cell.data || {};
|
|
966
989
|
cell.data.onClick = () => {
|
|
967
990
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, cell, id);
|
|
968
991
|
};
|
|
992
|
+
if (cell.data.BtnMap) {
|
|
993
|
+
const concurrentCommand = (_b = (_a = this.data.setup) === null || _a === void 0 ? void 0 : _a.commands) === null || _b === void 0 ? void 0 : _b.find((command) => command.obj.k === cell.data.BtnMap);
|
|
994
|
+
if (concurrentCommand) {
|
|
995
|
+
cell.isEditable = true;
|
|
996
|
+
cell.data.onClick = () => {
|
|
997
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, cell, concurrentCommand.obj.k);
|
|
998
|
+
};
|
|
999
|
+
this.data.setup.commands = this.data.setup.commands.filter((command) => command.obj.k !== concurrentCommand.obj.k);
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
969
1002
|
return Object.assign({ label: cell.value, fun: cell.fun }, cell.data);
|
|
970
1003
|
}, _KupInputPanel_CMBandACPAdapter = function _KupInputPanel_CMBandACPAdapter(rawOptions, fieldLabel, currentValue, cell) {
|
|
971
1004
|
const configCMandACP = CMBandACPAdapter(currentValue, fieldLabel, []);
|
|
@@ -974,15 +1007,22 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
974
1007
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, rawOptions, currentValue);
|
|
975
1008
|
}
|
|
976
1009
|
return configCMandACP;
|
|
977
|
-
}, _KupInputPanel_getOptionHandler = function _KupInputPanel_getOptionHandler({ detail }, checkList = false) {
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
if (checkList) {
|
|
981
|
-
triggerCallback = !detail.comp.data['kup-list'].data.length;
|
|
1010
|
+
}, _KupInputPanel_getOptionHandler = function _KupInputPanel_getOptionHandler({ detail, }, checkList = false) {
|
|
1011
|
+
if (__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_isFCellEventPayload).call(this, detail)) {
|
|
1012
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getTblAutocompleteEventCallback).call(this, detail);
|
|
982
1013
|
}
|
|
983
|
-
|
|
984
|
-
__classPrivateFieldGet(this, _KupInputPanel_instances, "m",
|
|
1014
|
+
else {
|
|
1015
|
+
const cell = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getCell).call(this, detail.id);
|
|
1016
|
+
let triggerCallback = true;
|
|
1017
|
+
if (checkList) {
|
|
1018
|
+
triggerCallback = !detail.comp.data['kup-list'].data.length;
|
|
1019
|
+
}
|
|
1020
|
+
if (cell.fun && triggerCallback) {
|
|
1021
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getAutocompleteEventCallback).call(this, detail, cell);
|
|
1022
|
+
}
|
|
985
1023
|
}
|
|
1024
|
+
}, _KupInputPanel_isFCellEventPayload = function _KupInputPanel_isFCellEventPayload(detail) {
|
|
1025
|
+
return detail.cell ? true : false;
|
|
986
1026
|
}, _KupInputPanel_CHKAdapter = function _KupInputPanel_CHKAdapter(_options, fieldLabel, currentValue) {
|
|
987
1027
|
return CHKAdapter(currentValue, fieldLabel);
|
|
988
1028
|
}, _KupInputPanel_CLPAdapter = function _KupInputPanel_CLPAdapter(_options, fieldLabel, _currentValue) {
|
|
@@ -1181,6 +1221,67 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
1181
1221
|
}
|
|
1182
1222
|
detail.comp.refresh();
|
|
1183
1223
|
});
|
|
1224
|
+
}, _KupInputPanel_getTblAutocompleteEventCallback = function _KupInputPanel_getTblAutocompleteEventCallback(detail) {
|
|
1225
|
+
// Destructure frequently used properties
|
|
1226
|
+
const { cell, row, column, comp, id, event } = detail;
|
|
1227
|
+
const cellValue = cell === null || cell === void 0 ? void 0 : cell.value;
|
|
1228
|
+
const autocompleteEventDetail = detail.event.detail;
|
|
1229
|
+
try {
|
|
1230
|
+
this.optionsHandler(cell['fun'], autocompleteEventDetail.inputValue, { columns: comp.data.columns, rows: [row] }, column.name).then((options) => {
|
|
1231
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1232
|
+
// Filter visible columns
|
|
1233
|
+
const visibleColumns = ((_a = options === null || options === void 0 ? void 0 : options.columns) !== null && _a !== void 0 ? _a : [])
|
|
1234
|
+
.filter((col) => (col === null || col === void 0 ? void 0 : col.visible) !== false)
|
|
1235
|
+
.map((col) => col.name);
|
|
1236
|
+
// Filter rows to only include visible columns
|
|
1237
|
+
const filteredRows = (_c = (_b = options === null || options === void 0 ? void 0 : options.rows) === null || _b === void 0 ? void 0 : _b.map((rowData) => {
|
|
1238
|
+
const visibleCells = visibleColumns.reduce((acc, colName) => {
|
|
1239
|
+
if (rowData.cells[colName]) {
|
|
1240
|
+
acc[colName] = rowData.cells[colName];
|
|
1241
|
+
}
|
|
1242
|
+
return acc;
|
|
1243
|
+
}, {});
|
|
1244
|
+
return Object.assign(Object.assign({}, rowData), { cells: visibleCells });
|
|
1245
|
+
})) !== null && _c !== void 0 ? _c : [];
|
|
1246
|
+
// Prepare the final options with filtered data
|
|
1247
|
+
const visibleColumnsOptions = Object.assign(Object.assign({}, options), { rows: filteredRows });
|
|
1248
|
+
// Get and update table data
|
|
1249
|
+
const tableData = comp.data;
|
|
1250
|
+
const targetCell = tableData.rows[row.id].cells[column.name];
|
|
1251
|
+
// Initialize cell data structure if needed
|
|
1252
|
+
if (!((_e = (_d = targetCell.data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e['kup-list'])) {
|
|
1253
|
+
targetCell.data = {
|
|
1254
|
+
data: {
|
|
1255
|
+
'kup-list': {},
|
|
1256
|
+
'kup-text-field': Object.assign({}, targetCell.data),
|
|
1257
|
+
},
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1260
|
+
// Update the autocomplete list data
|
|
1261
|
+
const kupListData = targetCell.data.data['kup-list'];
|
|
1262
|
+
kupListData.data = filteredRows.length
|
|
1263
|
+
? (_f = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, visibleColumnsOptions, cellValue)) !== null && _f !== void 0 ? _f : []
|
|
1264
|
+
: [];
|
|
1265
|
+
kupListData.options = (_g = options.columns) !== null && _g !== void 0 ? _g : [];
|
|
1266
|
+
// Update the component data and refresh
|
|
1267
|
+
comp.data = tableData;
|
|
1268
|
+
this.data.rows[0].cells[id].value = JSON.stringify(tableData);
|
|
1269
|
+
// // Refresh components
|
|
1270
|
+
event.detail.comp.refresh();
|
|
1271
|
+
comp.refresh();
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
catch (error) {
|
|
1275
|
+
console.error('Error in autocomplete callback:', error);
|
|
1276
|
+
}
|
|
1277
|
+
}, _KupInputPanel_manageTblItemClick = function _KupInputPanel_manageTblItemClick(e) {
|
|
1278
|
+
const { cell, row, column, id, comp } = e.detail;
|
|
1279
|
+
const tableData = comp.data;
|
|
1280
|
+
tableData.rows[row.id].cells[column.name] = cell;
|
|
1281
|
+
comp.data = tableData;
|
|
1282
|
+
this.data.rows[0].cells[id].value = JSON.stringify(tableData);
|
|
1283
|
+
e.detail.event.detail.comp.refresh();
|
|
1284
|
+
comp.refresh();
|
|
1184
1285
|
}, _KupInputPanel_manageInputPanelCheck = async function _KupInputPanel_manageInputPanelCheck(e, eventType) {
|
|
1185
1286
|
var _a, _b, _c, _d, _e;
|
|
1186
1287
|
const { detail: { column, cell }, } = e;
|
|
@@ -186,7 +186,7 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
186
186
|
}
|
|
187
187
|
return t;
|
|
188
188
|
};
|
|
189
|
-
var _KupInputPanel_instances, _KupInputPanel_kupManager, _KupInputPanel_formRef, _KupInputPanel_optionsAdapterMap, _KupInputPanel_originalData, _KupInputPanel_listeners, _KupInputPanel_cellTypeComponents, _KupInputPanel_cellTypesNeedingReset, _KupInputPanel_cellCustomRender, _KupInputPanel_sectionRenderMap, _KupInputPanel_readyPromise, _KupInputPanel_readyResolve, _KupInputPanel_getCell, _KupInputPanel_renderRow, _KupInputPanel_renderCell, _KupInputPanel_renderButton, _KupInputPanel_renderDropDownButton, _KupInputPanel_renderDataTable, _KupInputPanel_renderLabel, _KupInputPanel_getLabelComponent, _KupInputPanel_renderGridLayout, _KupInputPanel_renderAbsoluteLayout, _KupInputPanel_renderSection, _KupInputPanel_renderAbsoluteSection, _KupInputPanel_extractContentIds, _KupInputPanel_renderSectionTab, _KupInputPanel_skipRenderField, _KupInputPanel_renderField, _KupInputPanel_renderAbsoluteField, _KupInputPanel_mapCommands, _KupInputPanel_mapCells, _KupInputPanel_setData, _KupInputPanel_deepObjectsMerge, _KupInputPanel_reverseMapCells, _KupInputPanel_mapData, _KupInputPanel_slotData, _KupInputPanel_CHIAdapter, _KupInputPanel_GRAAdapter, _KupInputPanel_BTNAdapter, _KupInputPanel_CMBandACPAdapter, _KupInputPanel_getOptionHandler, _KupInputPanel_CHKAdapter, _KupInputPanel_CLPAdapter, _KupInputPanel_EDTAdapter, _KupInputPanel_ITXAdapter, _KupInputPanel_RADAdapter, _KupInputPanel_SWTAdapter, _KupInputPanel_DateAdapter, _KupInputPanel_ObjectAdapter, _KupInputPanel_ImageListAdapter, _KupInputPanel_FileUploadAdapter, _KupInputPanel_TimeAdapter, _KupInputPanel_NumberAdapter, _KupInputPanel_DataTableAdapter, _KupInputPanel_getTableUpdatedCell, _KupInputPanel_optionsTreeComboAdapter, _KupInputPanel_treeOptionsNodeAdapter, _KupInputPanel_dataTreeOptionsChildrenAdapter, _KupInputPanel_tableOptionsAdapter, _KupInputPanel_commandAdapter, _KupInputPanel_getAutocompleteEventCallback, _KupInputPanel_manageInputPanelCheck, _KupInputPanel_onCellUpdate, _KupInputPanel_setCellError, _KupInputPanel_areValuesUpdated, _KupInputPanel_getFunctionOnClickBTN, _KupInputPanel_findTraversedFCell, _KupInputPanel_getEventDetails, _KupInputPanel_didLoadInteractables, _KupInputPanel_setFocusOnInputElement, _KupInputPanel_findFirstInput, _KupInputPanel_setAutoSkip, _KupInputPanel_upload;
|
|
189
|
+
var _KupInputPanel_instances, _KupInputPanel_kupManager, _KupInputPanel_formRef, _KupInputPanel_optionsAdapterMap, _KupInputPanel_originalData, _KupInputPanel_listeners, _KupInputPanel_cellTypeComponents, _KupInputPanel_cellTypesNeedingReset, _KupInputPanel_cellCustomRender, _KupInputPanel_sectionRenderMap, _KupInputPanel_readyPromise, _KupInputPanel_readyResolve, _KupInputPanel_getCell, _KupInputPanel_renderRow, _KupInputPanel_renderCell, _KupInputPanel_renderButton, _KupInputPanel_renderDropDownButton, _KupInputPanel_renderDataTable, _KupInputPanel_renderLabel, _KupInputPanel_getLabelComponent, _KupInputPanel_renderGridLayout, _KupInputPanel_renderAbsoluteLayout, _KupInputPanel_renderSection, _KupInputPanel_renderAbsoluteSection, _KupInputPanel_extractContentIds, _KupInputPanel_renderSectionTab, _KupInputPanel_skipRenderField, _KupInputPanel_renderField, _KupInputPanel_renderAbsoluteField, _KupInputPanel_mapCommands, _KupInputPanel_mapCells, _KupInputPanel_setData, _KupInputPanel_deepObjectsMerge, _KupInputPanel_reverseMapCells, _KupInputPanel_mapData, _KupInputPanel_slotData, _KupInputPanel_CHIAdapter, _KupInputPanel_GRAAdapter, _KupInputPanel_BTNAdapter, _KupInputPanel_CMBandACPAdapter, _KupInputPanel_getOptionHandler, _KupInputPanel_isFCellEventPayload, _KupInputPanel_CHKAdapter, _KupInputPanel_CLPAdapter, _KupInputPanel_EDTAdapter, _KupInputPanel_ITXAdapter, _KupInputPanel_RADAdapter, _KupInputPanel_SWTAdapter, _KupInputPanel_DateAdapter, _KupInputPanel_ObjectAdapter, _KupInputPanel_ImageListAdapter, _KupInputPanel_FileUploadAdapter, _KupInputPanel_TimeAdapter, _KupInputPanel_NumberAdapter, _KupInputPanel_DataTableAdapter, _KupInputPanel_getTableUpdatedCell, _KupInputPanel_optionsTreeComboAdapter, _KupInputPanel_treeOptionsNodeAdapter, _KupInputPanel_dataTreeOptionsChildrenAdapter, _KupInputPanel_tableOptionsAdapter, _KupInputPanel_commandAdapter, _KupInputPanel_getAutocompleteEventCallback, _KupInputPanel_getTblAutocompleteEventCallback, _KupInputPanel_manageTblItemClick, _KupInputPanel_manageInputPanelCheck, _KupInputPanel_onCellUpdate, _KupInputPanel_setCellError, _KupInputPanel_areValuesUpdated, _KupInputPanel_getFunctionOnClickBTN, _KupInputPanel_findTraversedFCell, _KupInputPanel_getEventDetails, _KupInputPanel_didLoadInteractables, _KupInputPanel_setFocusOnInputElement, _KupInputPanel_findFirstInput, _KupInputPanel_setAutoSkip, _KupInputPanel_upload;
|
|
190
190
|
const dom = document.documentElement;
|
|
191
191
|
const KupInputPanel = class {
|
|
192
192
|
constructor(hostRef) {
|
|
@@ -398,15 +398,17 @@ const KupInputPanel = class {
|
|
|
398
398
|
h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
|
|
399
399
|
]
|
|
400
400
|
: this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
|
|
401
|
-
return (h(Host, { key: '
|
|
401
|
+
return (h(Host, { key: '4f83260012e56d294d98bfb0c311306f618f2090', "onKup-cell-blur": (e) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_manageInputPanelCheck).call(this, e, CheckTriggeringEvents.BLUR), "onKup-cell-update": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_onCellUpdate).bind(this), "onKup-tabbar-click": (e) => {
|
|
402
402
|
this.tabSelected = e.detail.node.id;
|
|
403
|
-
}, "onKup-autocomplete-input": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-autocomplete-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-combobox-iconclick": (e) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).call(this, e, true), "onKup-cell-itemclick": (e) =>
|
|
403
|
+
}, "onKup-autocomplete-input": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-autocomplete-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-combobox-iconclick": (e) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).call(this, e, true), "onKup-cell-itemclick": (e) => {
|
|
404
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_manageInputPanelCheck).call(this, e, CheckTriggeringEvents.ITEMCLICK);
|
|
405
|
+
}, "onKup-objectfield-searchpayload": (e) => {
|
|
404
406
|
this.kupInputPanelObjectFieldSearchPayload.emit(e.detail);
|
|
405
407
|
}, "onKup-objectfield-opensearchmenu": (e) => {
|
|
406
408
|
this.kupInputPanelObjectFieldOpenSearchMenu.emit(e.detail);
|
|
407
409
|
}, "onKup-objectfield-selectedmenuitem": (e) => {
|
|
408
410
|
this.kupInputPanelObjectFieldSelectedMenuItem.emit(e.detail);
|
|
409
|
-
}, "onKup-file-upload-upload": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_upload).bind(this) }, h("style", { key: '
|
|
411
|
+
}, "onKup-file-upload-upload": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_upload).bind(this) }, h("style", { key: '90c43ddf4ab75a9811ad94064dee5760a8ad7cf6' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'eb842ea71f9a4a1900333d180bca051e79d59d1f', id: componentWrapperId }, inputPanelContent)));
|
|
410
412
|
}
|
|
411
413
|
disconnectedCallback() {
|
|
412
414
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
|
|
@@ -541,7 +543,27 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
541
543
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, e.detail.node, e.detail.node.id);
|
|
542
544
|
} })));
|
|
543
545
|
}, _KupInputPanel_renderDataTable = function _KupInputPanel_renderDataTable(cell, { name }) {
|
|
544
|
-
return (h("kup-data-table", Object.assign({ id: name, editableData: true, showGroups: true, showFilters: true }, cell.data)
|
|
546
|
+
return (h("kup-data-table", Object.assign({ id: name, editableData: true, showGroups: true, showFilters: true }, cell.data, { "onKup-autocomplete-iconclick": (e) => {
|
|
547
|
+
e.preventDefault();
|
|
548
|
+
e.stopPropagation();
|
|
549
|
+
}, "onKup-autocomplete-input": (e) => {
|
|
550
|
+
e.preventDefault();
|
|
551
|
+
e.stopPropagation();
|
|
552
|
+
}, "onKup-datatable-cell-iconclick": (e) => {
|
|
553
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).call(this, e);
|
|
554
|
+
e.preventDefault();
|
|
555
|
+
e.stopPropagation();
|
|
556
|
+
}, "onKup-datatable-cell-input": (e) => {
|
|
557
|
+
if (e.detail.type === 'autocomplete') {
|
|
558
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).call(this, e);
|
|
559
|
+
}
|
|
560
|
+
e.preventDefault();
|
|
561
|
+
e.stopPropagation();
|
|
562
|
+
}, "onKup-cell-itemclick": (e) => {
|
|
563
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_manageTblItemClick).call(this, e);
|
|
564
|
+
e.preventDefault();
|
|
565
|
+
e.stopPropagation();
|
|
566
|
+
} })));
|
|
545
567
|
}, _KupInputPanel_renderLabel = function _KupInputPanel_renderLabel(cell, column, isAbsoluteLayout) {
|
|
546
568
|
const isNumberType = dom.ketchup.objects.isNumber(cell.obj);
|
|
547
569
|
const isFormattableType = isNumberType ||
|
|
@@ -794,11 +816,8 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
794
816
|
.flat();
|
|
795
817
|
}, _KupInputPanel_mapCells = function _KupInputPanel_mapCells(data) {
|
|
796
818
|
var _a, _b, _c, _d;
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
}
|
|
800
|
-
const layout = (_c = data === null || data === void 0 ? void 0 : data.rows[0]) === null || _c === void 0 ? void 0 : _c.layout;
|
|
801
|
-
const inpuPanelCells = ((_d = data === null || data === void 0 ? void 0 : data.rows) === null || _d === void 0 ? void 0 : _d.length)
|
|
819
|
+
const layout = (_a = data === null || data === void 0 ? void 0 : data.rows[0]) === null || _a === void 0 ? void 0 : _a.layout;
|
|
820
|
+
const inpuPanelCells = ((_b = data === null || data === void 0 ? void 0 : data.rows) === null || _b === void 0 ? void 0 : _b.length)
|
|
802
821
|
? data.rows.reduce((inpuPanelCells, row) => {
|
|
803
822
|
const cells = data.columns.map((column) => {
|
|
804
823
|
const cell = structuredClone(row.cells[column.name]);
|
|
@@ -822,6 +841,9 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
822
841
|
queryCompNeedsReset ? el === null || el === void 0 ? void 0 : el.reset() : (_a = el === null || el === void 0 ? void 0 : el.setValue) === null || _a === void 0 ? void 0 : _a.call(el, cell.value);
|
|
823
842
|
}));
|
|
824
843
|
this.inputPanelCells = inpuPanelCells;
|
|
844
|
+
if ((_d = (_c = data.setup) === null || _c === void 0 ? void 0 : _c.commands) === null || _d === void 0 ? void 0 : _d.length) {
|
|
845
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapCommands).call(this);
|
|
846
|
+
}
|
|
825
847
|
}, _KupInputPanel_setData = function _KupInputPanel_setData(cell, column, layout) {
|
|
826
848
|
const defaultProps = Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapData).call(this, cell, column, layout)), { disabled: !cell.isEditable || column.useAs === UseAsValue.KEY, id: column.name });
|
|
827
849
|
const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
|
|
@@ -943,10 +965,21 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
943
965
|
},
|
|
944
966
|
};
|
|
945
967
|
}, _KupInputPanel_BTNAdapter = function _KupInputPanel_BTNAdapter(_options, _fieldLabel, _currentValue, cell, id) {
|
|
968
|
+
var _a, _b;
|
|
946
969
|
cell.data = cell.data || {};
|
|
947
970
|
cell.data.onClick = () => {
|
|
948
971
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, cell, id);
|
|
949
972
|
};
|
|
973
|
+
if (cell.data.BtnMap) {
|
|
974
|
+
const concurrentCommand = (_b = (_a = this.data.setup) === null || _a === void 0 ? void 0 : _a.commands) === null || _b === void 0 ? void 0 : _b.find((command) => command.obj.k === cell.data.BtnMap);
|
|
975
|
+
if (concurrentCommand) {
|
|
976
|
+
cell.isEditable = true;
|
|
977
|
+
cell.data.onClick = () => {
|
|
978
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, cell, concurrentCommand.obj.k);
|
|
979
|
+
};
|
|
980
|
+
this.data.setup.commands = this.data.setup.commands.filter((command) => command.obj.k !== concurrentCommand.obj.k);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
950
983
|
return Object.assign({ label: cell.value, fun: cell.fun }, cell.data);
|
|
951
984
|
}, _KupInputPanel_CMBandACPAdapter = function _KupInputPanel_CMBandACPAdapter(rawOptions, fieldLabel, currentValue, cell) {
|
|
952
985
|
const configCMandACP = CMBandACPAdapter(currentValue, fieldLabel, []);
|
|
@@ -955,15 +988,22 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
955
988
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, rawOptions, currentValue);
|
|
956
989
|
}
|
|
957
990
|
return configCMandACP;
|
|
958
|
-
}, _KupInputPanel_getOptionHandler = function _KupInputPanel_getOptionHandler({ detail }, checkList = false) {
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
if (checkList) {
|
|
962
|
-
triggerCallback = !detail.comp.data['kup-list'].data.length;
|
|
991
|
+
}, _KupInputPanel_getOptionHandler = function _KupInputPanel_getOptionHandler({ detail, }, checkList = false) {
|
|
992
|
+
if (__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_isFCellEventPayload).call(this, detail)) {
|
|
993
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getTblAutocompleteEventCallback).call(this, detail);
|
|
963
994
|
}
|
|
964
|
-
|
|
965
|
-
__classPrivateFieldGet(this, _KupInputPanel_instances, "m",
|
|
995
|
+
else {
|
|
996
|
+
const cell = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getCell).call(this, detail.id);
|
|
997
|
+
let triggerCallback = true;
|
|
998
|
+
if (checkList) {
|
|
999
|
+
triggerCallback = !detail.comp.data['kup-list'].data.length;
|
|
1000
|
+
}
|
|
1001
|
+
if (cell.fun && triggerCallback) {
|
|
1002
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getAutocompleteEventCallback).call(this, detail, cell);
|
|
1003
|
+
}
|
|
966
1004
|
}
|
|
1005
|
+
}, _KupInputPanel_isFCellEventPayload = function _KupInputPanel_isFCellEventPayload(detail) {
|
|
1006
|
+
return detail.cell ? true : false;
|
|
967
1007
|
}, _KupInputPanel_CHKAdapter = function _KupInputPanel_CHKAdapter(_options, fieldLabel, currentValue) {
|
|
968
1008
|
return CHKAdapter(currentValue, fieldLabel);
|
|
969
1009
|
}, _KupInputPanel_CLPAdapter = function _KupInputPanel_CLPAdapter(_options, fieldLabel, _currentValue) {
|
|
@@ -1162,6 +1202,67 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
1162
1202
|
}
|
|
1163
1203
|
detail.comp.refresh();
|
|
1164
1204
|
});
|
|
1205
|
+
}, _KupInputPanel_getTblAutocompleteEventCallback = function _KupInputPanel_getTblAutocompleteEventCallback(detail) {
|
|
1206
|
+
// Destructure frequently used properties
|
|
1207
|
+
const { cell, row, column, comp, id, event } = detail;
|
|
1208
|
+
const cellValue = cell === null || cell === void 0 ? void 0 : cell.value;
|
|
1209
|
+
const autocompleteEventDetail = detail.event.detail;
|
|
1210
|
+
try {
|
|
1211
|
+
this.optionsHandler(cell['fun'], autocompleteEventDetail.inputValue, { columns: comp.data.columns, rows: [row] }, column.name).then((options) => {
|
|
1212
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1213
|
+
// Filter visible columns
|
|
1214
|
+
const visibleColumns = ((_a = options === null || options === void 0 ? void 0 : options.columns) !== null && _a !== void 0 ? _a : [])
|
|
1215
|
+
.filter((col) => (col === null || col === void 0 ? void 0 : col.visible) !== false)
|
|
1216
|
+
.map((col) => col.name);
|
|
1217
|
+
// Filter rows to only include visible columns
|
|
1218
|
+
const filteredRows = (_c = (_b = options === null || options === void 0 ? void 0 : options.rows) === null || _b === void 0 ? void 0 : _b.map((rowData) => {
|
|
1219
|
+
const visibleCells = visibleColumns.reduce((acc, colName) => {
|
|
1220
|
+
if (rowData.cells[colName]) {
|
|
1221
|
+
acc[colName] = rowData.cells[colName];
|
|
1222
|
+
}
|
|
1223
|
+
return acc;
|
|
1224
|
+
}, {});
|
|
1225
|
+
return Object.assign(Object.assign({}, rowData), { cells: visibleCells });
|
|
1226
|
+
})) !== null && _c !== void 0 ? _c : [];
|
|
1227
|
+
// Prepare the final options with filtered data
|
|
1228
|
+
const visibleColumnsOptions = Object.assign(Object.assign({}, options), { rows: filteredRows });
|
|
1229
|
+
// Get and update table data
|
|
1230
|
+
const tableData = comp.data;
|
|
1231
|
+
const targetCell = tableData.rows[row.id].cells[column.name];
|
|
1232
|
+
// Initialize cell data structure if needed
|
|
1233
|
+
if (!((_e = (_d = targetCell.data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e['kup-list'])) {
|
|
1234
|
+
targetCell.data = {
|
|
1235
|
+
data: {
|
|
1236
|
+
'kup-list': {},
|
|
1237
|
+
'kup-text-field': Object.assign({}, targetCell.data),
|
|
1238
|
+
},
|
|
1239
|
+
};
|
|
1240
|
+
}
|
|
1241
|
+
// Update the autocomplete list data
|
|
1242
|
+
const kupListData = targetCell.data.data['kup-list'];
|
|
1243
|
+
kupListData.data = filteredRows.length
|
|
1244
|
+
? (_f = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, visibleColumnsOptions, cellValue)) !== null && _f !== void 0 ? _f : []
|
|
1245
|
+
: [];
|
|
1246
|
+
kupListData.options = (_g = options.columns) !== null && _g !== void 0 ? _g : [];
|
|
1247
|
+
// Update the component data and refresh
|
|
1248
|
+
comp.data = tableData;
|
|
1249
|
+
this.data.rows[0].cells[id].value = JSON.stringify(tableData);
|
|
1250
|
+
// // Refresh components
|
|
1251
|
+
event.detail.comp.refresh();
|
|
1252
|
+
comp.refresh();
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1255
|
+
catch (error) {
|
|
1256
|
+
console.error('Error in autocomplete callback:', error);
|
|
1257
|
+
}
|
|
1258
|
+
}, _KupInputPanel_manageTblItemClick = function _KupInputPanel_manageTblItemClick(e) {
|
|
1259
|
+
const { cell, row, column, id, comp } = e.detail;
|
|
1260
|
+
const tableData = comp.data;
|
|
1261
|
+
tableData.rows[row.id].cells[column.name] = cell;
|
|
1262
|
+
comp.data = tableData;
|
|
1263
|
+
this.data.rows[0].cells[id].value = JSON.stringify(tableData);
|
|
1264
|
+
e.detail.event.detail.comp.refresh();
|
|
1265
|
+
comp.refresh();
|
|
1165
1266
|
}, _KupInputPanel_manageInputPanelCheck = async function _KupInputPanel_manageInputPanelCheck(e, eventType) {
|
|
1166
1267
|
var _a, _b, _c, _d, _e;
|
|
1167
1268
|
const { detail: { column, cell }, } = e;
|