@sme.up/ketchup 11.0.0-SNAPSHOT-20241120170010 → 11.0.0-SNAPSHOT-20241125085638

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.
Files changed (33) hide show
  1. package/dist/cjs/f-text-field-37b62800.js.map +1 -1
  2. package/dist/cjs/kup-autocomplete_28.cjs.entry.js +1 -1
  3. package/dist/cjs/kup-autocomplete_28.cjs.entry.js.map +1 -1
  4. package/dist/cjs/kup-input-panel.cjs.entry.js +46 -5
  5. package/dist/cjs/kup-input-panel.cjs.entry.js.map +1 -1
  6. package/dist/collection/assets/input-panel-tooltip.js +90 -0
  7. package/dist/collection/components/kup-card/kup-card.css +5 -1
  8. package/dist/collection/components/kup-input-panel/kup-input-panel-declarations.js.map +1 -1
  9. package/dist/collection/components/kup-input-panel/kup-input-panel.js +67 -5
  10. package/dist/collection/components/kup-input-panel/kup-input-panel.js.map +1 -1
  11. package/dist/collection/f-components/f-text-field/f-text-field.js.map +1 -1
  12. package/dist/components/kup-autocomplete2.js +1 -1
  13. package/dist/components/kup-autocomplete2.js.map +1 -1
  14. package/dist/components/kup-input-panel.js +47 -6
  15. package/dist/components/kup-input-panel.js.map +1 -1
  16. package/dist/esm/f-text-field-5321c07c.js.map +1 -1
  17. package/dist/esm/kup-autocomplete_28.entry.js +1 -1
  18. package/dist/esm/kup-autocomplete_28.entry.js.map +1 -1
  19. package/dist/esm/kup-input-panel.entry.js +47 -6
  20. package/dist/esm/kup-input-panel.entry.js.map +1 -1
  21. package/dist/ketchup/ketchup.esm.js +1 -1
  22. package/dist/ketchup/p-02f7124b.entry.js +2 -0
  23. package/dist/ketchup/p-02f7124b.entry.js.map +1 -0
  24. package/dist/ketchup/p-1b0a93c3.entry.js +9 -0
  25. package/dist/ketchup/{p-0449cbb8.entry.js.map → p-1b0a93c3.entry.js.map} +1 -1
  26. package/dist/ketchup/p-22f4d21b.js.map +1 -1
  27. package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +10 -1
  28. package/dist/types/components/kup-input-panel/kup-input-panel.d.ts +5 -1
  29. package/dist/types/components.d.ts +7 -2
  30. package/package.json +1 -1
  31. package/dist/ketchup/p-0449cbb8.entry.js +0 -9
  32. package/dist/ketchup/p-343243fd.entry.js +0 -2
  33. package/dist/ketchup/p-343243fd.entry.js.map +0 -1
@@ -0,0 +1,90 @@
1
+ const tooltip = document.getElementById('with-tooltip');
2
+
3
+ const tooltipShow = (e) => {
4
+ const anchor = e.detail.details.anchor;
5
+ const cell = e.detail.details.cell;
6
+ const column = e.detail.details.column;
7
+
8
+ kupManager.tooltip.show(anchor, {
9
+ data: {
10
+ text: [`Tooltip: ${column.name}`],
11
+ },
12
+ });
13
+ };
14
+
15
+ tooltip.addEventListener('kup-inputpanel-contextmenu', tooltipShow);
16
+
17
+ const tooltipData = {
18
+ columns: [
19
+ {
20
+ name: 'NAM',
21
+ title: 'Name',
22
+ visible: true,
23
+ },
24
+ {
25
+ editable: false,
26
+ name: 'INP1',
27
+ title: 'Field1',
28
+ visible: true,
29
+ isEditable: false,
30
+ },
31
+ {
32
+ editable: false,
33
+ name: 'INP2',
34
+ title: 'Field2',
35
+ visible: true,
36
+ isEditable: false,
37
+ },
38
+ ],
39
+ rows: [
40
+ {
41
+ cells: {
42
+ NAM: {
43
+ value: 'Giovanni',
44
+ obj: { t: '', p: '', k: '' },
45
+ editable: true,
46
+ mandatory: true,
47
+ shape: 'ITX',
48
+ },
49
+ INP1: {
50
+ value: '',
51
+ obj: { t: 'D8', p: '', k: '' },
52
+ editable: true,
53
+ mandatory: true,
54
+ },
55
+ INP2: {
56
+ value: '',
57
+ obj: { t: 'NR', p: '' },
58
+ editable: false,
59
+ mandatory: true,
60
+ },
61
+ },
62
+ layout: {
63
+ type: 'SmeupDataLayout',
64
+ horizontal: false,
65
+ sections: [
66
+ {
67
+ content: [
68
+ {
69
+ id: 'NAM',
70
+ },
71
+ {
72
+ id: 'INP1',
73
+ },
74
+ {
75
+ id: 'INP2',
76
+ },
77
+ ],
78
+ sections: [],
79
+ horizontal: true,
80
+ gridCols: 3,
81
+ gridRows: 1,
82
+ gap: 2,
83
+ },
84
+ ],
85
+ },
86
+ },
87
+ ],
88
+ };
89
+
90
+ tooltip.data = tooltipData;
@@ -3136,7 +3136,6 @@
3136
3136
  color: var(--kup-text-color);
