@knime/kds-table 0.1.1 → 0.2.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/CHANGELOG.md +18 -0
- package/README.md +0 -2
- package/dist/index.css +70 -65
- package/dist/index.js +105 -82
- package/dist/index.js.map +1 -1
- package/dist/src/components/TableUI.vue.d.ts.map +1 -1
- package/dist/src/components/TableUIWithAutoSizeCalculation.vue.d.ts.map +1 -1
- package/dist/src/components/composables/useOverflowStyles.d.ts +2 -1
- package/dist/src/components/composables/useOverflowStyles.d.ts.map +1 -1
- package/dist/src/components/control/PageControls.vue.d.ts.map +1 -1
- package/dist/src/components/control/TableActionBar.vue.d.ts.map +1 -1
- package/dist/src/components/control/actionbar/SortControl.vue.d.ts.map +1 -1
- package/dist/src/components/layout/Cell.vue.d.ts +2 -2
- package/dist/src/components/layout/CellRenderer.vue.d.ts +2 -2
- package/dist/src/components/layout/CellRenderer.vue.d.ts.map +1 -1
- package/dist/src/components/layout/Header.vue.d.ts.map +1 -1
- package/dist/src/components/layout/Row.vue.d.ts.map +1 -1
- package/dist/src/components/ui/CellExpandButton.vue.d.ts.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/util/constants.d.ts +2 -0
- package/dist/src/util/constants.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -244,7 +244,8 @@ const constants = {
|
|
|
244
244
|
SPECIAL_COLUMNS_SIZE,
|
|
245
245
|
MIN_ROW_HEIGHT,
|
|
246
246
|
DEFAULT_ROW_HEIGHT,
|
|
247
|
-
COMPACT_ROW_HEIGHT
|
|
247
|
+
COMPACT_ROW_HEIGHT,
|
|
248
|
+
CELL_PADDING_HORIZONTAL
|
|
248
249
|
};
|
|
249
250
|
|
|
250
251
|
var B$1 = Object.defineProperty;
|
|
@@ -2643,11 +2644,9 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
2643
2644
|
__expose({ menuButtonEl });
|
|
2644
2645
|
return (_ctx, _cache) => {
|
|
2645
2646
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2646
|
-
createVNode(_sfc_main$1p, mergeProps({
|
|
2647
|
-
ref: "menuButton",
|
|
2647
|
+
createVNode(_sfc_main$1p, mergeProps({ ref: "menuButton" }, toggleButtonProps.value, {
|
|
2648
2648
|
modelValue: isMenuOpen.value,
|
|
2649
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isMenuOpen.value = $event)
|
|
2650
|
-
}, toggleButtonProps.value, {
|
|
2649
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isMenuOpen.value = $event),
|
|
2651
2650
|
"aria-haspopup": "menu",
|
|
2652
2651
|
"aria-expanded": isMenuOpen.value,
|
|
2653
2652
|
"aria-controls": unref(menuId),
|
|
@@ -15333,25 +15332,36 @@ const injectRegisterExpandedSubMenu = () => inject(injectionKey$2).registerExpan
|
|
|
15333
15332
|
const injectionKey$1 = /* @__PURE__ */ Symbol(
|
|
15334
15333
|
"useOverflowStyles.ts"
|
|
15335
15334
|
);
|
|
15336
|
-
const
|
|
15335
|
+
const elIsPresent = (el) => Boolean(el);
|
|
15337
15336
|
const provideOverflowStyles = ({
|
|
15338
15337
|
columnResizeActive,
|
|
15339
|
-
fitsWithoutHorizontalScrollbar
|
|
15340
|
-
|
|
15341
|
-
|
|
15342
|
-
|
|
15343
|
-
|
|
15344
|
-
|
|
15345
|
-
)
|
|
15346
|
-
|
|
15347
|
-
|
|
15348
|
-
|
|
15349
|
-
|
|
15338
|
+
fitsWithoutHorizontalScrollbar,
|
|
15339
|
+
scrolledElement
|
|
15340
|
+
}) => {
|
|
15341
|
+
const verticalScrollbarVisibleAtResizeStart = ref(false);
|
|
15342
|
+
watch(
|
|
15343
|
+
columnResizeActive,
|
|
15344
|
+
(active) => {
|
|
15345
|
+
if (active) {
|
|
15346
|
+
const el = scrolledElement.value;
|
|
15347
|
+
verticalScrollbarVisibleAtResizeStart.value = elIsPresent(el) && el.scrollHeight > el.clientHeight;
|
|
15348
|
+
}
|
|
15349
|
+
},
|
|
15350
|
+
{ flush: "sync" }
|
|
15351
|
+
);
|
|
15352
|
+
provide(
|
|
15353
|
+
injectionKey$1,
|
|
15354
|
+
computed(() => ({
|
|
15355
|
+
overflowX: !columnResizeActive.value && !fitsWithoutHorizontalScrollbar.value ? "auto" : "hidden",
|
|
15356
|
+
overflowY: columnResizeActive.value && verticalScrollbarVisibleAtResizeStart.value ? "scroll" : "auto"
|
|
15357
|
+
}))
|
|
15358
|
+
);
|
|
15359
|
+
};
|
|
15350
15360
|
const useOverflowStyles = () => inject(injectionKey$1);
|
|
15351
15361
|
|
|
15352
15362
|
const injectionKey = /* @__PURE__ */ Symbol("scrollContainerRed");
|
|
15353
15363
|
const provideCommonScrollContainerProps = (containerRef, params) => {
|
|
15354
|
-
provideOverflowStyles(params);
|
|
15364
|
+
provideOverflowStyles({ ...params, scrolledElement: containerRef });
|
|
15355
15365
|
provideForCloseSubMenusOnScroll();
|
|
15356
15366
|
provide(injectionKey, containerRef);
|
|
15357
15367
|
};
|
|
@@ -16155,7 +16165,7 @@ const _hoisted_1$b = {
|
|
|
16155
16165
|
class: "page-navigation"
|
|
16156
16166
|
};
|
|
16157
16167
|
const _hoisted_2$8 = { class: "navigation-buttons" };
|
|
16158
|
-
const _hoisted_3$
|
|
16168
|
+
const _hoisted_3$5 = { class: "page-count" };
|
|
16159
16169
|
const _hoisted_4$3 = { class: "navigation-buttons" };
|
|
16160
16170
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
16161
16171
|
__name: "PageNavigation",
|
|
@@ -16199,7 +16209,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
16199
16209
|
onClick: _cache[1] || (_cache[1] = ($event) => onPageChange(__props.currentPage - 1))
|
|
16200
16210
|
}, null, 8, ["disabled"])
|
|
16201
16211
|
]),
|
|
16202
|
-
createElementVNode("span", _hoisted_3$
|
|
16212
|
+
createElementVNode("span", _hoisted_3$5, toDisplayString(__props.currentPage) + " of " + toDisplayString(totalPages.value), 1),
|
|
16203
16213
|
createElementVNode("div", _hoisted_4$3, [
|
|
16204
16214
|
createVNode(unref(_sfc_main$1s), {
|
|
16205
16215
|
variant: "transparent",
|
|
@@ -16233,7 +16243,7 @@ const _hoisted_2$7 = {
|
|
|
16233
16243
|
key: 1,
|
|
16234
16244
|
class: "row-range-container"
|
|
16235
16245
|
};
|
|
16236
|
-
const _hoisted_3$
|
|
16246
|
+
const _hoisted_3$4 = { class: "subtle" };
|
|
16237
16247
|
const _hoisted_4$2 = {
|
|
16238
16248
|
key: 0,
|
|
16239
16249
|
class: "muted"
|
|
@@ -16262,7 +16272,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
16262
16272
|
);
|
|
16263
16273
|
return (_ctx, _cache) => {
|
|
16264
16274
|
return __props.showTableSize && __props.currentItems === 0 ? (openBlock(), createElementBlock("span", _hoisted_1$a, "No data")) : (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
16265
|
-
createElementVNode("span", _hoisted_3$
|
|
16275
|
+
createElementVNode("span", _hoisted_3$4, toDisplayString(__props.rowLabel) + ":", 1),
|
|
16266
16276
|
hasMultiplePages.value && __props.currentItems ? (openBlock(), createElementBlock("span", _hoisted_4$2, toDisplayString(pageRangeStart.value) + "–" + toDisplayString(pageRangeEnd.value), 1)) : createCommentVNode("", true),
|
|
16267
16277
|
createElementVNode("span", _hoisted_5$1, toDisplayString(rowCountText.value), 1)
|
|
16268
16278
|
]));
|
|
@@ -16302,7 +16312,7 @@ const _sfc_main$e = {
|
|
|
16302
16312
|
},
|
|
16303
16313
|
onPageSizeSelect(newPageSize) {
|
|
16304
16314
|
consola.debug("Updated table page size: ", newPageSize);
|
|
16305
|
-
this.$emit("pageSizeUpdate", parseInt(newPageSize, 10));
|
|
16315
|
+
this.$emit("pageSizeUpdate", Number.parseInt(newPageSize, 10));
|
|
16306
16316
|
}
|
|
16307
16317
|
}
|
|
16308
16318
|
};
|
|
@@ -16341,7 +16351,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16341
16351
|
])
|
|
16342
16352
|
]);
|
|
16343
16353
|
}
|
|
16344
|
-
const PageControls = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["render", _sfc_render$4], ["__scopeId", "data-v-
|
|
16354
|
+
const PageControls = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["render", _sfc_render$4], ["__scopeId", "data-v-df9e464a"]]);
|
|
16345
16355
|
|
|
16346
16356
|
const _hoisted_1$8 = {
|
|
16347
16357
|
key: 0,
|
|
@@ -16557,14 +16567,14 @@ const _sfc_main$c = { };
|
|
|
16557
16567
|
|
|
16558
16568
|
const _hoisted_1$7 = { class: "popover" };
|
|
16559
16569
|
const _hoisted_2$4 = { class: "header" };
|
|
16560
|
-
const _hoisted_3$
|
|
16570
|
+
const _hoisted_3$3 = { class: "body" };
|
|
16561
16571
|
|
|
16562
16572
|
function _sfc_render$3(_ctx, _cache) {
|
|
16563
16573
|
return (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
16564
16574
|
createElementVNode("span", _hoisted_2$4, [
|
|
16565
16575
|
renderSlot(_ctx.$slots, "header", {}, undefined, true)
|
|
16566
16576
|
]),
|
|
16567
|
-
createElementVNode("div", _hoisted_3$
|
|
16577
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
16568
16578
|
renderSlot(_ctx.$slots, "body", {}, undefined, true)
|
|
16569
16579
|
])
|
|
16570
16580
|
]))
|
|
@@ -16738,15 +16748,15 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
16738
16748
|
}
|
|
16739
16749
|
emit(
|
|
16740
16750
|
"columnSort",
|
|
16741
|
-
parseInt(colInd, 10),
|
|
16751
|
+
Number.parseInt(colInd, 10),
|
|
16742
16752
|
props.sortConfig?.sortDirection || 1
|
|
16743
16753
|
);
|
|
16744
16754
|
};
|
|
16745
16755
|
const onSortDirectionChange = (direction) => {
|
|
16746
16756
|
emit(
|
|
16747
16757
|
"columnSort",
|
|
16748
|
-
parseInt(selectedColumn.value, 10),
|
|
16749
|
-
parseInt(direction, 10)
|
|
16758
|
+
Number.parseInt(selectedColumn.value, 10),
|
|
16759
|
+
Number.parseInt(direction, 10)
|
|
16750
16760
|
);
|
|
16751
16761
|
};
|
|
16752
16762
|
return (_ctx, _cache) => {
|
|
@@ -16811,14 +16821,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
16811
16821
|
}
|
|
16812
16822
|
});
|
|
16813
16823
|
|
|
16814
|
-
const SortControl = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__scopeId", "data-v-
|
|
16824
|
+
const SortControl = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__scopeId", "data-v-80bf221a"]]);
|
|
16815
16825
|
|
|
16816
16826
|
const _hoisted_1$5 = { class: "left" };
|
|
16817
16827
|
const _hoisted_2$3 = {
|
|
16818
16828
|
key: 0,
|
|
16819
16829
|
class: "title"
|
|
16820
16830
|
};
|
|
16821
|
-
const _hoisted_3$
|
|
16831
|
+
const _hoisted_3$2 = {
|
|
16822
16832
|
key: 1,
|
|
16823
16833
|
class: "dimension"
|
|
16824
16834
|
};
|
|
@@ -16848,11 +16858,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
16848
16858
|
() => Boolean(__props.title) || __props.showTableSize || __props.showSortControl || __props.showFilterControl
|
|
16849
16859
|
);
|
|
16850
16860
|
const hasRows = computed(() => __props.allRowsCount > 0);
|
|
16851
|
-
const shouldAppendOfRows = computed(() => __props.filteredRowsCount
|
|
16861
|
+
const shouldAppendOfRows = computed(() => __props.filteredRowsCount < __props.allRowsCount);
|
|
16852
16862
|
const hasColumns = computed(() => __props.allColumnsCount > 0);
|
|
16853
16863
|
const hasLessThanTwoColumns = computed(() => __props.allColumnsCount < 2);
|
|
16854
16864
|
const shouldAppendOfColumns = computed(
|
|
16855
|
-
() => __props.filteredColumnsCount
|
|
16865
|
+
() => __props.filteredColumnsCount < __props.allColumnsCount
|
|
16856
16866
|
);
|
|
16857
16867
|
const hasSettingsItems = computed(() => __props.settingsItems.length > 0);
|
|
16858
16868
|
const formatCount = (label, filteredCount, totalCount, appendTotal) => `${label}: ${filteredCount}${appendTotal ? ` of ${totalCount}` : ""}`;
|
|
@@ -16892,7 +16902,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
16892
16902
|
}, [
|
|
16893
16903
|
createElementVNode("div", _hoisted_1$5, [
|
|
16894
16904
|
__props.title ? (openBlock(), createElementBlock("span", _hoisted_2$3, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
16895
|
-
__props.showTableSize ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
16905
|
+
__props.showTableSize ? (openBlock(), createElementBlock("span", _hoisted_3$2, toDisplayString(dimensionText.value), 1)) : createCommentVNode("", true),
|
|
16896
16906
|
__props.showSortControl ? (openBlock(), createBlock(SortControl, {
|
|
16897
16907
|
key: 2,
|
|
16898
16908
|
"sort-config": __props.sortConfig,
|
|
@@ -16931,7 +16941,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
16931
16941
|
}
|
|
16932
16942
|
});
|
|
16933
16943
|
|
|
16934
|
-
const TableActionBar = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__scopeId", "data-v-
|
|
16944
|
+
const TableActionBar = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__scopeId", "data-v-8cfb3c41"]]);
|
|
16935
16945
|
|
|
16936
16946
|
const _sfc_main$8 = {
|
|
16937
16947
|
components: {
|
|
@@ -17244,10 +17254,12 @@ const _sfc_main$8 = {
|
|
|
17244
17254
|
|
|
17245
17255
|
const _hoisted_1$4 = {
|
|
17246
17256
|
key: 0,
|
|
17247
|
-
|
|
17257
|
+
scope: "col",
|
|
17258
|
+
class: "deletion-cell-spacer",
|
|
17259
|
+
"aria-label": "Delete row"
|
|
17248
17260
|
};
|
|
17249
17261
|
const _hoisted_2$2 = ["tabindex", "onFocus", "onBlur", "onClick", "onKeydown"];
|
|
17250
|
-
const _hoisted_3 = ["title"];
|
|
17262
|
+
const _hoisted_3$1 = ["title"];
|
|
17251
17263
|
const _hoisted_4 = {
|
|
17252
17264
|
key: 0,
|
|
17253
17265
|
class: "sub-header-text-container"
|
|
@@ -17269,6 +17281,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
17269
17281
|
$props.tableConfig.enableRowDeletion ? (openBlock(), createElementBlock("th", _hoisted_1$4)) : createCommentVNode("", true),
|
|
17270
17282
|
$props.tableConfig.showSelection ? (openBlock(), createElementBlock("th", {
|
|
17271
17283
|
key: 1,
|
|
17284
|
+
scope: "col",
|
|
17272
17285
|
class: "select-cell",
|
|
17273
17286
|
onKeydown: _cache[0] || (_cache[0] = withKeys(withModifiers(($event) => _ctx.$emit("selectionKeydownDown"), ["prevent", "stop"]), ["down"]))
|
|
17274
17287
|
}, [
|
|
@@ -17286,6 +17299,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
17286
17299
|
key: ind,
|
|
17287
17300
|
ref_for: true,
|
|
17288
17301
|
ref: `columnHeader-${ind}`,
|
|
17302
|
+
scope: "col",
|
|
17289
17303
|
style: normalizeStyle({
|
|
17290
17304
|
width: `calc(${$props.columnSizes[ind] || $data.minimumColumnWidth}px)`,
|
|
17291
17305
|
...$props.columnHeaderColors[ind] ? { "--data-cell-color": $props.columnHeaderColors[ind] } : {}
|
|
@@ -17332,7 +17346,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
17332
17346
|
ref_for: true,
|
|
17333
17347
|
ref: `headerText-${ind}`
|
|
17334
17348
|
}, toDisplayString(header), 513)
|
|
17335
|
-
], 8, _hoisted_3)
|
|
17349
|
+
], 8, _hoisted_3$1)
|
|
17336
17350
|
], 512),
|
|
17337
17351
|
$props.columnSubHeaders[ind] ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
17338
17352
|
renderSlot(_ctx.$slots, "subHeader", {
|
|
@@ -17362,7 +17376,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
17362
17376
|
ariaLabel: "Table column options",
|
|
17363
17377
|
items: $props.columnSubMenuItems[ind],
|
|
17364
17378
|
size: "small",
|
|
17365
|
-
variant: "
|
|
17379
|
+
variant: "transparent",
|
|
17366
17380
|
"leading-icon": "more-actions",
|
|
17367
17381
|
onKeydown: withKeys(withModifiers(($event) => $options.onKeydownDown(ind), ["prevent", "stop"]), ["down"])
|
|
17368
17382
|
}, null, 8, ["items", "onKeydown"])
|
|
@@ -17390,7 +17404,9 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
17390
17404
|
$props.showNewColumnButton ? (openBlock(), createElementBlock("th", {
|
|
17391
17405
|
key: 2,
|
|
17392
17406
|
ref: "new-column-button-head",
|
|
17407
|
+
scope: "col",
|
|
17393
17408
|
class: "new-column-head",
|
|
17409
|
+
"aria-label": "Add column",
|
|
17394
17410
|
onVnodeMounted: _cache[6] || (_cache[6] = (...args) => $options.emitNewColumnButtonWidth && $options.emitNewColumnButtonWidth(...args))
|
|
17395
17411
|
}, [
|
|
17396
17412
|
createVNode(_component_KdsButton, {
|
|
@@ -17413,7 +17429,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
17413
17429
|
}, null, 6)) : createCommentVNode("", true)
|
|
17414
17430
|
]);
|
|
17415
17431
|
}
|
|
17416
|
-
const Header = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$2], ["__scopeId", "data-v-
|
|
17432
|
+
const Header = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$2], ["__scopeId", "data-v-08a86b18"]]);
|
|
17417
17433
|
|
|
17418
17434
|
const _hoisted_1$3 = { class: "sticky-container" };
|
|
17419
17435
|
const buttonRef = "button";
|
|
@@ -17456,6 +17472,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
17456
17472
|
return (_ctx, _cache) => {
|
|
17457
17473
|
return openBlock(), createElementBlock("div", {
|
|
17458
17474
|
role: "button",
|
|
17475
|
+
tabindex: "-1",
|
|
17459
17476
|
class: normalizeClass(["expand-button", { toggled: __props.toggled }]),
|
|
17460
17477
|
"aria-label": "Open data value view",
|
|
17461
17478
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
|
@@ -17469,10 +17486,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
17469
17486
|
}
|
|
17470
17487
|
});
|
|
17471
17488
|
|
|
17472
|
-
const CellExpandButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__scopeId", "data-v-
|
|
17489
|
+
const CellExpandButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__scopeId", "data-v-f204ddf3"]]);
|
|
17473
17490
|
|
|
17474
17491
|
const _hoisted_1$2 = ["title"];
|
|
17475
17492
|
const _hoisted_2$1 = {
|
|
17493
|
+
ref: "cell-content",
|
|
17494
|
+
class: "cell-content"
|
|
17495
|
+
};
|
|
17496
|
+
const _hoisted_3 = {
|
|
17476
17497
|
key: 3,
|
|
17477
17498
|
class: "cell-text"
|
|
17478
17499
|
};
|
|
@@ -17539,14 +17560,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
17539
17560
|
paddingBottom: `${paddingTopBottom2}px`
|
|
17540
17561
|
};
|
|
17541
17562
|
});
|
|
17542
|
-
const
|
|
17563
|
+
const cellContent = useTemplateRef("cell-content");
|
|
17543
17564
|
const getCellContentDimensions = () => {
|
|
17544
|
-
const
|
|
17565
|
+
const firstElementChild = cellContent.value?.firstElementChild;
|
|
17545
17566
|
let widthDataCellFirstChild = 0;
|
|
17546
17567
|
let heightDataCellFirstChild = 0;
|
|
17547
|
-
if (
|
|
17548
|
-
widthDataCellFirstChild = Math.ceil(
|
|
17549
|
-
heightDataCellFirstChild = Math.ceil(
|
|
17568
|
+
if (firstElementChild) {
|
|
17569
|
+
widthDataCellFirstChild = Math.ceil(firstElementChild.scrollWidth);
|
|
17570
|
+
heightDataCellFirstChild = Math.ceil(firstElementChild.scrollHeight);
|
|
17550
17571
|
}
|
|
17551
17572
|
return {
|
|
17552
17573
|
width: props.defaultLeftRightPadding * 2 + widthDataCellFirstChild,
|
|
@@ -17610,8 +17631,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
17610
17631
|
onMounted(changeExpandedCellViewIfNecessary);
|
|
17611
17632
|
return (_ctx, _cache) => {
|
|
17612
17633
|
return openBlock(), createElementBlock("td", {
|
|
17613
|
-
ref_key: "dataCell",
|
|
17614
|
-
ref: dataCell,
|
|
17615
17634
|
class: normalizeClass([
|
|
17616
17635
|
__props.classes,
|
|
17617
17636
|
"data-cell",
|
|
@@ -17639,28 +17658,30 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
17639
17658
|
onPointerdown: onPointerDown,
|
|
17640
17659
|
onInput: _cache[4] || (_cache[4] = (val) => emit("input", { value: val, cell: _ctx.$el }))
|
|
17641
17660
|
}, [
|
|
17642
|
-
|
|
17643
|
-
|
|
17644
|
-
|
|
17645
|
-
|
|
17646
|
-
|
|
17647
|
-
|
|
17648
|
-
|
|
17649
|
-
|
|
17650
|
-
|
|
17651
|
-
|
|
17652
|
-
|
|
17653
|
-
|
|
17654
|
-
|
|
17655
|
-
|
|
17656
|
-
|
|
17657
|
-
|
|
17661
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
17662
|
+
__props.isEditing ? renderSlot(_ctx.$slots, "editable-cell", {
|
|
17663
|
+
key: 0,
|
|
17664
|
+
cellElement: _ctx.$el
|
|
17665
|
+
}, void 0, true) : __props.isMissing ? (openBlock(), createBlock(unref(KdsMissingValueIcon), {
|
|
17666
|
+
key: 1,
|
|
17667
|
+
size: "small"
|
|
17668
|
+
})) : __props.isSlotted ? renderSlot(_ctx.$slots, "default", {
|
|
17669
|
+
key: 2,
|
|
17670
|
+
width: __props.size - props.defaultLeftRightPadding * 2 - (showCellExpandButton.value ? unref(EXPAND_BUTTON_WIDTH) : 0)
|
|
17671
|
+
}, void 0, true) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.text), 1)),
|
|
17672
|
+
showCellExpandButton.value ? (openBlock(), createBlock(CellExpandButton, {
|
|
17673
|
+
key: 4,
|
|
17674
|
+
toggled: isExpanded.value,
|
|
17675
|
+
onPointerdown: onExpandButtonPointerDown,
|
|
17676
|
+
onClick: onExpandButtonClick
|
|
17677
|
+
}, null, 8, ["toggled"])) : createCommentVNode("", true)
|
|
17678
|
+
], 512)
|
|
17658
17679
|
], 46, _hoisted_1$2);
|
|
17659
17680
|
};
|
|
17660
17681
|
}
|
|
17661
17682
|
});
|
|
17662
17683
|
|
|
17663
|
-
const CellRenderer = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["__scopeId", "data-v-
|
|
17684
|
+
const CellRenderer = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["__scopeId", "data-v-698a5d81"]]);
|
|
17664
17685
|
|
|
17665
17686
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
17666
17687
|
__name: "Cell",
|
|
@@ -17996,13 +18017,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
17996
18017
|
style: normalizeStyle({
|
|
17997
18018
|
paddingTop: `${paddingTopBottom.value}px`,
|
|
17998
18019
|
paddingBottom: `${paddingTopBottom.value}px`
|
|
17999
|
-
})
|
|
18000
|
-
onKeydown: [
|
|
18001
|
-
_cache[4] || (_cache[4] = withKeys(withModifiers(($event) => onVirtualColumnKeydown("selection", "up"), ["prevent", "stop"]), ["up"])),
|
|
18002
|
-
_cache[5] || (_cache[5] = withKeys(withModifiers(($event) => onVirtualColumnKeydown("selection", "down"), ["prevent", "stop"]), ["down"])),
|
|
18003
|
-
_cache[6] || (_cache[6] = withKeys(withModifiers(($event) => onVirtualColumnKeydown("selection", "left"), ["prevent", "stop"]), ["left"])),
|
|
18004
|
-
_cache[7] || (_cache[7] = withKeys(withModifiers(($event) => onVirtualColumnKeydown("selection", "right"), ["prevent", "stop"]), ["right"]))
|
|
18005
|
-
]
|
|
18020
|
+
})
|
|
18006
18021
|
}, [
|
|
18007
18022
|
createVNode(unref(_sfc_main$10), {
|
|
18008
18023
|
ref_key: "selectionCheckbox",
|
|
@@ -18011,9 +18026,17 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
18011
18026
|
class: "select-checkbox",
|
|
18012
18027
|
"model-value": __props.isSelected,
|
|
18013
18028
|
disabled: __props.tableConfig.disableSelection,
|
|
18014
|
-
"onUpdate:modelValue": onSelect
|
|
18029
|
+
"onUpdate:modelValue": onSelect,
|
|
18030
|
+
onKeydown: [
|
|
18031
|
+
_cache[4] || (_cache[4] = withKeys(withModifiers(($event) => onVirtualColumnKeydown("selection", "up"), ["prevent", "stop"]), ["up"])),
|
|
18032
|
+
_cache[5] || (_cache[5] = withKeys(withModifiers(($event) => onVirtualColumnKeydown("selection", "down"), ["prevent", "stop"]), ["down"])),
|
|
18033
|
+
_cache[6] || (_cache[6] = withKeys(withModifiers(($event) => onVirtualColumnKeydown("selection", "left"), ["prevent", "stop"]), ["left"])),
|
|
18034
|
+
_cache[7] || (_cache[7] = withKeys(withModifiers(($event) => onVirtualColumnKeydown("selection", "right"), ["prevent", "stop"]), ["right"]))
|
|
18035
|
+
],
|
|
18036
|
+
onFocusout: _cache[8] || (_cache[8] = withModifiers(() => {
|
|
18037
|
+
}, ["stop"]))
|
|
18015
18038
|
}, null, 8, ["model-value", "disabled"])
|
|
18016
|
-
],
|
|
18039
|
+
], 4)) : createCommentVNode("", true),
|
|
18017
18040
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(indexedRow), ([cell, ind]) => {
|
|
18018
18041
|
return openBlock(), createBlock(_sfc_main$4, {
|
|
18019
18042
|
ref_for: true,
|
|
@@ -18063,13 +18086,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
18063
18086
|
filteredSubMenuItems.value?.length ? (openBlock(), createElementBlock("td", _hoisted_2, [
|
|
18064
18087
|
createVNode(unref(_sfc_main$1h), {
|
|
18065
18088
|
modelValue: isMenuOpen.value,
|
|
18066
|
-
"onUpdate:modelValue": _cache[
|
|
18089
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => isMenuOpen.value = $event),
|
|
18067
18090
|
ariaLabel: "More actions",
|
|
18068
18091
|
items: filteredSubMenuItems.value,
|
|
18069
18092
|
size: "small",
|
|
18070
18093
|
variant: "transparent",
|
|
18071
18094
|
"leading-icon": "more-actions",
|
|
18072
|
-
onItemClick: _cache[
|
|
18095
|
+
onItemClick: _cache[10] || (_cache[10] = ($event) => emit("rowSubMenuClick", $event))
|
|
18073
18096
|
}, null, 8, ["modelValue", "items"])
|
|
18074
18097
|
])) : createCommentVNode("", true),
|
|
18075
18098
|
__props.newColumnButtonWidth ? (openBlock(), createElementBlock("td", {
|
|
@@ -18082,9 +18105,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
18082
18105
|
class: "row-drag-handle",
|
|
18083
18106
|
onPointerdownPassive: onPointerDown,
|
|
18084
18107
|
onPointerupPassive: onPointerUp,
|
|
18085
|
-
onPointermove: _cache[
|
|
18108
|
+
onPointermove: _cache[11] || (_cache[11] = //@ts-ignore
|
|
18086
18109
|
(...args) => unref(onPointerMove) && unref(onPointerMove)(...args)),
|
|
18087
|
-
onLostpointercapture: _cache[
|
|
18110
|
+
onLostpointercapture: _cache[12] || (_cache[12] = //@ts-ignore
|
|
18088
18111
|
(...args) => unref(onLostPointerCapture) && unref(onLostPointerCapture)(...args))
|
|
18089
18112
|
}, null, 32)) : createCommentVNode("", true)
|
|
18090
18113
|
], 64);
|
|
@@ -18092,7 +18115,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
18092
18115
|
}
|
|
18093
18116
|
});
|
|
18094
18117
|
|
|
18095
|
-
const Row = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__scopeId", "data-v-
|
|
18118
|
+
const Row = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__scopeId", "data-v-0ad921a2"]]);
|
|
18096
18119
|
|
|
18097
18120
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
18098
18121
|
__name: "CellSelectionOverlay",
|
|
@@ -19856,7 +19879,7 @@ const _sfc_main = {
|
|
|
19856
19879
|
if (!fixedSizes.hasOwnProperty(columnId)) {
|
|
19857
19880
|
const { width, height } = cellComponents[columnIndex].getCellContentDimensions();
|
|
19858
19881
|
sizesByColumn[columnId] = width;
|
|
19859
|
-
heightsByColumn[columnId] = height;
|
|
19882
|
+
heightsByColumn[columnId] = height + ROW_BORDER_BOTTOM_WIDTH;
|
|
19860
19883
|
}
|
|
19861
19884
|
});
|
|
19862
19885
|
autoColumnSizes.push(sizesByColumn);
|
|
@@ -19947,7 +19970,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19947
19970
|
]), 1032, ["data", "current-selection", "data-config", "table-config", "onVnodeMounted"])) : createCommentVNode("", true)
|
|
19948
19971
|
], 64);
|
|
19949
19972
|
}
|
|
19950
|
-
const TableUIWithAutoSizeCalculation = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
19973
|
+
const TableUIWithAutoSizeCalculation = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ea7bec0f"]]);
|
|
19951
19974
|
|
|
19952
19975
|
const getColumnDomains = ({ data, formatters, types }) => {
|
|
19953
19976
|
let domainMap = {};
|
|
@@ -20542,5 +20565,5 @@ const sort = (sortConfig) => {
|
|
|
20542
20565
|
);
|
|
20543
20566
|
};
|
|
20544
20567
|
|
|
20545
|
-
export {
|
|
20568
|
+
export { TableActionBar, TableUI, TableUIWithAutoSizeCalculation, checkTimeFilter, columnFilterConfigs, columnSortText, columnTypes, constants, defaultPageSize, defaultTimeFilter, filter, filterComponents, getColumnDomains, getDefaultFilterValues, getFilterConfigs, getInitialFilterValues, getMissingValueMessage, getNextPage, getProcessedRowInd, group, isMissingValue, months, paginate, sort, tablePageSizes, tableTimeFilters, typeFormatters, unpackObjectRepresentation, valueTypeFormatters };
|
|
20546
20569
|
//# sourceMappingURL=index.js.map
|