@knime/product-features 1.1.3 → 1.2.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 +34 -0
- package/dist/dataTransfer.js +8 -116
- 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.js +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/ProgressItem/index.d.ts +1 -1
- package/dist/src/dataTransfer/shared/ui/ProgressItem/index.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/versions/VersionHistory/VersionLabel.vue.d.ts +6 -4
- package/dist/src/versions/VersionHistory/VersionLabel.vue.d.ts.map +1 -1
- package/dist/toasts.js +2 -9
- package/dist/toasts.js.map +1 -1
- package/dist/versions.js +1 -1
- package/package.json +8 -8
- package/dist/format-ra_vlnN7.js +0 -238
- package/dist/format-ra_vlnN7.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @knime/product-features
|
|
2
2
|
|
|
3
|
+
## 1.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d8bb77a: Kds 948 Rename tokens for components and metanodes to its real purpose
|
|
8
|
+
|
|
9
|
+
- Adjust token names
|
|
10
|
+
- Adjust node template
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [d8bb77a]
|
|
13
|
+
- @knime/kds-styles@2.0.1
|
|
14
|
+
- @knime/kds-components@2.0.1
|
|
15
|
+
|
|
16
|
+
## 1.2.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- 5e6fc06: KDS-582: Add NodePreview component, add stories for PortIcon
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [b698be1]
|
|
25
|
+
- Updated dependencies [7d7918f]
|
|
26
|
+
- Updated dependencies [d6af8e5]
|
|
27
|
+
- Updated dependencies [d6af8e5]
|
|
28
|
+
- Updated dependencies [d6af8e5]
|
|
29
|
+
- Updated dependencies [c2d135a]
|
|
30
|
+
- Updated dependencies [2779db1]
|
|
31
|
+
- Updated dependencies [e774645]
|
|
32
|
+
- Updated dependencies [c2d135a]
|
|
33
|
+
- @knime/kds-styles@2.0.0
|
|
34
|
+
- @knime/kds-components@2.0.0
|
|
35
|
+
- @knime/utils@1.12.0
|
|
36
|
+
|
|
3
37
|
## 1.1.3
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
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
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
|
|
|
@@ -175,114 +175,6 @@ function _sfc_render(_ctx, _cache) {
|
|
|
175
175
|
}
|
|
176
176
|
const ProgressList = /*#__PURE__*/_export_sfc(_sfc_main$4, [['render',_sfc_render],['__scopeId',"data-v-8f14a3cb"]]);
|
|
177
177
|
|
|
178
|
-
class AbortError extends Error {
|
|
179
|
-
}
|
|
180
|
-
const createAbortablePromise = () => {
|
|
181
|
-
const abortController = new AbortController();
|
|
182
|
-
const runAbortablePromise = (request) => {
|
|
183
|
-
return new Promise((resolve, reject) => {
|
|
184
|
-
const abortListener = ({ target }) => {
|
|
185
|
-
abortController.signal.removeEventListener("abort", abortListener);
|
|
186
|
-
const reason = target.reason;
|
|
187
|
-
reject(reason instanceof AbortError ? reason : new AbortError(reason));
|
|
188
|
-
};
|
|
189
|
-
request().then(resolve).catch((error) => {
|
|
190
|
-
if (error instanceof AbortError) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
reject(error);
|
|
194
|
-
});
|
|
195
|
-
abortController.signal.addEventListener("abort", abortListener);
|
|
196
|
-
});
|
|
197
|
-
};
|
|
198
|
-
return { abortController, runAbortablePromise };
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
function sleep(ms) {
|
|
202
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
const DEFAULT_RETRY_DELAY_MS$2 = 0;
|
|
206
|
-
const DEFAULT_RETRY_COUNT$1 = 5;
|
|
207
|
-
async function retryPromise({
|
|
208
|
-
fn,
|
|
209
|
-
retryCount = DEFAULT_RETRY_COUNT$1,
|
|
210
|
-
retryDelayMS = DEFAULT_RETRY_DELAY_MS$2,
|
|
211
|
-
excludeError
|
|
212
|
-
}) {
|
|
213
|
-
try {
|
|
214
|
-
return await fn();
|
|
215
|
-
} catch (error) {
|
|
216
|
-
if (excludeError?.(error)) {
|
|
217
|
-
throw error;
|
|
218
|
-
}
|
|
219
|
-
if (retryCount > 0) {
|
|
220
|
-
await sleep(retryDelayMS);
|
|
221
|
-
return await retryPromise({
|
|
222
|
-
fn,
|
|
223
|
-
retryCount: retryCount - 1,
|
|
224
|
-
retryDelayMS,
|
|
225
|
-
excludeError
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
throw error;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
const getFileExtension = (nameOrPath) => {
|
|
233
|
-
const basename = nameOrPath.split(/[\\/]/).pop() ?? "";
|
|
234
|
-
const parts = basename.split(".");
|
|
235
|
-
if (basename === "" || parts.length === 1) {
|
|
236
|
-
return "";
|
|
237
|
-
}
|
|
238
|
-
return parts.at(-1) ?? "";
|
|
239
|
-
};
|
|
240
|
-
const KNAR = Object.freeze({
|
|
241
|
-
extension: "knar",
|
|
242
|
-
mimeType: "application/vnd.knime.workflow-group+zip",
|
|
243
|
-
matches(file) {
|
|
244
|
-
const extension = getFileExtension(file.name);
|
|
245
|
-
return extension === this.extension;
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
const KNWF = Object.freeze({
|
|
249
|
-
extension: "knwf",
|
|
250
|
-
mimeType: "application/vnd.knime.workflow+zip",
|
|
251
|
-
matches(file) {
|
|
252
|
-
const extension = getFileExtension(file.name);
|
|
253
|
-
return extension === this.extension;
|
|
254
|
-
},
|
|
255
|
-
/**
|
|
256
|
-
* Gets the name of a .knwf file without the extension. If the file is not
|
|
257
|
-
* matched as a .knwf file then this function will return the default value,
|
|
258
|
-
* which is empty string ("") if param is not provided
|
|
259
|
-
*/
|
|
260
|
-
getNameOrDefault(file, defaultValue = "") {
|
|
261
|
-
if (!this.matches(file)) {
|
|
262
|
-
return defaultValue;
|
|
263
|
-
}
|
|
264
|
-
return file.name.replace(`.${this.extension}`, "");
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
const knimeFileFormats = { KNWF };
|
|
268
|
-
const getFileMimeType = (file) => {
|
|
269
|
-
const DEFAULT_MIMETYPE = "application/octet-stream";
|
|
270
|
-
const extension = getFileExtension(file.name);
|
|
271
|
-
if (!extension) {
|
|
272
|
-
return DEFAULT_MIMETYPE;
|
|
273
|
-
}
|
|
274
|
-
if (KNWF.matches(file)) {
|
|
275
|
-
return KNWF.mimeType;
|
|
276
|
-
}
|
|
277
|
-
if (KNAR.matches(file)) {
|
|
278
|
-
return KNAR.mimeType;
|
|
279
|
-
}
|
|
280
|
-
if (!file.type) {
|
|
281
|
-
return DEFAULT_MIMETYPE;
|
|
282
|
-
}
|
|
283
|
-
return file.type;
|
|
284
|
-
};
|
|
285
|
-
|
|
286
178
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
287
179
|
__name: "UploadProgressPanelItem",
|
|
288
180
|
props: {
|
|
@@ -761,7 +653,7 @@ const createUploadManager = (config) => {
|
|
|
761
653
|
return;
|
|
762
654
|
}
|
|
763
655
|
currentState.abortController.abort(
|
|
764
|
-
new AbortError(
|
|
656
|
+
new index.AbortError(
|
|
765
657
|
`Upload (${currentState.uploadId}) for file "${currentState.file.name}" aborted. Reason: "${reason}"`
|
|
766
658
|
)
|
|
767
659
|
);
|
|
@@ -791,7 +683,7 @@ const createUploadManager = (config) => {
|
|
|
791
683
|
const totalChunks = getTotalFileParts(file);
|
|
792
684
|
const totalBytes = file.size;
|
|
793
685
|
const completedPartIds = {};
|
|
794
|
-
const { abortController, runAbortablePromise } = createAbortablePromise();
|
|
686
|
+
const { abortController, runAbortablePromise } = index.createAbortablePromise();
|
|
795
687
|
uploadStateMap.set(uploadId, {
|
|
796
688
|
uploadId,
|
|
797
689
|
file,
|
|
@@ -810,7 +702,7 @@ const createUploadManager = (config) => {
|
|
|
810
702
|
const end = Math.min(start + CHUNK_SIZE, file.size);
|
|
811
703
|
const chunk = file.slice(start, end);
|
|
812
704
|
try {
|
|
813
|
-
const { method, url } = await retryPromise({
|
|
705
|
+
const { method, url } = await index.retryPromise({
|
|
814
706
|
fn: () => getUploadFilePartUrl(uploadId, chunkIndex + 1),
|
|
815
707
|
retryCount: DEFAULT_RETRY_COUNT,
|
|
816
708
|
retryDelayMS: DEFAULT_RETRY_DELAY_MS$1
|
|
@@ -823,7 +715,7 @@ const createUploadManager = (config) => {
|
|
|
823
715
|
config.onProgress?.(uploadId, progress);
|
|
824
716
|
};
|
|
825
717
|
const filePartResponse = await runAbortablePromise(
|
|
826
|
-
() => retryPromise({
|
|
718
|
+
() => index.retryPromise({
|
|
827
719
|
fn: () => uploadChunkWithProgress({
|
|
828
720
|
method,
|
|
829
721
|
url,
|
|
@@ -844,7 +736,7 @@ const createUploadManager = (config) => {
|
|
|
844
736
|
completedChunkCount: uploadStateMap.get(uploadId).completedChunkCount + 1
|
|
845
737
|
});
|
|
846
738
|
} catch (error) {
|
|
847
|
-
if (error instanceof AbortError) {
|
|
739
|
+
if (error instanceof index.AbortError) {
|
|
848
740
|
consola.info("Aborted::", error);
|
|
849
741
|
return;
|
|
850
742
|
}
|
|
@@ -1048,7 +940,7 @@ const useFileUpload = (options = {}) => {
|
|
|
1048
940
|
useUploadManagerResult = useUploadManager({
|
|
1049
941
|
resolveFilePartUploadURL,
|
|
1050
942
|
onFileUploadComplete: ({ uploadId, filePartIds, parentId, name }) => {
|
|
1051
|
-
retryPromise({ fn: () => completeUpload(uploadId, filePartIds) }).then(() => {
|
|
943
|
+
index.retryPromise({ fn: () => completeUpload(uploadId, filePartIds) }).then(() => {
|
|
1052
944
|
options.onFileUploadComplete?.({
|
|
1053
945
|
uploadId,
|
|
1054
946
|
filePartIds,
|
|
@@ -1121,7 +1013,7 @@ const useFileUpload = (options = {}) => {
|
|
|
1121
1013
|
return [];
|
|
1122
1014
|
}
|
|
1123
1015
|
prepareQueueSize.value += enqueueableFiles.length;
|
|
1124
|
-
const uploadPayload = await retryPromise({
|
|
1016
|
+
const uploadPayload = await index.retryPromise({
|
|
1125
1017
|
fn: () => prepareUpload(parentId, enqueueableFiles),
|
|
1126
1018
|
excludeError: (error) => (
|
|
1127
1019
|
// eslint-disable-next-line no-magic-numbers
|