3137
3137
  display: block;
3138
3138
  font-size: var(--kup-font-size);
3139
- max-width: 40vw;
3140
3139
  outline: none;
3141
3140
  }
3142
3141
  .standard-layout-15 .section-1 {
@@ -3283,6 +3282,11 @@
3283
3282
  margin: 0 0 0.5em 0;
3284
3283
  }
3285
3284
 
3285
+ @media screen and (min-width: 678px) {
3286
+ .standard-layout-15 {
3287
+ max-width: 40vw;
3288
+ }
3289
+ }
3286
3290
  .standard-layout-16 {
3287
3291
  background: var(--kup-layer-1);
3288
3292
  box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);
@@ -1 +1 @@
1
- {"version":3,"file":"kup-input-panel-declarations.js","sourceRoot":"","sources":["../../../src/components/kup-input-panel/kup-input-panel-declarations.ts"],"names":[],"mappings":"AAkEA,MAAM,CAAN,IAAY,8BAEX;AAFD,WAAY,8BAA8B;IACtC,6CAAW,CAAA;AACf,CAAC,EAFW,8BAA8B,KAA9B,8BAA8B,QAEzC;AAuFD,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,oEAA8C,CAAA;IAC9C,8DAAwC,CAAA;IACxC,mHAA6F,CAAA;IAC7F,4EAAsD,CAAA;IACtD,sFAAgE,CAAA;AACpE,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B","sourcesContent":["import { GenericObject } from '../../components';\nimport {\n KupDataCell,\n KupDataColumn,\n KupDataCommand,\n} from '../../managers/kup-data/kup-data-declarations';\nimport { KupObj } from '../../managers/kup-objects/kup-objects-declarations';\n\nexport interface KupInputPanelSubmit {\n value: KupInputPanelSubmitValue;\n cell?: string;\n}\nexport interface KupInputPanelSubmitValue {\n after: KupInputPanelData;\n before: KupInputPanelData;\n}\n\nexport interface KupInputPanelData {\n columns?: KupDataColumn[];\n rows?: KupInputPanelRow[];\n actions?: KupInputPanelAction[];\n setup?: {\n commands?: Array<KupDataCommand>;\n };\n}\n\nexport interface KupInputPanelAction {\n type?: string;\n fun?: string;\n}\n\nexport interface KupInputPanelColumn {\n name: string;\n title: string;\n visible?: boolean;\n}\n\nexport interface KupInputPanelRow {\n cells?: KupInputPanelRowCells;\n layout?: KupInputPanelLayout;\n}\n\nexport interface KupInputPanelRowCells {\n [key: string]: KupInputPanelCell;\n}\n\nexport interface KupInputPanelCell extends KupDataCell {\n options?: GenericObject | GenericObject[];\n editable?: boolean;\n mandatory?: boolean;\n inputSettings?: GenericObject;\n fun?: string;\n}\n\nexport interface KupInputPanelCellOptions {\n id: string;\n label: string;\n}\n\nexport interface KupInputPanelLayout {\n horizontal?: boolean;\n absolute?: boolean;\n sections?: KupInputPanelLayoutSection[];\n sectionsType?: KupInputPanelLayoutSectionType;\n}\n\nexport enum KupInputPanelLayoutSectionType {\n TAB = 'tab',\n}\n\nexport interface KupInputPanelLayoutSection {\n id?: string;\n title?: string;\n icon?: string;\n content?: KupInputPanelLayoutField[];\n sections?: KupInputPanelLayoutSection[];\n dim?: string;\n horizontal?: boolean;\n gridCols?: number;\n gridRows?: number;\n // Gap is in rem\n gap?: number;\n sectionsType?: KupInputPanelLayoutSectionType;\n // absolute Attributes\n absoluteColumn?: number;\n absoluteWidth?: number;\n absoluteRow?: number;\n absoluteHeight?: number;\n}\n\nexport interface KupInputPanelLayoutField {\n id: string;\n // Span is referred to start\n colSpan?: number;\n colStart?: number;\n colEnd?: number;\n // Span is referred to start\n rowSpan?: number;\n rowStart?: number;\n rowEnd?: number;\n // absolute Attributes\n absoluteColumn?: number;\n absoluteRow?: number;\n absoluteLength?: number;\n}\n\nexport type DataAdapterFn = (\n options: GenericObject,\n fieldLabel: string,\n currentValue: string,\n cell?: KupInputPanelCell,\n id?: string\n) => Object;\n\nexport type InputPanelCells = {\n cells: { cell: KupDataCell; column: KupDataColumn }[];\n row?: KupInputPanelRow;\n};\n\nexport type InputPanelEvent = {\n state: { cell: KupDataCell; column: KupDataColumn }[];\n data: {\n field: string;\n value: number | string | object;\n };\n};\n\nexport type InputPanelOptionsHandler = (\n fun: string,\n inputValue: string,\n currentState: KupInputPanelData,\n cellId: string\n) => Promise<GenericObject>;\n\nexport type InputPanelCheckValidObjCallback = (event: {\n obj: KupObj;\n currentState: KupInputPanelData;\n fun?: string;\n}) => Promise<ValidCheckObjResponse>;\n\nexport interface ValidCheckObjResponse {\n valid: boolean;\n}\n\nexport type InputPanelButtonClickHandler = (event: {\n fun: string;\n cellId: string;\n currentState: KupInputPanelData;\n}) => void;\n\nexport type InputPanelCheckValidValueCallback = (\n currentState: KupInputPanelSubmitValue,\n cellId: string\n) => void;\n\nexport enum KupInputPanelProps {\n customStyle = 'Custom style of the component.',\n data = 'Actual data of the input panel.',\n hiddenSubmitButton = 'Creates a hidden submit button in order to submit the form with enter.',\n submitCb = 'Sets the callback function on submit form',\n optionsHandler = 'Sets the callback function to recieve options',\n}\n"]}
1
+ {"version":3,"file":"kup-input-panel-declarations.js","sourceRoot":"","sources":["../../../src/components/kup-input-panel/kup-input-panel-declarations.ts"],"names":[],"mappings":"AAkEA,MAAM,CAAN,IAAY,8BAEX;AAFD,WAAY,8BAA8B;IACtC,6CAAW,CAAA;AACf,CAAC,EAFW,8BAA8B,KAA9B,8BAA8B,QAEzC;AAuFD,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,oEAA8C,CAAA;IAC9C,8DAAwC,CAAA;IACxC,mHAA6F,CAAA;IAC7F,4EAAsD,CAAA;IACtD,sFAAgE,CAAA;AACpE,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B","sourcesContent":["import { GenericObject, KupEventPayload } from '../../components';\nimport {\n KupDataCell,\n KupDataColumn,\n KupDataCommand,\n} from '../../managers/kup-data/kup-data-declarations';\nimport { KupObj } from '../../managers/kup-objects/kup-objects-declarations';\n\nexport interface KupInputPanelSubmit {\n value: KupInputPanelSubmitValue;\n cell?: string;\n}\nexport interface KupInputPanelSubmitValue {\n after: KupInputPanelData;\n before: KupInputPanelData;\n}\n\nexport interface KupInputPanelData {\n columns?: KupDataColumn[];\n rows?: KupInputPanelRow[];\n actions?: KupInputPanelAction[];\n setup?: {\n commands?: Array<KupDataCommand>;\n };\n}\n\nexport interface KupInputPanelAction {\n type?: string;\n fun?: string;\n}\n\nexport interface KupInputPanelColumn {\n name: string;\n title: string;\n visible?: boolean;\n}\n\nexport interface KupInputPanelRow {\n cells?: KupInputPanelRowCells;\n layout?: KupInputPanelLayout;\n}\n\nexport interface KupInputPanelRowCells {\n [key: string]: KupInputPanelCell;\n}\n\nexport interface KupInputPanelCell extends KupDataCell {\n options?: GenericObject | GenericObject[];\n editable?: boolean;\n mandatory?: boolean;\n inputSettings?: GenericObject;\n fun?: string;\n}\n\nexport interface KupInputPanelCellOptions {\n id: string;\n label: string;\n}\n\nexport interface KupInputPanelLayout {\n horizontal?: boolean;\n absolute?: boolean;\n sections?: KupInputPanelLayoutSection[];\n sectionsType?: KupInputPanelLayoutSectionType;\n}\n\nexport enum KupInputPanelLayoutSectionType {\n TAB = 'tab',\n}\n\nexport interface KupInputPanelLayoutSection {\n id?: string;\n title?: string;\n icon?: string;\n content?: KupInputPanelLayoutField[];\n sections?: KupInputPanelLayoutSection[];\n dim?: string;\n horizontal?: boolean;\n gridCols?: number;\n gridRows?: number;\n // Gap is in rem\n gap?: number;\n sectionsType?: KupInputPanelLayoutSectionType;\n // absolute Attributes\n absoluteColumn?: number;\n absoluteWidth?: number;\n absoluteRow?: number;\n absoluteHeight?: number;\n}\n\nexport interface KupInputPanelLayoutField {\n id: string;\n // Span is referred to start\n colSpan?: number;\n colStart?: number;\n colEnd?: number;\n // Span is referred to start\n rowSpan?: number;\n rowStart?: number;\n rowEnd?: number;\n // absolute Attributes\n absoluteColumn?: number;\n absoluteRow?: number;\n absoluteLength?: number;\n}\n\nexport type DataAdapterFn = (\n options: GenericObject,\n fieldLabel: string,\n currentValue: string,\n cell?: KupInputPanelCell,\n id?: string\n) => Object;\n\nexport type InputPanelCells = {\n cells: { cell: KupDataCell; column: KupDataColumn }[];\n row?: KupInputPanelRow;\n};\n\nexport type InputPanelEvent = {\n state: { cell: KupDataCell; column: KupDataColumn }[];\n data: {\n field: string;\n value: number | string | object;\n };\n};\n\nexport type InputPanelOptionsHandler = (\n fun: string,\n inputValue: string,\n currentState: KupInputPanelData,\n cellId: string\n) => Promise<GenericObject>;\n\nexport type InputPanelCheckValidObjCallback = (event: {\n obj: KupObj;\n currentState: KupInputPanelData;\n fun?: string;\n}) => Promise<ValidCheckObjResponse>;\n\nexport interface ValidCheckObjResponse {\n valid: boolean;\n}\n\nexport type InputPanelButtonClickHandler = (event: {\n fun: string;\n cellId: string;\n currentState: KupInputPanelData;\n}) => void;\n\nexport type InputPanelCheckValidValueCallback = (\n currentState: KupInputPanelSubmitValue,\n cellId: string\n) => void;\n\nexport enum KupInputPanelProps {\n customStyle = 'Custom style of the component.',\n data = 'Actual data of the input panel.',\n hiddenSubmitButton = 'Creates a hidden submit button in order to submit the form with enter.',\n submitCb = 'Sets the callback function on submit form',\n optionsHandler = 'Sets the callback function to recieve options',\n}\n\nexport interface KupInputPanelEventHandlerDetails {\n anchor: HTMLElement;\n cell: KupDataCell;\n column: KupDataColumn;\n originalEvent: PointerEvent;\n}\n\nexport interface KupInputPanelClickEventPayload extends KupEventPayload {\n details: KupInputPanelEventHandlerDetails;\n}\n"]}
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  }
27
27
  return t;
