@sme.up/ketchup 11.0.0-SNAPSHOT-20241107155833 → 11.0.0-SNAPSHOT-20241107165833

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.
@@ -49,7 +49,7 @@ const getAbsoluteLeft = (col) => {
49
49
  return col * CHAR_WIDTH;
50
50
  };
51
51
 
52
- const kupInputPanelCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0)}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:2rem}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel--absolute{height:40ch;justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}";
52
+ const kupInputPanelCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0)}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:2rem}:host .input-panel__commands{display:flex;gap:2rem}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel--absolute{height:40ch;justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}";
53
53
  const KupInputPanelStyle0 = kupInputPanelCss;
54
54
 
55
55
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
@@ -80,7 +80,7 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
80
80
  }
81
81
  return t;
82
82
  };
83
- 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_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;
83
+ 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;
84
84
  const dom = document.documentElement;
85
85
  const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel extends HTMLElement {
86
86
  constructor() {
@@ -147,6 +147,7 @@ const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel ext
147
147
  this.checkValidObjCallback = null;
148
148
  this.checkValidValueCallback = null;
149
149
  this.inputPanelCells = [];
150
+ this.inputPanelCommands = [];
150
151
  this.tabSelected = null;
151
152
  }
152
153
  //#endregion
@@ -231,7 +232,7 @@ const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel ext
231
232
  h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
232
233
  ]
233
234
  : this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
234
- return (h(Host, { key: '424cf4fea72c35eaf738e96a13da3186cbf86d66' }, h("style", { key: '1ad0a18733d45a7f28f5518d85623ea0530c1d16' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '834d8f4056a8b9f1f913b9f968db4256dca2ff70', id: componentWrapperId }, inputPanelContent)));
235
+ return (h(Host, { key: 'f97b13e882a24cfeeecf5206309f4eda367f4038' }, h("style", { key: '4b50cb265db5f1f2127b6f40f648196aa694ac25' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '75ec785d4135bbce697e78c9221bac1c946e63b3', id: componentWrapperId }, inputPanelContent)));
235
236
  }
236
237
  disconnectedCallback() {
237
238
  __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
@@ -252,6 +253,7 @@ const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel ext
252
253
  "checkValidObjCallback": [16],
253
254
  "checkValidValueCallback": [16],
254
255
  "inputPanelCells": [32],
256
+ "inputPanelCommands": [32],
255
257
  "tabSelected": [32],
256
258
  "getProps": [64],
257
259
  "refresh": [64],
@@ -307,7 +309,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
307
309
  'input-panel--absolute': layout === null || layout === void 0 ? void 0 : layout.absolute,
308
310
  };
309
311
  // We create a form for each row in data
310
- return (h("form", { name: this.rootElement.id, onSubmit: (e) => {
312
+ return (h("form", { name: this.rootElement.id, id: this.rootElement.id, class: { 'input-panel-form': true }, onSubmit: (e) => {
311
313
  e.preventDefault();
312
314
  this.submitCb({
313
315
  value: {
@@ -315,7 +317,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
315
317
  after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
316
318
  },
317
319
  });
318
- } }, h("div", { class: classObj, style: styleObj }, rowContent), !this.hiddenSubmitButton ? (h(FButton, { buttonType: "submit", label: __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.CONFIRM), wrapperClass: "form__submit" })) : null));
320
+ } }, h("div", { class: classObj, style: styleObj }, rowContent), h("div", { class: "input-panel__commands" }, !this.hiddenSubmitButton ? (h(FButton, { buttonType: "submit", label: __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.CONFIRM), wrapperClass: "form__submit" })) : null, this.inputPanelCommands)));
319
321
  }, _KupInputPanel_renderCell = function _KupInputPanel_renderCell(cell, row, column) {
320
322
  if (!cell) {
321
323
  return;
@@ -546,10 +548,20 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
546
548
  fieldCell.cell.data = Object.assign(Object.assign({}, fieldCell.cell.data), { customStyle: (fieldCell.cell.data.customStyle || '') +
547
549
  '.mdc-text-field {height: unset !important;}' });
548
550
  return (h("div", { style: styleObj }, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderCell).call(this, fieldCell.cell, cells.row, fieldCell.column)));
551
+ }, _KupInputPanel_mapCommands = function _KupInputPanel_mapCommands() {
552
+ this.inputPanelCommands = this.data.setup.commands
553
+ .map((commandObj) => Object.entries(commandObj === null || commandObj === void 0 ? void 0 : commandObj.cells).map(([id, cell]) => {
554
+ const buttonCell = Object.assign(Object.assign({}, cell), { data: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_BTNAdapter).call(this, null, null, cell.value, cell, id) });
555
+ return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderButton).call(this, buttonCell, id);
556
+ }))
557
+ .flat();
549
558
  }, _KupInputPanel_mapCells = function _KupInputPanel_mapCells(data) {
550
- var _a, _b;
551
- const layout = (_a = data === null || data === void 0 ? void 0 : data.rows[0]) === null || _a === void 0 ? void 0 : _a.layout;
552
- const inpuPanelCells = ((_b = data === null || data === void 0 ? void 0 : data.rows) === null || _b === void 0 ? void 0 : _b.length)
559
+ var _a, _b, _c, _d;
560
+ if ((_b = (_a = data.setup) === null || _a === void 0 ? void 0 : _a.commands) === null || _b === void 0 ? void 0 : _b.length) {
561
+ __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapCommands).call(this);
562
+ }
563
+ const layout = (_c = data === null || data === void 0 ? void 0 : data.rows[0]) === null || _c === void 0 ? void 0 : _c.layout;
564
+ const inpuPanelCells = ((_d = data === null || data === void 0 ? void 0 : data.rows) === null || _d === void 0 ? void 0 : _d.length)
553
565
  ? data.rows.reduce((inpuPanelCells, row) => {
554
566
  const cells = data.columns
555
567
  .filter((column) => column.visible)