@sme.up/ketchup 7.4.2 → 8.0.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/{component-72a5b626.js → component-85c2bd4d.js} +1 -1
- package/dist/cjs/{f-button-daddd700.js → f-button-49b2c37c.js} +1 -1
- package/dist/cjs/{f-cell-3682fad4.js → f-cell-9a6bc55c.js} +4 -4
- package/dist/cjs/{f-chip-9d540d94.js → f-chip-dee84122.js} +2 -2
- package/dist/cjs/{f-image-7b42d149.js → f-image-27f965ff.js} +4 -4
- package/dist/cjs/{f-paginator-utils-1baeba0f.js → f-paginator-utils-4a30189d.js} +2 -2
- package/dist/cjs/{f-text-field-a6ed2d22.js → f-text-field-04a663b4.js} +1 -1
- package/dist/cjs/{f-text-field-mdc-85997738.js → f-text-field-mdc-0e22f3e3.js} +2 -2
- package/dist/cjs/ketchup.cjs.js +2 -2
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +814 -819
- package/dist/cjs/kup-box.cjs.entry.js +10 -10
- package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dash-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
- package/dist/cjs/kup-dashboard.cjs.entry.js +7 -10
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +25 -8
- package/dist/cjs/kup-family-tree.cjs.entry.js +8 -19
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-10351449.js → kup-manager-2ff5d258.js} +80 -1
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +5 -5
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +1127 -218
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{tslib.es6-0ee02c67.js → tslib.es6-386654de.js} +9 -5
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/kup-card/kup-card.css +4 -8
- package/dist/collection/components/kup-chip/kup-chip.js +4 -3
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +0 -3
- package/dist/collection/components/kup-data-table/kup-data-table.css +3 -6
- package/dist/collection/components/kup-data-table/kup-data-table.js +6 -20
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +2 -0
- package/dist/collection/components/kup-echart/kup-echart.js +23 -8
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +2 -2
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +4 -15
- package/dist/collection/components/kup-image/kup-image.js +28 -0
- package/dist/collection/components/kup-list/kup-list.css +1 -1
- package/dist/collection/components/kup-planner/kup-planner-declarations.js +5 -2
- package/dist/collection/components/kup-planner/kup-planner.css +6 -3
- package/dist/collection/components/kup-planner/kup-planner.js +347 -65
- package/dist/collection/components/kup-qlik/kup-qlik.css +4 -8
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -3
- package/dist/collection/components/kup-spinner/kup-spinner.css +2 -4
- package/dist/collection/components/kup-tree/kup-tree.js +66 -67
- package/dist/collection/f-components/f-image/f-image.js +3 -3
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +1 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +18 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/types/GenericTypes.js +1 -0
- package/dist/components/kup-autocomplete2.js +228 -151
- package/dist/components/kup-dashboard.js +0 -3
- package/dist/components/kup-echart2.js +24 -7
- package/dist/components/kup-family-tree.js +5 -16
- package/dist/components/kup-planner.js +1127 -219
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +1 -1
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +1 -1
- 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-tree.js +1 -1
- package/dist/esm/{component-b1bedf1d.js → component-120651a0.js} +1 -1
- package/dist/esm/{f-button-8d15b5a0.js → f-button-744cf1f6.js} +1 -1
- package/dist/esm/{f-cell-7b706e57.js → f-cell-b319c869.js} +4 -4
- package/dist/esm/{f-chip-c671fe90.js → f-chip-7e3e4180.js} +2 -2
- package/dist/esm/{f-image-21451b15.js → f-image-098c26ce.js} +4 -4
- package/dist/esm/{f-paginator-utils-92bbf277.js → f-paginator-utils-674cb2ae.js} +2 -2
- package/dist/esm/{f-text-field-0bb2d109.js → f-text-field-c38ef113.js} +1 -1
- package/dist/esm/{f-text-field-mdc-d42d3f9e.js → f-text-field-mdc-cee583ea.js} +2 -2
- package/dist/esm/ketchup.js +2 -2
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_27.entry.js +814 -819
- package/dist/esm/kup-box.entry.js +10 -10
- package/dist/esm/kup-calendar.entry.js +5 -5
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dash-list.entry.js +1 -1
- package/dist/esm/kup-dash_2.entry.js +1 -1
- package/dist/esm/kup-dashboard.entry.js +7 -10
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +25 -8
- package/dist/esm/kup-family-tree.entry.js +8 -19
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +8 -8
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-6145d980.js → kup-manager-b41eb2a8.js} +80 -2
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +5 -5
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +1128 -219
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +4 -4
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{tslib.es6-3eea2234.js → tslib.es6-8c2af864.js} +9 -5
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-439ac105.entry.js → p-0b0b61cb.entry.js} +1 -1
- package/dist/ketchup/p-0b91f5f8.entry.js +1 -0
- package/dist/ketchup/{p-81605f08.js → p-10d84b1b.js} +1 -1
- package/dist/ketchup/{p-a203f78b.js → p-27a56c87.js} +1 -1
- package/dist/ketchup/{p-32517a99.entry.js → p-395e1960.entry.js} +1 -1
- package/dist/ketchup/{p-76bf53df.entry.js → p-3b41aca7.entry.js} +1 -1
- package/dist/ketchup/{p-4d039705.entry.js → p-3efe7f43.entry.js} +1 -1
- package/dist/ketchup/{p-a641780a.entry.js → p-4325d965.entry.js} +1 -1
- package/dist/ketchup/{p-2915a66a.entry.js → p-4ae2ca6f.entry.js} +1 -1
- package/dist/ketchup/{p-e4975ffa.entry.js → p-5ce2b4fc.entry.js} +1 -1
- package/dist/ketchup/p-5d398e42.js +1 -0
- package/dist/ketchup/{p-7cfdce27.js → p-77e3d537.js} +1 -1
- package/dist/ketchup/p-7f59211b.js +1 -0
- package/dist/ketchup/p-940a5feb.js +30 -0
- package/dist/ketchup/{p-826c91d7.js → p-9700eb32.js} +1 -1
- package/dist/ketchup/p-a7e19620.entry.js +39 -0
- package/dist/ketchup/p-a877a87b.entry.js +9 -0
- package/dist/ketchup/p-a9b7533b.entry.js +25 -0
- package/dist/ketchup/{p-89ac80c1.entry.js → p-af82131e.entry.js} +1 -1
- package/dist/ketchup/{p-da37c417.entry.js → p-b032f47d.entry.js} +1 -1
- package/dist/ketchup/{p-0c1cbf8b.entry.js → p-b244f5ca.entry.js} +1 -1
- package/dist/ketchup/{p-2a2dc2a8.entry.js → p-bb17c1ba.entry.js} +1 -1
- package/dist/ketchup/{p-0c9b7c80.entry.js → p-bd42562d.entry.js} +1 -1
- package/dist/ketchup/{p-849ad5d8.entry.js → p-c8b7790a.entry.js} +1 -1
- package/dist/ketchup/{p-c022824e.entry.js → p-c968e93d.entry.js} +1 -1
- package/dist/ketchup/{p-1242366a.entry.js → p-d739710a.entry.js} +1 -1
- package/dist/ketchup/{p-ae4fffe0.js → p-d98fdb9b.js} +1 -1
- package/dist/ketchup/{p-c222d070.entry.js → p-da891093.entry.js} +1 -1
- package/dist/ketchup/{p-281cff81.entry.js → p-df316daf.entry.js} +1 -1
- package/dist/ketchup/{p-d87fb5ff.entry.js → p-e02b5141.entry.js} +1 -1
- package/dist/ketchup/{p-ea16ddc0.js → p-e714f4dc.js} +1 -1
- package/dist/ketchup/{p-c4d9e3e2.js → p-ef614656.js} +1 -1
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +2 -0
- package/dist/types/components/kup-image/kup-image.d.ts +2 -0
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +18 -3
- package/dist/types/components/kup-planner/kup-planner.d.ts +36 -11
- package/dist/types/components/kup-tree/kup-tree.d.ts +1 -5
- package/dist/types/components.d.ts +39 -4
- package/dist/types/f-components/f-image/f-image-declarations.d.ts +1 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +1 -1
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +1 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +7 -0
- package/dist/types/types/GenericTypes.d.ts +1 -0
- package/package.json +8 -20
- package/dist/ketchup/p-02a26d59.entry.js +0 -9
- package/dist/ketchup/p-462475ac.entry.js +0 -10
- package/dist/ketchup/p-5292ef67.js +0 -30
- package/dist/ketchup/p-79b0730b.js +0 -15
- package/dist/ketchup/p-9f00ad0f.js +0 -1
- package/dist/ketchup/p-be61dd36.entry.js +0 -39
- package/dist/ketchup/p-e83e70e2.entry.js +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement$1, a as getAssetPath } from './index-b326ffc9.js';
|
|
2
|
-
import { k as kupManagerInstance, g as getProps, s as setProps, K as KupThemeIconValues, a as KupDynamicPositionPlacement, b as KupThemeColorValues, c as KupDebugCategory, F as FCellShapes, d as FCellPadding, e as getMonthsAsStringByLocale, f as KupDatesFormats, D as DateTimeFormatOptionsMonth, h as KupCardBuiltInClockElements, i as KupCardCSSClasses, j as KupLanguageTotals, l as KupLanguageGeneric, m as KupLanguageColumn, n as KupDataNewColumnTypes, o as KupCardSubEvents, p as KupCardIds, q as KupLanguageRow, r as KupCardFamily, t as KupCardProps, u as getColumnByName, v as KupDates, w as formatToNumber, x as KupDatesNormalize, y as KupObjects, z as identify, G as GroupLabelDisplayMode, S as SelectionMode, A as KupLanguageGrouping, B as KupLanguageCheckbox, C as getValueForDisplay2, E as Filters, H as getValueForDisplay, I as KupLanguageSearch, J as FilterInterval, L as LoadMoreMode, P as PaginatorPos, M as ShowGrid, T as TotalLabel, N as TotalMode, O as numberToFormattedStringNumber, Q as kupDynamicPositionAttribute, R as KupPointerEventTypes, U as kupDraggableColumnAttr, V as kupDragActiveAttr, W as KupDragEffect, X as kupDraggableCellAttr, Y as KupDropEventTypes, Z as FixedCellsCSSVarsBase, _ as KupLanguageFontsize, $ as KupLanguageDensity, a0 as KupLanguageGrid, a1 as KupDataTableProps, a2 as FixedCellsClasses, a3 as SortMode, a4 as iconColumn, a5 as keyColumn, a6 as fieldColumn, a7 as FCellTypes, a8 as unformattedStringToFormattedStringNumber, a9 as formattedStringToCustomUnformattedStringTime, aa as isValidFormattedStringTime, ab as formatTime, ac as unformattedStringToFormattedStringTime, ad as addColumnValueFromRow, ae as KupGlobalFilterMode } from './kup-manager-
|
|
3
|
-
import { F as FTextField } from './f-text-field-
|
|
4
|
-
import { F as FTextFieldMDC } from './f-text-field-mdc-
|
|
5
|
-
import { I as ItemsDisplayMode, F as FCell, K as KupListRole, a as KupListProps, b as FSwitch } from './f-cell-
|
|
2
|
+
import { k as kupManagerInstance, g as getProps, s as setProps, K as KupThemeIconValues, a as KupDynamicPositionPlacement, b as KupThemeColorValues, c as KupDebugCategory, F as FCellShapes, d as FCellPadding, e as getMonthsAsStringByLocale, f as KupDatesFormats, D as DateTimeFormatOptionsMonth, h as KupCardBuiltInClockElements, i as KupCardCSSClasses, j as KupLanguageTotals, l as KupLanguageGeneric, m as KupLanguageColumn, n as KupDataNewColumnTypes, o as KupCardSubEvents, p as KupCardIds, q as KupLanguageRow, r as KupCardFamily, t as KupCardProps, u as getColumnByName, v as KupDates, w as formatToNumber, x as KupDatesNormalize, y as KupObjects, z as identify, G as GroupLabelDisplayMode, S as SelectionMode, A as KupLanguageGrouping, B as KupLanguageCheckbox, C as getValueForDisplay2, E as Filters, H as getValueForDisplay, I as KupLanguageSearch, J as FilterInterval, L as LoadMoreMode, P as PaginatorPos, M as ShowGrid, T as TotalLabel, N as TotalMode, O as numberToFormattedStringNumber, Q as kupDynamicPositionAttribute, R as KupPointerEventTypes, U as kupDraggableColumnAttr, V as kupDragActiveAttr, W as KupDragEffect, X as kupDraggableCellAttr, Y as KupDropEventTypes, Z as FixedCellsCSSVarsBase, _ as KupLanguageFontsize, $ as KupLanguageDensity, a0 as KupLanguageGrid, a1 as KupDataTableProps, a2 as FixedCellsClasses, a3 as SortMode, a4 as iconColumn, a5 as keyColumn, a6 as fieldColumn, a7 as FCellTypes, a8 as unformattedStringToFormattedStringNumber, a9 as formattedStringToCustomUnformattedStringTime, aa as isValidFormattedStringTime, ab as formatTime, ac as unformattedStringToFormattedStringTime, ad as addColumnValueFromRow, ae as KupGlobalFilterMode } from './kup-manager-b41eb2a8.js';
|
|
3
|
+
import { F as FTextField } from './f-text-field-c38ef113.js';
|
|
4
|
+
import { F as FTextFieldMDC } from './f-text-field-mdc-cee583ea.js';
|
|
5
|
+
import { I as ItemsDisplayMode, F as FCell, K as KupListRole, a as KupListProps, b as FSwitch } from './f-cell-b319c869.js';
|
|
6
6
|
import { c as componentWrapperId } from './GenericVariables-665de00a.js';
|
|
7
|
-
import { F as FImage } from './f-image-
|
|
8
|
-
import { F as FButton } from './f-button-
|
|
7
|
+
import { F as FImage } from './f-image-098c26ce.js';
|
|
8
|
+
import { F as FButton } from './f-button-744cf1f6.js';
|
|
9
9
|
import { F as FButtonStyling } from './f-button-declarations-b1b4cac4.js';
|
|
10
|
-
import { F as FChipType, a as FChip } from './f-chip-
|
|
11
|
-
import { M as MDCRipple } from './component-
|
|
10
|
+
import { F as FChipType, a as FChip } from './f-chip-7e3e4180.js';
|
|
11
|
+
import { M as MDCRipple } from './component-120651a0.js';
|
|
12
12
|
import { F as FCheckbox } from './f-checkbox-ec85b437.js';
|
|
13
|
-
import { F as FiltersColumnMenu, a as FiltersRows, c as calcTotals, n as normalizeRows, p as paginateRows, f as filterRows, g as groupRows, s as sortRows, b as FPaginator, d as pageChange, r as rowsPerPageChange, t as treeMainColumnName, K as KupTreeExpansionMode, e as KupTreeProps } from './f-paginator-utils-
|
|
14
|
-
import './tslib.es6-
|
|
13
|
+
import { F as FiltersColumnMenu, a as FiltersRows, c as calcTotals, n as normalizeRows, p as paginateRows, f as filterRows, g as groupRows, s as sortRows, b as FPaginator, d as pageChange, r as rowsPerPageChange, t as treeMainColumnName, K as KupTreeExpansionMode, e as KupTreeProps } from './f-paginator-utils-674cb2ae.js';
|
|
14
|
+
import './tslib.es6-8c2af864.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Props of the kup-autocomplete component.
|
|
@@ -164,7 +164,7 @@ function getItemByDisplayMode(listData, id, displayMode, setSelected) {
|
|
|
164
164
|
|
|
165
165
|
const kupAutocompleteCss = ":host{display:block;width:max-content}.kup-icon{transition:transform 0.15s}.toggled .kup-icon.kup-dropdown-icon{transform:rotate(-180deg)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
166
166
|
|
|
167
|
-
var __classPrivateFieldGet$
|
|
167
|
+
var __classPrivateFieldGet$6 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
168
168
|
if (kind === "a" && !f)
|
|
169
169
|
throw new TypeError("Private accessor was defined without a getter");
|
|
170
170
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -225,18 +225,18 @@ const KupAutocomplete = class {
|
|
|
225
225
|
comp: this,
|
|
226
226
|
id: this.rootElement.id,
|
|
227
227
|
value: this.value,
|
|
228
|
-
inputValue: __classPrivateFieldGet$
|
|
228
|
+
inputValue: __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
231
|
onKupChange(value) {
|
|
232
232
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
233
|
-
const ret = __classPrivateFieldGet$
|
|
233
|
+
const ret = __classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
234
234
|
if (ret.exists || this.allowInconsistentValues) {
|
|
235
235
|
this.kupChange.emit({
|
|
236
236
|
comp: this,
|
|
237
237
|
id: this.rootElement.id,
|
|
238
238
|
value: this.value,
|
|
239
|
-
inputValue: __classPrivateFieldGet$
|
|
239
|
+
inputValue: __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
240
240
|
node: ret.node,
|
|
241
241
|
});
|
|
242
242
|
}
|
|
@@ -246,7 +246,7 @@ const KupAutocomplete = class {
|
|
|
246
246
|
comp: this,
|
|
247
247
|
id: this.rootElement.id,
|
|
248
248
|
value: this.value,
|
|
249
|
-
inputValue: __classPrivateFieldGet$
|
|
249
|
+
inputValue: __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
252
|
onKupFocus() {
|
|
@@ -254,51 +254,51 @@ const KupAutocomplete = class {
|
|
|
254
254
|
comp: this,
|
|
255
255
|
id: this.rootElement.id,
|
|
256
256
|
value: this.value,
|
|
257
|
-
inputValue: __classPrivateFieldGet$
|
|
257
|
+
inputValue: __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
260
|
onKupInput() {
|
|
261
261
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
262
|
-
const ret = __classPrivateFieldGet$
|
|
263
|
-
__classPrivateFieldGet$
|
|
264
|
-
if (__classPrivateFieldGet$
|
|
262
|
+
const ret = __classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").value, false);
|
|
263
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
264
|
+
if (__classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").value.length >= this.minimumChars) {
|
|
265
265
|
this.kupInput.emit({
|
|
266
266
|
comp: this,
|
|
267
267
|
id: this.rootElement.id,
|
|
268
268
|
value: this.value,
|
|
269
|
-
inputValue: __classPrivateFieldGet$
|
|
269
|
+
inputValue: __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
270
270
|
node: ret.node,
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
onKupIconClick() {
|
|
275
|
-
if (__classPrivateFieldGet$
|
|
276
|
-
__classPrivateFieldGet$
|
|
275
|
+
if (__classPrivateFieldGet$6(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
276
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
277
277
|
}
|
|
278
278
|
else {
|
|
279
279
|
if (this.showDropDownIcon) {
|
|
280
|
-
__classPrivateFieldGet$
|
|
280
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, true);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
this.kupIconClick.emit({
|
|
284
284
|
comp: this,
|
|
285
285
|
id: this.rootElement.id,
|
|
286
286
|
value: this.value,
|
|
287
|
-
inputValue: __classPrivateFieldGet$
|
|
288
|
-
open: __classPrivateFieldGet$
|
|
287
|
+
inputValue: __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
288
|
+
open: __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled'),
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
onKupItemClick(e) {
|
|
292
292
|
this.onKupChange(e.detail.selected.id);
|
|
293
|
-
__classPrivateFieldGet$
|
|
294
|
-
if (__classPrivateFieldGet$
|
|
295
|
-
__classPrivateFieldGet$
|
|
293
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
294
|
+
if (__classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f")) {
|
|
295
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
296
296
|
}
|
|
297
297
|
this.kupItemClick.emit({
|
|
298
298
|
comp: this,
|
|
299
299
|
id: this.rootElement.id,
|
|
300
300
|
value: this.value,
|
|
301
|
-
inputValue: __classPrivateFieldGet$
|
|
301
|
+
inputValue: __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
302
302
|
node: e.detail.selected,
|
|
303
303
|
});
|
|
304
304
|
}
|
|
@@ -306,30 +306,30 @@ const KupAutocomplete = class {
|
|
|
306
306
|
/* L i s t e n e r s */
|
|
307
307
|
/*-------------------------------------------------*/
|
|
308
308
|
listenKeydown(e) {
|
|
309
|
-
if (__classPrivateFieldGet$
|
|
309
|
+
if (__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_isListOpened).call(this)) {
|
|
310
310
|
switch (e.key) {
|
|
311
311
|
case 'ArrowDown':
|
|
312
312
|
e.preventDefault();
|
|
313
313
|
e.stopPropagation();
|
|
314
|
-
__classPrivateFieldGet$
|
|
314
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
315
315
|
break;
|
|
316
316
|
case 'ArrowUp':
|
|
317
317
|
e.preventDefault();
|
|
318
318
|
e.stopPropagation();
|
|
319
|
-
__classPrivateFieldGet$
|
|
319
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
320
320
|
break;
|
|
321
321
|
case 'Enter':
|
|
322
322
|
e.preventDefault();
|
|
323
323
|
e.stopPropagation();
|
|
324
|
-
__classPrivateFieldGet$
|
|
325
|
-
__classPrivateFieldGet$
|
|
326
|
-
__classPrivateFieldGet$
|
|
324
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").select().then(() => {
|
|
325
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
326
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
327
327
|
});
|
|
328
328
|
break;
|
|
329
329
|
case 'Escape':
|
|
330
330
|
e.preventDefault();
|
|
331
331
|
e.stopPropagation();
|
|
332
|
-
__classPrivateFieldGet$
|
|
332
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
333
333
|
break;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
@@ -338,14 +338,14 @@ const KupAutocomplete = class {
|
|
|
338
338
|
case 'ArrowDown':
|
|
339
339
|
e.preventDefault();
|
|
340
340
|
e.stopPropagation();
|
|
341
|
-
__classPrivateFieldGet$
|
|
342
|
-
__classPrivateFieldGet$
|
|
341
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
342
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
343
343
|
break;
|
|
344
344
|
case 'ArrowUp':
|
|
345
345
|
e.preventDefault();
|
|
346
346
|
e.stopPropagation();
|
|
347
|
-
__classPrivateFieldGet$
|
|
348
|
-
__classPrivateFieldGet$
|
|
347
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
348
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
349
349
|
break;
|
|
350
350
|
}
|
|
351
351
|
}
|
|
@@ -378,7 +378,7 @@ const KupAutocomplete = class {
|
|
|
378
378
|
* Sets the focus to the component.
|
|
379
379
|
*/
|
|
380
380
|
async setFocus() {
|
|
381
|
-
__classPrivateFieldGet$
|
|
381
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
382
382
|
}
|
|
383
383
|
/**
|
|
384
384
|
* Sets the props to the component.
|
|
@@ -393,14 +393,14 @@ const KupAutocomplete = class {
|
|
|
393
393
|
*/
|
|
394
394
|
async setValue(value) {
|
|
395
395
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
396
|
-
__classPrivateFieldGet$
|
|
396
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
397
397
|
}
|
|
398
398
|
/*-------------------------------------------------*/
|
|
399
399
|
/* L i f e c y c l e H o o k s */
|
|
400
400
|
/*-------------------------------------------------*/
|
|
401
401
|
componentWillLoad() {
|
|
402
|
-
__classPrivateFieldGet$
|
|
403
|
-
__classPrivateFieldGet$
|
|
402
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, false);
|
|
403
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").theme.register(this);
|
|
404
404
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
405
405
|
this.value = this.initialValue;
|
|
406
406
|
if (!this.data) {
|
|
@@ -411,11 +411,11 @@ const KupAutocomplete = class {
|
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
componentDidLoad() {
|
|
414
|
-
__classPrivateFieldGet$
|
|
415
|
-
__classPrivateFieldGet$
|
|
414
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, this.value, true);
|
|
415
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, true);
|
|
416
416
|
}
|
|
417
417
|
componentWillRender() {
|
|
418
|
-
__classPrivateFieldGet$
|
|
418
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, false);
|
|
419
419
|
}
|
|
420
420
|
componentDidRender() {
|
|
421
421
|
const root = this.rootElement.shadowRoot;
|
|
@@ -427,81 +427,81 @@ const KupAutocomplete = class {
|
|
|
427
427
|
FTextFieldMDC(f);
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
__classPrivateFieldGet$
|
|
430
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, true);
|
|
431
431
|
}
|
|
432
432
|
render() {
|
|
433
433
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
434
434
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
435
|
-
return (h(Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$
|
|
435
|
+
return (h(Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$6(this, _KupAutocomplete_elStyle, "f") }, h("style", null, __classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, style: __classPrivateFieldGet$6(this, _KupAutocomplete_elStyle, "f") }, h(FTextField, Object.assign({ icon: this.showDropDownIcon
|
|
436
436
|
? KupThemeIconValues.DROPDOWN
|
|
437
437
|
: null, trailingIcon: true }, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => {
|
|
438
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
438
|
+
window.clearTimeout(__classPrivateFieldGet$6(this, _KupAutocomplete_inputTimeout, "f"));
|
|
439
439
|
__classPrivateFieldSet$4(this, _KupAutocomplete_inputTimeout, window.setTimeout(() => this.onKupInput(), this.inputDelay), "f");
|
|
440
|
-
}, onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$
|
|
440
|
+
}, onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_prepList).call(this)));
|
|
441
441
|
}
|
|
442
442
|
disconnectedCallback() {
|
|
443
|
-
if (__classPrivateFieldGet$
|
|
444
|
-
__classPrivateFieldGet$
|
|
445
|
-
__classPrivateFieldGet$
|
|
443
|
+
if (__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f")) {
|
|
444
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f")]);
|
|
445
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").remove();
|
|
446
446
|
}
|
|
447
|
-
__classPrivateFieldGet$
|
|
447
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").theme.unregister(this);
|
|
448
448
|
}
|
|
449
449
|
get rootElement() { return getElement$1(this); }
|
|
450
450
|
};
|
|
451
451
|
_KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle = new WeakMap(), _KupAutocomplete_listEl = new WeakMap(), _KupAutocomplete_kupManager = new WeakMap(), _KupAutocomplete_textfieldWrapper = new WeakMap(), _KupAutocomplete_textfieldEl = new WeakMap(), _KupAutocomplete_clickCb = new WeakMap(), _KupAutocomplete_inputTimeout = new WeakMap(), _KupAutocomplete_instances = new WeakSet(), _KupAutocomplete_openList = function _KupAutocomplete_openList(forceOpen) {
|
|
452
452
|
if (forceOpen != true &&
|
|
453
|
-
__classPrivateFieldGet$
|
|
454
|
-
__classPrivateFieldGet$
|
|
453
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_textfieldEl, "f").value.length < this.minimumChars) {
|
|
454
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
455
455
|
return false;
|
|
456
456
|
}
|
|
457
|
-
__classPrivateFieldGet$
|
|
458
|
-
__classPrivateFieldGet$
|
|
459
|
-
const elStyle = __classPrivateFieldGet$
|
|
457
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_textfieldWrapper, "f").classList.add('toggled');
|
|
458
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").menuVisible = true;
|
|
459
|
+
const elStyle = __classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").style;
|
|
460
460
|
elStyle.height = 'auto';
|
|
461
|
-
elStyle.minWidth = __classPrivateFieldGet$
|
|
462
|
-
if (__classPrivateFieldGet$
|
|
463
|
-
__classPrivateFieldGet$
|
|
461
|
+
elStyle.minWidth = __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldWrapper, "f").clientWidth + 'px';
|
|
462
|
+
if (__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"))) {
|
|
463
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldWrapper, "f"));
|
|
464
464
|
}
|
|
465
465
|
else {
|
|
466
|
-
__classPrivateFieldGet$
|
|
466
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$6(this, _KupAutocomplete_textfieldWrapper, "f"), 0, KupDynamicPositionPlacement.AUTO, true);
|
|
467
467
|
}
|
|
468
|
-
__classPrivateFieldGet$
|
|
469
|
-
if (!__classPrivateFieldGet$
|
|
468
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"));
|
|
469
|
+
if (!__classPrivateFieldGet$6(this, _KupAutocomplete_clickCb, "f")) {
|
|
470
470
|
__classPrivateFieldSet$4(this, _KupAutocomplete_clickCb, {
|
|
471
471
|
cb: () => {
|
|
472
|
-
__classPrivateFieldGet$
|
|
472
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
473
473
|
},
|
|
474
|
-
el: __classPrivateFieldGet$
|
|
474
|
+
el: __classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"),
|
|
475
475
|
}, "f");
|
|
476
476
|
}
|
|
477
|
-
__classPrivateFieldGet$
|
|
477
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").addClickCallback(__classPrivateFieldGet$6(this, _KupAutocomplete_clickCb, "f"), true);
|
|
478
478
|
return true;
|
|
479
479
|
}, _KupAutocomplete_closeList = function _KupAutocomplete_closeList() {
|
|
480
|
-
__classPrivateFieldGet$
|
|
481
|
-
__classPrivateFieldGet$
|
|
482
|
-
__classPrivateFieldGet$
|
|
483
|
-
__classPrivateFieldGet$
|
|
480
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_textfieldWrapper, "f").classList.remove('toggled');
|
|
481
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").menuVisible = false;
|
|
482
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"));
|
|
483
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet$6(this, _KupAutocomplete_clickCb, "f"));
|
|
484
484
|
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
485
|
-
return __classPrivateFieldGet$
|
|
485
|
+
return __classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
486
486
|
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, setValue) {
|
|
487
|
-
if (!__classPrivateFieldGet$
|
|
487
|
+
if (!__classPrivateFieldGet$6(this, _KupAutocomplete_doConsistencyCheck, "f")) {
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
490
490
|
__classPrivateFieldSet$4(this, _KupAutocomplete_doConsistencyCheck, false, "f");
|
|
491
|
-
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$
|
|
491
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f"), this.selectMode, this.displayMode);
|
|
492
492
|
if (ret.exists || this.allowInconsistentValues) {
|
|
493
493
|
if (setValue) {
|
|
494
494
|
this.value = ret.value;
|
|
495
495
|
this.displayedValue = ret.displayedValue;
|
|
496
496
|
}
|
|
497
|
-
if (__classPrivateFieldGet$
|
|
498
|
-
__classPrivateFieldGet$
|
|
497
|
+
if (__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
498
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
else {
|
|
502
502
|
this.displayedValue = idIn;
|
|
503
|
-
if (__classPrivateFieldGet$
|
|
504
|
-
__classPrivateFieldGet$
|
|
503
|
+
if (__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
504
|
+
__classPrivateFieldGet$6(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
return ret;
|
|
@@ -6447,7 +6447,7 @@ var KupChipProps;
|
|
|
6447
6447
|
|
|
6448
6448
|
const kupChipCss = ":host{display:block}";
|
|
6449
6449
|
|
|
6450
|
-
var __classPrivateFieldGet$
|
|
6450
|
+
var __classPrivateFieldGet$5 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
6451
6451
|
if (kind === "a" && !f)
|
|
6452
6452
|
throw new TypeError("Private accessor was defined without a getter");
|
|
6453
6453
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -6516,7 +6516,7 @@ const KupChip = class {
|
|
|
6516
6516
|
this.kupChange.emit({
|
|
6517
6517
|
comp: this,
|
|
6518
6518
|
id: this.rootElement.id,
|
|
6519
|
-
stringifiedValues: __classPrivateFieldGet$
|
|
6519
|
+
stringifiedValues: __classPrivateFieldGet$5(this, _KupChip_instances, "m", _KupChip_stringifiedValues).call(this),
|
|
6520
6520
|
});
|
|
6521
6521
|
this.refresh();
|
|
6522
6522
|
}
|
|
@@ -6632,12 +6632,12 @@ const KupChip = class {
|
|
|
6632
6632
|
props.onFocus.push((chip) => this.onKupFocus(chip));
|
|
6633
6633
|
props.onIconClick.push((chip) => this.onKupIconClick(chip));
|
|
6634
6634
|
}
|
|
6635
|
-
return (h(Host, { "onKup-autocomplete-
|
|
6636
|
-
__classPrivateFieldGet$
|
|
6637
|
-
}, "onKup-combobox-
|
|
6638
|
-
__classPrivateFieldGet$
|
|
6635
|
+
return (h(Host, { "onKup-autocomplete-itemclick": (e) => {
|
|
6636
|
+
__classPrivateFieldGet$5(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
6637
|
+
}, "onKup-combobox-itemclick": (e) => {
|
|
6638
|
+
__classPrivateFieldGet$5(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
6639
6639
|
}, "onKup-textfield-change": (e) => {
|
|
6640
|
-
__classPrivateFieldGet$
|
|
6640
|
+
__classPrivateFieldGet$5(this, _KupChip_instances, "m", _KupChip_changeHandler).call(this, e);
|
|
6641
6641
|
} }, h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 ? h(FChip, Object.assign({}, props)) : null, h("slot", { name: "field" }))));
|
|
6642
6642
|
}
|
|
6643
6643
|
disconnectedCallback() {
|
|
@@ -6660,8 +6660,9 @@ _KupChip_instances = new WeakSet(), _KupChip_changeHandler =
|
|
|
6660
6660
|
if (value) {
|
|
6661
6661
|
const node = (_b = this.data) === null || _b === void 0 ? void 0 : _b.find((node) => node.id === value);
|
|
6662
6662
|
if (!node) {
|
|
6663
|
+
const data = this.data && this.data.length ? this.data : [];
|
|
6663
6664
|
this.data = [
|
|
6664
|
-
...
|
|
6665
|
+
...data,
|
|
6665
6666
|
{
|
|
6666
6667
|
id: listNode ? listNode.id : value,
|
|
6667
6668
|
value: listNode ? listNode.value : value,
|
|
@@ -6674,7 +6675,7 @@ _KupChip_instances = new WeakSet(), _KupChip_changeHandler =
|
|
|
6674
6675
|
this.kupChange.emit({
|
|
6675
6676
|
comp: this,
|
|
6676
6677
|
id: this.rootElement.id,
|
|
6677
|
-
stringifiedValues: __classPrivateFieldGet$
|
|
6678
|
+
stringifiedValues: __classPrivateFieldGet$5(this, _KupChip_instances, "m", _KupChip_stringifiedValues).call(this),
|
|
6678
6679
|
});
|
|
6679
6680
|
}
|
|
6680
6681
|
}
|
|
@@ -6963,7 +6964,7 @@ var KupComboboxProps;
|
|
|
6963
6964
|
|
|
6964
6965
|
const kupComboboxCss = ":host{display:block;font-size:var(--kup-font-size);width:max-content}:host([is-select]) #kup-component{transition:background-color 0.2s}:host([is-select]) #kup-component:hover{background-color:rgba(var(--kup-text-color-rgb), 0.1)}:host([is-select]) .mdc-text-field:not(.mdc-text-field--disabled) input{cursor:pointer}.kup-icon{transition:transform 0.15s}.toggled .kup-icon.kup-dropdown-icon{transform:rotate(-180deg)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
6965
6966
|
|
|
6966
|
-
var __classPrivateFieldGet$
|
|
6967
|
+
var __classPrivateFieldGet$4 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
6967
6968
|
if (kind === "a" && !f)
|
|
6968
6969
|
throw new TypeError("Private accessor was defined without a getter");
|
|
6969
6970
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -7019,33 +7020,33 @@ const KupCombobox = class {
|
|
|
7019
7020
|
comp: this,
|
|
7020
7021
|
id: this.rootElement.id,
|
|
7021
7022
|
value: this.value,
|
|
7022
|
-
inputValue: __classPrivateFieldGet$
|
|
7023
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7023
7024
|
});
|
|
7024
7025
|
}
|
|
7025
7026
|
onKupChange(value) {
|
|
7026
|
-
let ret = __classPrivateFieldGet$
|
|
7027
|
+
let ret = __classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
7027
7028
|
this.kupChange.emit({
|
|
7028
7029
|
comp: this,
|
|
7029
7030
|
id: this.rootElement.id,
|
|
7030
7031
|
value: this.value,
|
|
7031
|
-
inputValue: __classPrivateFieldGet$
|
|
7032
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7032
7033
|
node: ret.node,
|
|
7033
7034
|
});
|
|
7034
7035
|
}
|
|
7035
7036
|
onKupClick() {
|
|
7036
7037
|
if (this.isSelect == true) {
|
|
7037
|
-
if (__classPrivateFieldGet$
|
|
7038
|
-
__classPrivateFieldGet$
|
|
7038
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
7039
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7039
7040
|
}
|
|
7040
7041
|
else {
|
|
7041
|
-
__classPrivateFieldGet$
|
|
7042
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7042
7043
|
}
|
|
7043
7044
|
}
|
|
7044
7045
|
this.kupClick.emit({
|
|
7045
7046
|
comp: this,
|
|
7046
7047
|
id: this.rootElement.id,
|
|
7047
7048
|
value: this.value,
|
|
7048
|
-
inputValue: __classPrivateFieldGet$
|
|
7049
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7049
7050
|
});
|
|
7050
7051
|
}
|
|
7051
7052
|
onKupFocus() {
|
|
@@ -7053,47 +7054,47 @@ const KupCombobox = class {
|
|
|
7053
7054
|
comp: this,
|
|
7054
7055
|
id: this.rootElement.id,
|
|
7055
7056
|
value: this.value,
|
|
7056
|
-
inputValue: __classPrivateFieldGet$
|
|
7057
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7057
7058
|
});
|
|
7058
7059
|
}
|
|
7059
7060
|
onKupInput() {
|
|
7060
|
-
let ret = __classPrivateFieldGet$
|
|
7061
|
-
__classPrivateFieldGet$
|
|
7061
|
+
let ret = __classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value, false);
|
|
7062
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7062
7063
|
this.kupInput.emit({
|
|
7063
7064
|
comp: this,
|
|
7064
7065
|
id: this.rootElement.id,
|
|
7065
7066
|
value: this.value,
|
|
7066
|
-
inputValue: __classPrivateFieldGet$
|
|
7067
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7067
7068
|
node: ret.node,
|
|
7068
7069
|
});
|
|
7069
7070
|
}
|
|
7070
7071
|
onKupIconClick() {
|
|
7071
|
-
if (__classPrivateFieldGet$
|
|
7072
|
-
__classPrivateFieldGet$
|
|
7072
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
7073
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7073
7074
|
}
|
|
7074
7075
|
else {
|
|
7075
|
-
__classPrivateFieldGet$
|
|
7076
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7076
7077
|
}
|
|
7077
7078
|
this.kupIconClick.emit({
|
|
7078
7079
|
comp: this,
|
|
7079
7080
|
id: this.rootElement.id,
|
|
7080
7081
|
value: this.value,
|
|
7081
|
-
inputValue: __classPrivateFieldGet$
|
|
7082
|
-
open: __classPrivateFieldGet$
|
|
7082
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7083
|
+
open: __classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled'),
|
|
7083
7084
|
});
|
|
7084
7085
|
}
|
|
7085
7086
|
onKupItemClick(e) {
|
|
7086
7087
|
this.onKupChange(e.detail.selected.id);
|
|
7087
|
-
__classPrivateFieldGet$
|
|
7088
|
-
if (__classPrivateFieldGet$
|
|
7089
|
-
__classPrivateFieldGet$
|
|
7088
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7089
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f")) {
|
|
7090
|
+
__classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7090
7091
|
}
|
|
7091
7092
|
this.kupItemClick.emit({
|
|
7092
7093
|
comp: this,
|
|
7093
7094
|
id: this.rootElement.id,
|
|
7094
7095
|
node: e.detail.selected,
|
|
7095
7096
|
value: this.value,
|
|
7096
|
-
inputValue: __classPrivateFieldGet$
|
|
7097
|
+
inputValue: __classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").value,
|
|
7097
7098
|
});
|
|
7098
7099
|
}
|
|
7099
7100
|
/*-------------------------------------------------*/
|
|
@@ -7106,30 +7107,30 @@ const KupCombobox = class {
|
|
|
7106
7107
|
/* L i s t e n e r s */
|
|
7107
7108
|
/*-------------------------------------------------*/
|
|
7108
7109
|
listenKeydown(e) {
|
|
7109
|
-
if (__classPrivateFieldGet$
|
|
7110
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
7110
7111
|
switch (e.key) {
|
|
7111
7112
|
case 'ArrowDown':
|
|
7112
7113
|
e.preventDefault();
|
|
7113
7114
|
e.stopPropagation();
|
|
7114
|
-
__classPrivateFieldGet$
|
|
7115
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").focusNext();
|
|
7115
7116
|
break;
|
|
7116
7117
|
case 'ArrowUp':
|
|
7117
7118
|
e.preventDefault();
|
|
7118
7119
|
e.stopPropagation();
|
|
7119
|
-
__classPrivateFieldGet$
|
|
7120
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").focusPrevious();
|
|
7120
7121
|
break;
|
|
7121
7122
|
case 'Enter':
|
|
7122
7123
|
e.preventDefault();
|
|
7123
7124
|
e.stopPropagation();
|
|
7124
|
-
__classPrivateFieldGet$
|
|
7125
|
-
__classPrivateFieldGet$
|
|
7126
|
-
__classPrivateFieldGet$
|
|
7125
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").select().then(() => {
|
|
7126
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7127
|
+
__classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7127
7128
|
});
|
|
7128
7129
|
break;
|
|
7129
7130
|
case 'Escape':
|
|
7130
7131
|
e.preventDefault();
|
|
7131
7132
|
e.stopPropagation();
|
|
7132
|
-
__classPrivateFieldGet$
|
|
7133
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7133
7134
|
break;
|
|
7134
7135
|
}
|
|
7135
7136
|
}
|
|
@@ -7138,14 +7139,14 @@ const KupCombobox = class {
|
|
|
7138
7139
|
case 'ArrowDown':
|
|
7139
7140
|
e.preventDefault();
|
|
7140
7141
|
e.stopPropagation();
|
|
7141
|
-
__classPrivateFieldGet$
|
|
7142
|
-
__classPrivateFieldGet$
|
|
7142
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7143
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").focusNext();
|
|
7143
7144
|
break;
|
|
7144
7145
|
case 'ArrowUp':
|
|
7145
7146
|
e.preventDefault();
|
|
7146
7147
|
e.stopPropagation();
|
|
7147
|
-
__classPrivateFieldGet$
|
|
7148
|
-
__classPrivateFieldGet$
|
|
7148
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
7149
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").focusPrevious();
|
|
7149
7150
|
break;
|
|
7150
7151
|
}
|
|
7151
7152
|
}
|
|
@@ -7178,7 +7179,7 @@ const KupCombobox = class {
|
|
|
7178
7179
|
* Sets the focus to the component.
|
|
7179
7180
|
*/
|
|
7180
7181
|
async setFocus() {
|
|
7181
|
-
__classPrivateFieldGet$
|
|
7182
|
+
__classPrivateFieldGet$4(this, _KupCombobox_textfieldEl, "f").focus();
|
|
7182
7183
|
}
|
|
7183
7184
|
/**
|
|
7184
7185
|
* Sets the props to the component.
|
|
@@ -7192,14 +7193,14 @@ const KupCombobox = class {
|
|
|
7192
7193
|
* @param {string} value - Value to be set.
|
|
7193
7194
|
*/
|
|
7194
7195
|
async setValue(value) {
|
|
7195
|
-
__classPrivateFieldGet$
|
|
7196
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
7196
7197
|
}
|
|
7197
7198
|
/*-------------------------------------------------*/
|
|
7198
7199
|
/* L i f e c y c l e H o o k s */
|
|
7199
7200
|
/*-------------------------------------------------*/
|
|
7200
7201
|
componentWillLoad() {
|
|
7201
|
-
__classPrivateFieldGet$
|
|
7202
|
-
__classPrivateFieldGet$
|
|
7202
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").debug.logLoad(this, false);
|
|
7203
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").theme.register(this);
|
|
7203
7204
|
this.value = this.initialValue;
|
|
7204
7205
|
if (!this.data) {
|
|
7205
7206
|
this.data = {
|
|
@@ -7209,11 +7210,11 @@ const KupCombobox = class {
|
|
|
7209
7210
|
}
|
|
7210
7211
|
}
|
|
7211
7212
|
componentDidLoad() {
|
|
7212
|
-
__classPrivateFieldGet$
|
|
7213
|
-
__classPrivateFieldGet$
|
|
7213
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, this.value, true);
|
|
7214
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").debug.logLoad(this, true);
|
|
7214
7215
|
}
|
|
7215
7216
|
componentWillRender() {
|
|
7216
|
-
__classPrivateFieldGet$
|
|
7217
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").debug.logRender(this, false);
|
|
7217
7218
|
}
|
|
7218
7219
|
componentDidRender() {
|
|
7219
7220
|
const root = this.rootElement.shadowRoot;
|
|
@@ -7225,21 +7226,21 @@ const KupCombobox = class {
|
|
|
7225
7226
|
FTextFieldMDC(f);
|
|
7226
7227
|
}
|
|
7227
7228
|
}
|
|
7228
|
-
__classPrivateFieldGet$
|
|
7229
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").debug.logRender(this, true);
|
|
7229
7230
|
}
|
|
7230
7231
|
render() {
|
|
7231
7232
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
7232
7233
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
7233
|
-
return (h(Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$
|
|
7234
|
+
return (h(Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$4(this, _KupCombobox_elStyle, "f") }, h("style", null, __classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, style: __classPrivateFieldGet$4(this, _KupCombobox_elStyle, "f") }, h(FTextField, Object.assign({}, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, icon: this.showDropDownIcon
|
|
7234
7235
|
? KupThemeIconValues.DROPDOWN
|
|
7235
|
-
: null, readOnly: this.isSelect, trailingIcon: true, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$
|
|
7236
|
+
: null, readOnly: this.isSelect, trailingIcon: true, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)));
|
|
7236
7237
|
}
|
|
7237
7238
|
disconnectedCallback() {
|
|
7238
|
-
if (__classPrivateFieldGet$
|
|
7239
|
-
__classPrivateFieldGet$
|
|
7240
|
-
__classPrivateFieldGet$
|
|
7239
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f")) {
|
|
7240
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f")]);
|
|
7241
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").remove();
|
|
7241
7242
|
}
|
|
7242
|
-
__classPrivateFieldGet$
|
|
7243
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").theme.unregister(this);
|
|
7243
7244
|
}
|
|
7244
7245
|
get rootElement() { return getElement$1(this); }
|
|
7245
7246
|
static get watchers() { return {
|
|
@@ -7247,54 +7248,54 @@ const KupCombobox = class {
|
|
|
7247
7248
|
}; }
|
|
7248
7249
|
};
|
|
7249
7250
|
_KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _KupCombobox_listEl = new WeakMap(), _KupCombobox_textfieldWrapper = new WeakMap(), _KupCombobox_textfieldEl = new WeakMap(), _KupCombobox_clickCb = new WeakMap(), _KupCombobox_instances = new WeakSet(), _KupCombobox_openList = function _KupCombobox_openList() {
|
|
7250
|
-
if (__classPrivateFieldGet$
|
|
7251
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_isListOpened).call(this)) {
|
|
7251
7252
|
return;
|
|
7252
7253
|
}
|
|
7253
|
-
__classPrivateFieldGet$
|
|
7254
|
-
__classPrivateFieldGet$
|
|
7255
|
-
__classPrivateFieldGet$
|
|
7256
|
-
const elStyle = __classPrivateFieldGet$
|
|
7254
|
+
__classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").classList.add('toggled');
|
|
7255
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").menuVisible = true;
|
|
7256
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").filter = '';
|
|
7257
|
+
const elStyle = __classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").style;
|
|
7257
7258
|
elStyle.height = 'auto';
|
|
7258
|
-
elStyle.minWidth = __classPrivateFieldGet$
|
|
7259
|
-
if (__classPrivateFieldGet$
|
|
7260
|
-
__classPrivateFieldGet$
|
|
7259
|
+
elStyle.minWidth = __classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").clientWidth + 'px';
|
|
7260
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"))) {
|
|
7261
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"), __classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f"));
|
|
7261
7262
|
}
|
|
7262
7263
|
else {
|
|
7263
|
-
__classPrivateFieldGet$
|
|
7264
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"), __classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f"), 0, KupDynamicPositionPlacement.AUTO, true);
|
|
7264
7265
|
}
|
|
7265
|
-
__classPrivateFieldGet$
|
|
7266
|
-
if (!__classPrivateFieldGet$
|
|
7266
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"));
|
|
7267
|
+
if (!__classPrivateFieldGet$4(this, _KupCombobox_clickCb, "f")) {
|
|
7267
7268
|
__classPrivateFieldSet$3(this, _KupCombobox_clickCb, {
|
|
7268
7269
|
cb: () => {
|
|
7269
|
-
__classPrivateFieldGet$
|
|
7270
|
+
__classPrivateFieldGet$4(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7270
7271
|
},
|
|
7271
|
-
el: __classPrivateFieldGet$
|
|
7272
|
+
el: __classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"),
|
|
7272
7273
|
}, "f");
|
|
7273
7274
|
}
|
|
7274
|
-
__classPrivateFieldGet$
|
|
7275
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").addClickCallback(__classPrivateFieldGet$4(this, _KupCombobox_clickCb, "f"), true);
|
|
7275
7276
|
}, _KupCombobox_closeList = function _KupCombobox_closeList() {
|
|
7276
|
-
__classPrivateFieldGet$
|
|
7277
|
-
__classPrivateFieldGet$
|
|
7278
|
-
__classPrivateFieldGet$
|
|
7279
|
-
__classPrivateFieldGet$
|
|
7277
|
+
__classPrivateFieldGet$4(this, _KupCombobox_textfieldWrapper, "f").classList.remove('toggled');
|
|
7278
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").menuVisible = false;
|
|
7279
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"));
|
|
7280
|
+
__classPrivateFieldGet$4(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet$4(this, _KupCombobox_clickCb, "f"));
|
|
7280
7281
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
7281
|
-
return __classPrivateFieldGet$
|
|
7282
|
+
return __classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").menuVisible == true;
|
|
7282
7283
|
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, setValue) {
|
|
7283
|
-
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$
|
|
7284
|
+
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$4(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
7284
7285
|
if (ret.exists) {
|
|
7285
7286
|
if (setValue) {
|
|
7286
7287
|
this.value = ret.value;
|
|
7287
7288
|
this.displayedValue = ret.displayedValue;
|
|
7288
7289
|
}
|
|
7289
|
-
if (__classPrivateFieldGet$
|
|
7290
|
-
__classPrivateFieldGet$
|
|
7290
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f") != null) {
|
|
7291
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7291
7292
|
}
|
|
7292
7293
|
}
|
|
7293
7294
|
else {
|
|
7294
7295
|
this.value = idIn;
|
|
7295
7296
|
this.displayedValue = idIn;
|
|
7296
|
-
if (__classPrivateFieldGet$
|
|
7297
|
-
__classPrivateFieldGet$
|
|
7297
|
+
if (__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f") != null) {
|
|
7298
|
+
__classPrivateFieldGet$4(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7298
7299
|
}
|
|
7299
7300
|
}
|
|
7300
7301
|
return ret;
|
|
@@ -8080,7 +8081,7 @@ class KupColumnMenu {
|
|
|
8080
8081
|
|
|
8081
8082
|
const kupDataTableCss = ":host{--kup_datatable_background_color:var(\n --kup-datatable-background-color,\n var(--kup-background-color)\n );--kup_datatable_border:var(\n --kup-datatable-border,\n 1px solid var(--kup-border-color)\n );--kup_datatable_color:var(--kup-datatable-color, var(--kup-text-color));--kup_datatable_font_family:var(\n --kup-datatable-font-family,\n var(--kup-font-family)\n );--kup_datatable_font_family_monospace:var(\n --kup-datatable-font-family-monospace,\n var(--kup-font-family-monospace)\n );--kup_datatable_font_size:var(\n --kup-datatable-font-size,\n var(--kup-font-size)\n );--kup_datatable_th_border:var(\n --kup-datatable-th-border,\n 1px solid var(--kup-border-color)\n );--kup_datatable_th_resize_handle_width:var(\n --kup-datatable-th-resize-handle-width,\n 3px\n );display:block;font-family:var(--kup_datatable_font_family);font-size:var(--kup_datatable_font_size);position:relative}:host([kup-toolbar]) .settings-trigger{height:12px}:host([kup-toolbar]) .customize-panel{visibility:visible}:host([force-one-line]) .f-cell__text{white-space:nowrap}table{background-color:var(--kup_datatable_background_color);border-spacing:0;border-collapse:separate;color:var(--kup_datatable_color);min-width:intrinsic;min-width:-moz-max-content;min-width:-webkit-max-content;text-align:left;width:100%}table.auto-width{min-width:auto;width:0}table>tbody>tr.focus td:first-of-type,table>tbody>tr[kup-drag-over] td:first-of-type{box-shadow:inset 4px 0px 0px 0px var(--kup-secondary-color)}table>tbody>tr>td:first-of-type,table>tbody>tr>td.placeholder~td:not(.placeholder){border-left:var(--kup_datatable_border)}table>tbody>tr>td:last-of-type{border-right:var(--kup_datatable_border)}table>tbody>tr:last-of-type>td{border-bottom:var(--kup_datatable_border)}table.border-top>tbody>tr:first-of-type>td{border-top:var(--kup_datatable_border)}table.row-separation>tbody>tr>td{border-bottom:var(--kup_datatable_border)}table.column-separation>tbody>tr>td{border-right:var(--kup_datatable_border)}table.noGrid,table.noGrid td{border:none}table tfoot td{border-bottom:var(--kup_datatable_border);border-right:var(--kup_datatable_border);box-sizing:border-box;height:36px;text-align:right;font-weight:bold;padding:0.5em 0.3125em}table tfoot td:hover{background-color:var(--kup_datatable_background_color)}table tfoot td:first-of-type{border-left:var(--kup_datatable_border)}#global-filter{margin:0.5em 0px;min-width:140px;width:100%}.kup-icon:not(.f-image){background-color:var(--kup-title-color);margin:0 0.25em;height:1.25em;width:1.25em}.kup-icon:not(.f-image).kup-ascending-icon,.kup-icon:not(.f-image).kup-descending-icon,.kup-icon:not(.f-image).kup-key-icon,.kup-icon:not(.f-image).kup-filter-remove-icon{height:auto}.kup-icon:not(.f-image).kup-collapsed-icon,.kup-icon:not(.f-image).kup-expanded-icon{float:left}.kup-icon:not(.f-image).kup-filter-remove-icon,.kup-icon:not(.f-image).kup-key-icon{margin:0 0.25em}.below-wrapper{backface-visibility:hidden;height:auto;overflow:auto}.below-wrapper.custom-size{overflow:unset}.below-wrapper:not(.custom-size){overflow-x:auto}.density-dense tbody>tr.group td{padding-top:0.25em;padding-bottom:0.25em}.density-wide tbody>tr.group>td{padding-top:0.75em;padding-bottom:0.75em}.fontsize-small{font-size:calc(var(--kup_datatable_font_size) * 0.75);transition:font-size 0.1s}.fontsize-small .group-cell-content>span:before{font-size:calc(var(--kup_datatable_font_size) * 1) !important}.fontsize-big{font-size:calc(var(--kup_datatable_font_size) * 1.25);transition:font-size 0.1s}.fontsize-big .group-cell-content>span:before{font-size:calc(var(--kup_datatable_font_size) * 1.5) !important}th{background-color:var(--kup-title-background-color);border:var(--kup_datatable_th_border);border-left:0 none;border-bottom-width:2px;box-sizing:border-box;top:0;touch-action:none;transition:background-color 0.25s ease;user-select:none}th:first-of-type{border-left:var(--kup_datatable_th_border)}.header-cell__content{color:var(--kup-title-color);display:flex;justify-content:space-between;padding:0.5em 0.3125em;text-overflow:ellipsis;white-space:nowrap}.header-cell--centered .header-cell__content{justify-content:center}.header-cell--is-number .header-cell__content{justify-content:flex-end}.header-cell__title{overflow:hidden;text-overflow:ellipsis;user-select:none}.header-cell__icons{display:flex}.header-cell__drag-handler{background:rgba(var(--kup-title-color-rgb), 0.25);height:100%;position:absolute;right:0;top:0;touch-action:none;user-select:none;width:var(--kup_datatable_th_resize_handle_width)}.header-cell__drag-handler:hover{background:rgba(var(--kup-title-color-rgb), 0.5)}.header-cell--sortable{cursor:pointer}.header-cell--is-icon{width:30px}tbody{cursor:auto}tbody td{height:0;padding:0}tbody td>*{border:none !important}tbody tr kup-button{max-width:max-content}tbody tr[kup-draggable]{opacity:0.5}tbody tr.selected td{background-color:rgba(var(--kup-primary-color-rgb), 0.175)}tbody tr:hover:not(.group):not(.selected) td{color:var(--kup-hover-color);background-color:var(--kup-hover-background-color)}tbody tr.group{background:var(--kup-title-background-color);border-top:var(--kup_datatable_border);color:var(--kup-title-color);font-weight:bold;cursor:pointer}tbody tr.group.group-label{border-bottom:none}tbody tr.group.group-total{border-top:none;line-height:0.5em}tbody tr.group>td{padding:0.5em 0}tbody tr.group>td .group-cell-content .indent{float:left;margin-left:0.25em}tbody tr.group>td .group-cell-content>span{display:inline-flex;outline:none;margin-left:0.25em}tbody tr.group>td.total{text-align:right;padding:0.5em 0.3125em}tbody tr.group>td.total.negative-number{color:var(--kup-danger-color)}tbody tr>td{box-sizing:border-box;transition:box-shadow 0.1s}tbody tr>td .row-expander{margin-right:0.5em}tbody tr>td .row-action{margin-right:0.2em}tbody tr [row-select-cell]{min-height:40px}tbody tr td[row-action-cell]{width:calc(3em * var(--kup_datatable_row_actions))}tbody tr td[row-action-cell] .f-image{cursor:pointer;margin-left:0.75em;display:inline-block;opacity:1;transition:0.25s ease-in-out}tbody tr td[row-action-cell] .f-image:hover{opacity:0.5}.above-wrapper{display:flex;width:100%}.kup-icon.overlay-action{display:none;position:absolute;top:0.5em;left:calc(50% - 0.625em)}th:hover .kup-icon.overlay-action{display:block}thead th{position:relative}th.obj:hover span:not(.overlay-action){opacity:0.5}.hidden span{color:transparent;position:relative;text-overflow:ellipsis;transition:color 200ms}.hidden span:hover{color:var(--kup_datatable_color)}.group-wrapper{--kup-chip-margin:0 4px}.totals-value{font-weight:bold}.settings-trigger{cursor:pointer;display:block;width:32px;height:0;border-top-left-radius:25px 30px;border-top-right-radius:25px 30px;background-color:var(--kup-border-color);transition:height 0.25s}.settings-trigger.toggled{background-color:var(--kup-primary-color)}.settings-trigger.toggled .f-image__icon{background:var(--kup-text-on-primary-color) !important}.indent{display:inline-block;height:1em;width:2em}.indent~kup-image,.indent~kup-button{margin:0;vertical-align:middle}.indent~kup-image{display:inline-block}.indent~kup-button,.indent~kup-checkbox{display:inline-block}.actions-wrapper{display:flex}.insert-button,.delete-button,.save-button{padding:1em 0.5em}.kup-icon.kup-ascending-icon{-webkit-mask:var(--kup-ascending-icon);mask:var(--kup-ascending-icon)}.kup-icon.kup-collapsed-icon{-webkit-mask:var(--kup-collapsed-icon);mask:var(--kup-collapsed-icon)}.kup-icon.kup-descending-icon{-webkit-mask:var(--kup-descending-icon);mask:var(--kup-descending-icon)}.kup-icon.kup-expanded-icon{-webkit-mask:var(--kup-expanded-icon);mask:var(--kup-expanded-icon)}.kup-icon.kup-filter-remove-icon{-webkit-mask:var(--kup-filter-remove-icon);mask:var(--kup-filter-remove-icon)}.kup-icon.kup-key-icon{-webkit-mask:var(--kup-key-icon);mask:var(--kup-key-icon)}.paginator-wrapper{display:flex;flex-flow:wrap;min-width:max-content}.paginator-tabs{width:100%}.paginator-tabs kup-paginator{display:inline-flex}.paginator-tabs kup-button{position:relative;height:100%;margin-left:0.25em;float:right}.paginator-tabs .load-more-button{margin:0.5em 0px 0px}sticky-header{display:none}.persistent-header~sticky-header{background:var(--kup-title-background-color);border-bottom:2px solid var(--kup-border-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);color:var(--kup-title-color);display:block;opacity:0;overflow:hidden;pointer-events:none;position:fixed;top:0;transition:opacity 0.25s ease-in-out;z-index:10}.persistent-header~sticky-header.activated{opacity:1;pointer-events:all}.persistent-header~sticky-header[hidden]{display:none}.persistent-header~sticky-header tr-sticky{display:inline-flex}.persistent-header~sticky-header th-sticky{box-sizing:border-box;display:inline-flex;padding:0 0.3125em}.persistent-header~sticky-header th-sticky .header-cell__content{width:100%}.fixed-column,.fixed-row{background-color:var(--kup_datatable_background_color);color:var(--kup-text-color);position:sticky}thead .fixed-column,thead .fixed-row,tfoot .fixed-column,tfoot .fixed-row{z-index:10}table.custom-size th{position:sticky;top:0;z-index:10}table.custom-size th.fixed-column{z-index:11}tr:hover .fixed-row,tr:hover .fixed-column{color:var(--kup-hover-color);background-color:var(--kup-hover-background-color)}tr.selected .fixed-column,tr.selected .fixed-row{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-primary-color-rgb), 0.175) 0%, rgba(var(--kup-primary-color-rgb), 0.175) 0.1%, rgba(var(--kup-primary-color-rgb), 0.175))}.fixed-row{top:0;z-index:4}.fixed-column{left:0;z-index:6}.fixed-column.fixed-row{z-index:8}thead tr .fixed-column,thead tr:hover:not(.group):not(.selected) .fixed-column{background-color:var(--kup-title-background-color);color:var(--kup-title-color)}tfoot tr:hover:not(.group):not(.selected) .fixed-row,tfoot tr:hover:not(.group):not(.selected) .fixed-column{color:var(--kup-text-color);background-color:var(--kup_datatable_background_color)}:host([drag-enabled]) tr{touch-action:none}th[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}th[kup-draggable]{cursor:grabbing !important;opacity:0.5}.droparea{animation:fade-in 0.25s ease-out;background:var(--kup_datatable_background_color);border-radius:8px;box-shadow:var(--kup-box-shadow);display:none;padding:1em 0.5em}.droparea--visible{display:flex}.droparea__groups{border:2px dashed var(--kup-text-color)}.droparea__remove{border:2px dashed var(--kup-danger-color)}.droparea__groups,.droparea__remove{background:var(--kup_datatable_background_color);box-shadow:var(--kup-box-shadow);display:block;height:50px;margin:0 0.5em;opacity:0.5;position:relative;transition:opacity 0.25s;width:50px}.droparea__groups .f-image,.droparea__remove .f-image{width:100%;position:absolute}.droparea__groups .f-image:first-of-type,.droparea__remove .f-image:first-of-type{opacity:1}.droparea__groups .f-image:last-of-type,.droparea__remove .f-image:last-of-type{opacity:0}.droparea__groups[kup-drag-over],.droparea__remove[kup-drag-over]{opacity:1}.droparea__groups[kup-drag-over] .f-image:first-of-type,.droparea__remove[kup-drag-over] .f-image:first-of-type{opacity:0}.droparea__groups[kup-drag-over] .f-image:last-of-type,.droparea__remove[kup-drag-over] .f-image:last-of-type{opacity:1}:host(.kup-cross-selection) #kup-component th.selected{box-shadow:inset 0px 4px 0px 0px var(--kup-secondary-color)}:host(.kup-cross-selection) #kup-component td.selected{background-color:rgba(var(--kup-text-color-rgb), 0.075)}:host(.kup-cross-selection) #kup-component td.selected.fixed-column,:host(.kup-cross-selection) #kup-component td.selected.fixed-row{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.075) 0%, rgba(var(--kup-text-color-rgb), 0.075) 0.1%, rgba(var(--kup-text-color-rgb), 0.075))}:host(.kup-cross-selection) #kup-component tr.selected td{background-color:rgba(var(--kup-text-color-rgb), 0.075)}:host(.kup-cross-selection) #kup-component tr.selected td:first-of-type{box-shadow:inset 4px 0px 0px 0px var(--kup-secondary-color)}:host(.kup-cross-selection) #kup-component tr.selected td.selected{background-color:rgba(var(--kup-text-color-rgb), 0.15)}:host(.kup-cross-selection) #kup-component tr.selected td.fixed-column,:host(.kup-cross-selection) #kup-component tr.selected td.fixed-row{background-color:var(--kup_datatable_background_color);background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.075) 0%, rgba(var(--kup-text-color-rgb), 0.075) 0.1%, rgba(var(--kup-text-color-rgb), 0.075))}:host(.kup-cross-selection) #kup-component tr.selected td.fixed-column.selected,:host(.kup-cross-selection) #kup-component tr.selected td.fixed-row.selected{background-image:linear-gradient(to right, rgba(var(--kup-text-color-rgb), 0.15) 0%, rgba(var(--kup-text-color-rgb), 0.15) 0.1%, rgba(var(--kup-text-color-rgb), 0.15))}:host(.kup-layout-fixed) #kup-component table{table-layout:fixed;width:100%}tr.clickable{cursor:pointer}";
|
|
8082
8083
|
|
|
8083
|
-
var __classPrivateFieldGet$
|
|
8084
|
+
var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8084
8085
|
if (kind === "a" && !f)
|
|
8085
8086
|
throw new TypeError("Private accessor was defined without a getter");
|
|
8086
8087
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -8096,7 +8097,7 @@ var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
8096
8097
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
8097
8098
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
8098
8099
|
};
|
|
8099
|
-
var _KupDataTable_instances, _KupDataTable_initialized, _KupDataTable_rows, _KupDataTable_rowsLength, _KupDataTable_paginatedRows, _KupDataTable_paginatedRowsLength, _KupDataTable_footer, _KupDataTable_kupManager, _KupDataTable_renderedRows, _KupDataTable_loadMoreEventCounter, _KupDataTable_loadMoreEventPreviousQuantity, _KupDataTable_theadRef, _KupDataTable_tableRef, _KupDataTable_originalData, _KupDataTable_tableAreaRef, _KupDataTable_stickyTheadRef, _KupDataTable_customizeTopButtonRef, _KupDataTable_customizeTopPanelRef, _KupDataTable_sizedColumns, _KupDataTable_intObserver, _KupDataTable_navBarHeight, _KupDataTable_theadIntersecting, _KupDataTable_tableIntersecting, _KupDataTable_isSafariBrowser, _KupDataTable_isRestoringState, _KupDataTable_globalFilterTimeout, _KupDataTable_totalMenuCoords, _KupDataTable_clickTimeout, _KupDataTable_thRefs, _KupDataTable_rowsRefs, _KupDataTable_oldWidth, _KupDataTable_hold, _KupDataTable_interactableDrag, _KupDataTable_interactableDrop, _KupDataTable_interactableResize, _KupDataTable_interactableTouch, _KupDataTable_dropareaRef, _KupDataTable_removeDropareaRef, _KupDataTable_groupsDropareaRef, _KupDataTable_clickCb, _KupDataTable_clickCbCustomPanel, _KupDataTable_clickCbDropCard, _KupDataTable_resizeTimeout, _KupDataTable_columnMenuInstance, _KupDataTable_filtersColumnMenuInstance, _KupDataTable_filtersRowsInstance, _KupDataTable_detailCard, _KupDataTable_insertCard, _KupDataTable_confirmDeleteCard, _KupDataTable_confirmDeleteDialog, _KupDataTable_columnMenuCard, _KupDataTable_columnDropCard, _KupDataTable_columnDropCardAnchor, _KupDataTable_insertCount, _KupDataTable_BUTTON_CANCEL_ID, _KupDataTable_BUTTON_SUBMIT_ID, _KupDataTable_FIELDS_FORM_ID, _KupDataTable_MESSAGE_ID, _KupDataTable_MESSAGE_WRAPPER_ID, _KupDataTable_INSERT_PREFIX, _KupDataTable_closeDropCard, _KupDataTable_createDropCard, _KupDataTable_calculateData, _KupDataTable_getRow, _KupDataTable_getTransposedData, _KupDataTable_setTransposedData, _KupDataTable_switchToTotalsMatrix, _KupDataTable_setObjForTotalsMatrix, _KupDataTable_stickyHeaderPosition, _KupDataTable_updateStickyHeaderSize, _KupDataTable_setObserver, _KupDataTable_didLoadInteractables, _KupDataTable_didRenderInteractables, _KupDataTable_didLoadObservers, _KupDataTable_didRenderObservers, _KupDataTable_didLoadEventHandling, _KupDataTable_scrollStickyHeader, _KupDataTable_checkScrollOnHover, _KupDataTable_customizePanelPosition, _KupDataTable_rowsPointLength, _KupDataTable_paginatedRowsPointLength, _KupDataTable__rowsLength, _KupDataTable_setDynPosElements,
|
|
8100
|
+
var _KupDataTable_instances, _KupDataTable_initialized, _KupDataTable_rows, _KupDataTable_rowsLength, _KupDataTable_paginatedRows, _KupDataTable_paginatedRowsLength, _KupDataTable_footer, _KupDataTable_kupManager, _KupDataTable_renderedRows, _KupDataTable_loadMoreEventCounter, _KupDataTable_loadMoreEventPreviousQuantity, _KupDataTable_theadRef, _KupDataTable_tableRef, _KupDataTable_originalData, _KupDataTable_tableAreaRef, _KupDataTable_stickyTheadRef, _KupDataTable_customizeTopButtonRef, _KupDataTable_customizeTopPanelRef, _KupDataTable_sizedColumns, _KupDataTable_intObserver, _KupDataTable_navBarHeight, _KupDataTable_theadIntersecting, _KupDataTable_tableIntersecting, _KupDataTable_isSafariBrowser, _KupDataTable_isRestoringState, _KupDataTable_globalFilterTimeout, _KupDataTable_totalMenuCoords, _KupDataTable_clickTimeout, _KupDataTable_thRefs, _KupDataTable_rowsRefs, _KupDataTable_oldWidth, _KupDataTable_hold, _KupDataTable_interactableDrag, _KupDataTable_interactableDrop, _KupDataTable_interactableResize, _KupDataTable_interactableTouch, _KupDataTable_dropareaRef, _KupDataTable_removeDropareaRef, _KupDataTable_groupsDropareaRef, _KupDataTable_clickCb, _KupDataTable_clickCbCustomPanel, _KupDataTable_clickCbDropCard, _KupDataTable_resizeTimeout, _KupDataTable_columnMenuInstance, _KupDataTable_filtersColumnMenuInstance, _KupDataTable_filtersRowsInstance, _KupDataTable_detailCard, _KupDataTable_insertCard, _KupDataTable_confirmDeleteCard, _KupDataTable_confirmDeleteDialog, _KupDataTable_columnMenuCard, _KupDataTable_columnDropCard, _KupDataTable_columnDropCardAnchor, _KupDataTable_insertCount, _KupDataTable_BUTTON_CANCEL_ID, _KupDataTable_BUTTON_SUBMIT_ID, _KupDataTable_FIELDS_FORM_ID, _KupDataTable_MESSAGE_ID, _KupDataTable_MESSAGE_WRAPPER_ID, _KupDataTable_INSERT_PREFIX, _KupDataTable_closeDropCard, _KupDataTable_createDropCard, _KupDataTable_calculateData, _KupDataTable_getRow, _KupDataTable_getTransposedData, _KupDataTable_setTransposedData, _KupDataTable_switchToTotalsMatrix, _KupDataTable_setObjForTotalsMatrix, _KupDataTable_stickyHeaderPosition, _KupDataTable_updateStickyHeaderSize, _KupDataTable_setObserver, _KupDataTable_didLoadInteractables, _KupDataTable_didRenderInteractables, _KupDataTable_didLoadObservers, _KupDataTable_didRenderObservers, _KupDataTable_didLoadEventHandling, _KupDataTable_scrollStickyHeader, _KupDataTable_checkScrollOnHover, _KupDataTable_customizePanelPosition, _KupDataTable_rowsPointLength, _KupDataTable_paginatedRowsPointLength, _KupDataTable__rowsLength, _KupDataTable_setDynPosElements, _KupDataTable_resetSelectedRows, _KupDataTable_getSizedColumns, _KupDataTable_rowDetail, _KupDataTable_rowInsertForm, _KupDataTable_rowsDelete, _KupDataTable_getEventDetails, _KupDataTable_clickHandler, _KupDataTable_contextMenuHandler, _KupDataTable_dblClickHandler, _KupDataTable_initRows, _KupDataTable_filterRows, _KupDataTable_isGrouping, _KupDataTable_hasRowActions, _KupDataTable_removeGroup, _KupDataTable_hasTotals, _KupDataTable_tableHasAutoWidth, _KupDataTable_forceGroupExpansion, _KupDataTable_forceRowGroupExpansion, _KupDataTable_adjustPaginator, _KupDataTable_composeFixedCellStyleAndClass, _KupDataTable_updateFixedRowsAndColumnsCssVariables, _KupDataTable_onColumnSort, _KupDataTable_onRemoveFilter, _KupDataTable_getFilterValueForTooltip, _KupDataTable_onGlobalFilterChange, _KupDataTable_handlePageChange, _KupDataTable_handleRowsPerPageChange, _KupDataTable_onRowClick, _KupDataTable_selectColumn, _KupDataTable_deselectColumn, _KupDataTable_onDefaultRowActionClick, _KupDataTable_onRowActionExpanderClick, _KupDataTable_handleRowSelect, _KupDataTable_onRowExpand, _KupDataTable_onSelectAll, _KupDataTable_openTotalMenu, _KupDataTable_closeTotalMenu, _KupDataTable_isOpenedTotalMenuForColumn, _KupDataTable_groupRows, _KupDataTable_onLoadMoreClick, _KupDataTable_adjustGroupState, _KupDataTable_adjustGroupStateFromRow, _KupDataTable_sortRows, _KupDataTable_getSortIcon, _KupDataTable_getSortDecode, _KupDataTable_calculateColspan, _KupDataTable_isGroupExpanded, _KupDataTable_handleColumnSort, _KupDataTable_moveSortedColumns, _KupDataTable_applyLineBreaks, _KupDataTable_composeHeaderCellClassAndStyle, _KupDataTable_renderHeader, _KupDataTable_renderStickyHeader, _KupDataTable_totalMenuPosition, _KupDataTable_onTotalMenuOpen, _KupDataTable_renderRow, _KupDataTable_renderActions, _KupDataTable_onCustomSettingsClick, _KupDataTable_openCustomSettings, _KupDataTable_closeCustomSettings, _KupDataTable_renderPaginator, _KupDataTable_columnRemoveArea, _KupDataTable_columnGroupArea, _KupDataTable_hideShowColumnDropArea, _KupDataTable_handleColumnGroup, _KupDataTable_transcodeItem, _KupDataTable_createListData, _KupDataTable_FONTSIZE_CODES, _KupDataTable_FONTSIZE_DECODES, _KupDataTable_FONTSIZE_ICONS, _KupDataTable_getFontSizeCodeFromDecode, _KupDataTable_renderFontSizePanel, _KupDataTable_DENSITY_DECODES, _KupDataTable_DENSITY_ICONS, _KupDataTable_getDensityCodeFromDecode, _KupDataTable_renderDensityPanel, _KupDataTable_GRID_CODES, _KupDataTable_GRID_DECODES, _KupDataTable_GRID_ICONS, _KupDataTable_getGridCodeFromDecode, _KupDataTable_renderTransposeSwitch, _KupDataTable_renderTotalsMatrix, _KupDataTable_renderGridPanel;
|
|
8100
8101
|
const KupDataTable = class {
|
|
8101
8102
|
constructor(hostRef) {
|
|
8102
8103
|
registerInstance(this, hostRef);
|
|
@@ -8192,18 +8193,18 @@ const KupDataTable = class {
|
|
|
8192
8193
|
_KupDataTable_MESSAGE_WRAPPER_ID.set(this, 'messageWrapper');
|
|
8193
8194
|
_KupDataTable_INSERT_PREFIX.set(this, 'insert_');
|
|
8194
8195
|
_KupDataTable_stickyHeaderPosition.set(this, () => {
|
|
8195
|
-
if (__classPrivateFieldGet$
|
|
8196
|
-
if (__classPrivateFieldGet$
|
|
8197
|
-
if (!__classPrivateFieldGet$
|
|
8198
|
-
__classPrivateFieldGet$
|
|
8199
|
-
__classPrivateFieldGet$
|
|
8196
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f")) {
|
|
8197
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_tableIntersecting, "f")) {
|
|
8198
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_theadIntersecting, "f")) {
|
|
8199
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_updateStickyHeaderSize).call(this);
|
|
8200
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").classList.add('activated');
|
|
8200
8201
|
}
|
|
8201
8202
|
else {
|
|
8202
|
-
__classPrivateFieldGet$
|
|
8203
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").classList.remove('activated');
|
|
8203
8204
|
}
|
|
8204
8205
|
}
|
|
8205
8206
|
else {
|
|
8206
|
-
__classPrivateFieldGet$
|
|
8207
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").classList.remove('activated');
|
|
8207
8208
|
}
|
|
8208
8209
|
}
|
|
8209
8210
|
});
|
|
@@ -8297,7 +8298,7 @@ const KupDataTable = class {
|
|
|
8297
8298
|
if (this.store && this.stateId) {
|
|
8298
8299
|
const state = this.store.getState(this.stateId);
|
|
8299
8300
|
if (state != null) {
|
|
8300
|
-
__classPrivateFieldGet$
|
|
8301
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Initializing stateId ' + this.stateId);
|
|
8301
8302
|
// *** PROPS ***
|
|
8302
8303
|
this.filters = Object.assign({}, state.filters);
|
|
8303
8304
|
this.groups = [...state.groups];
|
|
@@ -8333,116 +8334,116 @@ const KupDataTable = class {
|
|
|
8333
8334
|
persistState() {
|
|
8334
8335
|
if (this.store && this.stateId) {
|
|
8335
8336
|
let somethingChanged = false;
|
|
8336
|
-
if (!__classPrivateFieldGet$
|
|
8337
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.filters, this.filters)) {
|
|
8337
8338
|
this.state.filters = Object.assign({}, this.filters);
|
|
8338
8339
|
somethingChanged = true;
|
|
8339
8340
|
}
|
|
8340
|
-
if (!__classPrivateFieldGet$
|
|
8341
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.groups, this.groups)) {
|
|
8341
8342
|
this.state.groups = [...this.groups];
|
|
8342
8343
|
somethingChanged = true;
|
|
8343
8344
|
}
|
|
8344
|
-
if (!__classPrivateFieldGet$
|
|
8345
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sort, this.sort)) {
|
|
8345
8346
|
this.state.sort = [...this.sort];
|
|
8346
8347
|
somethingChanged = true;
|
|
8347
8348
|
}
|
|
8348
|
-
if (!__classPrivateFieldGet$
|
|
8349
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.expandGroups, this.expandGroups)) {
|
|
8349
8350
|
this.state.expandGroups = this.expandGroups;
|
|
8350
8351
|
somethingChanged = true;
|
|
8351
8352
|
}
|
|
8352
|
-
if (!__classPrivateFieldGet$
|
|
8353
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.groupLabelDisplay, this.groupLabelDisplay)) {
|
|
8353
8354
|
this.state.groupLabelDisplay = this.groupLabelDisplay;
|
|
8354
8355
|
somethingChanged = true;
|
|
8355
8356
|
}
|
|
8356
|
-
if (!__classPrivateFieldGet$
|
|
8357
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.density, this.density)) {
|
|
8357
8358
|
this.state.density = this.density;
|
|
8358
8359
|
somethingChanged = true;
|
|
8359
8360
|
}
|
|
8360
|
-
if (!__classPrivateFieldGet$
|
|
8361
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.enableExtraColumns, this.enableExtraColumns)) {
|
|
8361
8362
|
this.state.enableExtraColumns = this.enableExtraColumns;
|
|
8362
8363
|
somethingChanged = true;
|
|
8363
8364
|
}
|
|
8364
|
-
if (!__classPrivateFieldGet$
|
|
8365
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.enableSortableColumns, this.enableSortableColumns)) {
|
|
8365
8366
|
this.state.enableSortableColumns = this.enableSortableColumns;
|
|
8366
8367
|
somethingChanged = true;
|
|
8367
8368
|
}
|
|
8368
|
-
if (!__classPrivateFieldGet$
|
|
8369
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.forceOneLine, this.forceOneLine)) {
|
|
8369
8370
|
this.state.forceOneLine = this.forceOneLine;
|
|
8370
8371
|
somethingChanged = true;
|
|
8371
8372
|
}
|
|
8372
|
-
if (!__classPrivateFieldGet$
|
|
8373
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.globalFilter, this.globalFilter)) {
|
|
8373
8374
|
this.state.globalFilter = this.globalFilter;
|
|
8374
8375
|
somethingChanged = true;
|
|
8375
8376
|
}
|
|
8376
|
-
if (!__classPrivateFieldGet$
|
|
8377
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
8377
8378
|
this.state.globalFilterValue = this.globalFilterValue;
|
|
8378
8379
|
somethingChanged = true;
|
|
8379
8380
|
}
|
|
8380
|
-
if (!__classPrivateFieldGet$
|
|
8381
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.headerIsPersistent, this.headerIsPersistent)) {
|
|
8381
8382
|
this.state.headerIsPersistent = this.headerIsPersistent;
|
|
8382
8383
|
somethingChanged = true;
|
|
8383
8384
|
}
|
|
8384
|
-
if (!__classPrivateFieldGet$
|
|
8385
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.lazyLoadRows, this.lazyLoadRows)) {
|
|
8385
8386
|
this.state.lazyLoadRows = this.lazyLoadRows;
|
|
8386
8387
|
somethingChanged = true;
|
|
8387
8388
|
}
|
|
8388
|
-
if (!__classPrivateFieldGet$
|
|
8389
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.loadMoreLimit, this.loadMoreLimit)) {
|
|
8389
8390
|
this.state.loadMoreLimit = this.loadMoreLimit;
|
|
8390
8391
|
somethingChanged = true;
|
|
8391
8392
|
}
|
|
8392
|
-
if (!__classPrivateFieldGet$
|
|
8393
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.selection, this.selection)) {
|
|
8393
8394
|
this.state.selection = this.selection;
|
|
8394
8395
|
somethingChanged = true;
|
|
8395
8396
|
}
|
|
8396
|
-
if (!__classPrivateFieldGet$
|
|
8397
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.rowsPerPage, this.currentRowsPerPage)) {
|
|
8397
8398
|
this.state.rowsPerPage = this.currentRowsPerPage;
|
|
8398
8399
|
somethingChanged = true;
|
|
8399
8400
|
}
|
|
8400
|
-
if (!__classPrivateFieldGet$
|
|
8401
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showFilters, this.showFilters)) {
|
|
8401
8402
|
this.state.showFilters = this.showFilters;
|
|
8402
8403
|
somethingChanged = true;
|
|
8403
8404
|
}
|
|
8404
|
-
if (!__classPrivateFieldGet$
|
|
8405
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showGroups, this.showGroups)) {
|
|
8405
8406
|
this.state.showGroups = this.showGroups;
|
|
8406
8407
|
somethingChanged = true;
|
|
8407
8408
|
}
|
|
8408
|
-
if (!__classPrivateFieldGet$
|
|
8409
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showHeader, this.showHeader)) {
|
|
8409
8410
|
this.state.showHeader = this.showHeader;
|
|
8410
8411
|
somethingChanged = true;
|
|
8411
8412
|
}
|
|
8412
|
-
if (!__classPrivateFieldGet$
|
|
8413
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showLoadMore, this.showLoadMore)) {
|
|
8413
8414
|
this.state.showLoadMore = this.showLoadMore;
|
|
8414
8415
|
somethingChanged = true;
|
|
8415
8416
|
}
|
|
8416
|
-
if (!__classPrivateFieldGet$
|
|
8417
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sortEnabled, this.sortEnabled)) {
|
|
8417
8418
|
this.state.sortEnabled = this.sortEnabled;
|
|
8418
8419
|
somethingChanged = true;
|
|
8419
8420
|
}
|
|
8420
|
-
if (!__classPrivateFieldGet$
|
|
8421
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.sortableColumnsMutateData, this.sortableColumnsMutateData)) {
|
|
8421
8422
|
this.state.sortableColumnsMutateData =
|
|
8422
8423
|
this.sortableColumnsMutateData;
|
|
8423
8424
|
somethingChanged = true;
|
|
8424
8425
|
}
|
|
8425
|
-
if (!__classPrivateFieldGet$
|
|
8426
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.pageSelected, this.currentPage)) {
|
|
8426
8427
|
this.state.pageSelected = this.currentPage;
|
|
8427
8428
|
somethingChanged = true;
|
|
8428
8429
|
}
|
|
8429
|
-
if (!__classPrivateFieldGet$
|
|
8430
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.dragEnabled, this.dragEnabled)) {
|
|
8430
8431
|
this.state.dragEnabled = this.dragEnabled;
|
|
8431
8432
|
somethingChanged = true;
|
|
8432
8433
|
}
|
|
8433
|
-
if (!__classPrivateFieldGet$
|
|
8434
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.dropEnabled, this.dropEnabled)) {
|
|
8434
8435
|
this.state.dropEnabled = this.dropEnabled;
|
|
8435
8436
|
somethingChanged = true;
|
|
8436
8437
|
}
|
|
8437
|
-
if (!__classPrivateFieldGet$
|
|
8438
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.showFooter, this.showFooter)) {
|
|
8438
8439
|
this.state.showFooter = this.showFooter;
|
|
8439
8440
|
somethingChanged = true;
|
|
8440
8441
|
}
|
|
8441
|
-
if (!__classPrivateFieldGet$
|
|
8442
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.totals, this.totals)) {
|
|
8442
8443
|
this.state.totals = Object.assign({}, this.totals);
|
|
8443
8444
|
somethingChanged = true;
|
|
8444
8445
|
}
|
|
8445
|
-
if (!__classPrivateFieldGet$
|
|
8446
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.deepEqual(this.state.selectRowsById, this.selectedRows.reduce((accumulator, row, currentIndex) => {
|
|
8446
8447
|
const prefix = currentIndex > 0 ? ';' : '';
|
|
8447
8448
|
return accumulator + prefix + row.id;
|
|
8448
8449
|
}, ''))) {
|
|
@@ -8457,7 +8458,7 @@ const KupDataTable = class {
|
|
|
8457
8458
|
return;
|
|
8458
8459
|
}
|
|
8459
8460
|
if (somethingChanged) {
|
|
8460
|
-
__classPrivateFieldGet$
|
|
8461
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Persisting stateId ' + this.stateId);
|
|
8461
8462
|
this.store.persistState(this.stateId, this.state);
|
|
8462
8463
|
}
|
|
8463
8464
|
}
|
|
@@ -8466,33 +8467,33 @@ const KupDataTable = class {
|
|
|
8466
8467
|
this.currentRowsPerPage = newValue;
|
|
8467
8468
|
}
|
|
8468
8469
|
expandGroupsHandler() {
|
|
8469
|
-
if (!__classPrivateFieldGet$
|
|
8470
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_isRestoringState, "f")) {
|
|
8470
8471
|
this.recalculateRows();
|
|
8471
8472
|
// reset group state
|
|
8472
8473
|
this.groupState = {};
|
|
8473
|
-
__classPrivateFieldGet$
|
|
8474
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_forceGroupExpansion).call(this);
|
|
8474
8475
|
}
|
|
8475
8476
|
}
|
|
8476
8477
|
filtersChanged() {
|
|
8477
8478
|
this.expandGroupsHandler();
|
|
8478
8479
|
}
|
|
8479
8480
|
recalculateRows() {
|
|
8480
|
-
if (!__classPrivateFieldGet$
|
|
8481
|
-
__classPrivateFieldGet$
|
|
8481
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_isRestoringState, "f")) {
|
|
8482
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
|
|
8482
8483
|
}
|
|
8483
8484
|
}
|
|
8484
8485
|
identifyAndInitRows() {
|
|
8485
8486
|
identify(this.getRows());
|
|
8486
8487
|
this.expandGroupsHandler();
|
|
8487
|
-
__classPrivateFieldGet$
|
|
8488
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8488
8489
|
}
|
|
8489
8490
|
recalculateRowsAndUndoSelections() {
|
|
8490
|
-
if (!__classPrivateFieldGet$
|
|
8491
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_isRestoringState, "f")) {
|
|
8491
8492
|
this.recalculateRows();
|
|
8492
8493
|
// reset group state
|
|
8493
8494
|
this.groupState = {};
|
|
8494
|
-
__classPrivateFieldGet$
|
|
8495
|
-
__classPrivateFieldGet$
|
|
8495
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_forceGroupExpansion).call(this);
|
|
8496
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8496
8497
|
}
|
|
8497
8498
|
}
|
|
8498
8499
|
controlFixedRowsColumns() {
|
|
@@ -8508,8 +8509,8 @@ const KupDataTable = class {
|
|
|
8508
8509
|
}
|
|
8509
8510
|
}
|
|
8510
8511
|
recalculateData() {
|
|
8511
|
-
if (__classPrivateFieldGet$
|
|
8512
|
-
__classPrivateFieldGet$
|
|
8512
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_initialized, "f")) {
|
|
8513
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_calculateData).call(this);
|
|
8513
8514
|
}
|
|
8514
8515
|
}
|
|
8515
8516
|
/**
|
|
@@ -8517,14 +8518,14 @@ const KupDataTable = class {
|
|
|
8517
8518
|
*/
|
|
8518
8519
|
async closeColumnMenu() {
|
|
8519
8520
|
this.columnMenuAnchor = null;
|
|
8520
|
-
if (__classPrivateFieldGet$
|
|
8521
|
-
__classPrivateFieldGet$
|
|
8521
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f")) {
|
|
8522
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").data = null;
|
|
8522
8523
|
}
|
|
8523
|
-
__classPrivateFieldGet$
|
|
8524
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").close(__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"));
|
|
8524
8525
|
this.kupDataTableColumnMenu.emit({
|
|
8525
8526
|
comp: this,
|
|
8526
8527
|
id: this.rootElement.id,
|
|
8527
|
-
card: __classPrivateFieldGet$
|
|
8528
|
+
card: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"),
|
|
8528
8529
|
event: null,
|
|
8529
8530
|
open: false,
|
|
8530
8531
|
});
|
|
@@ -8567,8 +8568,8 @@ const KupDataTable = class {
|
|
|
8567
8568
|
* Closes the insert new record card (called by backend, on success)
|
|
8568
8569
|
*/
|
|
8569
8570
|
async closeInsertCard() {
|
|
8570
|
-
if (__classPrivateFieldGet$
|
|
8571
|
-
__classPrivateFieldGet$
|
|
8571
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f")) {
|
|
8572
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").remove();
|
|
8572
8573
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, null, "f");
|
|
8573
8574
|
}
|
|
8574
8575
|
}
|
|
@@ -8576,8 +8577,8 @@ const KupDataTable = class {
|
|
|
8576
8577
|
* Closes the delete confirm card (called by backend, on success)
|
|
8577
8578
|
*/
|
|
8578
8579
|
async closeConfirmDeleteCard() {
|
|
8579
|
-
if (__classPrivateFieldGet$
|
|
8580
|
-
__classPrivateFieldGet$
|
|
8580
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteDialog, "f")) {
|
|
8581
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteDialog, "f").close();
|
|
8581
8582
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteCard, null, "f");
|
|
8582
8583
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteDialog, null, "f");
|
|
8583
8584
|
}
|
|
@@ -8587,23 +8588,23 @@ const KupDataTable = class {
|
|
|
8587
8588
|
*/
|
|
8588
8589
|
async getCards() {
|
|
8589
8590
|
const obj = {};
|
|
8590
|
-
if (__classPrivateFieldGet$
|
|
8591
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f")) {
|
|
8591
8592
|
obj['insertCard'] = {
|
|
8592
|
-
el: __classPrivateFieldGet$
|
|
8593
|
-
messageWrapper: __classPrivateFieldGet$
|
|
8594
|
-
message: __classPrivateFieldGet$
|
|
8595
|
-
submitButton: __classPrivateFieldGet$
|
|
8596
|
-
cancelButton: __classPrivateFieldGet$
|
|
8597
|
-
form: __classPrivateFieldGet$
|
|
8593
|
+
el: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f"),
|
|
8594
|
+
messageWrapper: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f")),
|
|
8595
|
+
message: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_ID, "f")),
|
|
8596
|
+
submitButton: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_SUBMIT_ID, "f")),
|
|
8597
|
+
cancelButton: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_CANCEL_ID, "f")),
|
|
8598
|
+
form: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_FIELDS_FORM_ID, "f")),
|
|
8598
8599
|
};
|
|
8599
8600
|
}
|
|
8600
|
-
if (__classPrivateFieldGet$
|
|
8601
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f")) {
|
|
8601
8602
|
obj['confirmDeleteCard'] = {
|
|
8602
|
-
el: __classPrivateFieldGet$
|
|
8603
|
-
messageWrapper: __classPrivateFieldGet$
|
|
8604
|
-
message: __classPrivateFieldGet$
|
|
8605
|
-
submitButton: __classPrivateFieldGet$
|
|
8606
|
-
cancelButton: __classPrivateFieldGet$
|
|
8603
|
+
el: __classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f"),
|
|
8604
|
+
messageWrapper: __classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f")),
|
|
8605
|
+
message: __classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_ID, "f")),
|
|
8606
|
+
submitButton: __classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_SUBMIT_ID, "f")),
|
|
8607
|
+
cancelButton: __classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").querySelector('#' + __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_CANCEL_ID, "f")),
|
|
8607
8608
|
};
|
|
8608
8609
|
}
|
|
8609
8610
|
/*
|
|
@@ -8657,7 +8658,7 @@ const KupDataTable = class {
|
|
|
8657
8658
|
* @param {KupDataColumn} column - Column to hide.
|
|
8658
8659
|
*/
|
|
8659
8660
|
async hideColumn(column) {
|
|
8660
|
-
__classPrivateFieldGet$
|
|
8661
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").data.column.hide(this.data, [column.name]);
|
|
8661
8662
|
this.kupColumnRemove.emit({
|
|
8662
8663
|
comp: this,
|
|
8663
8664
|
id: this.rootElement.id,
|
|
@@ -8672,11 +8673,8 @@ const KupDataTable = class {
|
|
|
8672
8673
|
* @returns {string|KupDataColumn} Returns the new column created or a string containing the error message if something went wrong.
|
|
8673
8674
|
*/
|
|
8674
8675
|
async newColumn(type, options) {
|
|
8675
|
-
const result = __classPrivateFieldGet$
|
|
8676
|
-
|
|
8677
|
-
if (!error) {
|
|
8678
|
-
this.refresh();
|
|
8679
|
-
}
|
|
8676
|
+
const result = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").data.column.new(this.data, type, options);
|
|
8677
|
+
this.refresh();
|
|
8680
8678
|
return result;
|
|
8681
8679
|
}
|
|
8682
8680
|
/**
|
|
@@ -8685,40 +8683,40 @@ const KupDataTable = class {
|
|
|
8685
8683
|
*/
|
|
8686
8684
|
async openColumnMenu(column) {
|
|
8687
8685
|
this.columnMenuAnchor = column;
|
|
8688
|
-
if (!__classPrivateFieldGet$
|
|
8686
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f")) {
|
|
8689
8687
|
__classPrivateFieldSet$2(this, _KupDataTable_columnMenuCard, document.createElement('kup-card'), "f");
|
|
8690
|
-
__classPrivateFieldGet$
|
|
8691
|
-
__classPrivateFieldGet$
|
|
8692
|
-
__classPrivateFieldGet$
|
|
8693
|
-
__classPrivateFieldGet$
|
|
8694
|
-
__classPrivateFieldGet$
|
|
8688
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").isMenu = true;
|
|
8689
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").layoutNumber = 12;
|
|
8690
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").sizeX = 'auto';
|
|
8691
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").sizeY = 'auto';
|
|
8692
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").addEventListener('kup-card-click', (e) => {
|
|
8695
8693
|
this.kupDataTableColumnMenu.emit({
|
|
8696
8694
|
comp: this,
|
|
8697
8695
|
id: this.rootElement.id,
|
|
8698
|
-
card: __classPrivateFieldGet$
|
|
8696
|
+
card: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"),
|
|
8699
8697
|
event: e,
|
|
8700
|
-
open: __classPrivateFieldGet$
|
|
8698
|
+
open: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").menuVisible,
|
|
8701
8699
|
});
|
|
8702
8700
|
});
|
|
8703
|
-
__classPrivateFieldGet$
|
|
8704
|
-
__classPrivateFieldGet$
|
|
8701
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").addEventListener('kup-card-event', (e) => {
|
|
8702
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").eventHandlers(e, this);
|
|
8705
8703
|
this.kupDataTableColumnMenu.emit({
|
|
8706
8704
|
comp: this,
|
|
8707
8705
|
id: this.rootElement.id,
|
|
8708
|
-
card: __classPrivateFieldGet$
|
|
8706
|
+
card: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"),
|
|
8709
8707
|
event: e,
|
|
8710
|
-
open: __classPrivateFieldGet$
|
|
8708
|
+
open: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").menuVisible,
|
|
8711
8709
|
});
|
|
8712
8710
|
});
|
|
8713
8711
|
}
|
|
8714
|
-
__classPrivateFieldGet$
|
|
8715
|
-
__classPrivateFieldGet$
|
|
8716
|
-
__classPrivateFieldGet$
|
|
8717
|
-
__classPrivateFieldGet$
|
|
8712
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").setAttribute('data-column', column);
|
|
8713
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").data = __classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").prepData(this, getColumnByName(this.getVisibleColumns(), column));
|
|
8714
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").open(this, column);
|
|
8715
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").reposition(this, __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"));
|
|
8718
8716
|
this.kupDataTableColumnMenu.emit({
|
|
8719
8717
|
comp: this,
|
|
8720
8718
|
id: this.rootElement.id,
|
|
8721
|
-
card: __classPrivateFieldGet$
|
|
8719
|
+
card: __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f"),
|
|
8722
8720
|
event: null,
|
|
8723
8721
|
open: true,
|
|
8724
8722
|
});
|
|
@@ -8728,7 +8726,7 @@ const KupDataTable = class {
|
|
|
8728
8726
|
*/
|
|
8729
8727
|
async refresh(recalcRows) {
|
|
8730
8728
|
if (recalcRows) {
|
|
8731
|
-
__classPrivateFieldGet$
|
|
8729
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
|
|
8732
8730
|
}
|
|
8733
8731
|
forceUpdate(this);
|
|
8734
8732
|
}
|
|
@@ -8737,8 +8735,8 @@ const KupDataTable = class {
|
|
|
8737
8735
|
*/
|
|
8738
8736
|
async resizeCallback() {
|
|
8739
8737
|
if (this.lazyLoadCells &&
|
|
8740
|
-
this.rootElement.clientWidth !== __classPrivateFieldGet$
|
|
8741
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
8738
|
+
this.rootElement.clientWidth !== __classPrivateFieldGet$3(this, _KupDataTable_oldWidth, "f")) {
|
|
8739
|
+
window.clearTimeout(__classPrivateFieldGet$3(this, _KupDataTable_resizeTimeout, "f"));
|
|
8742
8740
|
__classPrivateFieldSet$2(this, _KupDataTable_resizeTimeout, window.setTimeout(() => this.refresh(), 300), "f");
|
|
8743
8741
|
}
|
|
8744
8742
|
}
|
|
@@ -8753,7 +8751,7 @@ const KupDataTable = class {
|
|
|
8753
8751
|
if (!column) {
|
|
8754
8752
|
return;
|
|
8755
8753
|
}
|
|
8756
|
-
const row = __classPrivateFieldGet$
|
|
8754
|
+
const row = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, rowId);
|
|
8757
8755
|
if (!row) {
|
|
8758
8756
|
return;
|
|
8759
8757
|
}
|
|
@@ -8811,7 +8809,7 @@ const KupDataTable = class {
|
|
|
8811
8809
|
this.selectedRows = [];
|
|
8812
8810
|
for (let index = 0; index < rowsIdentifiers.length; index++) {
|
|
8813
8811
|
const id = rowsIdentifiers[index];
|
|
8814
|
-
this.selectedRows.push(__classPrivateFieldGet$
|
|
8812
|
+
this.selectedRows.push(__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, id));
|
|
8815
8813
|
}
|
|
8816
8814
|
if (emitEvent !== false) {
|
|
8817
8815
|
this.kupRowSelected.emit({
|
|
@@ -8825,12 +8823,12 @@ const KupDataTable = class {
|
|
|
8825
8823
|
}
|
|
8826
8824
|
//---- Lifecycle hooks ----
|
|
8827
8825
|
componentWillLoad() {
|
|
8828
|
-
__classPrivateFieldGet$
|
|
8829
|
-
__classPrivateFieldGet$
|
|
8830
|
-
__classPrivateFieldGet$
|
|
8831
|
-
__classPrivateFieldGet$
|
|
8826
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logLoad(this, false);
|
|
8827
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.register(this);
|
|
8828
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").theme.register(this);
|
|
8829
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").toolbar.register(this.rootElement);
|
|
8832
8830
|
if (!this.emptyDataLabel) {
|
|
8833
|
-
this.emptyDataLabel = __classPrivateFieldGet$
|
|
8831
|
+
this.emptyDataLabel = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA);
|
|
8834
8832
|
}
|
|
8835
8833
|
__classPrivateFieldSet$2(this, _KupDataTable_columnMenuInstance, new KupColumnMenu(), "f");
|
|
8836
8834
|
__classPrivateFieldSet$2(this, _KupDataTable_filtersColumnMenuInstance, new FiltersColumnMenu(), "f");
|
|
@@ -8854,18 +8852,18 @@ const KupDataTable = class {
|
|
|
8854
8852
|
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, 0, "f");
|
|
8855
8853
|
}
|
|
8856
8854
|
if (document.querySelector('.topbar')) {
|
|
8857
|
-
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$
|
|
8855
|
+
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$3(this, _KupDataTable_navBarHeight, "f") + document.querySelector('.topbar').clientHeight, "f");
|
|
8858
8856
|
}
|
|
8859
|
-
__classPrivateFieldGet$
|
|
8857
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_setObserver).call(this);
|
|
8860
8858
|
//this.recalculateRows();
|
|
8861
8859
|
// Detects is the browser is Safari. If needed, this function can be moved into an external file and then imported into components
|
|
8862
8860
|
__classPrivateFieldSet$2(this, _KupDataTable_isSafariBrowser, CSS.supports('position', '-webkit-sticky') ||
|
|
8863
8861
|
!!(window && window.safari), "f");
|
|
8864
|
-
__classPrivateFieldGet$
|
|
8862
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_calculateData).call(this);
|
|
8865
8863
|
__classPrivateFieldSet$2(this, _KupDataTable_initialized, true, "f");
|
|
8866
8864
|
}
|
|
8867
8865
|
componentWillRender() {
|
|
8868
|
-
__classPrivateFieldGet$
|
|
8866
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logRender(this, false);
|
|
8869
8867
|
}
|
|
8870
8868
|
componentDidRender() {
|
|
8871
8869
|
const root = this.rootElement.shadowRoot;
|
|
@@ -8876,40 +8874,40 @@ const KupDataTable = class {
|
|
|
8876
8874
|
}
|
|
8877
8875
|
}
|
|
8878
8876
|
if (this.showCustomization) {
|
|
8879
|
-
__classPrivateFieldGet$
|
|
8880
|
-
}
|
|
8881
|
-
__classPrivateFieldGet$
|
|
8882
|
-
__classPrivateFieldGet$
|
|
8883
|
-
__classPrivateFieldGet$
|
|
8884
|
-
__classPrivateFieldGet$
|
|
8885
|
-
__classPrivateFieldGet$
|
|
8886
|
-
__classPrivateFieldGet$
|
|
8877
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_customizePanelPosition).call(this);
|
|
8878
|
+
}
|
|
8879
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_totalMenuPosition).call(this);
|
|
8880
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_checkScrollOnHover).call(this);
|
|
8881
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_didRenderObservers).call(this);
|
|
8882
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_didRenderInteractables).call(this);
|
|
8883
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, false);
|
|
8884
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_setDynPosElements).call(this);
|
|
8887
8885
|
if (this.headerIsPersistent &&
|
|
8888
8886
|
this.tableHeight === undefined &&
|
|
8889
8887
|
this.tableWidth === undefined) {
|
|
8890
|
-
__classPrivateFieldGet$
|
|
8888
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_updateStickyHeaderSize).call(this);
|
|
8891
8889
|
}
|
|
8892
|
-
setTimeout(() => __classPrivateFieldGet$
|
|
8890
|
+
setTimeout(() => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_updateFixedRowsAndColumnsCssVariables).call(this), 50);
|
|
8893
8891
|
// *** Store
|
|
8894
8892
|
if (this.lazyLoadCells) {
|
|
8895
8893
|
this.persistState();
|
|
8896
8894
|
}
|
|
8897
8895
|
// ***
|
|
8898
8896
|
__classPrivateFieldSet$2(this, _KupDataTable_oldWidth, this.rootElement.clientWidth, "f");
|
|
8899
|
-
__classPrivateFieldGet$
|
|
8897
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logRender(this, true);
|
|
8900
8898
|
}
|
|
8901
8899
|
componentDidLoad() {
|
|
8902
|
-
__classPrivateFieldGet$
|
|
8903
|
-
__classPrivateFieldGet$
|
|
8904
|
-
__classPrivateFieldGet$
|
|
8900
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_didLoadObservers).call(this);
|
|
8901
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_didLoadEventHandling).call(this);
|
|
8902
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_didLoadInteractables).call(this);
|
|
8905
8903
|
this.lazyLoadCells = true;
|
|
8906
8904
|
this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
|
|
8907
|
-
__classPrivateFieldGet$
|
|
8908
|
-
__classPrivateFieldGet$
|
|
8905
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").resize.observe(this.rootElement);
|
|
8906
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logLoad(this, true);
|
|
8909
8907
|
}
|
|
8910
8908
|
resetCurrentPage() {
|
|
8911
8909
|
this.currentPage = 1;
|
|
8912
|
-
__classPrivateFieldGet$
|
|
8910
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
8913
8911
|
}
|
|
8914
8912
|
getColumns() {
|
|
8915
8913
|
return this.data && this.data.columns
|
|
@@ -8920,7 +8918,7 @@ const KupDataTable = class {
|
|
|
8920
8918
|
// TODO: change into `visible ?? true` when TS dependency has been updated
|
|
8921
8919
|
const visibleColumns = this.getColumns().filter(({ visible }) => visible !== undefined ? visible : true);
|
|
8922
8920
|
// check grouping
|
|
8923
|
-
if (__classPrivateFieldGet$
|
|
8921
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
8924
8922
|
// filtering column based on group visibility
|
|
8925
8923
|
return visibleColumns.filter((column) => {
|
|
8926
8924
|
// check if in group
|
|
@@ -8944,7 +8942,7 @@ const KupDataTable = class {
|
|
|
8944
8942
|
return visibleColumns;
|
|
8945
8943
|
}
|
|
8946
8944
|
getGroupByName(column) {
|
|
8947
|
-
if (!__classPrivateFieldGet$
|
|
8945
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
8948
8946
|
return null;
|
|
8949
8947
|
}
|
|
8950
8948
|
for (let group of this.groups) {
|
|
@@ -8955,7 +8953,7 @@ const KupDataTable = class {
|
|
|
8955
8953
|
return null;
|
|
8956
8954
|
}
|
|
8957
8955
|
getColumnValues(column) {
|
|
8958
|
-
return __classPrivateFieldGet$
|
|
8956
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_filtersRowsInstance, "f").getColumnValues(this, column, this.globalFilterValue, __classPrivateFieldGet$3(this, _KupDataTable_filtersColumnMenuInstance, "f"));
|
|
8959
8957
|
}
|
|
8960
8958
|
getRows() {
|
|
8961
8959
|
return this.data && this.data.rows ? this.data.rows : [];
|
|
@@ -8970,7 +8968,7 @@ const KupDataTable = class {
|
|
|
8970
8968
|
}
|
|
8971
8969
|
async defaultSortingFunction(columns, receivingColumnIndex, sortedColumnIndex, useNewObject = false) {
|
|
8972
8970
|
const toSort = !useNewObject ? columns : [...columns];
|
|
8973
|
-
__classPrivateFieldGet$
|
|
8971
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_moveSortedColumns).call(this, toSort, receivingColumnIndex, sortedColumnIndex);
|
|
8974
8972
|
return toSort;
|
|
8975
8973
|
}
|
|
8976
8974
|
areTotalsSelected(column) {
|
|
@@ -8978,7 +8976,7 @@ const KupDataTable = class {
|
|
|
8978
8976
|
}
|
|
8979
8977
|
onTotalsChange(event, column) {
|
|
8980
8978
|
// close menu
|
|
8981
|
-
__classPrivateFieldGet$
|
|
8979
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
8982
8980
|
if (column) {
|
|
8983
8981
|
// must do this
|
|
8984
8982
|
// otherwise does not fire the watcher
|
|
@@ -9001,14 +8999,14 @@ const KupDataTable = class {
|
|
|
9001
8999
|
let selectRowCell = null;
|
|
9002
9000
|
if (this.selection === SelectionMode.MULTIPLE_CHECKBOX) {
|
|
9003
9001
|
extraCells++;
|
|
9004
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
9002
|
+
const fixedCellStyle = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, extraCells, 0, extraCells);
|
|
9005
9003
|
selectRowCell = (h("td", { class: fixedCellStyle ? fixedCellStyle.fixedCellClasses : null, style: fixedCellStyle ? fixedCellStyle.fixedCellStyle : null }));
|
|
9006
9004
|
}
|
|
9007
9005
|
// Action cell
|
|
9008
9006
|
let actionsCell = null;
|
|
9009
|
-
if (__classPrivateFieldGet$
|
|
9007
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
9010
9008
|
extraCells++;
|
|
9011
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
9009
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, extraCells, 0, extraCells);
|
|
9012
9010
|
actionsCell = (h("td", { class: selectionStyleAndClass
|
|
9013
9011
|
? selectionStyleAndClass.fixedCellClasses
|
|
9014
9012
|
: {}, style: selectionStyleAndClass
|
|
@@ -9016,19 +9014,19 @@ const KupDataTable = class {
|
|
|
9016
9014
|
: {} }));
|
|
9017
9015
|
}
|
|
9018
9016
|
const footerCells = this.getVisibleColumns().map((column, columnIndex) => {
|
|
9019
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
9017
|
+
const fixedCellStyle = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, columnIndex + 1 + extraCells, 0, extraCells);
|
|
9020
9018
|
let totalMenu = undefined;
|
|
9021
9019
|
let menuLabel = TotalLabel.CALC;
|
|
9022
9020
|
const translation = {
|
|
9023
|
-
[TotalLabel.AVERAGE]: __classPrivateFieldGet$
|
|
9024
|
-
[TotalLabel.CALC]: __classPrivateFieldGet$
|
|
9025
|
-
[TotalLabel.CANC]: __classPrivateFieldGet$
|
|
9026
|
-
[TotalLabel.COUNT]: __classPrivateFieldGet$
|
|
9027
|
-
[TotalLabel.DISTINCT]: __classPrivateFieldGet$
|
|
9028
|
-
[TotalLabel.MATH]: __classPrivateFieldGet$
|
|
9029
|
-
[TotalLabel.MAX]: __classPrivateFieldGet$
|
|
9030
|
-
[TotalLabel.MIN]: __classPrivateFieldGet$
|
|
9031
|
-
[TotalLabel.SUM]: __classPrivateFieldGet$
|
|
9021
|
+
[TotalLabel.AVERAGE]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageTotals.AVERAGE),
|
|
9022
|
+
[TotalLabel.CALC]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageTotals.CALCULATE),
|
|
9023
|
+
[TotalLabel.CANC]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageTotals.CANCEL),
|
|
9024
|
+
[TotalLabel.COUNT]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageTotals.COUNT),
|
|
9025
|
+
[TotalLabel.DISTINCT]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageTotals.DISTINCT),
|
|
9026
|
+
[TotalLabel.MATH]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageTotals.FORMULA),
|
|
9027
|
+
[TotalLabel.MAX]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageTotals.MAXIMUM),
|
|
9028
|
+
[TotalLabel.MIN]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageTotals.MINIMUM),
|
|
9029
|
+
[TotalLabel.SUM]: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageTotals.SUM),
|
|
9032
9030
|
};
|
|
9033
9031
|
if (this.totals) {
|
|
9034
9032
|
const totalValue = this.totals[column.name];
|
|
@@ -9060,7 +9058,7 @@ const KupDataTable = class {
|
|
|
9060
9058
|
}
|
|
9061
9059
|
}
|
|
9062
9060
|
}
|
|
9063
|
-
if (__classPrivateFieldGet$
|
|
9061
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isOpenedTotalMenuForColumn).call(this, column.name)) {
|
|
9064
9062
|
const listData = [
|
|
9065
9063
|
{
|
|
9066
9064
|
id: TotalMode.COUNT,
|
|
@@ -9071,7 +9069,7 @@ const KupDataTable = class {
|
|
|
9071
9069
|
value: translation[TotalLabel.DISTINCT],
|
|
9072
9070
|
},
|
|
9073
9071
|
];
|
|
9074
|
-
if (__classPrivateFieldGet$
|
|
9072
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isNumber(column.obj)) {
|
|
9075
9073
|
// TODO Move these objects in declarations
|
|
9076
9074
|
listData.push({
|
|
9077
9075
|
id: TotalMode.SUM,
|
|
@@ -9088,7 +9086,7 @@ const KupDataTable = class {
|
|
|
9088
9086
|
value: translation[TotalLabel.MAX],
|
|
9089
9087
|
});
|
|
9090
9088
|
}
|
|
9091
|
-
else if (__classPrivateFieldGet$
|
|
9089
|
+
else if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
9092
9090
|
listData.push({
|
|
9093
9091
|
id: TotalMode.MIN,
|
|
9094
9092
|
separator: true,
|
|
@@ -9113,14 +9111,14 @@ const KupDataTable = class {
|
|
|
9113
9111
|
}
|
|
9114
9112
|
// TODO please use getValueForDisplay
|
|
9115
9113
|
let value;
|
|
9116
|
-
const footerValue = __classPrivateFieldGet$
|
|
9114
|
+
const footerValue = __classPrivateFieldGet$3(this, _KupDataTable_footer, "f")[column.name];
|
|
9117
9115
|
if (menuLabel === TotalLabel.COUNT ||
|
|
9118
9116
|
menuLabel === TotalLabel.DISTINCT) {
|
|
9119
9117
|
value = footerValue;
|
|
9120
9118
|
}
|
|
9121
9119
|
else if ((menuLabel === TotalLabel.MAX ||
|
|
9122
9120
|
menuLabel === TotalLabel.MIN) &&
|
|
9123
|
-
__classPrivateFieldGet$
|
|
9121
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
9124
9122
|
if (footerValue) {
|
|
9125
9123
|
value = footerValue;
|
|
9126
9124
|
}
|
|
@@ -9144,38 +9142,38 @@ const KupDataTable = class {
|
|
|
9144
9142
|
let transpose = undefined;
|
|
9145
9143
|
let totalsMatrix = undefined;
|
|
9146
9144
|
if (this.openedCustomSettings) {
|
|
9147
|
-
density = __classPrivateFieldGet$
|
|
9148
|
-
fontsize = __classPrivateFieldGet$
|
|
9149
|
-
grid = __classPrivateFieldGet$
|
|
9150
|
-
transpose = __classPrivateFieldGet$
|
|
9145
|
+
density = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderDensityPanel).call(this);
|
|
9146
|
+
fontsize = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderFontSizePanel).call(this);
|
|
9147
|
+
grid = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderGridPanel).call(this);
|
|
9148
|
+
transpose = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderTransposeSwitch).call(this);
|
|
9151
9149
|
if (this.totals && this.groups.length > 0) {
|
|
9152
|
-
totalsMatrix = __classPrivateFieldGet$
|
|
9150
|
+
totalsMatrix = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderTotalsMatrix).call(this);
|
|
9153
9151
|
}
|
|
9154
9152
|
}
|
|
9155
9153
|
return (h("kup-card", { customStyle: "::slotted(kup-switch) { width: max-content !important; } ::slotted(*) { margin: auto !important; } ::slotted(.customize-element) { margin: auto !important; padding: 0 1em 1em 1em !important; width: max-content !important; } ::slotted(.customize-element):nth-child(1) { padding-top: 1em !important; }", isMenu: true, layoutFamily: KupCardFamily.FREE, ref: (el) => {
|
|
9156
9154
|
__classPrivateFieldSet$2(this, _KupDataTable_customizeTopPanelRef, el, "f");
|
|
9157
|
-
}, sizeX: "360px", sizeY: "300px" }, density, grid, fontsize, transpose, h("kup-switch", { class: "customize-element", checked: this.dragEnabled, label: __classPrivateFieldGet$
|
|
9155
|
+
}, sizeX: "360px", sizeY: "300px" }, density, grid, fontsize, transpose, h("kup-switch", { class: "customize-element", checked: this.dragEnabled, label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.DRAG_AND_DROP), leadingLabel: true, "onkup-switch-change": () => (this.dragEnabled = !this.dragEnabled) }), h("kup-switch", { class: "customize-element", checked: this.editableData, label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.EDITABLE), leadingLabel: true, "onkup-switch-change": () => (this.editableData = !this.editableData) }), h("kup-button", { title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.TOGGLE) +
|
|
9158
9156
|
' Magic Box ' +
|
|
9159
9157
|
'(' +
|
|
9160
|
-
__classPrivateFieldGet$
|
|
9161
|
-
')', icon: "auto-fix", "onkup-button-click": () => __classPrivateFieldGet$
|
|
9158
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.EXPERIMENTAL_FEAT) +
|
|
9159
|
+
')', icon: "auto-fix", "onkup-button-click": () => __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").toggleMagicBox() }), totalsMatrix));
|
|
9162
9160
|
}
|
|
9163
9161
|
render() {
|
|
9164
9162
|
__classPrivateFieldSet$2(this, _KupDataTable_thRefs, [], "f");
|
|
9165
9163
|
__classPrivateFieldSet$2(this, _KupDataTable_rowsRefs, [], "f");
|
|
9166
9164
|
__classPrivateFieldSet$2(this, _KupDataTable_renderedRows, [], "f");
|
|
9167
9165
|
let elStyle = undefined;
|
|
9168
|
-
__classPrivateFieldSet$2(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$
|
|
9166
|
+
__classPrivateFieldSet$2(this, _KupDataTable_sizedColumns, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getSizedColumns).call(this), "f");
|
|
9169
9167
|
let rows = null;
|
|
9170
|
-
if (__classPrivateFieldGet$
|
|
9171
|
-
rows = (h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
9168
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_paginatedRowsLength, "f") === 0) {
|
|
9169
|
+
rows = (h("tr", { ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").push(el) }, h("td", { colSpan: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
|
|
9172
9170
|
}
|
|
9173
9171
|
else {
|
|
9174
9172
|
rows = [];
|
|
9175
|
-
__classPrivateFieldGet$
|
|
9173
|
+
__classPrivateFieldGet$3(this, _KupDataTable_paginatedRows, "f")
|
|
9176
9174
|
// We must pass the previous element of the array to check if we must hide or display the value of the cell
|
|
9177
9175
|
// When the column has specified the parameter hideValuesRepetitions
|
|
9178
|
-
.map((row, rowIndex, currentArray) => __classPrivateFieldGet$
|
|
9176
|
+
.map((row, rowIndex, currentArray) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderRow).call(this, row, 0, rowIndex + 1, rowIndex > 0 ? currentArray[rowIndex - 1] : null))
|
|
9179
9177
|
.forEach((jsxRow) => {
|
|
9180
9178
|
if (Array.isArray(jsxRow)) {
|
|
9181
9179
|
jsxRow.forEach((jr) => rows.push(jr));
|
|
@@ -9187,24 +9185,24 @@ const KupDataTable = class {
|
|
|
9187
9185
|
}
|
|
9188
9186
|
// header
|
|
9189
9187
|
// for multi selection purposes, this should be called before this.renderedRows has been evaluated
|
|
9190
|
-
const header = __classPrivateFieldGet$
|
|
9191
|
-
const stickyHeader = __classPrivateFieldGet$
|
|
9188
|
+
const header = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderHeader).call(this);
|
|
9189
|
+
const stickyHeader = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderStickyHeader).call(this);
|
|
9192
9190
|
let paginatorTop = undefined;
|
|
9193
9191
|
let paginatorBottom = undefined;
|
|
9194
|
-
if ((!this.lazyLoadRows && __classPrivateFieldGet$
|
|
9192
|
+
if ((!this.lazyLoadRows && __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f") > this.rowsPerPage) ||
|
|
9195
9193
|
this.showCustomization ||
|
|
9196
9194
|
this.showLoadMore) {
|
|
9197
9195
|
if (PaginatorPos.TOP === this.paginatorPos ||
|
|
9198
9196
|
PaginatorPos.BOTH === this.paginatorPos) {
|
|
9199
|
-
paginatorTop = __classPrivateFieldGet$
|
|
9197
|
+
paginatorTop = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderPaginator).call(this, true);
|
|
9200
9198
|
}
|
|
9201
9199
|
if (PaginatorPos.BOTTOM === this.paginatorPos ||
|
|
9202
9200
|
PaginatorPos.BOTH === this.paginatorPos) {
|
|
9203
|
-
paginatorBottom = __classPrivateFieldGet$
|
|
9201
|
+
paginatorBottom = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderPaginator).call(this, false);
|
|
9204
9202
|
}
|
|
9205
9203
|
}
|
|
9206
9204
|
let groupChips = null;
|
|
9207
|
-
if (__classPrivateFieldGet$
|
|
9205
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
9208
9206
|
const chipsData = [];
|
|
9209
9207
|
for (let index = 0; index < this.groups.length; index++) {
|
|
9210
9208
|
const group = this.groups[index];
|
|
@@ -9217,7 +9215,7 @@ const KupDataTable = class {
|
|
|
9217
9215
|
});
|
|
9218
9216
|
}
|
|
9219
9217
|
else {
|
|
9220
|
-
__classPrivateFieldGet$
|
|
9218
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Grouped for a non-existent column! (' +
|
|
9221
9219
|
group.column +
|
|
9222
9220
|
')', KupDebugCategory.WARNING);
|
|
9223
9221
|
}
|
|
@@ -9230,7 +9228,7 @@ const KupDataTable = class {
|
|
|
9230
9228
|
onIconClick: [],
|
|
9231
9229
|
};
|
|
9232
9230
|
for (let i = 0; i < chipsData.length; i++) {
|
|
9233
|
-
props.onIconClick.push(() => __classPrivateFieldGet$
|
|
9231
|
+
props.onIconClick.push(() => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_removeGroup).call(this, i));
|
|
9234
9232
|
}
|
|
9235
9233
|
groupChips = h(FChip, Object.assign({}, props));
|
|
9236
9234
|
}
|
|
@@ -9238,7 +9236,7 @@ const KupDataTable = class {
|
|
|
9238
9236
|
const tableClass = {
|
|
9239
9237
|
// Class to specify whether the table should have width: auto or not.
|
|
9240
9238
|
// Mandatory to check with custom column size.
|
|
9241
|
-
'auto-width': __classPrivateFieldGet$
|
|
9239
|
+
'auto-width': __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_tableHasAutoWidth).call(this),
|
|
9242
9240
|
'column-separation': ShowGrid.COMPLETE === this.showGrid ||
|
|
9243
9241
|
ShowGrid.COL === this.showGrid,
|
|
9244
9242
|
// When there are columns with a specified width, we must add table-layout: fixed to force the table to respect them
|
|
@@ -9288,17 +9286,17 @@ const KupDataTable = class {
|
|
|
9288
9286
|
}
|
|
9289
9287
|
}
|
|
9290
9288
|
};
|
|
9291
|
-
const compCreated = (h(Host, { "onKup-cell-input": autoselectOnAction, "onKup-cell-update": autoselectOnAction }, h("style", null, __classPrivateFieldGet$
|
|
9289
|
+
const compCreated = (h(Host, { "onKup-cell-input": autoselectOnAction, "onKup-cell-update": autoselectOnAction }, h("style", null, __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h("div", { class: "above-wrapper" }, this.globalFilter ? (h("div", { id: "global-filter" }, h(FTextField, { fullWidth: true, icon: KupThemeIconValues.SEARCH, label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), value: this.globalFilterValue, onInput: (event) => {
|
|
9292
9290
|
const t = event.target;
|
|
9293
|
-
window.clearTimeout(__classPrivateFieldGet$
|
|
9294
|
-
__classPrivateFieldSet$2(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$
|
|
9291
|
+
window.clearTimeout(__classPrivateFieldGet$3(this, _KupDataTable_globalFilterTimeout, "f"));
|
|
9292
|
+
__classPrivateFieldSet$2(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
|
|
9295
9293
|
} }))) : null, paginatorTop), h("div", { class: "group-wrapper" }, groupChips), h("div", { class: "actions-wrapper" }, this.insertMode !== '' ? (h(FButton, { icon: "plus", onClick: async () => {
|
|
9296
9294
|
var _a;
|
|
9297
9295
|
if (this.insertMode === 'form') {
|
|
9298
|
-
__classPrivateFieldGet$
|
|
9296
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_rowInsertForm).call(this);
|
|
9299
9297
|
}
|
|
9300
9298
|
else {
|
|
9301
|
-
__classPrivateFieldSet$2(this, _KupDataTable_insertCount, (_a = __classPrivateFieldGet$
|
|
9299
|
+
__classPrivateFieldSet$2(this, _KupDataTable_insertCount, (_a = __classPrivateFieldGet$3(this, _KupDataTable_insertCount, "f"), _a++, _a), "f");
|
|
9302
9300
|
const cells = {};
|
|
9303
9301
|
for (let index = 0; index < this.data.columns.length; index++) {
|
|
9304
9302
|
const column = this.data.columns[index];
|
|
@@ -9312,8 +9310,8 @@ const KupDataTable = class {
|
|
|
9312
9310
|
}
|
|
9313
9311
|
const row = {
|
|
9314
9312
|
cells,
|
|
9315
|
-
id: __classPrivateFieldGet$
|
|
9316
|
-
__classPrivateFieldGet$
|
|
9313
|
+
id: __classPrivateFieldGet$3(this, _KupDataTable_INSERT_PREFIX, "f") +
|
|
9314
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCount, "f"),
|
|
9317
9315
|
};
|
|
9318
9316
|
this.data.rows.unshift(row);
|
|
9319
9317
|
await this.refresh(true);
|
|
@@ -9327,13 +9325,13 @@ const KupDataTable = class {
|
|
|
9327
9325
|
});
|
|
9328
9326
|
}, styling: FButtonStyling.OUTLINED, title: "Save", wrapperClass: "save-button" })) : null, this.showDeleteButton &&
|
|
9329
9327
|
this.selectedRows.length > 0 ? (h(FButton, { icon: "delete", onClick: () => {
|
|
9330
|
-
__classPrivateFieldGet$
|
|
9331
|
-
}, styling: FButtonStyling.OUTLINED, title: "Delete selected rows", wrapperClass: "delete-button" })) : null), h("div", { class: "droparea", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet$
|
|
9332
|
-
? __classPrivateFieldGet$
|
|
9328
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_rowsDelete).call(this);
|
|
9329
|
+
}, styling: FButtonStyling.OUTLINED, title: "Delete selected rows", wrapperClass: "delete-button" })) : null), h("div", { class: "droparea", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
|
|
9330
|
+
? __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_columnRemoveArea).call(this)
|
|
9333
9331
|
: null), h("div", { style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
|
|
9334
9332
|
? [
|
|
9335
9333
|
h("div", { class: "settings-trigger", onClick: () => {
|
|
9336
|
-
__classPrivateFieldGet$
|
|
9334
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onCustomSettingsClick).call(this);
|
|
9337
9335
|
}, ref: (el) => {
|
|
9338
9336
|
__classPrivateFieldSet$2(this, _KupDataTable_customizeTopButtonRef, el, "f");
|
|
9339
9337
|
} }, h(FImage, { color: `var(${KupThemeColorValues.TITLE})`, resource: "settings", sizeX: "10px" })),
|
|
@@ -9343,29 +9341,29 @@ const KupDataTable = class {
|
|
|
9343
9341
|
ev.stopPropagation();
|
|
9344
9342
|
}, onContextMenu: (e) => {
|
|
9345
9343
|
e.preventDefault();
|
|
9346
|
-
} }, h("thead", { hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_theadRef, el, "f")) }, h("tr", null, header)), h("tbody", null, rows), this.showFooter || __classPrivateFieldGet$
|
|
9344
|
+
} }, h("thead", { hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_theadRef, el, "f")) }, h("tr", null, header)), h("tbody", null, rows), this.showFooter || __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this)
|
|
9347
9345
|
? this.renderFooter()
|
|
9348
9346
|
: null), stickyEl), paginatorBottom)));
|
|
9349
9347
|
return compCreated;
|
|
9350
9348
|
}
|
|
9351
9349
|
disconnectedCallback() {
|
|
9352
|
-
__classPrivateFieldGet$
|
|
9353
|
-
__classPrivateFieldGet$
|
|
9354
|
-
__classPrivateFieldGet$
|
|
9350
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.unregister(__classPrivateFieldGet$3(this, _KupDataTable_interactableDrag, "f").concat(__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f"), __classPrivateFieldGet$3(this, _KupDataTable_interactableResize, "f"), __classPrivateFieldGet$3(this, _KupDataTable_interactableTouch, "f")));
|
|
9351
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.unregister(this);
|
|
9352
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").theme.unregister(this);
|
|
9355
9353
|
const dynamicPositionElements = this.rootElement.shadowRoot.querySelectorAll('[' + kupDynamicPositionAttribute + ']');
|
|
9356
9354
|
if (dynamicPositionElements.length > 0) {
|
|
9357
|
-
__classPrivateFieldGet$
|
|
9355
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.unregister(Array.prototype.slice.call(dynamicPositionElements));
|
|
9358
9356
|
}
|
|
9359
|
-
if (__classPrivateFieldGet$
|
|
9360
|
-
__classPrivateFieldGet$
|
|
9357
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f")) {
|
|
9358
|
+
__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f").remove();
|
|
9361
9359
|
}
|
|
9362
|
-
if (__classPrivateFieldGet$
|
|
9363
|
-
__classPrivateFieldGet$
|
|
9360
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f")) {
|
|
9361
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").remove();
|
|
9364
9362
|
}
|
|
9365
9363
|
if (this.scrollOnHover) {
|
|
9366
|
-
__classPrivateFieldGet$
|
|
9364
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").scrollOnHover.unregister(__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f"));
|
|
9367
9365
|
}
|
|
9368
|
-
__classPrivateFieldGet$
|
|
9366
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").resize.unobserve(this.rootElement);
|
|
9369
9367
|
this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
|
|
9370
9368
|
}
|
|
9371
9369
|
get rootElement() { return getElement$1(this); }
|
|
@@ -9386,16 +9384,16 @@ const KupDataTable = class {
|
|
|
9386
9384
|
}; }
|
|
9387
9385
|
};
|
|
9388
9386
|
_KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _KupDataTable_rowsLength = new WeakMap(), _KupDataTable_paginatedRows = new WeakMap(), _KupDataTable_paginatedRowsLength = new WeakMap(), _KupDataTable_footer = new WeakMap(), _KupDataTable_kupManager = new WeakMap(), _KupDataTable_renderedRows = new WeakMap(), _KupDataTable_loadMoreEventCounter = new WeakMap(), _KupDataTable_loadMoreEventPreviousQuantity = new WeakMap(), _KupDataTable_theadRef = new WeakMap(), _KupDataTable_tableRef = new WeakMap(), _KupDataTable_originalData = new WeakMap(), _KupDataTable_tableAreaRef = new WeakMap(), _KupDataTable_stickyTheadRef = new WeakMap(), _KupDataTable_customizeTopButtonRef = new WeakMap(), _KupDataTable_customizeTopPanelRef = new WeakMap(), _KupDataTable_sizedColumns = new WeakMap(), _KupDataTable_intObserver = new WeakMap(), _KupDataTable_navBarHeight = new WeakMap(), _KupDataTable_theadIntersecting = new WeakMap(), _KupDataTable_tableIntersecting = new WeakMap(), _KupDataTable_isSafariBrowser = new WeakMap(), _KupDataTable_isRestoringState = new WeakMap(), _KupDataTable_globalFilterTimeout = new WeakMap(), _KupDataTable_totalMenuCoords = new WeakMap(), _KupDataTable_clickTimeout = new WeakMap(), _KupDataTable_thRefs = new WeakMap(), _KupDataTable_rowsRefs = new WeakMap(), _KupDataTable_oldWidth = new WeakMap(), _KupDataTable_hold = new WeakMap(), _KupDataTable_interactableDrag = new WeakMap(), _KupDataTable_interactableDrop = new WeakMap(), _KupDataTable_interactableResize = new WeakMap(), _KupDataTable_interactableTouch = new WeakMap(), _KupDataTable_dropareaRef = new WeakMap(), _KupDataTable_removeDropareaRef = new WeakMap(), _KupDataTable_groupsDropareaRef = new WeakMap(), _KupDataTable_clickCb = new WeakMap(), _KupDataTable_clickCbCustomPanel = new WeakMap(), _KupDataTable_clickCbDropCard = new WeakMap(), _KupDataTable_resizeTimeout = new WeakMap(), _KupDataTable_columnMenuInstance = new WeakMap(), _KupDataTable_filtersColumnMenuInstance = new WeakMap(), _KupDataTable_filtersRowsInstance = new WeakMap(), _KupDataTable_detailCard = new WeakMap(), _KupDataTable_insertCard = new WeakMap(), _KupDataTable_confirmDeleteCard = new WeakMap(), _KupDataTable_confirmDeleteDialog = new WeakMap(), _KupDataTable_columnMenuCard = new WeakMap(), _KupDataTable_columnDropCard = new WeakMap(), _KupDataTable_columnDropCardAnchor = new WeakMap(), _KupDataTable_insertCount = new WeakMap(), _KupDataTable_BUTTON_CANCEL_ID = new WeakMap(), _KupDataTable_BUTTON_SUBMIT_ID = new WeakMap(), _KupDataTable_FIELDS_FORM_ID = new WeakMap(), _KupDataTable_MESSAGE_ID = new WeakMap(), _KupDataTable_MESSAGE_WRAPPER_ID = new WeakMap(), _KupDataTable_INSERT_PREFIX = new WeakMap(), _KupDataTable_stickyHeaderPosition = new WeakMap(), _KupDataTable_FONTSIZE_CODES = new WeakMap(), _KupDataTable_FONTSIZE_DECODES = new WeakMap(), _KupDataTable_FONTSIZE_ICONS = new WeakMap(), _KupDataTable_DENSITY_DECODES = new WeakMap(), _KupDataTable_DENSITY_ICONS = new WeakMap(), _KupDataTable_GRID_CODES = new WeakMap(), _KupDataTable_GRID_DECODES = new WeakMap(), _KupDataTable_GRID_ICONS = new WeakMap(), _KupDataTable_instances = new WeakSet(), _KupDataTable_closeDropCard = function _KupDataTable_closeDropCard() {
|
|
9389
|
-
__classPrivateFieldGet$
|
|
9390
|
-
__classPrivateFieldGet$
|
|
9391
|
-
__classPrivateFieldGet$
|
|
9387
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f"));
|
|
9388
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCbDropCard, "f"));
|
|
9389
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").remove();
|
|
9392
9390
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCard, null, "f");
|
|
9393
9391
|
}, _KupDataTable_createDropCard = function _KupDataTable_createDropCard(starter, receiving) {
|
|
9394
|
-
if (__classPrivateFieldGet$
|
|
9395
|
-
__classPrivateFieldGet$
|
|
9392
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f")) {
|
|
9393
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9396
9394
|
}
|
|
9397
9395
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCard, document.createElement('kup-card'), "f");
|
|
9398
|
-
__classPrivateFieldGet$
|
|
9396
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").data = {
|
|
9399
9397
|
options: {
|
|
9400
9398
|
data: this.data,
|
|
9401
9399
|
enableFormula: this.enableColumnsFormula,
|
|
@@ -9404,46 +9402,46 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9404
9402
|
receivingColumn: receiving,
|
|
9405
9403
|
starterColumn: starter,
|
|
9406
9404
|
formulaCb: () => {
|
|
9407
|
-
__classPrivateFieldGet$
|
|
9405
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9408
9406
|
this.refresh();
|
|
9409
9407
|
},
|
|
9410
9408
|
mergeCb: () => {
|
|
9411
9409
|
this.newColumn(KupDataNewColumnTypes.CONCATENATE, {
|
|
9412
9410
|
columns: [receiving.name, starter.name],
|
|
9413
9411
|
});
|
|
9414
|
-
__classPrivateFieldGet$
|
|
9412
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9415
9413
|
},
|
|
9416
9414
|
moveCb: () => {
|
|
9417
|
-
__classPrivateFieldGet$
|
|
9418
|
-
__classPrivateFieldGet$
|
|
9415
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnSort).call(this, receiving, starter);
|
|
9416
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9419
9417
|
},
|
|
9420
9418
|
},
|
|
9421
9419
|
};
|
|
9422
|
-
__classPrivateFieldGet$
|
|
9423
|
-
__classPrivateFieldGet$
|
|
9424
|
-
__classPrivateFieldGet$
|
|
9425
|
-
__classPrivateFieldGet$
|
|
9426
|
-
__classPrivateFieldGet$
|
|
9427
|
-
__classPrivateFieldGet$
|
|
9428
|
-
__classPrivateFieldGet$
|
|
9420
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").layoutFamily = KupCardFamily.BUILT_IN;
|
|
9421
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").layoutNumber = 3;
|
|
9422
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").isMenu = true;
|
|
9423
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").sizeX = '280px';
|
|
9424
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").sizeY = 'auto';
|
|
9425
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f"), __classPrivateFieldGet$3(this, _KupDataTable_columnDropCardAnchor, "f"), 0, KupDynamicPositionPlacement.AUTO, true);
|
|
9426
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f"));
|
|
9429
9427
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCbDropCard, {
|
|
9430
9428
|
cb: () => {
|
|
9431
|
-
__classPrivateFieldGet$
|
|
9429
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeDropCard).call(this);
|
|
9432
9430
|
},
|
|
9433
|
-
el: __classPrivateFieldGet$
|
|
9431
|
+
el: __classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f"),
|
|
9434
9432
|
}, "f");
|
|
9435
|
-
__classPrivateFieldGet$
|
|
9436
|
-
__classPrivateFieldGet$
|
|
9433
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCbDropCard, "f"), true);
|
|
9434
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnDropCard, "f").menuVisible = true;
|
|
9437
9435
|
}, _KupDataTable_calculateData = function _KupDataTable_calculateData() {
|
|
9438
9436
|
if (!this.transpose) {
|
|
9439
9437
|
// restore
|
|
9440
|
-
if (__classPrivateFieldGet$
|
|
9441
|
-
this.data = Object.assign({}, __classPrivateFieldGet$
|
|
9438
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_originalData, "f")) {
|
|
9439
|
+
this.data = Object.assign({}, __classPrivateFieldGet$3(this, _KupDataTable_originalData, "f"));
|
|
9442
9440
|
}
|
|
9443
9441
|
}
|
|
9444
9442
|
else {
|
|
9445
9443
|
// transpose
|
|
9446
|
-
__classPrivateFieldGet$
|
|
9444
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_setTransposedData).call(this);
|
|
9447
9445
|
}
|
|
9448
9446
|
}, _KupDataTable_getRow = function _KupDataTable_getRow(id) {
|
|
9449
9447
|
let row = null;
|
|
@@ -9460,26 +9458,26 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9460
9458
|
row = rows.find((row) => row.id === id);
|
|
9461
9459
|
}
|
|
9462
9460
|
};
|
|
9463
|
-
if (__classPrivateFieldGet$
|
|
9464
|
-
__classPrivateFieldGet$
|
|
9461
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) && typeof id === 'string') {
|
|
9462
|
+
__classPrivateFieldGet$3(this, _KupDataTable_paginatedRows, "f").forEach((row) => search(row.group.children));
|
|
9465
9463
|
}
|
|
9466
9464
|
else {
|
|
9467
|
-
test(__classPrivateFieldGet$
|
|
9465
|
+
test(__classPrivateFieldGet$3(this, _KupDataTable_rows, "f"));
|
|
9468
9466
|
}
|
|
9469
9467
|
return row;
|
|
9470
9468
|
}, _KupDataTable_getTransposedData = function _KupDataTable_getTransposedData(column) {
|
|
9471
9469
|
if (column) {
|
|
9472
9470
|
this.filters = {};
|
|
9473
9471
|
}
|
|
9474
|
-
return __classPrivateFieldGet$
|
|
9472
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").data.transpose(this.data, column);
|
|
9475
9473
|
}, _KupDataTable_setTransposedData = function _KupDataTable_setTransposedData() {
|
|
9476
9474
|
// transpose
|
|
9477
9475
|
__classPrivateFieldSet$2(this, _KupDataTable_originalData, Object.assign({}, this.data), "f");
|
|
9478
9476
|
if (this.data.columns.length > 0) {
|
|
9479
|
-
this.data = __classPrivateFieldGet$
|
|
9477
|
+
this.data = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getTransposedData).call(this, this.data.columns[0].name);
|
|
9480
9478
|
}
|
|
9481
9479
|
}, _KupDataTable_switchToTotalsMatrix = function _KupDataTable_switchToTotalsMatrix() {
|
|
9482
|
-
if (__classPrivateFieldGet$
|
|
9480
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_rows, "f").length === 0 || !__classPrivateFieldGet$3(this, _KupDataTable_rows, "f")[0].group)
|
|
9483
9481
|
return;
|
|
9484
9482
|
// calc totals matrix data
|
|
9485
9483
|
const totalsMatrixData = {};
|
|
@@ -9487,9 +9485,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9487
9485
|
// note that the sorting of the columns depends on the totals selection
|
|
9488
9486
|
// the first column is the one that is selected first in the totals, and so on...
|
|
9489
9487
|
const ids = [];
|
|
9490
|
-
ids.push(__classPrivateFieldGet$
|
|
9491
|
-
Object.keys(__classPrivateFieldGet$
|
|
9492
|
-
if (__classPrivateFieldGet$
|
|
9488
|
+
ids.push(__classPrivateFieldGet$3(this, _KupDataTable_rows, "f")[0].group.column);
|
|
9489
|
+
Object.keys(__classPrivateFieldGet$3(this, _KupDataTable_rows, "f")[0].group.totals).forEach((columnKey) => {
|
|
9490
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_rows, "f")[0].group.column !== columnKey)
|
|
9493
9491
|
ids.push(columnKey);
|
|
9494
9492
|
});
|
|
9495
9493
|
// calc columns
|
|
@@ -9519,7 +9517,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9519
9517
|
totalMode + ' ' + currentColumn.title;
|
|
9520
9518
|
}
|
|
9521
9519
|
}
|
|
9522
|
-
__classPrivateFieldGet$
|
|
9520
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_setObjForTotalsMatrix).call(this, currentColumn, this.totals);
|
|
9523
9521
|
}
|
|
9524
9522
|
totalsMatrixColumns.push(currentColumn);
|
|
9525
9523
|
}
|
|
@@ -9530,15 +9528,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9530
9528
|
// calc rows
|
|
9531
9529
|
const totalsMatrixRows = [];
|
|
9532
9530
|
let index = 0;
|
|
9533
|
-
__classPrivateFieldGet$
|
|
9531
|
+
__classPrivateFieldGet$3(this, _KupDataTable_rows, "f").forEach((row) => {
|
|
9534
9532
|
const cells = {};
|
|
9535
9533
|
ids.forEach((id) => {
|
|
9536
9534
|
let totalValue = row.group.totals[id];
|
|
9537
9535
|
if (!totalValue) {
|
|
9538
9536
|
totalValue = row.group.id;
|
|
9539
9537
|
}
|
|
9540
|
-
if (__classPrivateFieldGet$
|
|
9541
|
-
totalValue = __classPrivateFieldGet$
|
|
9538
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dates.isValid(totalValue, KupDatesFormats.ISO_DATE)) {
|
|
9539
|
+
totalValue = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dates.format(totalValue);
|
|
9542
9540
|
}
|
|
9543
9541
|
cells[id] = {
|
|
9544
9542
|
value: String(totalValue),
|
|
@@ -9578,13 +9576,13 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9578
9576
|
}, _KupDataTable_setObjForTotalsMatrix = function _KupDataTable_setObjForTotalsMatrix(column, totals) {
|
|
9579
9577
|
const obj = column.obj;
|
|
9580
9578
|
const totalMode = totals[column.name];
|
|
9581
|
-
if (__classPrivateFieldGet$
|
|
9579
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isDate(obj)) {
|
|
9582
9580
|
// check if min or max totals mode
|
|
9583
9581
|
if (totalMode === TotalMode.MAX || totalMode === TotalMode.MIN) {
|
|
9584
9582
|
return;
|
|
9585
9583
|
}
|
|
9586
9584
|
}
|
|
9587
|
-
else if (__classPrivateFieldGet$
|
|
9585
|
+
else if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isNumber(obj)) {
|
|
9588
9586
|
// check if percentage
|
|
9589
9587
|
if (obj.p && obj.p.toUpperCase() === 'P') {
|
|
9590
9588
|
if (totalMode !== TotalMode.COUNT &&
|
|
@@ -9612,14 +9610,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9612
9610
|
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, 0, "f");
|
|
9613
9611
|
}
|
|
9614
9612
|
if (topBar) {
|
|
9615
|
-
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$
|
|
9616
|
-
}
|
|
9617
|
-
if (__classPrivateFieldGet$
|
|
9618
|
-
__classPrivateFieldGet$
|
|
9619
|
-
const widthTable = __classPrivateFieldGet$
|
|
9620
|
-
__classPrivateFieldGet$
|
|
9621
|
-
const thCollection = __classPrivateFieldGet$
|
|
9622
|
-
const thStickyCollection = __classPrivateFieldGet$
|
|
9613
|
+
__classPrivateFieldSet$2(this, _KupDataTable_navBarHeight, __classPrivateFieldGet$3(this, _KupDataTable_navBarHeight, "f") + topBar.clientHeight, "f");
|
|
9614
|
+
}
|
|
9615
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f")) {
|
|
9616
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").style.top = __classPrivateFieldGet$3(this, _KupDataTable_navBarHeight, "f") + 'px';
|
|
9617
|
+
const widthTable = __classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f").offsetWidth;
|
|
9618
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").style.maxWidth = widthTable + 'px';
|
|
9619
|
+
const thCollection = __classPrivateFieldGet$3(this, _KupDataTable_theadRef, "f").querySelectorAll('th');
|
|
9620
|
+
const thStickyCollection = __classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").querySelectorAll('th-sticky');
|
|
9623
9621
|
for (let i = 0; i < thCollection.length; i++) {
|
|
9624
9622
|
const widthTH = thCollection[i].offsetWidth;
|
|
9625
9623
|
thStickyCollection[i].style.width = widthTH + 'px';
|
|
@@ -9630,8 +9628,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9630
9628
|
entries.forEach((entry) => {
|
|
9631
9629
|
if (entry.target.tagName === 'TR') {
|
|
9632
9630
|
if (entry.isIntersecting) {
|
|
9633
|
-
__classPrivateFieldGet$
|
|
9634
|
-
const delta = __classPrivateFieldGet$
|
|
9631
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Last row entering the viewport, loading more elements.');
|
|
9632
|
+
const delta = __classPrivateFieldGet$3(this, _KupDataTable_rows, "f").length - this.currentRowsPerPage;
|
|
9635
9633
|
if (delta < this.loadMoreStep) {
|
|
9636
9634
|
this.currentRowsPerPage += delta;
|
|
9637
9635
|
}
|
|
@@ -9645,7 +9643,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9645
9643
|
if (entry.isIntersecting) {
|
|
9646
9644
|
__classPrivateFieldSet$2(this, _KupDataTable_theadIntersecting, true, "f");
|
|
9647
9645
|
}
|
|
9648
|
-
else if (entry.boundingClientRect.bottom > __classPrivateFieldGet$
|
|
9646
|
+
else if (entry.boundingClientRect.bottom > __classPrivateFieldGet$3(this, _KupDataTable_navBarHeight, "f")) {
|
|
9649
9647
|
//If the thead is not intersecting but it still is inside the viewport, is to be considered intersected
|
|
9650
9648
|
__classPrivateFieldSet$2(this, _KupDataTable_theadIntersecting, true, "f");
|
|
9651
9649
|
}
|
|
@@ -9664,19 +9662,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9664
9662
|
if (this.tableHeight === undefined &&
|
|
9665
9663
|
this.tableWidth === undefined &&
|
|
9666
9664
|
this.headerIsPersistent) {
|
|
9667
|
-
__classPrivateFieldGet$
|
|
9665
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyHeaderPosition, "f").call(this);
|
|
9668
9666
|
}
|
|
9669
9667
|
});
|
|
9670
9668
|
};
|
|
9671
9669
|
const options = {
|
|
9672
9670
|
threshold: 0,
|
|
9673
|
-
rootMargin: '-' + __classPrivateFieldGet$
|
|
9671
|
+
rootMargin: '-' + __classPrivateFieldGet$3(this, _KupDataTable_navBarHeight, "f") + 'px 0px 0px 0px',
|
|
9674
9672
|
};
|
|
9675
9673
|
__classPrivateFieldSet$2(this, _KupDataTable_intObserver, new IntersectionObserver(callback, options), "f");
|
|
9676
9674
|
}, _KupDataTable_didLoadInteractables = function _KupDataTable_didLoadInteractables() {
|
|
9677
|
-
__classPrivateFieldGet$
|
|
9675
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableTouch, "f").push(__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"));
|
|
9678
9676
|
const tapCb = (e) => {
|
|
9679
|
-
if (__classPrivateFieldGet$
|
|
9677
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_hold, "f")) {
|
|
9680
9678
|
__classPrivateFieldSet$2(this, _KupDataTable_hold, false, "f");
|
|
9681
9679
|
return;
|
|
9682
9680
|
}
|
|
@@ -9689,11 +9687,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9689
9687
|
for (const key in e) {
|
|
9690
9688
|
clone[key] = e[key];
|
|
9691
9689
|
}
|
|
9692
|
-
__classPrivateFieldGet$
|
|
9690
|
+
__classPrivateFieldGet$3(this, _KupDataTable_clickTimeout, "f").push(setTimeout(() => {
|
|
9693
9691
|
this.kupDataTableClick.emit({
|
|
9694
9692
|
comp: this,
|
|
9695
9693
|
id: this.rootElement.id,
|
|
9696
|
-
details: __classPrivateFieldGet$
|
|
9694
|
+
details: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_clickHandler).call(this, clone),
|
|
9697
9695
|
});
|
|
9698
9696
|
}, 300));
|
|
9699
9697
|
break;
|
|
@@ -9702,7 +9700,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9702
9700
|
this.kupDataTableContextMenu.emit({
|
|
9703
9701
|
comp: this,
|
|
9704
9702
|
id: this.rootElement.id,
|
|
9705
|
-
details: __classPrivateFieldGet$
|
|
9703
|
+
details: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_contextMenuHandler).call(this, e),
|
|
9706
9704
|
});
|
|
9707
9705
|
break;
|
|
9708
9706
|
}
|
|
@@ -9711,17 +9709,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9711
9709
|
switch (e.button) {
|
|
9712
9710
|
// left click
|
|
9713
9711
|
case 0:
|
|
9714
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9715
|
-
clearTimeout(__classPrivateFieldGet$
|
|
9716
|
-
__classPrivateFieldGet$
|
|
9717
|
-
__classPrivateFieldGet$
|
|
9712
|
+
for (let index = 0; index < __classPrivateFieldGet$3(this, _KupDataTable_clickTimeout, "f").length; index++) {
|
|
9713
|
+
clearTimeout(__classPrivateFieldGet$3(this, _KupDataTable_clickTimeout, "f")[index]);
|
|
9714
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Cleared clickHandler timeout(' +
|
|
9715
|
+
__classPrivateFieldGet$3(this, _KupDataTable_clickTimeout, "f")[index] +
|
|
9718
9716
|
').');
|
|
9719
9717
|
}
|
|
9720
9718
|
__classPrivateFieldSet$2(this, _KupDataTable_clickTimeout, [], "f");
|
|
9721
9719
|
this.kupDataTableDblClick.emit({
|
|
9722
9720
|
comp: this,
|
|
9723
9721
|
id: this.rootElement.id,
|
|
9724
|
-
details: __classPrivateFieldGet$
|
|
9722
|
+
details: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_dblClickHandler).call(this, e),
|
|
9725
9723
|
});
|
|
9726
9724
|
break;
|
|
9727
9725
|
}
|
|
@@ -9732,40 +9730,40 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9732
9730
|
this.kupDataTableContextMenu.emit({
|
|
9733
9731
|
comp: this,
|
|
9734
9732
|
id: this.rootElement.id,
|
|
9735
|
-
details: __classPrivateFieldGet$
|
|
9733
|
+
details: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_contextMenuHandler).call(this, e),
|
|
9736
9734
|
});
|
|
9737
9735
|
}
|
|
9738
9736
|
};
|
|
9739
|
-
__classPrivateFieldGet$
|
|
9740
|
-
__classPrivateFieldGet$
|
|
9741
|
-
__classPrivateFieldGet$
|
|
9737
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"), KupPointerEventTypes.TAP, tapCb);
|
|
9738
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"), KupPointerEventTypes.DOUBLETAP, doubletapCb);
|
|
9739
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.on(__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"), KupPointerEventTypes.HOLD, holdCb);
|
|
9742
9740
|
}, _KupDataTable_didRenderInteractables = function _KupDataTable_didRenderInteractables() {
|
|
9743
9741
|
if (this.showGroups) {
|
|
9744
|
-
if (!__classPrivateFieldGet$
|
|
9745
|
-
__classPrivateFieldGet$
|
|
9746
|
-
__classPrivateFieldGet$
|
|
9742
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").includes(__classPrivateFieldGet$3(this, _KupDataTable_groupsDropareaRef, "f"))) {
|
|
9743
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").push(__classPrivateFieldGet$3(this, _KupDataTable_groupsDropareaRef, "f"));
|
|
9744
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.dropzone(__classPrivateFieldGet$3(this, _KupDataTable_groupsDropareaRef, "f"), {
|
|
9747
9745
|
accept: `[${kupDraggableColumnAttr}]`,
|
|
9748
9746
|
}, null, {
|
|
9749
9747
|
drop: (e) => {
|
|
9750
9748
|
const draggedTh = e.relatedTarget;
|
|
9751
9749
|
const grouped = getColumnByName(this.getColumns(), draggedTh.dataset.column);
|
|
9752
|
-
__classPrivateFieldGet$
|
|
9753
|
-
__classPrivateFieldGet$
|
|
9750
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnGroup).call(this, grouped);
|
|
9751
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").removeAttribute(kupDragActiveAttr);
|
|
9754
9752
|
},
|
|
9755
9753
|
});
|
|
9756
9754
|
}
|
|
9757
9755
|
}
|
|
9758
9756
|
if (this.removableColumns) {
|
|
9759
|
-
if (!__classPrivateFieldGet$
|
|
9760
|
-
__classPrivateFieldGet$
|
|
9761
|
-
__classPrivateFieldGet$
|
|
9757
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").includes(__classPrivateFieldGet$3(this, _KupDataTable_removeDropareaRef, "f"))) {
|
|
9758
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").push(__classPrivateFieldGet$3(this, _KupDataTable_removeDropareaRef, "f"));
|
|
9759
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.dropzone(__classPrivateFieldGet$3(this, _KupDataTable_removeDropareaRef, "f"), {
|
|
9762
9760
|
accept: `[${kupDraggableColumnAttr}]`,
|
|
9763
9761
|
}, null, {
|
|
9764
9762
|
drop: (e) => {
|
|
9765
9763
|
const draggedTh = e.relatedTarget;
|
|
9766
9764
|
const deleted = getColumnByName(this.getColumns(), draggedTh.dataset.column);
|
|
9767
9765
|
this.hideColumn(deleted);
|
|
9768
|
-
__classPrivateFieldGet$
|
|
9766
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").removeAttribute(kupDragActiveAttr);
|
|
9769
9767
|
},
|
|
9770
9768
|
});
|
|
9771
9769
|
}
|
|
@@ -9798,7 +9796,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9798
9796
|
__classPrivateFieldSet$2(this, _KupDataTable_columnDropCardAnchor, e.target, "f");
|
|
9799
9797
|
if (receiving && starter) {
|
|
9800
9798
|
if (onlySort) {
|
|
9801
|
-
__classPrivateFieldGet$
|
|
9799
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handleColumnSort).call(this, receiving, starter);
|
|
9802
9800
|
}
|
|
9803
9801
|
else if (onlyMerge) {
|
|
9804
9802
|
this.newColumn(KupDataNewColumnTypes.CONCATENATE, {
|
|
@@ -9806,17 +9804,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9806
9804
|
});
|
|
9807
9805
|
}
|
|
9808
9806
|
else {
|
|
9809
|
-
__classPrivateFieldGet$
|
|
9807
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_createDropCard).call(this, starter, receiving);
|
|
9810
9808
|
}
|
|
9811
9809
|
}
|
|
9812
|
-
__classPrivateFieldGet$
|
|
9810
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").removeAttribute(kupDragActiveAttr);
|
|
9813
9811
|
};
|
|
9814
9812
|
const startCb = (e) => {
|
|
9815
9813
|
const draggable = e.target;
|
|
9816
|
-
__classPrivateFieldGet$
|
|
9814
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, true, draggable);
|
|
9817
9815
|
};
|
|
9818
9816
|
const endCb = () => {
|
|
9819
|
-
__classPrivateFieldGet$
|
|
9817
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hideShowColumnDropArea).call(this, false);
|
|
9820
9818
|
};
|
|
9821
9819
|
const dropCallbacks = {
|
|
9822
9820
|
drop: dropCb,
|
|
@@ -9825,14 +9823,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9825
9823
|
start: startCb,
|
|
9826
9824
|
end: endCb,
|
|
9827
9825
|
};
|
|
9828
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9829
|
-
const th = __classPrivateFieldGet$
|
|
9830
|
-
if (th && !__classPrivateFieldGet$
|
|
9831
|
-
__classPrivateFieldGet$
|
|
9832
|
-
__classPrivateFieldGet$
|
|
9826
|
+
for (let index = 0; index < __classPrivateFieldGet$3(this, _KupDataTable_thRefs, "f").length; index++) {
|
|
9827
|
+
const th = __classPrivateFieldGet$3(this, _KupDataTable_thRefs, "f")[index];
|
|
9828
|
+
if (th && !__classPrivateFieldGet$3(this, _KupDataTable_interactableDrag, "f").includes(th)) {
|
|
9829
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableDrag, "f").push(th);
|
|
9830
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.dropzone(th, {
|
|
9833
9831
|
accept: `[${kupDraggableColumnAttr}]`,
|
|
9834
9832
|
}, null, dropCallbacks);
|
|
9835
|
-
__classPrivateFieldGet$
|
|
9833
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.draggable(th, {
|
|
9836
9834
|
cursorChecker() {
|
|
9837
9835
|
return null;
|
|
9838
9836
|
},
|
|
@@ -9852,11 +9850,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9852
9850
|
const callbacks = {
|
|
9853
9851
|
move: moveCb,
|
|
9854
9852
|
};
|
|
9855
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9856
|
-
const th = __classPrivateFieldGet$
|
|
9857
|
-
if (th && !__classPrivateFieldGet$
|
|
9858
|
-
__classPrivateFieldGet$
|
|
9859
|
-
__classPrivateFieldGet$
|
|
9853
|
+
for (let index = 0; index < __classPrivateFieldGet$3(this, _KupDataTable_thRefs, "f").length; index++) {
|
|
9854
|
+
const th = __classPrivateFieldGet$3(this, _KupDataTable_thRefs, "f")[index];
|
|
9855
|
+
if (th && !__classPrivateFieldGet$3(this, _KupDataTable_interactableResize, "f").includes(th)) {
|
|
9856
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableResize, "f").push(th);
|
|
9857
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.resizable(th, {
|
|
9860
9858
|
allowFrom: '.header-cell__drag-handler',
|
|
9861
9859
|
edges: {
|
|
9862
9860
|
left: false,
|
|
@@ -9870,8 +9868,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9870
9868
|
}
|
|
9871
9869
|
}
|
|
9872
9870
|
if (this.dragEnabled) {
|
|
9873
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9874
|
-
const row = __classPrivateFieldGet$
|
|
9871
|
+
for (let index = 0; index < __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").length; index++) {
|
|
9872
|
+
const row = __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f")[index];
|
|
9875
9873
|
const dataCb = () => {
|
|
9876
9874
|
const cellEl = this.rootElement.shadowRoot.querySelector('td:hover');
|
|
9877
9875
|
return {
|
|
@@ -9884,9 +9882,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9884
9882
|
selectedRows: this.selectedRows,
|
|
9885
9883
|
};
|
|
9886
9884
|
};
|
|
9887
|
-
if (row && !__classPrivateFieldGet$
|
|
9888
|
-
__classPrivateFieldGet$
|
|
9889
|
-
__classPrivateFieldGet$
|
|
9885
|
+
if (row && !__classPrivateFieldGet$3(this, _KupDataTable_interactableDrag, "f").includes(row)) {
|
|
9886
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableDrag, "f").push(row);
|
|
9887
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.draggable(row, {
|
|
9890
9888
|
allowFrom: 'td',
|
|
9891
9889
|
cursorChecker() {
|
|
9892
9890
|
return null;
|
|
@@ -9901,11 +9899,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9901
9899
|
const dataCb = () => {
|
|
9902
9900
|
const cell = this.rootElement.shadowRoot.querySelector('td:hover');
|
|
9903
9901
|
if (!cell) {
|
|
9904
|
-
__classPrivateFieldGet$
|
|
9902
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, "Couldn't find cell hovered to retrieve dropzone informations!", KupDebugCategory.WARNING);
|
|
9905
9903
|
return;
|
|
9906
9904
|
}
|
|
9907
|
-
const path = __classPrivateFieldGet$
|
|
9908
|
-
const receivingDetails = __classPrivateFieldGet$
|
|
9905
|
+
const path = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").getEventPath(cell, this.rootElement);
|
|
9906
|
+
const receivingDetails = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, path);
|
|
9909
9907
|
return {
|
|
9910
9908
|
cell: receivingDetails.cell,
|
|
9911
9909
|
column: receivingDetails.column,
|
|
@@ -9913,11 +9911,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9913
9911
|
row: receivingDetails.row,
|
|
9914
9912
|
};
|
|
9915
9913
|
};
|
|
9916
|
-
for (let index = 0; index < __classPrivateFieldGet$
|
|
9917
|
-
const row = __classPrivateFieldGet$
|
|
9918
|
-
if (row && !__classPrivateFieldGet$
|
|
9919
|
-
__classPrivateFieldGet$
|
|
9920
|
-
__classPrivateFieldGet$
|
|
9914
|
+
for (let index = 0; index < __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").length; index++) {
|
|
9915
|
+
const row = __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f")[index];
|
|
9916
|
+
if (row && !__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").includes(row)) {
|
|
9917
|
+
__classPrivateFieldGet$3(this, _KupDataTable_interactableDrop, "f").push(row);
|
|
9918
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").interact.dropzone(row, {
|
|
9921
9919
|
accept: `[${kupDraggableCellAttr}]`,
|
|
9922
9920
|
}, {
|
|
9923
9921
|
callback: dataCb,
|
|
@@ -9931,44 +9929,44 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9931
9929
|
if (this.headerIsPersistent &&
|
|
9932
9930
|
this.tableHeight === undefined &&
|
|
9933
9931
|
this.tableWidth === undefined) {
|
|
9934
|
-
__classPrivateFieldGet$
|
|
9935
|
-
__classPrivateFieldGet$
|
|
9932
|
+
__classPrivateFieldGet$3(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"));
|
|
9933
|
+
__classPrivateFieldGet$3(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$3(this, _KupDataTable_theadRef, "f"));
|
|
9936
9934
|
}
|
|
9937
9935
|
}, _KupDataTable_didRenderObservers = function _KupDataTable_didRenderObservers() {
|
|
9938
|
-
if (__classPrivateFieldGet$
|
|
9939
|
-
__classPrivateFieldGet$
|
|
9936
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_paginatedRowsLength, "f") < __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f") && this.lazyLoadRows) {
|
|
9937
|
+
__classPrivateFieldGet$3(this, _KupDataTable_intObserver, "f").observe(__classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f")[__classPrivateFieldGet$3(this, _KupDataTable_paginatedRowsLength, "f") - 1]);
|
|
9940
9938
|
}
|
|
9941
9939
|
}, _KupDataTable_didLoadEventHandling = function _KupDataTable_didLoadEventHandling() {
|
|
9942
|
-
__classPrivateFieldGet$
|
|
9940
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f").addEventListener('scroll', () => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_scrollStickyHeader).call(this));
|
|
9943
9941
|
}, _KupDataTable_scrollStickyHeader = function _KupDataTable_scrollStickyHeader() {
|
|
9944
|
-
if (!__classPrivateFieldGet$
|
|
9942
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f")) {
|
|
9945
9943
|
return;
|
|
9946
9944
|
}
|
|
9947
|
-
__classPrivateFieldGet$
|
|
9945
|
+
__classPrivateFieldGet$3(this, _KupDataTable_stickyTheadRef, "f").scrollLeft = __classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f").scrollLeft;
|
|
9948
9946
|
}, _KupDataTable_checkScrollOnHover = function _KupDataTable_checkScrollOnHover() {
|
|
9949
|
-
if (!__classPrivateFieldGet$
|
|
9947
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").scrollOnHover.isRegistered(__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f"))) {
|
|
9950
9948
|
if (this.scrollOnHover &&
|
|
9951
9949
|
this.tableHeight === undefined &&
|
|
9952
9950
|
this.tableWidth === undefined) {
|
|
9953
|
-
__classPrivateFieldGet$
|
|
9951
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").scrollOnHover.register(__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f"));
|
|
9954
9952
|
}
|
|
9955
9953
|
}
|
|
9956
9954
|
else {
|
|
9957
9955
|
if (!this.scrollOnHover &&
|
|
9958
9956
|
(this.tableHeight !== undefined ||
|
|
9959
9957
|
this.tableWidth !== undefined)) {
|
|
9960
|
-
__classPrivateFieldGet$
|
|
9958
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").scrollOnHover.unregister(__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f"));
|
|
9961
9959
|
}
|
|
9962
9960
|
}
|
|
9963
9961
|
}, _KupDataTable_customizePanelPosition = function _KupDataTable_customizePanelPosition() {
|
|
9964
|
-
if (__classPrivateFieldGet$
|
|
9965
|
-
!__classPrivateFieldGet$
|
|
9966
|
-
__classPrivateFieldGet$
|
|
9962
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_customizeTopButtonRef, "f") &&
|
|
9963
|
+
!__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f"))) {
|
|
9964
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f"), __classPrivateFieldGet$3(this, _KupDataTable_customizeTopButtonRef, "f"), 0, KupDynamicPositionPlacement.BOTTOM, true);
|
|
9967
9965
|
}
|
|
9968
9966
|
}, _KupDataTable_rowsPointLength = function _KupDataTable_rowsPointLength() {
|
|
9969
|
-
return __classPrivateFieldGet$
|
|
9967
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, __classPrivateFieldGet$3(this, _KupDataTable_rows, "f"));
|
|
9970
9968
|
}, _KupDataTable_paginatedRowsPointLength = function _KupDataTable_paginatedRowsPointLength() {
|
|
9971
|
-
return __classPrivateFieldGet$
|
|
9969
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, __classPrivateFieldGet$3(this, _KupDataTable_paginatedRows, "f"));
|
|
9972
9970
|
}, _KupDataTable__rowsLength = function _KupDataTable__rowsLength(r) {
|
|
9973
9971
|
if (r == null) {
|
|
9974
9972
|
return 0;
|
|
@@ -9981,26 +9979,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
9981
9979
|
}
|
|
9982
9980
|
count += 1;
|
|
9983
9981
|
if (row.group != null) {
|
|
9984
|
-
count += __classPrivateFieldGet$
|
|
9982
|
+
count += __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable__rowsLength).call(this, row.group.children);
|
|
9985
9983
|
}
|
|
9986
9984
|
}
|
|
9987
9985
|
return count;
|
|
9988
9986
|
}, _KupDataTable_setDynPosElements = function _KupDataTable_setDynPosElements() {
|
|
9989
9987
|
// Column menu
|
|
9990
|
-
if (__classPrivateFieldGet$
|
|
9991
|
-
__classPrivateFieldGet$
|
|
9992
|
-
}
|
|
9993
|
-
}, _KupDataTable_getEventPath = function _KupDataTable_getEventPath(currentEl) {
|
|
9994
|
-
const path = [];
|
|
9995
|
-
while (currentEl &&
|
|
9996
|
-
currentEl !== this.rootElement &&
|
|
9997
|
-
currentEl !== document.body) {
|
|
9998
|
-
path.push(currentEl);
|
|
9999
|
-
currentEl = currentEl.parentNode
|
|
10000
|
-
? currentEl.parentNode
|
|
10001
|
-
: currentEl.host;
|
|
10002
|
-
}
|
|
10003
|
-
return path;
|
|
9988
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f") && __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").data) {
|
|
9989
|
+
__classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").data = __classPrivateFieldGet$3(this, _KupDataTable_columnMenuInstance, "f").prepData(this, getColumnByName(this.getVisibleColumns(), this.columnMenuAnchor), __classPrivateFieldGet$3(this, _KupDataTable_columnMenuCard, "f").data);
|
|
9990
|
+
}
|
|
10004
9991
|
}, _KupDataTable_resetSelectedRows = function _KupDataTable_resetSelectedRows() {
|
|
10005
9992
|
if (this.getRows().length === 0)
|
|
10006
9993
|
return;
|
|
@@ -10023,7 +10010,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10023
10010
|
return undefined;
|
|
10024
10011
|
}
|
|
10025
10012
|
}, _KupDataTable_rowDetail = function _KupDataTable_rowDetail(row, x, y) {
|
|
10026
|
-
const transposedData = __classPrivateFieldGet$
|
|
10013
|
+
const transposedData = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getTransposedData).call(this);
|
|
10027
10014
|
const cardData = {
|
|
10028
10015
|
button: [
|
|
10029
10016
|
{
|
|
@@ -10052,7 +10039,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10052
10039
|
showHeader: false,
|
|
10053
10040
|
},
|
|
10054
10041
|
],
|
|
10055
|
-
text: [__classPrivateFieldGet$
|
|
10042
|
+
text: [__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageRow.DETAIL)],
|
|
10056
10043
|
};
|
|
10057
10044
|
const columns = cardData.datatable[0].data.columns;
|
|
10058
10045
|
const rows = cardData.datatable[0].data.rows;
|
|
@@ -10076,7 +10063,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10076
10063
|
currentColumn.visible = true;
|
|
10077
10064
|
}
|
|
10078
10065
|
else {
|
|
10079
|
-
__classPrivateFieldGet$
|
|
10066
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Invalid column name on row ID (' +
|
|
10080
10067
|
row.id +
|
|
10081
10068
|
"), couldn't set current record!", KupDebugCategory.WARNING);
|
|
10082
10069
|
}
|
|
@@ -10085,7 +10072,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10085
10072
|
for (let index = 0; index < rows.length; index++) {
|
|
10086
10073
|
const column = this.data.columns.find((x) => x.name === rows[index].transposedColumnName);
|
|
10087
10074
|
if (!column) {
|
|
10088
|
-
__classPrivateFieldGet$
|
|
10075
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'Column not found on row name (' + column + ')!', KupDebugCategory.WARNING);
|
|
10089
10076
|
return;
|
|
10090
10077
|
}
|
|
10091
10078
|
const editable = rows[index].cells[row.id].isEditable
|
|
@@ -10109,8 +10096,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10109
10096
|
resource: editable ? 'edit-key' : 'key-variant',
|
|
10110
10097
|
},
|
|
10111
10098
|
title: editable
|
|
10112
|
-
? __classPrivateFieldGet$
|
|
10113
|
-
: __classPrivateFieldGet$
|
|
10099
|
+
? __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageRow.EDITABLE_KEY)
|
|
10100
|
+
: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageRow.KEY),
|
|
10114
10101
|
value: editable ? 'edit-key' : 'key-variant',
|
|
10115
10102
|
};
|
|
10116
10103
|
}
|
|
@@ -10125,7 +10112,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10125
10112
|
color: `var(${KupThemeColorValues.TEXT})`,
|
|
10126
10113
|
resource: 'pencil',
|
|
10127
10114
|
},
|
|
10128
|
-
title: __classPrivateFieldGet$
|
|
10115
|
+
title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.EDITABLE_FIELD),
|
|
10129
10116
|
value: 'pencil',
|
|
10130
10117
|
};
|
|
10131
10118
|
}
|
|
@@ -10147,35 +10134,35 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10147
10134
|
}
|
|
10148
10135
|
rows[index].cells[iconColumn.toUpperCase()] = iconCell;
|
|
10149
10136
|
}
|
|
10150
|
-
if (!__classPrivateFieldGet$
|
|
10137
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f")) {
|
|
10151
10138
|
__classPrivateFieldSet$2(this, _KupDataTable_detailCard, document.createElement('kup-card'), "f");
|
|
10152
|
-
__classPrivateFieldGet$
|
|
10153
|
-
__classPrivateFieldGet$
|
|
10154
|
-
__classPrivateFieldGet$
|
|
10155
|
-
__classPrivateFieldGet$
|
|
10139
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").layoutFamily = KupCardFamily.DIALOG;
|
|
10140
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").layoutNumber = 4;
|
|
10141
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").sizeX = 'auto';
|
|
10142
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").sizeY = 'auto';
|
|
10156
10143
|
}
|
|
10157
10144
|
else {
|
|
10158
|
-
const children = Array.prototype.slice.call(__classPrivateFieldGet$
|
|
10145
|
+
const children = Array.prototype.slice.call(__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").children, 0);
|
|
10159
10146
|
for (let index = 0; index < children.length; index++) {
|
|
10160
10147
|
children[index].remove();
|
|
10161
10148
|
}
|
|
10162
10149
|
}
|
|
10163
|
-
__classPrivateFieldGet$
|
|
10164
|
-
__classPrivateFieldGet$
|
|
10165
|
-
__classPrivateFieldGet$
|
|
10166
|
-
__classPrivateFieldGet$
|
|
10167
|
-
__classPrivateFieldGet$
|
|
10168
|
-
__classPrivateFieldGet$
|
|
10169
|
-
__classPrivateFieldGet$
|
|
10170
|
-
this.rootElement.shadowRoot.append(__classPrivateFieldGet$
|
|
10150
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").data = cardData;
|
|
10151
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").style.position = 'fixed';
|
|
10152
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").style.left = '0';
|
|
10153
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").style.top = '0';
|
|
10154
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").setAttribute('data-x', x.toString());
|
|
10155
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").setAttribute('data-y', y.toString());
|
|
10156
|
+
__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f").style.transform = 'translate(' + x + 'px,' + y + 'px)';
|
|
10157
|
+
this.rootElement.shadowRoot.append(__classPrivateFieldGet$3(this, _KupDataTable_detailCard, "f"));
|
|
10171
10158
|
}, _KupDataTable_rowInsertForm = function _KupDataTable_rowInsertForm() {
|
|
10172
10159
|
const CARD_WIDTH = 400;
|
|
10173
10160
|
const CARD_HEIGHT = 400;
|
|
10174
10161
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, document.createElement('kup-card'), "f");
|
|
10175
|
-
__classPrivateFieldGet$
|
|
10176
|
-
__classPrivateFieldGet$
|
|
10177
|
-
__classPrivateFieldGet$
|
|
10178
|
-
__classPrivateFieldGet$
|
|
10162
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").layoutFamily = KupCardFamily.FREE;
|
|
10163
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").layoutNumber = 1;
|
|
10164
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").sizeX = CARD_WIDTH + 'px';
|
|
10165
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").sizeY = CARD_HEIGHT + 'px';
|
|
10179
10166
|
const style = document.createElement('style');
|
|
10180
10167
|
style.innerText =
|
|
10181
10168
|
'kup-form { max-height: 40vh; overflow: auto; } .page-wrapper { display: grid; } ' +
|
|
@@ -10183,24 +10170,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10183
10170
|
'.message-wrapper { display: none; justify-content: start; padding-top: 5px; padding-bottom: 5px; } ' +
|
|
10184
10171
|
'.errorIcon { --kup-icon-color: var(--kup-danger-color); } ' +
|
|
10185
10172
|
'.message { background-color: var(--kup-danger-color); color: white; padding: 3px; } ';
|
|
10186
|
-
__classPrivateFieldGet$
|
|
10173
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").append(style);
|
|
10187
10174
|
const pageWrapper = document.createElement('div');
|
|
10188
10175
|
pageWrapper.className = 'page-wrapper';
|
|
10189
10176
|
const buttonWrapper = document.createElement('div');
|
|
10190
10177
|
buttonWrapper.className = 'button-wrapper';
|
|
10191
10178
|
const cancel = document.createElement('kup-button');
|
|
10192
10179
|
const confirm = document.createElement('kup-button');
|
|
10193
|
-
cancel.id = __classPrivateFieldGet$
|
|
10180
|
+
cancel.id = __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_CANCEL_ID, "f");
|
|
10194
10181
|
cancel.icon = 'clear';
|
|
10195
|
-
cancel.label = __classPrivateFieldGet$
|
|
10182
|
+
cancel.label = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.ABORT);
|
|
10196
10183
|
cancel.styling = FButtonStyling.FLAT;
|
|
10197
10184
|
cancel.addEventListener('kup-button-click', () => {
|
|
10198
|
-
__classPrivateFieldGet$
|
|
10185
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").remove();
|
|
10199
10186
|
__classPrivateFieldSet$2(this, _KupDataTable_insertCard, null, "f");
|
|
10200
10187
|
});
|
|
10201
|
-
confirm.id = __classPrivateFieldGet$
|
|
10188
|
+
confirm.id = __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_SUBMIT_ID, "f");
|
|
10202
10189
|
confirm.icon = 'check';
|
|
10203
|
-
confirm.label = __classPrivateFieldGet$
|
|
10190
|
+
confirm.label = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.CONFIRM);
|
|
10204
10191
|
let innerComp = document.createElement('kup-spinner');
|
|
10205
10192
|
innerComp.slot = 'spinner';
|
|
10206
10193
|
innerComp.dimensions = '0.6em';
|
|
@@ -10219,7 +10206,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10219
10206
|
buttonWrapper.append(cancel);
|
|
10220
10207
|
buttonWrapper.append(confirm);
|
|
10221
10208
|
const form = document.createElement('kup-form');
|
|
10222
|
-
form.id = __classPrivateFieldGet$
|
|
10209
|
+
form.id = __classPrivateFieldGet$3(this, _KupDataTable_FIELDS_FORM_ID, "f");
|
|
10223
10210
|
const row = {
|
|
10224
10211
|
cells: {},
|
|
10225
10212
|
id: '0',
|
|
@@ -10239,7 +10226,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10239
10226
|
};
|
|
10240
10227
|
const messageWrapper = document.createElement('div');
|
|
10241
10228
|
messageWrapper.className = 'message-wrapper';
|
|
10242
|
-
messageWrapper.id = __classPrivateFieldGet$
|
|
10229
|
+
messageWrapper.id = __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f");
|
|
10243
10230
|
const icon = document.createElement('kup-image');
|
|
10244
10231
|
icon.className = 'errorIcon';
|
|
10245
10232
|
icon.resource = 'cancel';
|
|
@@ -10248,43 +10235,43 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10248
10235
|
messageWrapper.append(icon);
|
|
10249
10236
|
const message = document.createElement('span');
|
|
10250
10237
|
message.className = 'message';
|
|
10251
|
-
message.id = __classPrivateFieldGet$
|
|
10238
|
+
message.id = __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_ID, "f");
|
|
10252
10239
|
let msg = '';
|
|
10253
10240
|
message.innerText = msg;
|
|
10254
10241
|
messageWrapper.append(message);
|
|
10255
10242
|
pageWrapper.append(messageWrapper);
|
|
10256
10243
|
pageWrapper.append(form);
|
|
10257
10244
|
pageWrapper.append(buttonWrapper);
|
|
10258
|
-
__classPrivateFieldGet$
|
|
10259
|
-
__classPrivateFieldGet$
|
|
10260
|
-
this.rootElement.shadowRoot.append(__classPrivateFieldGet$
|
|
10245
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").append(pageWrapper);
|
|
10246
|
+
__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f").data = {};
|
|
10247
|
+
this.rootElement.shadowRoot.append(__classPrivateFieldGet$3(this, _KupDataTable_insertCard, "f"));
|
|
10261
10248
|
}, _KupDataTable_rowsDelete = function _KupDataTable_rowsDelete() {
|
|
10262
10249
|
const createDeleteCard = () => {
|
|
10263
10250
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteDialog, document.createElement('kup-dialog'), "f");
|
|
10264
10251
|
__classPrivateFieldSet$2(this, _KupDataTable_confirmDeleteCard, document.createElement('kup-card'), "f");
|
|
10265
|
-
__classPrivateFieldGet$
|
|
10266
|
-
__classPrivateFieldGet$
|
|
10267
|
-
__classPrivateFieldGet$
|
|
10268
|
-
__classPrivateFieldGet$
|
|
10252
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").layoutFamily = KupCardFamily.FREE;
|
|
10253
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").layoutNumber = 1;
|
|
10254
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").sizeX = 'auto';
|
|
10255
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").sizeY = 'auto';
|
|
10269
10256
|
const style = document.createElement('style');
|
|
10270
10257
|
style.innerText =
|
|
10271
10258
|
'.button-wrapper, .message-wrapper { display: flex; justify-content: space-around; z-index: var(--kup-card-zindex); } .message-wrapper { padding-bottom: 20px; }';
|
|
10272
10259
|
const messageWrapper = document.createElement('div');
|
|
10273
10260
|
messageWrapper.className = 'message-wrapper';
|
|
10274
|
-
messageWrapper.id = __classPrivateFieldGet$
|
|
10261
|
+
messageWrapper.id = __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_WRAPPER_ID, "f");
|
|
10275
10262
|
const message = document.createElement('span');
|
|
10276
10263
|
message.className = 'message';
|
|
10277
|
-
message.id = __classPrivateFieldGet$
|
|
10278
|
-
let msg = __classPrivateFieldGet$
|
|
10264
|
+
message.id = __classPrivateFieldGet$3(this, _KupDataTable_MESSAGE_ID, "f");
|
|
10265
|
+
let msg = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.CONFIRM_DELETE_X_ROWS);
|
|
10279
10266
|
msg = msg.replace('{0}', this.selectedRows.length + '');
|
|
10280
10267
|
message.innerText = msg;
|
|
10281
10268
|
messageWrapper.append(message);
|
|
10282
10269
|
const buttonWrapper = document.createElement('div');
|
|
10283
10270
|
buttonWrapper.className = 'button-wrapper';
|
|
10284
10271
|
const confirm = document.createElement('kup-button');
|
|
10285
|
-
confirm.id = __classPrivateFieldGet$
|
|
10272
|
+
confirm.id = __classPrivateFieldGet$3(this, _KupDataTable_BUTTON_SUBMIT_ID, "f");
|
|
10286
10273
|
confirm.icon = 'check';
|
|
10287
|
-
confirm.label = __classPrivateFieldGet$
|
|
10274
|
+
confirm.label = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.CONFIRM);
|
|
10288
10275
|
let innerComp = document.createElement('kup-spinner');
|
|
10289
10276
|
innerComp.slot = 'spinner';
|
|
10290
10277
|
innerComp.dimensions = '0.6em';
|
|
@@ -10299,17 +10286,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10299
10286
|
});
|
|
10300
10287
|
});
|
|
10301
10288
|
buttonWrapper.append(confirm);
|
|
10302
|
-
__classPrivateFieldGet$
|
|
10303
|
-
__classPrivateFieldGet$
|
|
10304
|
-
__classPrivateFieldGet$
|
|
10305
|
-
__classPrivateFieldGet$
|
|
10306
|
-
__classPrivateFieldGet$
|
|
10307
|
-
document.querySelector('body').append(__classPrivateFieldGet$
|
|
10289
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").append(style);
|
|
10290
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").append(messageWrapper);
|
|
10291
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").append(buttonWrapper);
|
|
10292
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f").data = {};
|
|
10293
|
+
__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteDialog, "f").append(__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteCard, "f"));
|
|
10294
|
+
document.querySelector('body').append(__classPrivateFieldGet$3(this, _KupDataTable_confirmDeleteDialog, "f"));
|
|
10308
10295
|
};
|
|
10309
10296
|
const insertRowsIds = [];
|
|
10310
10297
|
const startingRows = [];
|
|
10311
10298
|
this.selectedRows.forEach((row) => {
|
|
10312
|
-
if (row.id.indexOf(__classPrivateFieldGet$
|
|
10299
|
+
if (row.id.indexOf(__classPrivateFieldGet$3(this, _KupDataTable_INSERT_PREFIX, "f")) > -1) {
|
|
10313
10300
|
insertRowsIds.push(row.id);
|
|
10314
10301
|
}
|
|
10315
10302
|
else {
|
|
@@ -10414,15 +10401,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10414
10401
|
tr: tr ? tr : null,
|
|
10415
10402
|
};
|
|
10416
10403
|
}, _KupDataTable_clickHandler = function _KupDataTable_clickHandler(e) {
|
|
10417
|
-
const details = __classPrivateFieldGet$
|
|
10404
|
+
const details = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10418
10405
|
if (details.area === 'header') {
|
|
10419
10406
|
if (details.th && details.column) {
|
|
10420
10407
|
if (details.filterRemove) {
|
|
10421
|
-
__classPrivateFieldGet$
|
|
10408
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onRemoveFilter).call(this, details.column);
|
|
10422
10409
|
return details;
|
|
10423
10410
|
}
|
|
10424
10411
|
else if (this.sortEnabled) {
|
|
10425
|
-
__classPrivateFieldGet$
|
|
10412
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onColumnSort).call(this, e, details.column.name);
|
|
10426
10413
|
return details;
|
|
10427
10414
|
}
|
|
10428
10415
|
}
|
|
@@ -10437,22 +10424,22 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10437
10424
|
}
|
|
10438
10425
|
details.tr.classList.add('focus');
|
|
10439
10426
|
if (e.ctrlKey || e.metaKey) {
|
|
10440
|
-
__classPrivateFieldGet$
|
|
10427
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_rowDetail).call(this, Object.assign({}, details.row), e.clientX, e.clientY);
|
|
10441
10428
|
return details;
|
|
10442
10429
|
}
|
|
10443
10430
|
}
|
|
10444
10431
|
if (details.tr && details.row && details.isGroupRow) {
|
|
10445
|
-
__classPrivateFieldGet$
|
|
10432
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onRowExpand).call(this, details.row);
|
|
10446
10433
|
return details;
|
|
10447
10434
|
}
|
|
10448
10435
|
if (details.td && details.row && !details.textfield) {
|
|
10449
|
-
__classPrivateFieldGet$
|
|
10436
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, details.row, details.td, true);
|
|
10450
10437
|
return details;
|
|
10451
10438
|
}
|
|
10452
10439
|
}
|
|
10453
10440
|
return details;
|
|
10454
10441
|
}, _KupDataTable_contextMenuHandler = function _KupDataTable_contextMenuHandler(e) {
|
|
10455
|
-
const details = __classPrivateFieldGet$
|
|
10442
|
+
const details = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10456
10443
|
if (details.area === 'header') {
|
|
10457
10444
|
if (details.th && details.column) {
|
|
10458
10445
|
this.openColumnMenu(details.column.name);
|
|
@@ -10462,34 +10449,34 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10462
10449
|
else if (details.area === 'footer') {
|
|
10463
10450
|
if (details.td && details.column) {
|
|
10464
10451
|
__classPrivateFieldSet$2(this, _KupDataTable_totalMenuCoords, { x: e.clientX, y: e.clientY }, "f");
|
|
10465
|
-
__classPrivateFieldGet$
|
|
10452
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onTotalMenuOpen).call(this, details.column);
|
|
10466
10453
|
return details;
|
|
10467
10454
|
}
|
|
10468
10455
|
}
|
|
10469
10456
|
return details;
|
|
10470
10457
|
}, _KupDataTable_dblClickHandler = function _KupDataTable_dblClickHandler(e) {
|
|
10471
|
-
const details = __classPrivateFieldGet$
|
|
10458
|
+
const details = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
10472
10459
|
if (details.area === 'body') {
|
|
10473
10460
|
if (this.selection == SelectionMode.MULTIPLE) {
|
|
10474
|
-
__classPrivateFieldGet$
|
|
10461
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
10475
10462
|
}
|
|
10476
10463
|
if (this.selection == SelectionMode.SINGLE ||
|
|
10477
10464
|
this.selection == SelectionMode.MULTIPLE) {
|
|
10478
|
-
__classPrivateFieldGet$
|
|
10465
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onRowClick).call(this, details.row, details.td, false);
|
|
10479
10466
|
}
|
|
10480
10467
|
}
|
|
10481
10468
|
return details;
|
|
10482
10469
|
}, _KupDataTable_initRows = function _KupDataTable_initRows() {
|
|
10483
|
-
__classPrivateFieldGet$
|
|
10484
|
-
__classPrivateFieldSet$2(this, _KupDataTable_footer, calcTotals(normalizeRows(this.getColumns(), __classPrivateFieldGet$
|
|
10485
|
-
__classPrivateFieldGet$
|
|
10486
|
-
__classPrivateFieldGet$
|
|
10487
|
-
__classPrivateFieldGet$
|
|
10488
|
-
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRows, paginateRows(__classPrivateFieldGet$
|
|
10489
|
-
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRowsLength, __classPrivateFieldGet$
|
|
10470
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_filterRows).call(this);
|
|
10471
|
+
__classPrivateFieldSet$2(this, _KupDataTable_footer, calcTotals(normalizeRows(this.getColumns(), __classPrivateFieldGet$3(this, _KupDataTable_rows, "f")), this.totals), "f");
|
|
10472
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_groupRows).call(this);
|
|
10473
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_sortRows).call(this);
|
|
10474
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_adjustPaginator).call(this);
|
|
10475
|
+
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRows, paginateRows(__classPrivateFieldGet$3(this, _KupDataTable_rows, "f"), this.currentPage, this.currentRowsPerPage, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)), "f");
|
|
10476
|
+
__classPrivateFieldSet$2(this, _KupDataTable_paginatedRowsLength, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_paginatedRowsPointLength).call(this), "f");
|
|
10490
10477
|
}, _KupDataTable_filterRows = function _KupDataTable_filterRows() {
|
|
10491
10478
|
__classPrivateFieldSet$2(this, _KupDataTable_rows, filterRows(this.getRows(), this.filters, this.globalFilterValue, this.getColumns()), "f");
|
|
10492
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rowsLength, __classPrivateFieldGet$
|
|
10479
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rowsLength, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_rowsPointLength).call(this), "f");
|
|
10493
10480
|
}, _KupDataTable_isGrouping = function _KupDataTable_isGrouping() {
|
|
10494
10481
|
return this.groups && this.groups.length > 0;
|
|
10495
10482
|
}, _KupDataTable_hasRowActions = function _KupDataTable_hasRowActions() {
|
|
@@ -10503,19 +10490,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10503
10490
|
}, _KupDataTable_hasTotals = function _KupDataTable_hasTotals() {
|
|
10504
10491
|
return this.totals && Object.keys(this.totals).length > 0;
|
|
10505
10492
|
}, _KupDataTable_tableHasAutoWidth = function _KupDataTable_tableHasAutoWidth() {
|
|
10506
|
-
if (!__classPrivateFieldGet$
|
|
10493
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")) {
|
|
10507
10494
|
return;
|
|
10508
10495
|
}
|
|
10509
10496
|
const visibleCols = this.getVisibleColumns();
|
|
10510
10497
|
// Before checking each column, controls that visible columns are as many as items with custom sizes.
|
|
10511
10498
|
// If there are more visible columns, it means that the width of the table will be set to auto.
|
|
10512
|
-
if (visibleCols.length <= __classPrivateFieldGet$
|
|
10499
|
+
if (visibleCols.length <= __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f").length) {
|
|
10513
10500
|
let found = false;
|
|
10514
10501
|
// Each visible column must have its own width for the table to have a auto width
|
|
10515
10502
|
for (let i = 0; i < visibleCols.length; i++) {
|
|
10516
10503
|
found = false;
|
|
10517
|
-
for (let j = 0; j < __classPrivateFieldGet$
|
|
10518
|
-
if (visibleCols[i].name === __classPrivateFieldGet$
|
|
10504
|
+
for (let j = 0; j < __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f").length; j++) {
|
|
10505
|
+
if (visibleCols[i].name === __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")[j].name) {
|
|
10519
10506
|
found = true;
|
|
10520
10507
|
break;
|
|
10521
10508
|
}
|
|
@@ -10528,8 +10515,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10528
10515
|
}
|
|
10529
10516
|
return false;
|
|
10530
10517
|
}, _KupDataTable_forceGroupExpansion = function _KupDataTable_forceGroupExpansion() {
|
|
10531
|
-
__classPrivateFieldGet$
|
|
10532
|
-
__classPrivateFieldGet$
|
|
10518
|
+
__classPrivateFieldGet$3(this, _KupDataTable_rows, "f").forEach((row) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, row));
|
|
10519
|
+
__classPrivateFieldGet$3(this, _KupDataTable_paginatedRows, "f").forEach((row) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, row));
|
|
10533
10520
|
}, _KupDataTable_forceRowGroupExpansion = function _KupDataTable_forceRowGroupExpansion(row) {
|
|
10534
10521
|
// check if row is group
|
|
10535
10522
|
if (!row.group) {
|
|
@@ -10550,10 +10537,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10550
10537
|
}
|
|
10551
10538
|
this.groupState[row.group.id] = groupState;
|
|
10552
10539
|
if (row.group.children) {
|
|
10553
|
-
row.group.children.forEach((childRow) => __classPrivateFieldGet$
|
|
10540
|
+
row.group.children.forEach((childRow) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_forceRowGroupExpansion).call(this, childRow));
|
|
10554
10541
|
}
|
|
10555
10542
|
}, _KupDataTable_adjustPaginator = function _KupDataTable_adjustPaginator() {
|
|
10556
|
-
const numberOfRows = __classPrivateFieldGet$
|
|
10543
|
+
const numberOfRows = __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f");
|
|
10557
10544
|
// check if current page is valid
|
|
10558
10545
|
const numberOfPages = Math.ceil(numberOfRows / this.currentRowsPerPage);
|
|
10559
10546
|
if (this.currentPage > numberOfPages) {
|
|
@@ -10562,7 +10549,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10562
10549
|
this.resetCurrentPage();
|
|
10563
10550
|
}
|
|
10564
10551
|
}, _KupDataTable_composeFixedCellStyleAndClass = function _KupDataTable_composeFixedCellStyleAndClass(columnCssIndex, rowCssIndex, extraCellsCount = 0) {
|
|
10565
|
-
if (__classPrivateFieldGet$
|
|
10552
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
10566
10553
|
return undefined;
|
|
10567
10554
|
}
|
|
10568
10555
|
//-- Controls if there are fixed rows or columns --
|
|
@@ -10599,20 +10586,20 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10599
10586
|
}, _KupDataTable_updateFixedRowsAndColumnsCssVariables = function _KupDataTable_updateFixedRowsAndColumnsCssVariables() {
|
|
10600
10587
|
// [ffbf] - Using getBoundingClientRect is mandatory since Firefox return a wrong value for ele.offsetHeight and witdh values
|
|
10601
10588
|
// When grouping, the fixed rows and columns are not sticky
|
|
10602
|
-
if (__classPrivateFieldGet$
|
|
10589
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) || !__classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f"))
|
|
10603
10590
|
return false;
|
|
10604
10591
|
let toRet = false;
|
|
10605
10592
|
if (this.fixedRows >= 1) {
|
|
10606
|
-
let currentRow = __classPrivateFieldGet$
|
|
10593
|
+
let currentRow = __classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").querySelector('tbody > tr:first-of-type');
|
|
10607
10594
|
// The height must start from the height of the header. BUT not on Safari.
|
|
10608
10595
|
// Safari handles the sticky position on the tables in a different way, making it start from the tbody element
|
|
10609
10596
|
// and not on the table with a specified position of sticky. There fore in that case we must set initial height to 0.
|
|
10610
|
-
let previousHeight = !__classPrivateFieldGet$
|
|
10611
|
-
? __classPrivateFieldGet$
|
|
10597
|
+
let previousHeight = !__classPrivateFieldGet$3(this, _KupDataTable_isSafariBrowser, "f")
|
|
10598
|
+
? __classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").querySelector('thead > tr:first-of-type > th:first-of-type').getBoundingClientRect().height // [ffbf]
|
|
10612
10599
|
: 0;
|
|
10613
10600
|
// [CSSCount] - I must start from 1 since we are referencing html elements e not array (with CSS selectors starting from 1)
|
|
10614
10601
|
for (let i = 1; i <= this.fixedRows && currentRow; i++) {
|
|
10615
|
-
__classPrivateFieldGet$
|
|
10602
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f").style.setProperty(FixedCellsCSSVarsBase.rows + i, previousHeight + 'px');
|
|
10616
10603
|
previousHeight += currentRow.children[0].getBoundingClientRect().height; // [ffbf]
|
|
10617
10604
|
currentRow =
|
|
10618
10605
|
currentRow.nextElementSibling;
|
|
@@ -10620,14 +10607,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10620
10607
|
toRet = true;
|
|
10621
10608
|
}
|
|
10622
10609
|
if (this.fixedColumns >= 1) {
|
|
10623
|
-
let currentCell = __classPrivateFieldGet$
|
|
10610
|
+
let currentCell = __classPrivateFieldGet$3(this, _KupDataTable_tableRef, "f").querySelector('tbody > tr:first-of-type > td:first-of-type');
|
|
10624
10611
|
let previousWidth = 0;
|
|
10625
10612
|
const totalFixedColumns = this.fixedColumns +
|
|
10626
|
-
(__classPrivateFieldGet$
|
|
10613
|
+
(__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this) ? 1 : 0) +
|
|
10627
10614
|
(this.selection === SelectionMode.MULTIPLE_CHECKBOX ? 1 : 0);
|
|
10628
10615
|
// @See [CSSCount]
|
|
10629
10616
|
for (let i = 1; i <= totalFixedColumns && currentCell; i++) {
|
|
10630
|
-
__classPrivateFieldGet$
|
|
10617
|
+
__classPrivateFieldGet$3(this, _KupDataTable_tableAreaRef, "f").style.setProperty(FixedCellsCSSVarsBase.columns + i, previousWidth + 'px');
|
|
10631
10618
|
previousWidth += currentCell.getBoundingClientRect().width; // [ffbf]
|
|
10632
10619
|
currentCell =
|
|
10633
10620
|
currentCell.nextElementSibling;
|
|
@@ -10675,10 +10662,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10675
10662
|
// resetting current page
|
|
10676
10663
|
this.resetCurrentPage();
|
|
10677
10664
|
const newFilters = Object.assign({}, this.filters);
|
|
10678
|
-
__classPrivateFieldGet$
|
|
10665
|
+
__classPrivateFieldGet$3(this, _KupDataTable_filtersColumnMenuInstance, "f").removeFilter(newFilters, column.name);
|
|
10679
10666
|
this.filters = newFilters;
|
|
10680
10667
|
}, _KupDataTable_getFilterValueForTooltip = function _KupDataTable_getFilterValueForTooltip(column) {
|
|
10681
|
-
return __classPrivateFieldGet$
|
|
10668
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_filtersColumnMenuInstance, "f").getFilterValueForTooltip(this.filters, column);
|
|
10682
10669
|
}, _KupDataTable_onGlobalFilterChange = function _KupDataTable_onGlobalFilterChange(inputEl) {
|
|
10683
10670
|
this.resetCurrentPage();
|
|
10684
10671
|
if (inputEl) {
|
|
@@ -10689,15 +10676,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10689
10676
|
this.globalFilterValue = '';
|
|
10690
10677
|
}
|
|
10691
10678
|
}, _KupDataTable_handlePageChange = function _KupDataTable_handlePageChange(pageNumber) {
|
|
10692
|
-
const newPage = pageChange(pageNumber, __classPrivateFieldGet$
|
|
10679
|
+
const newPage = pageChange(pageNumber, __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f"), this.currentRowsPerPage);
|
|
10693
10680
|
if (newPage) {
|
|
10694
10681
|
this.currentPage = newPage;
|
|
10695
10682
|
}
|
|
10696
10683
|
}, _KupDataTable_handleRowsPerPageChange = function _KupDataTable_handleRowsPerPageChange(rowsNumber) {
|
|
10697
|
-
const newRows = rowsPerPageChange(rowsNumber, __classPrivateFieldGet$
|
|
10684
|
+
const newRows = rowsPerPageChange(rowsNumber, __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f"));
|
|
10698
10685
|
if (newRows) {
|
|
10699
10686
|
this.currentRowsPerPage = newRows;
|
|
10700
|
-
__classPrivateFieldGet$
|
|
10687
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_adjustPaginator).call(this);
|
|
10701
10688
|
}
|
|
10702
10689
|
}, _KupDataTable_onRowClick = function _KupDataTable_onRowClick(row, td, emitEvent) {
|
|
10703
10690
|
// selecting row
|
|
@@ -10727,9 +10714,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10727
10714
|
if (!row.unselectable &&
|
|
10728
10715
|
this.selection !== SelectionMode.NONE &&
|
|
10729
10716
|
clickedColumn) {
|
|
10730
|
-
__classPrivateFieldGet$
|
|
10717
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_deselectColumn).call(this, this.selectedColumn);
|
|
10731
10718
|
this.selectedColumn = clickedColumn;
|
|
10732
|
-
__classPrivateFieldGet$
|
|
10719
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_selectColumn).call(this, this.selectedColumn);
|
|
10733
10720
|
if (emitEvent !== false) {
|
|
10734
10721
|
// emit event
|
|
10735
10722
|
this.kupRowSelected.emit({
|
|
@@ -10804,7 +10791,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10804
10791
|
}, _KupDataTable_onSelectAll = function _KupDataTable_onSelectAll({ target }) {
|
|
10805
10792
|
if (target.checked) {
|
|
10806
10793
|
// select all rows
|
|
10807
|
-
this.selectedRows = __classPrivateFieldGet$
|
|
10794
|
+
this.selectedRows = __classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f");
|
|
10808
10795
|
// triggering event
|
|
10809
10796
|
this.kupRowSelected.emit({
|
|
10810
10797
|
comp: this,
|
|
@@ -10816,21 +10803,21 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10816
10803
|
}
|
|
10817
10804
|
else {
|
|
10818
10805
|
// deselect all rows
|
|
10819
|
-
__classPrivateFieldGet$
|
|
10806
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_resetSelectedRows).call(this);
|
|
10820
10807
|
}
|
|
10821
10808
|
}, _KupDataTable_openTotalMenu = function _KupDataTable_openTotalMenu(column) {
|
|
10822
10809
|
this.openedTotalMenu = column.name;
|
|
10823
10810
|
}, _KupDataTable_closeTotalMenu = function _KupDataTable_closeTotalMenu() {
|
|
10824
10811
|
this.openedTotalMenu = null;
|
|
10825
|
-
__classPrivateFieldGet$
|
|
10812
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCb, "f"));
|
|
10826
10813
|
}, _KupDataTable_isOpenedTotalMenuForColumn = function _KupDataTable_isOpenedTotalMenuForColumn(column) {
|
|
10827
10814
|
return this.openedTotalMenu === column;
|
|
10828
10815
|
}, _KupDataTable_groupRows = function _KupDataTable_groupRows() {
|
|
10829
|
-
if (!__classPrivateFieldGet$
|
|
10816
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this)) {
|
|
10830
10817
|
return;
|
|
10831
10818
|
}
|
|
10832
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rows, groupRows(this.getColumns(), __classPrivateFieldGet$
|
|
10833
|
-
__classPrivateFieldGet$
|
|
10819
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rows, groupRows(this.getColumns(), __classPrivateFieldGet$3(this, _KupDataTable_rows, "f"), this.groups, this.totals), "f");
|
|
10820
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupState).call(this);
|
|
10834
10821
|
}, _KupDataTable_onLoadMoreClick = function _KupDataTable_onLoadMoreClick() {
|
|
10835
10822
|
var _a;
|
|
10836
10823
|
let loadItems = 0;
|
|
@@ -10840,11 +10827,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10840
10827
|
break;
|
|
10841
10828
|
case LoadMoreMode.CONSTANT_INCREMENT:
|
|
10842
10829
|
loadItems =
|
|
10843
|
-
this.loadMoreStep * (__classPrivateFieldGet$
|
|
10830
|
+
this.loadMoreStep * (__classPrivateFieldGet$3(this, _KupDataTable_loadMoreEventCounter, "f") + 1);
|
|
10844
10831
|
break;
|
|
10845
10832
|
case LoadMoreMode.PROGRESSIVE_THRESHOLD:
|
|
10846
10833
|
loadItems =
|
|
10847
|
-
Math.max(__classPrivateFieldGet$
|
|
10834
|
+
Math.max(__classPrivateFieldGet$3(this, _KupDataTable_loadMoreEventPreviousQuantity, "f"), this.loadMoreStep) * Math.min(__classPrivateFieldGet$3(this, _KupDataTable_loadMoreEventCounter, "f") + 1, 2);
|
|
10848
10835
|
break;
|
|
10849
10836
|
}
|
|
10850
10837
|
if (loadItems > this.loadMoreLimit) {
|
|
@@ -10856,15 +10843,15 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10856
10843
|
loadItems: loadItems,
|
|
10857
10844
|
});
|
|
10858
10845
|
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventPreviousQuantity, loadItems, "f");
|
|
10859
|
-
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventCounter, (_a = __classPrivateFieldGet$
|
|
10846
|
+
__classPrivateFieldSet$2(this, _KupDataTable_loadMoreEventCounter, (_a = __classPrivateFieldGet$3(this, _KupDataTable_loadMoreEventCounter, "f"), _a++, _a), "f");
|
|
10860
10847
|
}, _KupDataTable_adjustGroupState = function _KupDataTable_adjustGroupState() {
|
|
10861
|
-
if (!__classPrivateFieldGet$
|
|
10862
|
-
__classPrivateFieldGet$
|
|
10863
|
-
!__classPrivateFieldGet$
|
|
10848
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_rows, "f") ||
|
|
10849
|
+
__classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f") === 0 ||
|
|
10850
|
+
!__classPrivateFieldGet$3(this, _KupDataTable_rows, "f")[0].hasOwnProperty('group')) {
|
|
10864
10851
|
// no grouping
|
|
10865
10852
|
return;
|
|
10866
10853
|
}
|
|
10867
|
-
__classPrivateFieldGet$
|
|
10854
|
+
__classPrivateFieldGet$3(this, _KupDataTable_rows, "f").forEach((r) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupStateFromRow).call(this, r));
|
|
10868
10855
|
}, _KupDataTable_adjustGroupStateFromRow = function _KupDataTable_adjustGroupStateFromRow(row) {
|
|
10869
10856
|
if (!row || !row.hasOwnProperty('group')) {
|
|
10870
10857
|
// not a groping row, nothing to do
|
|
@@ -10881,9 +10868,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10881
10868
|
// update expanded
|
|
10882
10869
|
group.expanded = groupFromState.expanded;
|
|
10883
10870
|
}
|
|
10884
|
-
group.children.forEach((child) => __classPrivateFieldGet$
|
|
10871
|
+
group.children.forEach((child) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_adjustGroupStateFromRow).call(this, child));
|
|
10885
10872
|
}, _KupDataTable_sortRows = function _KupDataTable_sortRows() {
|
|
10886
|
-
__classPrivateFieldSet$2(this, _KupDataTable_rows, sortRows(__classPrivateFieldGet$
|
|
10873
|
+
__classPrivateFieldSet$2(this, _KupDataTable_rows, sortRows(__classPrivateFieldGet$3(this, _KupDataTable_rows, "f"), this.sort), "f");
|
|
10887
10874
|
}, _KupDataTable_getSortIcon = function _KupDataTable_getSortIcon(columnName) {
|
|
10888
10875
|
// check if column in sort array
|
|
10889
10876
|
for (let sortObj of this.sort) {
|
|
@@ -10909,7 +10896,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10909
10896
|
if (this.selection === SelectionMode.MULTIPLE_CHECKBOX) {
|
|
10910
10897
|
colSpan += 1;
|
|
10911
10898
|
}
|
|
10912
|
-
if (__classPrivateFieldGet$
|
|
10899
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
10913
10900
|
colSpan += 1;
|
|
10914
10901
|
}
|
|
10915
10902
|
return colSpan;
|
|
@@ -10939,7 +10926,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10939
10926
|
sourceColumn: this.data.columns[sortedColIndex],
|
|
10940
10927
|
targetColumn: this.data.columns[receivingColIndex],
|
|
10941
10928
|
});
|
|
10942
|
-
__classPrivateFieldGet$
|
|
10929
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_moveSortedColumns).call(this, this.data.columns, receivingColIndex, sortedColIndex);
|
|
10943
10930
|
}
|
|
10944
10931
|
}, _KupDataTable_moveSortedColumns = function _KupDataTable_moveSortedColumns(columns, receivingColumnIndex, sortedColumnIndex) {
|
|
10945
10932
|
const remove = columns.splice(sortedColumnIndex, 1);
|
|
@@ -10952,25 +10939,25 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10952
10939
|
.map((chunk, index) => (index !== 0 ? [h("br", null), chunk] : chunk));
|
|
10953
10940
|
}, _KupDataTable_composeHeaderCellClassAndStyle = function _KupDataTable_composeHeaderCellClassAndStyle(columnIndex, extraCells = 0, column) {
|
|
10954
10941
|
let columnClass = { ['header-cell']: true }, thStyle = column.style ? Object.assign({}, column.style) : {};
|
|
10955
|
-
if (__classPrivateFieldGet$
|
|
10956
|
-
__classPrivateFieldGet$
|
|
10957
|
-
__classPrivateFieldGet$
|
|
10958
|
-
__classPrivateFieldGet$
|
|
10959
|
-
__classPrivateFieldGet$
|
|
10960
|
-
__classPrivateFieldGet$
|
|
10961
|
-
__classPrivateFieldGet$
|
|
10962
|
-
__classPrivateFieldGet$
|
|
10963
|
-
__classPrivateFieldGet$
|
|
10942
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isBar(column.obj) ||
|
|
10943
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isButton(column.obj) ||
|
|
10944
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isChart(column.obj) ||
|
|
10945
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isCheckbox(column.obj) ||
|
|
10946
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isImage(column.obj) ||
|
|
10947
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isIcon(column.obj) ||
|
|
10948
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isProgressBar(column.obj) ||
|
|
10949
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isRadio(column.obj) ||
|
|
10950
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isVoCodver(column.obj)) {
|
|
10964
10951
|
columnClass['header-cell--centered'] = true;
|
|
10965
10952
|
}
|
|
10966
|
-
if (__classPrivateFieldGet$
|
|
10953
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isNumber(column.obj)) {
|
|
10967
10954
|
columnClass['header-cell--is-number'] = true;
|
|
10968
10955
|
}
|
|
10969
|
-
if (__classPrivateFieldGet$
|
|
10956
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isIcon(column.obj)) {
|
|
10970
10957
|
columnClass['header-cell--is-icon'] = true;
|
|
10971
10958
|
}
|
|
10972
10959
|
// For fixed cells styles and classes
|
|
10973
|
-
const fixedCellStyle = __classPrivateFieldGet$
|
|
10960
|
+
const fixedCellStyle = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, columnIndex + 1 + extraCells, 0, extraCells);
|
|
10974
10961
|
if (fixedCellStyle) {
|
|
10975
10962
|
columnClass = Object.assign(Object.assign({}, columnClass), fixedCellStyle.fixedCellClasses);
|
|
10976
10963
|
thStyle = Object.assign(Object.assign({}, thStyle), fixedCellStyle.fixedCellStyle);
|
|
@@ -10985,24 +10972,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
10985
10972
|
let multiSelectColumn = null;
|
|
10986
10973
|
if (this.selection === SelectionMode.MULTIPLE_CHECKBOX) {
|
|
10987
10974
|
specialExtraCellsCount++;
|
|
10988
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
10975
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
10989
10976
|
const style = Object.assign({ width: '30px', margin: '0 auto' }, (selectionStyleAndClass
|
|
10990
10977
|
? selectionStyleAndClass.fixedCellStyle
|
|
10991
10978
|
: {}));
|
|
10992
10979
|
multiSelectColumn = (h("th", { class: selectionStyleAndClass
|
|
10993
10980
|
? selectionStyleAndClass.fixedCellClasses
|
|
10994
|
-
: {}, style: style }, h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$
|
|
10981
|
+
: {}, style: style }, h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onSelectAll).call(this, e), title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageRow.SELECTED) +
|
|
10995
10982
|
`: ${this.selectedRows.length},` +
|
|
10996
|
-
__classPrivateFieldGet$
|
|
10997
|
-
`: ${__classPrivateFieldGet$
|
|
10983
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageRow.RENDERED) +
|
|
10984
|
+
`: ${__classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f").length}`, checked: this.selectedRows.length > 0 &&
|
|
10998
10985
|
this.selectedRows.length ===
|
|
10999
|
-
__classPrivateFieldGet$
|
|
10986
|
+
__classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f").length })));
|
|
11000
10987
|
}
|
|
11001
10988
|
// Renders action column
|
|
11002
10989
|
let actionsColumn = null;
|
|
11003
|
-
if (__classPrivateFieldGet$
|
|
10990
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11004
10991
|
specialExtraCellsCount++;
|
|
11005
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
10992
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
11006
10993
|
actionsColumn = (h("th", { class: selectionStyleAndClass
|
|
11007
10994
|
? selectionStyleAndClass.fixedCellClasses
|
|
11008
10995
|
: {}, style: selectionStyleAndClass
|
|
@@ -11011,26 +10998,26 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11011
10998
|
}
|
|
11012
10999
|
// Renders normal cells
|
|
11013
11000
|
const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
|
|
11014
|
-
const { columnClass, thStyle } = __classPrivateFieldGet$
|
|
11001
|
+
const { columnClass, thStyle } = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeHeaderCellClassAndStyle).call(this, columnIndex, specialExtraCellsCount, column);
|
|
11015
11002
|
let filter = null;
|
|
11016
|
-
if (__classPrivateFieldGet$
|
|
11017
|
-
const svgLabel = __classPrivateFieldGet$
|
|
11003
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_filtersColumnMenuInstance, "f").hasFiltersForColumn(this.filters, column)) {
|
|
11004
|
+
const svgLabel = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.REMOVE_FILTERS) + `: '${__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getFilterValueForTooltip).call(this, column)}'`;
|
|
11018
11005
|
filter = (h("span", { title: svgLabel, class: `kup-icon ${KupThemeIconValues.FILTER_REMOVE.replace('--', '')}` }));
|
|
11019
11006
|
}
|
|
11020
11007
|
let sortIcon = null;
|
|
11021
|
-
let iconClass = __classPrivateFieldGet$
|
|
11008
|
+
let iconClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getSortIcon).call(this, column.name);
|
|
11022
11009
|
if (iconClass !== '') {
|
|
11023
|
-
sortIcon = (h("span", { class: iconClass, title: __classPrivateFieldGet$
|
|
11010
|
+
sortIcon = (h("span", { class: iconClass, title: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getSortDecode).call(this, column.name) }));
|
|
11024
11011
|
}
|
|
11025
11012
|
columnClass['header-cell--sortable'] = true;
|
|
11026
11013
|
let keyIcon = null;
|
|
11027
11014
|
if (column.isKey) {
|
|
11028
|
-
keyIcon = (h("span", { class: `kup-icon ${KupThemeIconValues.KEY.replace('--', '')}`, title: __classPrivateFieldGet$
|
|
11015
|
+
keyIcon = (h("span", { class: `kup-icon ${KupThemeIconValues.KEY.replace('--', '')}`, title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageRow.KEY) }));
|
|
11029
11016
|
}
|
|
11030
11017
|
// Sets custom columns width
|
|
11031
|
-
if (__classPrivateFieldGet$
|
|
11032
|
-
for (let i = 0; i < __classPrivateFieldGet$
|
|
11033
|
-
const currentCol = __classPrivateFieldGet$
|
|
11018
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")) {
|
|
11019
|
+
for (let i = 0; i < __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f").length; i++) {
|
|
11020
|
+
const currentCol = __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")[i];
|
|
11034
11021
|
if (currentCol.name === column.name) {
|
|
11035
11022
|
const width = currentCol.size + '';
|
|
11036
11023
|
if (width.indexOf('ch') < 1) {
|
|
@@ -11043,7 +11030,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11043
11030
|
}
|
|
11044
11031
|
}
|
|
11045
11032
|
}
|
|
11046
|
-
return (h("th", { ref: (el) => __classPrivateFieldGet$
|
|
11033
|
+
return (h("th", { ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_thRefs, "f").push(el), "data-cell": column, "data-column": column.name, class: columnClass, style: thStyle, title: column.name }, h("div", { class: "header-cell__content" }, h("span", { class: "header-cell__title" }, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_applyLineBreaks).call(this, column.title)), h("span", { class: "header-cell__icons" }, keyIcon, sortIcon, filter)), this.resizableColumns ? (h("span", { class: "header-cell__drag-handler" })) : null));
|
|
11047
11034
|
});
|
|
11048
11035
|
return [multiSelectColumn, actionsColumn, ...dataColumns];
|
|
11049
11036
|
// return [multiSelectColumn, groupColumn, actionsColumn, ...dataColumns];
|
|
@@ -11052,24 +11039,24 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11052
11039
|
let multiSelectColumn = null;
|
|
11053
11040
|
if (this.selection === SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11054
11041
|
specialExtraCellsCount++;
|
|
11055
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
11042
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
11056
11043
|
const style = Object.assign({ width: '30px', margin: '0 auto' }, (selectionStyleAndClass
|
|
11057
11044
|
? selectionStyleAndClass.fixedCellStyle
|
|
11058
11045
|
: {}));
|
|
11059
11046
|
multiSelectColumn = (h("th-sticky", { class: selectionStyleAndClass
|
|
11060
11047
|
? selectionStyleAndClass.fixedCellClasses
|
|
11061
|
-
: null, style: style }, h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$
|
|
11048
|
+
: null, style: style }, h("kup-checkbox", { "onkup-checkbox-change": (e) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onSelectAll).call(this, e), title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageRow.SELECTED) +
|
|
11062
11049
|
`: ${this.selectedRows.length},` +
|
|
11063
|
-
__classPrivateFieldGet$
|
|
11064
|
-
`: ${__classPrivateFieldGet$
|
|
11050
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageRow.RENDERED) +
|
|
11051
|
+
`: ${__classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f").length}`, checked: this.selectedRows.length > 0 &&
|
|
11065
11052
|
this.selectedRows.length ===
|
|
11066
|
-
__classPrivateFieldGet$
|
|
11053
|
+
__classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f").length })));
|
|
11067
11054
|
}
|
|
11068
11055
|
// Empty cell for the actions
|
|
11069
11056
|
let actionsColumn = null;
|
|
11070
|
-
if (__classPrivateFieldGet$
|
|
11057
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11071
11058
|
specialExtraCellsCount++;
|
|
11072
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
11059
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, 0, specialExtraCellsCount - 1);
|
|
11073
11060
|
actionsColumn = (h("th-sticky", { class: selectionStyleAndClass
|
|
11074
11061
|
? selectionStyleAndClass.fixedCellClasses
|
|
11075
11062
|
: null, style: selectionStyleAndClass
|
|
@@ -11078,29 +11065,29 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11078
11065
|
}
|
|
11079
11066
|
// Composes normal header cells
|
|
11080
11067
|
const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
|
|
11081
|
-
const { columnClass, thStyle } = __classPrivateFieldGet$
|
|
11082
|
-
return (h("th-sticky", { class: columnClass, style: thStyle }, h("div", { class: "header-cell__content" }, h("span", { class: "header-cell__title" }, __classPrivateFieldGet$
|
|
11068
|
+
const { columnClass, thStyle } = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeHeaderCellClassAndStyle).call(this, columnIndex, specialExtraCellsCount, column);
|
|
11069
|
+
return (h("th-sticky", { class: columnClass, style: thStyle }, h("div", { class: "header-cell__content" }, h("span", { class: "header-cell__title" }, __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_applyLineBreaks).call(this, column.title)))));
|
|
11083
11070
|
});
|
|
11084
11071
|
return [multiSelectColumn, actionsColumn, ...dataColumns];
|
|
11085
11072
|
}, _KupDataTable_totalMenuPosition = function _KupDataTable_totalMenuPosition() {
|
|
11086
11073
|
if (this.rootElement.shadowRoot) {
|
|
11087
11074
|
const menu = this.rootElement.shadowRoot.querySelector('#totals-menu');
|
|
11088
11075
|
if (menu) {
|
|
11089
|
-
__classPrivateFieldGet$
|
|
11076
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.register(menu, __classPrivateFieldGet$3(this, _KupDataTable_totalMenuCoords, "f"));
|
|
11090
11077
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCb, {
|
|
11091
11078
|
cb: () => {
|
|
11092
|
-
__classPrivateFieldGet$
|
|
11079
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
11093
11080
|
},
|
|
11094
11081
|
el: menu,
|
|
11095
11082
|
}, "f");
|
|
11096
|
-
__classPrivateFieldGet$
|
|
11097
|
-
__classPrivateFieldGet$
|
|
11083
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCb, "f"), true);
|
|
11084
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.start(menu);
|
|
11098
11085
|
menu.menuVisible = true;
|
|
11099
11086
|
}
|
|
11100
11087
|
}
|
|
11101
11088
|
}, _KupDataTable_onTotalMenuOpen = function _KupDataTable_onTotalMenuOpen(column) {
|
|
11102
|
-
__classPrivateFieldGet$
|
|
11103
|
-
__classPrivateFieldGet$
|
|
11089
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeTotalMenu).call(this);
|
|
11090
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_openTotalMenu).call(this, column);
|
|
11104
11091
|
}, _KupDataTable_renderRow = function _KupDataTable_renderRow(row, level = 0, rowCssIndex = 0, previousRow) {
|
|
11105
11092
|
const visibleColumns = this.getVisibleColumns();
|
|
11106
11093
|
let rowActionsCount = 0;
|
|
@@ -11132,17 +11119,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11132
11119
|
for (let i = 0; i < level; i++) {
|
|
11133
11120
|
indent.push(h("span", { class: "indent" }));
|
|
11134
11121
|
}
|
|
11135
|
-
if (__classPrivateFieldGet$
|
|
11122
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasTotals).call(this)) {
|
|
11136
11123
|
//const colSpan = this.multiSelection ? 2 : 1;
|
|
11137
11124
|
const cells = [];
|
|
11138
|
-
if (__classPrivateFieldGet$
|
|
11125
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11139
11126
|
cells.push(h("td", null));
|
|
11140
11127
|
}
|
|
11141
11128
|
if (this.selection === SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11142
11129
|
cells.push(h("td", null));
|
|
11143
11130
|
}
|
|
11144
11131
|
// adding 'grouping' cell
|
|
11145
|
-
const grouplabelcell = (h("td", { colSpan: __classPrivateFieldGet$
|
|
11132
|
+
const grouplabelcell = (h("td", { colSpan: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, h("span", { class: "group-cell-content" }, indent, h("span", { class: iconClass }), h("span", { class: "text" }, composedGroupLabel))));
|
|
11146
11133
|
// adding 'totals grouping' cells
|
|
11147
11134
|
for (let column of visibleColumns) {
|
|
11148
11135
|
let totalClass = 'total';
|
|
@@ -11157,11 +11144,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11157
11144
|
value = totalValue;
|
|
11158
11145
|
}
|
|
11159
11146
|
else {
|
|
11160
|
-
if (__classPrivateFieldGet$
|
|
11147
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").objects.isDate(column.obj)) {
|
|
11161
11148
|
if (totalValue) {
|
|
11162
|
-
if (__classPrivateFieldGet$
|
|
11149
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dates.isValid(totalValue, KupDatesFormats.ISO_DATE)) {
|
|
11163
11150
|
value =
|
|
11164
|
-
__classPrivateFieldGet$
|
|
11151
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dates.format(totalValue);
|
|
11165
11152
|
}
|
|
11166
11153
|
else {
|
|
11167
11154
|
console.warn(`invalid date: ${totalValue}`);
|
|
@@ -11174,18 +11161,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11174
11161
|
}
|
|
11175
11162
|
cells.push(h("td", { class: totalClass }, value));
|
|
11176
11163
|
}
|
|
11177
|
-
jsxRows.push(h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11178
|
-
jsxRows.push(h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11164
|
+
jsxRows.push(h("tr", { ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group group-label" }, grouplabelcell));
|
|
11165
|
+
jsxRows.push(h("tr", { ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group group-total" }, cells));
|
|
11179
11166
|
}
|
|
11180
11167
|
else {
|
|
11181
|
-
jsxRows.push(h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11168
|
+
jsxRows.push(h("tr", { ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: "group" }, h("td", { colSpan: __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, h("span", { class: "group-cell-content" }, indent, h("span", { class: iconClass }), h("span", { class: "text" }, composedGroupLabel)))));
|
|
11182
11169
|
}
|
|
11183
11170
|
// if group is expanded, add children
|
|
11184
|
-
if (__classPrivateFieldGet$
|
|
11171
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_isGroupExpanded).call(this, row)) {
|
|
11185
11172
|
row.group.children
|
|
11186
11173
|
// We must pass the previous element of the array to check if we must hide or display the value of the cell
|
|
11187
11174
|
// When the column has specified the parameter hideValuesRepetitions
|
|
11188
|
-
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$
|
|
11175
|
+
.map((row, groupRowIndex, currentArray) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderRow).call(this, row, level + 1, groupRowIndex, groupRowIndex > 0
|
|
11189
11176
|
? currentArray[groupRowIndex - 1]
|
|
11190
11177
|
: undefined))
|
|
11191
11178
|
.forEach((jsxRow) => {
|
|
@@ -11212,11 +11199,11 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11212
11199
|
let selectRowCell = null;
|
|
11213
11200
|
if (this.selection === SelectionMode.MULTIPLE_CHECKBOX) {
|
|
11214
11201
|
specialExtraCellsCount++;
|
|
11215
|
-
const selectionStyleAndClass = __classPrivateFieldGet$
|
|
11202
|
+
const selectionStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, rowCssIndex, specialExtraCellsCount - 1);
|
|
11216
11203
|
const props = {
|
|
11217
11204
|
checked: this.selectedRows.includes(row),
|
|
11218
11205
|
onChange: () => {
|
|
11219
|
-
__classPrivateFieldGet$
|
|
11206
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handleRowSelect).call(this, row);
|
|
11220
11207
|
},
|
|
11221
11208
|
};
|
|
11222
11209
|
selectRowCell = (h("td", { "row-select-cell": true, class: selectionStyleAndClass
|
|
@@ -11228,18 +11215,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11228
11215
|
// Renders action cell
|
|
11229
11216
|
// If active, this can be either the first or second cell
|
|
11230
11217
|
let rowActionsCell = null;
|
|
11231
|
-
if (__classPrivateFieldGet$
|
|
11218
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_hasRowActions).call(this)) {
|
|
11232
11219
|
// Increments
|
|
11233
11220
|
specialExtraCellsCount++;
|
|
11234
|
-
const actionsStyleAndClass = __classPrivateFieldGet$
|
|
11221
|
+
const actionsStyleAndClass = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, specialExtraCellsCount, rowCssIndex, specialExtraCellsCount - 1);
|
|
11235
11222
|
rowActionsCount += this.rowActions.length;
|
|
11236
|
-
const defaultRowActions = __classPrivateFieldGet$
|
|
11223
|
+
const defaultRowActions = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderActions).call(this, this.rowActions, row, 'default');
|
|
11237
11224
|
let rowActionExpander = null;
|
|
11238
11225
|
let variableActions = null;
|
|
11239
11226
|
if (row.actions) {
|
|
11240
11227
|
rowActionsCount += row.actions.length;
|
|
11241
11228
|
// adding variable actions
|
|
11242
|
-
variableActions = __classPrivateFieldGet$
|
|
11229
|
+
variableActions = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_renderActions).call(this, row.actions, row, 'variable');
|
|
11243
11230
|
}
|
|
11244
11231
|
else {
|
|
11245
11232
|
// adding expander
|
|
@@ -11248,10 +11235,10 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11248
11235
|
resource: 'chevron-right',
|
|
11249
11236
|
sizeX: '1.5em',
|
|
11250
11237
|
sizeY: '1.5em',
|
|
11251
|
-
title: __classPrivateFieldGet$
|
|
11238
|
+
title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.EXPAND),
|
|
11252
11239
|
wrapperClass: 'expander',
|
|
11253
11240
|
onClick: (e) => {
|
|
11254
|
-
__classPrivateFieldGet$
|
|
11241
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onRowActionExpanderClick).call(this, e, row);
|
|
11255
11242
|
},
|
|
11256
11243
|
};
|
|
11257
11244
|
rowActionsCount++;
|
|
@@ -11300,18 +11287,18 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11300
11287
|
let cellClass = null;
|
|
11301
11288
|
let cellStyle = Object.assign({}, cell.style);
|
|
11302
11289
|
//-- For fixed cells --
|
|
11303
|
-
const fixedStyles = __classPrivateFieldGet$
|
|
11290
|
+
const fixedStyles = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_composeFixedCellStyleAndClass).call(this, cellIndex + 1 + specialExtraCellsCount, rowCssIndex, specialExtraCellsCount);
|
|
11304
11291
|
if (fixedStyles) {
|
|
11305
11292
|
cellStyle = Object.assign(cellStyle ? cellStyle : {}, fixedStyles.fixedCellStyle);
|
|
11306
11293
|
cellClass = Object.assign(Object.assign({}, cellClass), fixedStyles.fixedCellClasses);
|
|
11307
11294
|
}
|
|
11308
11295
|
// Controls if there are columns with a specified width
|
|
11309
|
-
if (__classPrivateFieldGet$
|
|
11296
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")) {
|
|
11310
11297
|
let colWidth = '';
|
|
11311
11298
|
// Search if this column has a specified width
|
|
11312
|
-
for (let j = 0; j < __classPrivateFieldGet$
|
|
11313
|
-
if (name === __classPrivateFieldGet$
|
|
11314
|
-
colWidth = __classPrivateFieldGet$
|
|
11299
|
+
for (let j = 0; j < __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f").length; j++) {
|
|
11300
|
+
if (name === __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")[j].name) {
|
|
11301
|
+
colWidth = __classPrivateFieldGet$3(this, _KupDataTable_sizedColumns, "f")[j].size;
|
|
11315
11302
|
break;
|
|
11316
11303
|
}
|
|
11317
11304
|
}
|
|
@@ -11333,7 +11320,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11333
11320
|
return (h("td", Object.assign({ title: title, colSpan: cell.span && cell.span.col ? cell.span.col : null, rowSpan: cell.span && cell.span.row ? cell.span.row : null, "data-cell": cell, "data-column": name, "data-row": row, style: cellStyle, class: cellClass }, eventHandlers), jsxCell));
|
|
11334
11321
|
});
|
|
11335
11322
|
// adding row to rendered rows
|
|
11336
|
-
__classPrivateFieldGet$
|
|
11323
|
+
__classPrivateFieldGet$3(this, _KupDataTable_renderedRows, "f").push(row);
|
|
11337
11324
|
const rowClass = {
|
|
11338
11325
|
selected: this.selectedRows.includes(row),
|
|
11339
11326
|
};
|
|
@@ -11343,7 +11330,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11343
11330
|
const style = {
|
|
11344
11331
|
'--kup_datatable_row_actions': rowActionsCount,
|
|
11345
11332
|
};
|
|
11346
|
-
return (h("tr", { ref: (el) => __classPrivateFieldGet$
|
|
11333
|
+
return (h("tr", { ref: (el) => __classPrivateFieldGet$3(this, _KupDataTable_rowsRefs, "f").push(el), "data-row": row, class: rowClass, style: style }, selectRowCell, rowActionsCell, cells));
|
|
11347
11334
|
}
|
|
11348
11335
|
}, _KupDataTable_renderActions = function _KupDataTable_renderActions(actions, row, type) {
|
|
11349
11336
|
return actions.map((action, index) => {
|
|
@@ -11354,7 +11341,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11354
11341
|
sizeY: '1.5em',
|
|
11355
11342
|
title: action.text,
|
|
11356
11343
|
wrapperClass: 'action',
|
|
11357
|
-
onClick: () => __classPrivateFieldGet$
|
|
11344
|
+
onClick: () => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onDefaultRowActionClick).call(this, {
|
|
11358
11345
|
action,
|
|
11359
11346
|
row,
|
|
11360
11347
|
index,
|
|
@@ -11365,58 +11352,58 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11365
11352
|
});
|
|
11366
11353
|
}, _KupDataTable_onCustomSettingsClick = function _KupDataTable_onCustomSettingsClick() {
|
|
11367
11354
|
if (!this.openedCustomSettings) {
|
|
11368
|
-
__classPrivateFieldGet$
|
|
11355
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_openCustomSettings).call(this);
|
|
11369
11356
|
}
|
|
11370
11357
|
else {
|
|
11371
|
-
__classPrivateFieldGet$
|
|
11358
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeCustomSettings).call(this);
|
|
11372
11359
|
}
|
|
11373
11360
|
}, _KupDataTable_openCustomSettings = function _KupDataTable_openCustomSettings() {
|
|
11374
|
-
__classPrivateFieldGet$
|
|
11375
|
-
__classPrivateFieldGet$
|
|
11376
|
-
__classPrivateFieldGet$
|
|
11361
|
+
__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f").menuVisible = true;
|
|
11362
|
+
__classPrivateFieldGet$3(this, _KupDataTable_customizeTopButtonRef, "f").classList.add('toggled');
|
|
11363
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f"));
|
|
11377
11364
|
this.openedCustomSettings = true;
|
|
11378
|
-
if (!__classPrivateFieldGet$
|
|
11365
|
+
if (!__classPrivateFieldGet$3(this, _KupDataTable_clickCbCustomPanel, "f")) {
|
|
11379
11366
|
__classPrivateFieldSet$2(this, _KupDataTable_clickCbCustomPanel, {
|
|
11380
11367
|
cb: () => {
|
|
11381
|
-
__classPrivateFieldGet$
|
|
11368
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_closeCustomSettings).call(this);
|
|
11382
11369
|
},
|
|
11383
|
-
el: __classPrivateFieldGet$
|
|
11370
|
+
el: __classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f"),
|
|
11384
11371
|
}, "f");
|
|
11385
11372
|
}
|
|
11386
|
-
__classPrivateFieldGet$
|
|
11373
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").addClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCbCustomPanel, "f"), true);
|
|
11387
11374
|
}, _KupDataTable_closeCustomSettings = function _KupDataTable_closeCustomSettings() {
|
|
11388
|
-
__classPrivateFieldGet$
|
|
11389
|
-
if (__classPrivateFieldGet$
|
|
11375
|
+
__classPrivateFieldGet$3(this, _KupDataTable_customizeTopButtonRef, "f").classList.remove('toggled');
|
|
11376
|
+
if (__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f") == null) {
|
|
11390
11377
|
return;
|
|
11391
11378
|
}
|
|
11392
|
-
__classPrivateFieldGet$
|
|
11379
|
+
__classPrivateFieldGet$3(this, _KupDataTable_customizeTopPanelRef, "f").menuVisible = false;
|
|
11393
11380
|
this.openedCustomSettings = false;
|
|
11394
|
-
__classPrivateFieldGet$
|
|
11381
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").removeClickCallback(__classPrivateFieldGet$3(this, _KupDataTable_clickCbCustomPanel, "f"));
|
|
11395
11382
|
}, _KupDataTable_renderPaginator = function _KupDataTable_renderPaginator(top) {
|
|
11396
11383
|
return (h("div", { class: "paginator-wrapper" }, h("div", { class: "paginator-tabs" }, this.showLoadMore ||
|
|
11397
11384
|
(!this.lazyLoadRows &&
|
|
11398
|
-
__classPrivateFieldGet$
|
|
11385
|
+
__classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f") > this.rowsPerPage) ? (h(FPaginator, { id: top ? 'top-paginator' : 'bottom-paginator', currentPage: this.currentPage, max: __classPrivateFieldGet$3(this, _KupDataTable_rowsLength, "f"), perPage: this.currentRowsPerPage
|
|
11399
11386
|
? this.currentRowsPerPage
|
|
11400
11387
|
: this.rowsPerPage, onLoadMore: this.showLoadMore
|
|
11401
11388
|
? () => {
|
|
11402
|
-
__classPrivateFieldGet$
|
|
11389
|
+
__classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_onLoadMoreClick).call(this);
|
|
11403
11390
|
}
|
|
11404
|
-
: null, onNextPage: () => __classPrivateFieldGet$
|
|
11391
|
+
: null, onNextPage: () => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, this.currentPage + 1), onPrevPage: () => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, this.currentPage - 1), onPageChange: (e) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handlePageChange).call(this, e.detail.value), onRowsChange: (e) => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_handleRowsPerPageChange).call(this, e.detail.value) })) : null)));
|
|
11405
11392
|
}, _KupDataTable_columnRemoveArea = function _KupDataTable_columnRemoveArea() {
|
|
11406
11393
|
return (h("div", { class: "droparea__remove", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_removeDropareaRef, el, "f")) }, h(FImage, { resource: "delete", color: `var(${KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" }), h(FImage, { resource: "delete-empty", color: `var(${KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" })));
|
|
11407
11394
|
}, _KupDataTable_columnGroupArea = function _KupDataTable_columnGroupArea() {
|
|
11408
11395
|
return (h("div", { class: "droparea__groups", ref: (el) => (__classPrivateFieldSet$2(this, _KupDataTable_groupsDropareaRef, el, "f")) }, h(FImage, { resource: "bookmark", color: `var(${KupThemeColorValues.TEXT})`, sizeX: "30px", sizeY: "50px" }), h(FImage, { resource: "book", color: `var(${KupThemeColorValues.TEXT})`, sizeX: "30px", sizeY: "50px" })));
|
|
11409
11396
|
}, _KupDataTable_hideShowColumnDropArea = function _KupDataTable_hideShowColumnDropArea(show, th) {
|
|
11410
11397
|
if (show && th && (this.removableColumns || this.showGroups)) {
|
|
11411
|
-
__classPrivateFieldGet$
|
|
11412
|
-
__classPrivateFieldGet$
|
|
11413
|
-
__classPrivateFieldGet$
|
|
11414
|
-
__classPrivateFieldGet$
|
|
11415
|
-
th.clientWidth / 2 - __classPrivateFieldGet$
|
|
11398
|
+
__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f").classList.add('droparea--visible');
|
|
11399
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f"), th, 10, KupDynamicPositionPlacement.TOP);
|
|
11400
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f"));
|
|
11401
|
+
__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f").style.marginLeft =
|
|
11402
|
+
th.clientWidth / 2 - __classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f").clientWidth / 2 + 'px';
|
|
11416
11403
|
}
|
|
11417
11404
|
else {
|
|
11418
|
-
__classPrivateFieldGet$
|
|
11419
|
-
+__classPrivateFieldGet$
|
|
11405
|
+
__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f").classList.remove('droparea--visible');
|
|
11406
|
+
+__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$3(this, _KupDataTable_dropareaRef, "f"));
|
|
11420
11407
|
}
|
|
11421
11408
|
}, _KupDataTable_handleColumnGroup = function _KupDataTable_handleColumnGroup(column2group) {
|
|
11422
11409
|
// Get sorted column current position
|
|
@@ -11484,19 +11471,19 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11484
11471
|
icon: icons[i],
|
|
11485
11472
|
id: codes[i],
|
|
11486
11473
|
selected: selectedCode == codes[i],
|
|
11487
|
-
value: __classPrivateFieldGet$
|
|
11474
|
+
value: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(value),
|
|
11488
11475
|
};
|
|
11489
11476
|
}
|
|
11490
11477
|
}
|
|
11491
11478
|
return listItems;
|
|
11492
11479
|
}, _KupDataTable_getFontSizeCodeFromDecode = function _KupDataTable_getFontSizeCodeFromDecode(decode) {
|
|
11493
|
-
return __classPrivateFieldGet$
|
|
11480
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$3(this, _KupDataTable_FONTSIZE_DECODES, "f"), __classPrivateFieldGet$3(this, _KupDataTable_FONTSIZE_CODES, "f"));
|
|
11494
11481
|
}, _KupDataTable_renderFontSizePanel = function _KupDataTable_renderFontSizePanel() {
|
|
11495
|
-
const listItems = __classPrivateFieldGet$
|
|
11482
|
+
const listItems = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, __classPrivateFieldGet$3(this, _KupDataTable_FONTSIZE_CODES, "f"), __classPrivateFieldGet$3(this, _KupDataTable_FONTSIZE_ICONS, "f"), this.fontsize);
|
|
11496
11483
|
const listData = { data: listItems, showIcons: true };
|
|
11497
11484
|
const textfieldData = {
|
|
11498
11485
|
trailingIcon: true,
|
|
11499
|
-
label: __classPrivateFieldGet$
|
|
11486
|
+
label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageFontsize.LABEL),
|
|
11500
11487
|
icon: 'arrow_drop_down',
|
|
11501
11488
|
};
|
|
11502
11489
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11513,22 +11500,22 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11513
11500
|
text = KupLanguageFontsize.SMALL;
|
|
11514
11501
|
break;
|
|
11515
11502
|
}
|
|
11516
|
-
return (h("div", { class: "customize-element fontsize-panel" }, h("kup-combobox", { isSelect: true, data: data, initialValue: __classPrivateFieldGet$
|
|
11503
|
+
return (h("div", { class: "customize-element fontsize-panel" }, h("kup-combobox", { isSelect: true, data: data, initialValue: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(text), "onkup-combobox-itemclick": (e) => {
|
|
11517
11504
|
e.stopPropagation();
|
|
11518
|
-
this.fontsize = __classPrivateFieldGet$
|
|
11505
|
+
this.fontsize = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getFontSizeCodeFromDecode).call(this, e.detail.node.id);
|
|
11519
11506
|
} })));
|
|
11520
11507
|
}, _KupDataTable_getDensityCodeFromDecode = function _KupDataTable_getDensityCodeFromDecode(decode) {
|
|
11521
|
-
return __classPrivateFieldGet$
|
|
11508
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$3(this, _KupDataTable_DENSITY_DECODES, "f"), [
|
|
11522
11509
|
'dense',
|
|
11523
11510
|
'medium',
|
|
11524
11511
|
'wide',
|
|
11525
11512
|
]);
|
|
11526
11513
|
}, _KupDataTable_renderDensityPanel = function _KupDataTable_renderDensityPanel() {
|
|
11527
|
-
const listItems = __classPrivateFieldGet$
|
|
11514
|
+
const listItems = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, ['dense', 'medium', 'wide'], __classPrivateFieldGet$3(this, _KupDataTable_DENSITY_ICONS, "f"), this.density);
|
|
11528
11515
|
const listData = { data: listItems, showIcons: true };
|
|
11529
11516
|
const textfieldData = {
|
|
11530
11517
|
trailingIcon: true,
|
|
11531
|
-
label: __classPrivateFieldGet$
|
|
11518
|
+
label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageDensity.LABEL),
|
|
11532
11519
|
icon: 'arrow_drop_down',
|
|
11533
11520
|
};
|
|
11534
11521
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11545,14 +11532,14 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11545
11532
|
text = KupLanguageDensity.WIDE;
|
|
11546
11533
|
break;
|
|
11547
11534
|
}
|
|
11548
|
-
return (h("div", { class: "customize-element density-panel" }, h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$
|
|
11535
|
+
return (h("div", { class: "customize-element density-panel" }, h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(text), selectMode: ItemsDisplayMode.DESCRIPTION, data: data, "onkup-combobox-itemclick": (e) => {
|
|
11549
11536
|
e.stopPropagation();
|
|
11550
|
-
this.density = __classPrivateFieldGet$
|
|
11537
|
+
this.density = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getDensityCodeFromDecode).call(this, e.detail.node.id);
|
|
11551
11538
|
} })));
|
|
11552
11539
|
}, _KupDataTable_getGridCodeFromDecode = function _KupDataTable_getGridCodeFromDecode(decode) {
|
|
11553
|
-
return __classPrivateFieldGet$
|
|
11540
|
+
return __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_transcodeItem).call(this, decode, __classPrivateFieldGet$3(this, _KupDataTable_GRID_DECODES, "f"), __classPrivateFieldGet$3(this, _KupDataTable_GRID_CODES, "f"));
|
|
11554
11541
|
}, _KupDataTable_renderTransposeSwitch = function _KupDataTable_renderTransposeSwitch() {
|
|
11555
|
-
return (h("div", { class: "customize-element grid-panel" }, h("kup-switch", { checked: this.transpose, label: __classPrivateFieldGet$
|
|
11542
|
+
return (h("div", { class: "customize-element grid-panel" }, h("kup-switch", { checked: this.transpose, label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.TRANSPOSE_DATA), leadingLabel: true, "onkup-switch-change": (e) => {
|
|
11556
11543
|
e.stopPropagation();
|
|
11557
11544
|
if (e.detail.value === 'on') {
|
|
11558
11545
|
this.transpose = true;
|
|
@@ -11562,16 +11549,16 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11562
11549
|
}
|
|
11563
11550
|
} })));
|
|
11564
11551
|
}, _KupDataTable_renderTotalsMatrix = function _KupDataTable_renderTotalsMatrix() {
|
|
11565
|
-
return (h("div", { class: "customize-element grid-panel" }, h("kup-button", { title: __classPrivateFieldGet$
|
|
11552
|
+
return (h("div", { class: "customize-element grid-panel" }, h("kup-button", { title: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.TOTALS_TABLE) +
|
|
11566
11553
|
' (' +
|
|
11567
|
-
__classPrivateFieldGet$
|
|
11568
|
-
')', label: __classPrivateFieldGet$
|
|
11554
|
+
__classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.EXPERIMENTAL_FEAT) +
|
|
11555
|
+
')', label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGeneric.TOTALS_TABLE), icon: "exposure", "onkup-button-click": () => __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_switchToTotalsMatrix).call(this) })));
|
|
11569
11556
|
}, _KupDataTable_renderGridPanel = function _KupDataTable_renderGridPanel() {
|
|
11570
|
-
const listItems = __classPrivateFieldGet$
|
|
11557
|
+
const listItems = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_createListData).call(this, __classPrivateFieldGet$3(this, _KupDataTable_GRID_CODES, "f"), __classPrivateFieldGet$3(this, _KupDataTable_GRID_ICONS, "f"), this.showGrid);
|
|
11571
11558
|
const listData = { data: listItems, showIcons: true };
|
|
11572
11559
|
const textfieldData = {
|
|
11573
11560
|
trailingIcon: true,
|
|
11574
|
-
label: __classPrivateFieldGet$
|
|
11561
|
+
label: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageGrid.LABEL),
|
|
11575
11562
|
icon: 'arrow_drop_down',
|
|
11576
11563
|
};
|
|
11577
11564
|
const data = { 'kup-text-field': textfieldData, 'kup-list': listData };
|
|
@@ -11591,9 +11578,9 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
11591
11578
|
text = KupLanguageGrid.ROW;
|
|
11592
11579
|
break;
|
|
11593
11580
|
}
|
|
11594
|
-
return (h("div", { class: "customize-element grid-panel" }, h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$
|
|
11581
|
+
return (h("div", { class: "customize-element grid-panel" }, h("kup-combobox", { isSelect: true, initialValue: __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").language.translate(text), data: data, "onkup-combobox-itemclick": (e) => {
|
|
11595
11582
|
e.stopPropagation();
|
|
11596
|
-
const grid = __classPrivateFieldGet$
|
|
11583
|
+
const grid = __classPrivateFieldGet$3(this, _KupDataTable_instances, "m", _KupDataTable_getGridCodeFromDecode).call(this, e.detail.value);
|
|
11597
11584
|
this.showGrid = grid;
|
|
11598
11585
|
} })));
|
|
11599
11586
|
};
|
|
@@ -11997,7 +11984,7 @@ var KupDialogProps;
|
|
|
11997
11984
|
|
|
11998
11985
|
const kupDialogCss = ":host{--kup_dialog_header_height:var(--kup-dialog-header-height, 2em);box-sizing:border-box;display:block;height:var(--kup_dialog_height);left:var(--kup_dialog_left);min-height:var(--kup_dialog_height);min-width:var(--kup_dialog_width);position:absolute;top:var(--kup_dialog_top);transition:opacity 0.25s ease-in;width:var(--kup_dialog_width)}#kup-component{height:100%;width:100%}[fade-in]{opacity:0}[fade-in] ::slotted{display:none}.header{background-color:var(--kup-title-background-color);color:var(--kup-title-color);display:flex;flex-direction:row;height:var(--kup_dialog_header_height);position:relative;width:100%}.header__title{font-weight:bold;line-height:2em;padding-left:0.5em;padding-right:2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header__close.f-image{--kup-icon-color:var(--kup-title-color);cursor:pointer;margin-right:0;transition:opacity 0.25s;position:absolute;right:0;background:var(--kup-title-background-color)}.header__close.f-image:hover{opacity:0.5}.content{height:calc(100% - var(--kup_dialog_header_height));overflow:auto;user-select:text}";
|
|
11999
11986
|
|
|
12000
|
-
var __classPrivateFieldGet$
|
|
11987
|
+
var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12001
11988
|
if (kind === "a" && !f)
|
|
12002
11989
|
throw new TypeError("Private accessor was defined without a getter");
|
|
12003
11990
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -12080,12 +12067,12 @@ const KupDialog = class {
|
|
|
12080
12067
|
/* L i f e c y c l e H o o k s */
|
|
12081
12068
|
/*-------------------------------------------------*/
|
|
12082
12069
|
componentWillLoad() {
|
|
12083
|
-
__classPrivateFieldGet$
|
|
12084
|
-
__classPrivateFieldGet$
|
|
12070
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").debug.logLoad(this, false);
|
|
12071
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").theme.register(this);
|
|
12085
12072
|
}
|
|
12086
12073
|
componentDidLoad() {
|
|
12087
12074
|
var _a;
|
|
12088
|
-
__classPrivateFieldGet$
|
|
12075
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").interact.dialogify(this.rootElement, __classPrivateFieldGet$2(this, _KupDialog_header, "f") ? __classPrivateFieldGet$2(this, _KupDialog_header, "f") : null, !this.resizable);
|
|
12089
12076
|
if ((_a = this.autoCenter) === null || _a === void 0 ? void 0 : _a.onReady) {
|
|
12090
12077
|
this.recalcPosition().then(() => {
|
|
12091
12078
|
this.rootElement.removeAttribute('fade-in');
|
|
@@ -12095,7 +12082,7 @@ const KupDialog = class {
|
|
|
12095
12082
|
this.rootElement.removeAttribute('fade-in');
|
|
12096
12083
|
}
|
|
12097
12084
|
if (this.modal) {
|
|
12098
|
-
__classPrivateFieldGet$
|
|
12085
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").interact.showModalBackdrop(this.modal.closeOnBackdropClick
|
|
12099
12086
|
? () => {
|
|
12100
12087
|
this.close();
|
|
12101
12088
|
}
|
|
@@ -12105,13 +12092,13 @@ const KupDialog = class {
|
|
|
12105
12092
|
comp: this,
|
|
12106
12093
|
id: this.rootElement.id,
|
|
12107
12094
|
});
|
|
12108
|
-
__classPrivateFieldGet$
|
|
12095
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").debug.logLoad(this, true);
|
|
12109
12096
|
}
|
|
12110
12097
|
componentWillRender() {
|
|
12111
|
-
__classPrivateFieldGet$
|
|
12098
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").debug.logRender(this, false);
|
|
12112
12099
|
}
|
|
12113
12100
|
componentDidRender() {
|
|
12114
|
-
__classPrivateFieldGet$
|
|
12101
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").debug.logRender(this, true);
|
|
12115
12102
|
}
|
|
12116
12103
|
render() {
|
|
12117
12104
|
var _a;
|
|
@@ -12119,13 +12106,13 @@ const KupDialog = class {
|
|
|
12119
12106
|
'--kup_dialog_height': this.sizeY ? this.sizeY : 'auto',
|
|
12120
12107
|
'--kup_dialog_width': this.sizeX ? this.sizeX : 'auto',
|
|
12121
12108
|
};
|
|
12122
|
-
return (h(Host, { "fade-in": true, style: style }, h("style", null, __classPrivateFieldGet$
|
|
12109
|
+
return (h(Host, { "fade-in": true, style: style }, h("style", null, __classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, this.header ? (h("div", { class: "header", ref: (el) => (__classPrivateFieldSet$1(this, _KupDialog_header, el, "f")) }, this.header.title ? (h("div", { class: "header__title" }, this.header.title)) : null, ((_a = this.header.icons) === null || _a === void 0 ? void 0 : _a.close) ? (h(FImage, { onClick: () => this.close(), sizeX: "1.25em", sizeY: "100%", resource: "clear", wrapperClass: "header__close" })) : null)) : null, h("div", { class: "content" }, h("slot", null)))));
|
|
12123
12110
|
}
|
|
12124
12111
|
disconnectedCallback() {
|
|
12125
12112
|
if (this.modal) {
|
|
12126
|
-
__classPrivateFieldGet$
|
|
12113
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").interact.hideModalBackdrop();
|
|
12127
12114
|
}
|
|
12128
|
-
__classPrivateFieldGet$
|
|
12115
|
+
__classPrivateFieldGet$2(this, _KupDialog_kupManager, "f").theme.unregister(this);
|
|
12129
12116
|
}
|
|
12130
12117
|
get rootElement() { return getElement$1(this); }
|
|
12131
12118
|
};
|
|
@@ -14104,6 +14091,7 @@ const KupImage = class {
|
|
|
14104
14091
|
constructor(hostRef) {
|
|
14105
14092
|
registerInstance(this, hostRef);
|
|
14106
14093
|
this.kupClick = createEvent(this, "kup-image-click", 6);
|
|
14094
|
+
this.kupLoad = createEvent(this, "kup-image-load", 6);
|
|
14107
14095
|
/**
|
|
14108
14096
|
* True when the resource is an URL.
|
|
14109
14097
|
*/
|
|
@@ -14129,6 +14117,13 @@ const KupImage = class {
|
|
|
14129
14117
|
el: e.target,
|
|
14130
14118
|
});
|
|
14131
14119
|
}
|
|
14120
|
+
onKupLoad(e) {
|
|
14121
|
+
this.kupLoad.emit({
|
|
14122
|
+
comp: this,
|
|
14123
|
+
id: this.rootElement.id,
|
|
14124
|
+
el: e.target,
|
|
14125
|
+
});
|
|
14126
|
+
}
|
|
14132
14127
|
/*-------------------------------------------------*/
|
|
14133
14128
|
/* P u b l i c M e t h o d s */
|
|
14134
14129
|
/*-------------------------------------------------*/
|
|
@@ -14208,6 +14203,7 @@ const KupImage = class {
|
|
|
14208
14203
|
sizeX: this.sizeX,
|
|
14209
14204
|
sizeY: this.sizeY,
|
|
14210
14205
|
onClick: (e) => this.onKupClick(e),
|
|
14206
|
+
onLoad: (e) => this.onKupLoad(e),
|
|
14211
14207
|
};
|
|
14212
14208
|
let elStyle = {
|
|
14213
14209
|
height: props.sizeY,
|
|
@@ -14240,9 +14236,9 @@ const KupImage = class {
|
|
|
14240
14236
|
};
|
|
14241
14237
|
KupImage.style = kupImageCss;
|
|
14242
14238
|
|
|
14243
|
-
const kupListCss = ":host{--kup_list_background:var(\n --kup-list-background,\n var(--kup-background-color)\n );--kup_list_color:var(--kup-list-color, var(--kup-text-color));--kup_list_font_family:var(--kup-list-font-family, var(--kup-font-family));--kup_list_font_size:var(--kup-list-font-size, var(--kup-font-size));--kup_list_font_weight:var(--kup-list-font-weight, 400);--kup_list_group_item_height:var(--kup-list-group-item-height, 3em);--kup_list_item_height:var(--kup-list-item-height, 2.5em);--kup_list_item_padding_left:var(--kup-list-item-padding, 0.75em);--kup_list_item_padding_right:var(--kup-list-item-padding, 0.75em);--kup_list_max_height_as_menu:var(--kup-list-max-height-as-menu, 33vh);--kup_list_primary_color:var(\n --kup-list-primary-color,\n var(--kup-primary-color)\n );--kup_list_primary_color_rgb:var(\n --kup-list-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_list_separator_color:var(\n --kup-list-separator-color,\n rgba(var(--kup-text-color-rgb), 0.25)\n );--kup_list_transition:var(--kup-list-transition, 120ms);display:block;font-family:var(--kup_list_font_family);font-size:var(--kup_list_font_size);outline:none}.list{background:var(--kup_list_background);color:var(--kup_list_color);font-weight:var(--kup_list_font_weight);letter-spacing:0.009375em;line-height:1.5em;list-style-type:none;margin:0;padding:0.5em 0;text-decoration:inherit;text-transform:inherit}.list--empty{padding:0}.list .list-item{display:-ms-flexbox;display:flex;height:var(--kup_list_item_height);position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;padding-left:var(--kup_list_item_padding_left);padding-right:calc(
|
|
14239
|
+
const kupListCss = ":host{--kup_list_background:var(\n --kup-list-background,\n var(--kup-background-color)\n );--kup_list_color:var(--kup-list-color, var(--kup-text-color));--kup_list_font_family:var(--kup-list-font-family, var(--kup-font-family));--kup_list_font_size:var(--kup-list-font-size, var(--kup-font-size));--kup_list_font_weight:var(--kup-list-font-weight, 400);--kup_list_group_item_height:var(--kup-list-group-item-height, 3em);--kup_list_item_height:var(--kup-list-item-height, 2.5em);--kup_list_item_padding_left:var(--kup-list-item-padding, 0.75em);--kup_list_item_padding_right:var(--kup-list-item-padding, 0.75em);--kup_list_max_height_as_menu:var(--kup-list-max-height-as-menu, 33vh);--kup_list_primary_color:var(\n --kup-list-primary-color,\n var(--kup-primary-color)\n );--kup_list_primary_color_rgb:var(\n --kup-list-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_list_separator_color:var(\n --kup-list-separator-color,\n rgba(var(--kup-text-color-rgb), 0.25)\n );--kup_list_transition:var(--kup-list-transition, 120ms);display:block;font-family:var(--kup_list_font_family);font-size:var(--kup_list_font_size);outline:none}.list{background:var(--kup_list_background);color:var(--kup_list_color);font-weight:var(--kup_list_font_weight);letter-spacing:0.009375em;line-height:1.5em;list-style-type:none;margin:0;padding:0.5em 0;text-decoration:inherit;text-transform:inherit}.list--empty{padding:0}.list .list-item{display:-ms-flexbox;display:flex;height:var(--kup_list_item_height);position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;padding-left:var(--kup_list_item_padding_left);padding-right:calc(var(--kup_list_item_padding_left) + var(--kup_list_item_expand_padding, 0px));overflow:hidden;outline:none;transition:background-color var(--kup_list_transition), color var(--kup_list_transition)}.list .list-item[role=checkbox],.list .list-item[role=radio]{height:var(--kup_list_group_item_height)}.list .list-item.list-item--activated,.list .list-item.list-item--activated .list-item__graphic,.list .list-item.list-item--selected,.list .list-item.list-item--selected .list-item__graphic{background-color:rgba(var(--kup_list_primary_color_rgb), 0.175);color:var(--kup_list_primary_color)}.list .list-item .list-item__text{-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.list .list-item .list-item__primary-text{-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-top:0;line-height:normal;margin-bottom:-1.5em;display:block}.list .list-item .list-item__primary-text:before{display:inline-block;width:0;height:1.5em;content:\"\";vertical-align:0}.list .list-item .list-item__primary-text:after{display:inline-block;width:0;height:2em;content:\"\";vertical-align:-2em}.list .list-item .list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-o-text-overflow:ellipsis;-webkit-font-smoothing:antialiased;display:block;font-size:0.875em;font-weight:400;letter-spacing:0.0178571429em;line-height:1.25em;text-decoration:inherit;text-transform:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-top:0;line-height:normal;color:var(--kup_list_color);opacity:0.75}.list .list-item .kup-icon{margin:0;margin-right:0.75em}.list .list-item kup-checkbox{margin:0}.list .list-divider{background-color:var(--kup_list_separator_color);height:1px;padding:0;background-clip:content-box}.list.list--two-line .list-item{height:3.6em}.list.list--two-line .list-item__text{-ms-flex-item-align:start;align-self:flex-start}.list:not(.list--non-interactive)>:not(.list-item--disabled).list-item{cursor:pointer}.list:not(.list--non-interactive)>:not(.list-item--disabled).list-item label{cursor:pointer}.list:not(.list--non-interactive) .list-item:not(.list-item--selected):hover,.list:not(.list--non-interactive) .list-item:not(.list-item--selected).list-item--focused{background-color:var(--kup-hover-background-color);color:var(--kup-hover-color)}.list.text-hidden .list-item__text{display:none}.kup-menu{animation:fade-in 0.25s ease-out;background-color:var(--kup-background-color);box-shadow:var(--kup-box-shadow);color:var(--kup-text-color);display:none;max-height:var(--kup_list_max_height_as_menu);overflow:auto;position:relative;transform:none;transform-origin:unset;transition:height 0.2s;user-select:none;will-change:unset}.kup-menu.visible{display:block}.kup-menu .list-item__text{user-select:none}:host([nested-list]){--kup_list_item_expand_padding:1.5em;max-width:250px}:host([nested-list]) .kup-menu{max-height:unset;overflow:visible}:host([nested-list]) kup-list{display:none;left:100%;position:absolute;top:0}:host([nested-list]) .list-item{overflow:visible}:host([nested-list]) .list-item__expand-icon{position:absolute;right:0}:host([nested-list]) .list-item:hover kup-list{display:block}:host(.kup-paddingless) .list{padding:0}:host(.kup-danger){--kup-list-primary-color:var(--kup-danger-color);--kup-list-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-list-primary-color:var(--kup-info-color);--kup-list-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-list-primary-color:var(--kup-secondary-color);--kup-list-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-list-primary-color:var(--kup-success-color);--kup-list-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-list-primary-color:var(--kup-warning-color);--kup-list-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
14244
14240
|
|
|
14245
|
-
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14241
|
+
var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14246
14242
|
if (kind === "a" && !f)
|
|
14247
14243
|
throw new TypeError("Private accessor was defined without a getter");
|
|
14248
14244
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -14303,7 +14299,7 @@ const KupList = class {
|
|
|
14303
14299
|
});
|
|
14304
14300
|
}
|
|
14305
14301
|
onKupClick(index) {
|
|
14306
|
-
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14302
|
+
__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14307
14303
|
}
|
|
14308
14304
|
/*-------------------------------------------------*/
|
|
14309
14305
|
/* L i s t e n e r s */
|
|
@@ -14324,7 +14320,7 @@ const KupList = class {
|
|
|
14324
14320
|
case 'Enter':
|
|
14325
14321
|
e.preventDefault();
|
|
14326
14322
|
e.stopPropagation();
|
|
14327
|
-
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_handleSelection).call(this, this.focused);
|
|
14323
|
+
__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_handleSelection).call(this, this.focused);
|
|
14328
14324
|
break;
|
|
14329
14325
|
}
|
|
14330
14326
|
}
|
|
@@ -14350,10 +14346,10 @@ const KupList = class {
|
|
|
14350
14346
|
else {
|
|
14351
14347
|
this.focused++;
|
|
14352
14348
|
}
|
|
14353
|
-
if (this.focused > __classPrivateFieldGet(this, _KupList_listItems, "f").length - 1) {
|
|
14349
|
+
if (this.focused > __classPrivateFieldGet$1(this, _KupList_listItems, "f").length - 1) {
|
|
14354
14350
|
this.focused = 0;
|
|
14355
14351
|
}
|
|
14356
|
-
__classPrivateFieldGet(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14352
|
+
__classPrivateFieldGet$1(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14357
14353
|
}
|
|
14358
14354
|
/**
|
|
14359
14355
|
* Focuses the previous element of the list.
|
|
@@ -14374,9 +14370,9 @@ const KupList = class {
|
|
|
14374
14370
|
this.focused--;
|
|
14375
14371
|
}
|
|
14376
14372
|
if (this.focused < 0) {
|
|
14377
|
-
this.focused = __classPrivateFieldGet(this, _KupList_listItems, "f").length - 1;
|
|
14373
|
+
this.focused = __classPrivateFieldGet$1(this, _KupList_listItems, "f").length - 1;
|
|
14378
14374
|
}
|
|
14379
|
-
__classPrivateFieldGet(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14375
|
+
__classPrivateFieldGet$1(this, _KupList_listItems, "f")[this.focused].focus();
|
|
14380
14376
|
}
|
|
14381
14377
|
/**
|
|
14382
14378
|
* Used to retrieve component's props values.
|
|
@@ -14413,7 +14409,7 @@ const KupList = class {
|
|
|
14413
14409
|
if (index === undefined) {
|
|
14414
14410
|
index = this.focused;
|
|
14415
14411
|
}
|
|
14416
|
-
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14412
|
+
__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
14417
14413
|
}
|
|
14418
14414
|
/**
|
|
14419
14415
|
* Sets the props to the component.
|
|
@@ -14426,8 +14422,8 @@ const KupList = class {
|
|
|
14426
14422
|
/* L i f e c y c l e H o o k s */
|
|
14427
14423
|
/*-------------------------------------------------*/
|
|
14428
14424
|
componentWillLoad() {
|
|
14429
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logLoad(this, false);
|
|
14430
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").theme.register(this);
|
|
14425
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").debug.logLoad(this, false);
|
|
14426
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").theme.register(this);
|
|
14431
14427
|
for (let index = 0; index < this.data.length; index++) {
|
|
14432
14428
|
const el = this.data[index];
|
|
14433
14429
|
if (el.selected) {
|
|
@@ -14436,10 +14432,10 @@ const KupList = class {
|
|
|
14436
14432
|
}
|
|
14437
14433
|
}
|
|
14438
14434
|
componentDidLoad() {
|
|
14439
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logLoad(this, true);
|
|
14435
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").debug.logLoad(this, true);
|
|
14440
14436
|
}
|
|
14441
14437
|
componentWillRender() {
|
|
14442
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logRender(this, false);
|
|
14438
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").debug.logRender(this, false);
|
|
14443
14439
|
}
|
|
14444
14440
|
componentDidRender() {
|
|
14445
14441
|
if (this.isMenu &&
|
|
@@ -14450,7 +14446,7 @@ const KupList = class {
|
|
|
14450
14446
|
this.rootElement.focus();
|
|
14451
14447
|
}, 0);
|
|
14452
14448
|
}
|
|
14453
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logRender(this, true);
|
|
14449
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").debug.logRender(this, true);
|
|
14454
14450
|
}
|
|
14455
14451
|
render() {
|
|
14456
14452
|
__classPrivateFieldSet(this, _KupList_listItems, [], "f");
|
|
@@ -14462,7 +14458,7 @@ const KupList = class {
|
|
|
14462
14458
|
wrapperClass += ' visible';
|
|
14463
14459
|
}
|
|
14464
14460
|
}
|
|
14465
|
-
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_checkRoleType).call(this);
|
|
14461
|
+
__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_checkRoleType).call(this);
|
|
14466
14462
|
if (this.selectable != true) {
|
|
14467
14463
|
componentClass += ' list--non-interactive';
|
|
14468
14464
|
}
|
|
@@ -14477,17 +14473,17 @@ const KupList = class {
|
|
|
14477
14473
|
}
|
|
14478
14474
|
let roleAttr = this.roleType;
|
|
14479
14475
|
let ariaMultiSelectable = 'false';
|
|
14480
|
-
if (__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isMultiSelection).call(this)) {
|
|
14476
|
+
if (__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isMultiSelection).call(this)) {
|
|
14481
14477
|
ariaMultiSelectable = 'true';
|
|
14482
14478
|
}
|
|
14483
14479
|
__classPrivateFieldSet(this, _KupList_radios, [], "f");
|
|
14484
14480
|
let index = 0;
|
|
14485
|
-
return (h(Host, null, h("style", null, __classPrivateFieldGet(this, _KupList_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: "kup-component", class: wrapperClass }, h("ul", { class: componentClass, role: roleAttr, "aria-multiselectable": ariaMultiSelectable }, this.data
|
|
14486
|
-
.filter((item) => __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_itemCompliant).call(this, item))
|
|
14487
|
-
.map((item) => __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_renderListItem).call(this, item, index++))))));
|
|
14481
|
+
return (h(Host, null, h("style", null, __classPrivateFieldGet$1(this, _KupList_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: "kup-component", class: wrapperClass }, h("ul", { class: componentClass, role: roleAttr, "aria-multiselectable": ariaMultiSelectable }, this.data
|
|
14482
|
+
.filter((item) => __classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_itemCompliant).call(this, item))
|
|
14483
|
+
.map((item) => __classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_renderListItem).call(this, item, index++))))));
|
|
14488
14484
|
}
|
|
14489
14485
|
disconnectedCallback() {
|
|
14490
|
-
__classPrivateFieldGet(this, _KupList_kupManager, "f").theme.unregister(this);
|
|
14486
|
+
__classPrivateFieldGet$1(this, _KupList_kupManager, "f").theme.unregister(this);
|
|
14491
14487
|
}
|
|
14492
14488
|
get rootElement() { return getElement$1(this); }
|
|
14493
14489
|
};
|
|
@@ -14538,7 +14534,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14538
14534
|
if (this.showIcons == true &&
|
|
14539
14535
|
item.icon != null &&
|
|
14540
14536
|
item.icon.trim() != '') {
|
|
14541
|
-
imageTag = __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_getIconTag).call(this, item.icon);
|
|
14537
|
+
imageTag = __classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_getIconTag).call(this, item.icon);
|
|
14542
14538
|
}
|
|
14543
14539
|
let primaryTextTag = [
|
|
14544
14540
|
getIdOfItemByDisplayMode(item, this.displayMode, ' - '),
|
|
@@ -14554,9 +14550,9 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14554
14550
|
}
|
|
14555
14551
|
let classAttr = 'list-item';
|
|
14556
14552
|
let tabIndexAttr = item.selected == true ? '0' : '-1';
|
|
14557
|
-
if (!__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isNested).call(this) &&
|
|
14553
|
+
if (!__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isNested).call(this) &&
|
|
14558
14554
|
item.selected == true &&
|
|
14559
|
-
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isListBoxRule).call(this)) {
|
|
14555
|
+
__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isListBoxRule).call(this)) {
|
|
14560
14556
|
classAttr += ' list-item--selected';
|
|
14561
14557
|
}
|
|
14562
14558
|
if (this.focused === index) {
|
|
@@ -14572,7 +14568,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14572
14568
|
imageTag,
|
|
14573
14569
|
h("span", { class: "list-item__text" }, primaryTextTag, secTextTag),
|
|
14574
14570
|
];
|
|
14575
|
-
if (__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14571
|
+
if (__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14576
14572
|
roleAttr = 'radio';
|
|
14577
14573
|
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
14578
14574
|
let dataTmp = [
|
|
@@ -14586,12 +14582,12 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14586
14582
|
display: 'none',
|
|
14587
14583
|
};
|
|
14588
14584
|
innerSpanTag = [
|
|
14589
|
-
h("span", { class: "list-item__graphic" }, h("input", { type: "radio", style: trickForMDC }), h("kup-radio", { data: dataTmp, id: this.rootElement.id + '_' + index, ref: (el) => (__classPrivateFieldGet(this, _KupList_radios, "f")[index] = el) })),
|
|
14585
|
+
h("span", { class: "list-item__graphic" }, h("input", { type: "radio", style: trickForMDC }), h("kup-radio", { data: dataTmp, id: this.rootElement.id + '_' + index, ref: (el) => (__classPrivateFieldGet$1(this, _KupList_radios, "f")[index] = el) })),
|
|
14590
14586
|
imageTag,
|
|
14591
14587
|
h("label", { class: "list-item__text", htmlFor: this.rootElement.id + '_' + index }, primaryTextTag, secTextTag),
|
|
14592
14588
|
];
|
|
14593
14589
|
}
|
|
14594
|
-
else if (__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this)) {
|
|
14590
|
+
else if (__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this)) {
|
|
14595
14591
|
roleAttr = 'checkbox';
|
|
14596
14592
|
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
14597
14593
|
let checkedAttr = item.selected == true ? true : false;
|
|
@@ -14609,14 +14605,14 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14609
14605
|
vNodes.push(h("li", { role: "separator", class: "list-divider" }));
|
|
14610
14606
|
}
|
|
14611
14607
|
vNodes.push(h("li", { ref: (el) => {
|
|
14612
|
-
__classPrivateFieldGet(this, _KupList_listItems, "f").push(el);
|
|
14608
|
+
__classPrivateFieldGet$1(this, _KupList_listItems, "f").push(el);
|
|
14613
14609
|
}, class: classAttr, role: roleAttr, tabindex: tabIndexAttr, "data-id": item.id, "aria-selected": ariaSelectedAttr, "aria-checked": ariaCheckedAttr, onBlur: !this.selectable
|
|
14614
14610
|
? (e) => e.stopPropagation()
|
|
14615
14611
|
: () => this.onKupBlur(), onFocus: !this.selectable
|
|
14616
14612
|
? (e) => e.stopPropagation()
|
|
14617
14613
|
: () => this.onKupFocus(), onClick: !this.selectable
|
|
14618
14614
|
? (e) => e.stopPropagation()
|
|
14619
|
-
: __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isNested).call(this)
|
|
14615
|
+
: __classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isNested).call(this)
|
|
14620
14616
|
? (e) => {
|
|
14621
14617
|
e.stopPropagation();
|
|
14622
14618
|
this.onKupClick(index);
|
|
@@ -14637,7 +14633,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14637
14633
|
};
|
|
14638
14634
|
return (h(FImage, Object.assign({}, propsFImage, { resource: icon, wrapperClass: `icon-button__icon kup-icon` })));
|
|
14639
14635
|
}, _KupList_isMultiSelection = function _KupList_isMultiSelection() {
|
|
14640
|
-
return __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this);
|
|
14636
|
+
return __classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this);
|
|
14641
14637
|
}, _KupList_isCheckBoxRule = function _KupList_isCheckBoxRule() {
|
|
14642
14638
|
return this.roleType == KupListRole.GROUP;
|
|
14643
14639
|
}, _KupList_isRadioButtonRule = function _KupList_isRadioButtonRule() {
|
|
@@ -14645,7 +14641,7 @@ _KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_l
|
|
|
14645
14641
|
}, _KupList_isListBoxRule = function _KupList_isListBoxRule() {
|
|
14646
14642
|
return this.roleType == KupListRole.LISTBOX;
|
|
14647
14643
|
}, _KupList_checkRoleType = function _KupList_checkRoleType() {
|
|
14648
|
-
if (!__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this) && !__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14644
|
+
if (!__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this) && !__classPrivateFieldGet$1(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
14649
14645
|
this.roleType = KupListRole.LISTBOX;
|
|
14650
14646
|
}
|
|
14651
14647
|
}, _KupList_itemCompliant = function _KupList_itemCompliant(item) {
|
|
@@ -16482,6 +16478,14 @@ class FiltersTreeItems extends FiltersRows {
|
|
|
16482
16478
|
|
|
16483
16479
|
const kupTreeCss = ":host{--kup_tree_border:var(--kup-tree-border, 1px solid var(--kup-border-color));--kup_tree_color:var(--kup-tree-color, var(--kup-text-color));--kup_tree_color_rgb:var(--kup-tree-color-rgb, var(--kup-text-color-rgb));--kup_tree_font_family:var(--kup-tree-font-family, var(--kup-font-family));--kup_tree_filter_background_color:var(--kup-tree-filter-background-color, var(--kup-background-color));--kup_tree_font_family_monospace:var(\n --kup-tree-font-family-monospace,\n var(--kup-font-family-monospace)\n );--kup_tree_font_size:var(--kup-tree-font-size, var(--kup-font-size));--kup_tree_hover_color:var(--kup-tree-hover-color, var(--kup-hover-color));--kup_tree_hover_background_color:var(\n --kup-tree-hover-background-color,\n var(--kup-hover-background-color)\n );--kup_tree_icon_color:var(--kup-tree-icon-color, var(--kup-icon-color));--kup_tree_primary_color:var(\n --kup-tree-primary-color,\n var(--kup-primary-color)\n );--kup_tree_primary_color_rgb:var(\n --kup-tree-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_tree_text_on_primary_color:var(\n --kup-tree-text-on-primary-color,\n var(--kup-text-on-primary-color)\n );display:block;font-family:var(--kup_tree_font_family);font-size:var(--kup_tree_font_size)}:host([prevent-x-scroll]) .wrapper{overflow-x:hidden}#kup-component{color:var(--kup_tree_color)}.density-dense .wrapper .kup-tree td:not(.grid-cell),.density-dense .wrapper .kup-tree th{padding:0 0.5em}.density-dense .wrapper .kup-tree td:not(.grid-cell) .kup-tree__icon~.cell-content,.density-dense .wrapper .kup-tree td:not(.grid-cell) .kup-tree__icon+.cell-content,.density-dense .wrapper .kup-tree th .kup-tree__icon~.cell-content,.density-dense .wrapper .kup-tree th .kup-tree__icon+.cell-content{vertical-align:0.4em}.density-wide .wrapper .kup-tree td:not(.grid-cell),.density-wide .wrapper .kup-tree th{padding:0.75em 0.5em}.wrapper{overflow-x:auto}.wrapper .kup-tree{border-collapse:collapse;width:max-content}.wrapper .kup-tree thead{display:none}.wrapper .kup-tree thead.header--is-visible{display:table-header-group}.wrapper .kup-tree thead.header--is-visible th{padding:0.8em 0.5em;font-size:1.1em}.wrapper .kup-tree thead th{text-align:left}.wrapper .kup-tree tr,.wrapper .kup-tree td{font-size:1em;line-height:1em}.wrapper .kup-tree tr.mdc-ripple-surface,.wrapper .kup-tree td.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.wrapper .kup-tree tr.mdc-ripple-surface:before,.wrapper .kup-tree tr.mdc-ripple-surface:after,.wrapper .kup-tree td.mdc-ripple-surface:before,.wrapper .kup-tree td.mdc-ripple-surface:after{background-color:var(--kup_tree_primary_color)}.wrapper .kup-tree tr .kup-tree__icon~.cell-content,.wrapper .kup-tree tr .kup-tree__icon+.cell-content,.wrapper .kup-tree td .kup-tree__icon~.cell-content,.wrapper .kup-tree td .kup-tree__icon+.cell-content{display:inline-block;vertical-align:0.3em}.wrapper .kup-tree td:not(.grid-cell),.wrapper .kup-tree th{padding:0.4em 0.5em}.wrapper .kup-tree td{padding:0;white-space:nowrap}.wrapper .kup-tree__indent{display:inline-block;width:calc(1.5em * var(--kup_tree_node_depth, 0))}.wrapper .kup-tree__icon{display:inline-block;margin-right:0.4em;height:1.5em;min-width:1.5em;width:1.5em}.wrapper .kup-tree__node__expander{transition:transform 0.1s}.wrapper .kup-tree__node{cursor:default}.wrapper .kup-tree__node.with-dyn:not(.kup-tree__node--disabled){cursor:pointer}.wrapper .kup-tree__node:not(.kup-tree__node--disabled) .wrapper .kup-tree__node__expander{cursor:pointer}.wrapper .kup-tree__node:not(.kup-tree__node--disabled) .kup-icon.kup-tree__node__expander{cursor:pointer}.wrapper .kup-tree__node--disabled{opacity:0.4}.wrapper .kup-tree__node--disabled__expander{pointer-events:none}.wrapper .kup-tree__node .kup-icon:not(.is-image){background-color:var(--kup_tree_icon_color)}.wrapper .kup-tree__node .kup-icon.kup-tree__node__expander:not(.is-image){background-color:var(--kup_tree_color)}.wrapper .kup-tree__node .kup-icon.is-image img{display:block;height:auto;width:100%}.wrapper .kup-tree__node:hover:not(.kup-tree__node--disabled):not(.kup-tree__node--selected) td{background-color:var(--kup_tree_hover_background_color);color:var(--kup_tree_hover_color)}.wrapper .kup-tree__node:hover:not(.kup-tree__node--disabled):not(.kup-tree__node--selected) td .kup-icon{background-color:var(--kup_tree_hover_color)}.wrapper .kup-tree__node--selected:not(.kup-tree__node--disabled) td{background-color:rgba(var(--kup_tree_primary_color_rgb), 0.175);color:var(--kup_tree_color)}.wrapper .kup-tree[data-show-columns] .kup-tree__node{border-bottom:solid 1px var(--kup-border-color)}#global-filter{background:var(--kup_tree_filter_background_color);margin-bottom:1em;position:sticky;top:0;z-index:1}.first-node .cell-content{font-weight:bold}.cell-content--ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--kup_tree_content_width, auto)}.cell-content--highlighted{color:var(--kup_tree_text_on_primary_color);background-color:var(--kup_tree_primary_color)}.kup-icon.kup-filter-remove-icon:not(.f-image){background-color:var(--kup_tree_color);margin:0 0.25em;height:1em;width:1em;cursor:pointer;float:right;margin:0 0.25em;opacity:0.5}.grid-cell{height:0}tfoot td{border-bottom:var(--kup_tree_border);border-right:var(--kup_tree_border);box-sizing:border-box;height:36px;text-align:right;font-weight:bold;padding:0.5em 0.3125em}tfoot td:hover{background-color:var(--kup-background-color)}tfoot td:first-of-type{border:none;border-right:var(--kup_tree_border)}.hidden span{color:transparent;position:relative;text-overflow:ellipsis;transition:color 200ms}.hidden span:hover{color:var(--kup_tree_color)}.totals-value{font-weight:bold}:host([as-accordion]) .wrapper .kup-tree thead{display:table-header-group}:host([as-accordion]) .wrapper .kup-tree thead tr{border-left:var(--kup_tree_border);border-right:var(--kup_tree_border)}:host([as-accordion]) .density-dense .first-node:not(.grid-cell){padding:0.5em 1em}:host([as-accordion]) .density-medium .first-node:not(.grid-cell){padding:1em 1.5em}:host([as-accordion]) .density-wide .first-node:not(.grid-cell){padding:1.75em 1.75em}:host([as-accordion]) .kup-tree__node--first{border:none;box-sizing:border-box;display:block}:host([as-accordion]) .kup-tree__node--first:hover,:host([as-accordion]) .kup-tree__node--first[data-is-expanded]{background-color:var(--kup_tree_hover_background_color)}:host([as-accordion]) .kup-tree__node--first:hover .cell-content,:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .cell-content{color:var(--kup_tree_hover_color)}:host([as-accordion]) .kup-tree__node--first:hover .kup-icon,:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .kup-icon{background-color:var(--kup_tree_hover_color)}:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .first-node{border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host([as-accordion]) .kup-tree__node--first[data-is-expanded] .kup-dropdown-icon{transform:rotate(180deg)}:host([as-accordion]) .kup-tree__node--first:first-of-type .first-node{border-top-left-radius:4px;border-top-right-radius:4px;border-top:var(--kup_tree_border)}:host([as-accordion]) .kup-tree__node--first:last-of-type .first-node{border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host([as-accordion]) .kup-tree__node--first .first-node{align-items:center;border-bottom:var(--kup_tree_border);border-left:var(--kup_tree_border);border-right:var(--kup_tree_border);box-sizing:border-box;color:var(--kup_tree_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;text-align:left;transition:background-color 80ms, color 80ms;width:100%}:host([as-accordion]) .kup-tree__node--first .kup-tree__icon{margin-left:0;margin-right:0.5em;min-width:1.5em}:host([as-accordion]) .kup-tree__node--first .cell-content{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}:host([as-accordion]) .kup-tree__node--first .kup-dropdown-icon{background-color:var(--kup_tree_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform 0.1s}:host([as-accordion]) .kup-tree__node:not(.kup-tree__node--first)+.kup-tree__node--first{border-top:var(--kup_tree_border);border-top-left-radius:4px;border-top-right-radius:4px}.kup-menu{animation:fade-in 0.25s ease-out;background-color:var(--kup-background-color);box-shadow:var(--kup-box-shadow);color:var(--kup-text-color);display:none;max-height:33vh;overflow:auto;position:relative;transform:none;transform-origin:unset;transition:height 0.2s;will-change:unset}.kup-menu.visible{display:block}.kup-icon.kup-collapsed-icon{-webkit-mask:var(--kup-collapsed-icon);mask:var(--kup-collapsed-icon)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}.kup-icon.kup-expanded-icon{-webkit-mask:var(--kup-expanded-icon);mask:var(--kup-expanded-icon)}.kup-icon.kup-filter-remove-icon{-webkit-mask:var(--kup-filter-remove-icon);mask:var(--kup-filter-remove-icon)}:host(.kup-borderless) .first-node{border:none !important}:host(.kup-borderless) .kup-tree__node:not(.kup-tree__node--first)+.kup-tree__node--first{border:none !important}:host(.kup-full-width){min-width:100%}:host(.kup-full-width) table.kup-tree{min-width:100%}:host(.kup-layout-fixed) #kup-component table{table-layout:fixed;width:100%}:host(.kup-shaped) td.mdc-ripple-surface{border-radius:0 66px 66px 0}tr.clickable{cursor:pointer}";
|
|
16484
16480
|
|
|
16481
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
16482
|
+
if (kind === "a" && !f)
|
|
16483
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
16484
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
16485
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
16486
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
16487
|
+
};
|
|
16488
|
+
var _KupTree_kupManager;
|
|
16485
16489
|
const KupTree = class {
|
|
16486
16490
|
constructor(hostRef) {
|
|
16487
16491
|
registerInstance(this, hostRef);
|
|
@@ -16506,7 +16510,7 @@ const KupTree = class {
|
|
|
16506
16510
|
/**
|
|
16507
16511
|
* Instance of the KupManager class.
|
|
16508
16512
|
*/
|
|
16509
|
-
this
|
|
16513
|
+
_KupTree_kupManager.set(this, kupManagerInstance());
|
|
16510
16514
|
/**
|
|
16511
16515
|
* Reference to the column menu card.
|
|
16512
16516
|
*/
|
|
@@ -16571,31 +16575,31 @@ const KupTree = class {
|
|
|
16571
16575
|
persistState() {
|
|
16572
16576
|
if (this.store && this.stateId) {
|
|
16573
16577
|
let somethingChanged = false;
|
|
16574
|
-
if (!this.
|
|
16578
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.filters, this.filters)) {
|
|
16575
16579
|
this.state.filters = Object.assign({}, this.filters);
|
|
16576
16580
|
somethingChanged = true;
|
|
16577
16581
|
}
|
|
16578
|
-
if (!this.
|
|
16582
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.density, this.density)) {
|
|
16579
16583
|
this.state.density = this.density;
|
|
16580
16584
|
somethingChanged = true;
|
|
16581
16585
|
}
|
|
16582
|
-
if (!this.
|
|
16586
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.showFilters, this.showFilters)) {
|
|
16583
16587
|
this.state.showFilters = this.showFilters;
|
|
16584
16588
|
somethingChanged = true;
|
|
16585
16589
|
}
|
|
16586
|
-
if (!this.
|
|
16590
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.showFooter, this.showFooter)) {
|
|
16587
16591
|
this.state.showFooter = this.showFooter;
|
|
16588
16592
|
somethingChanged = true;
|
|
16589
16593
|
}
|
|
16590
|
-
if (!this.
|
|
16594
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.totals, this.totals)) {
|
|
16591
16595
|
this.state.totals = Object.assign({}, this.totals);
|
|
16592
16596
|
somethingChanged = true;
|
|
16593
16597
|
}
|
|
16594
|
-
if (!this.
|
|
16598
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.globalFilter, this.globalFilter)) {
|
|
16595
16599
|
this.state.globalFilter = this.globalFilter;
|
|
16596
16600
|
somethingChanged = true;
|
|
16597
16601
|
}
|
|
16598
|
-
if (!this.
|
|
16602
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
16599
16603
|
this.state.globalFilterValue = this.globalFilterValue;
|
|
16600
16604
|
somethingChanged = true;
|
|
16601
16605
|
}
|
|
@@ -16726,7 +16730,7 @@ const KupTree = class {
|
|
|
16726
16730
|
* @param {KupDataColumn} column - Column to hide.
|
|
16727
16731
|
*/
|
|
16728
16732
|
async hideColumn(column) {
|
|
16729
|
-
this.
|
|
16733
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").data.column.hide(this.columns, [column.name]);
|
|
16730
16734
|
this.kupColumnRemove.emit({
|
|
16731
16735
|
comp: this,
|
|
16732
16736
|
id: this.rootElement.id,
|
|
@@ -16810,21 +16814,21 @@ const KupTree = class {
|
|
|
16810
16814
|
return this.treeColumnVisible;
|
|
16811
16815
|
}
|
|
16812
16816
|
checkScrollOnHover() {
|
|
16813
|
-
if (!this.
|
|
16817
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").scrollOnHover.isRegistered(this.treeWrapperRef)) {
|
|
16814
16818
|
if (this.scrollOnHover) {
|
|
16815
|
-
this.
|
|
16819
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").scrollOnHover.register(this.treeWrapperRef);
|
|
16816
16820
|
}
|
|
16817
16821
|
}
|
|
16818
16822
|
else {
|
|
16819
16823
|
if (!this.scrollOnHover) {
|
|
16820
|
-
this.
|
|
16824
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").scrollOnHover.unregister(this.treeWrapperRef);
|
|
16821
16825
|
}
|
|
16822
16826
|
}
|
|
16823
16827
|
}
|
|
16824
16828
|
onKupTreeNodeDblClick(treeNodeData, treeNodePath) {
|
|
16825
16829
|
for (let index = 0; index < this.clickTimeout.length; index++) {
|
|
16826
16830
|
clearTimeout(this.clickTimeout[index]);
|
|
16827
|
-
this.
|
|
16831
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logMessage(this, 'Cleared hdlTreeNodeClick timeout(' +
|
|
16828
16832
|
this.clickTimeout[index] +
|
|
16829
16833
|
').');
|
|
16830
16834
|
}
|
|
@@ -17013,7 +17017,7 @@ const KupTree = class {
|
|
|
17013
17017
|
}
|
|
17014
17018
|
contextMenuHandler(e) {
|
|
17015
17019
|
e.preventDefault();
|
|
17016
|
-
const details = this.getEventDetails(this.getEventPath(e.target), e);
|
|
17020
|
+
const details = this.getEventDetails(__classPrivateFieldGet(this, _KupTree_kupManager, "f").getEventPath(e.target, this.rootElement), e);
|
|
17017
17021
|
if (details.area === 'header') {
|
|
17018
17022
|
if (details.th && details.column) {
|
|
17019
17023
|
this.openColumnMenu(details.column.name);
|
|
@@ -17029,18 +17033,6 @@ const KupTree = class {
|
|
|
17029
17033
|
}
|
|
17030
17034
|
return details;
|
|
17031
17035
|
}
|
|
17032
|
-
getEventPath(currentEl) {
|
|
17033
|
-
const path = [];
|
|
17034
|
-
while (currentEl &&
|
|
17035
|
-
currentEl !== this.rootElement &&
|
|
17036
|
-
currentEl !== document.body) {
|
|
17037
|
-
path.push(currentEl);
|
|
17038
|
-
currentEl = currentEl.parentNode
|
|
17039
|
-
? currentEl.parentNode
|
|
17040
|
-
: currentEl.host;
|
|
17041
|
-
}
|
|
17042
|
-
return path;
|
|
17043
|
-
}
|
|
17044
17036
|
// When a TreeNode can be selected
|
|
17045
17037
|
hdlTreeNodeClick(e, treeNodeData, treeNodePath) {
|
|
17046
17038
|
if (this.expansionMode.toLowerCase() ===
|
|
@@ -17048,7 +17040,9 @@ const KupTree = class {
|
|
|
17048
17040
|
(this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE &&
|
|
17049
17041
|
!treeNodeData.expandable)) {
|
|
17050
17042
|
const td = e
|
|
17051
|
-
? this
|
|
17043
|
+
? __classPrivateFieldGet(this, _KupTree_kupManager, "f")
|
|
17044
|
+
.getEventPath(e.target, this.rootElement)
|
|
17045
|
+
.find((el) => {
|
|
17052
17046
|
if (el.tagName === 'TD')
|
|
17053
17047
|
return el;
|
|
17054
17048
|
})
|
|
@@ -17240,10 +17234,10 @@ const KupTree = class {
|
|
|
17240
17234
|
refreshStructureState() {
|
|
17241
17235
|
if (this.data) {
|
|
17242
17236
|
if (this.data.columns) {
|
|
17243
|
-
this.
|
|
17237
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logMessage(this, 'Detected KupDataDataset: setting up tree as grid.', KupDebugCategory.WARNING);
|
|
17244
17238
|
const data = this.data;
|
|
17245
17239
|
this.columns = data.columns;
|
|
17246
|
-
this.data = this.
|
|
17240
|
+
this.data = __classPrivateFieldGet(this, _KupTree_kupManager, "f").data.row.toNode(data);
|
|
17247
17241
|
this.showColumns = true;
|
|
17248
17242
|
this.showHeader = true;
|
|
17249
17243
|
}
|
|
@@ -17306,7 +17300,7 @@ const KupTree = class {
|
|
|
17306
17300
|
//---- Filter ----
|
|
17307
17301
|
let filter = null;
|
|
17308
17302
|
if (this.filtersColumnMenuInstance.hasFiltersForColumn(this.filters, column)) {
|
|
17309
|
-
const svgLabel = this.
|
|
17303
|
+
const svgLabel = __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageGeneric.REMOVE_FILTERS) + `: '${this.getFilterValueForTooltip(column)}'`;
|
|
17310
17304
|
/**
|
|
17311
17305
|
* When column has a filter but filters must not be displayed, shows an icon to remove the filter.
|
|
17312
17306
|
* Upon click, the filter gets removed.
|
|
@@ -17381,9 +17375,9 @@ const KupTree = class {
|
|
|
17381
17375
|
expandClass += ` ${KupThemeIconValues.COLLAPSED.replace('--', '')}`;
|
|
17382
17376
|
}
|
|
17383
17377
|
}
|
|
17384
|
-
let treeExpandIcon = (h("span", { title: this.
|
|
17378
|
+
let treeExpandIcon = (h("span", { title: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageGeneric.EXPAND) +
|
|
17385
17379
|
'/' +
|
|
17386
|
-
this.
|
|
17380
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageGeneric.COLLAPSE) +
|
|
17387
17381
|
' (CTRL + Click)', class: expandClass, onClick: this.expansionMode.toLowerCase() ===
|
|
17388
17382
|
KupTreeExpansionMode.DROPDOWN && !treeNodeData.disabled
|
|
17389
17383
|
? (event) => {
|
|
@@ -17456,8 +17450,8 @@ const KupTree = class {
|
|
|
17456
17450
|
}
|
|
17457
17451
|
}
|
|
17458
17452
|
let title = undefined;
|
|
17459
|
-
if (!this.
|
|
17460
|
-
this.
|
|
17453
|
+
if (!__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.isEmptyKupObj(treeNodeData.obj) &&
|
|
17454
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.isDebug()) {
|
|
17461
17455
|
title =
|
|
17462
17456
|
treeNodeData.obj.t +
|
|
17463
17457
|
'; ' +
|
|
@@ -17480,7 +17474,7 @@ const KupTree = class {
|
|
|
17480
17474
|
'mdc-ripple-surface': this.ripple &&
|
|
17481
17475
|
!this.showColumns &&
|
|
17482
17476
|
!treeNodeData.disabled,
|
|
17483
|
-
'is-obj': !this.
|
|
17477
|
+
'is-obj': !__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.isEmptyKupObj(treeNodeData.obj),
|
|
17484
17478
|
}, style: treeNodeData.style || null, title: title, onDblClick: () => {
|
|
17485
17479
|
this.onKupTreeNodeDblClick(treeNodeData, treeNodePath);
|
|
17486
17480
|
} }, this.asAccordion && !treeNodeDepth
|
|
@@ -17503,7 +17497,7 @@ const KupTree = class {
|
|
|
17503
17497
|
}
|
|
17504
17498
|
closeTotalMenu() {
|
|
17505
17499
|
this.openedTotalMenu = null;
|
|
17506
|
-
this.
|
|
17500
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").removeClickCallback(this.clickCb);
|
|
17507
17501
|
}
|
|
17508
17502
|
isOpenedTotalMenuForColumn(column) {
|
|
17509
17503
|
return this.openedTotalMenu === column;
|
|
@@ -17533,15 +17527,15 @@ const KupTree = class {
|
|
|
17533
17527
|
let totalMenu = undefined;
|
|
17534
17528
|
let menuLabel = TotalLabel.CALC;
|
|
17535
17529
|
const translation = {
|
|
17536
|
-
[TotalLabel.AVERAGE]: this.
|
|
17537
|
-
[TotalLabel.CALC]: this.
|
|
17538
|
-
[TotalLabel.CANC]: this.
|
|
17539
|
-
[TotalLabel.COUNT]: this.
|
|
17540
|
-
[TotalLabel.DISTINCT]: this.
|
|
17541
|
-
[TotalLabel.MATH]: this.
|
|
17542
|
-
[TotalLabel.MAX]: this.
|
|
17543
|
-
[TotalLabel.MIN]: this.
|
|
17544
|
-
[TotalLabel.SUM]: this.
|
|
17530
|
+
[TotalLabel.AVERAGE]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.AVERAGE),
|
|
17531
|
+
[TotalLabel.CALC]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.CALCULATE),
|
|
17532
|
+
[TotalLabel.CANC]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.CANCEL),
|
|
17533
|
+
[TotalLabel.COUNT]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.COUNT),
|
|
17534
|
+
[TotalLabel.DISTINCT]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.DISTINCT),
|
|
17535
|
+
[TotalLabel.MATH]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.FORMULA),
|
|
17536
|
+
[TotalLabel.MAX]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.MAXIMUM),
|
|
17537
|
+
[TotalLabel.MIN]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.MINIMUM),
|
|
17538
|
+
[TotalLabel.SUM]: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageTotals.SUM),
|
|
17545
17539
|
};
|
|
17546
17540
|
if (this.totals) {
|
|
17547
17541
|
const totalValue = this.totals[column.name];
|
|
@@ -17584,7 +17578,7 @@ const KupTree = class {
|
|
|
17584
17578
|
value: translation[TotalLabel.DISTINCT],
|
|
17585
17579
|
},
|
|
17586
17580
|
];
|
|
17587
|
-
if (this.
|
|
17581
|
+
if (__classPrivateFieldGet(this, _KupTree_kupManager, "f").objects.isNumber(column.obj)) {
|
|
17588
17582
|
listData.push({
|
|
17589
17583
|
id: TotalMode.SUM,
|
|
17590
17584
|
value: translation[TotalLabel.SUM],
|
|
@@ -17650,25 +17644,25 @@ const KupTree = class {
|
|
|
17650
17644
|
});
|
|
17651
17645
|
}
|
|
17652
17646
|
};
|
|
17653
|
-
this.
|
|
17654
|
-
this.
|
|
17647
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").interact.on(this.treeWrapperRef, KupPointerEventTypes.TAP, tapCb);
|
|
17648
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").interact.on(this.treeWrapperRef, KupPointerEventTypes.HOLD, holdCb);
|
|
17655
17649
|
}
|
|
17656
17650
|
totalMenuPosition() {
|
|
17657
17651
|
if (this.rootElement.shadowRoot) {
|
|
17658
17652
|
const menu = this.rootElement.shadowRoot.querySelector('#totals-menu');
|
|
17659
17653
|
if (menu) {
|
|
17660
|
-
this.
|
|
17654
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").dynamicPosition.register(menu, this.totalMenuCoords);
|
|
17661
17655
|
if (!this.clickCb) {
|
|
17662
17656
|
this.clickCb = {
|
|
17663
17657
|
cb: () => {
|
|
17664
17658
|
this.closeTotalMenu();
|
|
17665
|
-
this.
|
|
17659
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").dynamicPosition.stop(menu);
|
|
17666
17660
|
},
|
|
17667
17661
|
el: menu,
|
|
17668
17662
|
};
|
|
17669
17663
|
}
|
|
17670
|
-
this.
|
|
17671
|
-
this.
|
|
17664
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").addClickCallback(this.clickCb, true);
|
|
17665
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").dynamicPosition.start(menu);
|
|
17672
17666
|
menu.menuVisible = true;
|
|
17673
17667
|
}
|
|
17674
17668
|
}
|
|
@@ -17726,20 +17720,20 @@ const KupTree = class {
|
|
|
17726
17720
|
/* L i f e c y c l e H o o k s */
|
|
17727
17721
|
/*-------------------------------------------------*/
|
|
17728
17722
|
componentWillLoad() {
|
|
17729
|
-
this.
|
|
17730
|
-
this.
|
|
17731
|
-
this.
|
|
17723
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logLoad(this, false);
|
|
17724
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").language.register(this);
|
|
17725
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").theme.register(this);
|
|
17732
17726
|
this.columnMenuInstance = new KupColumnMenu();
|
|
17733
17727
|
this.refreshStructureState();
|
|
17734
17728
|
}
|
|
17735
17729
|
componentDidLoad() {
|
|
17736
17730
|
this.didLoadInteractables();
|
|
17737
17731
|
this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
|
|
17738
|
-
this.
|
|
17739
|
-
this.
|
|
17732
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").resize.observe(this.rootElement);
|
|
17733
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logLoad(this, true);
|
|
17740
17734
|
}
|
|
17741
17735
|
componentWillRender() {
|
|
17742
|
-
this.
|
|
17736
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logRender(this, false);
|
|
17743
17737
|
if (this.showFooter && this.columns) {
|
|
17744
17738
|
this.footer = calcTotals(normalizeRows(this.getColumns(), this.nodesToRows()), this.totals);
|
|
17745
17739
|
}
|
|
@@ -17771,7 +17765,7 @@ const KupTree = class {
|
|
|
17771
17765
|
this.persistState();
|
|
17772
17766
|
// ***
|
|
17773
17767
|
this.oldWidth = this.rootElement.clientWidth;
|
|
17774
|
-
this.
|
|
17768
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").debug.logRender(this, true);
|
|
17775
17769
|
}
|
|
17776
17770
|
render() {
|
|
17777
17771
|
this.contentRefs = [];
|
|
@@ -17794,7 +17788,7 @@ const KupTree = class {
|
|
|
17794
17788
|
}
|
|
17795
17789
|
else {
|
|
17796
17790
|
// There are no TreeNodes, so we print a single cell with a caption
|
|
17797
|
-
treeNodes.push(h("tr", null, h("td", null, this.
|
|
17791
|
+
treeNodes.push(h("tr", null, h("td", null, __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA))));
|
|
17798
17792
|
}
|
|
17799
17793
|
// Calculates if header must be shown or not
|
|
17800
17794
|
const visibleHeader = this.showHeader && this.showColumns;
|
|
@@ -17803,12 +17797,12 @@ const KupTree = class {
|
|
|
17803
17797
|
this.data &&
|
|
17804
17798
|
this.data.length &&
|
|
17805
17799
|
this.data.length > 0) {
|
|
17806
|
-
filterField = (h("div", { id: "global-filter" }, h("kup-text-field", { fullWidth: true, label: this.
|
|
17800
|
+
filterField = (h("div", { id: "global-filter" }, h("kup-text-field", { fullWidth: true, label: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), icon: KupThemeIconValues.SEARCH, initialValue: this.globalFilterValue, "onkup-textfield-input": (event) => {
|
|
17807
17801
|
window.clearTimeout(this.globalFilterTimeout);
|
|
17808
17802
|
this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
|
|
17809
17803
|
} })));
|
|
17810
17804
|
}
|
|
17811
|
-
return (h(Host, null, h("style", null, this.
|
|
17805
|
+
return (h(Host, null, h("style", null, __classPrivateFieldGet(this, _KupTree_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, class: wrapperClass }, filterField, h("div", { class: "wrapper", ref: (el) => (this.treeWrapperRef =
|
|
17812
17806
|
el) }, h("table", { class: "kup-tree", "data-show-columns": this.showColumns, onContextMenu: (e) => {
|
|
17813
17807
|
e.preventDefault();
|
|
17814
17808
|
} }, h("thead", { class: {
|
|
@@ -17819,18 +17813,18 @@ const KupTree = class {
|
|
|
17819
17813
|
: null)))));
|
|
17820
17814
|
}
|
|
17821
17815
|
disconnectedCallback() {
|
|
17822
|
-
this.
|
|
17823
|
-
this.
|
|
17824
|
-
this.
|
|
17816
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").language.register(this);
|
|
17817
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").resize.unobserve(this.rootElement);
|
|
17818
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").theme.unregister(this);
|
|
17825
17819
|
const dynamicPositionElements = this.rootElement.shadowRoot.querySelectorAll('[' + kupDynamicPositionAttribute + ']');
|
|
17826
17820
|
if (dynamicPositionElements.length > 0) {
|
|
17827
|
-
this.
|
|
17821
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").dynamicPosition.unregister(Array.prototype.slice.call(dynamicPositionElements));
|
|
17828
17822
|
}
|
|
17829
17823
|
if (this.columnMenuCard) {
|
|
17830
17824
|
this.columnMenuCard.remove();
|
|
17831
17825
|
}
|
|
17832
17826
|
if (this.scrollOnHover) {
|
|
17833
|
-
this.
|
|
17827
|
+
__classPrivateFieldGet(this, _KupTree_kupManager, "f").scrollOnHover.unregister(this.treeWrapperRef);
|
|
17834
17828
|
}
|
|
17835
17829
|
this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
|
|
17836
17830
|
}
|
|
@@ -17840,6 +17834,7 @@ const KupTree = class {
|
|
|
17840
17834
|
"expanded": ["enrichStructureStateWhenChanged"]
|
|
17841
17835
|
}; }
|
|
17842
17836
|
};
|
|
17837
|
+
_KupTree_kupManager = new WeakMap();
|
|
17843
17838
|
KupTree.style = kupTreeCss;
|
|
17844
17839
|
|
|
17845
17840
|
export { KupAutocomplete as kup_autocomplete, KupBadge as kup_badge, KupButton as kup_button, KupButtonList as kup_button_list, KupCard as kup_card, KupChart as kup_chart, KupCheckbox as kup_checkbox, KupChip as kup_chip, KupColorPicker as kup_color_picker, KupCombobox as kup_combobox, KupDataTable as kup_data_table, KupDatePicker as kup_date_picker, KupDialog as kup_dialog, KupDropdownButton as kup_dropdown_button, KupForm as kup_form, KupGauge as kup_gauge, KupImage as kup_image, KupList as kup_list, KupProgressBar as kup_progress_bar, KupRadio as kup_radio, KupRating as kup_rating, KupSpinner as kup_spinner, KupSwitch as kup_switch, KupTabBar as kup_tab_bar, KupTextField as kup_text_field, KupTimePicker as kup_time_picker, KupTree as kup_tree };
|