28
28
  };
29
- 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;
29
+ var _KupInputPanel_instances, _KupInputPanel_kupManager, _KupInputPanel_formRef, _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, _KupInputPanel_getEventDetails, _KupInputPanel_contextMenuHandler, _KupInputPanel_didLoadInteractables;
30
30
  import { Host, forceUpdate, h, } from "@stencil/core";
31
31
  import { FButton } from "../../f-components/f-button/f-button";
32
32
  import { FCell } from "../../f-components/f-cell/f-cell";
@@ -42,6 +42,7 @@ import { componentWrapperId } from "../../variables/GenericVariables";
42
42
  import { KupInputPanelLayoutSectionType, KupInputPanelProps, } from "./kup-input-panel-declarations";
43
43
  import { getAbsoluteHeight, getAbsoluteLeft, getAbsoluteTop, getAbsoluteWidth, ROW_HEIGHT, } from "./kup-input-panel-utils";
44
44
  import { FTypography } from "../../f-components/f-typography/f-typography";
45
+ import { KupPointerEventTypes } from "../../managers/kup-interact/kup-interact-declarations";
45
46
  const dom = document.documentElement;
46
47
  export class KupInputPanel {
47
48
  constructor() {
@@ -52,6 +53,7 @@ export class KupInputPanel {
52
53
  /* I n t e r n a l V a r i a b l e s */
53
54
  /*-------------------------------------------------*/
54
55
  _KupInputPanel_kupManager.set(this, kupManagerInstance());
56
+ _KupInputPanel_formRef.set(this, void 0);
55
57
  _KupInputPanel_optionsAdapterMap.set(this, new Map([
56
58
  ['SmeupTreeNode', __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_treeOptionsNodeAdapter).bind(this)],
57
59
  ['SmeupDataTree', __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_dataTreeOptionsChildrenAdapter).bind(this)],
@@ -127,7 +129,9 @@ export class KupInputPanel {
127
129
  });
128
130
  __classPrivateFieldSet(this, _KupInputPanel_keysShortcut, [], "f");
129
131
  }
130
- __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapCells).call(this, this.data);
132
+ if (this.data) {
133
+ __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapCells).call(this, this.data);
134
+ }
131
135
  }
