@knime/kds-table 6.4.0 → 6.6.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 +22 -0
- package/dist/index.css +26 -15
- package/dist/index.js +38 -10
- package/dist/index.js.map +1 -1
- package/dist/src/components/TableUI.vue.d.ts +1 -0
- package/dist/src/components/TableUI.vue.d.ts.map +1 -1
- package/dist/src/components/TableUIWithAutoSizeCalculation.vue.d.ts +1 -0
- package/dist/src/components/TableUIWithAutoSizeCalculation.vue.d.ts.map +1 -1
- package/dist/src/components/control/TableActionBar.vue.d.ts.map +1 -1
- package/dist/src/types/ActionConfig.d.ts +6 -0
- package/dist/src/types/ActionConfig.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @knime/kds-table
|
|
2
2
|
|
|
3
|
+
## 6.6.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0ef79f6]
|
|
8
|
+
- Updated dependencies [19c91aa]
|
|
9
|
+
- @knime/kds-components@6.6.0
|
|
10
|
+
- @knime/kds-styles@6.6.0
|
|
11
|
+
|
|
12
|
+
## 6.5.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- e89e10c: - `TableUI`:
|
|
17
|
+
- Show a "Preview" label in the action bar when `actionState.viewType` is `PREVIEW`, with an info button opening a popover that shows the new optional `actionState.previewDescription`.
|
|
18
|
+
- Render the action bar whenever `actionState.viewType` is `TEMP_VIEW` or `PREVIEW`, even when no action bar feature is enabled via `actionConfig`.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- @knime/kds-components@6.5.0
|
|
23
|
+
- @knime/kds-styles@6.5.0
|
|
24
|
+
|
|
3
25
|
## 6.4.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/dist/index.css
CHANGED
|
@@ -186,7 +186,7 @@ tr {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
.kds-table-action-bar {
|
|
189
|
-
&[data-v-
|
|
189
|
+
&[data-v-c9fae4f1] {
|
|
190
190
|
display: grid;
|
|
191
191
|
grid-template-columns: 1fr 1fr 1fr;
|
|
192
192
|
min-height: var(--kds-dimension-component-height-2-5x);
|
|
@@ -194,30 +194,41 @@ tr {
|
|
|
194
194
|
padding-left: var(--kds-spacing-container-0-5x);
|
|
195
195
|
border-bottom: var(--kds-border-base-subtle);
|
|
196
196
|
}
|
|
197
|
-
&.temporary-view[data-v-
|
|
197
|
+
&.temporary-view[data-v-c9fae4f1] {
|
|
198
198
|
background-color: var(--kds-color-background-static-info-muted);
|
|
199
199
|
}
|
|
200
|
-
& .dimension[data-v-
|
|
200
|
+
& .dimension[data-v-c9fae4f1] {
|
|
201
201
|
font: var(--kds-font-base-title-small);
|
|
202
202
|
color: var(--kds-color-text-and-icon-muted);
|
|
203
203
|
white-space: pre;
|
|
204
204
|
}
|
|
205
|
-
& .
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
& .preview {
|
|
206
|
+
&[data-v-c9fae4f1] {
|
|
207
|
+
display: flex;
|
|
208
|
+
gap: var(--kds-spacing-container-0-12x);
|
|
209
|
+
align-items: center;
|
|
210
|
+
}
|
|
211
|
+
& .preview-label[data-v-c9fae4f1] {
|
|
212
|
+
font: var(--kds-font-base-title-small-strong);
|
|
213
|
+
color: var(--kds-color-text-and-icon-neutral);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
& .left[data-v-c9fae4f1],
|
|
217
|
+
& .center[data-v-c9fae4f1],
|
|
218
|
+
& .right[data-v-c9fae4f1] {
|
|
208
219
|
display: flex;
|
|
209
220
|
flex: 1;
|
|
210
221
|
align-items: center;
|
|
211
222
|
min-width: 0;
|
|
212
223
|
padding: var(--kds-spacing-container-0-12x) 0;
|
|
213
224
|
}
|
|
214
|
-
& .left[data-v-
|
|
225
|
+
& .left[data-v-c9fae4f1] {
|
|
215
226
|
gap: var(--kds-spacing-container-0-5x);
|
|
216
227
|
}
|
|
217
|
-
& .center[data-v-
|
|
228
|
+
& .center[data-v-c9fae4f1] {
|
|
218
229
|
justify-content: center;
|
|
219
230
|
}
|
|
220
|
-
& .right[data-v-
|
|
231
|
+
& .right[data-v-c9fae4f1] {
|
|
221
232
|
gap: var(--kds-spacing-container-0-25x);
|
|
222
233
|
justify-content: flex-end;
|
|
223
234
|
}
|
|
@@ -573,7 +584,7 @@ tr.row {
|
|
|
573
584
|
}
|
|
574
585
|
}
|
|
575
586
|
|
|
576
|
-
.wrapper[data-v-
|
|
587
|
+
.wrapper[data-v-1941898e] {
|
|
577
588
|
display: flex;
|
|
578
589
|
flex-direction: column;
|
|
579
590
|
width: 100%;
|
|
@@ -583,7 +594,7 @@ tr.row {
|
|
|
583
594
|
}
|
|
584
595
|
}
|
|
585
596
|
table {
|
|
586
|
-
&[data-v-
|
|
597
|
+
&[data-v-1941898e] {
|
|
587
598
|
position: relative;
|
|
588
599
|
display: flex;
|
|
589
600
|
flex-grow: 1;
|
|
@@ -591,21 +602,21 @@ table {
|
|
|
591
602
|
width: 100%;
|
|
592
603
|
min-height: 0;
|
|
593
604
|
}
|
|
594
|
-
&[data-v-
|
|
605
|
+
&[data-v-1941898e]:focus {
|
|
595
606
|
outline: none;
|
|
596
607
|
}
|
|
597
|
-
& .new-row-footer[data-v-
|
|
608
|
+
& .new-row-footer[data-v-1941898e] {
|
|
598
609
|
width: 100%;
|
|
599
610
|
}
|
|
600
611
|
}
|
|
601
612
|
.empty-state-overlay {
|
|
602
|
-
&[data-v-
|
|
613
|
+
&[data-v-1941898e] {
|
|
603
614
|
display: flex;
|
|
604
615
|
align-items: center;
|
|
605
616
|
justify-content: center;
|
|
606
617
|
width: 100%;
|
|
607
618
|
}
|
|
608
|
-
& .empty-state[data-v-
|
|
619
|
+
& .empty-state[data-v-1941898e] {
|
|
609
620
|
width: 100%;
|
|
610
621
|
max-width: 100%;
|
|
611
622
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance, getCurrentScope, guardReactiveProps, inject, isRef, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveComponent, shallowReadonly, shallowRef, toDisplayString, toRef, toValue, unref, useCssVars, useSlots, useTemplateRef, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
2
|
-
import { KdsButton, KdsCheckbox, KdsDropdown, KdsEmptyState, KdsIcon, KdsLoadingSkeleton, KdsMenuButton, KdsMissingValueIcon, KdsPopover, KdsSearchInput, KdsToggleButton, vKdsTooltip } from "@knime/kds-components";
|
|
2
|
+
import { KdsButton, KdsCheckbox, KdsDropdown, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsLoadingSkeleton, KdsMenuButton, KdsMissingValueIcon, KdsPopover, KdsSearchInput, KdsToggleButton, vKdsTooltip } from "@knime/kds-components";
|
|
3
3
|
import './index.css';//#region \0rolldown/runtime.js
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -970,6 +970,22 @@ var dimension = {
|
|
|
970
970
|
variable: "var(--kds-dimension-component-width-4x)"
|
|
971
971
|
}
|
|
972
972
|
},
|
|
973
|
+
"6x": {
|
|
974
|
+
value: 96,
|
|
975
|
+
unit: "px",
|
|
976
|
+
css: {
|
|
977
|
+
value: "96px",
|
|
978
|
+
variable: "var(--kds-dimension-component-width-6x)"
|
|
979
|
+
}
|
|
980
|
+
},
|
|
981
|
+
"8x": {
|
|
982
|
+
value: 128,
|
|
983
|
+
unit: "px",
|
|
984
|
+
css: {
|
|
985
|
+
value: "128px",
|
|
986
|
+
variable: "var(--kds-dimension-component-width-8x)"
|
|
987
|
+
}
|
|
988
|
+
},
|
|
973
989
|
"12x": {
|
|
974
990
|
value: 192,
|
|
975
991
|
unit: "px",
|
|
@@ -5078,7 +5094,7 @@ var _hoisted_4$2 = {
|
|
|
5078
5094
|
key: 0,
|
|
5079
5095
|
class: "muted"
|
|
5080
5096
|
};
|
|
5081
|
-
var _hoisted_5 = { class: "subtle" };
|
|
5097
|
+
var _hoisted_5$1 = { class: "subtle" };
|
|
5082
5098
|
//#endregion
|
|
5083
5099
|
//#region src/components/control/PageControls.vue?vue&type=script&lang.ts
|
|
5084
5100
|
/**
|
|
@@ -5113,7 +5129,7 @@ var PageControls_vue_vue_type_script_lang_default = {
|
|
|
5113
5129
|
return __props.showTableSize && __props.currentItems === 0 ? (openBlock(), createElementBlock("span", _hoisted_1$10, "No data")) : (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
5114
5130
|
createElementVNode("span", _hoisted_3$3, toDisplayString(__props.rowLabel) + ":", 1),
|
|
5115
5131
|
hasMultiplePages.value && __props.currentItems ? (openBlock(), createElementBlock("span", _hoisted_4$2, toDisplayString(pageRangeStart.value) + "–" + toDisplayString(pageRangeEnd.value), 1)) : createCommentVNode("", true),
|
|
5116
|
-
createElementVNode("span", _hoisted_5, toDisplayString(rowCountText.value), 1)
|
|
5132
|
+
createElementVNode("span", _hoisted_5$1, toDisplayString(rowCountText.value), 1)
|
|
5117
5133
|
]));
|
|
5118
5134
|
};
|
|
5119
5135
|
}
|
|
@@ -5377,9 +5393,13 @@ var _hoisted_1$6 = { class: "left" };
|
|
|
5377
5393
|
var _hoisted_2$4 = { class: "center" };
|
|
5378
5394
|
var _hoisted_3$1 = {
|
|
5379
5395
|
key: 0,
|
|
5396
|
+
class: "preview"
|
|
5397
|
+
};
|
|
5398
|
+
var _hoisted_4$1 = {
|
|
5399
|
+
key: 1,
|
|
5380
5400
|
class: "dimension"
|
|
5381
5401
|
};
|
|
5382
|
-
var
|
|
5402
|
+
var _hoisted_5 = { class: "right" };
|
|
5383
5403
|
//#endregion
|
|
5384
5404
|
//#region src/components/control/TableActionBar.vue
|
|
5385
5405
|
var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -5405,6 +5425,7 @@ var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
5405
5425
|
const slots = useSlots();
|
|
5406
5426
|
const viewType = computed(() => __props.actionState?.viewType ?? "DEFAULT");
|
|
5407
5427
|
const isTemporaryView = computed(() => viewType.value === "TEMP_VIEW" || viewType.value === "PREVIEW");
|
|
5428
|
+
const isPreview = computed(() => viewType.value === "PREVIEW");
|
|
5408
5429
|
const showResetButton = computed(() => viewType.value === "TEMP_VIEW");
|
|
5409
5430
|
const hasContent = computed(() => isTemporaryView.value || __props.showTableSize || __props.actionConfig.enableSearch || __props.actionConfig.enableSorting || __props.actionConfig.forceShow || Boolean(slots["action-bar-left"]));
|
|
5410
5431
|
/**
|
|
@@ -5435,8 +5456,11 @@ var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
5435
5456
|
"sort-control-options": __props.sortControlOptions,
|
|
5436
5457
|
onColumnSort: _cache[0] || (_cache[0] = (columnId, colDir) => emit("onColumnSort", columnId, colDir))
|
|
5437
5458
|
}, null, 8, ["col-sort-values", "sort-control-options"])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "action-bar-left", {}, void 0, true)]),
|
|
5438
|
-
createElementVNode("div", _hoisted_2$4, [
|
|
5439
|
-
|
|
5459
|
+
createElementVNode("div", _hoisted_2$4, [isPreview.value ? (openBlock(), createElementBlock("div", _hoisted_3$1, [_cache[3] || (_cache[3] = createElementVNode("span", { class: "preview-label" }, "Preview", -1)), __props.actionState?.previewDescription ? (openBlock(), createBlock(unref(KdsInfoToggleButton), {
|
|
5460
|
+
key: 0,
|
|
5461
|
+
content: __props.actionState.previewDescription
|
|
5462
|
+
}, null, 8, ["content"])) : createCommentVNode("", true)])) : createCommentVNode("", true), __props.showTableSize ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(dimensionText.value), 1)) : createCommentVNode("", true)]),
|
|
5463
|
+
createElementVNode("div", _hoisted_5, [
|
|
5440
5464
|
__props.actionConfig.enableSearch ? (openBlock(), createBlock(unref(KdsSearchInput), {
|
|
5441
5465
|
key: 0,
|
|
5442
5466
|
ariaLabel: "Search table",
|
|
@@ -5464,7 +5488,7 @@ var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
5464
5488
|
], 2)) : createCommentVNode("", true);
|
|
5465
5489
|
};
|
|
5466
5490
|
}
|
|
5467
|
-
}), [["__scopeId", "data-v-
|
|
5491
|
+
}), [["__scopeId", "data-v-c9fae4f1"]]);
|
|
5468
5492
|
//#endregion
|
|
5469
5493
|
//#region src/components/composables/useHeaderMenuItems.ts
|
|
5470
5494
|
var useHeaderMenuItems = ({ enableSorting, sortDirection, sortTexts, additionalMenuItems, onColumnSort }) => {
|
|
@@ -7299,6 +7323,10 @@ var TableUI_vue_vue_type_script_lang_default = {
|
|
|
7299
7323
|
};
|
|
7300
7324
|
},
|
|
7301
7325
|
computed: {
|
|
7326
|
+
showActionBar() {
|
|
7327
|
+
const viewType = this.actionState?.viewType;
|
|
7328
|
+
return Boolean(this.actionConfig) || viewType === "TEMP_VIEW" || viewType === "PREVIEW";
|
|
7329
|
+
},
|
|
7302
7330
|
minRowHeight() {
|
|
7303
7331
|
return this.rowConfig.compactMode ? COMPACT_ROW_HEIGHT : DEFAULT_ROW_HEIGHT;
|
|
7304
7332
|
},
|
|
@@ -7830,13 +7858,13 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7830
7858
|
const _component_TableCore = resolveComponent("TableCore");
|
|
7831
7859
|
const _component_KdsEmptyState = resolveComponent("KdsEmptyState");
|
|
7832
7860
|
const _component_PageControls = resolveComponent("PageControls");
|
|
7833
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [$
|
|
7861
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [$options.showActionBar ? (openBlock(), createBlock(_component_TableActionBar, {
|
|
7834
7862
|
key: 0,
|
|
7835
7863
|
"table-sizes": $props.tableState.tableSizes,
|
|
7836
7864
|
"action-state": $props.actionState,
|
|
7837
7865
|
"row-label": $props.tableConfig.rowLabel,
|
|
7838
7866
|
"show-table-size": $props.tableConfig.showTableSize,
|
|
7839
|
-
"action-config": $props.actionConfig,
|
|
7867
|
+
"action-config": $props.actionConfig ?? {},
|
|
7840
7868
|
"col-sort-values": $props.colSortValues,
|
|
7841
7869
|
"sort-control-options": $options.sortControlOptions,
|
|
7842
7870
|
onResetTemporaryView: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("resetTemporaryView")),
|
|
@@ -8093,7 +8121,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8093
8121
|
])) : createCommentVNode("", true)
|
|
8094
8122
|
], 544)]);
|
|
8095
8123
|
}
|
|
8096
|
-
var TableUI_default = /*#__PURE__*/ _plugin_vue_export_helper_default(TableUI_vue_vue_type_script_lang_default, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
8124
|
+
var TableUI_default = /*#__PURE__*/ _plugin_vue_export_helper_default(TableUI_vue_vue_type_script_lang_default, [["render", _sfc_render$1], ["__scopeId", "data-v-1941898e"]]);
|
|
8097
8125
|
//#endregion
|
|
8098
8126
|
//#region src/components/composables/useTableReady.ts
|
|
8099
8127
|
var useTableReady = ({ onReady }) => {
|