@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.
- package/dist/cjs/f-text-field-37b62800.js.map +1 -1
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js +1 -1
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js.map +1 -1
- package/dist/cjs/kup-input-panel.cjs.entry.js +46 -5
- package/dist/cjs/kup-input-panel.cjs.entry.js.map +1 -1
- package/dist/collection/assets/input-panel-tooltip.js +90 -0
- package/dist/collection/components/kup-card/kup-card.css +5 -1
- package/dist/collection/components/kup-input-panel/kup-input-panel-declarations.js.map +1 -1
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +67 -5
- package/dist/collection/components/kup-input-panel/kup-input-panel.js.map +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field.js.map +1 -1
- package/dist/components/kup-autocomplete2.js +1 -1
- package/dist/components/kup-autocomplete2.js.map +1 -1
- package/dist/components/kup-input-panel.js +47 -6
- package/dist/components/kup-input-panel.js.map +1 -1
- package/dist/esm/f-text-field-5321c07c.js.map +1 -1
- package/dist/esm/kup-autocomplete_28.entry.js +1 -1
- package/dist/esm/kup-autocomplete_28.entry.js.map +1 -1
- package/dist/esm/kup-input-panel.entry.js +47 -6
- package/dist/esm/kup-input-panel.entry.js.map +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-02f7124b.entry.js +2 -0
- package/dist/ketchup/p-02f7124b.entry.js.map +1 -0
- package/dist/ketchup/p-1b0a93c3.entry.js +9 -0
- package/dist/ketchup/{p-0449cbb8.entry.js.map → p-1b0a93c3.entry.js.map} +1 -1
- package/dist/ketchup/p-22f4d21b.js.map +1 -1
- package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +10 -1
- package/dist/types/components/kup-input-panel/kup-input-panel.d.ts +5 -1
- package/dist/types/components.d.ts +7 -2
- package/package.json +1 -1
- package/dist/ketchup/p-0449cbb8.entry.js +0 -9
- package/dist/ketchup/p-343243fd.entry.js +0 -2
- package/dist/ketchup/p-343243fd.entry.js.map +0 -1
|
@@ -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-7466dc36.js';
|
|
3
3
|
import { F as FCell } from './f-cell-1ab3477e.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-e73386d8.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, N as KupPointerEventTypes, ak as CHKAdapter } from './kup-manager-e73386d8.js';
|
|
5
5
|
import { F as FTextFieldMDC } from './f-text-field-mdc-9a862967.js';
|
|
6
6
|
import { F as FTypography, a as FTypographyType } from './f-typography-ed1402a6.js';
|
|
7
7
|
import { c as componentWrapperId } from './GenericVariables-d8d0541e.js';
|
|
@@ -90,12 +90,13 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
90
90
|
}
|
|
91
91
|
return t;
|
|
92
92
|
};
|
|
93
|
-
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
|
+
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;
|
|
94
94
|
const dom = document.documentElement;
|
|
95
95
|
const KupInputPanel = class {
|
|
96
96
|
constructor(hostRef) {
|
|
97
97
|
registerInstance(this, hostRef);
|
|
98
98
|
this.kupReady = createEvent(this, "kup-input-panel-ready", 6);
|
|
99
|
+
this.kupDataTableContextMenu = createEvent(this, "kup-inputpanel-contextmenu", 6);
|
|
99
100
|
_KupInputPanel_instances.add(this);
|
|
100
101
|
//#endregion
|
|
101
102
|
//#region VARIABLES
|
|
@@ -103,6 +104,7 @@ const KupInputPanel = class {
|
|
|
103
104
|
/* I n t e r n a l V a r i a b l e s */
|
|
104
105
|
/*-------------------------------------------------*/
|
|
105
106
|
_KupInputPanel_kupManager.set(this, kupManagerInstance());
|
|
107
|
+
_KupInputPanel_formRef.set(this, void 0);
|
|
106
108
|
_KupInputPanel_optionsAdapterMap.set(this, new Map([
|
|
107
109
|
['SmeupTreeNode', __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_treeOptionsNodeAdapter).bind(this)],
|
|
108
110
|
['SmeupDataTree', __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_dataTreeOptionsChildrenAdapter).bind(this)],
|
|
@@ -178,7 +180,9 @@ const KupInputPanel = class {
|
|
|
178
180
|
});
|
|
179
181
|
__classPrivateFieldSet(this, _KupInputPanel_keysShortcut, [], "f");
|
|
180
182
|
}
|
|
181
|
-
|
|
183
|
+
if (this.data) {
|
|
184
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapCells).call(this, this.data);
|
|
185
|
+
}
|
|
182
186
|
}
|
|
183
187
|
//#endregion
|
|
184
188
|
//#region PUBLIC METHODS
|
|
@@ -218,6 +222,7 @@ const KupInputPanel = class {
|
|
|
218
222
|
this.onDataChanged();
|
|
219
223
|
}
|
|
220
224
|
componentDidLoad() {
|
|
225
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_didLoadInteractables).call(this);
|
|
221
226
|
this.kupReady.emit({ comp: this, id: this.rootElement.id });
|
|
222
227
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").debug.logLoad(this, true);
|
|
223
228
|
}
|
|
@@ -241,7 +246,7 @@ const KupInputPanel = class {
|
|
|
241
246
|
h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
|
|
242
247
|
]
|
|
243
248
|
: this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
|
|
244
|
-
return (h(Host, { key: '
|
|
249
|
+
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)));
|
|
245
250
|
}
|
|
246
251
|
disconnectedCallback() {
|
|
247
252
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
|
|
@@ -252,7 +257,7 @@ const KupInputPanel = class {
|
|
|
252
257
|
"data": ["onDataChanged"]
|
|
253
258
|
}; }
|
|
254
259
|
};
|
|
255
|
-
_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) {
|
|
260
|
+
_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) {
|
|
256
261
|
return this.inputPanelCells.reduce((cell, { cells }) => {
|
|
257
262
|
if (!cell) {
|
|
258
263
|
return cells.find(({ column }) => column.name === id).cell;
|
|
@@ -304,7 +309,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
304
309
|
'input-panel--absolute': layout === null || layout === void 0 ? void 0 : layout.absolute,
|
|
305
310
|
};
|
|
306
311
|
// We create a form for each row in data
|
|
307
|
-
return (h("form", { name: this.rootElement.id, id: this.rootElement.id, class: { 'input-panel-form': true }, onSubmit: (e) => {
|
|
312
|
+
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) => {
|
|
308
313
|
e.preventDefault();
|
|
309
314
|
this.submitCb({
|
|
310
315
|
value: {
|
|
@@ -312,6 +317,8 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
312
317
|
after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
|
|
313
318
|
},
|
|
314
319
|
});
|
|
320
|
+
}, onContextMenu: (e) => {
|
|
321
|
+
e.preventDefault();
|
|
315
322
|
} }, 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)));
|
|
316
323
|
}, _KupInputPanel_renderCell = function _KupInputPanel_renderCell(cell, row, column) {
|
|
317
324
|
if (!cell) {
|
|
@@ -1114,6 +1121,40 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
1114
1121
|
},
|
|
1115
1122
|
cell: id,
|
|
1116
1123
|
});
|
|
1124
|
+
}, _KupInputPanel_getEventDetails = function _KupInputPanel_getEventDetails(path, originalEvent) {
|
|
1125
|
+
const fcell = path.find((p) => { var _a; return (_a = p.classList) === null || _a === void 0 ? void 0 : _a.contains('f-cell'); });
|
|
1126
|
+
if (fcell == null) {
|
|
1127
|
+
return;
|
|
1128
|
+
}
|
|
1129
|
+
const props = fcell['kup-get-cell-props']();
|
|
1130
|
+
const columnName = props.column.name;
|
|
1131
|
+
let anchor = fcell;
|
|
1132
|
+
let cell = this.data.rows[0].cells[columnName];
|
|
1133
|
+
let column = this.data.columns.find((c) => c.name == columnName);
|
|
1134
|
+
return {
|
|
1135
|
+
anchor,
|
|
1136
|
+
cell,
|
|
1137
|
+
column,
|
|
1138
|
+
originalEvent,
|
|
1139
|
+
};
|
|
1140
|
+
}, _KupInputPanel_contextMenuHandler = function _KupInputPanel_contextMenuHandler(e) {
|
|
1141
|
+
const eventPath = __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").getEventPath(e.target, this.rootElement);
|
|
1142
|
+
return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getEventDetails).call(this, eventPath, e);
|
|
1143
|
+
}, _KupInputPanel_didLoadInteractables = function _KupInputPanel_didLoadInteractables() {
|
|
1144
|
+
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").interact.managedElements.add(__classPrivateFieldGet(this, _KupInputPanel_formRef, "f"));
|
|
1145
|
+
const tapCb = (e) => {
|
|
1146
|
+
if (e.button == 2) {
|
|
1147
|
+
const details = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_contextMenuHandler).call(this, e);
|
|
1148
|
+
if (details) {
|
|
1149
|
+
this.kupDataTableContextMenu.emit({
|
|
1150
|
+
comp: this,
|
|
1151
|
+
id: this.rootElement.id,
|
|
1152
|
+
details,
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
};
|
|
1157
|
+
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").interact.on(__classPrivateFieldGet(this, _KupInputPanel_formRef, "f"), KupPointerEventTypes.TAP, tapCb);
|
|
1117
1158
|
};
|
|
1118
1159
|
KupInputPanel.style = KupInputPanelStyle0;
|
|
1119
1160
|
|