@sme.up/ketchup 11.0.0-SNAPSHOT-20241126095140 → 11.0.0-SNAPSHOT-20241126132827

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.
@@ -16,7 +16,25 @@ var KupInputPanelProps;
16
16
  KupInputPanelProps["submitCb"] = "Sets the callback function on submit form";
17
17
  KupInputPanelProps["optionsHandler"] = "Sets the callback function to recieve options";
18
18
  KupInputPanelProps["buttonPosition"] = "Manage the position of the buttons related to the input panel content. It is an enumeration";
19
+ KupInputPanelProps["inputPanelPosition"] = "Manage the global layout of the input panel fields. The default is COLUMNS.";
19
20
  })(KupInputPanelProps || (KupInputPanelProps = {}));
21
+ var KupInputPanelPosition;
22
+ (function (KupInputPanelPosition) {
23
+ KupInputPanelPosition["COLUMNS"] = "COLUMNS";
24
+ KupInputPanelPosition["INLINE"] = "INLINE";
25
+ KupInputPanelPosition["STRETCHED"] = "STRETCHED";
26
+ KupInputPanelPosition["UPINLINE"] = "UPINLINE";
27
+ KupInputPanelPosition["UPCOLUMNS"] = "UPCOLUMNS";
28
+ KupInputPanelPosition["WATERMARK"] = "WATERMARK";
29
+ })(KupInputPanelPosition || (KupInputPanelPosition = {}));
30
+ var kupInputPanelButtonsPositions;
31
+ (function (kupInputPanelButtonsPositions) {
32
+ kupInputPanelButtonsPositions["CENTER"] = "CENTER";
33
+ kupInputPanelButtonsPositions["LEFT"] = "LEFT";
34
+ kupInputPanelButtonsPositions["BOTTOM"] = "BOTTOM";
35
+ kupInputPanelButtonsPositions["RIGHT"] = "RIGHT";
36
+ kupInputPanelButtonsPositions["TOP"] = "TOP";
37
+ })(kupInputPanelButtonsPositions || (kupInputPanelButtonsPositions = {}));
20
38
 
21
39
  const CHAR_WIDTH = 12;
22
40
  const ROW_HEIGHT = 22;
@@ -51,7 +69,7 @@ const getAbsoluteLeft = (col) => {
51
69
  return col * CHAR_WIDTH;
52
70
  };
53
71
 
54
- 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-fcell-width:fit-content;--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);--kup_input_panel_padding--inline:var(--kup-input-panel-padding--inline, 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:1rem}:host .input-panel__commands{display:flex;gap:2rem}:host .input-panel__commands.input-panel__commands--right{flex-shrink:0;overflow:hidden}:host .input-panel--inline{flex:1;overflow-x:auto;white-space:nowrap;padding:var(--kup_input_panel_padding--inline)}: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;min-width:0}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel__section-inline{display:inline-block;width:max-content}: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{justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}:host .input-panel-form--inline{display:flex;align-items:end;gap:1rem}";
72
+ 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-fcell-width:fit-content;--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);--kup_input_panel_padding--inline:var(--kup-input-panel-padding--inline, 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:1rem}:host .input-panel__commands{display:flex;gap:1rem}:host .input-panel__commands.input-panel__commands--right{flex-shrink:0;overflow:hidden}:host .input-panel--inline{flex:1;overflow-x:auto;white-space:nowrap;padding:var(--kup_input_panel_padding--inline)}: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;min-width:0}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel__section-inline{display:inline-block;width:max-content}: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{justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}:host .input-panel-form--inline{display:flex;align-items:end;gap:1rem}";
55
73
  const KupInputPanelStyle0 = kupInputPanelCss;
56
74
 
57
75
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
@@ -142,16 +160,17 @@ const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel ext
142
160
  [KupInputPanelLayoutSectionType.TAB, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderSectionTab).bind(this)],
143
161
  ]));
144
162
  _KupInputPanel_keysShortcut.set(this, []);
163
+ this.buttonPosition = kupInputPanelButtonsPositions.BOTTOM;
145
164
  this.customStyle = '';
165
+ this.dashboardMode = false;
146
166
  this.data = null;
147
167
  this.hiddenSubmitButton = false;
148
- this.buttonPosition = undefined;
168
+ this.inputPanelPosition = KupInputPanelPosition.COLUMNS;
149
169
  this.submitCb = null;
150
170
  this.optionsHandler = null;
151
171
  this.customButtonClickHandler = null;
152
172
  this.checkValidObjCallback = null;
153
173
  this.checkValidValueCallback = null;
154
- this.dashboardMode = false;
155
174
  this.inputPanelCells = [];
156
175
  this.inputPanelCommands = [];
157
176
  this.tabSelected = null;
@@ -241,7 +260,7 @@ const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel ext
241
260
  h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
242
261
  ]
243
262
  : this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
