@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.
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, d as getElement } from './index-191ee7cb.js';
2
2
  import { F as FButton } from './f-button-79148bc6.js';
3
3
  import { F as FCell } from './f-cell-63cde277.js';
4
- import { k as kupManagerInstance, a5 as FCellTypes, F as FCellShapes, g as getProps, s as setProps, h as KupLanguageGeneric, al as CHIAdapter, ab as CMBandACPAdapter, aa as RADAdapter, am as SWTAdapter, e as KupDebugCategory, ak as CHKAdapter } from './kup-manager-39b2f1b2.js';
4
+ import { k as kupManagerInstance, a5 as FCellTypes, F as FCellShapes, g as getProps, s as setProps, h as KupLanguageGeneric, al as CHIAdapter, ab as CMBandACPAdapter, aa as RADAdapter, am as SWTAdapter, e as KupDebugCategory, ak as CHKAdapter, a as KupComponentSizing } from './kup-manager-39b2f1b2.js';
5
5
  import { F as FTextFieldMDC } from './f-text-field-mdc-9a862967.js';
6
6
  import { c as componentWrapperId } from './GenericVariables-d8d0541e.js';
7
7
  import './f-button-declarations-6c8f8abe.js';
@@ -89,7 +89,7 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
89
89
  }
90
90
  return t;
91
91
  };
92
- 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;
92
+ 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;
93
93
  const dom = document.documentElement;
94
94
  const KupInputPanel = class {
95
95
  constructor(hostRef) {
@@ -239,7 +239,7 @@ const KupInputPanel = class {
239
239
  h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
240
240
  ]
241
241
  : this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
242
- return (h(Host, { key: 'bebd9a5e00edb5e079297f6cc19dfffcc350fd7a' }, h("style", { key: '53f3b03d367c98c9e9aed12ff26ce4bd88b33889' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'b9abbaaf902ec1fc780022db8a738c1bfaeff414', id: componentWrapperId }, inputPanelContent)));
242
+ return (h(Host, { key: '51d6591625d21011a22538863879959fb476900b' }, h("style", { key: '7cb79388c85b0adb25d6e3cc0a85660985a66643' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'a8530ff7c62de5dcd6e95c12e7441ffca2d1ce91', id: componentWrapperId }, inputPanelContent)));
243
243
  }
244
244
  disconnectedCallback() {
245
245
  __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
@@ -331,6 +331,10 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
331
331
  return h(FCell, Object.assign({}, cellProps));
332
332
  }, _KupInputPanel_renderButton = function _KupInputPanel_renderButton(cell, cellId) {
333
333
  return (h(FButton, Object.assign({ icon: cell.icon, id: cellId }, cell.data, { wrapperClass: "form__submit" })));
334
+ }, _KupInputPanel_renderDropDownButton = function _KupInputPanel_renderDropDownButton(cell, data) {
335
+ return (h("kup-dropdown-button", Object.assign({}, cell.data, { sizing: KupComponentSizing.MEDIUM, label: cell.value, data: data, "onkup-dropdownbutton-itemclick": (e) => {
336
+ __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, e.detail.node, e.detail.node.id);
337
+ } })));
334
338
  }, _KupInputPanel_renderEditor = function _KupInputPanel_renderEditor(cell, cellId) {
335
339
  const event = 'kup-editor-save';
336
340
  const handler = (e) => {
@@ -540,10 +544,21 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
540
544
  return (h("div", { style: styleObj }, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderCell).call(this, fieldCell.cell, cells.row, fieldCell.column)));
541
545
  }, _KupInputPanel_mapCommands = function _KupInputPanel_mapCommands() {
542
546
  this.inputPanelCommands = this.data.setup.commands
543
- .map((commandObj) => Object.entries(commandObj === null || commandObj === void 0 ? void 0 : commandObj.cells).map(([id, cell]) => {
544
- const buttonCell = Object.assign(Object.assign({}, cell), { data: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_BTNAdapter).call(this, null, null, cell.value, cell, id) });
545
- return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderButton).call(this, buttonCell, id);
546
- }))
547
+ .map((commandObj) => {
548
+ if ((commandObj === null || commandObj === void 0 ? void 0 : commandObj.children) && (commandObj === null || commandObj === void 0 ? void 0 : commandObj.children.length) > 0) {
549
+ const data = {
550
+ 'kup-list': {
551
+ showIcons: true,
552
+ data: commandObj.children.map((c) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_commandAdapter).call(this, c)),
553
+ },
554
+ };
555
+ return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderDropDownButton).call(this, commandObj, data);
556
+ }
557
+ else {
558
+ const buttonCell = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_commandAdapter).call(this, commandObj);
559
+ return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderButton).call(this, buttonCell, commandObj.value);
560
+ }
561
+ })
547
562
  .flat();
548
563
  }, _KupInputPanel_mapCells = function _KupInputPanel_mapCells(data) {
549
564
  var _a, _b, _c, _d;
@@ -705,19 +720,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
705
720
  var _a, _b, _c, _d;
706
721
  cell.data = cell.data || {};
707
722
  cell.data.onClick = () => {
708
- cell.fun
709
- ? this.customButtonClickHandler({
710
- fun: cell.fun,
711
- cellId: id,
712
- currentState: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
713
- })
714
- : this.submitCb({
715
- value: {
716
- before: Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_originalData, "f")),
717
- after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
718
- },
719
- cell: id,
720
- });
723
+ __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, cell, id);
721
724
  };
722
725
  if (((_a = cell.data) === null || _a === void 0 ? void 0 : _a.keyShortcut) && !((_b = cell.data) === null || _b === void 0 ? void 0 : _b.disabled)) {
723
726
  __classPrivateFieldGet(this, _KupInputPanel_keysShortcut, "f").push((_c = cell.data) === null || _c === void 0 ? void 0 : _c.keyShortcut);
@@ -960,6 +963,9 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
960
963
  selected: currentValue === cells[id].value,
961
964
  };
962
965
  });
966
+ }, _KupInputPanel_commandAdapter = function _KupInputPanel_commandAdapter(cell) {
967
+ 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 });
968
+ return buttonCell;
963
969
  }, _KupInputPanel_getAutocompleteEventCallback = function _KupInputPanel_getAutocompleteEventCallback(detail, fun, data, id, currentValue) {
964
970
  if (detail.id !== id ||
965
971
  detail.open === false) {
@@ -1074,6 +1080,20 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
1074
1080
  }) })));
1075
1081
  }, _KupInputPanel_areValuesUpdated = function _KupInputPanel_areValuesUpdated() {
1076
1082
  return this.inputPanelCells.some(({ cells, row }) => cells.some(({ cell, column: { name } }) => cell.value !== row.cells[name].value));
1083
+ }, _KupInputPanel_getFunctionOnClickBTN = function _KupInputPanel_getFunctionOnClickBTN(cell, id) {
1084
+ cell.fun
1085
+ ? this.customButtonClickHandler({
1086
+ fun: cell.fun,
1087
+ cellId: id,
1088
+ currentState: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
1089
+ })
1090
+ : this.submitCb({
1091
+ value: {
1092
+ before: Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_originalData, "f")),
1093
+ after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
1094
+ },
1095
+ cell: id,
1096
+ });
1077
1097
  };
1078
1098
  KupInputPanel.style = KupInputPanelStyle0;
1079
1099