@sme.up/ketchup 10.2.0 → 10.3.1
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-cell-3ed4ad9e.js → f-cell-be0c55ac.js} +5 -5
- package/dist/cjs/{f-chip-b936dcaf.js → f-chip-dc085b9b.js} +1 -1
- package/dist/cjs/{f-object-field-348fa103.js → f-object-field-96e1c599.js} +2 -2
- package/dist/cjs/{f-paginator-utils-f951cc54.js → f-paginator-utils-3f233ebe.js} +1 -1
- package/dist/cjs/{f-text-field-e41f653a.js → f-text-field-d91ab1e8.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_29.cjs.entry.js +143 -61
- package/dist/cjs/kup-box.cjs.entry.js +87 -69
- package/dist/cjs/kup-calendar.cjs.entry.js +34 -16
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/{kup-data-table-helper-adaa11bb.js → kup-data-table-helper-ff263f4f.js} +1 -1
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +9 -4
- package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-htm.cjs.entry.js +1 -1
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +9 -8
- package/dist/cjs/kup-input-panel.cjs.entry.js +49 -77
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +1 -1
- package/dist/cjs/{kup-manager-39bc2be8.js → kup-manager-ecc44384.js} +130 -157
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-object-field.cjs.entry.js +3 -3
- package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +2 -2
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/kup-txt.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +1 -0
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +39 -7
- package/dist/collection/components/kup-box/kup-box.js +115 -62
- package/dist/collection/components/kup-button/kup-button.js +0 -24
- package/dist/collection/components/kup-calendar/kup-calendar.css +5 -1
- package/dist/collection/components/kup-calendar/kup-calendar.js +32 -14
- package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.js +24 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +110 -28
- package/dist/collection/components/kup-editor/kup-editor.js +8 -3
- package/dist/collection/components/kup-image/assets/svg/bullseye-arrow.svg +1 -0
- package/dist/collection/components/kup-image/assets/svg/email-stacked.svg +1 -0
- package/dist/collection/components/kup-image/assets/svg/filter-off.svg +1 -0
- package/dist/collection/components/kup-image/assets/svg/status.svg +9 -0
- package/dist/collection/components/kup-image-list/kup-image-list.js +4 -3
- package/dist/collection/components/kup-input-panel/kup-input-panel-utils.js +24 -11
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +52 -39
- package/dist/collection/components/kup-tree/kup-tree.js +48 -12
- package/dist/collection/f-components/f-cell/f-cell.js +1 -1
- package/dist/collection/managers/kup-data/kup-data.js +49 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +0 -2
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +2 -2
- package/dist/components/kup-activity-timeline.js +2 -2
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +35 -17
- package/dist/components/kup-card-list.js +3 -3
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +2 -2
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +2 -2
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +2 -2
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +3 -3
- package/dist/components/kup-file-upload.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +2 -2
- package/dist/components/kup-iframe.js +2 -2
- package/dist/components/kup-image-list.js +6 -5
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +49 -76
- package/dist/components/kup-lazy.js +2 -2
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +4 -4
- package/dist/components/kup-nav-bar.js +2 -2
- package/dist/components/kup-numeric-picker.js +2 -2
- package/dist/components/kup-object-field.js +2 -2
- package/dist/components/kup-pdf.js +2 -2
- package/dist/components/kup-planner.js +2 -2
- package/dist/components/kup-probe.js +2 -2
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +2 -2
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +2 -2
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +2 -2
- package/dist/components/kup-typography-list.js +2 -2
- package/dist/components/kup-typography.js +2 -2
- package/dist/components/{p-a0258e6f.js → p-39e807bc.js} +2 -2
- package/dist/components/{p-b80494d7.js → p-680ee680.js} +2 -2
- package/dist/components/{p-3438f15f.js → p-685106b4.js} +83 -64
- package/dist/components/{p-b304b91c.js → p-73922583.js} +130 -157
- package/dist/components/{p-eb8a2811.js → p-8037ef07.js} +10 -5
- package/dist/components/{p-7d0f1f90.js → p-e0031e17.js} +141 -57
- package/dist/esm/{f-cell-6576e009.js → f-cell-eea4e836.js} +5 -5
- package/dist/esm/{f-chip-bb62428a.js → f-chip-72bcea75.js} +1 -1
- package/dist/esm/{f-object-field-b87b6ae6.js → f-object-field-1827746c.js} +2 -2
- package/dist/esm/{f-paginator-utils-04903d74.js → f-paginator-utils-e785d34e.js} +1 -1
- package/dist/esm/{f-text-field-9be88e51.js → f-text-field-591dc383.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +1 -1
- package/dist/esm/kup-activity-timeline.entry.js +2 -2
- package/dist/esm/kup-autocomplete_29.entry.js +143 -61
- package/dist/esm/kup-box.entry.js +87 -69
- package/dist/esm/kup-calendar.entry.js +35 -17
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dashboard.entry.js +2 -2
- package/dist/esm/{kup-data-table-helper-13eb7abf.js → kup-data-table-helper-0fbe9df1.js} +1 -1
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +9 -4
- package/dist/esm/kup-family-tree.entry.js +1 -1
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-htm.entry.js +1 -1
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +9 -8
- package/dist/esm/kup-input-panel.entry.js +49 -77
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-6aa0a1c7.js → kup-manager-a3f8ee8f.js} +130 -157
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-object-field.entry.js +3 -3
- package/dist/esm/kup-pdf.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +2 -2
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +1 -1
- package/dist/esm/kup-txt.entry.js +1 -1
- package/dist/esm/kup-typography-list.entry.js +1 -1
- package/dist/esm/kup-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/assets/svg/bullseye-arrow.svg +1 -0
- package/dist/ketchup/assets/svg/email-stacked.svg +1 -0
- package/dist/ketchup/assets/svg/filter-off.svg +1 -0
- package/dist/ketchup/assets/svg/status.svg +9 -0
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-267d1898.js → p-0eea54ac.js} +1 -1
- package/dist/ketchup/{p-0de49966.entry.js → p-0f9ae966.entry.js} +1 -1
- package/dist/ketchup/{p-6fc1bb18.entry.js → p-1a9fb6e7.entry.js} +1 -1
- package/dist/ketchup/{p-9b907768.entry.js → p-21a2d25a.entry.js} +1 -1
- package/dist/ketchup/{p-f8a027a1.entry.js → p-283f7bfc.entry.js} +1 -1
- package/dist/ketchup/{p-2d84c26e.entry.js → p-2c11b778.entry.js} +1 -1
- package/dist/ketchup/{p-4ffc1a88.entry.js → p-2f0664cb.entry.js} +1 -1
- package/dist/ketchup/{p-58002a23.entry.js → p-2faa7118.entry.js} +1 -1
- package/dist/ketchup/p-32a6feed.entry.js +9 -0
- package/dist/ketchup/{p-d084b2d4.entry.js → p-36ec5bc3.entry.js} +1 -1
- package/dist/ketchup/{p-fb775526.entry.js → p-43dc9f87.entry.js} +1 -1
- package/dist/ketchup/p-442a16b1.entry.js +1 -0
- package/dist/ketchup/p-4c16edda.entry.js +1 -0
- package/dist/ketchup/{p-15f192f0.entry.js → p-4c5b911e.entry.js} +1 -1
- package/dist/ketchup/{p-c2ccbaca.entry.js → p-5340f777.entry.js} +1 -1
- package/dist/ketchup/{p-b365f2f2.entry.js → p-57a93686.entry.js} +1 -1
- package/dist/ketchup/{p-100b8ae7.entry.js → p-5e55604b.entry.js} +1 -1
- package/dist/ketchup/{p-8be42f5c.js → p-64e064f0.js} +1 -1
- package/dist/ketchup/{p-5d9f2d24.entry.js → p-6fe57b1a.entry.js} +1 -1
- package/dist/ketchup/{p-fdcb43a2.entry.js → p-79e580bc.entry.js} +1 -1
- package/dist/ketchup/{p-a4b6d6c5.js → p-8140c1d2.js} +1 -1
- package/dist/ketchup/{p-9bc02da6.entry.js → p-8cf7b4a6.entry.js} +1 -1
- package/dist/ketchup/{p-0b1e0b48.js → p-932940cb.js} +1 -1
- package/dist/ketchup/p-a4168ce9.entry.js +1 -0
- package/dist/ketchup/{p-9edd90c2.entry.js → p-beef4fe9.entry.js} +1 -1
- package/dist/ketchup/{p-d8dbf3df.entry.js → p-cd5db3b1.entry.js} +2 -2
- package/dist/ketchup/{p-92431583.entry.js → p-d03527d8.entry.js} +1 -1
- package/dist/ketchup/{p-838d8e97.js → p-d1fa33e0.js} +1 -1
- package/dist/ketchup/{p-e6afa8a6.entry.js → p-d2e3f987.entry.js} +1 -1
- package/dist/ketchup/{p-07f50333.entry.js → p-d9ae70bb.entry.js} +1 -1
- package/dist/ketchup/{p-a597a851.entry.js → p-dcf2c5c0.entry.js} +1 -1
- package/dist/ketchup/p-e1281898.entry.js +1 -0
- package/dist/ketchup/{p-d0554d1f.entry.js → p-ec86f88f.entry.js} +1 -1
- package/dist/ketchup/{p-6d628b49.entry.js → p-ee0836a4.entry.js} +1 -1
- package/dist/ketchup/{p-e104cfb7.js → p-f1886258.js} +1 -1
- package/dist/ketchup/{p-e4fa2cf3.js → p-fb4f10d5.js} +2 -2
- package/dist/ketchup/p-fc750bff.entry.js +1 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +2 -1
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +5 -0
- package/dist/types/components/kup-box/kup-box.d.ts +6 -5
- package/dist/types/components/kup-button/kup-button.d.ts +0 -1
- package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +2 -1
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +5 -0
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +1 -0
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +5 -0
- package/dist/types/components/kup-input-panel/kup-input-panel-utils.d.ts +7 -4
- package/dist/types/components/kup-input-panel/kup-input-panel.d.ts +5 -0
- package/dist/types/components/kup-tree/kup-tree.d.ts +2 -1
- package/dist/types/components.d.ts +44 -4
- package/dist/types/managers/kup-data/kup-data.d.ts +11 -0
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +0 -2
- package/dist/types/managers/kup-manager/kup-manager.d.ts +0 -2
- package/package.json +2 -2
- package/dist/collection/managers/kup-keys-binding/kup-keys-binding-declarations.js +0 -1
- package/dist/collection/managers/kup-keys-binding/kup-keys-binding.js +0 -79
- package/dist/ketchup/p-3dbafa20.entry.js +0 -9
- package/dist/ketchup/p-3e42953b.entry.js +0 -1
- package/dist/ketchup/p-42a1f9ec.entry.js +0 -1
- package/dist/ketchup/p-55b0991f.entry.js +0 -1
- package/dist/ketchup/p-65b23870.entry.js +0 -1
- package/dist/ketchup/p-da44226a.entry.js +0 -1
- package/dist/types/managers/kup-keys-binding/kup-keys-binding-declarations.d.ts +0 -1
- package/dist/types/managers/kup-keys-binding/kup-keys-binding.d.ts +0 -20
|
@@ -200,14 +200,14 @@ export class KupImageList {
|
|
|
200
200
|
}
|
|
201
201
|
const imlClass = 'image-list' +
|
|
202
202
|
(this.showFullDescription ? ' full-description' : '');
|
|
203
|
-
return (h(Host, { key: '
|
|
203
|
+
return (h(Host, { key: 'ca040281aa4d992d8d6efaa3e294e4cc5e06f95a' }, h("style", { key: '433ac510a032fef1a28de7a19cc725338f12ed18' }, __classPrivateFieldGet(this, _KupImageList_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '09711dbe9475c429a0b87f08c4f95d33dc0a2387', id: componentWrapperId, ref: (el) => {
|
|
204
204
|
__classPrivateFieldSet(this, _KupImageList_el, el, "f");
|
|
205
|
-
} }, h("div", { key: '
|
|
205
|
+
} }, h("div", { key: 'fa65e7bfd83e21146e71c9889cf08849cccc1479', class: "navigation-bar" }, hasNavigation ? (h("div", { class: `navigation-bar__wrapper ${this.navigationBarToggled
|
|
206
206
|
? 'navigation-bar__wrapper--active'
|
|
207
207
|
: ''}` }, h("div", { class: `navigation-bar__title`, onClick: () => {
|
|
208
208
|
this.navigationBarToggled =
|
|
209
209
|
!this.navigationBarToggled;
|
|
210
|
-
} }, h(FImage, { fit: true, resource: this.currentNode.icon, placeholderResource: this.currentNode.placeholderIcon, sizeX: "1.25em", sizeY: "1.25em", wrapperClass: "navigation-bar__title__image" }), h("div", { class: "navigation-bar__title__label" }, this.currentNode.value)), h(FButton, Object.assign({}, __classPrivateFieldGet(this, _KupImageList_backProps, "f"), { label: __classPrivateFieldGet(this, _KupImageList_kupManager, "f").language.translate(KupLanguageGeneric.BACK) })), h(FButton, Object.assign({}, __classPrivateFieldGet(this, _KupImageList_topProps, "f"), { label: __classPrivateFieldGet(this, _KupImageList_kupManager, "f").language.translate(KupLanguageGeneric.TOP) })))) : null), h("div", { key: '
|
|
210
|
+
} }, h(FImage, { fit: true, resource: this.currentNode.icon, placeholderResource: this.currentNode.placeholderIcon, sizeX: "1.25em", sizeY: "1.25em", wrapperClass: "navigation-bar__title__image" }), h("div", { class: "navigation-bar__title__label" }, this.currentNode.value)), h(FButton, Object.assign({}, __classPrivateFieldGet(this, _KupImageList_backProps, "f"), { label: __classPrivateFieldGet(this, _KupImageList_kupManager, "f").language.translate(KupLanguageGeneric.BACK) })), h(FButton, Object.assign({}, __classPrivateFieldGet(this, _KupImageList_topProps, "f"), { label: __classPrivateFieldGet(this, _KupImageList_kupManager, "f").language.translate(KupLanguageGeneric.TOP) })))) : null), h("div", { key: 'e8348ec6cfc974859f45548e1bb156032dda8d2d', class: imlClass, style: combinedGridStyle }, ...__classPrivateFieldGet(this, _KupImageList_instances, "m", _KupImageList_createList).call(this)))));
|
|
211
211
|
}
|
|
212
212
|
disconnectedCallback() {
|
|
213
213
|
__classPrivateFieldGet(this, _KupImageList_kupManager, "f").interact.unregister(__classPrivateFieldGet(this, _KupImageList_interactableTouch, "f"));
|
|
@@ -611,6 +611,7 @@ _KupImageList_clickTimeout = new WeakMap(), _KupImageList_kupManager = new WeakM
|
|
|
611
611
|
icon: node.icon,
|
|
612
612
|
placeholderIcon: node.placeholderIcon,
|
|
613
613
|
obj: node.obj,
|
|
614
|
+
cssClass: __classPrivateFieldGet(this, _KupImageList_kupManager, "f").data.cell.getObjectRelatedStyleClasses(node.obj, node.cssClass),
|
|
614
615
|
}, column: { name: 'IMAGE', title: 'Image' }, component: this, density: FCellPadding.NONE, row: Object.assign({}, node) }, h("div", { class: `image-list__wrapper${hasExternalResource ? ' images' : ''}` }, !hasExternalResource && (h("svg", { xmlns: "http://www.w3.org/2000/svg", version: "1.1", viewBox: "0 0 24 24" })), image, label)));
|
|
615
616
|
}, _KupImageList_createList = function _KupImageList_createList() {
|
|
616
617
|
const nodes = [];
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export const
|
|
1
|
+
import { FCellShapes } from "../../f-components/f-cell/f-cell-declarations";
|
|
2
|
+
// General INP constants
|
|
3
|
+
export const ROW_HEIGHT = 20; // Used for the ACTUAL row height calculations (no spacing)
|
|
4
|
+
export const SPACED_ROW_HEIGHT = 22; // Used for the INP total height calculations (accounting for row spacing)
|
|
5
|
+
export const LEFT_MULTIPLIER = 1.15; // Multiplier commanding the left attribute "scale"
|
|
6
|
+
export const ADDITIONAL_WIDTH_WITH_ICON = 18; // Additional width added to account for the shape's icon (ACP,CAL,CMB)
|
|
7
|
+
// Char sizes
|
|
8
|
+
export const FONT_SIZE = 12; // Monospace font size of the INP
|
|
9
|
+
export const FONT_SIZE_TO_WIDTH_RATIO = 1.6; // FontSize to SingleCharWidth ratio
|
|
10
|
+
export const CHAR_WIDTH = FONT_SIZE / FONT_SIZE_TO_WIDTH_RATIO; // Used for field width and left attribute
|
|
11
|
+
export const getAbsoluteWidth = (length, graphicShapeHasIcon) => {
|
|
4
12
|
if (length == 0) {
|
|
5
13
|
return CHAR_WIDTH / 2;
|
|
6
14
|
}
|
|
@@ -10,22 +18,22 @@ export const getAbsoluteWidth = (length) => {
|
|
|
10
18
|
if (length === 1) {
|
|
11
19
|
return 1.5 * CHAR_WIDTH;
|
|
12
20
|
}
|
|
13
|
-
return length * CHAR_WIDTH
|
|
21
|
+
return (length * CHAR_WIDTH +
|
|
22
|
+
(graphicShapeHasIcon ? ADDITIONAL_WIDTH_WITH_ICON : 0) +
|
|
23
|
+
4 // Additional size to include padding
|
|
24
|
+
);
|
|
14
25
|
};
|
|
15
|
-
export const FONT_SIZE = 12;
|
|
16
|
-
export const FONT_SIZE_TO_WIDTH_RATIO = 1.666666666666667;
|
|
17
|
-
export const SINGLE_CHAR_WIDTH = FONT_SIZE / FONT_SIZE_TO_WIDTH_RATIO;
|
|
18
26
|
export const getLabelAbsoluteWidth = (length) => {
|
|
19
27
|
if (length == 0) {
|
|
20
|
-
return
|
|
28
|
+
return CHAR_WIDTH / 2;
|
|
21
29
|
}
|
|
22
30
|
if (!length) {
|
|
23
31
|
return null;
|
|
24
32
|
}
|
|
25
33
|
if (length === 1) {
|
|
26
|
-
return 1.5 *
|
|
34
|
+
return 1.5 * CHAR_WIDTH;
|
|
27
35
|
}
|
|
28
|
-
return length *
|
|
36
|
+
return length * CHAR_WIDTH;
|
|
29
37
|
};
|
|
30
38
|
export const getAbsoluteHeight = (height) => {
|
|
31
39
|
if (!height) {
|
|
@@ -52,7 +60,7 @@ export const getAbsoluteLeft = (col) => {
|
|
|
52
60
|
if (!col) {
|
|
53
61
|
return null;
|
|
54
62
|
}
|
|
55
|
-
return (col - 1) *
|
|
63
|
+
return (col - 1) * 10 * LEFT_MULTIPLIER;
|
|
56
64
|
};
|
|
57
65
|
export const getInpComponentAbsoluteHeight = (layout) => {
|
|
58
66
|
let inpRowHeight = 0;
|
|
@@ -69,3 +77,8 @@ export const getInpComponentAbsoluteHeight = (layout) => {
|
|
|
69
77
|
});
|
|
70
78
|
return inpRowHeight;
|
|
71
79
|
};
|
|
80
|
+
export const graphicShapeHasIcon = (shape) => {
|
|
81
|
+
return (shape === FCellShapes.AUTOCOMPLETE ||
|
|
82
|
+
shape === FCellShapes.COMBOBOX ||
|
|
83
|
+
shape === FCellShapes.DATE);
|
|
84
|
+
};
|
|
@@ -27,23 +27,23 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
27
|
return t;
|
|
28
28
|
};
|
|
29
29
|
var _KupInputPanel_instances, _KupInputPanel_kupManager, _KupInputPanel_formRef, _KupInputPanel_optionsAdapterMap, _KupInputPanel_originalData, _KupInputPanel_listeners, _KupInputPanel_cellTypeComponents, _KupInputPanel_cellTypesNeedingReset, _KupInputPanel_cellCustomRender, _KupInputPanel_sectionRenderMap, _KupInputPanel_keysShortcut, _KupInputPanel_readyPromise, _KupInputPanel_readyResolve, _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_getOptionHandler, _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_manageInputPanelCheck, _KupInputPanel_onCellUpdate, _KupInputPanel_setCellError, _KupInputPanel_areValuesUpdated, _KupInputPanel_getFunctionOnClickBTN, _KupInputPanel_findTraversedFCell, _KupInputPanel_getEventDetails, _KupInputPanel_didLoadInteractables, _KupInputPanel_setFocusOnInputElement, _KupInputPanel_findFirstInput, _KupInputPanel_setAutoSkip;
|
|
30
|
-
import {
|
|
30
|
+
import { forceUpdate, h, Host, } 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
|
+
import { FLabel } from "../../f-components/f-label/f-label";
|
|
34
35
|
import { FTextFieldMDC } from "../../f-components/f-text-field/f-text-field-mdc";
|
|
36
|
+
import { FTypography } from "../../f-components/f-typography/f-typography";
|
|
37
|
+
import { FTypographyType, } from "../../f-components/f-typography/f-typography-declarations";
|
|
35
38
|
import { KupDebugCategory } from "../../managers/kup-debug/kup-debug-declarations";
|
|
39
|
+
import { KupPointerEventTypes } from "../../managers/kup-interact/kup-interact-declarations";
|
|
36
40
|
import { KupLanguageGeneric } from "../../managers/kup-language/kup-language-declarations";
|
|
37
41
|
import { kupManagerInstance, } from "../../managers/kup-manager/kup-manager";
|
|
38
|
-
import { FTypographyType, } from "../../f-components/f-typography/f-typography-declarations";
|
|
39
42
|
import { CHIAdapter, CHKAdapter, CMBandACPAdapter, getCellValueForDisplay, RADAdapter, SWTAdapter, } from "../../utils/cell-utils";
|
|
40
43
|
import { getProps, setProps } from "../../utils/utils";
|
|
41
44
|
import { componentWrapperId } from "../../variables/GenericVariables";
|
|
42
|
-
import { CheckConditionsByEventType, CheckTriggeringEvents,
|
|
43
|
-
import { getAbsoluteHeight, getAbsoluteLeft, getAbsoluteTop, getAbsoluteWidth, getInpComponentAbsoluteHeight, getLabelAbsoluteWidth,
|
|
44
|
-
import { FTypography } from "../../f-components/f-typography/f-typography";
|
|
45
|
-
import { KupPointerEventTypes } from "../../managers/kup-interact/kup-interact-declarations";
|
|
46
|
-
import { FLabel } from "../../f-components/f-label/f-label";
|
|
45
|
+
import { CheckConditionsByEventType, CheckTriggeringEvents, KupInputPanelButtonsPositions, KupInputPanelLayoutSectionType, KupInputPanelPosition, KupInputPanelProps, } from "./kup-input-panel-declarations";
|
|
46
|
+
import { getAbsoluteHeight, getAbsoluteLeft, getAbsoluteTop, getAbsoluteWidth, getInpComponentAbsoluteHeight, getLabelAbsoluteWidth, graphicShapeHasIcon, SPACED_ROW_HEIGHT, } from "./kup-input-panel-utils";
|
|
47
47
|
const dom = document.documentElement;
|
|
48
48
|
export class KupInputPanel {
|
|
49
49
|
constructor() {
|
|
@@ -114,12 +114,6 @@ export class KupInputPanel {
|
|
|
114
114
|
});
|
|
115
115
|
__classPrivateFieldSet(this, _KupInputPanel_listeners, [], "f");
|
|
116
116
|
}
|
|
117
|
-
if (__classPrivateFieldGet(this, _KupInputPanel_keysShortcut, "f").length) {
|
|
118
|
-
__classPrivateFieldGet(this, _KupInputPanel_keysShortcut, "f").map((key) => {
|
|
119
|
-
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").keysBinding.unregister(key);
|
|
120
|
-
});
|
|
121
|
-
__classPrivateFieldSet(this, _KupInputPanel_keysShortcut, [], "f");
|
|
122
|
-
}
|
|
123
117
|
if (this.data) {
|
|
124
118
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapCells).call(this, this.data);
|
|
125
119
|
}
|
|
@@ -181,6 +175,13 @@ export class KupInputPanel {
|
|
|
181
175
|
async setProps(props) {
|
|
182
176
|
setProps(this, KupInputPanelProps, props);
|
|
183
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* Trigger update from outside
|
|
180
|
+
* @param {string} cellId - When provided, will trigger onclick event of cell instead of *UPDATE
|
|
181
|
+
*/
|
|
182
|
+
async update(cellId) {
|
|
183
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getCell).call(this, cellId), cellId);
|
|
184
|
+
}
|
|
184
185
|
//#endregion
|
|
185
186
|
//#region LIFECYCLE HOOKS
|
|
186
187
|
/*-------------------------------------------------*/
|
|
@@ -228,7 +229,7 @@ export class KupInputPanel {
|
|
|
228
229
|
h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
|
|
229
230
|
]
|
|
230
231
|
: this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
|
|
231
|
-
return (h(Host, { key: '
|
|
232
|
+
return (h(Host, { key: 'd468961b69c36da299594dd70e3d65911a40a1f6', "onKup-cell-blur": (e) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_manageInputPanelCheck).call(this, e, CheckTriggeringEvents.BLUR), "onKup-cell-update": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_onCellUpdate).bind(this), "onKup-tabbar-click": (e) => {
|
|
232
233
|
this.tabSelected = e.detail.node.id;
|
|
233
234
|
}, "onKup-autocomplete-input": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-autocomplete-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-combobox-iconclick": (e) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).call(this, e, true), "onKup-cell-itemclick": (e) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_manageInputPanelCheck).call(this, e, CheckTriggeringEvents.ITEMCLICK), "onKup-objectfield-searchpayload": (e) => {
|
|
234
235
|
this.kupInputPanelObjectFieldSearchPayload.emit(e.detail);
|
|
@@ -236,14 +237,11 @@ export class KupInputPanel {
|
|
|
236
237
|
this.kupInputPanelObjectFieldOpenSearchMenu.emit(e.detail);
|
|
237
238
|
}, "onKup-objectfield-selectedmenuitem": (e) => {
|
|
238
239
|
this.kupInputPanelObjectFieldSelectedMenuItem.emit(e.detail);
|
|
239
|
-
} }, h("style", { key: '
|
|
240
|
+
} }, h("style", { key: '824fd398cb63ceda965e538605c4e679085d1d33' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '83cb7ae70a5d7340792ed76fa53aee7c3ecbfc60', id: componentWrapperId }, inputPanelContent)));
|
|
240
241
|
}
|
|
241
242
|
disconnectedCallback() {
|
|
242
243
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
|
|
243
244
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.unregister(this);
|
|
244
|
-
__classPrivateFieldGet(this, _KupInputPanel_keysShortcut, "f").forEach((keyEvent) => {
|
|
245
|
-
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").keysBinding.unregister(keyEvent);
|
|
246
|
-
});
|
|
247
245
|
}
|
|
248
246
|
static get is() { return "kup-input-panel"; }
|
|
249
247
|
static get encapsulation() { return "shadow"; }
|
|
@@ -805,6 +803,30 @@ export class KupInputPanel {
|
|
|
805
803
|
"text": "props - Object containing props that will be set to the component."
|
|
806
804
|
}]
|
|
807
805
|
}
|
|
806
|
+
},
|
|
807
|
+
"update": {
|
|
808
|
+
"complexType": {
|
|
809
|
+
"signature": "(cellId?: string) => Promise<void>",
|
|
810
|
+
"parameters": [{
|
|
811
|
+
"name": "cellId",
|
|
812
|
+
"type": "string",
|
|
813
|
+
"docs": "- When provided, will trigger onclick event of cell instead of *UPDATE"
|
|
814
|
+
}],
|
|
815
|
+
"references": {
|
|
816
|
+
"Promise": {
|
|
817
|
+
"location": "global",
|
|
818
|
+
"id": "global::Promise"
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
"return": "Promise<void>"
|
|
822
|
+
},
|
|
823
|
+
"docs": {
|
|
824
|
+
"text": "Trigger update from outside",
|
|
825
|
+
"tags": [{
|
|
826
|
+
"name": "param",
|
|
827
|
+
"text": "cellId - When provided, will trigger onclick event of cell instead of *UPDATE"
|
|
828
|
+
}]
|
|
829
|
+
}
|
|
808
830
|
}
|
|
809
831
|
};
|
|
810
832
|
}
|
|
@@ -826,6 +848,9 @@ export class KupInputPanel {
|
|
|
826
848
|
}
|
|
827
849
|
}
|
|
828
850
|
_KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(), _KupInputPanel_optionsAdapterMap = new WeakMap(), _KupInputPanel_originalData = new WeakMap(), _KupInputPanel_listeners = new WeakMap(), _KupInputPanel_cellTypeComponents = new WeakMap(), _KupInputPanel_cellTypesNeedingReset = new WeakMap(), _KupInputPanel_cellCustomRender = new WeakMap(), _KupInputPanel_sectionRenderMap = new WeakMap(), _KupInputPanel_keysShortcut = new WeakMap(), _KupInputPanel_readyPromise = new WeakMap(), _KupInputPanel_readyResolve = new WeakMap(), _KupInputPanel_instances = new WeakSet(), _KupInputPanel_getCell = function _KupInputPanel_getCell(id) {
|
|
851
|
+
if (!id) {
|
|
852
|
+
return null;
|
|
853
|
+
}
|
|
829
854
|
return this.inputPanelCells.reduce((cell, { cells }) => {
|
|
830
855
|
if (!cell) {
|
|
831
856
|
const foundCell = cells.find(({ column }) => column.name === id);
|
|
@@ -837,7 +862,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
837
862
|
return cell;
|
|
838
863
|
}, null);
|
|
839
864
|
}, _KupInputPanel_renderRow = function _KupInputPanel_renderRow(inputPanelCell) {
|
|
840
|
-
var _a, _b;
|
|
865
|
+
var _a, _b, _c;
|
|
841
866
|
const layout = inputPanelCell.row.layout;
|
|
842
867
|
const horizontal = (layout === null || layout === void 0 ? void 0 : layout.horizontal) || false;
|
|
843
868
|
const styleObj = {};
|
|
@@ -852,7 +877,8 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
852
877
|
if (layout.absolute) {
|
|
853
878
|
rowContent = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderAbsoluteLayout).call(this, inputPanelCell, layout);
|
|
854
879
|
// 12px is added due to the chance that the horizontal scrollbar will be rendered
|
|
855
|
-
styleObj.height = `${getInpComponentAbsoluteHeight(layout) *
|
|
880
|
+
styleObj.height = `${getInpComponentAbsoluteHeight(layout) * SPACED_ROW_HEIGHT +
|
|
881
|
+
12}px`;
|
|
856
882
|
}
|
|
857
883
|
else {
|
|
858
884
|
if (!layout.sectionsType) {
|
|
@@ -899,10 +925,6 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
899
925
|
'input-panel__commands': true,
|
|
900
926
|
[`input-panel__commands--${this.buttonPosition}`]: true,
|
|
901
927
|
};
|
|
902
|
-
const props = {
|
|
903
|
-
value: (_b = layout === null || layout === void 0 ? void 0 : layout.sections[0]) === null || _b === void 0 ? void 0 : _b.title,
|
|
904
|
-
type: FTypographyType.HEADING1,
|
|
905
|
-
};
|
|
906
928
|
return (h("div", null, h("form", { name: this.rootElement.id, id: this.rootElement.id, class: inputPanelClass, ref: (el) => (__classPrivateFieldSet(this, _KupInputPanel_formRef, el, "f")), onSubmit: (e) => {
|
|
907
929
|
e.preventDefault();
|
|
908
930
|
this.submitCb({
|
|
@@ -915,7 +937,8 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
915
937
|
if (__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_findTraversedFCell).call(this, e) != null) {
|
|
916
938
|
e.preventDefault();
|
|
917
939
|
}
|
|
918
|
-
} },
|
|
940
|
+
} }, ((_b = layout === null || layout === void 0 ? void 0 : layout.sections) === null || _b === void 0 ? void 0 : _b.length) == 1 &&
|
|
941
|
+
((_c = layout === null || layout === void 0 ? void 0 : layout.sections[0]) === null || _c === void 0 ? void 0 : _c.title) && (h("div", { class: "input-panel__typography" }, h(FTypography, { value: layout.sections[0].title, type: FTypographyType.HEADING1 }))), h("div", { class: classObj, style: styleObj }, rowContent), h("div", { class: commandsClass }, h(FButton, { buttonType: "submit", label: __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.CONFIRM), wrapperClass: "form__submit", invisible: this.hiddenSubmitButton }), this.inputPanelCommands))));
|
|
919
942
|
}, _KupInputPanel_renderCell = function _KupInputPanel_renderCell(cell, row, column) {
|
|
920
943
|
var _a;
|
|
921
944
|
if (!cell) {
|
|
@@ -941,7 +964,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
941
964
|
}
|
|
942
965
|
return h(FCell, Object.assign({}, cellProps));
|
|
943
966
|
}, _KupInputPanel_renderButton = function _KupInputPanel_renderButton(cell, { name }) {
|
|
944
|
-
const renderedButton = (h(FButton, Object.assign({ icon: cell.icon, id: name }, cell.data, { wrapperClass: "form__submit" })));
|
|
967
|
+
const renderedButton = (h(FButton, Object.assign({ icon: cell.icon, placeholderIcon: cell.placeholderIcon, id: name }, cell.data, { wrapperClass: "form__submit" })));
|
|
945
968
|
return renderedButton;
|
|
946
969
|
}, _KupInputPanel_renderDropDownButton = function _KupInputPanel_renderDropDownButton(cell, data) {
|
|
947
970
|
return (h("kup-dropdown-button", Object.assign({}, cell.data, { label: cell.value, data: data, "onkup-dropdownbutton-itemclick": (e) => {
|
|
@@ -1170,7 +1193,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
1170
1193
|
}
|
|
1171
1194
|
const absoluteWidth = fieldCell.cell.shape === FCellShapes.LABEL
|
|
1172
1195
|
? getLabelAbsoluteWidth(length)
|
|
1173
|
-
: getAbsoluteWidth(length);
|
|
1196
|
+
: getAbsoluteWidth(length, graphicShapeHasIcon(fieldCell.cell.shape));
|
|
1174
1197
|
const absoluteHeight = getAbsoluteHeight(field.absoluteHeight);
|
|
1175
1198
|
const absoluteTop = getAbsoluteTop(field.absoluteRow, absoluteTblPositioningData);
|
|
1176
1199
|
const absoluteLeft = getAbsoluteLeft(field.absoluteColumn);
|
|
@@ -1364,15 +1387,10 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
1364
1387
|
},
|
|
1365
1388
|
};
|
|
1366
1389
|
}, _KupInputPanel_BTNAdapter = function _KupInputPanel_BTNAdapter(_options, _fieldLabel, _currentValue, cell, id) {
|
|
1367
|
-
var _a, _b, _c, _d;
|
|
1368
1390
|
cell.data = cell.data || {};
|
|
1369
1391
|
cell.data.onClick = () => {
|
|
1370
1392
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getFunctionOnClickBTN).call(this, cell, id);
|
|
1371
1393
|
};
|
|
1372
|
-
if (((_a = cell.data) === null || _a === void 0 ? void 0 : _a.keyShortcut) && !((_b = cell.data) === null || _b === void 0 ? void 0 : _b.disabled)) {
|
|
1373
|
-
__classPrivateFieldGet(this, _KupInputPanel_keysShortcut, "f").push((_c = cell.data) === null || _c === void 0 ? void 0 : _c.keyShortcut);
|
|
1374
|
-
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").keysBinding.register((_d = cell.data) === null || _d === void 0 ? void 0 : _d.keyShortcut, cell.data.onClick.bind(this));
|
|
1375
|
-
}
|
|
1376
1394
|
return Object.assign({ label: cell.value, fun: cell.fun }, cell.data);
|
|
1377
1395
|
}, _KupInputPanel_CMBandACPAdapter = function _KupInputPanel_CMBandACPAdapter(rawOptions, fieldLabel, currentValue) {
|
|
1378
1396
|
const configCMandACP = CMBandACPAdapter(currentValue, fieldLabel, []);
|
|
@@ -1549,11 +1567,6 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
1549
1567
|
};
|
|
1550
1568
|
});
|
|
1551
1569
|
}, _KupInputPanel_commandAdapter = function _KupInputPanel_commandAdapter(cell) {
|
|
1552
|
-
if (cell.data &&
|
|
1553
|
-
!cell.data.keyShortcut &&
|
|
1554
|
-
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").objects.isJ1Key(cell.obj ? cell.obj : {})) {
|
|
1555
|
-
cell.data.keyShortcut = InputPanelKeyCommands[cell.obj.k];
|
|
1556
|
-
}
|
|
1557
1570
|
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 });
|
|
1558
1571
|
return buttonCell;
|
|
1559
1572
|
}, _KupInputPanel_getAutocompleteEventCallback = function _KupInputPanel_getAutocompleteEventCallback(detail, cell) {
|
|
@@ -1576,7 +1589,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
1576
1589
|
: (_d = (_c = cell.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d['kup-list'];
|
|
1577
1590
|
if (kupListData) {
|
|
1578
1591
|
kupListData.data = (filteredRows === null || filteredRows === void 0 ? void 0 : filteredRows.length)
|
|
1579
|
-
? (_e = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, visibleColumnsOptions, cell.value)) !== null && _e !== void 0 ? _e : []
|
|
1592
|
+
? ((_e = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, visibleColumnsOptions, cell.value)) !== null && _e !== void 0 ? _e : [])
|
|
1580
1593
|
: [];
|
|
1581
1594
|
kupListData.options = (_f = options.columns) !== null && _f !== void 0 ? _f : [];
|
|
1582
1595
|
}
|
|
@@ -1663,7 +1676,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
1663
1676
|
}, _KupInputPanel_areValuesUpdated = function _KupInputPanel_areValuesUpdated() {
|
|
1664
1677
|
return this.inputPanelCells.some(({ cells, row }) => cells.some(({ cell, column: { name } }) => cell.value !== row.cells[name].value));
|
|
1665
1678
|
}, _KupInputPanel_getFunctionOnClickBTN = function _KupInputPanel_getFunctionOnClickBTN(cell, id) {
|
|
1666
|
-
cell.fun
|
|
1679
|
+
(cell === null || cell === void 0 ? void 0 : cell.fun)
|
|
1667
1680
|
? this.customButtonClickHandler({
|
|
1668
1681
|
fun: cell.fun,
|
|
1669
1682
|
cellId: id,
|
|
@@ -593,6 +593,7 @@ export class KupTree {
|
|
|
593
593
|
}
|
|
594
594
|
// When a TreeNode can be selected
|
|
595
595
|
hdlTreeNodeClick(e, treeNodeData, treeNodePath) {
|
|
596
|
+
var _a;
|
|
596
597
|
if (this.expansionMode.toLowerCase() ===
|
|
597
598
|
KupTreeExpansionMode.DROPDOWN ||
|
|
598
599
|
(this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE &&
|
|
@@ -610,13 +611,18 @@ export class KupTree {
|
|
|
610
611
|
this.selectedNode = treeNodePath
|
|
611
612
|
.split(',')
|
|
612
613
|
.map((treeNodeIndex) => parseInt(treeNodeIndex));
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
614
|
+
const columnName = td ? td.dataset.column : null;
|
|
615
|
+
const column = (_a = this.columns) === null || _a === void 0 ? void 0 : _a.find((c) => c.name == columnName);
|
|
616
|
+
if (!columnName ||
|
|
617
|
+
!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.isButton(column === null || column === void 0 ? void 0 : column.obj)) {
|
|
618
|
+
this.kupTreeNodeSelected.emit({
|
|
619
|
+
comp: this,
|
|
620
|
+
id: this.rootElement.id,
|
|
621
|
+
treeNodePath: this.selectedNode,
|
|
622
|
+
treeNode: treeNodeData,
|
|
623
|
+
columnName,
|
|
624
|
+
});
|
|
625
|
+
}
|
|
620
626
|
}
|
|
621
627
|
}
|
|
622
628
|
// If KupTreeExpansionMode.NODE then click is a collapse/expand click
|
|
@@ -977,6 +983,13 @@ export class KupTree {
|
|
|
977
983
|
const cell = treeNodeData.cells[column.name]
|
|
978
984
|
? treeNodeData.cells[column.name]
|
|
979
985
|
: null;
|
|
986
|
+
if (treeNodeData.style) {
|
|
987
|
+
cell.style = treeNodeData.style;
|
|
988
|
+
}
|
|
989
|
+
if (!cell.isEditable) {
|
|
990
|
+
cell.cssClass =
|
|
991
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").data.cell.getObjectRelatedStyleClasses(cell.obj, cell.cssClass);
|
|
992
|
+
}
|
|
980
993
|
const cellProps = {
|
|
981
994
|
cell: cell,
|
|
982
995
|
column: column,
|
|
@@ -1358,17 +1371,19 @@ export class KupTree {
|
|
|
1358
1371
|
this.data &&
|
|
1359
1372
|
this.data.length &&
|
|
1360
1373
|
this.data.length > 0) {
|
|
1361
|
-
filterField = (h("div", { key: '
|
|
1374
|
+
filterField = (h("div", { key: 'b9095e93e4a60648ccda218cbc7fcd738a108d8a', id: "global-filter" }, h("kup-text-field", { key: 'f98a0639052c43ce4e0ef13296136e467182ac4e', fullWidth: true, label: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), sizing: KupComponentSizing.EXTRA_SMALL, icon: KupThemeIconValues.SEARCH, initialValue: this.globalFilterValue, "onkup-textfield-input": (event) => {
|
|
1362
1375
|
window.clearTimeout(this.globalFilterTimeout);
|
|
1363
1376
|
this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
|
|
1364
1377
|
} })));
|
|
1365
1378
|
}
|
|
1366
|
-
return (h(Host, { key: '
|
|
1367
|
-
|
|
1379
|
+
return (h(Host, { key: '15ef1ec888317912adcf8db2df390dbf06b906a5', "onKup-cell-click": (e) => {
|
|
1380
|
+
this.kupTreeCellClick.emit(e.detail);
|
|
1381
|
+
} }, h("style", { key: '46df5fad7874e3c272adcc78e909ee6035536ccc' }, __classPrivateFieldGet(this, _KupTree_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'd61be1bdc5e5e659a7169fc70dbf74ec09318ae2', id: componentWrapperId, class: wrapperClass, style: wrapperStyle }, filterField, h("div", { key: 'b35a3be92fdbf4f30e6e2b87fec7a7228db5aaa1', class: "wrapper", ref: (el) => (this.treeWrapperRef =
|
|
1382
|
+
el) }, h("table", { key: '7bcd57a6d631589197c28de1088f0689bcaff46d', class: "kup-tree", "data-show-columns": this.showColumns, onContextMenu: (e) => {
|
|
1368
1383
|
e.preventDefault();
|
|
1369
|
-
} }, h("thead", { key: '
|
|
1384
|
+
} }, h("thead", { key: 'a0f63e145ce0f6c2c0f3f612b06edbf08ece937e', class: {
|
|
1370
1385
|
'header--is-visible': visibleHeader,
|
|
1371
|
-
} }, h("tr", { key: '
|
|
1386
|
+
} }, h("tr", { key: '5c3dce5b4828fdf00e91354aa9308798a3bf282d' }, visibleHeader ? this.renderHeader() : null)), h("tbody", { key: '2599e820e154176730bc67879708d68120eb4579' }, treeNodes), (this.showFooter || this.hasTotals()) &&
|
|
1372
1387
|
this.columns
|
|
1373
1388
|
? this.renderFooter()
|
|
1374
1389
|
: null)))));
|
|
@@ -2280,6 +2295,27 @@ export class KupTree {
|
|
|
2280
2295
|
}
|
|
2281
2296
|
}
|
|
2282
2297
|
}
|
|
2298
|
+
}, {
|
|
2299
|
+
"method": "kupTreeCellClick",
|
|
2300
|
+
"name": "kup-tree-cell-click",
|
|
2301
|
+
"bubbles": true,
|
|
2302
|
+
"cancelable": false,
|
|
2303
|
+
"composed": true,
|
|
2304
|
+
"docs": {
|
|
2305
|
+
"tags": [],
|
|
2306
|
+
"text": ""
|
|
2307
|
+
},
|
|
2308
|
+
"complexType": {
|
|
2309
|
+
"original": "FCellEventPayload",
|
|
2310
|
+
"resolved": "FCellEventPayload",
|
|
2311
|
+
"references": {
|
|
2312
|
+
"FCellEventPayload": {
|
|
2313
|
+
"location": "import",
|
|
2314
|
+
"path": "../../f-components/f-cell/f-cell-declarations",
|
|
2315
|
+
"id": "src/f-components/f-cell/f-cell-declarations.ts::FCellEventPayload"
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2283
2319
|
}];
|
|
2284
2320
|
}
|
|
2285
2321
|
static get methods() {
|
|
@@ -208,7 +208,7 @@ const MainObjectAdapter = (_options, fieldLabel, currentValue, cell, _id) => (Ob
|
|
|
208
208
|
const MainCHKAdapter = (_options, fieldLabel, currentValue, cell) => (Object.assign(Object.assign({}, cell.data), { checked: currentValue === 'on' || currentValue === '1', label: fieldLabel }));
|
|
209
209
|
const MainBTNAdapter = (_options, _fieldLabel, currentValue, cell) => ({
|
|
210
210
|
data: [
|
|
211
|
-
Object.assign(Object.assign({}, cell.data), { icon: cell.icon, value: currentValue }),
|
|
211
|
+
Object.assign(Object.assign({}, cell.data), { icon: cell.icon, placeholderIcon: cell.placeholderIcon, value: currentValue }),
|
|
212
212
|
],
|
|
213
213
|
});
|
|
214
214
|
const MainITXAdapter = (_options, fieldLabel, _currentValue, cell) => (Object.assign(Object.assign({}, cell.data), { label: fieldLabel }));
|
|
@@ -236,6 +236,55 @@ export class KupData {
|
|
|
236
236
|
hasActionCell: (cell, commands) => {
|
|
237
237
|
return commands.some((command) => this.cell.isActionCell(command, cell));
|
|
238
238
|
},
|
|
239
|
+
/**
|
|
240
|
+
* Gets css styles for cell, depending on cell's obj
|
|
241
|
+
* @param obj
|
|
242
|
+
* @param cssClass
|
|
243
|
+
* @returns
|
|
244
|
+
*/
|
|
245
|
+
getObjectRelatedStyleClasses(obj, cssClass) {
|
|
246
|
+
const ParameterRelatedStylesMap = {
|
|
247
|
+
TA: {
|
|
248
|
+
'B£W': ['c-fitted', 'c-shaped', 'c-hor-padded'],
|
|
249
|
+
'B§A': ['strong-text'],
|
|
250
|
+
},
|
|
251
|
+
};
|
|
252
|
+
const CodeRelatedStylesMap = {
|
|
253
|
+
TA: {
|
|
254
|
+
'B£W': {
|
|
255
|
+
'10': ['c-teal-bg'],
|
|
256
|
+
'13': ['c-teal-bg'],
|
|
257
|
+
'20': ['c-green-bg'],
|
|
258
|
+
'70': ['c-orange-bg'],
|
|
259
|
+
'80': ['c-grey-bg'],
|
|
260
|
+
'90': ['c-purple-bg'],
|
|
261
|
+
},
|
|
262
|
+
'B§A': {
|
|
263
|
+
'§': ['purple-text'],
|
|
264
|
+
A: ['danger-text'],
|
|
265
|
+
B: ['warning-text'],
|
|
266
|
+
C: ['success-text'],
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
if (!obj)
|
|
271
|
+
return '';
|
|
272
|
+
const { t, p, k } = obj;
|
|
273
|
+
const stylesSet = new Set();
|
|
274
|
+
if (cssClass) {
|
|
275
|
+
cssClass
|
|
276
|
+
.split(' ')
|
|
277
|
+
.forEach((singleClass) => stylesSet.add(singleClass));
|
|
278
|
+
}
|
|
279
|
+
const parameterKey = Object.keys(ParameterRelatedStylesMap[t] || {}).find((param) => p.includes(param));
|
|
280
|
+
if (parameterKey) {
|
|
281
|
+
ParameterRelatedStylesMap[t][parameterKey].forEach((style) => stylesSet.add(style));
|
|
282
|
+
if (CodeRelatedStylesMap[t][parameterKey][k]) {
|
|
283
|
+
CodeRelatedStylesMap[t][parameterKey][k].forEach((style) => stylesSet.add(style));
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return Array.from(stylesSet).join(' ');
|
|
287
|
+
},
|
|
239
288
|
};
|
|
240
289
|
this.column = {
|
|
241
290
|
find(dataset, filters) {
|
|
@@ -18,7 +18,6 @@ import { KupTooltip } from "../kup-tooltip/kup-tooltip";
|
|
|
18
18
|
import { setAssetPath } from "@stencil/core";
|
|
19
19
|
import html2canvas from "html2canvas";
|
|
20
20
|
import { KupOpenAI } from "../kup-openai/kup-openai";
|
|
21
|
-
import { KupKeysBinding } from "../kup-keys-binding/kup-keys-binding";
|
|
22
21
|
import { KupPerfTuning } from "../kup-perf-tuning/kup-perf-tuning";
|
|
23
22
|
import { KupPerfMonitoring } from "../kup-perf-monitoring/kup-perf-monitoring";
|
|
24
23
|
import { KupPerfTuningPriority } from "../kup-perf-tuning/kup-perf-tuning-declarations";
|
|
@@ -132,7 +131,6 @@ export class KupManager {
|
|
|
132
131
|
};
|
|
133
132
|
this.theme = new KupTheme(themeList, themeName);
|
|
134
133
|
this.toolbar = new KupToolbar();
|
|
135
|
-
this.keysBinding = new KupKeysBinding();
|
|
136
134
|
this.tooltip = new KupTooltip(tooltipDelay, tooltipFCellCallbacks, tooltipModal);
|
|
137
135
|
this.perfTuning = new KupPerfTuning({
|
|
138
136
|
maxCellsPerPage: Number.MAX_VALUE,
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-ef8cbd35.js';
|
|
2
|
-
import { K as KupManager } from './p-
|
|
2
|
+
import { K as KupManager } from './p-73922583.js';
|
|
3
3
|
|
|
4
4
|
/** used for obtain a KupManager instance without a dom document (for UT) */
|
|
5
5
|
function newKupManager(init) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, d as Host } from './p-ef8cbd35.js';
|
|
2
|
-
import { k as kupManagerInstance, a as KupComponentSizing, g as getProps, s as setProps, b as KupThemeColorValues, c as KupThemeIconValues } from './p-
|
|
3
|
-
import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u } from './p-
|
|
2
|
+
import { k as kupManagerInstance, a as KupComponentSizing, g as getProps, s as setProps, b as KupThemeColorValues, c as KupThemeIconValues } from './p-73922583.js';
|
|
3
|
+
import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u } from './p-e0031e17.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Props of the kup-accordion component.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, F as Fragment, d as Host } from './p-ef8cbd35.js';
|
|
2
|
-
import { k as kupManagerInstance, g as getProps, s as setProps, u as KupDebugCategory, n as getCellValueForDisplay } from './p-
|
|
3
|
-
import { c as componentWrapperId, E as sortRows, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, F as FImage } from './p-
|
|
2
|
+
import { k as kupManagerInstance, g as getProps, s as setProps, u as KupDebugCategory, n as getCellValueForDisplay } from './p-73922583.js';
|
|
3
|
+
import { c as componentWrapperId, E as sortRows, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, F as FImage } from './p-e0031e17.js';
|
|
4
4
|
|
|
5
5
|
var KupActivityTimelineProps;
|
|
6
6
|
(function (KupActivityTimelineProps) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KupAutocomplete$1, D as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KupAutocomplete$1, D as defineCustomElement$1 } from './p-e0031e17.js';
|
|
2
2
|
|
|
3
3
|
const KupAutocomplete = KupAutocomplete$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|