132
136
  //#endregion
133
137
  //#region PUBLIC METHODS
@@ -167,6 +171,7 @@ export class KupInputPanel {
167
171
  this.onDataChanged();
168
172
  }
169
173
  componentDidLoad() {
174
+ __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_didLoadInteractables).call(this);
170
175
  this.kupReady.emit({ comp: this, id: this.rootElement.id });
171
176
  __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").debug.logLoad(this, true);
172
177
  }
@@ -190,7 +195,7 @@ export class KupInputPanel {
190
195
  h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
191
196
  ]
192
197
  : this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
193
- return (h(Host, { key: '01de6cf7823ccbaf12cc55517b6778d20f354ba5' }, h("style", { key: '8e42db305a85e575f2e659c486554c6945007f20' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '2aa453d3e6f8b16bad2c435dc402aaddbf9a9565', id: componentWrapperId }, inputPanelContent)));
198
+ return (h(Host, { key: '0b29c3e2c24a83ef82f3d2c15a468e386a4b911a' }, h("style", { key: '11db937588ef8530336807aebe8d83046df0ba41' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'fbfd8854ee9e85f57676e46bd7abbb40f1aef21c', id: componentWrapperId }, inputPanelContent)));
194
199
  }
195
200
  disconnectedCallback() {
196
201
  __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
@@ -457,6 +462,27 @@ export class KupInputPanel {
457
462
  }
458
463
  }
