@knime/kds-table 0.6.0 → 0.6.1
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 +10 -0
- package/dist/index.css +47 -43
- package/dist/index.js +58 -50
- package/dist/index.js.map +1 -1
- package/dist/src/components/TableUI.vue.d.ts +7 -3
- package/dist/src/components/TableUI.vue.d.ts.map +1 -1
- package/dist/src/components/TableUIWithAutoSizeCalculation.vue.d.ts +8 -4
- package/dist/src/components/TableUIWithAutoSizeCalculation.vue.d.ts.map +1 -1
- package/dist/src/components/control/TableActionBar.vue.d.ts +4 -2
- package/dist/src/components/control/TableActionBar.vue.d.ts.map +1 -1
- package/dist/src/components/layout/CellRenderer.vue.d.ts.map +1 -1
- package/dist/src/components/layout/HeaderCell.vue.d.ts.map +1 -1
- package/dist/src/components/layout/Row.vue.d.ts.map +1 -1
- package/dist/src/types/ActionConfig.d.ts +7 -0
- package/dist/src/types/ActionConfig.d.ts.map +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @knime/kds-table
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3b4d3b8: Add search input in action bar
|
|
8
|
+
- Updated dependencies [95a5069]
|
|
9
|
+
- Updated dependencies [ccb4d18]
|
|
10
|
+
- @knime/kds-components@1.1.2
|
|
11
|
+
- @knime/kds-styles@1.1.2
|
|
12
|
+
|
|
3
13
|
## 0.6.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/dist/index.css
CHANGED
|
@@ -207,7 +207,7 @@ tr {
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
.kds-table-action-bar {
|
|
210
|
-
&[data-v-
|
|
210
|
+
&[data-v-96b1acf9] {
|
|
211
211
|
display: flex;
|
|
212
212
|
align-items: center;
|
|
213
213
|
justify-content: space-between;
|
|
@@ -216,24 +216,24 @@ tr {
|
|
|
216
216
|
padding-left: var(--kds-spacing-container-0-5x);
|
|
217
217
|
border-top: var(--kds-border-base-subtle);
|
|
218
218
|
}
|
|
219
|
-
&.temporary-view[data-v-
|
|
219
|
+
&.temporary-view[data-v-96b1acf9] {
|
|
220
220
|
background-color: var(--kds-color-background-static-info-muted);
|
|
221
221
|
}
|
|
222
222
|
& .left {
|
|
223
|
-
&[data-v-
|
|
223
|
+
&[data-v-96b1acf9] {
|
|
224
224
|
display: flex;
|
|
225
225
|
flex: 1 0 0;
|
|
226
226
|
gap: var(--kds-spacing-container-0-5x);
|
|
227
227
|
align-items: center;
|
|
228
228
|
padding: var(--kds-spacing-container-0-12x) 0;
|
|
229
229
|
}
|
|
230
|
-
& .dimension[data-v-
|
|
230
|
+
& .dimension[data-v-96b1acf9] {
|
|
231
231
|
font: var(--kds-font-base-title-small);
|
|
232
232
|
color: var(--kds-color-text-and-icon-muted);
|
|
233
233
|
white-space: pre;
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
& .right[data-v-
|
|
236
|
+
& .right[data-v-96b1acf9] {
|
|
237
237
|
display: flex;
|
|
238
238
|
gap: var(--kds-spacing-container-0-25x);
|
|
239
239
|
align-items: center;
|
|
@@ -243,7 +243,7 @@ tr {
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
.column-header {
|
|
246
|
-
&[data-v-
|
|
246
|
+
&[data-v-f64d6cbe] {
|
|
247
247
|
/* Need to set position relative here to position the resize handle absolutely within the header cell */
|
|
248
248
|
position: relative;
|
|
249
249
|
display: flex;
|
|
@@ -257,62 +257,63 @@ tr {
|
|
|
257
257
|
text-align: left;
|
|
258
258
|
white-space: nowrap;
|
|
259
259
|
}
|
|
260
|
-
&.header-focused[data-v-
|
|
260
|
+
&.header-focused[data-v-f64d6cbe] {
|
|
261
261
|
background-color: var(--kds-color-focus-background);
|
|
262
262
|
}
|
|
263
|
-
&.colored-header[data-v-
|
|
264
|
-
/* stylelint-disable
|
|
263
|
+
&.colored-header[data-v-f64d6cbe] {
|
|
264
|
+
/* stylelint-disable csstools/value-no-unknown-custom-properties -- runtime variable set via inline :style */
|
|
265
265
|
background-image: linear-gradient(
|
|
266
266
|
90deg,
|
|
267
267
|
var(--data-cell-color),
|
|
268
268
|
var(--data-cell-color)
|
|
269
269
|
);
|
|
270
|
+
/* stylelint-enable csstools/value-no-unknown-custom-properties */
|
|
270
271
|
background-repeat: no-repeat;
|
|
271
272
|
background-size: var(--kds-spacing-container-0-25x);
|
|
272
273
|
}
|
|
273
274
|
& .column-header-content {
|
|
274
|
-
&[data-v-
|
|
275
|
+
&[data-v-f64d6cbe] {
|
|
275
276
|
display: flex;
|
|
276
277
|
flex-direction: column;
|
|
277
278
|
justify-content: center;
|
|
278
279
|
width: 100%;
|
|
279
280
|
}
|
|
280
|
-
&[data-v-
|
|
281
|
+
&[data-v-f64d6cbe]:focus {
|
|
281
282
|
outline: none;
|
|
282
283
|
}
|
|
283
|
-
&.with-button-in-header[data-v-
|
|
284
|
+
&.with-button-in-header[data-v-f64d6cbe] {
|
|
284
285
|
width: calc(
|
|
285
286
|
100% - var(--kds-dimension-component-width-1-5x)
|
|
286
287
|
); /* due to .sub-menu-select-header / .delete-column-button: width */
|
|
287
288
|
}
|
|
288
289
|
& .main-header {
|
|
289
|
-
&[data-v-
|
|
290
|
+
&[data-v-f64d6cbe] {
|
|
290
291
|
display: flex;
|
|
291
292
|
}
|
|
292
|
-
& .header-text-container[data-v-
|
|
293
|
+
& .header-text-container[data-v-f64d6cbe] {
|
|
293
294
|
max-width: 100%;
|
|
294
295
|
overflow: hidden;
|
|
295
296
|
text-overflow: ellipsis;
|
|
296
297
|
font: var(--kds-font-base-title-medium-strong);
|
|
297
298
|
}
|
|
298
299
|
}
|
|
299
|
-
& .sub-header-text-container[data-v-
|
|
300
|
+
& .sub-header-text-container[data-v-f64d6cbe] {
|
|
300
301
|
overflow: hidden;
|
|
301
302
|
text-overflow: ellipsis;
|
|
302
303
|
font: var(--kds-font-base-subtext-small);
|
|
303
304
|
}
|
|
304
305
|
}
|
|
305
|
-
& .menu-button-hidden[data-v-
|
|
306
|
+
& .menu-button-hidden[data-v-f64d6cbe] {
|
|
306
307
|
pointer-events: none;
|
|
307
308
|
opacity: 0;
|
|
308
309
|
}
|
|
309
|
-
& .delete-column-button[data-v-
|
|
310
|
+
& .delete-column-button[data-v-f64d6cbe] {
|
|
310
311
|
display: flex;
|
|
311
312
|
align-items: center;
|
|
312
313
|
width: var(--kds-dimension-component-width-2x);
|
|
313
314
|
}
|
|
314
315
|
& .resize-handle-area {
|
|
315
|
-
&[data-v-
|
|
316
|
+
&[data-v-f64d6cbe] {
|
|
316
317
|
position: absolute;
|
|
317
318
|
|
|
318
319
|
/* resize handle should range into top border */
|
|
@@ -338,14 +339,14 @@ tr {
|
|
|
338
339
|
cursor: col-resize;
|
|
339
340
|
opacity: 0;
|
|
340
341
|
}
|
|
341
|
-
& .resize-handle[data-v-
|
|
342
|
+
& .resize-handle[data-v-f64d6cbe] {
|
|
342
343
|
border-right: var(--kds-border-resize-handle-hover);
|
|
343
344
|
border-radius: var(--kds-border-radius-container-0-25x);
|
|
344
345
|
}
|
|
345
|
-
&.hover[data-v-
|
|
346
|
+
&.hover[data-v-f64d6cbe] {
|
|
346
347
|
opacity: 1;
|
|
347
348
|
}
|
|
348
|
-
&.drag[data-v-
|
|
349
|
+
&.drag[data-v-f64d6cbe] {
|
|
349
350
|
opacity: 1;
|
|
350
351
|
}
|
|
351
352
|
}
|
|
@@ -464,7 +465,7 @@ thead {
|
|
|
464
465
|
}
|
|
465
466
|
|
|
466
467
|
.data-cell {
|
|
467
|
-
&[data-v-
|
|
468
|
+
&[data-v-8ecc59ac] {
|
|
468
469
|
display: flex;
|
|
469
470
|
font: var(--kds-font-base-interactive-small);
|
|
470
471
|
color: var(--kds-color-text-and-icon-neutral);
|
|
@@ -472,27 +473,28 @@ thead {
|
|
|
472
473
|
user-select: none;
|
|
473
474
|
background-clip: border-box;
|
|
474
475
|
}
|
|
475
|
-
&.in-cell-selection[data-v-
|
|
476
|
+
&.in-cell-selection[data-v-8ecc59ac] {
|
|
476
477
|
background-color: var(--kds-color-focus-background);
|
|
477
478
|
}
|
|
478
|
-
&.colored-cell[data-v-
|
|
479
|
-
/* stylelint-disable
|
|
479
|
+
&.colored-cell[data-v-8ecc59ac] {
|
|
480
|
+
/* stylelint-disable csstools/value-no-unknown-custom-properties -- runtime variable set via inline :style */
|
|
480
481
|
background-image: linear-gradient(
|
|
481
482
|
90deg,
|
|
482
483
|
var(--data-cell-color),
|
|
483
484
|
var(--data-cell-color)
|
|
484
485
|
);
|
|
486
|
+
/* stylelint-enable csstools/value-no-unknown-custom-properties */
|
|
485
487
|
background-repeat: no-repeat;
|
|
486
488
|
background-size: var(--kds-spacing-container-0-25x);
|
|
487
489
|
}
|
|
488
|
-
& .cell-content[data-v-
|
|
490
|
+
& .cell-content[data-v-8ecc59ac] {
|
|
489
491
|
display: flex;
|
|
490
492
|
gap: var(--kds-spacing-container-0-25x);
|
|
491
493
|
align-self: flex-start;
|
|
492
494
|
justify-content: space-between;
|
|
493
495
|
width: 100%;
|
|
494
496
|
}
|
|
495
|
-
& .cell-content .cell-text[data-v-
|
|
497
|
+
& .cell-content .cell-text[data-v-8ecc59ac] {
|
|
496
498
|
flex: 0 1 auto;
|
|
497
499
|
min-width: 0;
|
|
498
500
|
overflow: hidden;
|
|
@@ -501,33 +503,33 @@ thead {
|
|
|
501
503
|
}
|
|
502
504
|
}
|
|
503
505
|
|
|
504
|
-
tr[data-v-
|
|
506
|
+
tr[data-v-8b00de21] {
|
|
505
507
|
display: flex;
|
|
506
508
|
}
|
|
507
509
|
tr.row {
|
|
508
|
-
&[data-v-
|
|
510
|
+
&[data-v-8b00de21] {
|
|
509
511
|
border-bottom: var(--kds-border-base-subtle);
|
|
510
512
|
}
|
|
511
513
|
& td {
|
|
512
|
-
&[data-v-
|
|
514
|
+
&[data-v-8b00de21] {
|
|
513
515
|
padding: 0;
|
|
514
516
|
overflow: hidden;
|
|
515
517
|
text-overflow: ellipsis;
|
|
516
518
|
}
|
|
517
519
|
&.select-cell {
|
|
518
|
-
&[data-v-
|
|
520
|
+
&[data-v-8b00de21] {
|
|
519
521
|
display: flex;
|
|
520
522
|
justify-content: center;
|
|
521
523
|
width: var(--kds-dimension-component-width-2x);
|
|
522
524
|
min-width: var(--kds-dimension-component-width-2x);
|
|
523
525
|
}
|
|
524
|
-
& .select-checkbox[data-v-
|
|
526
|
+
& .select-checkbox[data-v-8b00de21] {
|
|
525
527
|
/* With this added padding the checkbox appears centered initially */
|
|
526
528
|
padding: var(--kds-spacing-container-0-10x);
|
|
527
529
|
}
|
|
528
530
|
}
|
|
529
531
|
&.deletion-cell {
|
|
530
|
-
&[data-v-
|
|
532
|
+
&[data-v-8b00de21] {
|
|
531
533
|
display: flex;
|
|
532
534
|
align-items: center;
|
|
533
535
|
justify-content: center;
|
|
@@ -535,11 +537,11 @@ tr.row {
|
|
|
535
537
|
min-width: var(--kds-dimension-component-width-2x);
|
|
536
538
|
opacity: 0;
|
|
537
539
|
}
|
|
538
|
-
&[data-v-
|
|
540
|
+
&[data-v-8b00de21]:focus-within {
|
|
539
541
|
opacity: 1;
|
|
540
542
|
}
|
|
541
543
|
}
|
|
542
|
-
&.action[data-v-
|
|
544
|
+
&.action[data-v-8b00de21] {
|
|
543
545
|
display: flex;
|
|
544
546
|
align-items: center;
|
|
545
547
|
justify-content: center;
|
|
@@ -548,19 +550,21 @@ tr.row {
|
|
|
548
550
|
}
|
|
549
551
|
}
|
|
550
552
|
&:hover {
|
|
551
|
-
&[data-v-
|
|
553
|
+
&[data-v-8b00de21] {
|
|
552
554
|
outline: none;
|
|
553
555
|
background-color: var(--kds-color-background-neutral-hover);
|
|
556
|
+
|
|
557
|
+
/* stylelint-disable-next-line no-descending-specificity -- hover needs lower specificity but must come after base rule */
|
|
554
558
|
}
|
|
555
|
-
& .deletion-cell[data-v-
|
|
559
|
+
& .deletion-cell[data-v-8b00de21] {
|
|
556
560
|
opacity: 1;
|
|
557
561
|
}
|
|
558
562
|
}
|
|
559
|
-
& a[data-v-
|
|
563
|
+
& a[data-v-8b00de21] {
|
|
560
564
|
outline: none;
|
|
561
565
|
}
|
|
562
566
|
}
|
|
563
|
-
.row-drag-handle[data-v-
|
|
567
|
+
.row-drag-handle[data-v-8b00de21] {
|
|
564
568
|
position: relative;
|
|
565
569
|
bottom: var(--kds-spacing-container-0-37x);
|
|
566
570
|
height: var(--kds-spacing-container-0-37x);
|
|
@@ -581,7 +585,7 @@ tr.row {
|
|
|
581
585
|
}
|
|
582
586
|
}
|
|
583
587
|
|
|
584
|
-
.wrapper[data-v-
|
|
588
|
+
.wrapper[data-v-51f46838] {
|
|
585
589
|
display: flex;
|
|
586
590
|
flex-direction: column;
|
|
587
591
|
width: 100%;
|
|
@@ -591,7 +595,7 @@ tr.row {
|
|
|
591
595
|
}
|
|
592
596
|
}
|
|
593
597
|
table {
|
|
594
|
-
&[data-v-
|
|
598
|
+
&[data-v-51f46838] {
|
|
595
599
|
position: relative;
|
|
596
600
|
display: flex;
|
|
597
601
|
flex-grow: 1;
|
|
@@ -599,10 +603,10 @@ table {
|
|
|
599
603
|
width: 100%;
|
|
600
604
|
min-height: 0;
|
|
601
605
|
}
|
|
602
|
-
&[data-v-
|
|
606
|
+
&[data-v-51f46838]:focus {
|
|
603
607
|
outline: none;
|
|
604
608
|
}
|
|
605
|
-
& .new-row-footer[data-v-
|
|
609
|
+
& .new-row-footer[data-v-51f46838] {
|
|
606
610
|
width: 100%;
|
|
607
611
|
}
|
|
608
612
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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,
|
|
2
|
-
import { KdsCheckbox, KdsLoadingSkeleton, KdsButton, KdsMenuButton, KdsDropdown, KdsTextInput, KdsMultiSelectDropdown, KdsToggleButton, KdsPopover, KdsIcon, KdsMissingValueIcon } from '@knime/kds-components';
|
|
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, mergeProps, useSlots, createSlots, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
|
+
import { KdsCheckbox, KdsLoadingSkeleton, KdsButton, KdsMenuButton, KdsDropdown, KdsTextInput, KdsMultiSelectDropdown, KdsToggleButton, KdsPopover, KdsIcon, KdsSearchInput, KdsMissingValueIcon } from '@knime/kds-components';
|
|
3
3
|
|
|
4
4
|
import './index.css';const defaultPageSize = 10;
|
|
5
5
|
const filterComponents = {
|
|
@@ -2319,7 +2319,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2319
2319
|
props: {
|
|
2320
2320
|
tableSizes: {},
|
|
2321
2321
|
rowLabel: { default: "Rows" },
|
|
2322
|
-
|
|
2322
|
+
actionState: {},
|
|
2323
2323
|
showTableSize: { type: Boolean, default: true },
|
|
2324
2324
|
actionConfig: {},
|
|
2325
2325
|
colSortValues: { default: () => [] },
|
|
@@ -2327,14 +2327,15 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2327
2327
|
sortControlOptions: {},
|
|
2328
2328
|
columns: {}
|
|
2329
2329
|
},
|
|
2330
|
-
emits: ["resetTemporaryView", "columnFilter", "onColumnSort"],
|
|
2330
|
+
emits: ["resetTemporaryView", "columnFilter", "onColumnSort", "update:searchTerm"],
|
|
2331
2331
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2332
|
+
const viewType = computed(() => __props.actionState?.viewType ?? "DEFAULT");
|
|
2332
2333
|
const isTemporaryView = computed(
|
|
2333
|
-
() =>
|
|
2334
|
+
() => viewType.value === "TEMP_VIEW" || viewType.value === "PREVIEW"
|
|
2334
2335
|
);
|
|
2335
|
-
const showResetButton = computed(() =>
|
|
2336
|
+
const showResetButton = computed(() => viewType.value === "TEMP_VIEW");
|
|
2336
2337
|
const hasContent = computed(
|
|
2337
|
-
() => isTemporaryView.value || __props.showTableSize || __props.actionConfig.enableSorting || __props.actionConfig.enableFilters || __props.actionConfig.forceShow
|
|
2338
|
+
() => isTemporaryView.value || __props.showTableSize || __props.actionConfig.enableSearch || __props.actionConfig.enableSorting || __props.actionConfig.enableFilters || __props.actionConfig.forceShow
|
|
2338
2339
|
);
|
|
2339
2340
|
const formatCount = (label, total, current) => {
|
|
2340
2341
|
const appendTotal = current !== void 0 && current < total;
|
|
@@ -2392,8 +2393,15 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2392
2393
|
}, null, 8, ["columns", "col-filter-values"])) : createCommentVNode("", true)
|
|
2393
2394
|
]),
|
|
2394
2395
|
createElementVNode("div", _hoisted_3$2, [
|
|
2395
|
-
__props.actionConfig.
|
|
2396
|
+
__props.actionConfig.enableSearch ? (openBlock(), createBlock(unref(KdsSearchInput), {
|
|
2396
2397
|
key: 0,
|
|
2398
|
+
ariaLabel: "Search table",
|
|
2399
|
+
size: "small",
|
|
2400
|
+
"model-value": __props.actionState?.searchTerm ?? "",
|
|
2401
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:searchTerm", $event))
|
|
2402
|
+
}, null, 8, ["model-value"])) : createCommentVNode("", true),
|
|
2403
|
+
__props.actionConfig.settingsItems?.length ? (openBlock(), createBlock(unref(KdsMenuButton), {
|
|
2404
|
+
key: 1,
|
|
2397
2405
|
ariaLabel: "Table settings",
|
|
2398
2406
|
size: "small",
|
|
2399
2407
|
variant: "transparent",
|
|
@@ -2401,12 +2409,12 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2401
2409
|
items: __props.actionConfig.settingsItems
|
|
2402
2410
|
}, null, 8, ["items"])) : createCommentVNode("", true),
|
|
2403
2411
|
showResetButton.value ? (openBlock(), createBlock(unref(KdsButton), {
|
|
2404
|
-
key:
|
|
2412
|
+
key: 2,
|
|
2405
2413
|
ariaLabel: "Reset to Nodeoutput",
|
|
2406
2414
|
size: "small",
|
|
2407
2415
|
variant: "transparent",
|
|
2408
2416
|
"leading-icon": "x-close",
|
|
2409
|
-
onClick: _cache[
|
|
2417
|
+
onClick: _cache[3] || (_cache[3] = ($event) => emit("resetTemporaryView"))
|
|
2410
2418
|
})) : createCommentVNode("", true)
|
|
2411
2419
|
])
|
|
2412
2420
|
], 2)) : createCommentVNode("", true);
|
|
@@ -2414,7 +2422,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2414
2422
|
}
|
|
2415
2423
|
});
|
|
2416
2424
|
|
|
2417
|
-
const TableActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
2425
|
+
const TableActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-96b1acf9"]]);
|
|
2418
2426
|
|
|
2419
2427
|
const useHeaderMenuItems = ({
|
|
2420
2428
|
enableSorting,
|
|
@@ -2516,7 +2524,6 @@ function tryOnScopeDispose(fn, failSilently) {
|
|
|
2516
2524
|
}
|
|
2517
2525
|
return false;
|
|
2518
2526
|
}
|
|
2519
|
-
|
|
2520
2527
|
//#endregion
|
|
2521
2528
|
//#region utils/is.ts
|
|
2522
2529
|
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
@@ -2525,7 +2532,6 @@ typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalSc
|
|
|
2525
2532
|
//#endregion
|
|
2526
2533
|
//#region _configurable.ts
|
|
2527
2534
|
const defaultWindow = isClient ? window : void 0;
|
|
2528
|
-
|
|
2529
2535
|
//#endregion
|
|
2530
2536
|
//#region useRafFn/index.ts
|
|
2531
2537
|
/**
|
|
@@ -2536,7 +2542,7 @@ const defaultWindow = isClient ? window : void 0;
|
|
|
2536
2542
|
* @param options
|
|
2537
2543
|
*/
|
|
2538
2544
|
function useRafFn(fn, options = {}) {
|
|
2539
|
-
const { immediate = true, fpsLimit = null, window
|
|
2545
|
+
const { immediate = true, fpsLimit = null, window = defaultWindow, once = false } = options;
|
|
2540
2546
|
const isActive = shallowRef(false);
|
|
2541
2547
|
const intervalLimit = computed(() => {
|
|
2542
2548
|
const limit = toValue(fpsLimit);
|
|
@@ -2544,44 +2550,44 @@ function useRafFn(fn, options = {}) {
|
|
|
2544
2550
|
});
|
|
2545
2551
|
let previousFrameTimestamp = 0;
|
|
2546
2552
|
let rafId = null;
|
|
2547
|
-
function loop(timestamp
|
|
2548
|
-
if (!isActive.value || !window
|
|
2549
|
-
if (!previousFrameTimestamp) previousFrameTimestamp = timestamp
|
|
2550
|
-
const delta = timestamp
|
|
2553
|
+
function loop(timestamp) {
|
|
2554
|
+
if (!isActive.value || !window) return;
|
|
2555
|
+
if (!previousFrameTimestamp) previousFrameTimestamp = timestamp;
|
|
2556
|
+
const delta = timestamp - previousFrameTimestamp;
|
|
2551
2557
|
if (intervalLimit.value && delta < intervalLimit.value) {
|
|
2552
|
-
rafId = window
|
|
2558
|
+
rafId = window.requestAnimationFrame(loop);
|
|
2553
2559
|
return;
|
|
2554
2560
|
}
|
|
2555
|
-
previousFrameTimestamp = timestamp
|
|
2561
|
+
previousFrameTimestamp = timestamp;
|
|
2556
2562
|
fn({
|
|
2557
2563
|
delta,
|
|
2558
|
-
timestamp
|
|
2564
|
+
timestamp
|
|
2559
2565
|
});
|
|
2560
2566
|
if (once) {
|
|
2561
2567
|
isActive.value = false;
|
|
2562
2568
|
rafId = null;
|
|
2563
2569
|
return;
|
|
2564
2570
|
}
|
|
2565
|
-
rafId = window
|
|
2571
|
+
rafId = window.requestAnimationFrame(loop);
|
|
2566
2572
|
}
|
|
2567
2573
|
function resume() {
|
|
2568
|
-
if (!isActive.value && window
|
|
2574
|
+
if (!isActive.value && window) {
|
|
2569
2575
|
isActive.value = true;
|
|
2570
2576
|
previousFrameTimestamp = 0;
|
|
2571
|
-
rafId = window
|
|
2577
|
+
rafId = window.requestAnimationFrame(loop);
|
|
2572
2578
|
}
|
|
2573
2579
|
}
|
|
2574
2580
|
function pause() {
|
|
2575
2581
|
isActive.value = false;
|
|
2576
|
-
if (rafId != null && window
|
|
2577
|
-
window
|
|
2582
|
+
if (rafId != null && window) {
|
|
2583
|
+
window.cancelAnimationFrame(rafId);
|
|
2578
2584
|
rafId = null;
|
|
2579
2585
|
}
|
|
2580
2586
|
}
|
|
2581
2587
|
if (immediate) resume();
|
|
2582
2588
|
tryOnScopeDispose(pause);
|
|
2583
2589
|
return {
|
|
2584
|
-
isActive:
|
|
2590
|
+
isActive: shallowReadonly(isActive),
|
|
2585
2591
|
pause,
|
|
2586
2592
|
resume
|
|
2587
2593
|
};
|
|
@@ -2915,7 +2921,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
2915
2921
|
}
|
|
2916
2922
|
});
|
|
2917
2923
|
|
|
2918
|
-
const HeaderCell = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
2924
|
+
const HeaderCell = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-f64d6cbe"]]);
|
|
2919
2925
|
|
|
2920
2926
|
const _sfc_main$8 = {
|
|
2921
2927
|
components: {
|
|
@@ -3503,7 +3509,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3503
3509
|
}
|
|
3504
3510
|
});
|
|
3505
3511
|
|
|
3506
|
-
const CellRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
3512
|
+
const CellRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-8ecc59ac"]]);
|
|
3507
3513
|
|
|
3508
3514
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3509
3515
|
__name: "Cell",
|
|
@@ -3897,7 +3903,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3897
3903
|
}
|
|
3898
3904
|
});
|
|
3899
3905
|
|
|
3900
|
-
const Row = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
3906
|
+
const Row = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-8b00de21"]]);
|
|
3901
3907
|
|
|
3902
3908
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3903
3909
|
__name: "CellSelectionOverlay",
|
|
@@ -4186,6 +4192,7 @@ const _sfc_main$1 = {
|
|
|
4186
4192
|
columnResizeStart: () => true,
|
|
4187
4193
|
columnResizeEnd: () => true,
|
|
4188
4194
|
"update:available-width": (newAvailableWidth) => true,
|
|
4195
|
+
"update:searchTerm": (newSearchTerm) => true,
|
|
4189
4196
|
rowHeightUpdate: (newRowHeight) => true,
|
|
4190
4197
|
copySelection: (copySelectionParams) => true,
|
|
4191
4198
|
pasteSelection: (pasteSelectionParams) => true,
|
|
@@ -5045,7 +5052,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5045
5052
|
key: 0,
|
|
5046
5053
|
ref: "actionBar",
|
|
5047
5054
|
"table-sizes": $props.tableState.tableSizes,
|
|
5048
|
-
"
|
|
5055
|
+
"action-state": $props.actionState,
|
|
5049
5056
|
"row-label": $props.tableConfig.rowLabel,
|
|
5050
5057
|
"show-table-size": $props.tableConfig.showTableSize,
|
|
5051
5058
|
"action-config": $props.actionConfig,
|
|
@@ -5055,19 +5062,20 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5055
5062
|
columns: $props.columns,
|
|
5056
5063
|
onResetTemporaryView: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("resetTemporaryView")),
|
|
5057
5064
|
onColumnFilter: _cache[1] || (_cache[1] = (colInd, value) => _ctx.$emit("columnFilter", colInd, value)),
|
|
5058
|
-
onOnColumnSort: $options.onActionBarColumnSort
|
|
5059
|
-
|
|
5065
|
+
onOnColumnSort: $options.onActionBarColumnSort,
|
|
5066
|
+
"onUpdate:searchTerm": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:searchTerm", $event))
|
|
5067
|
+
}, null, 8, ["table-sizes", "action-state", "row-label", "show-table-size", "action-config", "col-sort-values", "col-filter-values", "sort-control-options", "columns", "onOnColumnSort"])) : createCommentVNode("", true),
|
|
5060
5068
|
createElementVNode("table", {
|
|
5061
5069
|
ref: "wrapper",
|
|
5062
5070
|
tabindex: -1,
|
|
5063
|
-
onPointerleave: _cache[
|
|
5064
|
-
onPointerdownPassive: _cache[
|
|
5065
|
-
onPointerupPassive: _cache[
|
|
5071
|
+
onPointerleave: _cache[12] || (_cache[12] = (...args) => $setup.selectCellsOnMove.setFalse && $setup.selectCellsOnMove.setFalse(...args)),
|
|
5072
|
+
onPointerdownPassive: _cache[13] || (_cache[13] = withModifiers(($event) => $event.button === 0 && $setup.selectCellsOnMove.setTrue(), ["stop"])),
|
|
5073
|
+
onPointerupPassive: _cache[14] || (_cache[14] = ($event) => $event.button === 0 && $setup.selectCellsOnMove.setFalse()),
|
|
5066
5074
|
onKeydown: [
|
|
5067
|
-
_cache[
|
|
5068
|
-
_cache[
|
|
5069
|
-
_cache[
|
|
5070
|
-
_cache[
|
|
5075
|
+
_cache[15] || (_cache[15] = withKeys(withModifiers((...args) => $setup.handleCopyOnKeydown && $setup.handleCopyOnKeydown(...args), ["ctrl", "shift", "exact"]), ["c"])),
|
|
5076
|
+
_cache[16] || (_cache[16] = withKeys(withModifiers((...args) => $setup.handleCopyOnKeydown && $setup.handleCopyOnKeydown(...args), ["meta", "shift", "exact"]), ["c"])),
|
|
5077
|
+
_cache[17] || (_cache[17] = withKeys(withModifiers((...args) => $setup.handleDeleteSelection && $setup.handleDeleteSelection(...args), ["exact"]), ["delete"])),
|
|
5078
|
+
_cache[18] || (_cache[18] = withKeys(withModifiers((...args) => $setup.clearCellSelectionAndStopPropagation && $setup.clearCellSelectionAndStopPropagation(...args), ["exact"]), ["escape"]))
|
|
5071
5079
|
]
|
|
5072
5080
|
}, [
|
|
5073
5081
|
createVNode(_component_TableCore, {
|
|
@@ -5086,13 +5094,13 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5086
5094
|
"current-row-height": $options.currentRowHeight,
|
|
5087
5095
|
"new-column-button-width": $setup.newColumnButtonWidth,
|
|
5088
5096
|
onScrollerUpdate: $options.onScroll,
|
|
5089
|
-
"onUpdate:availableWidth": _cache[
|
|
5097
|
+
"onUpdate:availableWidth": _cache[9] || (_cache[9] = ($event) => _ctx.$emit("update:available-width", $event)),
|
|
5090
5098
|
onMoveSelection: $options.onKeyboardMoveSelection,
|
|
5091
5099
|
onClearSelection: $setup.clearCellSelection,
|
|
5092
5100
|
onExpandSelectedCell: $options.expandSelectedCell,
|
|
5093
5101
|
onStartEditing: $options.onStartEditingCell,
|
|
5094
|
-
onBodyFocusin: _cache[
|
|
5095
|
-
onBodyFocusout: _cache[
|
|
5102
|
+
onBodyFocusin: _cache[10] || (_cache[10] = ($event) => $setup.changeFocus(true)),
|
|
5103
|
+
onBodyFocusout: _cache[11] || (_cache[11] = ($event) => $options.onTableBodyFocusOut())
|
|
5096
5104
|
}, {
|
|
5097
5105
|
row: withCtx(({ row, groupInd, rowInd }) => [
|
|
5098
5106
|
createVNode(_component_Row, {
|
|
@@ -5136,10 +5144,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5136
5144
|
colInd: ind,
|
|
5137
5145
|
initialValue: $setup.editingCellInitialValue,
|
|
5138
5146
|
cellElement,
|
|
5139
|
-
onKeydown: _cache[
|
|
5147
|
+
onKeydown: _cache[3] || (_cache[3] = (event) => $setup.createEditingCellKeydownHandler({
|
|
5140
5148
|
moveSelection: $options.onKeyboardMoveSelectionFromEditingCell
|
|
5141
5149
|
})(event)),
|
|
5142
|
-
onClickAway: _cache[
|
|
5150
|
+
onClickAway: _cache[4] || (_cache[4] = (...args) => $setup.stopEditingCell && $setup.stopEditingCell(...args))
|
|
5143
5151
|
}, void 0, true)
|
|
5144
5152
|
]),
|
|
5145
5153
|
_: 2
|
|
@@ -5192,11 +5200,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5192
5200
|
onMoveDownFromHeaderCell: $options.onMoveDownFromHeaderCell,
|
|
5193
5201
|
onHeaderCellSelect: $options.onHeaderCellSelect,
|
|
5194
5202
|
onHeaderCellDeselect: $options.onHeaderCellDeselect,
|
|
5195
|
-
onHeaderCellStartEditing: _cache[
|
|
5203
|
+
onHeaderCellStartEditing: _cache[5] || (_cache[5] = (columnIndex, initialValue) => _ctx.$emit("headerCellStartEditing", columnIndex, initialValue)),
|
|
5196
5204
|
"onUpdate:newColumnButtonWidth": $options.onUpdateNewColumnButtonWidth,
|
|
5197
5205
|
onNewColumnButtonClick: $options.onNewColumnButtonClick,
|
|
5198
|
-
onSelectionKeydownDown: _cache[
|
|
5199
|
-
onNewColumnButtonKeydownLeft: _cache[
|
|
5206
|
+
onSelectionKeydownDown: _cache[6] || (_cache[6] = ($event) => $options.onHeaderSelectionKeydownDown()),
|
|
5207
|
+
onNewColumnButtonKeydownLeft: _cache[7] || (_cache[7] = ($event) => $options.onMoveIntoBodyFromRight())
|
|
5200
5208
|
}, {
|
|
5201
5209
|
subHeader: withCtx((slotProps) => [
|
|
5202
5210
|
renderSlot(_ctx.$slots, "subHeader", normalizeProps(guardReactiveProps(slotProps)), void 0, true)
|
|
@@ -5221,7 +5229,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5221
5229
|
key: 0,
|
|
5222
5230
|
ref: "new-row-button",
|
|
5223
5231
|
onClick: $options.onNewRowButtonClick,
|
|
5224
|
-
onPointerdown: _cache[
|
|
5232
|
+
onPointerdown: _cache[8] || (_cache[8] = withModifiers(() => {
|
|
5225
5233
|
}, ["stop"])),
|
|
5226
5234
|
onKeydownUp: $options.onMoveIntoBodyFromBottom
|
|
5227
5235
|
}, null, 8, ["onClick", "onKeydownUp"])) : createCommentVNode("", true)
|
|
@@ -5240,7 +5248,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5240
5248
|
], 544)
|
|
5241
5249
|
]);
|
|
5242
5250
|
}
|
|
5243
|
-
const TableUI = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
5251
|
+
const TableUI = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-51f46838"]]);
|
|
5244
5252
|
|
|
5245
5253
|
const useTableReady = ({ onReady }) => {
|
|
5246
5254
|
const autoSizesInitialized = ref(false);
|