@knime/kds-table 0.6.3 → 0.7.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 +37 -0
- package/dist/index.css +47 -63
- package/dist/index.js +101 -548
- package/dist/index.js.map +1 -1
- package/dist/src/components/TableCore.vue.d.ts.map +1 -1
- package/dist/src/components/TableUI.vue.d.ts +280 -498
- package/dist/src/components/TableUI.vue.d.ts.map +1 -1
- package/dist/src/components/TableUIWithAutoSizeCalculation.vue.d.ts +285 -502
- package/dist/src/components/TableUIWithAutoSizeCalculation.vue.d.ts.map +1 -1
- package/dist/src/components/composables/useHeaderMenuItems.d.ts +2 -8
- package/dist/src/components/composables/useHeaderMenuItems.d.ts.map +1 -1
- package/dist/src/components/control/TableActionBar.vue.d.ts +18 -196
- 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.map +1 -1
- package/dist/src/components/layout/Header.vue.d.ts +12 -27
- package/dist/src/components/layout/Header.vue.d.ts.map +1 -1
- package/dist/src/components/layout/HeaderCell.vue.d.ts +2 -6
- package/dist/src/components/layout/HeaderCell.vue.d.ts.map +1 -1
- package/dist/src/config/table.config.d.ts +0 -43
- package/dist/src/config/table.config.d.ts.map +1 -1
- package/dist/src/index.d.ts +10 -13
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types/ActionConfig.d.ts +0 -2
- package/dist/src/types/ActionConfig.d.ts.map +1 -1
- package/dist/src/types/ColumnConfig.d.ts +2 -9
- package/dist/src/types/ColumnConfig.d.ts.map +1 -1
- package/dist/src/types/ColumnState.d.ts +0 -7
- package/dist/src/types/ColumnState.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/src/components/control/actionbar/FilterControl.vue.d.ts +0 -176
- package/dist/src/components/control/actionbar/FilterControl.vue.d.ts.map +0 -1
- package/dist/src/components/control/actionbar/FilterControlBody.vue.d.ts +0 -14
- package/dist/src/components/control/actionbar/FilterControlBody.vue.d.ts.map +0 -1
- package/dist/src/components/control/actionbar/filterConfigActive.d.ts +0 -6
- package/dist/src/components/control/actionbar/filterConfigActive.d.ts.map +0 -1
- package/dist/src/types/FilterConfig.d.ts +0 -37
- package/dist/src/types/FilterConfig.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
import { computed, unref, watch, ref, isRef, watchEffect, getCurrentScope, onScopeDispose, getCurrentInstance, onMounted, inject, provide, defineComponent, openBlock, createElementBlock, withModifiers, renderSlot, toRef, normalizeStyle, normalizeClass, createCommentVNode, createVNode, Fragment, renderList, createElementVNode, createBlock, nextTick, withCtx, onBeforeUnmount, reactive, onUnmounted, toDisplayString, resolveComponent, useTemplateRef, createTextVNode, shallowRef, toValue, shallowReadonly, withKeys, withDirectives, mergeProps,
|
|
2
|
-
import { KdsCheckbox, KdsLoadingSkeleton, KdsButton, KdsMenuButton,
|
|
1
|
+
import { computed, unref, watch, ref, isRef, watchEffect, getCurrentScope, onScopeDispose, getCurrentInstance, onMounted, inject, provide, defineComponent, openBlock, createElementBlock, withModifiers, renderSlot, toRef, normalizeStyle, normalizeClass, createCommentVNode, createVNode, Fragment, renderList, createElementVNode, createBlock, nextTick, withCtx, onBeforeUnmount, reactive, onUnmounted, toDisplayString, resolveComponent, useTemplateRef, createTextVNode, useSlots, shallowRef, toValue, shallowReadonly, withKeys, withDirectives, mergeProps, createSlots, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
|
+
import { KdsCheckbox, KdsLoadingSkeleton, KdsButton, KdsMenuButton, KdsToggleButton, KdsPopover, KdsDropdown, KdsIcon, KdsSearchInput, vKdsTooltip, KdsMissingValueIcon } from '@knime/kds-components';
|
|
3
3
|
|
|
4
4
|
import './index.css';const defaultPageSize = 10;
|
|
5
|
-
const filterComponents = {
|
|
6
|
-
Multiselect: {
|
|
7
|
-
is: "ControlMultiselect",
|
|
8
|
-
getInitialValue: () => []
|
|
9
|
-
},
|
|
10
|
-
InputField: {
|
|
11
|
-
is: "FilterInputField",
|
|
12
|
-
getInitialValue: () => ""
|
|
13
|
-
},
|
|
14
|
-
Dropdown: {
|
|
15
|
-
is: "ControlDropdown",
|
|
16
|
-
getInitialValue: () => ""
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
5
|
const columnTypes = {
|
|
20
6
|
Nominal: "Nominal",
|
|
21
7
|
String: "String",
|
|
@@ -27,19 +13,6 @@ const columnTypes = {
|
|
|
27
13
|
Object: "Object",
|
|
28
14
|
Image: "Image"
|
|
29
15
|
};
|
|
30
|
-
const columnFilterConfigs = {
|
|
31
|
-
[columnTypes.Nominal]: filterComponents.Multiselect,
|
|
32
|
-
[columnTypes.String]: filterComponents.InputField,
|
|
33
|
-
[columnTypes.DateTime]: filterComponents.InputField,
|
|
34
|
-
[columnTypes.Duration]: filterComponents.InputField,
|
|
35
|
-
[columnTypes.Number]: filterComponents.InputField,
|
|
36
|
-
[columnTypes.Boolean]: filterComponents.Dropdown,
|
|
37
|
-
[columnTypes.Array]: filterComponents.InputField,
|
|
38
|
-
[columnTypes.Object]: filterComponents.InputField,
|
|
39
|
-
[columnTypes.Image]: filterComponents.InputField,
|
|
40
|
-
// @ts-expect-error - undefined key to assign default filter component
|
|
41
|
-
[void 0]: filterComponents.InputField
|
|
42
|
-
};
|
|
43
16
|
const columnSortText = {
|
|
44
17
|
[columnTypes.Nominal]: {
|
|
45
18
|
ascending: "A to Z",
|
|
@@ -2710,8 +2683,6 @@ const modeDefinitions = [
|
|
|
2710
2683
|
}
|
|
2711
2684
|
];
|
|
2712
2685
|
Object.assign({}, ...modeDefinitions.map((obj) => ({ [obj.id]: obj })));
|
|
2713
|
-
|
|
2714
|
-
const isMac = () => navigator?.userAgent?.toLowerCase()?.includes("mac");
|
|
2715
2686
|
const yearsPart = "(\\d+)\\s*y(?:ears?)?";
|
|
2716
2687
|
const monthsPart = "(\\d+)\\s*m(?:o(?:nths?)?)?";
|
|
2717
2688
|
const weeksPart = "(\\d+)\\s*w(?:eeks?)?";
|
|
@@ -2739,6 +2710,8 @@ new RegExp(
|
|
|
2739
2710
|
function sleep(ms) {
|
|
2740
2711
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
2741
2712
|
}
|
|
2713
|
+
|
|
2714
|
+
const isMac = () => navigator?.userAgent?.toLowerCase()?.includes("mac");
|
|
2742
2715
|
const getMetaOrCtrlKey = () => {
|
|
2743
2716
|
return isMac() ? "metaKey" : "ctrlKey";
|
|
2744
2717
|
};
|
|
@@ -2776,7 +2749,7 @@ const useStartEditingKeydown = ({
|
|
|
2776
2749
|
return { onKeydown };
|
|
2777
2750
|
};
|
|
2778
2751
|
|
|
2779
|
-
const _sfc_main$
|
|
2752
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
2780
2753
|
__name: "TableBodyNavigatable",
|
|
2781
2754
|
emits: ["moveSelection", "clearSelection", "expandSelectedCell", "startEditing", "bodyFocusin", "bodyFocusout"],
|
|
2782
2755
|
setup(__props, { emit: __emit }) {
|
|
@@ -2859,7 +2832,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
2859
2832
|
return target;
|
|
2860
2833
|
};
|
|
2861
2834
|
|
|
2862
|
-
const TableBodyNavigatable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2835
|
+
const TableBodyNavigatable = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-70f2c330"]]);
|
|
2863
2836
|
|
|
2864
2837
|
const injectionKey$3 = /* @__PURE__ */ Symbol(
|
|
2865
2838
|
"useHorizontalIndicesAndStyles.ts"
|
|
@@ -2964,11 +2937,11 @@ const injectColumnSizes = () => {
|
|
|
2964
2937
|
return context;
|
|
2965
2938
|
};
|
|
2966
2939
|
|
|
2967
|
-
const _hoisted_1$
|
|
2940
|
+
const _hoisted_1$c = {
|
|
2968
2941
|
key: 0,
|
|
2969
2942
|
class: "deletion-cell-spacer"
|
|
2970
2943
|
};
|
|
2971
|
-
const _sfc_main$
|
|
2944
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
2972
2945
|
__name: "EmptyRow",
|
|
2973
2946
|
props: {
|
|
2974
2947
|
height: {},
|
|
@@ -2992,7 +2965,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2992
2965
|
height: `${__props.height}px`
|
|
2993
2966
|
})
|
|
2994
2967
|
}, [
|
|
2995
|
-
__props.tableConfig.enableRowDeletion ? (openBlock(), createElementBlock("td", _hoisted_1$
|
|
2968
|
+
__props.tableConfig.enableRowDeletion ? (openBlock(), createElementBlock("td", _hoisted_1$c)) : createCommentVNode("", true),
|
|
2996
2969
|
__props.tableConfig.showSelection ? (openBlock(), createElementBlock("td", {
|
|
2997
2970
|
key: 1,
|
|
2998
2971
|
class: "select-cell",
|
|
@@ -3026,9 +2999,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3026
2999
|
}
|
|
3027
3000
|
});
|
|
3028
3001
|
|
|
3029
|
-
const EmptyRow = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3002
|
+
const EmptyRow = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-f722e2bf"]]);
|
|
3030
3003
|
|
|
3031
|
-
const _sfc_main$
|
|
3004
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
3032
3005
|
__name: "PlaceholderRow",
|
|
3033
3006
|
props: {
|
|
3034
3007
|
height: {}
|
|
@@ -3045,9 +3018,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
3045
3018
|
}
|
|
3046
3019
|
});
|
|
3047
3020
|
|
|
3048
|
-
const PlaceholderRow = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3021
|
+
const PlaceholderRow = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-df158652"]]);
|
|
3049
3022
|
|
|
3050
|
-
const _sfc_main$
|
|
3023
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
3051
3024
|
__name: "VirtualRow",
|
|
3052
3025
|
props: {
|
|
3053
3026
|
dataItem: {},
|
|
@@ -3212,7 +3185,7 @@ const useResizeScrollSpacer = ({
|
|
|
3212
3185
|
};
|
|
3213
3186
|
|
|
3214
3187
|
const HORIZONTAL_BUFFER_PX = 1e3;
|
|
3215
|
-
const _sfc_main$
|
|
3188
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
3216
3189
|
__name: "TableCoreVirtual",
|
|
3217
3190
|
props: {
|
|
3218
3191
|
scrollData: {},
|
|
@@ -3365,7 +3338,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
3365
3338
|
style: normalizeStyle(__props.tableConfig.forceRenderAll ? {} : unref(verticalStyles))
|
|
3366
3339
|
}, [
|
|
3367
3340
|
(openBlock(true), createElementBlock(Fragment, null, renderList(renderedRowIndices.value, (rowInd) => {
|
|
3368
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3341
|
+
return openBlock(), createBlock(_sfc_main$i, {
|
|
3369
3342
|
key: rowInd,
|
|
3370
3343
|
"row-height": __props.scrollConfig.itemSize,
|
|
3371
3344
|
compact: __props.scrollConfig.compact,
|
|
@@ -3407,7 +3380,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
3407
3380
|
}
|
|
3408
3381
|
});
|
|
3409
3382
|
|
|
3410
|
-
const TableCoreVirtual = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3383
|
+
const TableCoreVirtual = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-45a530bb"]]);
|
|
3411
3384
|
|
|
3412
3385
|
function getDefaultExportFromCjs (x) {
|
|
3413
3386
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -3563,7 +3536,7 @@ const useAvailableWidth = ({
|
|
|
3563
3536
|
return { innerWidthToBodyWidth, fitsInsideTotalWidth };
|
|
3564
3537
|
};
|
|
3565
3538
|
|
|
3566
|
-
const _sfc_main$
|
|
3539
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
3567
3540
|
__name: "TableCore",
|
|
3568
3541
|
props: {
|
|
3569
3542
|
scrollData: {},
|
|
@@ -3915,11 +3888,11 @@ const createEditingCellKeydownHandler = ({
|
|
|
3915
3888
|
};
|
|
3916
3889
|
};
|
|
3917
3890
|
|
|
3918
|
-
const _hoisted_1$
|
|
3919
|
-
const _hoisted_2$
|
|
3891
|
+
const _hoisted_1$b = { class: "page-navigation" };
|
|
3892
|
+
const _hoisted_2$7 = { class: "navigation-buttons" };
|
|
3920
3893
|
const _hoisted_3$4 = { class: "page-count" };
|
|
3921
3894
|
const _hoisted_4$2 = { class: "navigation-buttons" };
|
|
3922
|
-
const _sfc_main$
|
|
3895
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
3923
3896
|
__name: "PageNavigation",
|
|
3924
3897
|
props: {
|
|
3925
3898
|
currentPage: { default: 1 },
|
|
@@ -3935,8 +3908,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
3935
3908
|
emit("pageChange", newPageNumber);
|
|
3936
3909
|
};
|
|
3937
3910
|
return (_ctx, _cache) => {
|
|
3938
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3939
|
-
createElementVNode("div", _hoisted_2$
|
|
3911
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
3912
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
3940
3913
|
createVNode(unref(KdsButton), {
|
|
3941
3914
|
variant: "transparent",
|
|
3942
3915
|
size: "small",
|
|
@@ -3978,13 +3951,13 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
3978
3951
|
}
|
|
3979
3952
|
});
|
|
3980
3953
|
|
|
3981
|
-
const PageNavigation = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3954
|
+
const PageNavigation = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-95577571"]]);
|
|
3982
3955
|
|
|
3983
|
-
const _hoisted_1$
|
|
3956
|
+
const _hoisted_1$a = {
|
|
3984
3957
|
key: 0,
|
|
3985
3958
|
class: "subtle"
|
|
3986
3959
|
};
|
|
3987
|
-
const _hoisted_2$
|
|
3960
|
+
const _hoisted_2$6 = {
|
|
3988
3961
|
key: 1,
|
|
3989
3962
|
class: "row-range-container"
|
|
3990
3963
|
};
|
|
@@ -3994,7 +3967,7 @@ const _hoisted_4$1 = {
|
|
|
3994
3967
|
class: "muted"
|
|
3995
3968
|
};
|
|
3996
3969
|
const _hoisted_5 = { class: "subtle" };
|
|
3997
|
-
const _sfc_main$
|
|
3970
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
3998
3971
|
__name: "PageRowRange",
|
|
3999
3972
|
props: {
|
|
4000
3973
|
currentItems: { default: 0 },
|
|
@@ -4016,7 +3989,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
4016
3989
|
() => hasMultiplePages.value && __props.currentItems ? `of ${__props.currentItems}` : __props.currentItems
|
|
4017
3990
|
);
|
|
4018
3991
|
return (_ctx, _cache) => {
|
|
4019
|
-
return __props.showTableSize && __props.currentItems === 0 ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
3992
|
+
return __props.showTableSize && __props.currentItems === 0 ? (openBlock(), createElementBlock("span", _hoisted_1$a, "No data")) : (openBlock(), createElementBlock("div", _hoisted_2$6, [
|
|
4020
3993
|
createElementVNode("span", _hoisted_3$3, toDisplayString(__props.rowLabel) + ":", 1),
|
|
4021
3994
|
hasMultiplePages.value && __props.currentItems ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(pageRangeStart.value) + "–" + toDisplayString(pageRangeEnd.value), 1)) : createCommentVNode("", true),
|
|
4022
3995
|
createElementVNode("span", _hoisted_5, toDisplayString(rowCountText.value), 1)
|
|
@@ -4025,9 +3998,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
4025
3998
|
}
|
|
4026
3999
|
});
|
|
4027
4000
|
|
|
4028
|
-
const PageRowRange = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4001
|
+
const PageRowRange = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-6cdf0c06"]]);
|
|
4029
4002
|
|
|
4030
|
-
const _sfc_main$
|
|
4003
|
+
const _sfc_main$d = {
|
|
4031
4004
|
components: {
|
|
4032
4005
|
PageNavigation,
|
|
4033
4006
|
PageRowRange,
|
|
@@ -4089,16 +4062,16 @@ const _sfc_main$f = {
|
|
|
4089
4062
|
}
|
|
4090
4063
|
};
|
|
4091
4064
|
|
|
4092
|
-
const _hoisted_1$
|
|
4065
|
+
const _hoisted_1$9 = {
|
|
4093
4066
|
key: 0,
|
|
4094
4067
|
class: "page-controls"
|
|
4095
4068
|
};
|
|
4096
|
-
const _hoisted_2$
|
|
4069
|
+
const _hoisted_2$5 = { class: "page-size-menu" };
|
|
4097
4070
|
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4098
4071
|
const _component_PageRowRange = resolveComponent("PageRowRange");
|
|
4099
4072
|
const _component_PageNavigation = resolveComponent("PageNavigation");
|
|
4100
4073
|
const _component_KdsMenuButton = resolveComponent("KdsMenuButton");
|
|
4101
|
-
return $options.showPageNavigation || $options.pageSizeItems.length ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4074
|
+
return $options.showPageNavigation || $options.pageSizeItems.length ? (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
4102
4075
|
createVNode(_component_PageRowRange, {
|
|
4103
4076
|
class: "page-row-range",
|
|
4104
4077
|
"current-items": $props.tableState.tableSizes?.currentNumRows,
|
|
@@ -4115,7 +4088,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4115
4088
|
"has-previous-page": $options.hasPreviousPage,
|
|
4116
4089
|
onPageChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("pageChange", $event))
|
|
4117
4090
|
}, null, 8, ["current-page", "total-pages", "has-next-page", "has-previous-page"])) : createCommentVNode("", true),
|
|
4118
|
-
createElementVNode("div", _hoisted_2$
|
|
4091
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
4119
4092
|
$options.pageSizeItems.length ? (openBlock(), createBlock(_component_KdsMenuButton, {
|
|
4120
4093
|
key: 0,
|
|
4121
4094
|
items: $options.pageSizeItems,
|
|
@@ -4128,261 +4101,9 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4128
4101
|
])
|
|
4129
4102
|
])) : createCommentVNode("", true);
|
|
4130
4103
|
}
|
|
4131
|
-
const PageControls = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4104
|
+
const PageControls = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$4], ["__scopeId", "data-v-bf51fe76"]]);
|
|
4132
4105
|
|
|
4133
|
-
const
|
|
4134
|
-
if (is === "ControlMultiselect") {
|
|
4135
|
-
return [];
|
|
4136
|
-
}
|
|
4137
|
-
return "";
|
|
4138
|
-
};
|
|
4139
|
-
const missingValueFor = (is) => {
|
|
4140
|
-
if (is === "ControlMultiselect") {
|
|
4141
|
-
return [null];
|
|
4142
|
-
}
|
|
4143
|
-
return null;
|
|
4144
|
-
};
|
|
4145
|
-
const isMissingMode = (config, value) => {
|
|
4146
|
-
if (config.is === "ControlMultiselect") {
|
|
4147
|
-
return Array.isArray(value) && value.length === 1 && value[0] === null;
|
|
4148
|
-
}
|
|
4149
|
-
return value === null;
|
|
4150
|
-
};
|
|
4151
|
-
const isActive = (config, value) => {
|
|
4152
|
-
if (!config) {
|
|
4153
|
-
return false;
|
|
4154
|
-
}
|
|
4155
|
-
if (isMissingMode(config, value)) {
|
|
4156
|
-
return true;
|
|
4157
|
-
}
|
|
4158
|
-
if (config.is === "ControlMultiselect") {
|
|
4159
|
-
return Array.isArray(value) && value.length > 0;
|
|
4160
|
-
}
|
|
4161
|
-
return value !== void 0 && value !== "";
|
|
4162
|
-
};
|
|
4163
|
-
|
|
4164
|
-
const _hoisted_1$9 = {
|
|
4165
|
-
key: 0,
|
|
4166
|
-
class: "rows"
|
|
4167
|
-
};
|
|
4168
|
-
const _hoisted_2$5 = {
|
|
4169
|
-
key: 1,
|
|
4170
|
-
class: "value"
|
|
4171
|
-
};
|
|
4172
|
-
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
4173
|
-
__name: "FilterControlBody",
|
|
4174
|
-
props: {
|
|
4175
|
-
columns: {},
|
|
4176
|
-
colFilterValues: {}
|
|
4177
|
-
},
|
|
4178
|
-
emits: ["columnFilter"],
|
|
4179
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
4180
|
-
const props = __props;
|
|
4181
|
-
const emit = __emit;
|
|
4182
|
-
const MODE_OPTIONS = [
|
|
4183
|
-
{ id: "contains", text: "contains" },
|
|
4184
|
-
{ id: "missing", text: "is missing" }
|
|
4185
|
-
];
|
|
4186
|
-
const withFilteredPossibleValues = (config) => {
|
|
4187
|
-
if (config.is === "ControlDropdown" || config.is === "ControlMultiselect") {
|
|
4188
|
-
return {
|
|
4189
|
-
...config,
|
|
4190
|
-
possibleValues: config.possibleValues.filter(
|
|
4191
|
-
(option) => option.id !== null && option.id !== void 0
|
|
4192
|
-
)
|
|
4193
|
-
};
|
|
4194
|
-
}
|
|
4195
|
-
return config;
|
|
4196
|
-
};
|
|
4197
|
-
const filterableColumnIndices = computed(
|
|
4198
|
-
() => (props.columns ?? []).map((column, index) => ({ config: column.filterConfig, index })).filter(({ config }) => config !== void 0).map(({ index }) => index)
|
|
4199
|
-
);
|
|
4200
|
-
const trackedIndices = ref([]);
|
|
4201
|
-
onMounted(() => {
|
|
4202
|
-
trackedIndices.value = (props.columns ?? []).map((column, index) => ({
|
|
4203
|
-
index,
|
|
4204
|
-
config: column.filterConfig,
|
|
4205
|
-
value: props.colFilterValues[column.id]
|
|
4206
|
-
})).filter(({ config, value }) => isActive(config, value)).map(({ index }) => index);
|
|
4207
|
-
});
|
|
4208
|
-
const visibleFilters = computed(
|
|
4209
|
-
() => trackedIndices.value.map((index, rowPosition) => {
|
|
4210
|
-
const column = props.columns?.[index];
|
|
4211
|
-
const config = column?.filterConfig;
|
|
4212
|
-
const value = props.colFilterValues[column.id];
|
|
4213
|
-
if (!config) {
|
|
4214
|
-
return null;
|
|
4215
|
-
}
|
|
4216
|
-
return {
|
|
4217
|
-
rowPosition,
|
|
4218
|
-
index,
|
|
4219
|
-
config: withFilteredPossibleValues(config),
|
|
4220
|
-
value
|
|
4221
|
-
};
|
|
4222
|
-
}).filter(
|
|
4223
|
-
(entry) => entry !== null
|
|
4224
|
-
)
|
|
4225
|
-
);
|
|
4226
|
-
const canAddMore = computed(
|
|
4227
|
-
() => trackedIndices.value.length < filterableColumnIndices.value.length
|
|
4228
|
-
);
|
|
4229
|
-
const columnDropdownOptionsFor = (currentIndex) => filterableColumnIndices.value.filter(
|
|
4230
|
-
(idx) => idx === currentIndex || !trackedIndices.value.includes(idx)
|
|
4231
|
-
).map((idx) => ({
|
|
4232
|
-
id: String(idx),
|
|
4233
|
-
text: props.columns?.[idx]?.header ?? ""
|
|
4234
|
-
}));
|
|
4235
|
-
const onColumnChange = (rowPosition, newIdAsString) => {
|
|
4236
|
-
const newIndex = Number(newIdAsString);
|
|
4237
|
-
const oldIndex = trackedIndices.value[rowPosition];
|
|
4238
|
-
if (oldIndex === newIndex) {
|
|
4239
|
-
return;
|
|
4240
|
-
}
|
|
4241
|
-
const oldColumn = props.columns?.[oldIndex];
|
|
4242
|
-
const oldConfig = oldColumn?.filterConfig;
|
|
4243
|
-
const oldValue = props.colFilterValues[oldColumn?.id];
|
|
4244
|
-
if (oldConfig && isActive(oldConfig, oldValue)) {
|
|
4245
|
-
emit("columnFilter", oldIndex, defaultValueFor(oldConfig.is));
|
|
4246
|
-
}
|
|
4247
|
-
trackedIndices.value = trackedIndices.value.map(
|
|
4248
|
-
(idx, pos) => pos === rowPosition ? newIndex : idx
|
|
4249
|
-
);
|
|
4250
|
-
};
|
|
4251
|
-
const onModeChange = (index, config, newMode) => {
|
|
4252
|
-
if (newMode === "missing") {
|
|
4253
|
-
emit("columnFilter", index, missingValueFor(config.is));
|
|
4254
|
-
} else {
|
|
4255
|
-
emit("columnFilter", index, defaultValueFor(config.is));
|
|
4256
|
-
}
|
|
4257
|
-
};
|
|
4258
|
-
const onAddCriterion = () => {
|
|
4259
|
-
const nextFree = filterableColumnIndices.value.find(
|
|
4260
|
-
(idx) => !trackedIndices.value.includes(idx)
|
|
4261
|
-
);
|
|
4262
|
-
if (nextFree === void 0) {
|
|
4263
|
-
return;
|
|
4264
|
-
}
|
|
4265
|
-
trackedIndices.value = [...trackedIndices.value, nextFree];
|
|
4266
|
-
};
|
|
4267
|
-
const onDeleteRow = (rowPosition) => {
|
|
4268
|
-
const index = trackedIndices.value[rowPosition];
|
|
4269
|
-
const column = props.columns?.[index];
|
|
4270
|
-
const config = column?.filterConfig;
|
|
4271
|
-
const value = props.colFilterValues[column?.id];
|
|
4272
|
-
if (isActive(config, value)) {
|
|
4273
|
-
emit("columnFilter", index, defaultValueFor(config.is));
|
|
4274
|
-
}
|
|
4275
|
-
trackedIndices.value = trackedIndices.value.filter(
|
|
4276
|
-
(_, pos) => pos !== rowPosition
|
|
4277
|
-
);
|
|
4278
|
-
};
|
|
4279
|
-
const valueRefs = /* @__PURE__ */ new Map();
|
|
4280
|
-
const setValueRef = (columnIndex, el) => {
|
|
4281
|
-
if (el) {
|
|
4282
|
-
valueRefs.set(columnIndex, el);
|
|
4283
|
-
} else {
|
|
4284
|
-
valueRefs.delete(columnIndex);
|
|
4285
|
-
}
|
|
4286
|
-
};
|
|
4287
|
-
const focusValueOfColumn = (columnIndex) => {
|
|
4288
|
-
valueRefs.get(columnIndex)?.focus?.();
|
|
4289
|
-
};
|
|
4290
|
-
const addAndFocusColumn = async (columnIndex) => {
|
|
4291
|
-
if (!filterableColumnIndices.value.includes(columnIndex)) {
|
|
4292
|
-
return;
|
|
4293
|
-
}
|
|
4294
|
-
if (!trackedIndices.value.includes(columnIndex)) {
|
|
4295
|
-
trackedIndices.value = [...trackedIndices.value, columnIndex];
|
|
4296
|
-
await nextTick();
|
|
4297
|
-
}
|
|
4298
|
-
focusValueOfColumn(columnIndex);
|
|
4299
|
-
};
|
|
4300
|
-
__expose({ addAndFocusColumn });
|
|
4301
|
-
return (_ctx, _cache) => {
|
|
4302
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
4303
|
-
visibleFilters.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
4304
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleFilters.value, ({ rowPosition, index, config, value }) => {
|
|
4305
|
-
return openBlock(), createElementBlock("div", {
|
|
4306
|
-
key: index,
|
|
4307
|
-
class: "row"
|
|
4308
|
-
}, [
|
|
4309
|
-
createVNode(unref(KdsDropdown), {
|
|
4310
|
-
class: "column",
|
|
4311
|
-
"model-value": String(index),
|
|
4312
|
-
placeholder: "Select",
|
|
4313
|
-
"possible-values": columnDropdownOptionsFor(index),
|
|
4314
|
-
ariaLabel: "Select column to filter",
|
|
4315
|
-
"onUpdate:modelValue": ($event) => onColumnChange(rowPosition, $event)
|
|
4316
|
-
}, null, 8, ["model-value", "possible-values", "onUpdate:modelValue"]),
|
|
4317
|
-
createVNode(unref(KdsDropdown), {
|
|
4318
|
-
class: "mode",
|
|
4319
|
-
"model-value": unref(isMissingMode)(config, value) ? "missing" : "contains",
|
|
4320
|
-
placeholder: "Mode",
|
|
4321
|
-
"possible-values": MODE_OPTIONS,
|
|
4322
|
-
ariaLabel: "Select filter mode",
|
|
4323
|
-
"onUpdate:modelValue": ($event) => onModeChange(index, config, $event)
|
|
4324
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
4325
|
-
!unref(isMissingMode)(config, value) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4326
|
-
config.is === "FilterInputField" ? (openBlock(), createBlock(unref(KdsTextInput), {
|
|
4327
|
-
key: 0,
|
|
4328
|
-
ref_for: true,
|
|
4329
|
-
ref: (el) => setValueRef(index, el),
|
|
4330
|
-
class: "value",
|
|
4331
|
-
"model-value": value ?? "",
|
|
4332
|
-
placeholder: "value",
|
|
4333
|
-
ariaLabel: "Enter filter value",
|
|
4334
|
-
"onUpdate:modelValue": ($event) => emit("columnFilter", index, $event)
|
|
4335
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])) : config.is === "ControlDropdown" ? (openBlock(), createBlock(unref(KdsDropdown), {
|
|
4336
|
-
key: 1,
|
|
4337
|
-
ref_for: true,
|
|
4338
|
-
ref: (el) => setValueRef(index, el),
|
|
4339
|
-
class: "value",
|
|
4340
|
-
"model-value": value ?? "",
|
|
4341
|
-
placeholder: "value",
|
|
4342
|
-
"possible-values": config.possibleValues,
|
|
4343
|
-
ariaLabel: "Select filter value",
|
|
4344
|
-
"onUpdate:modelValue": ($event) => emit("columnFilter", index, $event)
|
|
4345
|
-
}, null, 8, ["model-value", "possible-values", "onUpdate:modelValue"])) : config.is === "ControlMultiselect" ? (openBlock(), createBlock(unref(KdsMultiSelectDropdown), {
|
|
4346
|
-
key: 2,
|
|
4347
|
-
ref_for: true,
|
|
4348
|
-
ref: (el) => setValueRef(index, el),
|
|
4349
|
-
class: "value",
|
|
4350
|
-
"model-value": value ?? [],
|
|
4351
|
-
placeholder: "value",
|
|
4352
|
-
"possible-values": config.possibleValues,
|
|
4353
|
-
ariaLabel: "Select filter values",
|
|
4354
|
-
"onUpdate:modelValue": ($event) => emit("columnFilter", index, $event)
|
|
4355
|
-
}, null, 8, ["model-value", "possible-values", "onUpdate:modelValue"])) : createCommentVNode("", true)
|
|
4356
|
-
], 64)) : (openBlock(), createElementBlock("span", _hoisted_2$5)),
|
|
4357
|
-
createVNode(unref(KdsButton), {
|
|
4358
|
-
class: "trash",
|
|
4359
|
-
"aria-label": "Remove filter",
|
|
4360
|
-
"leading-icon": "trash",
|
|
4361
|
-
size: "medium",
|
|
4362
|
-
variant: "transparent",
|
|
4363
|
-
ariaLabel: "Remove filter criterion",
|
|
4364
|
-
onClick: ($event) => onDeleteRow(rowPosition)
|
|
4365
|
-
}, null, 8, ["onClick"])
|
|
4366
|
-
]);
|
|
4367
|
-
}), 128))
|
|
4368
|
-
])) : createCommentVNode("", true),
|
|
4369
|
-
canAddMore.value ? (openBlock(), createBlock(unref(KdsButton), {
|
|
4370
|
-
key: 1,
|
|
4371
|
-
class: "add",
|
|
4372
|
-
label: "Add criterion",
|
|
4373
|
-
"leading-icon": "plus",
|
|
4374
|
-
size: "small",
|
|
4375
|
-
variant: "outlined",
|
|
4376
|
-
onClick: onAddCriterion
|
|
4377
|
-
})) : createCommentVNode("", true)
|
|
4378
|
-
], 64);
|
|
4379
|
-
};
|
|
4380
|
-
}
|
|
4381
|
-
});
|
|
4382
|
-
|
|
4383
|
-
const FilterControlBody = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-e5d5e963"]]);
|
|
4384
|
-
|
|
4385
|
-
const _sfc_main$d = { };
|
|
4106
|
+
const _sfc_main$c = { };
|
|
4386
4107
|
|
|
4387
4108
|
const _hoisted_1$8 = { class: "popover" };
|
|
4388
4109
|
const _hoisted_2$4 = { class: "header" };
|
|
@@ -4398,7 +4119,7 @@ function _sfc_render$3(_ctx, _cache) {
|
|
|
4398
4119
|
])
|
|
4399
4120
|
]))
|
|
4400
4121
|
}
|
|
4401
|
-
const PopoverContainer = /*#__PURE__*/_export_sfc(_sfc_main$
|
|
4122
|
+
const PopoverContainer = /*#__PURE__*/_export_sfc(_sfc_main$c, [['render',_sfc_render$3],['__scopeId',"data-v-349cd3ba"]]);
|
|
4402
4123
|
|
|
4403
4124
|
const useButtonPopoverInteraction = ({
|
|
4404
4125
|
keepButtonActive
|
|
@@ -4429,98 +4150,6 @@ const useButtonPopoverInteraction = ({
|
|
|
4429
4150
|
};
|
|
4430
4151
|
};
|
|
4431
4152
|
|
|
4432
|
-
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
4433
|
-
__name: "FilterControl",
|
|
4434
|
-
props: {
|
|
4435
|
-
columns: {},
|
|
4436
|
-
colFilterValues: {}
|
|
4437
|
-
},
|
|
4438
|
-
emits: ["columnFilter"],
|
|
4439
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
4440
|
-
const props = __props;
|
|
4441
|
-
const emit = __emit;
|
|
4442
|
-
const filterPopoverRef = useTemplateRef("filterPopoverRef");
|
|
4443
|
-
const filterBodyRef = useTemplateRef("filterBodyRef");
|
|
4444
|
-
const hasActiveFilter = computed(
|
|
4445
|
-
() => props.columns?.some(
|
|
4446
|
-
(column) => isActive(column.filterConfig, props.colFilterValues[column.id])
|
|
4447
|
-
) ?? false
|
|
4448
|
-
);
|
|
4449
|
-
const {
|
|
4450
|
-
buttonIsActive,
|
|
4451
|
-
showPopover,
|
|
4452
|
-
onButtonClick,
|
|
4453
|
-
onPopoverToggle,
|
|
4454
|
-
openPopover: openPopoverInternal
|
|
4455
|
-
} = useButtonPopoverInteraction({ keepButtonActive: hasActiveFilter });
|
|
4456
|
-
const openPopover = async (columnIndex) => {
|
|
4457
|
-
openPopoverInternal();
|
|
4458
|
-
if (columnIndex === void 0) {
|
|
4459
|
-
return;
|
|
4460
|
-
}
|
|
4461
|
-
await nextTick();
|
|
4462
|
-
filterBodyRef.value?.addAndFocusColumn(columnIndex);
|
|
4463
|
-
};
|
|
4464
|
-
__expose({ openPopover });
|
|
4465
|
-
return (_ctx, _cache) => {
|
|
4466
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
4467
|
-
createVNode(unref(KdsToggleButton), {
|
|
4468
|
-
modelValue: unref(buttonIsActive),
|
|
4469
|
-
"onUpdate:modelValue": [
|
|
4470
|
-
_cache[0] || (_cache[0] = ($event) => isRef(buttonIsActive) ? buttonIsActive.value = $event : null),
|
|
4471
|
-
unref(onButtonClick)
|
|
4472
|
-
],
|
|
4473
|
-
label: "Filter",
|
|
4474
|
-
size: "small",
|
|
4475
|
-
variant: "transparent",
|
|
4476
|
-
"leading-icon": "filter",
|
|
4477
|
-
style: normalizeStyle(filterPopoverRef.value?.anchorStyle),
|
|
4478
|
-
"aria-controls": filterPopoverRef.value?.popoverId,
|
|
4479
|
-
"aria-expanded": unref(showPopover),
|
|
4480
|
-
"aria-haspopup": "dialog"
|
|
4481
|
-
}, null, 8, ["modelValue", "style", "aria-controls", "aria-expanded", "onUpdate:modelValue"]),
|
|
4482
|
-
createVNode(unref(KdsPopover), {
|
|
4483
|
-
ref_key: "filterPopoverRef",
|
|
4484
|
-
ref: filterPopoverRef,
|
|
4485
|
-
modelValue: unref(showPopover),
|
|
4486
|
-
"onUpdate:modelValue": [
|
|
4487
|
-
_cache[2] || (_cache[2] = ($event) => isRef(showPopover) ? showPopover.value = $event : null),
|
|
4488
|
-
unref(onPopoverToggle)
|
|
4489
|
-
],
|
|
4490
|
-
"aria-label": "Filter",
|
|
4491
|
-
"popover-type": "auto",
|
|
4492
|
-
role: "dialog",
|
|
4493
|
-
"stretch-inline": "",
|
|
4494
|
-
"max-inline-size": "var(--kds-dimension-component-width-32x)"
|
|
4495
|
-
}, {
|
|
4496
|
-
default: withCtx(() => [
|
|
4497
|
-
createVNode(PopoverContainer, null, {
|
|
4498
|
-
header: withCtx(() => [
|
|
4499
|
-
createVNode(unref(KdsIcon), {
|
|
4500
|
-
name: "filter",
|
|
4501
|
-
size: "small"
|
|
4502
|
-
}),
|
|
4503
|
-
_cache[3] || (_cache[3] = createTextVNode(" Filter ", -1))
|
|
4504
|
-
]),
|
|
4505
|
-
body: withCtx(() => [
|
|
4506
|
-
createVNode(FilterControlBody, {
|
|
4507
|
-
ref_key: "filterBodyRef",
|
|
4508
|
-
ref: filterBodyRef,
|
|
4509
|
-
columns: __props.columns,
|
|
4510
|
-
"col-filter-values": __props.colFilterValues,
|
|
4511
|
-
onColumnFilter: _cache[1] || (_cache[1] = (colInd, value) => emit("columnFilter", colInd, value))
|
|
4512
|
-
}, null, 8, ["columns", "col-filter-values"])
|
|
4513
|
-
]),
|
|
4514
|
-
_: 1
|
|
4515
|
-
})
|
|
4516
|
-
]),
|
|
4517
|
-
_: 1
|
|
4518
|
-
}, 8, ["modelValue", "onUpdate:modelValue"])
|
|
4519
|
-
], 64);
|
|
4520
|
-
};
|
|
4521
|
-
}
|
|
4522
|
-
});
|
|
4523
|
-
|
|
4524
4153
|
const _hoisted_1$7 = { class: "body" };
|
|
4525
4154
|
const NONE_COLUMN_VALUE = "None";
|
|
4526
4155
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
@@ -4659,19 +4288,18 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
4659
4288
|
showTableSize: { type: Boolean, default: true },
|
|
4660
4289
|
actionConfig: {},
|
|
4661
4290
|
colSortValues: { default: () => [] },
|
|
4662
|
-
|
|
4663
|
-
sortControlOptions: {},
|
|
4664
|
-
columns: {}
|
|
4291
|
+
sortControlOptions: {}
|
|
4665
4292
|
},
|
|
4666
|
-
emits: ["resetTemporaryView", "
|
|
4667
|
-
setup(__props, {
|
|
4293
|
+
emits: ["resetTemporaryView", "onColumnSort", "update:searchTerm"],
|
|
4294
|
+
setup(__props, { emit: __emit }) {
|
|
4295
|
+
const slots = useSlots();
|
|
4668
4296
|
const viewType = computed(() => __props.actionState?.viewType ?? "DEFAULT");
|
|
4669
4297
|
const isTemporaryView = computed(
|
|
4670
4298
|
() => viewType.value === "TEMP_VIEW" || viewType.value === "PREVIEW"
|
|
4671
4299
|
);
|
|
4672
4300
|
const showResetButton = computed(() => viewType.value === "TEMP_VIEW");
|
|
4673
4301
|
const hasContent = computed(
|
|
4674
|
-
() => isTemporaryView.value || __props.showTableSize || __props.actionConfig.enableSearch || __props.actionConfig.enableSorting || __props.actionConfig.
|
|
4302
|
+
() => isTemporaryView.value || __props.showTableSize || __props.actionConfig.enableSearch || __props.actionConfig.enableSorting || __props.actionConfig.forceShow || Boolean(slots["action-bar-left"])
|
|
4675
4303
|
);
|
|
4676
4304
|
const formatCount = (label, total, current) => {
|
|
4677
4305
|
const appendTotal = current !== void 0 && current < total;
|
|
@@ -4699,13 +4327,6 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
4699
4327
|
return `${rowText} | ${columnText}`;
|
|
4700
4328
|
});
|
|
4701
4329
|
const emit = __emit;
|
|
4702
|
-
const filterControlRef = useTemplateRef("filterControlRef");
|
|
4703
|
-
const openFilterControl = (columnIndex) => {
|
|
4704
|
-
filterControlRef.value?.openPopover(columnIndex);
|
|
4705
|
-
};
|
|
4706
|
-
__expose({
|
|
4707
|
-
openFilterControl
|
|
4708
|
-
});
|
|
4709
4330
|
return (_ctx, _cache) => {
|
|
4710
4331
|
return hasContent.value ? (openBlock(), createElementBlock("div", {
|
|
4711
4332
|
key: 0,
|
|
@@ -4719,14 +4340,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
4719
4340
|
"sort-control-options": __props.sortControlOptions,
|
|
4720
4341
|
onColumnSort: _cache[0] || (_cache[0] = (columnId, colDir) => emit("onColumnSort", columnId, colDir))
|
|
4721
4342
|
}, null, 8, ["col-sort-values", "sort-control-options"])) : createCommentVNode("", true),
|
|
4722
|
-
|
|
4723
|
-
key: 2,
|
|
4724
|
-
ref_key: "filterControlRef",
|
|
4725
|
-
ref: filterControlRef,
|
|
4726
|
-
columns: __props.columns,
|
|
4727
|
-
"col-filter-values": __props.colFilterValues,
|
|
4728
|
-
onColumnFilter: _cache[1] || (_cache[1] = (colInd, value) => emit("columnFilter", colInd, value))
|
|
4729
|
-
}, null, 8, ["columns", "col-filter-values"])) : createCommentVNode("", true)
|
|
4343
|
+
renderSlot(_ctx.$slots, "action-bar-left", {}, void 0, true)
|
|
4730
4344
|
]),
|
|
4731
4345
|
createElementVNode("div", _hoisted_3$1, [
|
|
4732
4346
|
__props.actionConfig.enableSearch ? (openBlock(), createBlock(unref(KdsSearchInput), {
|
|
@@ -4734,7 +4348,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
4734
4348
|
ariaLabel: "Search table",
|
|
4735
4349
|
size: "small",
|
|
4736
4350
|
"model-value": __props.actionState?.searchTerm ?? "",
|
|
4737
|
-
"onUpdate:modelValue": _cache[
|
|
4351
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:searchTerm", $event))
|
|
4738
4352
|
}, null, 8, ["model-value"])) : createCommentVNode("", true),
|
|
4739
4353
|
__props.actionConfig.settingsItems?.length ? (openBlock(), createBlock(unref(KdsMenuButton), {
|
|
4740
4354
|
key: 1,
|
|
@@ -4750,7 +4364,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
4750
4364
|
size: "small",
|
|
4751
4365
|
variant: "transparent",
|
|
4752
4366
|
"leading-icon": "x-close",
|
|
4753
|
-
onClick: _cache[
|
|
4367
|
+
onClick: _cache[2] || (_cache[2] = ($event) => emit("resetTemporaryView"))
|
|
4754
4368
|
})) : createCommentVNode("", true)
|
|
4755
4369
|
])
|
|
4756
4370
|
], 2)) : createCommentVNode("", true);
|
|
@@ -4758,24 +4372,16 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
4758
4372
|
}
|
|
4759
4373
|
});
|
|
4760
4374
|
|
|
4761
|
-
const TableActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
4375
|
+
const TableActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-a70d7b02"]]);
|
|
4762
4376
|
|
|
4763
4377
|
const useHeaderMenuItems = ({
|
|
4764
4378
|
enableSorting,
|
|
4765
|
-
enableFilters,
|
|
4766
|
-
filterConfig,
|
|
4767
|
-
filterValue,
|
|
4768
4379
|
sortDirection,
|
|
4769
|
-
headerSubMenuItems,
|
|
4770
4380
|
sortTexts,
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
clearFilter
|
|
4381
|
+
additionalMenuItems,
|
|
4382
|
+
onColumnSort
|
|
4774
4383
|
}) => {
|
|
4775
4384
|
const staticItems = [];
|
|
4776
|
-
const hasDynamicItems = Boolean(headerSubMenuItems?.length);
|
|
4777
|
-
const showFilterItem = enableFilters && filterConfig !== void 0;
|
|
4778
|
-
const filterIsActive = showFilterItem && isActive(filterConfig, filterValue);
|
|
4779
4385
|
if (enableSorting) {
|
|
4780
4386
|
staticItems.push({
|
|
4781
4387
|
id: "table-header-sort",
|
|
@@ -4784,7 +4390,6 @@ const useHeaderMenuItems = ({
|
|
|
4784
4390
|
type: "icon",
|
|
4785
4391
|
name: "sort-ascending"
|
|
4786
4392
|
},
|
|
4787
|
-
separator: !showFilterItem && hasDynamicItems,
|
|
4788
4393
|
children: [
|
|
4789
4394
|
{
|
|
4790
4395
|
id: "sort-asc",
|
|
@@ -4813,36 +4418,7 @@ const useHeaderMenuItems = ({
|
|
|
4813
4418
|
]
|
|
4814
4419
|
});
|
|
4815
4420
|
}
|
|
4816
|
-
|
|
4817
|
-
if (filterIsActive) {
|
|
4818
|
-
staticItems.push({
|
|
4819
|
-
id: "table-header-clear-filter",
|
|
4820
|
-
text: "Clear filter",
|
|
4821
|
-
separator: hasDynamicItems,
|
|
4822
|
-
accessory: {
|
|
4823
|
-
type: "icon",
|
|
4824
|
-
name: "filter"
|
|
4825
|
-
},
|
|
4826
|
-
handler: (_item, _event) => {
|
|
4827
|
-
clearFilter();
|
|
4828
|
-
}
|
|
4829
|
-
});
|
|
4830
|
-
} else {
|
|
4831
|
-
staticItems.push({
|
|
4832
|
-
id: "table-header-filter",
|
|
4833
|
-
text: "Filter by this column",
|
|
4834
|
-
separator: hasDynamicItems,
|
|
4835
|
-
accessory: {
|
|
4836
|
-
type: "icon",
|
|
4837
|
-
name: "filter"
|
|
4838
|
-
},
|
|
4839
|
-
handler: (_item, _event) => {
|
|
4840
|
-
openFilterControl();
|
|
4841
|
-
}
|
|
4842
|
-
});
|
|
4843
|
-
}
|
|
4844
|
-
}
|
|
4845
|
-
const menuItems = [...staticItems, ...headerSubMenuItems ?? []];
|
|
4421
|
+
const menuItems = [...staticItems, ...additionalMenuItems ?? []];
|
|
4846
4422
|
return menuItems.length ? menuItems : void 0;
|
|
4847
4423
|
};
|
|
4848
4424
|
|
|
@@ -4997,7 +4573,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
4997
4573
|
__name: "HeaderCell",
|
|
4998
4574
|
props: {
|
|
4999
4575
|
column: {},
|
|
5000
|
-
|
|
4576
|
+
additionalMenuItems: {},
|
|
5001
4577
|
tableConfig: {},
|
|
5002
4578
|
actionConfig: {},
|
|
5003
4579
|
sortDirection: {},
|
|
@@ -5007,7 +4583,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5007
4583
|
otherColumnResizing: { type: Boolean },
|
|
5008
4584
|
getDragHandleHeight: { type: Function }
|
|
5009
4585
|
},
|
|
5010
|
-
emits: ["onColumnSort", "
|
|
4586
|
+
emits: ["onColumnSort", "onHeaderCellFocus", "onHeaderCellBlur", "onHeaderClick", "onKeydownTab", "onKeydownLeft", "onKeydownRight", "onKeydownDown", "onHeaderCellKeydown", "onDeleteColumn", "columnResizeStart", "columnResizeEnd", "columnResize", "allColumnsResize"],
|
|
5011
4587
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
5012
4588
|
const props = __props;
|
|
5013
4589
|
const colSizeCSSVar = computed(() => getColSizeCSSVar(props.index));
|
|
@@ -5021,16 +4597,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5021
4597
|
const columnMenuButton = useTemplateRef(columnMenuButtonRef);
|
|
5022
4598
|
const subMenuItems = computed(
|
|
5023
4599
|
() => useHeaderMenuItems({
|
|
5024
|
-
enableFilters: Boolean(props.actionConfig.enableFilters),
|
|
5025
|
-
filterConfig: props.column.filterConfig,
|
|
5026
|
-
filterValue: props.colFilterValue,
|
|
5027
4600
|
enableSorting: Boolean(props.actionConfig.enableSorting) && !props.column.isNotSortable,
|
|
5028
4601
|
sortDirection: props.sortDirection,
|
|
5029
4602
|
sortTexts: columnSortText[props.column.type ?? "default"],
|
|
5030
|
-
|
|
5031
|
-
onColumnSort: (direction) => emit("onColumnSort", direction)
|
|
5032
|
-
openFilterControl: () => emit("openActionBarFilterControl"),
|
|
5033
|
-
clearFilter: () => emit("clearColumnFilter")
|
|
4603
|
+
additionalMenuItems: props.additionalMenuItems,
|
|
4604
|
+
onColumnSort: (direction) => emit("onColumnSort", direction)
|
|
5034
4605
|
})
|
|
5035
4606
|
);
|
|
5036
4607
|
const resizeHandleHovered = ref(false);
|
|
@@ -5256,7 +4827,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5256
4827
|
}
|
|
5257
4828
|
});
|
|
5258
4829
|
|
|
5259
|
-
const HeaderCell = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
4830
|
+
const HeaderCell = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-31a6758f"]]);
|
|
5260
4831
|
|
|
5261
4832
|
const _sfc_main$8 = {
|
|
5262
4833
|
components: {
|
|
@@ -5277,9 +4848,9 @@ const _sfc_main$8 = {
|
|
|
5277
4848
|
type: Array,
|
|
5278
4849
|
default: () => []
|
|
5279
4850
|
},
|
|
5280
|
-
|
|
5281
|
-
type:
|
|
5282
|
-
default: () =>
|
|
4851
|
+
additionalHeaderMenuItems: {
|
|
4852
|
+
type: Array,
|
|
4853
|
+
default: () => []
|
|
5283
4854
|
},
|
|
5284
4855
|
colSortValues: {
|
|
5285
4856
|
type: Array,
|
|
@@ -5312,8 +4883,6 @@ const _sfc_main$8 = {
|
|
|
5312
4883
|
columnResizeStart: () => true,
|
|
5313
4884
|
allColumnsResize: (newSize) => true,
|
|
5314
4885
|
columnSort: (index, direction) => true,
|
|
5315
|
-
openActionBarFilterControl: (index) => true,
|
|
5316
|
-
clearColumnFilter: (index) => true,
|
|
5317
4886
|
moveDownFromHeaderCell: (index) => true,
|
|
5318
4887
|
headerCellSelect: (index) => true,
|
|
5319
4888
|
"update:newColumnButtonWidth": (width) => true,
|
|
@@ -5436,12 +5005,6 @@ const _sfc_main$8 = {
|
|
|
5436
5005
|
onColumnSort(columnIndex, direction) {
|
|
5437
5006
|
this.$emit("columnSort", columnIndex, direction);
|
|
5438
5007
|
},
|
|
5439
|
-
onOpenActionBarFilterControl(columnIndex) {
|
|
5440
|
-
this.$emit("openActionBarFilterControl", columnIndex);
|
|
5441
|
-
},
|
|
5442
|
-
onClearColumnFilter(columnIndex) {
|
|
5443
|
-
this.$emit("clearColumnFilter", columnIndex);
|
|
5444
|
-
},
|
|
5445
5008
|
onNewColumnButtonClick(event) {
|
|
5446
5009
|
this.$emit("newColumnButtonClick", event);
|
|
5447
5010
|
},
|
|
@@ -5535,7 +5098,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5535
5098
|
ref_for: true,
|
|
5536
5099
|
ref: `headerCell-${ind}`,
|
|
5537
5100
|
column,
|
|
5538
|
-
"
|
|
5101
|
+
"additional-menu-items": $props.additionalHeaderMenuItems[ind] ?? [],
|
|
5539
5102
|
"table-config": $props.tableConfig,
|
|
5540
5103
|
"action-config": $props.actionConfig,
|
|
5541
5104
|
"sort-direction": $options.sortDirection(ind),
|
|
@@ -5554,8 +5117,6 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5554
5117
|
onOnHeaderCellKeydown: ($event) => $setup.onHeaderCellKeydown($event, ind),
|
|
5555
5118
|
onOnDeleteColumn: ($event) => $options.onDeleteColumn(ind),
|
|
5556
5119
|
onOnColumnSort: ($event) => $options.onColumnSort(ind, $event),
|
|
5557
|
-
onOpenActionBarFilterControl: ($event) => $options.onOpenActionBarFilterControl(ind),
|
|
5558
|
-
onClearColumnFilter: ($event) => $options.onClearColumnFilter(ind),
|
|
5559
5120
|
onColumnResizeStart: ($event) => $options.onColumnResizeStart(ind),
|
|
5560
5121
|
onColumnResizeEnd: $options.onColumnResizeEnd,
|
|
5561
5122
|
onColumnResize: ($event) => $options.onColumnResize(ind, $event),
|
|
@@ -5565,7 +5126,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5565
5126
|
renderSlot(_ctx.$slots, "subHeader", mergeProps({ ref_for: true }, slotProps, { columnIndex: ind }), void 0, true)
|
|
5566
5127
|
]),
|
|
5567
5128
|
_: 2
|
|
5568
|
-
}, 1032, ["column", "
|
|
5129
|
+
}, 1032, ["column", "additional-menu-items", "table-config", "action-config", "sort-direction", "index", "focused", "selected", "other-column-resizing", "get-drag-handle-height", "onOnHeaderCellFocus", "onOnHeaderCellBlur", "onOnHeaderClick", "onOnKeydownTab", "onOnKeydownLeft", "onOnKeydownRight", "onOnKeydownDown", "onOnHeaderCellKeydown", "onOnDeleteColumn", "onOnColumnSort", "onColumnResizeStart", "onColumnResizeEnd", "onColumnResize", "onAllColumnsResize"]);
|
|
5569
5130
|
}), 128)),
|
|
5570
5131
|
$props.showNewColumnButton ? (openBlock(), createElementBlock("th", {
|
|
5571
5132
|
key: 2,
|
|
@@ -5595,7 +5156,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5595
5156
|
}, null, 6)) : createCommentVNode("", true)
|
|
5596
5157
|
]);
|
|
5597
5158
|
}
|
|
5598
|
-
const Header = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$2], ["__scopeId", "data-v-
|
|
5159
|
+
const Header = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$2], ["__scopeId", "data-v-a97dc625"]]);
|
|
5599
5160
|
|
|
5600
5161
|
const _hoisted_1$3 = { class: "sticky-container" };
|
|
5601
5162
|
const buttonRef = "button";
|
|
@@ -5847,7 +5408,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
5847
5408
|
}
|
|
5848
5409
|
});
|
|
5849
5410
|
|
|
5850
|
-
const CellRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
5411
|
+
const CellRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-e7fb7b49"]]);
|
|
5851
5412
|
|
|
5852
5413
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
5853
5414
|
__name: "Cell",
|
|
@@ -6406,7 +5967,7 @@ const _sfc_main$1 = {
|
|
|
6406
5967
|
Row,
|
|
6407
5968
|
// TablePopover,
|
|
6408
5969
|
CellSelectionOverlay,
|
|
6409
|
-
TableCore: _sfc_main$
|
|
5970
|
+
TableCore: _sfc_main$g,
|
|
6410
5971
|
NewRowButton,
|
|
6411
5972
|
TableActionBar
|
|
6412
5973
|
},
|
|
@@ -6456,10 +6017,10 @@ const _sfc_main$1 = {
|
|
|
6456
6017
|
type: Array,
|
|
6457
6018
|
required: true
|
|
6458
6019
|
},
|
|
6459
|
-
/**
|
|
6460
|
-
|
|
6461
|
-
type:
|
|
6462
|
-
default: () =>
|
|
6020
|
+
/** Additional per-column header menu items (index-aligned with columns), appended after sort items. */
|
|
6021
|
+
additionalHeaderMenuItems: {
|
|
6022
|
+
type: Array,
|
|
6023
|
+
default: () => []
|
|
6463
6024
|
},
|
|
6464
6025
|
/** Active sorts, ordered by sort priority. */
|
|
6465
6026
|
colSortValues: {
|
|
@@ -6520,7 +6081,6 @@ const _sfc_main$1 = {
|
|
|
6520
6081
|
pageChange: (newPageNumber) => true,
|
|
6521
6082
|
pageSizeUpdate: (newPageSize) => true,
|
|
6522
6083
|
columnSort: (colInd, sortDirection) => true,
|
|
6523
|
-
columnFilter: (colInd, value) => true,
|
|
6524
6084
|
selectAll: (selected) => true,
|
|
6525
6085
|
rowSelect: (selected, rowInd, groupInd, isTop) => true,
|
|
6526
6086
|
tableInput: (event) => true,
|
|
@@ -7363,15 +6923,6 @@ const _sfc_main$1 = {
|
|
|
7363
6923
|
onNewColumnButtonClick(event) {
|
|
7364
6924
|
event.stopPropagation();
|
|
7365
6925
|
this.$emit("newColumnButtonClick");
|
|
7366
|
-
},
|
|
7367
|
-
openActionBarFilterControl(columnIndex) {
|
|
7368
|
-
this.$refs.actionBar?.openFilterControl(columnIndex);
|
|
7369
|
-
},
|
|
7370
|
-
clearColumnFilter(columnIndex) {
|
|
7371
|
-
const config = this.columns[columnIndex].filterConfig;
|
|
7372
|
-
if (config) {
|
|
7373
|
-
this.$emit("columnFilter", columnIndex, defaultValueFor(config.is));
|
|
7374
|
-
}
|
|
7375
6926
|
}
|
|
7376
6927
|
}
|
|
7377
6928
|
};
|
|
@@ -7388,32 +6939,36 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7388
6939
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
7389
6940
|
$props.actionConfig ? (openBlock(), createBlock(_component_TableActionBar, {
|
|
7390
6941
|
key: 0,
|
|
7391
|
-
ref: "actionBar",
|
|
7392
6942
|
"table-sizes": $props.tableState.tableSizes,
|
|
7393
6943
|
"action-state": $props.actionState,
|
|
7394
6944
|
"row-label": $props.tableConfig.rowLabel,
|
|
7395
6945
|
"show-table-size": $props.tableConfig.showTableSize,
|
|
7396
6946
|
"action-config": $props.actionConfig,
|
|
7397
6947
|
"col-sort-values": $props.colSortValues,
|
|
7398
|
-
"col-filter-values": $props.colFilterValues,
|
|
7399
6948
|
"sort-control-options": $options.sortControlOptions,
|
|
7400
|
-
columns: $props.columns,
|
|
7401
6949
|
onResetTemporaryView: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("resetTemporaryView")),
|
|
7402
|
-
onColumnFilter: _cache[1] || (_cache[1] = (colInd, value) => _ctx.$emit("columnFilter", colInd, value)),
|
|
7403
6950
|
onOnColumnSort: $options.onActionBarColumnSort,
|
|
7404
|
-
"onUpdate:searchTerm": _cache[
|
|
7405
|
-
},
|
|
6951
|
+
"onUpdate:searchTerm": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:searchTerm", $event))
|
|
6952
|
+
}, createSlots({ _: 2 }, [
|
|
6953
|
+
_ctx.$slots["action-bar-left"] ? {
|
|
6954
|
+
name: "action-bar-left",
|
|
6955
|
+
fn: withCtx(() => [
|
|
6956
|
+
renderSlot(_ctx.$slots, "action-bar-left", {}, void 0, true)
|
|
6957
|
+
]),
|
|
6958
|
+
key: "0"
|
|
6959
|
+
} : void 0
|
|
6960
|
+
]), 1032, ["table-sizes", "action-state", "row-label", "show-table-size", "action-config", "col-sort-values", "sort-control-options", "onOnColumnSort"])) : createCommentVNode("", true),
|
|
7406
6961
|
createElementVNode("table", {
|
|
7407
6962
|
ref: "wrapper",
|
|
7408
6963
|
tabindex: -1,
|
|
7409
|
-
onPointerleave: _cache[
|
|
7410
|
-
onPointerdownPassive: _cache[
|
|
7411
|
-
onPointerupPassive: _cache[
|
|
6964
|
+
onPointerleave: _cache[11] || (_cache[11] = (...args) => $setup.selectCellsOnMove.setFalse && $setup.selectCellsOnMove.setFalse(...args)),
|
|
6965
|
+
onPointerdownPassive: _cache[12] || (_cache[12] = withModifiers(($event) => $event.button === 0 && $setup.selectCellsOnMove.setTrue(), ["stop"])),
|
|
6966
|
+
onPointerupPassive: _cache[13] || (_cache[13] = ($event) => $event.button === 0 && $setup.selectCellsOnMove.setFalse()),
|
|
7412
6967
|
onKeydown: [
|
|
7413
|
-
_cache[
|
|
7414
|
-
_cache[
|
|
7415
|
-
_cache[
|
|
7416
|
-
_cache[
|
|
6968
|
+
_cache[14] || (_cache[14] = withKeys(withModifiers((...args) => $setup.handleCopyOnKeydown && $setup.handleCopyOnKeydown(...args), ["ctrl", "shift", "exact"]), ["c"])),
|
|
6969
|
+
_cache[15] || (_cache[15] = withKeys(withModifiers((...args) => $setup.handleCopyOnKeydown && $setup.handleCopyOnKeydown(...args), ["meta", "shift", "exact"]), ["c"])),
|
|
6970
|
+
_cache[16] || (_cache[16] = withKeys(withModifiers((...args) => $setup.handleDeleteSelection && $setup.handleDeleteSelection(...args), ["exact"]), ["delete"])),
|
|
6971
|
+
_cache[17] || (_cache[17] = withKeys(withModifiers((...args) => $setup.clearCellSelectionAndStopPropagation && $setup.clearCellSelectionAndStopPropagation(...args), ["exact"]), ["escape"]))
|
|
7417
6972
|
]
|
|
7418
6973
|
}, [
|
|
7419
6974
|
createVNode(_component_TableCore, {
|
|
@@ -7432,13 +6987,13 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7432
6987
|
"current-row-height": $options.currentRowHeight,
|
|
7433
6988
|
"new-column-button-width": $setup.newColumnButtonWidth,
|
|
7434
6989
|
onScrollerUpdate: $options.onScroll,
|
|
7435
|
-
"onUpdate:availableWidth": _cache[
|
|
6990
|
+
"onUpdate:availableWidth": _cache[8] || (_cache[8] = ($event) => _ctx.$emit("update:available-width", $event)),
|
|
7436
6991
|
onMoveSelection: $options.onKeyboardMoveSelection,
|
|
7437
6992
|
onClearSelection: $setup.clearCellSelection,
|
|
7438
6993
|
onExpandSelectedCell: $options.expandSelectedCell,
|
|
7439
6994
|
onStartEditing: $options.onStartEditingCell,
|
|
7440
|
-
onBodyFocusin: _cache[
|
|
7441
|
-
onBodyFocusout: _cache[
|
|
6995
|
+
onBodyFocusin: _cache[9] || (_cache[9] = ($event) => $setup.changeFocus(true)),
|
|
6996
|
+
onBodyFocusout: _cache[10] || (_cache[10] = ($event) => $options.onTableBodyFocusOut())
|
|
7442
6997
|
}, {
|
|
7443
6998
|
row: withCtx(({ row, groupInd, rowInd }) => [
|
|
7444
6999
|
createVNode(_component_Row, {
|
|
@@ -7482,10 +7037,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7482
7037
|
colInd: ind,
|
|
7483
7038
|
initialValue: $setup.editingCellInitialValue,
|
|
7484
7039
|
cellElement,
|
|
7485
|
-
onKeydown: _cache[
|
|
7040
|
+
onKeydown: _cache[2] || (_cache[2] = (event) => $setup.createEditingCellKeydownHandler({
|
|
7486
7041
|
moveSelection: $options.onKeyboardMoveSelectionFromEditingCell
|
|
7487
7042
|
})(event)),
|
|
7488
|
-
onClickAway: _cache[
|
|
7043
|
+
onClickAway: _cache[3] || (_cache[3] = (...args) => $setup.stopEditingCell && $setup.stopEditingCell(...args))
|
|
7489
7044
|
}, void 0, true)
|
|
7490
7045
|
]),
|
|
7491
7046
|
_: 2
|
|
@@ -7514,7 +7069,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7514
7069
|
"table-config": $props.tableConfig,
|
|
7515
7070
|
"action-config": $props.actionConfig,
|
|
7516
7071
|
columns: $props.columns,
|
|
7517
|
-
"
|
|
7072
|
+
"additional-header-menu-items": $props.additionalHeaderMenuItems,
|
|
7518
7073
|
"col-sort-values": $props.colSortValues,
|
|
7519
7074
|
"is-selected": Boolean($props.tableState.totalSelected),
|
|
7520
7075
|
"get-drag-handle-height": getDragHandleHeight,
|
|
@@ -7528,8 +7083,6 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7528
7083
|
"selected-header-index": $options.selectedHeaderIndex,
|
|
7529
7084
|
onHeaderSelect: $options.onSelectAll,
|
|
7530
7085
|
onColumnSort: $options.onColumnSort,
|
|
7531
|
-
onOpenActionBarFilterControl: $options.openActionBarFilterControl,
|
|
7532
|
-
onClearColumnFilter: $options.clearColumnFilter,
|
|
7533
7086
|
onDeleteColumn: $options.onDeleteColumn,
|
|
7534
7087
|
onColumnResize: $options.onColumnResize,
|
|
7535
7088
|
onAllColumnsResize: $options.onAllColumnsResize,
|
|
@@ -7538,17 +7091,17 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7538
7091
|
onMoveDownFromHeaderCell: $options.onMoveDownFromHeaderCell,
|
|
7539
7092
|
onHeaderCellSelect: $options.onHeaderCellSelect,
|
|
7540
7093
|
onHeaderCellDeselect: $options.onHeaderCellDeselect,
|
|
7541
|
-
onHeaderCellStartEditing: _cache[
|
|
7094
|
+
onHeaderCellStartEditing: _cache[4] || (_cache[4] = (columnIndex, initialValue) => _ctx.$emit("headerCellStartEditing", columnIndex, initialValue)),
|
|
7542
7095
|
"onUpdate:newColumnButtonWidth": $options.onUpdateNewColumnButtonWidth,
|
|
7543
7096
|
onNewColumnButtonClick: $options.onNewColumnButtonClick,
|
|
7544
|
-
onSelectionKeydownDown: _cache[
|
|
7545
|
-
onNewColumnButtonKeydownLeft: _cache[
|
|
7097
|
+
onSelectionKeydownDown: _cache[5] || (_cache[5] = ($event) => $options.onHeaderSelectionKeydownDown()),
|
|
7098
|
+
onNewColumnButtonKeydownLeft: _cache[6] || (_cache[6] = ($event) => $options.onMoveIntoBodyFromRight())
|
|
7546
7099
|
}, {
|
|
7547
7100
|
subHeader: withCtx((slotProps) => [
|
|
7548
7101
|
renderSlot(_ctx.$slots, "subHeader", normalizeProps(guardReactiveProps(slotProps)), void 0, true)
|
|
7549
7102
|
]),
|
|
7550
7103
|
_: 3
|
|
7551
|
-
}, 8, ["style", "table-config", "action-config", "columns", "
|
|
7104
|
+
}, 8, ["style", "table-config", "action-config", "columns", "additional-header-menu-items", "col-sort-values", "is-selected", "get-drag-handle-height", "class", "show-new-column-button", "selected-header-index", "onHeaderSelect", "onColumnSort", "onDeleteColumn", "onColumnResize", "onAllColumnsResize", "onColumnResizeStart", "onColumnResizeEnd", "onMoveDownFromHeaderCell", "onHeaderCellSelect", "onHeaderCellDeselect", "onUpdate:newColumnButtonWidth", "onNewColumnButtonClick"])
|
|
7552
7105
|
]),
|
|
7553
7106
|
"cell-selection-overlay": withCtx(() => [
|
|
7554
7107
|
$setup.rectMinMax && !$setup.isEditingCell && $options.selectedHeaderIndex === null ? (openBlock(), createBlock(_component_CellSelectionOverlay, {
|
|
@@ -7567,7 +7120,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7567
7120
|
key: 0,
|
|
7568
7121
|
ref: "new-row-button",
|
|
7569
7122
|
onClick: $options.onNewRowButtonClick,
|
|
7570
|
-
onPointerdown: _cache[
|
|
7123
|
+
onPointerdown: _cache[7] || (_cache[7] = withModifiers(() => {
|
|
7571
7124
|
}, ["stop"])),
|
|
7572
7125
|
onKeydownUp: $options.onMoveIntoBodyFromBottom
|
|
7573
7126
|
}, null, 8, ["onClick", "onKeydownUp"])) : createCommentVNode("", true)
|
|
@@ -7586,7 +7139,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7586
7139
|
], 544)
|
|
7587
7140
|
]);
|
|
7588
7141
|
}
|
|
7589
|
-
const TableUI = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
7142
|
+
const TableUI = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-d531fa0a"]]);
|
|
7590
7143
|
|
|
7591
7144
|
const useTableReady = ({ onReady }) => {
|
|
7592
7145
|
const autoSizesInitialized = ref(false);
|
|
@@ -7660,9 +7213,9 @@ const _sfc_main = {
|
|
|
7660
7213
|
type: Object,
|
|
7661
7214
|
default: void 0
|
|
7662
7215
|
},
|
|
7663
|
-
|
|
7664
|
-
type:
|
|
7665
|
-
default: () =>
|
|
7216
|
+
additionalHeaderMenuItems: {
|
|
7217
|
+
type: Array,
|
|
7218
|
+
default: () => []
|
|
7666
7219
|
},
|
|
7667
7220
|
colSortValues: {
|
|
7668
7221
|
type: Array,
|
|
@@ -8055,7 +7608,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8055
7608
|
"current-selection": $props.currentSelection,
|
|
8056
7609
|
"current-bottom-selection": $props.currentBottomSelection,
|
|
8057
7610
|
columns: $props.columns,
|
|
8058
|
-
"
|
|
7611
|
+
"additional-header-menu-items": $props.additionalHeaderMenuItems,
|
|
8059
7612
|
"col-sort-values": $props.colSortValues,
|
|
8060
7613
|
"num-rows-above": $props.numRowsAbove,
|
|
8061
7614
|
"num-rows-below": $props.numRowsBelow,
|
|
@@ -8079,7 +7632,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8079
7632
|
])
|
|
8080
7633
|
};
|
|
8081
7634
|
})
|
|
8082
|
-
]), 1040, ["style", "data", "current-selection", "current-bottom-selection", "columns", "
|
|
7635
|
+
]), 1040, ["style", "data", "current-selection", "current-bottom-selection", "columns", "additional-header-menu-items", "col-sort-values", "num-rows-above", "num-rows-below", "bottom-data", "row-config", "table-config", "table-state", "page-config", "page-state", "action-config", "action-state", "sub-menu-config", "disable-row-height-transition", "onUpdate:availableWidth"]),
|
|
8083
7636
|
$options.mountTableUIForAutoSizeCalculation ? (openBlock(), createBlock(_component_TableUI, {
|
|
8084
7637
|
key: 0,
|
|
8085
7638
|
ref: "tableUIForAutoSize",
|
|
@@ -8102,7 +7655,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8102
7655
|
]), 1032, ["data", "current-selection", "columns", "row-config", "table-config", "onVnodeMounted"])) : createCommentVNode("", true)
|
|
8103
7656
|
], 64);
|
|
8104
7657
|
}
|
|
8105
|
-
const TableUIWithAutoSizeCalculation = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
7658
|
+
const TableUIWithAutoSizeCalculation = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-11d56c71"]]);
|
|
8106
7659
|
|
|
8107
|
-
export { TableActionBar, TableUI, TableUIWithAutoSizeCalculation,
|
|
7660
|
+
export { PopoverContainer, TableActionBar, TableUI, TableUIWithAutoSizeCalculation, columnSortText, columnTypes, constants, defaultPageSize, getMissingValueMessage, isMissingValue, unpackObjectRepresentation, useButtonPopoverInteraction, useColumnSizes };
|
|
8108
7661
|
//# sourceMappingURL=index.js.map
|