244
- return (h(Host, { key: '9bd509478c583014f8d068fdfe66e41dce11e414' }, h("style", { key: '861e0d64ed51632c7a753c0d3d21e5369e1b28a2' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '1489d6a2efd99950da48bb5cd9422a412ae20b6e', id: componentWrapperId }, inputPanelContent)));
263
+ return (h(Host, { key: '0281ff8a6e4090655b6b8edecd3e33d5be8e0dd7' }, h("style", { key: '1b8000a1c0cc8e76748c8c58d699a0977ab69f6f' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '4955c59f186cee73f5e438224fbff4a8d087d3e1', id: componentWrapperId }, inputPanelContent)));
245
264
  }
246
265
  disconnectedCallback() {
247
266
  __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
@@ -253,16 +272,17 @@ const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel ext
253
272
  }; }
254
273
  static get style() { return KupInputPanelStyle0; }
255
274
  }, [1, "kup-input-panel", {
275
+ "buttonPosition": [1, "button-position"],
256
276
  "customStyle": [1, "custom-style"],
277
+ "dashboardMode": [4, "dashboard-mode"],
257
278
  "data": [16],
258
279
  "hiddenSubmitButton": [4, "hidden-submit-button"],
259
- "buttonPosition": [1, "button-position"],
280
+ "inputPanelPosition": [1, "input-panel-position"],
260
281
  "submitCb": [16],
261
282
  "optionsHandler": [16],
262
283
  "customButtonClickHandler": [16],
263
284
  "checkValidObjCallback": [16],
264
285
  "checkValidValueCallback": [16],
265
- "dashboardMode": [4, "dashboard-mode"],
266
286
  "inputPanelCells": [32],
267
287
  "inputPanelCommands": [32],
268
288
  "tabSelected": [32],
@@ -298,6 +318,9 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
298
318
  if (!layout.sectionsType) {
299
319
  const hasDim = layout.sections.some((sec) => sec.dim);
300
320
  styleObj.display = 'grid';
321
+ if (this.inputPanelPosition == 'INLINE') {
322
+ styleObj.display = '';
323
+ }
301
324
  if (layout.horizontal) {
302
325
  styleObj.gridTemplateColumns = hasDim
303
326
  ? layout.sections
@@ -320,13 +343,13 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
320
343
  }
321
344
  const inputPanelClass = {
322
345
  'input-panel-form': true,
323
- 'input-panel-form--inline': this.buttonPosition == 'RIGHT',
346
+ 'input-panel-form--inline': this.buttonPosition == kupInputPanelButtonsPositions.RIGHT,
324
347
  };
325
348
  const classObj = {
326
349
  'input-panel': true,
327
350
  'input-panel--column': !horizontal,
328
351
  'input-panel--absolute': layout === null || layout === void 0 ? void 0 : layout.absolute,
329
- 'input-panel--inline': this.buttonPosition == 'RIGHT',
352
+ 'input-panel--inline': this.inputPanelPosition == KupInputPanelPosition.INLINE,
330
353
  };
331
354
  const commandsClass = {
332
355
  'input-panel__commands': true,
@@ -409,12 +432,12 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
409
432
  : layout.sections.map((section) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderSection).call(this, inputPanelCell, section, false));
410
433
  }, _KupInputPanel_renderAbsoluteLayout = function _KupInputPanel_renderAbsoluteLayout(inputPanelCell, layout) {
411
434
  return layout.sections.map((section) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderAbsoluteSection).call(this, inputPanelCell, section));
412
- }, _KupInputPanel_renderSection = function _KupInputPanel_renderSection(cells, section, customLabelRender = false, styleObj = {}, layout) {
435
+ }, _KupInputPanel_renderSection = function _KupInputPanel_renderSection(cells, section, customLabelRender = false, styleObj = {}) {
413
436
  var _a, _b;
414
437
  const classObj = {
415
438
  'input-panel__section': !section.horizontal,
416
439
  'input-panel__horizontal-section': section.horizontal,
417
- 'input-panel__section-inline': layout === null || layout === void 0 ? void 0 : layout.horizontal,
440
+ 'input-panel__section-inline': this.inputPanelPosition == 'INLINE',
418
441
  };
419
442
  styleObj.gap = +section.gap > 0 ? `${section.gap}rem` : '1rem';
420
443
  let content = [];
@@ -575,8 +598,11 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
575
598
  else {
576
599
  length = field.absoluteLength;
577
600
  }
601
+ if (!field.absoluteHeight) {
602
+ field.absoluteHeight = 1;
603
+ }
578
604
  const width = `${getAbsoluteWidth(length)}px`;
579
- const height = `${getAbsoluteHeight(1)}px`;
605
+ const height = `${getAbsoluteHeight(field.absoluteHeight)}px`;
580
606
  const top = `${getAbsoluteTop(field.absoluteRow)}px`;
581
607
  const left = `${getAbsoluteLeft(field.absoluteColumn)}px`;
582
608
  const styleObj = {