@sme.up/ketchup 10.2.0 → 10.3.0
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-cfdd6703.js} +4 -4
- package/dist/cjs/{f-chip-b936dcaf.js → f-chip-24b1eb58.js} +1 -1
- package/dist/cjs/{f-object-field-348fa103.js → f-object-field-2ffc49c1.js} +2 -2
- package/dist/cjs/{f-paginator-utils-f951cc54.js → f-paginator-utils-51bb9317.js} +1 -1
- package/dist/cjs/{f-text-field-e41f653a.js → f-text-field-5face063.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 +121 -57
- package/dist/cjs/kup-box.cjs.entry.js +11 -8
- package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
- 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-6f4d86ea.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 +5 -5
- package/dist/cjs/kup-input-panel.cjs.entry.js +44 -69
- 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-49d2d8fe.js} +81 -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 +24 -1
- package/dist/collection/components/kup-button/kup-button.js +0 -24
- 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 +94 -24
- package/dist/collection/components/kup-editor/kup-editor.js +8 -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 +47 -31
- package/dist/collection/components/kup-tree/kup-tree.js +42 -12
- 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 +2 -2
- 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 +2 -2
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +44 -68
- 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-7d0f1f90.js → p-1ee81222.js} +118 -52
- package/dist/components/{p-b80494d7.js → p-2a4abe21.js} +2 -2
- package/dist/components/{p-eb8a2811.js → p-66d53743.js} +10 -5
- package/dist/components/{p-b304b91c.js → p-7550d08c.js} +81 -157
- package/dist/components/{p-a0258e6f.js → p-7dd33834.js} +2 -2
- package/dist/components/{p-3438f15f.js → p-c45e24b0.js} +6 -3
- package/dist/esm/{f-cell-6576e009.js → f-cell-fbe84498.js} +4 -4
- package/dist/esm/{f-chip-bb62428a.js → f-chip-35dfafdb.js} +1 -1
- package/dist/esm/{f-object-field-b87b6ae6.js → f-object-field-fa368c87.js} +2 -2
- package/dist/esm/{f-paginator-utils-04903d74.js → f-paginator-utils-d7e6b742.js} +1 -1
- package/dist/esm/{f-text-field-9be88e51.js → f-text-field-dcf09b57.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 +121 -57
- package/dist/esm/kup-box.entry.js +11 -8
- package/dist/esm/kup-calendar.entry.js +2 -2
- 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-537035b9.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 +5 -5
- package/dist/esm/kup-input-panel.entry.js +44 -69
- 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-2b2b7c68.js} +81 -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/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-b365f2f2.entry.js → p-058d9f3a.entry.js} +1 -1
- package/dist/ketchup/{p-42a1f9ec.entry.js → p-0866ddcf.entry.js} +1 -1
- package/dist/ketchup/{p-e104cfb7.js → p-0a60f2ec.js} +1 -1
- package/dist/ketchup/{p-838d8e97.js → p-0f7a8165.js} +1 -1
- package/dist/ketchup/{p-f8a027a1.entry.js → p-13f159d6.entry.js} +1 -1
- package/dist/ketchup/{p-a597a851.entry.js → p-19689040.entry.js} +1 -1
- package/dist/ketchup/p-1f32300c.entry.js +1 -0
- package/dist/ketchup/{p-55b0991f.entry.js → p-2020fbaf.entry.js} +1 -1
- package/dist/ketchup/{p-07f50333.entry.js → p-328896f0.entry.js} +1 -1
- package/dist/ketchup/{p-6fc1bb18.entry.js → p-32aa082e.entry.js} +1 -1
- package/dist/ketchup/{p-9b907768.entry.js → p-35e03e2f.entry.js} +1 -1
- package/dist/ketchup/{p-58002a23.entry.js → p-3aa35543.entry.js} +1 -1
- package/dist/ketchup/{p-9edd90c2.entry.js → p-3c882916.entry.js} +1 -1
- package/dist/ketchup/{p-15f192f0.entry.js → p-3eb4daa3.entry.js} +1 -1
- package/dist/ketchup/{p-5d9f2d24.entry.js → p-4418988a.entry.js} +1 -1
- package/dist/ketchup/{p-d084b2d4.entry.js → p-446fedb6.entry.js} +1 -1
- package/dist/ketchup/{p-267d1898.js → p-45d34ba7.js} +1 -1
- package/dist/ketchup/{p-d0554d1f.entry.js → p-4a44bef2.entry.js} +1 -1
- package/dist/ketchup/{p-9bc02da6.entry.js → p-4a6c6bf4.entry.js} +1 -1
- package/dist/ketchup/{p-fdcb43a2.entry.js → p-63117858.entry.js} +1 -1
- package/dist/ketchup/{p-92431583.entry.js → p-6714d68a.entry.js} +1 -1
- package/dist/ketchup/{p-8be42f5c.js → p-6eb5f3da.js} +1 -1
- package/dist/ketchup/{p-fb775526.entry.js → p-7722245b.entry.js} +1 -1
- package/dist/ketchup/{p-100b8ae7.entry.js → p-7b45a31b.entry.js} +1 -1
- package/dist/ketchup/{p-d8dbf3df.entry.js → p-8932614c.entry.js} +2 -2
- package/dist/ketchup/{p-c2ccbaca.entry.js → p-8a8da47d.entry.js} +1 -1
- package/dist/ketchup/{p-da44226a.entry.js → p-8feabbf8.entry.js} +1 -1
- package/dist/ketchup/p-97d8720e.entry.js +1 -0
- package/dist/ketchup/{p-6d628b49.entry.js → p-bce5be1c.entry.js} +1 -1
- package/dist/ketchup/{p-e4fa2cf3.js → p-cd73eaec.js} +2 -2
- package/dist/ketchup/{p-e6afa8a6.entry.js → p-d7d84da0.entry.js} +1 -1
- package/dist/ketchup/{p-0de49966.entry.js → p-e695fd91.entry.js} +1 -1
- package/dist/ketchup/p-e6be6193.entry.js +9 -0
- package/dist/ketchup/{p-0b1e0b48.js → p-e78670d8.js} +1 -1
- package/dist/ketchup/{p-a4b6d6c5.js → p-eaabc269.js} +1 -1
- package/dist/ketchup/{p-4ffc1a88.entry.js → p-f69679df.entry.js} +1 -1
- package/dist/ketchup/p-f69923dd.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 +2 -0
- 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 +36 -4
- 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-2d84c26e.entry.js +0 -1
- package/dist/ketchup/p-3dbafa20.entry.js +0 -9
- package/dist/ketchup/p-3e42953b.entry.js +0 -1
- package/dist/ketchup/p-65b23870.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
|
@@ -32,7 +32,6 @@ export class KupButton {
|
|
|
32
32
|
this.toggable = false;
|
|
33
33
|
this.trailingIcon = false;
|
|
34
34
|
this.sizing = KupComponentSizing.SMALL;
|
|
35
|
-
this.keyShortcut = undefined;
|
|
36
35
|
}
|
|
37
36
|
onKupBlur() {
|
|
38
37
|
this.kupBlur.emit({
|
|
@@ -115,9 +114,6 @@ export class KupButton {
|
|
|
115
114
|
else {
|
|
116
115
|
this.value = 'N/A';
|
|
117
116
|
}
|
|
118
|
-
if (this.keyShortcut && !this.disabled) {
|
|
119
|
-
this.kupManager.keysBinding.register(this.keyShortcut, this.onKupClick.bind(this));
|
|
120
|
-
}
|
|
121
117
|
}
|
|
122
118
|
componentDidRender() {
|
|
123
119
|
this.kupManager.debug.logRender(this, true);
|
|
@@ -187,9 +183,6 @@ export class KupButton {
|
|
|
187
183
|
}
|
|
188
184
|
disconnectedCallback() {
|
|
189
185
|
this.kupManager.theme.unregister(this);
|
|
190
|
-
if (this.keyShortcut) {
|
|
191
|
-
this.kupManager.keysBinding.unregister(this.keyShortcut);
|
|
192
|
-
}
|
|
193
186
|
}
|
|
194
187
|
static get is() { return "kup-button"; }
|
|
195
188
|
static get encapsulation() { return "shadow"; }
|
|
@@ -540,23 +533,6 @@ export class KupButton {
|
|
|
540
533
|
"attribute": "sizing",
|
|
541
534
|
"reflect": false,
|
|
542
535
|
"defaultValue": "KupComponentSizing.SMALL"
|
|
543
|
-
},
|
|
544
|
-
"keyShortcut": {
|
|
545
|
-
"type": "string",
|
|
546
|
-
"mutable": false,
|
|
547
|
-
"complexType": {
|
|
548
|
-
"original": "string",
|
|
549
|
-
"resolved": "string",
|
|
550
|
-
"references": {}
|
|
551
|
-
},
|
|
552
|
-
"required": false,
|
|
553
|
-
"optional": false,
|
|
554
|
-
"docs": {
|
|
555
|
-
"tags": [],
|
|
556
|
-
"text": ""
|
|
557
|
-
},
|
|
558
|
-
"attribute": "key-shortcut",
|
|
559
|
-
"reflect": false
|
|
560
536
|
}
|
|
561
537
|
};
|
|
562
538
|
}
|
|
@@ -17,4 +17,5 @@ export var KupComboboxProps;
|
|
|
17
17
|
KupComboboxProps["label"] = "When set, its content will be shown as a label.";
|
|
18
18
|
KupComboboxProps["leadingLabel"] = "When set to true, the label will be on the left of the component.";
|
|
19
19
|
KupComboboxProps["showMarker"] = "When true shows a small marker on the component";
|
|
20
|
+
KupComboboxProps["legacyLook"] = "When true enables the monospaced look for the CMB component";
|
|
20
21
|
})(KupComboboxProps || (KupComboboxProps = {}));
|
|
@@ -62,6 +62,7 @@ export class KupCombobox {
|
|
|
62
62
|
this.sizing = KupComponentSizing.SMALL;
|
|
63
63
|
this.trailingIcon = false;
|
|
64
64
|
this.showMarker = false;
|
|
65
|
+
this.legacyLook = false;
|
|
65
66
|
}
|
|
66
67
|
onKupBlur() {
|
|
67
68
|
if (!__classPrivateFieldGet(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
@@ -306,10 +307,11 @@ export class KupCombobox {
|
|
|
306
307
|
? true
|
|
307
308
|
: false,
|
|
308
309
|
showMarker: this.showMarker,
|
|
310
|
+
legacyLook: this.legacyLook,
|
|
309
311
|
};
|
|
310
312
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
311
313
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
312
|
-
return (h(Host, { key: '
|
|
314
|
+
return (h(Host, { key: 'd724bfd8c4b33e0756be8a9669d218e7a3f15dd9', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet(this, _KupCombobox_elStyle, "f") }, h("style", { key: '2115e4d44f5d28d72de809e98818e81e14f955b3' }, __classPrivateFieldGet(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'd907dc96d2dbf1c680ce181f868be5daea0f6f1f', id: componentWrapperId, style: __classPrivateFieldGet(this, _KupCombobox_elStyle, "f") }, h(FTextField, Object.assign({ key: 'b305bb5e3f2408217ff82abf854d82a3caca5886' }, props, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, trailingIcon: true, icon: this.showDropDownIcon
|
|
313
315
|
? KupThemeIconValues.DROPDOWN
|
|
314
316
|
: null, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupIconClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)));
|
|
315
317
|
}
|
|
@@ -756,6 +758,27 @@ export class KupCombobox {
|
|
|
756
758
|
"attribute": "show-marker",
|
|
757
759
|
"reflect": false,
|
|
758
760
|
"defaultValue": "false"
|
|
761
|
+
},
|
|
762
|
+
"legacyLook": {
|
|
763
|
+
"type": "boolean",
|
|
764
|
+
"mutable": false,
|
|
765
|
+
"complexType": {
|
|
766
|
+
"original": "boolean",
|
|
767
|
+
"resolved": "boolean",
|
|
768
|
+
"references": {}
|
|
769
|
+
},
|
|
770
|
+
"required": false,
|
|
771
|
+
"optional": false,
|
|
772
|
+
"docs": {
|
|
773
|
+
"tags": [{
|
|
774
|
+
"name": "default",
|
|
775
|
+
"text": "false"
|
|
776
|
+
}],
|
|
777
|
+
"text": "Allows legacyLook aspect in CMB."
|
|
778
|
+
},
|
|
779
|
+
"attribute": "legacy-look",
|
|
780
|
+
"reflect": false,
|
|
781
|
+
"defaultValue": "false"
|
|
759
782
|
}
|
|
760
783
|
};
|
|
761
784
|
}
|
|
@@ -169,10 +169,11 @@ export class KupDataTable {
|
|
|
169
169
|
});
|
|
170
170
|
//======== Event Listeners ========
|
|
171
171
|
_KupDataTable_horNav.set(this, (isRight) => {
|
|
172
|
-
if (!__classPrivateFieldGet(this, _KupDataTable_lastFocusedCell, "f")
|
|
172
|
+
if (!__classPrivateFieldGet(this, _KupDataTable_lastFocusedCell, "f") ||
|
|
173
|
+
this.selection == SelectionMode.MULTIPLE) {
|
|
173
174
|
return;
|
|
174
175
|
}
|
|
175
|
-
|
|
176
|
+
//this.#resetSelectedRows(true);
|
|
176
177
|
const tr = __classPrivateFieldGet(this, _KupDataTable_lastFocusedCell, "f").element.closest('tr:not(.group)');
|
|
177
178
|
const cells = tr.querySelectorAll('.f-cell');
|
|
178
179
|
const oldIndex = Array.from(cells).indexOf(__classPrivateFieldGet(this, _KupDataTable_lastFocusedCell, "f").element);
|
|
@@ -185,14 +186,15 @@ export class KupDataTable {
|
|
|
185
186
|
}
|
|
186
187
|
const focused = cells[newIndex];
|
|
187
188
|
const focusedProps = focused['kup-get-cell-props']();
|
|
188
|
-
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, focusedProps.row, focused.closest('td'),
|
|
189
|
+
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, focusedProps.row, focused.closest('td'), true, true);
|
|
189
190
|
__classPrivateFieldSet(this, _KupDataTable_lastFocusedCell, focusedProps.cell, "f");
|
|
190
191
|
});
|
|
191
192
|
_KupDataTable_verNav.set(this, (isDown) => {
|
|
192
|
-
if (!__classPrivateFieldGet(this, _KupDataTable_lastFocusedCell, "f")
|
|
193
|
+
if (!__classPrivateFieldGet(this, _KupDataTable_lastFocusedCell, "f") ||
|
|
194
|
+
this.selection == SelectionMode.MULTIPLE) {
|
|
193
195
|
return;
|
|
194
196
|
}
|
|
195
|
-
|
|
197
|
+
//this.#resetSelectedRows(true);
|
|
196
198
|
const tr = __classPrivateFieldGet(this, _KupDataTable_lastFocusedCell, "f").element.closest('tr:not(.group)');
|
|
197
199
|
const cellXIndex = Array.from(tr.querySelectorAll('.f-cell')).indexOf(__classPrivateFieldGet(this, _KupDataTable_lastFocusedCell, "f").element);
|
|
198
200
|
const rows = tr.parentElement.querySelectorAll('tr:not(.group)');
|
|
@@ -209,7 +211,7 @@ export class KupDataTable {
|
|
|
209
211
|
const focused = focusedCells[cellXIndex];
|
|
210
212
|
const focusedProps = focused['kup-get-cell-props']();
|
|
211
213
|
__classPrivateFieldSet(this, _KupDataTable_lastFocusedCell, focusedProps.cell, "f");
|
|
212
|
-
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, focusedProps.row, focused.closest('td'),
|
|
214
|
+
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, focusedProps.row, focused.closest('td'), true, true);
|
|
213
215
|
});
|
|
214
216
|
_KupDataTable_onKupKeyDown.set(this, (e) => {
|
|
215
217
|
const isHorizontal = e.key === 'ArrowLeft' || e.key === 'ArrowRight';
|
|
@@ -509,6 +511,9 @@ export class KupDataTable {
|
|
|
509
511
|
* Collapses all groups.
|
|
510
512
|
*/
|
|
511
513
|
async collapseAll() {
|
|
514
|
+
if (!this.expandGroups) {
|
|
515
|
+
this.expandGroupsHandler();
|
|
516
|
+
}
|
|
512
517
|
this.expandGroups = false;
|
|
513
518
|
}
|
|
514
519
|
/**
|
|
@@ -608,6 +613,9 @@ export class KupDataTable {
|
|
|
608
613
|
* Expands all groups.
|
|
609
614
|
*/
|
|
610
615
|
async expandAll() {
|
|
616
|
+
if (this.expandGroups) {
|
|
617
|
+
this.expandGroupsHandler();
|
|
618
|
+
}
|
|
611
619
|
this.expandGroups = true;
|
|
612
620
|
}
|
|
613
621
|
/**
|
|
@@ -643,6 +651,11 @@ export class KupDataTable {
|
|
|
643
651
|
if ((_a = this.visibleColumns) === null || _a === void 0 ? void 0 : _a.length) {
|
|
644
652
|
this.visibleColumns = this.visibleColumns.filter((colName) => colName != column.name);
|
|
645
653
|
}
|
|
654
|
+
else {
|
|
655
|
+
this.visibleColumns = this.data.columns
|
|
656
|
+
.filter((col) => col.name != column.name && col.visible)
|
|
657
|
+
.map((col) => col.name);
|
|
658
|
+
}
|
|
646
659
|
this.kupColumnRemove.emit({
|
|
647
660
|
comp: this,
|
|
648
661
|
id: this.rootElement.id,
|
|
@@ -904,7 +917,10 @@ export class KupDataTable {
|
|
|
904
917
|
const id = rowIdentifier;
|
|
905
918
|
const row = __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, id);
|
|
906
919
|
if (row) {
|
|
907
|
-
const
|
|
920
|
+
const start = (this.currentPage - 1) * this.currentRowsPerPage;
|
|
921
|
+
const end = this.currentPage * this.currentRowsPerPage;
|
|
922
|
+
const index = __classPrivateFieldGet(this, _KupDataTable_rows, "f").indexOf(row) % (end - start);
|
|
923
|
+
const idx = index - this.calculateScrollToRowOffset();
|
|
908
924
|
if (idx >= 1) {
|
|
909
925
|
(_a = __classPrivateFieldGet(this, _KupDataTable_rowsRefs, "f")[idx]) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
|
|
910
926
|
}
|
|
@@ -947,6 +963,20 @@ export class KupDataTable {
|
|
|
947
963
|
details: __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_tooltipRequestHandler).call(this),
|
|
948
964
|
});
|
|
949
965
|
}
|
|
966
|
+
/**
|
|
967
|
+
* Trigger update from outside
|
|
968
|
+
* @param {string} commandId - When provided, will trigger onclick event of command instead of *UPDATE
|
|
969
|
+
*/
|
|
970
|
+
async update(commandId) {
|
|
971
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
972
|
+
if (!commandId) {
|
|
973
|
+
__classPrivateFieldGet(this, _KupDataTable_handleUpdateClick, "f").call(this);
|
|
974
|
+
}
|
|
975
|
+
const command = (_h = (_d = (_c = (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.setup) === null || _b === void 0 ? void 0 : _b.commands) === null || _c === void 0 ? void 0 : _c.find((cmd) => { var _a; return ((_a = cmd.obj) === null || _a === void 0 ? void 0 : _a.k) === commandId; })) !== null && _d !== void 0 ? _d : (_g = (_f = (_e = this.data) === null || _e === void 0 ? void 0 : _e.setup) === null || _f === void 0 ? void 0 : _f.commands) === null || _g === void 0 ? void 0 : _g.flatMap((cmd) => cmd.children).find((child) => { var _a; return ((_a = child === null || child === void 0 ? void 0 : child.obj) === null || _a === void 0 ? void 0 : _a.k) === commandId; })) !== null && _h !== void 0 ? _h : null;
|
|
976
|
+
if (command) {
|
|
977
|
+
__classPrivateFieldGet(this, _KupDataTable_handleUpdateClick, "f").call(this, command);
|
|
978
|
+
}
|
|
979
|
+
}
|
|
950
980
|
//#region LISTENERS
|
|
951
981
|
/*-------------------------------------------------*/
|
|
952
982
|
/* L i s t e n e r s */
|
|
@@ -1052,6 +1082,14 @@ export class KupDataTable {
|
|
|
1052
1082
|
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_didRenderObservers).call(this);
|
|
1053
1083
|
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_didRenderInteractables).call(this);
|
|
1054
1084
|
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, false);
|
|
1085
|
+
// scroll to row if current page contains selected rows
|
|
1086
|
+
if (this.state.rowsPerPage != this.currentRowsPerPage) {
|
|
1087
|
+
__classPrivateFieldGet(this, _KupDataTable_paginatedRows, "f").forEach((row) => {
|
|
1088
|
+
if (this.selectedRows.includes(row)) {
|
|
1089
|
+
this.scrollToRow(row.id);
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1055
1093
|
if (this.headerIsPersistent &&
|
|
1056
1094
|
this.tableHeight === undefined &&
|
|
1057
1095
|
this.tableWidth === undefined) {
|
|
@@ -1406,12 +1444,9 @@ export class KupDataTable {
|
|
|
1406
1444
|
let elStyle = undefined;
|
|
1407
1445
|
let actionWrapperWidth = undefined;
|
|
1408
1446
|
__classPrivateFieldSet(this, _KupDataTable_sizedColumns, __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_getSizedColumns).call(this), "f");
|
|
1409
|
-
if (this.updatableData) {
|
|
1410
|
-
__classPrivateFieldGet(this, _KupDataTable_kupManager, "f").keysBinding.unregister('enter');
|
|
1411
|
-
}
|
|
1412
1447
|
let rows = null;
|
|
1413
1448
|
if (__classPrivateFieldGet(this, _KupDataTable_paginatedRowsLength, "f") === 0) {
|
|
1414
|
-
rows = (h("tr", { key: '
|
|
1449
|
+
rows = (h("tr", { key: '7eef3ae6950132812cd62cdab017b45c3e31b9ed', ref: (el) => __classPrivateFieldGet(this, _KupDataTable_rowsRefs, "f").push(el) }, h("td", { key: '7f7c90376e2069e412fb7a993f6449e0785948a5', colSpan: __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
|
|
1415
1450
|
}
|
|
1416
1451
|
else {
|
|
1417
1452
|
rows = [];
|
|
@@ -1476,7 +1511,7 @@ export class KupDataTable {
|
|
|
1476
1511
|
for (let i = 0; i < chipsData.length; i++) {
|
|
1477
1512
|
props.onIconClick.push(() => __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_removeGroup).call(this, i));
|
|
1478
1513
|
}
|
|
1479
|
-
groupChips = h(FChip, Object.assign({ key: '
|
|
1514
|
+
groupChips = h(FChip, Object.assign({ key: 'ddf47ea9fa13713dda0d38a74745bf5f38d5fb20' }, props));
|
|
1480
1515
|
}
|
|
1481
1516
|
}
|
|
1482
1517
|
const tableClass = {
|
|
@@ -1508,7 +1543,7 @@ export class KupDataTable {
|
|
|
1508
1543
|
if (this.headerIsPersistent &&
|
|
1509
1544
|
this.tableHeight === undefined &&
|
|
1510
1545
|
this.tableWidth === undefined) {
|
|
1511
|
-
stickyEl = (h("sticky-header", { key: '
|
|
1546
|
+
stickyEl = (h("sticky-header", { key: '7c20a020914556afb9bf43d55fb44785314adc8d', class: "hover-scrolling-child", hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_stickyTheadRef, el, "f")) }, h("thead-sticky", { key: '23f35a1c9fe85161340aac63bf57b90895757330' }, h("tr-sticky", { key: '6da73ed8cb9d86f775d37530025a6781cdd86577' }, stickyHeader))));
|
|
1512
1547
|
}
|
|
1513
1548
|
let belowClass = 'below-wrapper';
|
|
1514
1549
|
if (!!this.tableHeight || !!this.tableWidth) {
|
|
@@ -1554,7 +1589,7 @@ export class KupDataTable {
|
|
|
1554
1589
|
const useGlobalFilter = !this.legacyLook &&
|
|
1555
1590
|
(this.globalFilter ||
|
|
1556
1591
|
this.getRows().length > __classPrivateFieldGet(this, _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER, "f"));
|
|
1557
|
-
const compCreated = (h(Host, { key: '
|
|
1592
|
+
const compCreated = (h(Host, { key: 'dd42df36afe474f8f9d686a210c5dc84ab97a824', "onKup-drop": (e) => {
|
|
1558
1593
|
this.kupDataTableDrop.emit(e.detail);
|
|
1559
1594
|
}, "onKup-cell-input": (e) => {
|
|
1560
1595
|
autoselectOnAction(e);
|
|
@@ -1569,11 +1604,11 @@ export class KupDataTable {
|
|
|
1569
1604
|
this.kupDataTableObjectFieldOpenSearchMenu.emit(e.detail);
|
|
1570
1605
|
}, "onKup-objectfield-selectedmenuitem": (e) => {
|
|
1571
1606
|
this.kupDataTableObjectFieldSelectedMenuItem.emit(e.detail);
|
|
1572
|
-
} }, h("style", { key: '
|
|
1607
|
+
} }, h("style", { key: '1a75edc1127c828ddbf65871b317a4e252a56817' }, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), this.updatableData ? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_renderUpdateButtons).call(this) : null, h("div", { key: 'cd725be0317588ca73a9ba494a943a053ec04944', id: componentWrapperId, class: wrapClass }, h("div", { key: '748e91f02e5be185e47495d0fe1e837b43c4458b', class: "group-wrapper" }, groupChips), h("div", { key: '835ec96f8d12b1a0b56ccd9b41e92af93b74f87f', class: "actions-wrapper", style: actionWrapperWidth }, useGlobalFilter ? (h("div", { id: "global-filter" }, h(FTextField, { fullWidth: true, icon: KupThemeIconValues.SEARCH, label: __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), sizing: KupComponentSizing.EXTRA_SMALL, value: this.globalFilterValue, onInput: (event) => {
|
|
1573
1608
|
const t = event.target;
|
|
1574
1609
|
window.clearTimeout(__classPrivateFieldGet(this, _KupDataTable_globalFilterTimeout, "f"));
|
|
1575
1610
|
__classPrivateFieldSet(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
|
|
1576
|
-
} }))) : null, h("div", { key: '
|
|
1611
|
+
} }))) : null, h("div", { key: 'a673be7f9896b48cbc9a47d13b0190331218714c', class: "above-wrapper paginator-top" }, paginatorTop), this.insertMode !== '' &&
|
|
1577
1612
|
this.selectedRows.length > 0 ? (h(FButton, { icon: "save", onClick: () => {
|
|
1578
1613
|
this.kupSave.emit({
|
|
1579
1614
|
comp: this,
|
|
@@ -1623,9 +1658,9 @@ export class KupDataTable {
|
|
|
1623
1658
|
this.data.rows.unshift(row);
|
|
1624
1659
|
await this.refresh(true);
|
|
1625
1660
|
}
|
|
1626
|
-
}, sizing: KupComponentSizing.MEDIUM, styling: FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), h("div", { key: '
|
|
1661
|
+
}, sizing: KupComponentSizing.MEDIUM, styling: FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), h("div", { key: '4b9a4bd09ed310f5cfe958cbceaa089b832a5317', class: "droparea", ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
|
|
1627
1662
|
? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_columnRemoveArea).call(this)
|
|
1628
|
-
: null), h("div", { key: '
|
|
1663
|
+
: null), h("div", { key: 'e78f7ff2cd55da1cc6caaed010545d57bbe7c397', style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
|
|
1629
1664
|
? [
|
|
1630
1665
|
h("div", { class: "settings-trigger", onClick: () => {
|
|
1631
1666
|
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onCustomSettingsClick).call(this);
|
|
@@ -1634,7 +1669,7 @@ export class KupDataTable {
|
|
|
1634
1669
|
} }, h(FImage, { color: `var(${KupThemeColorValues.TITLE})`, resource: "settings", sizeX: "10px" })),
|
|
1635
1670
|
this.renderCustomizePanel(),
|
|
1636
1671
|
]
|
|
1637
|
-
: null, h("table", { key: '
|
|
1672
|
+
: null, h("table", { key: '1708aaac7a54c1fbe304afbe73afc6f16b5d8a1d', class: tableClass, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_tableRef, el, "f")), onKeyDown: (e) => __classPrivateFieldGet(this, _KupDataTable_onKupKeyDown, "f").call(this, e), onMouseLeave: (ev) => {
|
|
1638
1673
|
ev.stopPropagation();
|
|
1639
1674
|
}, onPointerDown: (e) => {
|
|
1640
1675
|
__classPrivateFieldSet(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
|
|
@@ -1642,7 +1677,7 @@ export class KupDataTable {
|
|
|
1642
1677
|
__classPrivateFieldSet(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
|
|
1643
1678
|
}, onContextMenu: (e) => {
|
|
1644
1679
|
e.preventDefault();
|
|
1645
|
-
} }, h("thead", { key: '
|
|
1680
|
+
} }, h("thead", { key: '7bcd8e5d8a458c8e7ca4c338b02e4ba4b56aae15', hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_theadRef, el, "f")) }, h("tr", { key: 'b028215a4df0c4613d06ecce1aed1efcf094ec3a' }, header)), h("tbody", { key: 'bdc9191bd0c388075b674644114b65e8d0d0ebff' }, rows), this.showFooter && this.renderFooter()), stickyEl), paginatorBottom)));
|
|
1646
1681
|
__classPrivateFieldGet(this, _KupDataTable_kupManager, "f").perfMonitoring.measure('componentRender', 'kup-data-table');
|
|
1647
1682
|
return compCreated;
|
|
1648
1683
|
}
|
|
@@ -4227,6 +4262,30 @@ export class KupDataTable {
|
|
|
4227
4262
|
"tags": []
|
|
4228
4263
|
}
|
|
4229
4264
|
},
|
|
4265
|
+
"update": {
|
|
4266
|
+
"complexType": {
|
|
4267
|
+
"signature": "(commandId?: string) => Promise<void>",
|
|
4268
|
+
"parameters": [{
|
|
4269
|
+
"name": "commandId",
|
|
4270
|
+
"type": "string",
|
|
4271
|
+
"docs": "- When provided, will trigger onclick event of command instead of *UPDATE"
|
|
4272
|
+
}],
|
|
4273
|
+
"references": {
|
|
4274
|
+
"Promise": {
|
|
4275
|
+
"location": "global",
|
|
4276
|
+
"id": "global::Promise"
|
|
4277
|
+
}
|
|
4278
|
+
},
|
|
4279
|
+
"return": "Promise<void>"
|
|
4280
|
+
},
|
|
4281
|
+
"docs": {
|
|
4282
|
+
"text": "Trigger update from outside",
|
|
4283
|
+
"tags": [{
|
|
4284
|
+
"name": "param",
|
|
4285
|
+
"text": "commandId - When provided, will trigger onclick event of command instead of *UPDATE"
|
|
4286
|
+
}]
|
|
4287
|
+
}
|
|
4288
|
+
},
|
|
4230
4289
|
"getInternalState": {
|
|
4231
4290
|
"complexType": {
|
|
4232
4291
|
"signature": "() => Promise<{ groups: GroupObject[]; filters: GenericFilter; data: KupDataTableDataset; }>",
|
|
@@ -5932,7 +5991,6 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
5932
5991
|
if (this.currentPage > numberOfPages) {
|
|
5933
5992
|
// reset page
|
|
5934
5993
|
this.currentPage = 1;
|
|
5935
|
-
this.resetCurrentPage();
|
|
5936
5994
|
}
|
|
5937
5995
|
}, _KupDataTable_setCellEditability = function _KupDataTable_setCellEditability(column, row, cell) {
|
|
5938
5996
|
if (column.useAs) {
|
|
@@ -6110,6 +6168,12 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
6110
6168
|
const newPage = pageChange(pageNumber, __classPrivateFieldGet(this, _KupDataTable_rowsLength, "f"), this.currentRowsPerPage);
|
|
6111
6169
|
if (newPage) {
|
|
6112
6170
|
this.currentPage = newPage;
|
|
6171
|
+
// scroll to row if current page contains selected rows
|
|
6172
|
+
__classPrivateFieldGet(this, _KupDataTable_paginatedRows, "f").forEach((row) => {
|
|
6173
|
+
if (this.selectedRows.includes(row)) {
|
|
6174
|
+
this.scrollToRow(row.id);
|
|
6175
|
+
}
|
|
6176
|
+
});
|
|
6113
6177
|
}
|
|
6114
6178
|
}, _KupDataTable_handleRowsPerPageChange = function _KupDataTable_handleRowsPerPageChange(rowsNumber) {
|
|
6115
6179
|
const newRows = rowsPerPageChange(rowsNumber, __classPrivateFieldGet(this, _KupDataTable_rowsLength, "f"));
|
|
@@ -6117,7 +6181,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
6117
6181
|
this.currentRowsPerPage = newRows;
|
|
6118
6182
|
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_adjustPaginator).call(this);
|
|
6119
6183
|
}
|
|
6120
|
-
}, _KupDataTable_onRowClick = function _KupDataTable_onRowClick(row, td, emitEvent) {
|
|
6184
|
+
}, _KupDataTable_onRowClick = function _KupDataTable_onRowClick(row, td, emitEvent, isKeyboardNav = false) {
|
|
6121
6185
|
// selecting row
|
|
6122
6186
|
if (!row.unselectable) {
|
|
6123
6187
|
switch (this.selection) {
|
|
@@ -6158,6 +6222,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
6158
6222
|
selectedRows: this.selectedRows,
|
|
6159
6223
|
clickedRow: row,
|
|
6160
6224
|
clickedColumn,
|
|
6225
|
+
isKeyboardNav,
|
|
6161
6226
|
});
|
|
6162
6227
|
}
|
|
6163
6228
|
}
|
|
@@ -6356,6 +6421,12 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
6356
6421
|
const sortedName = this.visibleColumns.splice(sIdx, 1)[0];
|
|
6357
6422
|
this.visibleColumns.splice(rIdx, 0, sortedName);
|
|
6358
6423
|
}
|
|
6424
|
+
else {
|
|
6425
|
+
// // Adds the sorted column to visibleColumns to preserve the current column order.
|
|
6426
|
+
this.visibleColumns = this.data.columns
|
|
6427
|
+
.filter((col) => col.visible)
|
|
6428
|
+
.map((col) => col.name);
|
|
6429
|
+
}
|
|
6359
6430
|
}, _KupDataTable_moveSortedColumns = function _KupDataTable_moveSortedColumns(columns, receivingColumnIndex, sortedColumnIndex) {
|
|
6360
6431
|
const remove = columns.splice(sortedColumnIndex, 1);
|
|
6361
6432
|
columns.splice(receivingColumnIndex, 0, remove[0]);
|
|
@@ -7055,8 +7126,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
7055
7126
|
this.showGrid = grid;
|
|
7056
7127
|
} })));
|
|
7057
7128
|
}, _KupDataTable_renderCommandButton = function _KupDataTable_renderCommandButton(commandObj, styling) {
|
|
7058
|
-
|
|
7059
|
-
return (h("kup-button", { styling: styling, "onKup-button-click": () => __classPrivateFieldGet(this, _KupDataTable_handleUpdateClick, "f").call(this, commandObj), keyShortcut: (_a = commandObj.data) === null || _a === void 0 ? void 0 : _a.keyShortcut, icon: commandObj.icon, label: commandObj.value }));
|
|
7129
|
+
return (h("kup-button", { styling: styling, "onKup-button-click": () => __classPrivateFieldGet(this, _KupDataTable_handleUpdateClick, "f").call(this, commandObj), icon: commandObj.icon, label: commandObj.value }));
|
|
7060
7130
|
}, _KupDataTable_renderCommandDropDownButton = function _KupDataTable_renderCommandDropDownButton(commandObj, styling) {
|
|
7061
7131
|
const data = {
|
|
7062
7132
|
'kup-list': {
|
|
@@ -305,8 +305,13 @@ export class KupEditor {
|
|
|
305
305
|
}, this.autosaveTimer), "f");
|
|
306
306
|
}
|
|
307
307
|
onEditorSave() {
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
if (__classPrivateFieldGet(this, _KupEditor_hasChanges, "f")) {
|
|
309
|
+
this.editor
|
|
310
|
+
.getUI()
|
|
311
|
+
.getToolbar()
|
|
312
|
+
.removeItem(__classPrivateFieldGet(this, _KupEditor_unsavedChangesIndex, "f"));
|
|
313
|
+
__classPrivateFieldSet(this, _KupEditor_hasChanges, false, "f");
|
|
314
|
+
}
|
|
310
315
|
this.kupSave.emit(this.getSaveAndAutoSaveProps());
|
|
311
316
|
}
|
|
312
317
|
onEditorAutoSave() {
|
|
@@ -395,7 +400,7 @@ export class KupEditor {
|
|
|
395
400
|
__classPrivateFieldGet(this, _KupEditor_kupManager, "f").debug.logRender(this, true);
|
|
396
401
|
}
|
|
397
402
|
render() {
|
|
398
|
-
return (h(Host, { key: '
|
|
403
|
+
return (h(Host, { key: 'e7af368e1134de8874c2791b82291bc5391bff6d' }, h("div", { key: '0faeedec267b850a027ce153adaf116c8dbe0a82', id: componentWrapperId }, h("div", { key: this.rootElement.id, ref: (el) => (this.editorRef = el), class: "kup-editor" }))));
|
|
399
404
|
}
|
|
400
405
|
disconnectedCallback() {
|
|
401
406
|
__classPrivateFieldGet(this, _KupEditor_kupManager, "f").theme.unregister(this);
|
|
@@ -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
|
+
};
|