@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
|
@@ -14,7 +14,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
14
14
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
15
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
16
|
};
|
|
17
|
-
var _KupBox_instances, _KupBox_checkUpdateState, _KupBox_intObserver, _KupBox_rowsRefs, _KupBox_navBarHeight, _KupBox_loadMoreEventCounter, _KupBox_loadMoreEventPreviousQuantity, _KupBox_didRenderObservers, _KupBox_setObserver, _KupBox_onLoadMoreClick;
|
|
17
|
+
var _KupBox_instances, _KupBox_checkUpdateState, _KupBox_kupManager, _KupBox_intObserver, _KupBox_rowsRefs, _KupBox_navBarHeight, _KupBox_loadMoreEventCounter, _KupBox_loadMoreEventPreviousQuantity, _KupBox_didRenderObservers, _KupBox_setObserver, _KupBox_onLoadMoreClick;
|
|
18
18
|
import { forceUpdate, h, Host, } from "@stencil/core";
|
|
19
19
|
import { SortMode, } from "../kup-data-table/kup-data-table-declarations";
|
|
20
20
|
import { KupBoxProps, LoadMoreMode, } from "./kup-box-declarations";
|
|
@@ -44,8 +44,7 @@ export class KupBox {
|
|
|
44
44
|
/**
|
|
45
45
|
* Instance of the KupManager class.
|
|
46
46
|
*/
|
|
47
|
-
this
|
|
48
|
-
this.visibleColumns = [];
|
|
47
|
+
_KupBox_kupManager.set(this, kupManagerInstance());
|
|
49
48
|
this.rows = [];
|
|
50
49
|
this.filteredRows = [];
|
|
51
50
|
this.sectionRef = null;
|
|
@@ -95,13 +94,14 @@ export class KupBox {
|
|
|
95
94
|
this.stateId = '';
|
|
96
95
|
this.store = undefined;
|
|
97
96
|
this.swipeDisabled = false;
|
|
97
|
+
this.visibleColumns = undefined;
|
|
98
98
|
}
|
|
99
99
|
initWithPersistedState() {
|
|
100
100
|
if (this.store && this.stateId) {
|
|
101
101
|
this.state.load = true;
|
|
102
102
|
const state = this.store.getState(this.stateId);
|
|
103
103
|
if (state != null) {
|
|
104
|
-
this.
|
|
104
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").debug.logMessage(this, 'Initialize with state for stateId ' +
|
|
105
105
|
this.stateId +
|
|
106
106
|
': ' +
|
|
107
107
|
state);
|
|
@@ -124,7 +124,7 @@ export class KupBox {
|
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
126
|
if (somethingChanged) {
|
|
127
|
-
this.
|
|
127
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").debug.logMessage(this, 'Persisting stateId ' + this.stateId);
|
|
128
128
|
this.store.persistState(this.stateId, this.state);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
@@ -140,7 +140,6 @@ export class KupBox {
|
|
|
140
140
|
}
|
|
141
141
|
onDataChanged() {
|
|
142
142
|
identify(this.getRows());
|
|
143
|
-
this.initVisibleColumns();
|
|
144
143
|
this.initRows();
|
|
145
144
|
this.checkLayout();
|
|
146
145
|
}
|
|
@@ -187,13 +186,24 @@ export class KupBox {
|
|
|
187
186
|
? this.data.columns
|
|
188
187
|
: [{ title: '', name: '', size: undefined }];
|
|
189
188
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
getVisibleColumns() {
|
|
190
|
+
// Starting columns filter
|
|
191
|
+
let resultVisibleColumns = this.getColumns().filter((col) => {
|
|
192
|
+
const isNotCodVer = !__classPrivateFieldGet(this, _KupBox_kupManager, "f").data.column.isCodVer(col);
|
|
193
|
+
if (this.visibleColumns) {
|
|
194
|
+
// if visible columns is specified, include only those columns
|
|
195
|
+
return isNotCodVer && this.visibleColumns.includes(col.name);
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
return isNotCodVer && (!('visible' in col) || col.visible);
|
|
194
199
|
}
|
|
195
|
-
return true;
|
|
196
200
|
});
|
|
201
|
+
// order based on `visibleColumns`
|
|
202
|
+
if (this.visibleColumns) {
|
|
203
|
+
resultVisibleColumns = resultVisibleColumns.sort((a, b) => this.visibleColumns.indexOf(a.name) -
|
|
204
|
+
this.visibleColumns.indexOf(b.name));
|
|
205
|
+
}
|
|
206
|
+
return resultVisibleColumns;
|
|
197
207
|
}
|
|
198
208
|
getRows() {
|
|
199
209
|
return this.data && this.data.rows ? this.data.rows : [];
|
|
@@ -202,7 +212,7 @@ export class KupBox {
|
|
|
202
212
|
this.filteredRows = this.getRows();
|
|
203
213
|
if (this.globalFilter && this.globalFilterValue) {
|
|
204
214
|
// filtering rows
|
|
205
|
-
this.filteredRows = filterRows(this.filteredRows, null, this.globalFilterValue, this.visibleColumns);
|
|
215
|
+
this.filteredRows = filterRows(this.filteredRows, null, this.globalFilterValue, this.getColumns(), undefined, undefined, this.visibleColumns);
|
|
206
216
|
}
|
|
207
217
|
this.rows = this.sortRows(this.filteredRows);
|
|
208
218
|
if (this.pagination) {
|
|
@@ -231,14 +241,14 @@ export class KupBox {
|
|
|
231
241
|
}
|
|
232
242
|
checkScrollOnHover() {
|
|
233
243
|
if (this.boxContainer) {
|
|
234
|
-
if (!this.
|
|
244
|
+
if (!__classPrivateFieldGet(this, _KupBox_kupManager, "f").scrollOnHover.isRegistered(this.boxContainer)) {
|
|
235
245
|
if (this.scrollOnHover) {
|
|
236
|
-
this.
|
|
246
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").scrollOnHover.register(this.boxContainer);
|
|
237
247
|
}
|
|
238
248
|
}
|
|
239
249
|
else {
|
|
240
250
|
if (!this.scrollOnHover) {
|
|
241
|
-
this.
|
|
251
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").scrollOnHover.unregister(this.boxContainer);
|
|
242
252
|
}
|
|
243
253
|
}
|
|
244
254
|
}
|
|
@@ -256,7 +266,7 @@ export class KupBox {
|
|
|
256
266
|
sections: [],
|
|
257
267
|
};
|
|
258
268
|
// adding box objects to section
|
|
259
|
-
const visibleColumns = this.
|
|
269
|
+
const visibleColumns = this.getVisibleColumns();
|
|
260
270
|
let size = visibleColumns.length;
|
|
261
271
|
let content = [];
|
|
262
272
|
let cnt = 0;
|
|
@@ -272,7 +282,7 @@ export class KupBox {
|
|
|
272
282
|
};
|
|
273
283
|
}
|
|
274
284
|
onSortChange(e) {
|
|
275
|
-
let column = getColumnByName(this.
|
|
285
|
+
let column = getColumnByName(this.getVisibleColumns(), e.detail.value);
|
|
276
286
|
this.sortBy = column.name;
|
|
277
287
|
}
|
|
278
288
|
onGlobalFilterChange({ detail }) {
|
|
@@ -341,7 +351,7 @@ export class KupBox {
|
|
|
341
351
|
else {
|
|
342
352
|
cell = boxObject['data-cell'];
|
|
343
353
|
row = boxObject['data-row'];
|
|
344
|
-
column = getColumnByName(this.
|
|
354
|
+
column = getColumnByName(this.getVisibleColumns(), boxObject.dataset.column);
|
|
345
355
|
}
|
|
346
356
|
}
|
|
347
357
|
else {
|
|
@@ -355,7 +365,7 @@ export class KupBox {
|
|
|
355
365
|
};
|
|
356
366
|
}
|
|
357
367
|
clickHandler(e) {
|
|
358
|
-
const details = this.getEventDetails(this.
|
|
368
|
+
const details = this.getEventDetails(__classPrivateFieldGet(this, _KupBox_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
359
369
|
if (details.row) {
|
|
360
370
|
if (this.multiSelection) {
|
|
361
371
|
this.onSelectionCheckChange(details.row);
|
|
@@ -367,7 +377,7 @@ export class KupBox {
|
|
|
367
377
|
return details;
|
|
368
378
|
}
|
|
369
379
|
contextMenuHandler(e) {
|
|
370
|
-
const details = this.getEventDetails(this.
|
|
380
|
+
const details = this.getEventDetails(__classPrivateFieldGet(this, _KupBox_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
371
381
|
return details;
|
|
372
382
|
}
|
|
373
383
|
/**
|
|
@@ -518,8 +528,9 @@ export class KupBox {
|
|
|
518
528
|
progressbar: [],
|
|
519
529
|
text: [],
|
|
520
530
|
};
|
|
521
|
-
|
|
522
|
-
|
|
531
|
+
const visibleColumns = this.getVisibleColumns();
|
|
532
|
+
for (let index = 0; index < visibleColumns.length; index++) {
|
|
533
|
+
const column = visibleColumns[index];
|
|
523
534
|
if (column.visible !== false) {
|
|
524
535
|
cardData.cell.push(row.cells[column.name]);
|
|
525
536
|
cardData.columns.push(column);
|
|
@@ -648,7 +659,7 @@ export class KupBox {
|
|
|
648
659
|
return h("kup-card", Object.assign({ data: cardData }, this.cardData));
|
|
649
660
|
}
|
|
650
661
|
renderRow(row) {
|
|
651
|
-
const visibleColumns = [...this.
|
|
662
|
+
const visibleColumns = [...this.getVisibleColumns()];
|
|
652
663
|
let boxContent = null;
|
|
653
664
|
// if layout in row, use that one
|
|
654
665
|
let rowLayout = row.layout;
|
|
@@ -798,10 +809,10 @@ export class KupBox {
|
|
|
798
809
|
headerTitle = section.title;
|
|
799
810
|
}
|
|
800
811
|
else if (sectionExpanded) {
|
|
801
|
-
headerTitle = this.
|
|
812
|
+
headerTitle = __classPrivateFieldGet(this, _KupBox_kupManager, "f").language.translate(KupLanguageGeneric.COLLAPSE);
|
|
802
813
|
}
|
|
803
814
|
else {
|
|
804
|
-
headerTitle = this.
|
|
815
|
+
headerTitle = __classPrivateFieldGet(this, _KupBox_kupManager, "f").language.translate(KupLanguageGeneric.EXPAND);
|
|
805
816
|
}
|
|
806
817
|
sectionContainer = (h("div", { class: sectionClass, style: sectionStyle }, h("div", { class: contentClass }, sectionContent), h("div", { class: "header", role: "button", onClick: (e) => {
|
|
807
818
|
e.stopPropagation();
|
|
@@ -837,12 +848,16 @@ export class KupBox {
|
|
|
837
848
|
}
|
|
838
849
|
const cell = row.cells[boxObject.column];
|
|
839
850
|
let title = undefined;
|
|
840
|
-
if (cell && !this.
|
|
851
|
+
if (cell && !__classPrivateFieldGet(this, _KupBox_kupManager, "f").objects.isEmptyKupObj(cell.obj)) {
|
|
841
852
|
classObj['is-obj'] = true;
|
|
842
|
-
if (this.
|
|
853
|
+
if (__classPrivateFieldGet(this, _KupBox_kupManager, "f").debug.isDebug()) {
|
|
843
854
|
title =
|
|
844
855
|
cell.obj.t + '; ' + cell.obj.p + '; ' + cell.obj.k + ';';
|
|
845
856
|
}
|
|
857
|
+
if (!cell.isEditable) {
|
|
858
|
+
cell.cssClass =
|
|
859
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").data.cell.getObjectRelatedStyleClasses(cell.obj, cell.cssClass);
|
|
860
|
+
}
|
|
846
861
|
}
|
|
847
862
|
const cellProps = {
|
|
848
863
|
cell: cell,
|
|
@@ -863,9 +878,9 @@ export class KupBox {
|
|
|
863
878
|
kanbanMode() {
|
|
864
879
|
// Testing whether there are columns to group by
|
|
865
880
|
if (!this.kanban.columns || this.kanban.columns.length === 0) {
|
|
866
|
-
this.
|
|
881
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").debug.logMessage(this, 'No columns to group by detected.', KupDebugCategory.ERROR);
|
|
867
882
|
return {
|
|
868
|
-
jsx: (h("div", { id: "empty-data-message", class: "box-wrapper" }, h("div", { ref: (el) => this.rowsRefs.push(el) }), this.
|
|
883
|
+
jsx: (h("div", { id: "empty-data-message", class: "box-wrapper" }, h("div", { ref: (el) => this.rowsRefs.push(el) }), __classPrivateFieldGet(this, _KupBox_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA))),
|
|
869
884
|
style: { 'grid-template-columns': `repeat(1, 1fr)` },
|
|
870
885
|
};
|
|
871
886
|
}
|
|
@@ -886,7 +901,7 @@ export class KupBox {
|
|
|
886
901
|
key.push(this.rows[index].cells[this.kanban.columns[j]].value);
|
|
887
902
|
}
|
|
888
903
|
catch (error) {
|
|
889
|
-
this.
|
|
904
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").debug.logMessage(this, error, KupDebugCategory.WARNING);
|
|
890
905
|
}
|
|
891
906
|
}
|
|
892
907
|
const check = {
|
|
@@ -991,8 +1006,8 @@ export class KupBox {
|
|
|
991
1006
|
});
|
|
992
1007
|
}
|
|
993
1008
|
};
|
|
994
|
-
this.
|
|
995
|
-
this.
|
|
1009
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").interact.on(this.boxContainer, KupPointerEventTypes.TAP, tapCb);
|
|
1010
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").interact.on(this.boxContainer, KupPointerEventTypes.HOLD, holdCb);
|
|
996
1011
|
}
|
|
997
1012
|
didRenderInteractables() {
|
|
998
1013
|
if (this.dragEnabled) {
|
|
@@ -1002,7 +1017,7 @@ export class KupBox {
|
|
|
1002
1017
|
const cellEl = this.rootElement.shadowRoot.querySelector('.box-object:hover');
|
|
1003
1018
|
return {
|
|
1004
1019
|
cell: cellEl['data-cell'],
|
|
1005
|
-
column: getColumnByName(this.
|
|
1020
|
+
column: getColumnByName(this.getVisibleColumns(), cellEl.dataset.column),
|
|
1006
1021
|
id: this.rootElement.id,
|
|
1007
1022
|
multiple: this.multiSelection,
|
|
1008
1023
|
row: cellEl['data-row'],
|
|
@@ -1011,7 +1026,7 @@ export class KupBox {
|
|
|
1011
1026
|
};
|
|
1012
1027
|
if (row && !this.interactableDrag.includes(row)) {
|
|
1013
1028
|
this.interactableDrag.push(row);
|
|
1014
|
-
this.
|
|
1029
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").interact.draggable(row, {
|
|
1015
1030
|
allowFrom: '.box-object',
|
|
1016
1031
|
cursorChecker() {
|
|
1017
1032
|
return null;
|
|
@@ -1026,10 +1041,10 @@ export class KupBox {
|
|
|
1026
1041
|
const dataCb = () => {
|
|
1027
1042
|
const cell = this.rootElement.shadowRoot.querySelector('.box:hover');
|
|
1028
1043
|
if (!cell) {
|
|
1029
|
-
this.
|
|
1044
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").debug.logMessage(this, "Couldn't find cell hovered to retrieve dropzone informations!", KupDebugCategory.WARNING);
|
|
1030
1045
|
return;
|
|
1031
1046
|
}
|
|
1032
|
-
const path = this.
|
|
1047
|
+
const path = __classPrivateFieldGet(this, _KupBox_kupManager, "f").getEventPath(cell, this.rootElement);
|
|
1033
1048
|
const receivingDetails = this.getEventDetails(path);
|
|
1034
1049
|
return {
|
|
1035
1050
|
cell: receivingDetails.cell,
|
|
@@ -1040,7 +1055,7 @@ export class KupBox {
|
|
|
1040
1055
|
};
|
|
1041
1056
|
if (!this.interactableDrop.includes(this.sectionRef)) {
|
|
1042
1057
|
this.interactableDrop.push(this.sectionRef);
|
|
1043
|
-
this.
|
|
1058
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").interact.dropzone(this.sectionRef, {
|
|
1044
1059
|
accept: `[${kupDraggableAttr}]`,
|
|
1045
1060
|
}, {
|
|
1046
1061
|
dispatcher: this.rootElement,
|
|
@@ -1051,7 +1066,7 @@ export class KupBox {
|
|
|
1051
1066
|
const row = this.rowsRefs[index];
|
|
1052
1067
|
if (row && !this.interactableDrop.includes(row)) {
|
|
1053
1068
|
this.interactableDrop.push(row);
|
|
1054
|
-
this.
|
|
1069
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").interact.dropzone(row, {
|
|
1055
1070
|
accept: `[${kupDraggableAttr}]`,
|
|
1056
1071
|
}, {
|
|
1057
1072
|
callback: dataCb,
|
|
@@ -1066,7 +1081,7 @@ export class KupBox {
|
|
|
1066
1081
|
/* L i f e c y c l e H o o k s */
|
|
1067
1082
|
/*-------------------------------------------------*/
|
|
1068
1083
|
componentWillLoad() {
|
|
1069
|
-
this.
|
|
1084
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").debug.logLoad(this, false);
|
|
1070
1085
|
if (this.rowsPerPage) {
|
|
1071
1086
|
this.currentRowsPerPage = this.rowsPerPage;
|
|
1072
1087
|
}
|
|
@@ -1075,8 +1090,8 @@ export class KupBox {
|
|
|
1075
1090
|
this.currentRowsPerPage > this.data.rows.length) {
|
|
1076
1091
|
this.currentRowsPerPage = this.data.rows.length;
|
|
1077
1092
|
}
|
|
1078
|
-
this.
|
|
1079
|
-
this.
|
|
1093
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").language.register(this);
|
|
1094
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").theme.register(this);
|
|
1080
1095
|
this.initWithPersistedState();
|
|
1081
1096
|
this.onDataChanged();
|
|
1082
1097
|
this.adjustPaginator();
|
|
@@ -1105,10 +1120,10 @@ export class KupBox {
|
|
|
1105
1120
|
}
|
|
1106
1121
|
this.didLoadInteractables();
|
|
1107
1122
|
this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
|
|
1108
|
-
this.
|
|
1123
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").debug.logLoad(this, true);
|
|
1109
1124
|
}
|
|
1110
1125
|
componentWillRender() {
|
|
1111
|
-
this.
|
|
1126
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").debug.logRender(this, false);
|
|
1112
1127
|
}
|
|
1113
1128
|
componentDidRender() {
|
|
1114
1129
|
const root = this.rootElement.shadowRoot;
|
|
@@ -1122,7 +1137,7 @@ export class KupBox {
|
|
|
1122
1137
|
this.persistState();
|
|
1123
1138
|
this.didRenderInteractables();
|
|
1124
1139
|
__classPrivateFieldGet(this, _KupBox_instances, "m", _KupBox_didRenderObservers).call(this);
|
|
1125
|
-
this.
|
|
1140
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").debug.logRender(this, true);
|
|
1126
1141
|
}
|
|
1127
1142
|
render() {
|
|
1128
1143
|
__classPrivateFieldSet(this, _KupBox_rowsRefs, [], "f");
|
|
@@ -1130,7 +1145,7 @@ export class KupBox {
|
|
|
1130
1145
|
let sortPanel = null;
|
|
1131
1146
|
if (this.sortEnabled) {
|
|
1132
1147
|
// creating items
|
|
1133
|
-
const visibleColumnsItems = this.
|
|
1148
|
+
const visibleColumnsItems = this.getVisibleColumns().map((column) => {
|
|
1134
1149
|
const item = {
|
|
1135
1150
|
value: column.title,
|
|
1136
1151
|
id: column.name,
|
|
@@ -1140,7 +1155,7 @@ export class KupBox {
|
|
|
1140
1155
|
});
|
|
1141
1156
|
const items = [{ value: '', id: '' }, ...visibleColumnsItems];
|
|
1142
1157
|
let textfieldData = {
|
|
1143
|
-
label: this.
|
|
1158
|
+
label: __classPrivateFieldGet(this, _KupBox_kupManager, "f").language.translate(KupLanguageGeneric.SORT_BY),
|
|
1144
1159
|
trailingIcon: true,
|
|
1145
1160
|
};
|
|
1146
1161
|
let listData = {
|
|
@@ -1155,7 +1170,7 @@ export class KupBox {
|
|
|
1155
1170
|
}
|
|
1156
1171
|
let filterPanel = null;
|
|
1157
1172
|
if (this.globalFilter) {
|
|
1158
|
-
filterPanel = (h("div", { id: "global-filter" }, h("kup-text-field", { fullWidth: true, label: this.
|
|
1173
|
+
filterPanel = (h("div", { id: "global-filter" }, h("kup-text-field", { fullWidth: true, label: __classPrivateFieldGet(this, _KupBox_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), icon: KupThemeIconValues.SEARCH, initialValue: this.globalFilterValue, "onkup-textfield-input": (event) => {
|
|
1159
1174
|
window.clearTimeout(this.globalFilterTimeout);
|
|
1160
1175
|
this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
|
|
1161
1176
|
} })));
|
|
@@ -1177,7 +1192,7 @@ export class KupBox {
|
|
|
1177
1192
|
let boxContent = null;
|
|
1178
1193
|
let containerStyle = {};
|
|
1179
1194
|
if (this.rows.length === 0) {
|
|
1180
|
-
boxContent = (h("div", { id: "empty-data-message", class: "box-wrapper" }, h("div", { class: "box", ref: (el) => this.rowsRefs.push(el) }, this.
|
|
1195
|
+
boxContent = (h("div", { id: "empty-data-message", class: "box-wrapper" }, h("div", { class: "box", ref: (el) => this.rowsRefs.push(el) }, __classPrivateFieldGet(this, _KupBox_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA))));
|
|
1181
1196
|
containerStyle = { 'grid-template-columns': `repeat(1, 1fr)` };
|
|
1182
1197
|
}
|
|
1183
1198
|
else if (isKanban) {
|
|
@@ -1197,17 +1212,19 @@ export class KupBox {
|
|
|
1197
1212
|
boxContent.push(this.renderRow(rows[cnt++]));
|
|
1198
1213
|
}
|
|
1199
1214
|
}
|
|
1200
|
-
return (h(Host,
|
|
1215
|
+
return (h(Host, { "onKup-cell-click": (e) => {
|
|
1216
|
+
this.kupBoxCellClick.emit(e.detail);
|
|
1217
|
+
} }, h("style", null, __classPrivateFieldGet(this, _KupBox_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h("div", { class: 'box-component', ref: (el) => (this.sectionRef = el) }, sortPanel, filterPanel, paginator, h("div", { class: isKanban ? 'is-kanban' : '', id: 'box-container', style: containerStyle, onContextMenu: (e) => {
|
|
1201
1218
|
e.preventDefault();
|
|
1202
1219
|
}, ref: (el) => (this.boxContainer =
|
|
1203
1220
|
el) }, boxContent)))));
|
|
1204
1221
|
}
|
|
1205
1222
|
disconnectedCallback() {
|
|
1206
|
-
this.
|
|
1207
|
-
this.
|
|
1208
|
-
this.
|
|
1223
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").interact.unregister(this.interactableDrag.concat(this.interactableDrop));
|
|
1224
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").language.unregister(this);
|
|
1225
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").theme.unregister(this);
|
|
1209
1226
|
if (this.scrollOnHover) {
|
|
1210
|
-
this.
|
|
1227
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").scrollOnHover.unregister(this.boxContainer);
|
|
1211
1228
|
}
|
|
1212
1229
|
// When component is destroyed, then the listener is removed. @See clickFunction for more details
|
|
1213
1230
|
document.removeEventListener('click', this.clickFunction.bind(this));
|
|
@@ -1891,6 +1908,21 @@ export class KupBox {
|
|
|
1891
1908
|
"attribute": "swipe-disabled",
|
|
1892
1909
|
"reflect": false,
|
|
1893
1910
|
"defaultValue": "false"
|
|
1911
|
+
},
|
|
1912
|
+
"visibleColumns": {
|
|
1913
|
+
"type": "unknown",
|
|
1914
|
+
"mutable": false,
|
|
1915
|
+
"complexType": {
|
|
1916
|
+
"original": "string[]",
|
|
1917
|
+
"resolved": "string[]",
|
|
1918
|
+
"references": {}
|
|
1919
|
+
},
|
|
1920
|
+
"required": false,
|
|
1921
|
+
"optional": false,
|
|
1922
|
+
"docs": {
|
|
1923
|
+
"tags": [],
|
|
1924
|
+
"text": "List of the visible columns"
|
|
1925
|
+
}
|
|
1894
1926
|
}
|
|
1895
1927
|
};
|
|
1896
1928
|
}
|
|
@@ -2093,6 +2125,27 @@ export class KupBox {
|
|
|
2093
2125
|
}
|
|
2094
2126
|
}
|
|
2095
2127
|
}
|
|
2128
|
+
}, {
|
|
2129
|
+
"method": "kupBoxCellClick",
|
|
2130
|
+
"name": "kup-box-cell-click",
|
|
2131
|
+
"bubbles": true,
|
|
2132
|
+
"cancelable": false,
|
|
2133
|
+
"composed": true,
|
|
2134
|
+
"docs": {
|
|
2135
|
+
"tags": [],
|
|
2136
|
+
"text": ""
|
|
2137
|
+
},
|
|
2138
|
+
"complexType": {
|
|
2139
|
+
"original": "FCellEventPayload",
|
|
2140
|
+
"resolved": "FCellEventPayload",
|
|
2141
|
+
"references": {
|
|
2142
|
+
"FCellEventPayload": {
|
|
2143
|
+
"location": "import",
|
|
2144
|
+
"path": "../../f-components/f-cell/f-cell-declarations",
|
|
2145
|
+
"id": "src/f-components/f-cell/f-cell-declarations.ts::FCellEventPayload"
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2096
2149
|
}];
|
|
2097
2150
|
}
|
|
2098
2151
|
static get methods() {
|
|
@@ -2247,21 +2300,21 @@ export class KupBox {
|
|
|
2247
2300
|
}];
|
|
2248
2301
|
}
|
|
2249
2302
|
}
|
|
2250
|
-
_KupBox_intObserver = new WeakMap(), _KupBox_rowsRefs = new WeakMap(), _KupBox_navBarHeight = new WeakMap(), _KupBox_loadMoreEventCounter = new WeakMap(), _KupBox_loadMoreEventPreviousQuantity = new WeakMap(), _KupBox_instances = new WeakSet(), _KupBox_checkUpdateState = function _KupBox_checkUpdateState() {
|
|
2303
|
+
_KupBox_kupManager = new WeakMap(), _KupBox_intObserver = new WeakMap(), _KupBox_rowsRefs = new WeakMap(), _KupBox_navBarHeight = new WeakMap(), _KupBox_loadMoreEventCounter = new WeakMap(), _KupBox_loadMoreEventPreviousQuantity = new WeakMap(), _KupBox_instances = new WeakSet(), _KupBox_checkUpdateState = function _KupBox_checkUpdateState() {
|
|
2251
2304
|
let somethingChanged = false;
|
|
2252
|
-
if (!this.
|
|
2305
|
+
if (!__classPrivateFieldGet(this, _KupBox_kupManager, "f").objects.deepEqual(this.state.sortBy, this.sortBy)) {
|
|
2253
2306
|
this.state.sortBy = this.sortBy;
|
|
2254
2307
|
somethingChanged = true;
|
|
2255
2308
|
}
|
|
2256
|
-
if (!this.
|
|
2309
|
+
if (!__classPrivateFieldGet(this, _KupBox_kupManager, "f").objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
2257
2310
|
this.state.globalFilterValue = this.globalFilterValue;
|
|
2258
2311
|
somethingChanged = true;
|
|
2259
2312
|
}
|
|
2260
|
-
if (!this.
|
|
2313
|
+
if (!__classPrivateFieldGet(this, _KupBox_kupManager, "f").objects.deepEqual(this.state.pageSelected, this.currentPage)) {
|
|
2261
2314
|
this.state.pageSelected = this.currentPage;
|
|
2262
2315
|
somethingChanged = true;
|
|
2263
2316
|
}
|
|
2264
|
-
if (!this.
|
|
2317
|
+
if (!__classPrivateFieldGet(this, _KupBox_kupManager, "f").objects.deepEqual(this.state.rowsPerPage, this.currentRowsPerPage)) {
|
|
2265
2318
|
this.state.rowsPerPage = this.currentRowsPerPage;
|
|
2266
2319
|
somethingChanged = true;
|
|
2267
2320
|
}
|
|
@@ -2269,15 +2322,15 @@ _KupBox_intObserver = new WeakMap(), _KupBox_rowsRefs = new WeakMap(), _KupBox_n
|
|
|
2269
2322
|
const prefix = currentIndex > 0 ? ';' : '';
|
|
2270
2323
|
return accumulator + prefix + row.id;
|
|
2271
2324
|
}, '');
|
|
2272
|
-
if (!this.
|
|
2325
|
+
if (!__classPrivateFieldGet(this, _KupBox_kupManager, "f").objects.deepEqual(this.state.selectedRowsState, selectedRowsState)) {
|
|
2273
2326
|
this.state.selectedRowsState = selectedRowsState;
|
|
2274
2327
|
somethingChanged = true;
|
|
2275
2328
|
}
|
|
2276
|
-
if (!this.
|
|
2329
|
+
if (!__classPrivateFieldGet(this, _KupBox_kupManager, "f").objects.deepEqual(this.state.loadMoreLimit, this.loadMoreLimit)) {
|
|
2277
2330
|
this.state.loadMoreLimit = this.loadMoreLimit;
|
|
2278
2331
|
somethingChanged = true;
|
|
2279
2332
|
}
|
|
2280
|
-
if (!this.
|
|
2333
|
+
if (!__classPrivateFieldGet(this, _KupBox_kupManager, "f").objects.deepEqual(this.state.showLoadMore, this.showLoadMore)) {
|
|
2281
2334
|
this.state.showLoadMore = this.showLoadMore;
|
|
2282
2335
|
somethingChanged = true;
|
|
2283
2336
|
}
|
|
@@ -2291,7 +2344,7 @@ _KupBox_intObserver = new WeakMap(), _KupBox_rowsRefs = new WeakMap(), _KupBox_n
|
|
|
2291
2344
|
const callback = (entries) => {
|
|
2292
2345
|
entries.forEach((entry) => {
|
|
2293
2346
|
if (entry.isIntersecting) {
|
|
2294
|
-
this.
|
|
2347
|
+
__classPrivateFieldGet(this, _KupBox_kupManager, "f").debug.logMessage(this, 'Last row entering the viewport, loading more elements.');
|
|
2295
2348
|
const delta = this.data.rows.length - this.currentRowsPerPage;
|
|
2296
2349
|
if (delta < this.loadMoreStep) {
|
|
2297
2350
|
this.currentRowsPerPage += delta;
|
|
@@ -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
|
}
|
|
@@ -316,10 +316,14 @@
|
|
|
316
316
|
border-color: var(--kup_calendar_event_background_color);
|
|
317
317
|
color: var(--kup_calendar_event_color);
|
|
318
318
|
}
|
|
319
|
+
#kup-component .fc-event {
|
|
320
|
+
padding: 0.5rem;
|
|
321
|
+
}
|
|
319
322
|
#kup-component .fc-event-main {
|
|
320
323
|
color: inherit;
|
|
324
|
+
display: flex;
|
|
321
325
|
}
|
|
322
|
-
#kup-component .fc-event-title {
|
|
326
|
+
#kup-component .fc-event-title .fc-event-time {
|
|
323
327
|
padding: 0.25em;
|
|
324
328
|
}
|
|
325
329
|
#kup-component .fc-event-time {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { forceUpdate,
|
|
1
|
+
import { forceUpdate, h, Host, } from "@stencil/core";
|
|
2
2
|
import { Calendar, } from "@fullcalendar/core";
|
|
3
3
|
import dayGridPlugin from "@fullcalendar/daygrid";
|
|
4
4
|
import interactionPlugin from "@fullcalendar/interaction";
|
|
@@ -144,24 +144,42 @@ export class KupCalendar {
|
|
|
144
144
|
row: event.extendedProps.row,
|
|
145
145
|
});
|
|
146
146
|
},
|
|
147
|
+
eventTimeFormat: {
|
|
148
|
+
hour: '2-digit',
|
|
149
|
+
minute: '2-digit',
|
|
150
|
+
},
|
|
147
151
|
eventDidMount: (info) => {
|
|
152
|
+
// In the calendar component, we handle two cases:
|
|
153
|
+
// if the '.fc-event-main' div exists, the event don't has start/end time;
|
|
154
|
+
const content = document.createElement('div');
|
|
155
|
+
const mainEvent = info.el.querySelector('.fc-event-main');
|
|
156
|
+
if (!mainEvent) {
|
|
157
|
+
const title = info.el.querySelector('.fc-event-title');
|
|
158
|
+
const time = info.el.querySelector('.fc-event-time');
|
|
159
|
+
content.append(time, title);
|
|
160
|
+
content.style.display = 'flex';
|
|
161
|
+
content.style.flexDirection = 'column';
|
|
162
|
+
info.el.appendChild(content);
|
|
163
|
+
}
|
|
148
164
|
if (this.iconCol) {
|
|
149
165
|
const row = info.event.extendedProps.row;
|
|
150
166
|
const cell = row.cells[this.iconCol];
|
|
151
167
|
if (cell === null || cell === void 0 ? void 0 : cell.value) {
|
|
152
168
|
const wrapper = document.createElement('div');
|
|
153
169
|
wrapper.classList.add('icon-wrapper');
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
170
|
+
const propsFImage = {
|
|
171
|
+
resource: cell.value,
|
|
172
|
+
placeholderResource: cell.placeholderIcon,
|
|
173
|
+
sizeX: '1.5em',
|
|
174
|
+
sizeY: '1.5em',
|
|
175
|
+
wrapperClass: 'custom-icon',
|
|
176
|
+
};
|
|
177
|
+
const fImage = document.createElement('kup-image');
|
|
178
|
+
Object.keys(propsFImage).forEach((prop) => (fImage[prop] = propsFImage[prop]));
|
|
179
|
+
wrapper.appendChild(fImage);
|
|
180
|
+
mainEvent
|
|
181
|
+
? mainEvent.appendChild(wrapper)
|
|
182
|
+
: info.el.appendChild(wrapper);
|
|
165
183
|
}
|
|
166
184
|
}
|
|
167
185
|
if (this.imageCol) {
|
|
@@ -443,11 +461,11 @@ export class KupCalendar {
|
|
|
443
461
|
this.kupManager.debug.logRender(this, true);
|
|
444
462
|
}
|
|
445
463
|
render() {
|
|
446
|
-
return (h(Host, { key: '
|
|
464
|
+
return (h(Host, { key: '694d6c782eed06ec64232acc3ef163236c157711' }, h("style", { key: 'eaa3dca371969bb1cedb5b45e019ad6b563d3a0f' }, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { key: '8d1d89e4526d1b50649d9486f5f292ff328d5457', id: componentWrapperId }, h("div", { key: 'fd7ce40682db901688644ff02e4fcd56f79c9256', class: "navigation" }, !this.hideNavigation ? (h("div", { class: "navigation__left" }, h(FButton, { icon: "chevron_left", onClick: () => this.onPrev(), title: this.kupManager.language.translate(KupLanguageGeneric.PREVIOUS), wrapperClass: "navigation__prev" }), h(FButton, { icon: "calendar", onClick: () => this.onToday(), title: this.kupManager.language.translate(KupLanguageGeneric.TODAY), wrapperClass: "navigation__today" }), h(FButton, { icon: "chevron_right", onClick: () => this.onNext(), title: this.kupManager.language.translate(KupLanguageGeneric.NEXT), wrapperClass: "navigation__next" }))) : null, h("div", { key: '832adde7b78762398fb46d100159bc9e3ad31ea3', class: `navigation__title ${this.hideNavigation
|
|
447
465
|
? 'navigation__title--centered'
|
|
448
466
|
: ''}`, ref: (el) => {
|
|
449
467
|
this.navTitle = el;
|
|
450
|
-
} }), h("div", { key: '
|
|
468
|
+
} }), h("div", { key: '93d4d527539c090ca8a29ee76c04ef8ee0c36d29', class: "navigation__right" }, this.enableChangeView ? (h(FChip, Object.assign({}, this.setChipProps()))) : null)), h("div", { key: 'cf94727499fdd2dd62a8e0fb0481575b631efb4f', class: "calendar", ref: (el) => (this.calendarContainer = el) }))));
|
|
451
469
|
}
|
|
452
470
|
disconnectedCallback() {
|
|
453
471
|
if (this.calendar) {
|
|
@@ -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 = {}));
|