@knime/product-features 1.1.0 → 1.1.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 +6 -0
- package/dist/dataTransfer.css +8 -8
- package/dist/dataTransfer.js +24 -63
- package/dist/dataTransfer.js.map +1 -1
- package/dist/format-ra_vlnN7.js.map +1 -1
- package/dist/src/dataTransfer/download/ui/DownloadProgressPanel.vue.d.ts +0 -2
- package/dist/src/dataTransfer/download/ui/DownloadProgressPanel.vue.d.ts.map +1 -1
- package/dist/src/dataTransfer/download/ui/DownloadProgressPanelItem.vue.d.ts +0 -2
- package/dist/src/dataTransfer/download/ui/DownloadProgressPanelItem.vue.d.ts.map +1 -1
- package/dist/src/dataTransfer/shared/ui/ProgressList/ProgressList.vue.d.ts.map +1 -1
- package/dist/src/dataTransfer/upload/ui/UploadProgressPanel.vue.d.ts +0 -2
- package/dist/src/dataTransfer/upload/ui/UploadProgressPanel.vue.d.ts.map +1 -1
- package/dist/src/dataTransfer/upload/ui/UploadProgressPanelItem.vue.d.ts +0 -3
- package/dist/src/dataTransfer/upload/ui/UploadProgressPanelItem.vue.d.ts.map +1 -1
- package/dist/src/toasts/Toast/Toast.vue.d.ts +2 -2
- package/dist/toasts.js.map +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @knime/product-features
|
|
2
2
|
|
|
3
|
+
## 1.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 50d919c: Don't support `remove` action for upload/download items. Instead, items can only be cancelled while in_progress, or they don't have an action otherwise.
|
|
8
|
+
|
|
3
9
|
## 1.1.0
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/dataTransfer.css
CHANGED
|
@@ -119,24 +119,24 @@
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
.progress-list {
|
|
122
|
-
&[data-v-
|
|
122
|
+
&[data-v-8f14a3cb] {
|
|
123
123
|
max-height: var(--kds-dimension-component-height-20x);
|
|
124
124
|
overflow-y: auto;
|
|
125
125
|
}
|
|
126
|
-
&[data-v-
|
|
126
|
+
&[data-v-8f14a3cb] .progress-wrapper:not(:first-child) {
|
|
127
127
|
border-top: var(--kds-border-base-subtle);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.upload-panel[data-v-
|
|
131
|
+
.upload-panel[data-v-3c6568f7] {
|
|
132
132
|
width: var(--kds-dimension-component-width-20x);
|
|
133
133
|
max-width: var(--kds-dimension-component-width-20x);
|
|
134
134
|
}
|
|
135
|
-
.upload-panel-content[data-v-
|
|
135
|
+
.upload-panel-content[data-v-3c6568f7] {
|
|
136
136
|
max-height: var(--kds-dimension-component-height-20x);
|
|
137
137
|
}
|
|
138
138
|
.skeleton-container {
|
|
139
|
-
&[data-v-
|
|
139
|
+
&[data-v-3c6568f7] {
|
|
140
140
|
display: grid;
|
|
141
141
|
grid-template-columns: min-content 1fr;
|
|
142
142
|
gap: var(--kds-spacing-container-0-25x);
|
|
@@ -145,17 +145,17 @@
|
|
|
145
145
|
padding: 0 var(--kds-spacing-container-1x);
|
|
146
146
|
border-top: var(--kds-border-base-subtle);
|
|
147
147
|
}
|
|
148
|
-
& .skeleton-text-content[data-v-
|
|
148
|
+
& .skeleton-text-content[data-v-3c6568f7] {
|
|
149
149
|
display: flex;
|
|
150
150
|
flex-direction: column;
|
|
151
151
|
gap: var(--kds-spacing-container-0-25x);
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
.download-panel[data-v-
|
|
155
|
+
.download-panel[data-v-cbf5d3c0] {
|
|
156
156
|
width: var(--kds-dimension-component-width-20x);
|
|
157
157
|
max-width: var(--kds-dimension-component-width-20x);
|
|
158
158
|
}
|
|
159
|
-
.download-panel-content[data-v-
|
|
159
|
+
.download-panel-content[data-v-cbf5d3c0] {
|
|
160
160
|
max-height: var(--kds-dimension-component-height-20x);
|
|
161
161
|
}
|
package/dist/dataTransfer.js
CHANGED
|
@@ -162,14 +162,17 @@ const ProgressItem = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "da
|
|
|
162
162
|
|
|
163
163
|
const _sfc_main$4 = { };
|
|
164
164
|
|
|
165
|
-
const _hoisted_1$2 = {
|
|
165
|
+
const _hoisted_1$2 = {
|
|
166
|
+
class: "progress-list",
|
|
167
|
+
tabindex: "0"
|
|
168
|
+
};
|
|
166
169
|
|
|
167
170
|
function _sfc_render(_ctx, _cache) {
|
|
168
171
|
return (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
169
172
|
renderSlot(_ctx.$slots, "default", {}, undefined, true)
|
|
170
173
|
]))
|
|
171
174
|
}
|
|
172
|
-
const ProgressList = /*#__PURE__*/_export_sfc(_sfc_main$4, [['render',_sfc_render],['__scopeId',"data-v-
|
|
175
|
+
const ProgressList = /*#__PURE__*/_export_sfc(_sfc_main$4, [['render',_sfc_render],['__scopeId',"data-v-8f14a3cb"]]);
|
|
173
176
|
|
|
174
177
|
class AbortError extends Error {
|
|
175
178
|
}
|
|
@@ -283,10 +286,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
283
286
|
__name: "UploadProgressPanelItem",
|
|
284
287
|
props: {
|
|
285
288
|
item: {},
|
|
286
|
-
allowCancel: { type: Boolean }
|
|
287
|
-
allowRemove: { type: Boolean }
|
|
289
|
+
allowCancel: { type: Boolean }
|
|
288
290
|
},
|
|
289
|
-
emits: ["
|
|
291
|
+
emits: ["cancel"],
|
|
290
292
|
setup(__props, { emit: __emit }) {
|
|
291
293
|
const props = __props;
|
|
292
294
|
const emit = __emit;
|
|
@@ -327,34 +329,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
327
329
|
const shouldShowCancelAction = computed(
|
|
328
330
|
() => props.allowCancel && props.item.status === "inprogress"
|
|
329
331
|
);
|
|
330
|
-
const shouldShowRemoveAction = computed(() => {
|
|
331
|
-
const allowedRemoveStatuses = [
|
|
332
|
-
"complete",
|
|
333
|
-
"failed",
|
|
334
|
-
"cancelled"
|
|
335
|
-
];
|
|
336
|
-
const showRemove = props.allowRemove && props.item.status && allowedRemoveStatuses.includes(props.item.status);
|
|
337
|
-
return showRemove;
|
|
338
|
-
});
|
|
339
332
|
const actions = computed(() => {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
actions2.push({
|
|
333
|
+
return shouldShowCancelAction.value ? [
|
|
334
|
+
{
|
|
343
335
|
id: "cancel",
|
|
344
336
|
icon: "x-close",
|
|
345
337
|
label: "Cancel",
|
|
346
338
|
handler: () => emit("cancel")
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
if (shouldShowRemoveAction.value) {
|
|
350
|
-
actions2.push({
|
|
351
|
-
id: "remove",
|
|
352
|
-
icon: "trash",
|
|
353
|
-
label: "Remove",
|
|
354
|
-
handler: () => emit("remove")
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
return actions2;
|
|
339
|
+
}
|
|
340
|
+
] : [];
|
|
358
341
|
});
|
|
359
342
|
return (_ctx, _cache) => {
|
|
360
343
|
return openBlock(), createBlock(unref(ProgressItem), {
|
|
@@ -377,13 +360,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
377
360
|
props: /* @__PURE__ */ mergeModels({
|
|
378
361
|
items: {},
|
|
379
362
|
allowCancel: { type: Boolean, default: true },
|
|
380
|
-
allowRemove: { type: Boolean
|
|
363
|
+
allowRemove: { type: Boolean },
|
|
381
364
|
placeholderItems: { default: 0 }
|
|
382
365
|
}, {
|
|
383
366
|
"expanded": { type: Boolean, ...{ default: true } },
|
|
384
367
|
"expandedModifiers": {}
|
|
385
368
|
}),
|
|
386
|
-
emits: /* @__PURE__ */ mergeModels(["
|
|
369
|
+
emits: /* @__PURE__ */ mergeModels(["cancel", "close"], ["update:expanded"]),
|
|
387
370
|
setup(__props, { emit: __emit }) {
|
|
388
371
|
const emit = __emit;
|
|
389
372
|
const expanded = useModel(__props, "expanded");
|
|
@@ -400,14 +383,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
400
383
|
({ status }) => status === "inprogress" || status === "processing"
|
|
401
384
|
) || __props.placeholderItems > 0
|
|
402
385
|
);
|
|
403
|
-
watch(
|
|
404
|
-
() => __props.items,
|
|
405
|
-
(newItems, prevItems) => {
|
|
406
|
-
if (prevItems?.length > 0 && newItems.length === 0) {
|
|
407
|
-
emit("close");
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
);
|
|
411
386
|
return (_ctx, _cache) => {
|
|
412
387
|
return openBlock(), createBlock(unref(CollapsiblePanel), {
|
|
413
388
|
modelValue: expanded.value,
|
|
@@ -426,10 +401,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
426
401
|
key: item.id,
|
|
427
402
|
item,
|
|
428
403
|
"allow-cancel": __props.allowCancel,
|
|
429
|
-
"allow-remove": __props.allowRemove,
|
|
430
|
-
onRemove: ($event) => emit("remove", item),
|
|
431
404
|
onCancel: ($event) => emit("cancel", item)
|
|
432
|
-
}, null, 8, ["item", "allow-cancel", "
|
|
405
|
+
}, null, 8, ["item", "allow-cancel", "onCancel"]);
|
|
433
406
|
}), 128))
|
|
434
407
|
]),
|
|
435
408
|
_: 1
|
|
@@ -454,14 +427,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
454
427
|
}
|
|
455
428
|
});
|
|
456
429
|
|
|
457
|
-
const UploadProgressPanel = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
430
|
+
const UploadProgressPanel = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-3c6568f7"]]);
|
|
458
431
|
|
|
459
432
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
460
433
|
__name: "DownloadProgressPanelItem",
|
|
461
434
|
props: {
|
|
462
435
|
item: {}
|
|
463
436
|
},
|
|
464
|
-
emits: ["
|
|
437
|
+
emits: ["cancel", "download"],
|
|
465
438
|
setup(__props, { emit: __emit }) {
|
|
466
439
|
const props = __props;
|
|
467
440
|
const emit = __emit;
|
|
@@ -481,9 +454,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
481
454
|
});
|
|
482
455
|
const isCancellable = computed(() => props.item.status === "IN_PROGRESS");
|
|
483
456
|
const isReady = computed(() => props.item.status === "READY");
|
|
484
|
-
const isRemovable = computed(
|
|
485
|
-
() => props.item.status === "CANCELLED" || props.item.status === "FAILED" || props.item.status === "READY"
|
|
486
|
-
);
|
|
487
457
|
const actions = computed(() => {
|
|
488
458
|
const actions2 = [];
|
|
489
459
|
if (isCancellable.value) {
|
|
@@ -502,14 +472,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
502
472
|
handler: () => emit("download")
|
|
503
473
|
});
|
|
504
474
|
}
|
|
505
|
-
if (isRemovable.value) {
|
|
506
|
-
actions2.push({
|
|
507
|
-
id: "remove",
|
|
508
|
-
icon: "trash",
|
|
509
|
-
label: "Remove",
|
|
510
|
-
handler: () => emit("remove")
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
475
|
return actions2;
|
|
514
476
|
});
|
|
515
477
|
return (_ctx, _cache) => {
|
|
@@ -533,7 +495,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
533
495
|
"expanded": { type: Boolean, ...{ default: true } },
|
|
534
496
|
"expandedModifiers": {}
|
|
535
497
|
}),
|
|
536
|
-
emits: /* @__PURE__ */ mergeModels(["
|
|
498
|
+
emits: /* @__PURE__ */ mergeModels(["cancel", "download", "close"], ["update:expanded"]),
|
|
537
499
|
setup(__props, { emit: __emit }) {
|
|
538
500
|
const props = __props;
|
|
539
501
|
const emit = __emit;
|
|
@@ -574,10 +536,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
574
536
|
return openBlock(), createBlock(_sfc_main$1, {
|
|
575
537
|
key: item.downloadId,
|
|
576
538
|
item,
|
|
577
|
-
onRemove: ($event) => emit("remove", item),
|
|
578
539
|
onCancel: ($event) => emit("cancel", item),
|
|
579
540
|
onDownload: ($event) => emit("download", item)
|
|
580
|
-
}, null, 8, ["item", "
|
|
541
|
+
}, null, 8, ["item", "onCancel", "onDownload"]);
|
|
581
542
|
}), 128))
|
|
582
543
|
]),
|
|
583
544
|
_: 1
|
|
@@ -590,14 +551,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
590
551
|
}
|
|
591
552
|
});
|
|
592
553
|
|
|
593
|
-
const DownloadProgressPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
554
|
+
const DownloadProgressPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cbf5d3c0"]]);
|
|
594
555
|
|
|
595
556
|
//#region src/predicate/isPlainObject.ts
|
|
596
557
|
/**
|
|
597
558
|
* Checks if a given value is a plain object.
|
|
598
559
|
*
|
|
599
|
-
* @param
|
|
600
|
-
* @returns
|
|
560
|
+
* @param value - The value to check.
|
|
561
|
+
* @returns True if the value is a plain object, otherwise false.
|
|
601
562
|
*
|
|
602
563
|
* @example
|
|
603
564
|
* ```typescript
|
|
@@ -667,9 +628,9 @@ function isUnsafeProperty(key) {
|
|
|
667
628
|
*
|
|
668
629
|
* Note that this function mutates the target object.
|
|
669
630
|
*
|
|
670
|
-
* @param
|
|
671
|
-
* @param
|
|
672
|
-
* @returns
|
|
631
|
+
* @param target - The target object into which the source object properties will be merged. This object is modified in place.
|
|
632
|
+
* @param source - The source object whose properties will be merged into the target object.
|
|
633
|
+
* @returns The updated target object with properties from the source object merged in.
|
|
673
634
|
*
|
|
674
635
|
* @template T - Type of the target object.
|
|
675
636
|
* @template S - Type of the source object.
|