459
464
  }
465
+ }, {
466
+ "method": "kupDataTableContextMenu",
467
+ "name": "kup-inputpanel-contextmenu",
468
+ "bubbles": true,
469
+ "cancelable": false,
470
+ "composed": true,
471
+ "docs": {
472
+ "tags": [],
473
+ "text": "Generic right click event on input panel."
474
+ },
475
+ "complexType": {
476
+ "original": "KupInputPanelClickEventPayload",
477
+ "resolved": "KupInputPanelClickEventPayload",
478
+ "references": {
479
+ "KupInputPanelClickEventPayload": {
480
+ "location": "import",
481
+ "path": "./kup-input-panel-declarations",
482
+ "id": "src/components/kup-input-panel/kup-input-panel-declarations.ts::KupInputPanelClickEventPayload"
483
+ }
484
+ }
485
+ }
460
486
  }];
461
487
  }
462
488
  static get methods() {
@@ -549,7 +575,7 @@ export class KupInputPanel {
549
575
  }];
550
576
  }
551
577
  }
552
- _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = new WeakMap(), _KupInputPanel_originalData = new WeakMap(), _KupInputPanel_eventNames = new WeakMap(), _KupInputPanel_eventBlurNames = new WeakMap(), _KupInputPanel_listeners = new WeakMap(), _KupInputPanel_cellTypeComponents = new WeakMap(), _KupInputPanel_cellCustomRender = new WeakMap(), _KupInputPanel_sectionRenderMap = new WeakMap(), _KupInputPanel_keysShortcut = new WeakMap(), _KupInputPanel_instances = new WeakSet(), _KupInputPanel_getCell = function _KupInputPanel_getCell(id) {
578
+ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(), _KupInputPanel_optionsAdapterMap = new WeakMap(), _KupInputPanel_originalData = new WeakMap(), _KupInputPanel_eventNames = new WeakMap(), _KupInputPanel_eventBlurNames = new WeakMap(), _KupInputPanel_listeners = new WeakMap(), _KupInputPanel_cellTypeComponents = new WeakMap(), _KupInputPanel_cellCustomRender = new WeakMap(), _KupInputPanel_sectionRenderMap = new WeakMap(), _KupInputPanel_keysShortcut = new WeakMap(), _KupInputPanel_instances = new WeakSet(), _KupInputPanel_getCell = function _KupInputPanel_getCell(id) {
553
579
  return this.inputPanelCells.reduce((cell, { cells }) => {
554
580
  if (!cell) {
555
581
  return cells.find(({ column }) => column.name === id).cell;
@@ -601,7 +627,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
601
627
  'input-panel--absolute': layout === null || layout === void 0 ? void 0 : layout.absolute,
602
628
  };
603
629
  // We create a form for each row in data
604
- return (h("form", { name: this.rootElement.id, id: this.rootElement.id, class: { 'input-panel-form': true }, onSubmit: (e) => {
630
+ return (h("form", { name: this.rootElement.id, id: this.rootElement.id, class: { 'input-panel-form': true }, ref: (el) => (__classPrivateFieldSet(this, _KupInputPanel_formRef, el, "f")), onSubmit: (e) => {
605
631
  e.preventDefault();
606
632
  this.submitCb({
607
633
  value: {
@@ -609,6 +635,8 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
609
635
  after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
610
636
  },
611
637
  });
638
+ }, onContextMenu: (e) => {
639
+ e.preventDefault();
612
640
  } }, h("div", { class: classObj, style: styleObj }, rowContent), h("div", { class: "input-panel__commands" }, h(FButton, { buttonType: "submit", label: __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.CONFIRM), wrapperClass: "form__submit", invisible: this.hiddenSubmitButton }), this.inputPanelCommands)));
613
641
  }, _KupInputPanel_renderCell = function _KupInputPanel_renderCell(cell, row, column) {
614
642
  if (!cell) {
@@ -1411,5 +1439,39 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
1411
1439
  },
1412
1440
  cell: id,
1413
1441
  });
1442
+ }, _KupInputPanel_getEventDetails = function _KupInputPanel_getEventDetails(path, originalEvent) {
1443
+ const fcell = path.find((p) => { var _a; return (_a = p.classList) === null || _a === void 0 ? void 0 : _a.contains('f-cell'); });
1444
+ if (fcell == null) {
1445
+ return;
1446
+ }
1447
+ const props = fcell['kup-get-cell-props']();
1448
+ const columnName = props.column.name;
1449
+ let anchor = fcell;
1450
+ let cell = this.data.rows[0].cells[columnName];
1451
+ let column = this.data.columns.find((c) => c.name == columnName);
1452
+ return {
1453
+ anchor,
1454
+ cell,
1455
+ column,
1456
+ originalEvent,
1457
+ };
1458
+ }, _KupInputPanel_contextMenuHandler = function _KupInputPanel_contextMenuHandler(e) {
1459
+ const eventPath = __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").getEventPath(e.target, this.rootElement);
1460
+ return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getEventDetails).call(this, eventPath, e);
1461
+ }, _KupInputPanel_didLoadInteractables = function _KupInputPanel_didLoadInteractables() {
1462
+ __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").interact.managedElements.add(__classPrivateFieldGet(this, _KupInputPanel_formRef, "f"));
1463
+ const tapCb = (e) => {
1464
+ if (e.button == 2) {
1465
+ const details = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_contextMenuHandler).call(this, e);
1466
+ if (details) {
1467
+ this.kupDataTableContextMenu.emit({
1468
+ comp: this,
1469
+ id: this.rootElement.id,
1470
+ details,
1471
+ });
1472
+ }
1473
+ }
1474
+ };
1475
+ __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").interact.on(__classPrivateFieldGet(this, _KupInputPanel_formRef, "f"), KupPointerEventTypes.TAP, tapCb);
1414
1476
  };
1415
1477
  //# sourceMappingURL=kup-input-panel.js.map