@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.
- package/dist/cjs/kup-input-panel.cjs.entry.js +39 -19
- package/dist/cjs/kup-input-panel.cjs.entry.js.map +1 -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.e2e.js +67 -8
- package/dist/collection/components/kup-input-panel/kup-input-panel.e2e.js.map +1 -1
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +42 -21
- package/dist/collection/components/kup-input-panel/kup-input-panel.js.map +1 -1
- package/dist/components/kup-input-panel.js +40 -20
- package/dist/components/kup-input-panel.js.map +1 -1
- package/dist/esm/kup-input-panel.entry.js +40 -20
- package/dist/esm/kup-input-panel.entry.js.map +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-5e28d846.entry.js +2 -0
- package/dist/ketchup/p-5e28d846.entry.js.map +1 -0
- package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +8 -5
- package/package.json +1 -1
- package/dist/ketchup/p-88590f1c.entry.js +0 -2
- package/dist/ketchup/p-88590f1c.entry.js.map +0 -1
|
@@ -26,20 +26,21 @@ 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_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;
|
|
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;
|
|
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";
|
|
33
33
|
import { FCellShapes, FCellTypes, } from "../../f-components/f-cell/f-cell-declarations";
|
|
34
34
|
import { FTextFieldMDC } from "../../f-components/f-text-field/f-text-field-mdc";
|
|
35
|
+
import { KupDebugCategory } from "../../managers/kup-debug/kup-debug-declarations";
|
|
35
36
|
import { KupLanguageGeneric } from "../../managers/kup-language/kup-language-declarations";
|
|
36
37
|
import { kupManagerInstance, } from "../../managers/kup-manager/kup-manager";
|
|
38
|
+
import { KupComponentSizing, } from "../../types/GenericTypes";
|
|
39
|
+
import { CHIAdapter, CHKAdapter, CMBandACPAdapter, RADAdapter, SWTAdapter, } from "../../utils/cell-utils";
|
|
37
40
|
import { getProps, setProps } from "../../utils/utils";
|
|
38
41
|
import { componentWrapperId } from "../../variables/GenericVariables";
|
|
39
42
|
import { KupInputPanelLayoutSectionType, KupInputPanelProps, } from "./kup-input-panel-declarations";
|
|
40
|
-
import { KupDebugCategory } from "../../managers/kup-debug/kup-debug-declarations";
|
|
41
43
|
import { getAbsoluteHeight, getAbsoluteLeft, getAbsoluteTop, getAbsoluteWidth, } from "./kup-input-panel-utils";
|
|
42
|
-
import { CHIAdapter, CHKAdapter, CMBandACPAdapter, RADAdapter, SWTAdapter, } from "../../utils/cell-utils";
|
|
43
44
|
const dom = document.documentElement;
|
|
44
45
|
export class KupInputPanel {
|
|
45
46
|
constructor() {
|
|
@@ -187,7 +188,7 @@ export class KupInputPanel {
|
|
|
187
188
|
h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
|
|
188
189
|
]
|
|
189
190
|
: this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
|
|
190
|
-
return (h(Host, { key: '
|
|
191
|
+
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)));
|
|
191
192
|
}
|
|
192
193
|
disconnectedCallback() {
|
|
193
194
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
|
|
@@ -606,6 +607,10 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
606
607
|
return h(FCell, Object.assign({}, cellProps));
|
|
607
608
|
}, _KupInputPanel_renderButton = function _KupInputPanel_renderButton(cell, cellId) {
|
|
608
609
|
return (h(FButton, Object.assign({ icon: cell.icon, id: cellId }, cell.data, { wrapperClass: "form__submit" })));
|
|
610
|
+
}, _KupInputPanel_renderDropDownButton = function _KupInputPanel_renderDropDownButton(cell, data) {
|
|
611
|
+
return (h("kup-dropdown-button", Object.assign({}, cell.data, { sizing: KupComponentSizing.MEDIUM, label: cell.value, data: data, "onkup-dropdownbutton-itemclick": (e) => {
|
|
612
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, e.detail.node, e.detail.node.id);
|
|
613
|
+
} })));
|
|
609
614
|
}, _KupInputPanel_renderEditor = function _KupInputPanel_renderEditor(cell, cellId) {
|
|
610
615
|
const event = 'kup-editor-save';
|
|
611
616
|
const handler = (e) => {
|
|
@@ -815,10 +820,21 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
815
820
|
return (h("div", { style: styleObj }, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderCell).call(this, fieldCell.cell, cells.row, fieldCell.column)));
|
|
816
821
|
}, _KupInputPanel_mapCommands = function _KupInputPanel_mapCommands() {
|
|
817
822
|
this.inputPanelCommands = this.data.setup.commands
|
|
818
|
-
.map((commandObj) =>
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
823
|
+
.map((commandObj) => {
|
|
824
|
+
if ((commandObj === null || commandObj === void 0 ? void 0 : commandObj.children) && (commandObj === null || commandObj === void 0 ? void 0 : commandObj.children.length) > 0) {
|
|
825
|
+
const data = {
|
|
826
|
+
'kup-list': {
|
|
827
|
+
showIcons: true,
|
|
828
|
+
data: commandObj.children.map((c) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_commandAdapter).call(this, c)),
|
|
829
|
+
},
|
|
830
|
+
};
|
|
831
|
+
return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderDropDownButton).call(this, commandObj, data);
|
|
832
|
+
}
|
|
833
|
+
else {
|
|
834
|
+
const buttonCell = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_commandAdapter).call(this, commandObj);
|
|
835
|
+
return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderButton).call(this, buttonCell, commandObj.value);
|
|
836
|
+
}
|
|
837
|
+
})
|
|
822
838
|
.flat();
|
|
823
839
|
}, _KupInputPanel_mapCells = function _KupInputPanel_mapCells(data) {
|
|
824
840
|
var _a, _b, _c, _d;
|
|
@@ -980,19 +996,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
980
996
|
var _a, _b, _c, _d;
|
|
981
997
|
cell.data = cell.data || {};
|
|
982
998
|
cell.data.onClick = () => {
|
|
983
|
-
cell
|
|
984
|
-
? this.customButtonClickHandler({
|
|
985
|
-
fun: cell.fun,
|
|
986
|
-
cellId: id,
|
|
987
|
-
currentState: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
|
|
988
|
-
})
|
|
989
|
-
: this.submitCb({
|
|
990
|
-
value: {
|
|
991
|
-
before: Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_originalData, "f")),
|
|
992
|
-
after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
|
|
993
|
-
},
|
|
994
|
-
cell: id,
|
|
995
|
-
});
|
|
999
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, cell, id);
|
|
996
1000
|
};
|
|
997
1001
|
if (((_a = cell.data) === null || _a === void 0 ? void 0 : _a.keyShortcut) && !((_b = cell.data) === null || _b === void 0 ? void 0 : _b.disabled)) {
|
|
998
1002
|
__classPrivateFieldGet(this, _KupInputPanel_keysShortcut, "f").push((_c = cell.data) === null || _c === void 0 ? void 0 : _c.keyShortcut);
|
|
@@ -1235,6 +1239,9 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
1235
1239
|
selected: currentValue === cells[id].value,
|
|
1236
1240
|
};
|
|
1237
1241
|
});
|
|
1242
|
+
}, _KupInputPanel_commandAdapter = function _KupInputPanel_commandAdapter(cell) {
|
|
1243
|
+
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 });
|
|
1244
|
+
return buttonCell;
|
|
1238
1245
|
}, _KupInputPanel_getAutocompleteEventCallback = function _KupInputPanel_getAutocompleteEventCallback(detail, fun, data, id, currentValue) {
|
|
1239
1246
|
if (detail.id !== id ||
|
|
1240
1247
|
detail.open === false) {
|
|
@@ -1349,5 +1356,19 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
1349
1356
|
}) })));
|
|
1350
1357
|
}, _KupInputPanel_areValuesUpdated = function _KupInputPanel_areValuesUpdated() {
|
|
1351
1358
|
return this.inputPanelCells.some(({ cells, row }) => cells.some(({ cell, column: { name } }) => cell.value !== row.cells[name].value));
|
|
1359
|
+
}, _KupInputPanel_getFunctionOnClickBTN = function _KupInputPanel_getFunctionOnClickBTN(cell, id) {
|
|
1360
|
+
cell.fun
|
|
1361
|
+
? this.customButtonClickHandler({
|
|
1362
|
+
fun: cell.fun,
|
|
1363
|
+
cellId: id,
|
|
1364
|
+
currentState: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
|
|
1365
|
+
})
|
|
1366
|
+
: this.submitCb({
|
|
1367
|
+
value: {
|
|
1368
|
+
before: Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_originalData, "f")),
|
|
1369
|
+
after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
|
|
1370
|
+
},
|
|
1371
|
+
cell: id,
|
|
1372
|
+
});
|
|
1352
1373
|
};
|
|
1353
1374
|
//# sourceMappingURL=kup-input-panel.js.map
|