@knime/product-features 1.1.2 → 1.2.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 +30 -0
- package/dist/dataTransfer.css +27 -27
- package/dist/dataTransfer.js +32 -139
- package/dist/dataTransfer.js.map +1 -1
- package/dist/index-B3ql6hun.js +2695 -0
- package/dist/index-B3ql6hun.js.map +1 -0
- package/dist/nodes.css +119 -0
- package/dist/nodes.js +270 -101
- package/dist/nodes.js.map +1 -1
- package/dist/rfcErrors.css +3 -3
- package/dist/rfcErrors.js +2 -2
- package/dist/rfcErrors.js.map +1 -1
- package/dist/src/dataTransfer/download/ui/types.d.ts +5 -0
- package/dist/src/dataTransfer/download/ui/types.d.ts.map +1 -1
- package/dist/src/dataTransfer/shared/ui/CollapsiblePanel/CollapsiblePanel.vue.d.ts.map +1 -1
- package/dist/src/dataTransfer/shared/ui/CollapsiblePanel/index.d.ts +1 -1
- package/dist/src/dataTransfer/shared/ui/CollapsiblePanel/index.d.ts.map +1 -1
- package/dist/src/dataTransfer/shared/ui/CollapsiblePanel/types.d.ts +1 -1
- package/dist/src/dataTransfer/shared/ui/CollapsiblePanel/types.d.ts.map +1 -1
- package/dist/src/dataTransfer/shared/ui/ProgressItem/ProgressItem.vue.d.ts.map +1 -1
- package/dist/src/dataTransfer/shared/ui/ProgressItem/index.d.ts +1 -1
- package/dist/src/dataTransfer/shared/ui/ProgressItem/index.d.ts.map +1 -1
- package/dist/src/dataTransfer/shared/ui/ProgressItem/types.d.ts +1 -1
- package/dist/src/dataTransfer/shared/ui/ProgressItem/types.d.ts.map +1 -1
- package/dist/src/dataTransfer/upload/ui/types.d.ts +10 -0
- package/dist/src/dataTransfer/upload/ui/types.d.ts.map +1 -1
- package/dist/src/nodes/NodeDescriptionTabs/types.d.ts +11 -0
- package/dist/src/nodes/NodeDescriptionTabs/types.d.ts.map +1 -1
- package/dist/src/nodes/NodePreview/NodePreview.vue.d.ts +4 -0
- package/dist/src/nodes/NodePreview/NodePreview.vue.d.ts.map +1 -0
- package/dist/src/nodes/NodePreview/SVGNodeTorso.vue.d.ts +4 -0
- package/dist/src/nodes/NodePreview/SVGNodeTorso.vue.d.ts.map +1 -0
- package/dist/src/nodes/NodePreview/constants.d.ts +2 -0
- package/dist/src/nodes/NodePreview/constants.d.ts.map +1 -0
- package/dist/src/nodes/NodePreview/enums.d.ts +27 -0
- package/dist/src/nodes/NodePreview/enums.d.ts.map +1 -0
- package/dist/src/nodes/NodePreview/index.d.ts +3 -0
- package/dist/src/nodes/NodePreview/index.d.ts.map +1 -0
- package/dist/src/nodes/NodePreview/types.d.ts +68 -0
- package/dist/src/nodes/NodePreview/types.d.ts.map +1 -0
- package/dist/src/nodes/PortIcon/PortIcon.vue.d.ts.map +1 -1
- package/dist/src/nodes/PortIcon/SVGPortIcon.vue.d.ts +4 -0
- package/dist/src/nodes/PortIcon/SVGPortIcon.vue.d.ts.map +1 -0
- package/dist/src/nodes/PortIcon/constants.d.ts +3 -0
- package/dist/src/nodes/PortIcon/constants.d.ts.map +1 -0
- package/dist/src/nodes/index.d.ts +2 -0
- package/dist/src/nodes/index.d.ts.map +1 -1
- package/dist/src/rfcErrors/RFCErrorToastTemplate.vue.d.ts +9 -0
- package/dist/src/rfcErrors/RFCErrorToastTemplate.vue.d.ts.map +1 -1
- package/dist/src/rfcErrors/types.d.ts +5 -0
- package/dist/src/rfcErrors/types.d.ts.map +1 -1
- package/dist/src/toasts/Toast/types.d.ts +6 -0
- package/dist/src/toasts/Toast/types.d.ts.map +1 -1
- package/dist/src/toasts/ToastStack/types.d.ts +2 -0
- package/dist/src/toasts/ToastStack/types.d.ts.map +1 -1
- package/dist/src/versions/CreateVersionForm/types.d.ts +1 -0
- package/dist/src/versions/CreateVersionForm/types.d.ts.map +1 -1
- package/dist/src/versions/VersionHistory/HistoryEventFooter.vue.d.ts.map +1 -1
- package/dist/src/versions/VersionHistory/VersionLabel.vue.d.ts +10 -6
- package/dist/src/versions/VersionHistory/VersionLabel.vue.d.ts.map +1 -1
- package/dist/src/versions/VersionHistory/types.d.ts +36 -0
- package/dist/src/versions/VersionHistory/types.d.ts.map +1 -1
- package/dist/toasts.css +13 -13
- package/dist/toasts.js +7 -14
- package/dist/toasts.js.map +1 -1
- package/dist/versions.css +4 -4
- package/dist/versions.js +14 -11
- package/dist/versions.js.map +1 -1
- package/package.json +11 -13
- package/dist/format-ra_vlnN7.js +0 -238
- package/dist/format-ra_vlnN7.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @knime/product-features
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5e6fc06: KDS-582: Add NodePreview component, add stories for PortIcon
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [b698be1]
|
|
12
|
+
- Updated dependencies [7d7918f]
|
|
13
|
+
- Updated dependencies [d6af8e5]
|
|
14
|
+
- Updated dependencies [d6af8e5]
|
|
15
|
+
- Updated dependencies [d6af8e5]
|
|
16
|
+
- Updated dependencies [c2d135a]
|
|
17
|
+
- Updated dependencies [2779db1]
|
|
18
|
+
- Updated dependencies [e774645]
|
|
19
|
+
- Updated dependencies [c2d135a]
|
|
20
|
+
- @knime/kds-styles@2.0.0
|
|
21
|
+
- @knime/kds-components@2.0.0
|
|
22
|
+
- @knime/utils@1.12.0
|
|
23
|
+
|
|
24
|
+
## 1.1.3
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- bc85a76: Migrate native `title` attribute usages to the accessible `v-kds-tooltip` directive across product-feature components.
|
|
29
|
+
- Updated dependencies [bc85a76]
|
|
30
|
+
- @knime/kds-components@1.2.0
|
|
31
|
+
- @knime/kds-styles@1.2.0
|
|
32
|
+
|
|
3
33
|
## 1.1.2
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/dist/dataTransfer.css
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
.collapsible-panel {
|
|
3
|
-
&[data-v-
|
|
3
|
+
&[data-v-59d71b0b] {
|
|
4
4
|
background: var(--kds-color-surface-default);
|
|
5
5
|
border-radius: var(--kds-spacing-container-0-25x);
|
|
6
6
|
box-shadow: var(--kds-elevation-level-3);
|
|
7
7
|
}
|
|
8
8
|
& .title-bar {
|
|
9
|
-
&[data-v-
|
|
9
|
+
&[data-v-59d71b0b] {
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: center;
|
|
12
12
|
height: var(--kds-dimension-component-height-2-5x);
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
font: var(--kds-font-base-title-small-strong);
|
|
16
16
|
color: var(--kds-color-text-and-icon-neutral);
|
|
17
17
|
}
|
|
18
|
-
& .actions[data-v-
|
|
18
|
+
& .actions[data-v-59d71b0b] {
|
|
19
19
|
display: flex;
|
|
20
20
|
gap: var(--kds-spacing-container-0-25x);
|
|
21
21
|
align-items: center;
|
|
@@ -23,37 +23,37 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
&:not(.collapsed) {
|
|
26
|
-
& .title-bar[data-v-
|
|
26
|
+
& .title-bar[data-v-59d71b0b] {
|
|
27
27
|
border-bottom: var(--kds-border-base-subtle);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
.panel-content[data-v-
|
|
31
|
+
.panel-content[data-v-59d71b0b] {
|
|
32
32
|
overflow: hidden;
|
|
33
33
|
}
|
|
34
|
-
.expand-enter-active[data-v-
|
|
35
|
-
.expand-leave-active[data-v-
|
|
34
|
+
.expand-enter-active[data-v-59d71b0b],
|
|
35
|
+
.expand-leave-active[data-v-59d71b0b] {
|
|
36
36
|
display: grid;
|
|
37
37
|
overflow: hidden;
|
|
38
38
|
transition:
|
|
39
39
|
grid-template-rows 0.2s ease-in-out,
|
|
40
40
|
opacity 0.2s ease-in-out;
|
|
41
41
|
}
|
|
42
|
-
.expand-enter-from[data-v-
|
|
43
|
-
.expand-leave-to[data-v-
|
|
42
|
+
.expand-enter-from[data-v-59d71b0b],
|
|
43
|
+
.expand-leave-to[data-v-59d71b0b] {
|
|
44
44
|
grid-template-rows: 0fr;
|
|
45
45
|
opacity: 0;
|
|
46
46
|
}
|
|
47
|
-
.expand-enter-to[data-v-
|
|
48
|
-
.expand-leave-from[data-v-
|
|
47
|
+
.expand-enter-to[data-v-59d71b0b],
|
|
48
|
+
.expand-leave-from[data-v-59d71b0b] {
|
|
49
49
|
grid-template-rows: 1fr;
|
|
50
50
|
opacity: 1;
|
|
51
51
|
}
|
|
52
|
-
.panel-content[data-v-
|
|
52
|
+
.panel-content[data-v-59d71b0b] > * {
|
|
53
53
|
min-height: 0;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.progress-wrapper[data-v-
|
|
56
|
+
.progress-wrapper[data-v-902ce8bb] {
|
|
57
57
|
--base-padding: var(--kds-spacing-container-1x);
|
|
58
58
|
--progress-bar-height: var(--kds-dimension-component-height-0-25x);
|
|
59
59
|
--progress-bar-distance: var(--kds-spacing-container-0-25x);
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
padding: var(--base-padding);
|
|
66
66
|
}
|
|
67
67
|
.progress-item {
|
|
68
|
-
&[data-v-
|
|
68
|
+
&[data-v-902ce8bb] {
|
|
69
69
|
display: flex;
|
|
70
70
|
align-items: center;
|
|
71
71
|
width: 100%;
|
|
@@ -73,24 +73,24 @@
|
|
|
73
73
|
|
|
74
74
|
/* add extra margin to prevent content jump when a progress bars appears/disappears */
|
|
75
75
|
}
|
|
76
|
-
&.padded[data-v-
|
|
76
|
+
&.padded[data-v-902ce8bb] {
|
|
77
77
|
margin-bottom: calc(
|
|
78
78
|
var(--progress-bar-height) + var(--progress-bar-distance)
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
.progress[data-v-
|
|
82
|
+
.progress[data-v-902ce8bb] {
|
|
83
83
|
min-height: var(--progress-bar-height);
|
|
84
84
|
}
|
|
85
85
|
.item-info {
|
|
86
|
-
&[data-v-
|
|
86
|
+
&[data-v-902ce8bb] {
|
|
87
87
|
display: flex;
|
|
88
88
|
flex-grow: 1;
|
|
89
89
|
gap: var(--kds-spacing-container-0-25x);
|
|
90
90
|
overflow: hidden;
|
|
91
91
|
}
|
|
92
92
|
& .item-name {
|
|
93
|
-
&[data-v-
|
|
93
|
+
&[data-v-902ce8bb] {
|
|
94
94
|
display: flex;
|
|
95
95
|
flex-grow: 1;
|
|
96
96
|
flex-direction: column;
|
|
@@ -99,19 +99,19 @@
|
|
|
99
99
|
overflow: hidden;
|
|
100
100
|
color: var(--kds-color-text-and-icon-neutral);
|
|
101
101
|
}
|
|
102
|
-
& .title[data-v-
|
|
102
|
+
& .title[data-v-902ce8bb] {
|
|
103
103
|
max-width: 100%;
|
|
104
104
|
overflow: hidden;
|
|
105
105
|
text-overflow: ellipsis;
|
|
106
106
|
font: var(--kds-font-base-interactive-small);
|
|
107
107
|
white-space: nowrap;
|
|
108
108
|
}
|
|
109
|
-
& .subtitle[data-v-
|
|
109
|
+
& .subtitle[data-v-902ce8bb] {
|
|
110
110
|
font: var(--kds-font-base-subtext-small);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
.item-action[data-v-
|
|
114
|
+
.item-action[data-v-902ce8bb] {
|
|
115
115
|
display: flex;
|
|
116
116
|
flex-shrink: 0;
|
|
117
117
|
gap: var(--kds-spacing-container-0-25x);
|
|
@@ -128,15 +128,15 @@
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.upload-panel[data-v-
|
|
131
|
+
.upload-panel[data-v-15b3eb7d] {
|
|
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-15b3eb7d] {
|
|
136
136
|
max-height: var(--kds-dimension-component-height-20x);
|
|
137
137
|
}
|
|
138
138
|
.skeleton-container {
|
|
139
|
-
&[data-v-
|
|
139
|
+
&[data-v-15b3eb7d] {
|
|
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-15b3eb7d] {
|
|
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-53e10d80] {
|
|
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-53e10d80] {
|
|
160
160
|
max-height: var(--kds-dimension-component-height-20x);
|
|
161
161
|
}
|
package/dist/dataTransfer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed, defineComponent, useModel, useId, openBlock, createElementBlock, normalizeClass, createElementVNode, createTextVNode, toDisplayString, createVNode, unref, normalizeStyle, createBlock, createCommentVNode, Transition, withCtx, withDirectives, renderSlot, vShow, mergeModels, Fragment, renderList, watch, ref, reactive, readonly } from 'vue';
|
|
2
|
-
import { KdsButton, KdsIcon, KdsBadge, KdsProgressBar, KdsLoadingSkeleton } from '@knime/kds-components';
|
|
2
|
+
import { KdsButton, KdsIcon, vKdsTooltip, KdsBadge, KdsProgressBar, KdsLoadingSkeleton } from '@knime/kds-components';
|
|
3
3
|
import { _ as _export_sfc } from './_plugin-vue_export-helper-pcqpp-6-.js';
|
|
4
|
-
import { f as formatFileSize } from './
|
|
4
|
+
import { f as formatFileSize, g as getFileExtension, k as knimeFileFormats, i as index, a as getFileMimeType, s as sleep } from './index-B3ql6hun.js';
|
|
5
5
|
import { rfcErrors } from './rfcErrors.js';
|
|
6
6
|
import { ofetch, FetchError } from 'ofetch';
|
|
7
7
|
|
|
@@ -26,7 +26,7 @@ const _hoisted_3$1 = ["id"];
|
|
|
26
26
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
27
27
|
__name: "CollapsiblePanel",
|
|
28
28
|
props: /* @__PURE__ */ mergeModels({
|
|
29
|
-
|
|
29
|
+
headline: {},
|
|
30
30
|
canBeDismissed: { type: Boolean, default: false }
|
|
31
31
|
}, {
|
|
32
32
|
"modelValue": { type: Boolean, ...{ default: true } },
|
|
@@ -46,7 +46,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
46
46
|
class: normalizeClass(["collapsible-panel", { collapsed: !modelValue.value }])
|
|
47
47
|
}, [
|
|
48
48
|
createElementVNode("div", _hoisted_1$4, [
|
|
49
|
-
createTextVNode(toDisplayString(__props.
|
|
49
|
+
createTextVNode(toDisplayString(__props.headline) + " ", 1),
|
|
50
50
|
createElementVNode("div", _hoisted_2$2, [
|
|
51
51
|
createVNode(unref(KdsButton), {
|
|
52
52
|
size: "small",
|
|
@@ -86,12 +86,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
-
const CollapsiblePanel = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
89
|
+
const CollapsiblePanel = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-59d71b0b"]]);
|
|
90
90
|
|
|
91
91
|
const _hoisted_1$3 = { class: "progress-wrapper" };
|
|
92
92
|
const _hoisted_2$1 = { class: "item-info" };
|
|
93
93
|
const _hoisted_3 = { class: "item-name" };
|
|
94
|
-
const _hoisted_4 =
|
|
94
|
+
const _hoisted_4 = { class: "title" };
|
|
95
95
|
const _hoisted_5 = {
|
|
96
96
|
key: 0,
|
|
97
97
|
class: "subtitle"
|
|
@@ -105,7 +105,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
105
105
|
__name: "ProgressItem",
|
|
106
106
|
props: {
|
|
107
107
|
id: {},
|
|
108
|
-
|
|
108
|
+
headline: {},
|
|
109
109
|
icon: {},
|
|
110
110
|
actions: {},
|
|
111
111
|
subtitle: {},
|
|
@@ -121,10 +121,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
121
121
|
createElementVNode("div", _hoisted_2$1, [
|
|
122
122
|
createVNode(unref(KdsIcon), { name: __props.icon }, null, 8, ["name"]),
|
|
123
123
|
createElementVNode("div", _hoisted_3, [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
withDirectives((openBlock(), createElementBlock("div", _hoisted_4, [
|
|
125
|
+
createTextVNode(toDisplayString(__props.headline), 1)
|
|
126
|
+
])), [
|
|
127
|
+
[unref(vKdsTooltip), __props.headline, "truncated"]
|
|
128
|
+
]),
|
|
128
129
|
__props.subtitle ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(__props.subtitle), 1)) : createCommentVNode("", true)
|
|
129
130
|
])
|
|
130
131
|
]),
|
|
@@ -158,7 +159,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
158
159
|
}
|
|
159
160
|
});
|
|
160
161
|
|
|
161
|
-
const ProgressItem = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
162
|
+
const ProgressItem = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-902ce8bb"]]);
|
|
162
163
|
|
|
163
164
|
const _sfc_main$4 = { };
|
|
164
165
|
|
|
@@ -174,114 +175,6 @@ function _sfc_render(_ctx, _cache) {
|
|
|
174
175
|
}
|
|
175
176
|
const ProgressList = /*#__PURE__*/_export_sfc(_sfc_main$4, [['render',_sfc_render],['__scopeId',"data-v-8f14a3cb"]]);
|
|
176
177
|
|
|
177
|
-
class AbortError extends Error {
|
|
178
|
-
}
|
|
179
|
-
const createAbortablePromise = () => {
|
|
180
|
-
const abortController = new AbortController();
|
|
181
|
-
const runAbortablePromise = (request) => {
|
|
182
|
-
return new Promise((resolve, reject) => {
|
|
183
|
-
const abortListener = ({ target }) => {
|
|
184
|
-
abortController.signal.removeEventListener("abort", abortListener);
|
|
185
|
-
const reason = target.reason;
|
|
186
|
-
reject(reason instanceof AbortError ? reason : new AbortError(reason));
|
|
187
|
-
};
|
|
188
|
-
request().then(resolve).catch((error) => {
|
|
189
|
-
if (error instanceof AbortError) {
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
reject(error);
|
|
193
|
-
});
|
|
194
|
-
abortController.signal.addEventListener("abort", abortListener);
|
|
195
|
-
});
|
|
196
|
-
};
|
|
197
|
-
return { abortController, runAbortablePromise };
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
function sleep(ms) {
|
|
201
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
const DEFAULT_RETRY_DELAY_MS$2 = 0;
|
|
205
|
-
const DEFAULT_RETRY_COUNT$1 = 5;
|
|
206
|
-
async function retryPromise({
|
|
207
|
-
fn,
|
|
208
|
-
retryCount = DEFAULT_RETRY_COUNT$1,
|
|
209
|
-
retryDelayMS = DEFAULT_RETRY_DELAY_MS$2,
|
|
210
|
-
excludeError
|
|
211
|
-
}) {
|
|
212
|
-
try {
|
|
213
|
-
return await fn();
|
|
214
|
-
} catch (error) {
|
|
215
|
-
if (excludeError?.(error)) {
|
|
216
|
-
throw error;
|
|
217
|
-
}
|
|
218
|
-
if (retryCount > 0) {
|
|
219
|
-
await sleep(retryDelayMS);
|
|
220
|
-
return await retryPromise({
|
|
221
|
-
fn,
|
|
222
|
-
retryCount: retryCount - 1,
|
|
223
|
-
retryDelayMS,
|
|
224
|
-
excludeError
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
throw error;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
const getFileExtension = (nameOrPath) => {
|
|
232
|
-
const basename = nameOrPath.split(/[\\/]/).pop() ?? "";
|
|
233
|
-
const parts = basename.split(".");
|
|
234
|
-
if (basename === "" || parts.length === 1) {
|
|
235
|
-
return "";
|
|
236
|
-
}
|
|
237
|
-
return parts.at(-1) ?? "";
|
|
238
|
-
};
|
|
239
|
-
const KNAR = Object.freeze({
|
|
240
|
-
extension: "knar",
|
|
241
|
-
mimeType: "application/vnd.knime.workflow-group+zip",
|
|
242
|
-
matches(file) {
|
|
243
|
-
const extension = getFileExtension(file.name);
|
|
244
|
-
return extension === this.extension;
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
const KNWF = Object.freeze({
|
|
248
|
-
extension: "knwf",
|
|
249
|
-
mimeType: "application/vnd.knime.workflow+zip",
|
|
250
|
-
matches(file) {
|
|
251
|
-
const extension = getFileExtension(file.name);
|
|
252
|
-
return extension === this.extension;
|
|
253
|
-
},
|
|
254
|
-
/**
|
|
255
|
-
* Gets the name of a .knwf file without the extension. If the file is not
|
|
256
|
-
* matched as a .knwf file then this function will return the default value,
|
|
257
|
-
* which is empty string ("") if param is not provided
|
|
258
|
-
*/
|
|
259
|
-
getNameOrDefault(file, defaultValue = "") {
|
|
260
|
-
if (!this.matches(file)) {
|
|
261
|
-
return defaultValue;
|
|
262
|
-
}
|
|
263
|
-
return file.name.replace(`.${this.extension}`, "");
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
const knimeFileFormats = { KNWF };
|
|
267
|
-
const getFileMimeType = (file) => {
|
|
268
|
-
const DEFAULT_MIMETYPE = "application/octet-stream";
|
|
269
|
-
const extension = getFileExtension(file.name);
|
|
270
|
-
if (!extension) {
|
|
271
|
-
return DEFAULT_MIMETYPE;
|
|
272
|
-
}
|
|
273
|
-
if (KNWF.matches(file)) {
|
|
274
|
-
return KNWF.mimeType;
|
|
275
|
-
}
|
|
276
|
-
if (KNAR.matches(file)) {
|
|
277
|
-
return KNAR.mimeType;
|
|
278
|
-
}
|
|
279
|
-
if (!file.type) {
|
|
280
|
-
return DEFAULT_MIMETYPE;
|
|
281
|
-
}
|
|
282
|
-
return file.type;
|
|
283
|
-
};
|
|
284
|
-
|
|
285
178
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
286
179
|
__name: "UploadProgressPanelItem",
|
|
287
180
|
props: {
|
|
@@ -342,13 +235,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
342
235
|
return (_ctx, _cache) => {
|
|
343
236
|
return openBlock(), createBlock(unref(ProgressItem), {
|
|
344
237
|
id: __props.item.id,
|
|
345
|
-
|
|
238
|
+
headline: __props.item.name,
|
|
346
239
|
subtitle: subtitle.value,
|
|
347
240
|
icon: itemIcon.value,
|
|
348
241
|
progress: hasProgress(__props.item) ? __props.item.progress : void 0,
|
|
349
242
|
badge: badge.value,
|
|
350
243
|
actions: actions.value
|
|
351
|
-
}, null, 8, ["id", "
|
|
244
|
+
}, null, 8, ["id", "headline", "subtitle", "icon", "progress", "badge", "actions"]);
|
|
352
245
|
};
|
|
353
246
|
}
|
|
354
247
|
});
|
|
@@ -374,7 +267,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
374
267
|
const uploadedItems = computed(
|
|
375
268
|
() => __props.items.filter(({ status }) => status === "complete").length
|
|
376
269
|
);
|
|
377
|
-
const
|
|
270
|
+
const headline = computed(() => {
|
|
378
271
|
const suffix = `file${totalItems.value > 1 ? "s" : ""}`;
|
|
379
272
|
return `Uploaded ${uploadedItems.value} of ${totalItems.value} ${suffix}`;
|
|
380
273
|
});
|
|
@@ -387,7 +280,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
387
280
|
return openBlock(), createBlock(unref(CollapsiblePanel), {
|
|
388
281
|
modelValue: expanded.value,
|
|
389
282
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => expanded.value = $event),
|
|
390
|
-
|
|
283
|
+
headline: headline.value,
|
|
391
284
|
class: "upload-panel",
|
|
392
285
|
"can-be-dismissed": !hasSomeItemInProgress.value,
|
|
393
286
|
onClose: _cache[1] || (_cache[1] = ($event) => emit("close"))
|
|
@@ -422,12 +315,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
422
315
|
])
|
|
423
316
|
]),
|
|
424
317
|
_: 1
|
|
425
|
-
}, 8, ["modelValue", "
|
|
318
|
+
}, 8, ["modelValue", "headline", "can-be-dismissed"]);
|
|
426
319
|
};
|
|
427
320
|
}
|
|
428
321
|
});
|
|
429
322
|
|
|
430
|
-
const UploadProgressPanel = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
323
|
+
const UploadProgressPanel = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-15b3eb7d"]]);
|
|
431
324
|
|
|
432
325
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
433
326
|
__name: "DownloadProgressPanelItem",
|
|
@@ -478,10 +371,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
478
371
|
return openBlock(), createBlock(unref(ProgressItem), {
|
|
479
372
|
id: __props.item.downloadId,
|
|
480
373
|
icon: "file",
|
|
481
|
-
|
|
374
|
+
headline: __props.item.name,
|
|
482
375
|
badge: badge.value,
|
|
483
376
|
actions: actions.value
|
|
484
|
-
}, null, 8, ["id", "
|
|
377
|
+
}, null, 8, ["id", "headline", "badge", "actions"]);
|
|
485
378
|
};
|
|
486
379
|
}
|
|
487
380
|
});
|
|
@@ -504,7 +397,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
504
397
|
const totalDownloadedItems = computed(
|
|
505
398
|
() => props.items.filter(({ status }) => status === "READY").length
|
|
506
399
|
);
|
|
507
|
-
const
|
|
400
|
+
const headline = computed(() => {
|
|
508
401
|
const suffix = `file${totalItems.value > 1 ? "s" : ""}`;
|
|
509
402
|
return `Downloaded ${totalDownloadedItems.value} of ${totalItems.value} ${suffix}`;
|
|
510
403
|
});
|
|
@@ -523,7 +416,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
523
416
|
return openBlock(), createBlock(unref(CollapsiblePanel), {
|
|
524
417
|
modelValue: expanded.value,
|
|
525
418
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => expanded.value = $event),
|
|
526
|
-
|
|
419
|
+
headline: headline.value,
|
|
527
420
|
class: "download-panel",
|
|
528
421
|
"can-be-dismissed": !hasItemsInProgress.value,
|
|
529
422
|
onClose: _cache[1] || (_cache[1] = ($event) => emit("close"))
|
|
@@ -546,12 +439,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
546
439
|
])
|
|
547
440
|
]),
|
|
548
441
|
_: 1
|
|
549
|
-
}, 8, ["modelValue", "
|
|
442
|
+
}, 8, ["modelValue", "headline", "can-be-dismissed"]);
|
|
550
443
|
};
|
|
551
444
|
}
|
|
552
445
|
});
|
|
553
446
|
|
|
554
|
-
const DownloadProgressPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
447
|
+
const DownloadProgressPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-53e10d80"]]);
|
|
555
448
|
|
|
556
449
|
//#region src/predicate/isPlainObject.ts
|
|
557
450
|
/**
|
|
@@ -760,7 +653,7 @@ const createUploadManager = (config) => {
|
|
|
760
653
|
return;
|
|
761
654
|
}
|
|
762
655
|
currentState.abortController.abort(
|
|
763
|
-
new AbortError(
|
|
656
|
+
new index.AbortError(
|
|
764
657
|
`Upload (${currentState.uploadId}) for file "${currentState.file.name}" aborted. Reason: "${reason}"`
|
|
765
658
|
)
|
|
766
659
|
);
|
|
@@ -790,7 +683,7 @@ const createUploadManager = (config) => {
|
|
|
790
683
|
const totalChunks = getTotalFileParts(file);
|
|
791
684
|
const totalBytes = file.size;
|
|
792
685
|
const completedPartIds = {};
|
|
793
|
-
const { abortController, runAbortablePromise } = createAbortablePromise();
|
|
686
|
+
const { abortController, runAbortablePromise } = index.createAbortablePromise();
|
|
794
687
|
uploadStateMap.set(uploadId, {
|
|
795
688
|
uploadId,
|
|
796
689
|
file,
|
|
@@ -809,7 +702,7 @@ const createUploadManager = (config) => {
|
|
|
809
702
|
const end = Math.min(start + CHUNK_SIZE, file.size);
|
|
810
703
|
const chunk = file.slice(start, end);
|
|
811
704
|
try {
|
|
812
|
-
const { method, url } = await retryPromise({
|
|
705
|
+
const { method, url } = await index.retryPromise({
|
|
813
706
|
fn: () => getUploadFilePartUrl(uploadId, chunkIndex + 1),
|
|
814
707
|
retryCount: DEFAULT_RETRY_COUNT,
|
|
815
708
|
retryDelayMS: DEFAULT_RETRY_DELAY_MS$1
|
|
@@ -822,7 +715,7 @@ const createUploadManager = (config) => {
|
|
|
822
715
|
config.onProgress?.(uploadId, progress);
|
|
823
716
|
};
|
|
824
717
|
const filePartResponse = await runAbortablePromise(
|
|
825
|
-
() => retryPromise({
|
|
718
|
+
() => index.retryPromise({
|
|
826
719
|
fn: () => uploadChunkWithProgress({
|
|
827
720
|
method,
|
|
828
721
|
url,
|
|
@@ -843,7 +736,7 @@ const createUploadManager = (config) => {
|
|
|
843
736
|
completedChunkCount: uploadStateMap.get(uploadId).completedChunkCount + 1
|
|
844
737
|
});
|
|
845
738
|
} catch (error) {
|
|
846
|
-
if (error instanceof AbortError) {
|
|
739
|
+
if (error instanceof index.AbortError) {
|
|
847
740
|
consola.info("Aborted::", error);
|
|
848
741
|
return;
|
|
849
742
|
}
|
|
@@ -1047,7 +940,7 @@ const useFileUpload = (options = {}) => {
|
|
|
1047
940
|
useUploadManagerResult = useUploadManager({
|
|
1048
941
|
resolveFilePartUploadURL,
|
|
1049
942
|
onFileUploadComplete: ({ uploadId, filePartIds, parentId, name }) => {
|
|
1050
|
-
retryPromise({ fn: () => completeUpload(uploadId, filePartIds) }).then(() => {
|
|
943
|
+
index.retryPromise({ fn: () => completeUpload(uploadId, filePartIds) }).then(() => {
|
|
1051
944
|
options.onFileUploadComplete?.({
|
|
1052
945
|
uploadId,
|
|
1053
946
|
filePartIds,
|
|
@@ -1120,7 +1013,7 @@ const useFileUpload = (options = {}) => {
|
|
|
1120
1013
|
return [];
|
|
1121
1014
|
}
|
|
1122
1015
|
prepareQueueSize.value += enqueueableFiles.length;
|
|
1123
|
-
const uploadPayload = await retryPromise({
|
|
1016
|
+
const uploadPayload = await index.retryPromise({
|
|
1124
1017
|
fn: () => prepareUpload(parentId, enqueueableFiles),
|
|
1125
1018
|
excludeError: (error) => (
|
|
1126
1019
|
// eslint-disable-next-line no-magic-numbers
|