@sme.up/ketchup 11.0.0-SNAPSHOT-20241112150912 → 11.0.0-SNAPSHOT-20241113131013

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.
@@ -93,7 +93,7 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
93
93
  }
94
94
  return t;
95
95
  };
96
- var _KupInputPanel_instances, _KupInputPanel_kupManager, _KupInputPanel_optionsAdapterMap, _KupInputPanel_originalData, _KupInputPanel_eventNames, _KupInputPanel_eventBlurNames, _KupInputPanel_listeners, _KupInputPanel_cellTypeComponents, _KupInputPanel_cellCustomRender, _KupInputPanel_sectionRenderMap, _KupInputPanel_keysShortcut, _KupInputPanel_getCell, _KupInputPanel_renderRow, _KupInputPanel_renderCell, _KupInputPanel_renderButton, _KupInputPanel_renderEditor, _KupInputPanel_renderDataTable, _KupInputPanel_renderLabel, _KupInputPanel_getLabelComponent, _KupInputPanel_renderGridLayout, _KupInputPanel_renderAbsoluteLayout, _KupInputPanel_renderSection, _KupInputPanel_renderAbsoluteSection, _KupInputPanel_extractContentIds, _KupInputPanel_renderSectionTab, _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_CHKAdapter, _KupInputPanel_CLPAdapter, _KupInputPanel_EDTAdapter, _KupInputPanel_ITXAdapter, _KupInputPanel_RADAdapter, _KupInputPanel_SWTAdapter, _KupInputPanel_DateAdapter, _KupInputPanel_ObjectAdapter, _KupInputPanel_TimeAdapter, _KupInputPanel_NumberAdapter, _KupInputPanel_DataTableAdapter, _KupInputPanel_getTableUpdatedCell, _KupInputPanel_optionsTreeComboAdapter, _KupInputPanel_treeOptionsNodeAdapter, _KupInputPanel_dataTreeOptionsChildrenAdapter, _KupInputPanel_tableOptionsAdapter, _KupInputPanel_getAutocompleteEventCallback, _KupInputPanel_checkOnBlurProp, _KupInputPanel_checkOnBlurEvent, _KupInputPanel_setCellError, _KupInputPanel_areValuesUpdated;
96
+ var _KupInputPanel_instances, _KupInputPanel_kupManager, _KupInputPanel_optionsAdapterMap, _KupInputPanel_originalData, _KupInputPanel_eventNames, _KupInputPanel_eventBlurNames, _KupInputPanel_listeners, _KupInputPanel_cellTypeComponents, _KupInputPanel_cellCustomRender, _KupInputPanel_sectionRenderMap, _KupInputPanel_keysShortcut, _KupInputPanel_getCell, _KupInputPanel_renderRow, _KupInputPanel_renderCell, _KupInputPanel_renderButton, _KupInputPanel_renderDropDownButton, _KupInputPanel_renderEditor, _KupInputPanel_renderDataTable, _KupInputPanel_renderLabel, _KupInputPanel_getLabelComponent, _KupInputPanel_renderGridLayout, _KupInputPanel_renderAbsoluteLayout, _KupInputPanel_renderSection, _KupInputPanel_renderAbsoluteSection, _KupInputPanel_extractContentIds, _KupInputPanel_renderSectionTab, _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_CHKAdapter, _KupInputPanel_CLPAdapter, _KupInputPanel_EDTAdapter, _KupInputPanel_ITXAdapter, _KupInputPanel_RADAdapter, _KupInputPanel_SWTAdapter, _KupInputPanel_DateAdapter, _KupInputPanel_ObjectAdapter, _KupInputPanel_TimeAdapter, _KupInputPanel_NumberAdapter, _KupInputPanel_DataTableAdapter, _KupInputPanel_getTableUpdatedCell, _KupInputPanel_optionsTreeComboAdapter, _KupInputPanel_treeOptionsNodeAdapter, _KupInputPanel_dataTreeOptionsChildrenAdapter, _KupInputPanel_tableOptionsAdapter, _KupInputPanel_commandAdapter, _KupInputPanel_getAutocompleteEventCallback, _KupInputPanel_checkOnBlurProp, _KupInputPanel_checkOnBlurEvent, _KupInputPanel_setCellError, _KupInputPanel_areValuesUpdated, _KupInputPanel_getFunctionOnClickBTN;
97
97
  const dom = document.documentElement;
98
98
  const KupInputPanel = class {
99
99
  constructor(hostRef) {
@@ -243,7 +243,7 @@ const KupInputPanel = class {
243
243
  index.h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EMPTY_DATA)),
244
244
  ]
245
245
  : this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
