@knime/kds-table 6.4.0 → 6.5.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 +13 -0
- package/dist/index.css +26 -15
- package/dist/index.js +22 -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,18 @@
|
|
|
1
1
|
# @knime/kds-table
|
|
2
2
|
|
|
3
|
+
## 6.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e89e10c: - `TableUI`:
|
|
8
|
+
- 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`.
|
|
9
|
+
- Render the action bar whenever `actionState.viewType` is `TEMP_VIEW` or `PREVIEW`, even when no action bar feature is enabled via `actionConfig`.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- @knime/kds-components@6.5.0
|
|
14
|
+
- @knime/kds-styles@6.5.0
|
|
15
|
+
|
|
3
16
|
## 6.4.0
|
|
4
17
|
|
|
5
18
|
### 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;
|
|
@@ -5078,7 +5078,7 @@ var _hoisted_4$2 = {
|
|
|
5078
5078
|
key: 0,
|
|
5079
5079
|
class: "muted"
|
|
5080
5080
|
};
|
|
5081
|
-
var _hoisted_5 = { class: "subtle" };
|
|
5081
|
+
var _hoisted_5$1 = { class: "subtle" };
|
|
5082
5082
|
//#endregion
|
|
5083
5083
|
//#region src/components/control/PageControls.vue?vue&type=script&lang.ts
|
|
5084
5084
|
/**
|
|
@@ -5113,7 +5113,7 @@ var PageControls_vue_vue_type_script_lang_default = {
|
|
|
5113
5113
|
return __props.showTableSize && __props.currentItems === 0 ? (openBlock(), createElementBlock("span", _hoisted_1$10, "No data")) : (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
5114
5114
|
createElementVNode("span", _hoisted_3$3, toDisplayString(__props.rowLabel) + ":", 1),
|
|
5115
5115
|
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)
|
|
5116
|
+
createElementVNode("span", _hoisted_5$1, toDisplayString(rowCountText.value), 1)
|
|
5117
5117
|
]));
|
|
5118
5118
|
};
|
|
5119
5119
|
}
|
|
@@ -5377,9 +5377,13 @@ var _hoisted_1$6 = { class: "left" };
|
|
|
5377
5377
|
var _hoisted_2$4 = { class: "center" };
|
|
5378
5378
|
var _hoisted_3$1 = {
|
|
5379
5379
|
key: 0,
|
|
5380
|
+
class: "preview"
|
|
5381
|
+
};
|
|
5382
|
+
var _hoisted_4$1 = {
|
|
5383
|
+
key: 1,
|
|
5380
5384
|
class: "dimension"
|
|
5381
5385
|
};
|
|
5382
|
-
var
|
|
5386
|
+
var _hoisted_5 = { class: "right" };
|
|
5383
5387
|
//#endregion
|
|
5384
5388
|
//#region src/components/control/TableActionBar.vue
|
|
5385
5389
|
var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -5405,6 +5409,7 @@ var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
5405
5409
|
const slots = useSlots();
|
|
5406
5410
|
const viewType = computed(() => __props.actionState?.viewType ?? "DEFAULT");
|
|
5407
5411
|
const isTemporaryView = computed(() => viewType.value === "TEMP_VIEW" || viewType.value === "PREVIEW");
|
|
5412
|
+
const isPreview = computed(() => viewType.value === "PREVIEW");
|
|
5408
5413
|
const showResetButton = computed(() => viewType.value === "TEMP_VIEW");
|
|
5409
5414
|
const hasContent = computed(() => isTemporaryView.value || __props.showTableSize || __props.actionConfig.enableSearch || __props.actionConfig.enableSorting || __props.actionConfig.forceShow || Boolean(slots["action-bar-left"]));
|
|
5410
5415
|
/**
|
|
@@ -5435,8 +5440,11 @@ var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
5435
5440
|
"sort-control-options": __props.sortControlOptions,
|
|
5436
5441
|
onColumnSort: _cache[0] || (_cache[0] = (columnId, colDir) => emit("onColumnSort", columnId, colDir))
|
|
5437
5442
|
}, 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
|
-
|
|
5443
|
+
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), {
|
|
5444
|
+
key: 0,
|
|
5445
|
+
content: __props.actionState.previewDescription
|
|
5446
|
+
}, null, 8, ["content"])) : createCommentVNode("", true)])) : createCommentVNode("", true), __props.showTableSize ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(dimensionText.value), 1)) : createCommentVNode("", true)]),
|
|
5447
|
+
createElementVNode("div", _hoisted_5, [
|
|
5440
5448
|
__props.actionConfig.enableSearch ? (openBlock(), createBlock(unref(KdsSearchInput), {
|
|
5441
5449
|
key: 0,
|
|
5442
5450
|
ariaLabel: "Search table",
|
|
@@ -5464,7 +5472,7 @@ var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
5464
5472
|
], 2)) : createCommentVNode("", true);
|
|
5465
5473
|
};
|
|
5466
5474
|
}
|
|
5467
|
-
}), [["__scopeId", "data-v-
|
|
5475
|
+
}), [["__scopeId", "data-v-c9fae4f1"]]);
|
|
5468
5476
|
//#endregion
|
|
5469
5477
|
//#region src/components/composables/useHeaderMenuItems.ts
|
|
5470
5478
|
var useHeaderMenuItems = ({ enableSorting, sortDirection, sortTexts, additionalMenuItems, onColumnSort }) => {
|
|
@@ -7299,6 +7307,10 @@ var TableUI_vue_vue_type_script_lang_default = {
|
|
|
7299
7307
|
};
|
|
7300
7308
|
},
|
|
7301
7309
|
computed: {
|
|
7310
|
+
showActionBar() {
|
|
7311
|
+
const viewType = this.actionState?.viewType;
|
|
7312
|
+
return Boolean(this.actionConfig) || viewType === "TEMP_VIEW" || viewType === "PREVIEW";
|
|
7313
|
+
},
|
|
7302
7314
|
minRowHeight() {
|
|
7303
7315
|
return this.rowConfig.compactMode ? COMPACT_ROW_HEIGHT : DEFAULT_ROW_HEIGHT;
|
|
7304
7316
|
},
|
|
@@ -7830,13 +7842,13 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7830
7842
|
const _component_TableCore = resolveComponent("TableCore");
|
|
7831
7843
|
const _component_KdsEmptyState = resolveComponent("KdsEmptyState");
|
|
7832
7844
|
const _component_PageControls = resolveComponent("PageControls");
|
|
7833
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [$
|
|
7845
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [$options.showActionBar ? (openBlock(), createBlock(_component_TableActionBar, {
|
|
7834
7846
|
key: 0,
|
|
7835
7847
|
"table-sizes": $props.tableState.tableSizes,
|
|
7836
7848
|
"action-state": $props.actionState,
|
|
7837
7849
|
"row-label": $props.tableConfig.rowLabel,
|
|
7838
7850
|
"show-table-size": $props.tableConfig.showTableSize,
|
|
7839
|
-
"action-config": $props.actionConfig,
|
|
7851
|
+
"action-config": $props.actionConfig ?? {},
|
|
7840
7852
|
"col-sort-values": $props.colSortValues,
|
|
7841
7853
|
"sort-control-options": $options.sortControlOptions,
|
|
7842
7854
|
onResetTemporaryView: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("resetTemporaryView")),
|
|
@@ -8093,7 +8105,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8093
8105
|
])) : createCommentVNode("", true)
|
|
8094
8106
|
], 544)]);
|
|
8095
8107
|
}
|
|
8096
|
-
var TableUI_default = /*#__PURE__*/ _plugin_vue_export_helper_default(TableUI_vue_vue_type_script_lang_default, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
8108
|
+
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
8109
|
//#endregion
|
|
8098
8110
|
//#region src/components/composables/useTableReady.ts
|
|
8099
8111
|
var useTableReady = ({ onReady }) => {
|