246
- return (index.h(index.Host, { key: 'bebd9a5e00edb5e079297f6cc19dfffcc350fd7a' }, index.h("style", { key: '53f3b03d367c98c9e9aed12ff26ce4bd88b33889' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { key: 'b9abbaaf902ec1fc780022db8a738c1bfaeff414', id: GenericVariables.componentWrapperId }, inputPanelContent)));
246
+ return (index.h(index.Host, { key: '51d6591625d21011a22538863879959fb476900b' }, index.h("style", { key: '7cb79388c85b0adb25d6e3cc0a85660985a66643' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { key: 'a8530ff7c62de5dcd6e95c12e7441ffca2d1ce91', id: GenericVariables.componentWrapperId }, inputPanelContent)));
247
247
  }
248
248
  disconnectedCallback() {
249
249
  __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
@@ -335,6 +335,10 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
335
335
  return index.h(fCell.FCell, Object.assign({}, cellProps));
336
336
  }, _KupInputPanel_renderButton = function _KupInputPanel_renderButton(cell, cellId) {
337
337
  return (index.h(fButton.FButton, Object.assign({ icon: cell.icon, id: cellId }, cell.data, { wrapperClass: "form__submit" })));
338
+ }, _KupInputPanel_renderDropDownButton = function _KupInputPanel_renderDropDownButton(cell, data) {
339
+ return (index.h("kup-dropdown-button", Object.assign({}, cell.data, { sizing: kupManager.KupComponentSizing.MEDIUM, label: cell.value, data: data, "onkup-dropdownbutton-itemclick": (e) => {
340
+ __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, e.detail.node, e.detail.node.id);
341
+ } })));
338
342
  }, _KupInputPanel_renderEditor = function _KupInputPanel_renderEditor(cell, cellId) {
339
343
  const event = 'kup-editor-save';
340
344
  const handler = (e) => {
@@ -544,10 +548,21 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
544
548
  return (index.h("div", { style: styleObj }, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderCell).call(this, fieldCell.cell, cells.row, fieldCell.column)));
545
549
  }, _KupInputPanel_mapCommands = function _KupInputPanel_mapCommands() {
546
550
  this.inputPanelCommands = this.data.setup.commands
547
- .map((commandObj) => Object.entries(commandObj === null || commandObj === void 0 ? void 0 : commandObj.cells).map(([id, cell]) => {
548
- const buttonCell = Object.assign(Object.assign({}, cell), { data: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_BTNAdapter).call(this, null, null, cell.value, cell, id) });
549
- return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderButton).call(this, buttonCell, id);
550
- }))
551
+ .map((commandObj) => {
552
+ if ((commandObj === null || commandObj === void 0 ? void 0 : commandObj.children) && (commandObj === null || commandObj === void 0 ? void 0 : commandObj.children.length) > 0) {
553
+ const data = {
554
+ 'kup-list': {
555
+ showIcons: true,
556
+ data: commandObj.children.map((c) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_commandAdapter).call(this, c)),
557
+ },
558
+ };
559
+ return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderDropDownButton).call(this, commandObj, data);
560
+ }
561
+ else {
562
+ const buttonCell = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_commandAdapter).call(this, commandObj);
563
+ return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderButton).call(this, buttonCell, commandObj.value);
564
+ }
565
+ })
551
566
  .flat();
552
567
  }, _KupInputPanel_mapCells = function _KupInputPanel_mapCells(data) {
553
568
  var _a, _b, _c, _d;
@@ -709,19 +724,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
709
724
  var _a, _b, _c, _d;
710
725
  cell.data = cell.data || {};
711
726
  cell.data.onClick = () => {
712
- cell.fun
713
- ? this.customButtonClickHandler({
714
- fun: cell.fun,
715
- cellId: id,
716
- currentState: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
717
- })
718
- : this.submitCb({
719
- value: {
720
- before: Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_originalData, "f")),
721
- after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
722
- },
723
- cell: id,
724
- });
727
+ __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, cell, id);
725
728
  };
726
729
  if (((_a = cell.data) === null || _a === void 0 ? void 0 : _a.keyShortcut) && !((_b = cell.data) === null || _b === void 0 ? void 0 : _b.disabled)) {
727
730
  __classPrivateFieldGet(this, _KupInputPanel_keysShortcut, "f").push((_c = cell.data) === null || _c === void 0 ? void 0 : _c.keyShortcut);
@@ -964,6 +967,9 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
964
967
  selected: currentValue === cells[id].value,
965
968
  };
966
969
  });
970
+ }, _KupInputPanel_commandAdapter = function _KupInputPanel_commandAdapter(cell) {
971
+ const buttonCell = Object.assign(Object.assign({}, cell), { data: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_BTNAdapter).call(this, null, null, cell.value, cell, cell.obj.k), id: cell.obj.k });
972
+ return buttonCell;
967
973
  }, _KupInputPanel_getAutocompleteEventCallback = function _KupInputPanel_getAutocompleteEventCallback(detail, fun, data, id, currentValue) {
968
974
  if (detail.id !== id ||
969
975
  detail.open === false) {
@@ -1078,6 +1084,20 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
1078
1084
  }) })));
1079
1085
  }, _KupInputPanel_areValuesUpdated = function _KupInputPanel_areValuesUpdated() {
1080
1086
  return this.inputPanelCells.some(({ cells, row }) => cells.some(({ cell, column: { name } }) => cell.value !== row.cells[name].value));
1087
+ }, _KupInputPanel_getFunctionOnClickBTN = function _KupInputPanel_getFunctionOnClickBTN(cell, id) {
1088
+ cell.fun
1089
+ ? this.customButtonClickHandler({
1090
+ fun: cell.fun,
1091
+ cellId: id,
1092
+ currentState: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
1093
+ })
1094
+ : this.submitCb({
1095
+ value: {
1096
+ before: Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_originalData, "f")),
1097
+ after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
1098
+ },
1099
+ cell: id,
1100
+ });
1081
1101
  };
1082
1102
  KupInputPanel.style = KupInputPanelStyle0;
1083
1103