@knime/product-features 6.5.0 → 7.0.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +0 -1
  3. package/dist/{core-CkhE7SJE.js → core-n-n9OaZY.js} +2 -2
  4. package/dist/{core-CkhE7SJE.js.map → core-n-n9OaZY.js.map} +1 -1
  5. package/dist/dataTransfer/core.js +1 -1
  6. package/dist/dataTransfer.js +3 -3
  7. package/dist/{dist-CGsTYtOF.js → dist-D193M-Gt.js} +2 -11
  8. package/dist/{dist-CGsTYtOF.js.map → dist-D193M-Gt.js.map} +1 -1
  9. package/dist/embedding.js +2 -2
  10. package/dist/embeddingSDK.js +1 -1
  11. package/dist/{rfcErrors-D60RdfXR.js → rfcErrors-DdxFC4Hg.js} +2 -2
  12. package/dist/{rfcErrors-D60RdfXR.js.map → rfcErrors-DdxFC4Hg.js.map} +1 -1
  13. package/dist/rfcErrors.js +1 -1
  14. package/dist/toasts.js +1 -1
  15. package/package.json +7 -11
  16. package/dist/src/versions/CreateVersionForm/CreateVersionForm.vue.d.ts +0 -17
  17. package/dist/src/versions/CreateVersionForm/CreateVersionForm.vue.d.ts.map +0 -1
  18. package/dist/src/versions/CreateVersionForm/index.d.ts +0 -3
  19. package/dist/src/versions/CreateVersionForm/index.d.ts.map +0 -1
  20. package/dist/src/versions/CreateVersionForm/types.d.ts +0 -5
  21. package/dist/src/versions/CreateVersionForm/types.d.ts.map +0 -1
  22. package/dist/src/versions/VersionHistory/CurrentState.vue.d.ts +0 -21
  23. package/dist/src/versions/VersionHistory/CurrentState.vue.d.ts.map +0 -1
  24. package/dist/src/versions/VersionHistory/HistoryEvent.vue.d.ts +0 -19
  25. package/dist/src/versions/VersionHistory/HistoryEvent.vue.d.ts.map +0 -1
  26. package/dist/src/versions/VersionHistory/HistoryEventAuthor.vue.d.ts +0 -8
  27. package/dist/src/versions/VersionHistory/HistoryEventAuthor.vue.d.ts.map +0 -1
  28. package/dist/src/versions/VersionHistory/HistoryEventFooter.vue.d.ts +0 -9
  29. package/dist/src/versions/VersionHistory/HistoryEventFooter.vue.d.ts.map +0 -1
  30. package/dist/src/versions/VersionHistory/VersionHistory.vue.d.ts +0 -21
  31. package/dist/src/versions/VersionHistory/VersionHistory.vue.d.ts.map +0 -1
  32. package/dist/src/versions/VersionHistory/VersionItem.vue.d.ts +0 -22
  33. package/dist/src/versions/VersionHistory/VersionItem.vue.d.ts.map +0 -1
  34. package/dist/src/versions/VersionHistory/VersionLabel.vue.d.ts +0 -17
  35. package/dist/src/versions/VersionHistory/VersionLabel.vue.d.ts.map +0 -1
  36. package/dist/src/versions/VersionHistory/VersionLimitInfo.vue.d.ts +0 -10
  37. package/dist/src/versions/VersionHistory/VersionLimitInfo.vue.d.ts.map +0 -1
  38. package/dist/src/versions/VersionHistory/constants.d.ts +0 -4
  39. package/dist/src/versions/VersionHistory/constants.d.ts.map +0 -1
  40. package/dist/src/versions/VersionHistory/index.d.ts +0 -4
  41. package/dist/src/versions/VersionHistory/index.d.ts.map +0 -1
  42. package/dist/src/versions/VersionHistory/mock-data/index.d.ts +0 -11
  43. package/dist/src/versions/VersionHistory/mock-data/index.d.ts.map +0 -1
  44. package/dist/src/versions/VersionHistory/mock-data/savepoints.d.ts +0 -5
  45. package/dist/src/versions/VersionHistory/mock-data/savepoints.d.ts.map +0 -1
  46. package/dist/src/versions/VersionHistory/mock-data/versionHistory.d.ts +0 -7
  47. package/dist/src/versions/VersionHistory/mock-data/versionHistory.d.ts.map +0 -1
  48. package/dist/src/versions/VersionHistory/types.d.ts +0 -105
  49. package/dist/src/versions/VersionHistory/types.d.ts.map +0 -1
  50. package/dist/src/versions/index.d.ts +0 -5
  51. package/dist/src/versions/index.d.ts.map +0 -1
  52. package/dist/versions.css +0 -108
  53. package/dist/versions.js +0 -584
  54. package/dist/versions.js.map +0 -1
package/dist/embedding.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as rfcErrors, t as RFC_ERROR_TOAST_META_KEY } from "./rfcErrors-D60RdfXR.js";
1
+ import { n as rfcErrors, t as RFC_ERROR_TOAST_META_KEY } from "./rfcErrors-DdxFC4Hg.js";
2
2
  //#region src/embedding/outlets/spaceExplorer.ts
3
3
  /**
4
4
  * Keep only the capabilities that this contract version knows.
@@ -41,7 +41,7 @@ var outletCapabilityResolvers = {
41
41
  * Version of `@knime/product-features` that this build uses. Informational
42
42
  * only: logs, support, deprecation tracking. It never gates behavior.
43
43
  */
44
- var contractVersion = "6.5.0";
44
+ var contractVersion = "7.0.0";
45
45
  /**
46
46
  * Outlets that both sides declare. Capabilities that this contract version does not know are
47
47
  * dropped.
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { l as promise_exports } from "./dist-CGsTYtOF.js";
2
+ import { c as promise_exports } from "./dist-D193M-Gt.js";
3
3
  //#region src/embeddingSDK/messages.ts
4
4
  /**
5
5
  * ----------- IMPORTANT NOTES ---------------
@@ -1,5 +1,5 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
2
- import { r as formatDateTimeString } from "./dist-CGsTYtOF.js";
2
+ import { r as formatDateTimeString } from "./dist-D193M-Gt.js";
3
3
  import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createPropsRestProxy, createTextVNode, defineComponent, h, openBlock, ref, renderList, toDisplayString, unref } from "vue";
4
4
  import { KdsButton } from "@knime/kds-components";
5
5
  import { useClipboard } from "@vueuse/core";
@@ -179,4 +179,4 @@ var rfcErrors = {
179
179
  //#endregion
180
180
  export { rfcErrors as n, RFC_ERROR_TOAST_META_KEY as t };
181
181
 
182
- //# sourceMappingURL=rfcErrors-D60RdfXR.js.map
182
+ //# sourceMappingURL=rfcErrors-DdxFC4Hg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rfcErrors-D60RdfXR.js","names":[],"sources":["../src/rfcErrors/serializeRFCErrorData.ts","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/types.ts","../src/rfcErrors/index.ts"],"sourcesContent":["import type { RFCErrorData } from \"./types\";\n\nexport const serializeErrorForClipboard = (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n): string => {\n let details = \"\";\n if (error.details?.length) {\n if (error.details.length > 1) {\n const detailLines = error.details\n .map((item) => `\\u2022 ${item}`)\n .join(\"\\n\");\n details = `\\n${detailLines}`;\n } else {\n details = error.details[0];\n }\n }\n\n let errorText = `${headline}\\n\\n`;\n errorText += `${error.title}\\n\\n`;\n errorText += details ? `Details: ${details}\\n\\n` : \"\";\n\n if (error.status !== undefined) {\n errorText += `Status: ${error.status}\\n`;\n }\n\n if (error.date) {\n errorText += `Date: ${formatDate(error.date)}\\n`;\n }\n\n if (error.requestId) {\n errorText += `Request Id: ${error.requestId}\\n`;\n }\n\n if (error.errorId) {\n errorText += `Error Id: ${error.errorId}\\n`;\n }\n\n if (error.stacktrace) {\n errorText += \"------\\n\"; // separator\n errorText += `Stacktrace:\\n\\n${error.stacktrace}\\n`;\n }\n\n return errorText;\n};\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","/**\n * Type based on an RFC-9457 error standard (https://www.rfc-editor.org/rfc/rfc9457)\n * Also see:\n * https://knime-com.atlassian.net/wiki/spaces/SPECS/pages/4126769212/API+Errors+Problem+Details\n */\nexport type RFCErrorData = {\n /** Short human-readable summary of the error. */\n title: string;\n /** HTTP status code associated with the error. */\n status?: number;\n /** Date/time when the error occurred. */\n date?: Date;\n /** Additional human-readable detail messages. */\n details?: string[];\n /** Correlation id for the request that triggered the error. */\n requestId?: string;\n /**\n * Id used to find an error in the Hub logs. Specially relevant\n * when details of the error are not wanted to be exposed to the user.\n */\n errorId?: string;\n /**\n * Relevant only for the Analytics Platform, since the Hub does not expose\n * stack traces.\n */\n stacktrace?: string;\n};\n\nexport class RFCError extends Error {\n data: RFCErrorData;\n\n constructor(data: RFCErrorData) {\n super(data.title);\n this.data = data;\n }\n}\n\nexport type FetchError = {\n response: {\n headers: Headers;\n };\n statusCode: number;\n data: {\n title: string;\n details: string[];\n };\n};\n","import { h } from \"vue\";\n\nimport type { Toast } from \"../toasts\";\n\nimport RFCErrorToastTemplate from \"./RFCErrorToastTemplate.vue\";\nimport { type FetchError, RFCError, type RFCErrorData } from \"./types\";\n\n/**\n * Key in `Toast.meta` under which `toToast` keeps the error data, so the toast\n * can be rebuilt where its component cannot be rendered.\n */\nexport const RFC_ERROR_TOAST_META_KEY = \"rfcError\";\n\nexport type RFCErrorToastMeta = {\n data: RFCErrorData;\n canCopyToClipboard?: boolean;\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n};\n\n/**\n * Map to a toast template component compatible with an RFCError format\n */\nconst toToast = ({\n headline,\n rfcError,\n canCopyToClipboard = true,\n serializeErrorForClipboard = undefined,\n}: {\n headline: string;\n rfcError: RFCError;\n canCopyToClipboard?: boolean;\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n}): Toast => {\n const { data } = rfcError;\n\n const rfcErrorToastContent = h(RFCErrorToastTemplate, {\n headline,\n ...data,\n canCopyToClipboard,\n serializeErrorForClipboard,\n });\n\n return {\n type: \"error\",\n headline,\n component: rfcErrorToastContent,\n autoRemove: false,\n meta: {\n [RFC_ERROR_TOAST_META_KEY]: {\n data,\n canCopyToClipboard,\n serializeErrorForClipboard,\n } satisfies RFCErrorToastMeta,\n },\n };\n};\n\nconst isFetchError = (error: unknown): error is FetchError => {\n return (\n error !== null &&\n typeof error === \"object\" &&\n \"response\" in error &&\n \"statusCode\" in error &&\n \"data\" in error\n );\n};\n\n/**\n * Parse a generic request error to an `RFCError`.\n * When parsing is not possible it returns undefined.\n */\nconst tryParse = (error: unknown): RFCError | undefined => {\n if (!isFetchError(error)) {\n return undefined;\n }\n\n if (!error.response) {\n return undefined;\n }\n\n const responseDate = error.response.headers.get(\"date\")\n ? new Date(error.response.headers.get(\"date\")!)\n : undefined;\n\n const title =\n typeof error.data === \"string\" ? error.data : (error.data?.title ?? \"\");\n\n const rfcErrorData: RFCErrorData = {\n title: title as string,\n details: error.data?.details as string[] | undefined,\n status: error.statusCode as number,\n date: responseDate,\n requestId: error.response.headers.get(\"x-request-id\") ?? undefined,\n errorId: error.response.headers.get(\"x-error-id\") ?? undefined,\n };\n\n return new RFCError(rfcErrorData);\n};\n\nexport const rfcErrors = {\n toToast,\n tryParse,\n RFCError,\n};\n"],"mappings":";;;;;;AAEA,IAAa,8BACX,OACA,UACA,eACW;CACX,IAAI,UAAU;CACd,IAAI,MAAM,SAAS,QACjB,IAAI,MAAM,QAAQ,SAAS,GAIzB,UAAU,KAHU,MAAM,QACvB,KAAK,SAAS,UAAU,MAAM,CAAC,C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IAAI,MAAM,IAClD,IAAI,KAAK,MAAM,SAAS,QAAQ,IAAI,MAAM,CAAE,IAC5C,KAAA;CAcJ,OAAO,IAAI,SAAS;EARX,OAHP,OAAO,MAAM,SAAS,WAAW,MAAM,OAAQ,MAAM,MAAM,SAAS;EAIpE,SAAS,MAAM,MAAM;EACrB,QAAQ,MAAM;EACd,MAAM;EACN,WAAW,MAAM,SAAS,QAAQ,IAAI,cAAc,KAAK,KAAA;EACzD,SAAS,MAAM,SAAS,QAAQ,IAAI,YAAY,KAAK,KAAA;CAGnC,CAAY;AAClC;AAEA,IAAa,YAAY;CACvB;CACA;CACA;AACF"}
1
+ {"version":3,"file":"rfcErrors-DdxFC4Hg.js","names":[],"sources":["../src/rfcErrors/serializeRFCErrorData.ts","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/types.ts","../src/rfcErrors/index.ts"],"sourcesContent":["import type { RFCErrorData } from \"./types\";\n\nexport const serializeErrorForClipboard = (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n): string => {\n let details = \"\";\n if (error.details?.length) {\n if (error.details.length > 1) {\n const detailLines = error.details\n .map((item) => `\\u2022 ${item}`)\n .join(\"\\n\");\n details = `\\n${detailLines}`;\n } else {\n details = error.details[0];\n }\n }\n\n let errorText = `${headline}\\n\\n`;\n errorText += `${error.title}\\n\\n`;\n errorText += details ? `Details: ${details}\\n\\n` : \"\";\n\n if (error.status !== undefined) {\n errorText += `Status: ${error.status}\\n`;\n }\n\n if (error.date) {\n errorText += `Date: ${formatDate(error.date)}\\n`;\n }\n\n if (error.requestId) {\n errorText += `Request Id: ${error.requestId}\\n`;\n }\n\n if (error.errorId) {\n errorText += `Error Id: ${error.errorId}\\n`;\n }\n\n if (error.stacktrace) {\n errorText += \"------\\n\"; // separator\n errorText += `Stacktrace:\\n\\n${error.stacktrace}\\n`;\n }\n\n return errorText;\n};\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","/**\n * Type based on an RFC-9457 error standard (https://www.rfc-editor.org/rfc/rfc9457)\n * Also see:\n * https://knime-com.atlassian.net/wiki/spaces/SPECS/pages/4126769212/API+Errors+Problem+Details\n */\nexport type RFCErrorData = {\n /** Short human-readable summary of the error. */\n title: string;\n /** HTTP status code associated with the error. */\n status?: number;\n /** Date/time when the error occurred. */\n date?: Date;\n /** Additional human-readable detail messages. */\n details?: string[];\n /** Correlation id for the request that triggered the error. */\n requestId?: string;\n /**\n * Id used to find an error in the Hub logs. Specially relevant\n * when details of the error are not wanted to be exposed to the user.\n */\n errorId?: string;\n /**\n * Relevant only for the Analytics Platform, since the Hub does not expose\n * stack traces.\n */\n stacktrace?: string;\n};\n\nexport class RFCError extends Error {\n data: RFCErrorData;\n\n constructor(data: RFCErrorData) {\n super(data.title);\n this.data = data;\n }\n}\n\nexport type FetchError = {\n response: {\n headers: Headers;\n };\n statusCode: number;\n data: {\n title: string;\n details: string[];\n };\n};\n","import { h } from \"vue\";\n\nimport type { Toast } from \"../toasts\";\n\nimport RFCErrorToastTemplate from \"./RFCErrorToastTemplate.vue\";\nimport { type FetchError, RFCError, type RFCErrorData } from \"./types\";\n\n/**\n * Key in `Toast.meta` under which `toToast` keeps the error data, so the toast\n * can be rebuilt where its component cannot be rendered.\n */\nexport const RFC_ERROR_TOAST_META_KEY = \"rfcError\";\n\nexport type RFCErrorToastMeta = {\n data: RFCErrorData;\n canCopyToClipboard?: boolean;\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n};\n\n/**\n * Map to a toast template component compatible with an RFCError format\n */\nconst toToast = ({\n headline,\n rfcError,\n canCopyToClipboard = true,\n serializeErrorForClipboard = undefined,\n}: {\n headline: string;\n rfcError: RFCError;\n canCopyToClipboard?: boolean;\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n}): Toast => {\n const { data } = rfcError;\n\n const rfcErrorToastContent = h(RFCErrorToastTemplate, {\n headline,\n ...data,\n canCopyToClipboard,\n serializeErrorForClipboard,\n });\n\n return {\n type: \"error\",\n headline,\n component: rfcErrorToastContent,\n autoRemove: false,\n meta: {\n [RFC_ERROR_TOAST_META_KEY]: {\n data,\n canCopyToClipboard,\n serializeErrorForClipboard,\n } satisfies RFCErrorToastMeta,\n },\n };\n};\n\nconst isFetchError = (error: unknown): error is FetchError => {\n return (\n error !== null &&\n typeof error === \"object\" &&\n \"response\" in error &&\n \"statusCode\" in error &&\n \"data\" in error\n );\n};\n\n/**\n * Parse a generic request error to an `RFCError`.\n * When parsing is not possible it returns undefined.\n */\nconst tryParse = (error: unknown): RFCError | undefined => {\n if (!isFetchError(error)) {\n return undefined;\n }\n\n if (!error.response) {\n return undefined;\n }\n\n const responseDate = error.response.headers.get(\"date\")\n ? new Date(error.response.headers.get(\"date\")!)\n : undefined;\n\n const title =\n typeof error.data === \"string\" ? error.data : (error.data?.title ?? \"\");\n\n const rfcErrorData: RFCErrorData = {\n title: title as string,\n details: error.data?.details as string[] | undefined,\n status: error.statusCode as number,\n date: responseDate,\n requestId: error.response.headers.get(\"x-request-id\") ?? undefined,\n errorId: error.response.headers.get(\"x-error-id\") ?? undefined,\n };\n\n return new RFCError(rfcErrorData);\n};\n\nexport const rfcErrors = {\n toToast,\n tryParse,\n RFCError,\n};\n"],"mappings":";;;;;;AAEA,IAAa,8BACX,OACA,UACA,eACW;CACX,IAAI,UAAU;CACd,IAAI,MAAM,SAAS,QACjB,IAAI,MAAM,QAAQ,SAAS,GAIzB,UAAU,KAHU,MAAM,QACvB,KAAK,SAAS,UAAU,MAAM,CAAC,CAC/B,KAAK,IACO;MAEf,UAAU,MAAM,QAAQ;CAI5B,IAAI,YAAY,GAAG,SAAS;CAC5B,aAAa,GAAG,MAAM,MAAM;CAC5B,aAAa,UAAU,YAAY,QAAQ,QAAQ;CAEnD,IAAI,MAAM,WAAW,KAAA,GACnB,aAAa,WAAW,MAAM,OAAO;CAGvC,IAAI,MAAM,MACR,aAAa,SAAS,WAAW,MAAM,IAAI,EAAE;CAG/C,IAAI,MAAM,WACR,aAAa,eAAe,MAAM,UAAU;CAG9C,IAAI,MAAM,SACR,aAAa,aAAa,MAAM,QAAQ;CAG1C,IAAI,MAAM,YAAY;EACpB,aAAa;EACb,aAAa,kBAAkB,MAAM,WAAW;CAClD;CAEA,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EChBA,MAAM,WAKF,qBAAA,SAAA;GAAA;GAAA;GAAA;EAAA,CAAA;EAEJ,MAAM,QAAQ;EAEd,MAAM,EAAE,MAAM,WAAW,aAAa,EACpC,cAAc,IAChB,CAAC;EASD,MAAM,cAAc,IAAI,EANtB,SAAS,SAAS,UAClB,SAAS,WAAW,KAAA,KACpB,SAAS,SAAS,KAAA,KAClB,SAAS,cAAc,KAAA,KACvB,SAAS,YA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BAAqB,MACrB,6BAA6B,KAAA,QAUlB;CACX,MAAM,EAAE,SAAS;CASjB,OAAO;EACL,MAAM;EACN;EACA,WAV2B,EAAE,+BAAuB;GACpD;GACA,GAAG;GACH;GACA;EACF,CAKa;EACX,YAAY;EACZ,MAAM,GACH,2BAA2B;GAC1B;GACA;GACA;EACF,EACF;CACF;AACF;AAEA,IAAM,gBAAgB,UAAwC;CAC5D,OACE,UAAU,QACV,OAAO,UAAU,YACjB,cAAc,SACd,gBAAgB,SAChB,UAAU;AAEd;;;;;AAMA,IAAM,YAAY,UAAyC;CACzD,IAAI,CAAC,aAAa,KAAK,GACrB;CAGF,IAAI,CAAC,MAAM,UACT;CAGF,MAAM,eAAe,MAAM,SAAS,QAAQ,IAAI,MAAM,IAClD,IAAI,KAAK,MAAM,SAAS,QAAQ,IAAI,MAAM,CAAE,IAC5C,KAAA;CAcJ,OAAO,IAAI,SAAS;EARX,OAHP,OAAO,MAAM,SAAS,WAAW,MAAM,OAAQ,MAAM,MAAM,SAAS;EAIpE,SAAS,MAAM,MAAM;EACrB,QAAQ,MAAM;EACd,MAAM;EACN,WAAW,MAAM,SAAS,QAAQ,IAAI,cAAc,KAAK,KAAA;EACzD,SAAS,MAAM,SAAS,QAAQ,IAAI,YAAY,KAAK,KAAA;CAGnC,CAAY;AAClC;AAEA,IAAa,YAAY;CACvB;CACA;CACA;AACF"}
package/dist/rfcErrors.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as rfcErrors, t as RFC_ERROR_TOAST_META_KEY } from "./rfcErrors-D60RdfXR.js";
1
+ import { n as rfcErrors, t as RFC_ERROR_TOAST_META_KEY } from "./rfcErrors-DdxFC4Hg.js";
2
2
  export { RFC_ERROR_TOAST_META_KEY, rfcErrors };
package/dist/toasts.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
2
- import { d as truncateString_default, t as capitalize } from "./dist-CGsTYtOF.js";
2
+ import { t as capitalize, u as truncateString_default } from "./dist-D193M-Gt.js";
3
3
  import { Fragment, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, inject, mergeProps, normalizeClass, onMounted, openBlock, provide, ref, renderList, resolveDynamicComponent, toDisplayString, unref, useCssVars, vShow, watch, withCtx, withDirectives } from "vue";
4
4
  import { KdsButton, KdsIcon, KdsLinkButton, KdsProgressBar } from "@knime/kds-components";
5
5
  import { cloneDeep } from "es-toolkit";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knime/product-features",
3
- "version": "6.5.0",
3
+ "version": "7.0.0",
4
4
  "description": "Package containing composition patterns of KDS Components and KNIME business logic",
5
5
  "repository": {
6
6
  "type": "git",
@@ -56,10 +56,6 @@
56
56
  "./toasts": {
57
57
  "types": "./dist/src/toasts/index.d.ts",
58
58
  "import": "./dist/toasts.js"
59
- },
60
- "./versions": {
61
- "types": "./dist/src/versions/index.d.ts",
62
- "import": "./dist/versions.js"
63
59
  }
64
60
  },
65
61
  "files": [
@@ -67,20 +63,20 @@
67
63
  "CHANGELOG.md"
68
64
  ],
69
65
  "peerDependencies": {
70
- "@knime/kds-components": "^13.1.0",
71
- "@knime/kds-styles": "^13.0.0",
66
+ "@knime/kds-components": "^14.0.0",
67
+ "@knime/kds-styles": "^14.0.0",
72
68
  "@vueuse/core": "^14.0.0",
73
69
  "es-toolkit": "^1.49.0",
74
70
  "ofetch": "^1.5.1",
75
71
  "vue": "~3.5.0"
76
72
  },
77
73
  "dependencies": {
78
- "@knime/utils": "^2.1.0",
74
+ "@knime/utils": "^3.0.0",
79
75
  "consola": "^3.4.2"
80
76
  },
81
77
  "devDependencies": {
82
- "@knime/kds-components": "^13.6.0",
83
- "@knime/kds-styles": "^13.6.0",
78
+ "@knime/kds-components": "^14.0.0",
79
+ "@knime/kds-styles": "^14.0.0",
84
80
  "@storybook/addon-docs": "^10.6.2",
85
81
  "@storybook/vue3-vite": "^10.6.2",
86
82
  "@vitejs/plugin-vue": "^6.0.8",
@@ -104,7 +100,7 @@
104
100
  "vue-tsc": "^3.3.8"
105
101
  },
106
102
  "engines": {
107
- "node": ">=24"
103
+ "node": ">=26"
108
104
  },
109
105
  "sideEffects": [
110
106
  "dist/*.css"
@@ -1,17 +0,0 @@
1
- import { CreateVersionFormProps } from './types';
2
- declare const __VLS_export: import('vue').DefineComponent<CreateVersionFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
- cancel: (hasUnsavedChanges: boolean) => any;
4
- create: (args_0: {
5
- name: string;
6
- description: string;
7
- }) => any;
8
- }, string, import('vue').PublicProps, Readonly<CreateVersionFormProps> & Readonly<{
9
- onCancel?: ((hasUnsavedChanges: boolean) => any) | undefined;
10
- onCreate?: ((args_0: {
11
- name: string;
12
- description: string;
13
- }) => any) | undefined;
14
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
- declare const _default: typeof __VLS_export;
16
- export default _default;
17
- //# sourceMappingURL=CreateVersionForm.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateVersionForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/versions/CreateVersionForm/CreateVersionForm.vue"],"names":[],"mappings":"AA2IA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AA2LtD,QAAA,MAAM,YAAY;;;cApLC,MAAM;qBAAe,MAAM;;;;;cAA3B,MAAM;qBAAe,MAAM;;kFAuL5C,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,3 +0,0 @@
1
- export { default as CreateVersionForm } from './CreateVersionForm.vue';
2
- export type * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/versions/CreateVersionForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEvE,mBAAmB,SAAS,CAAC"}
@@ -1,5 +0,0 @@
1
- export type CreateVersionFormProps = {
2
- /** Whether the version creation request is currently in flight (disables the form). */
3
- isCreationPending?: boolean;
4
- };
5
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/versions/CreateVersionForm/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,uFAAuF;IACvF,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC"}
@@ -1,21 +0,0 @@
1
- import { ItemSavepoint, WithAvatar, WithLabels } from './types';
2
- type Props = {
3
- currentSavepoint: ItemSavepoint & WithAvatar & WithLabels;
4
- isSelected: boolean;
5
- hasEditCapability: boolean;
6
- hasPreviousVersion: boolean;
7
- hasVersionLimit: boolean;
8
- isVersionLimitExceeded?: boolean;
9
- };
10
- declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
- select: () => any;
12
- createVersion: () => any;
13
- discard: () => any;
14
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
15
- onSelect?: (() => any) | undefined;
16
- onCreateVersion?: (() => any) | undefined;
17
- onDiscard?: (() => any) | undefined;
18
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
- declare const _default: typeof __VLS_export;
20
- export default _default;
21
- //# sourceMappingURL=CurrentState.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentState.vue.d.ts","sourceRoot":"","sources":["../../../../src/versions/VersionHistory/CurrentState.vue"],"names":[],"mappings":"AA0GA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErE,KAAK,KAAK,GAAG;IACX,gBAAgB,EAAE,aAAa,GAAG,UAAU,GAAG,UAAU,CAAC;IAC1D,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,OAAO,CAAC;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AA0KF,QAAA,MAAM,YAAY;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,19 +0,0 @@
1
- type Props = {
2
- isSelected: boolean;
3
- isFirstItem: boolean;
4
- isLastItem: boolean;
5
- };
6
- declare var __VLS_6: {};
7
- type __VLS_Slots = {} & {
8
- default?: (props: typeof __VLS_6) => any;
9
- };
10
- declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
- declare const _default: typeof __VLS_export;
13
- export default _default;
14
- type __VLS_WithSlots<T, S> = T & {
15
- new (): {
16
- $slots: S;
17
- };
18
- };
19
- //# sourceMappingURL=HistoryEvent.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HistoryEvent.vue.d.ts","sourceRoot":"","sources":["../../../../src/versions/VersionHistory/HistoryEvent.vue"],"names":[],"mappings":"AAiFA,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAuEF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,sRAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,8 +0,0 @@
1
- import { WithAvatar } from './types';
2
- type Props = WithAvatar & {
3
- author: string;
4
- };
5
- declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
- declare const _default: typeof __VLS_export;
7
- export default _default;
8
- //# sourceMappingURL=HistoryEventAuthor.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HistoryEventAuthor.vue.d.ts","sourceRoot":"","sources":["../../../../src/versions/VersionHistory/HistoryEventAuthor.vue"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,KAAK,KAAK,GAAG,UAAU,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAgDF,QAAA,MAAM,YAAY,sRAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,9 +0,0 @@
1
- import { NamedItemVersion } from './types';
2
- type Props = {
3
- date: string;
4
- version?: NamedItemVersion["version"];
5
- };
6
- declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
- declare const _default: typeof __VLS_export;
8
- export default _default;
9
- //# sourceMappingURL=HistoryEventFooter.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HistoryEventFooter.vue.d.ts","sourceRoot":"","sources":["../../../../src/versions/VersionHistory/HistoryEventFooter.vue"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AA2DF,QAAA,MAAM,YAAY,sRAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,21 +0,0 @@
1
- import { VersionHistoryProps } from './types';
2
- declare const __VLS_export: import('vue').DefineComponent<VersionHistoryProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
- select: (version: number | "current-state" | "most-recent") => any;
4
- delete: (version: number | "current-state" | "most-recent") => any;
5
- close: () => any;
6
- restore: (version: number | "current-state" | "most-recent") => any;
7
- loadAll: () => any;
8
- create: () => any;
9
- discardCurrentState: () => any;
10
- }, string, import('vue').PublicProps, Readonly<VersionHistoryProps> & Readonly<{
11
- onSelect?: ((version: number | "current-state" | "most-recent") => any) | undefined;
12
- onDelete?: ((version: number | "current-state" | "most-recent") => any) | undefined;
13
- onClose?: (() => any) | undefined;
14
- onRestore?: ((version: number | "current-state" | "most-recent") => any) | undefined;
15
- onLoadAll?: (() => any) | undefined;
16
- onCreate?: (() => any) | undefined;
17
- onDiscardCurrentState?: (() => any) | undefined;
18
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
- declare const _default: typeof __VLS_export;
20
- export default _default;
21
- //# sourceMappingURL=VersionHistory.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VersionHistory.vue.d.ts","sourceRoot":"","sources":["../../../../src/versions/VersionHistory/VersionHistory.vue"],"names":[],"mappings":"AAyIA,OAAO,KAAK,EAAoB,mBAAmB,EAAE,MAAM,SAAS,CAAC;AA2QrE,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,22 +0,0 @@
1
- import { NamedItemVersion, RestoreOption, WithAvatar, WithLabels } from './types';
2
- type Props = {
3
- version: NamedItemVersion & WithAvatar & WithLabels;
4
- isSelected: boolean;
5
- hasAdminRights: boolean;
6
- hasEditCapability: boolean;
7
- isFirstItem: boolean;
8
- isLastItem: boolean;
9
- restoreOption?: RestoreOption;
10
- };
11
- declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
- select: (selectionStatus: boolean) => any;
13
- delete: () => any;
14
- restore: () => any;
15
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
16
- onSelect?: ((selectionStatus: boolean) => any) | undefined;
17
- onDelete?: (() => any) | undefined;
18
- onRestore?: (() => any) | undefined;
19
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
22
- //# sourceMappingURL=VersionItem.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VersionItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/versions/VersionHistory/VersionItem.vue"],"names":[],"mappings":"AA0IA,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,UAAU,EACX,MAAM,SAAS,CAAC;AAEjB,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,gBAAgB,GAAG,UAAU,GAAG,UAAU,CAAC;IACpD,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AA4LF,QAAA,MAAM,YAAY;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,17 +0,0 @@
1
- import { AssignedLabel } from './types';
2
- type Props = {
3
- label: AssignedLabel;
4
- };
5
- type __VLS_Props = Props;
6
- type __VLS_ModelProps = {
7
- modelValue?: boolean;
8
- };
9
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
- declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
- "update:modelValue": (value: boolean) => any;
12
- }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
13
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
14
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
- declare const _default: typeof __VLS_export;
16
- export default _default;
17
- //# sourceMappingURL=VersionLabel.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VersionLabel.vue.d.ts","sourceRoot":"","sources":["../../../../src/versions/VersionHistory/VersionLabel.vue"],"names":[],"mappings":"AAkFA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,aAAa,CAAC;CACtB,CAAC;AAEF,KAAK,WAAW,GAAG,KAAK,CAAC;AAWzB,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAkHxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,10 +0,0 @@
1
- import { VersionLimit } from './types';
2
- type __VLS_Props = {
3
- versionLimit: Required<VersionLimit>;
4
- upgradeUrl?: string;
5
- isPrivate?: boolean;
6
- };
7
- declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
8
- declare const _default: typeof __VLS_export;
9
- export default _default;
10
- //# sourceMappingURL=VersionLimitInfo.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VersionLimitInfo.vue.d.ts","sourceRoot":"","sources":["../../../../src/versions/VersionHistory/VersionLimitInfo.vue"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AA8GF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,4 +0,0 @@
1
- export declare const VERSION_DEFAULT_LIMIT = 10;
2
- export declare const CURRENT_STATE_VERSION = "current-state";
3
- export declare const MOST_RECENT_VERSION = "most-recent";
4
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/versions/VersionHistory/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,qBAAqB,kBAAkB,CAAC;AACrD,eAAO,MAAM,mBAAmB,gBAAgB,CAAC"}
@@ -1,4 +0,0 @@
1
- export { default as VersionHistory } from './VersionHistory.vue';
2
- export type * from './types';
3
- export * from './constants';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/versions/VersionHistory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjE,mBAAmB,SAAS,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -1,11 +0,0 @@
1
- export declare const mocks: {
2
- savepoints: {
3
- defaultData: import('..').ItemSavepoint & import('..').WithAvatar & import('..').WithLabels;
4
- };
5
- versionHistory: {
6
- defaultData: (import('..').NamedItemVersion & import('..').WithAvatar & import('..').WithLabels)[];
7
- aLotOfVersionsWithPlentyOfText: (import('..').NamedItemVersion & import('..').WithAvatar & import('..').WithLabels)[];
8
- versionToAddOnLoadMore: import('..').NamedItemVersion & import('..').WithAvatar & import('..').WithLabels;
9
- };
10
- };
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/versions/VersionHistory/mock-data/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK;;;;;;;;;CAGjB,CAAC"}
@@ -1,5 +0,0 @@
1
- import { ItemSavepoint, WithAvatar, WithLabels } from '../types';
2
- export declare const savepoints: {
3
- defaultData: ItemSavepoint & WithAvatar & WithLabels;
4
- };
5
- //# sourceMappingURL=savepoints.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"savepoints.d.ts","sourceRoot":"","sources":["../../../../../src/versions/VersionHistory/mock-data/savepoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA6CtE,eAAO,MAAM,UAAU;;CAEtB,CAAC"}
@@ -1,7 +0,0 @@
1
- import { NamedItemVersion, WithAvatar, WithLabels } from '../types';
2
- export declare const versionHistory: {
3
- defaultData: (NamedItemVersion & WithAvatar & WithLabels)[];
4
- aLotOfVersionsWithPlentyOfText: (NamedItemVersion & WithAvatar & WithLabels)[];
5
- versionToAddOnLoadMore: NamedItemVersion & WithAvatar & WithLabels;
6
- };
7
- //# sourceMappingURL=versionHistory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"versionHistory.d.ts","sourceRoot":"","sources":["../../../../../src/versions/VersionHistory/mock-data/versionHistory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAyGzE,eAAO,MAAM,cAAc;;;;CAI1B,CAAC"}
@@ -1,105 +0,0 @@
1
- import { CURRENT_STATE_VERSION, MOST_RECENT_VERSION } from './constants';
2
- export type NamedItemVersion = {
3
- /** Version number, or one of the sentinel constants `CURRENT_STATE_VERSION` / `MOST_RECENT_VERSION`. */
4
- version: number | typeof CURRENT_STATE_VERSION | typeof MOST_RECENT_VERSION;
5
- /** Human-readable title of the version. */
6
- title: string;
7
- /** Optional description of what changed in this version. */
8
- description?: string;
9
- /** Display name of the author who created the version. */
10
- author: string;
11
- /** Account id of the author who created the version. */
12
- authorAccountId?: string;
13
- /** ISO timestamp when the version was created. */
14
- createdOn: string;
15
- };
16
- export type AssignedLabel = {
17
- /** Unique identifier of the assigned label. */
18
- labelId: string;
19
- /** Optional message attached to the label assignment. */
20
- message?: string;
21
- /** ISO timestamp when the label was assigned. */
22
- createdAt?: string;
23
- /** Account id of the user who assigned the label. */
24
- createdBy?: string;
25
- /** The label definition. */
26
- label: {
27
- /** Display name of the label. */
28
- name: string;
29
- /** Description of the label. */
30
- description: string;
31
- };
32
- };
33
- /** Adds avatar information (name + optional image) to a version or savepoint. */
34
- export type WithAvatar = {
35
- /** Avatar data: display name and optional image source URL. */
36
- avatar: {
37
- name: string;
38
- src?: string;
39
- };
40
- };
41
- /** Adds label assignments to a version or savepoint. */
42
- export type WithLabels = {
43
- labels: Array<AssignedLabel>;
44
- };
45
- type ItemChange = {
46
- author: string;
47
- createdOn: string;
48
- eventActionType: "ADDED" | "UPDATED" | "MOVED" | "RENAMED";
49
- message: string;
50
- authorAccountId?: string;
51
- };
52
- export type ItemSavepoint = {
53
- /** Display name of the author who last edited the savepoint. */
54
- author: string;
55
- /** Account id of the author who last edited the savepoint. */
56
- authorAccountId?: string;
57
- /** ISO timestamp of the last edit. */
58
- lastEditedOn: string;
59
- /** Monotonically increasing savepoint number. */
60
- savepointNumber: number;
61
- /** The version this savepoint belongs to, if it has been versioned. */
62
- version?: NamedItemVersion;
63
- /** UUID of the item version, if versioned. */
64
- itemVersionId?: string;
65
- /** List of changes recorded in this savepoint. */
66
- changes: Array<ItemChange>;
67
- };
68
- export type VersionLimit = {
69
- /** How many versions have been created so far. */
70
- currentUsage: number;
71
- /** Maximum number of allowed versions. `undefined` means unlimited. */
72
- limit?: number;
73
- };
74
- export type RestoreOption = {
75
- disabled?: boolean;
76
- subText?: string;
77
- };
78
- export type VersionHistoryProps = {
79
- /** Whether the item has uncommitted/unversioned changes since the last savepoint. */
80
- hasUnversionedChanges: boolean;
81
- /** The unversioned savepoint shown above the version list, or `null` if there is none. */
82
- unversionedSavepoint?: (ItemSavepoint & WithAvatar & WithLabels) | null;
83
- /** The currently selected version, or `null` if nothing is selected. */
84
- currentVersion: NamedItemVersion["version"] | null;
85
- /** Ordered list of named versions with avatar and label data. */
86
- versionHistory: Array<NamedItemVersion & WithAvatar & WithLabels>;
87
- /** Whether older versions are currently being loaded. */
88
- loading: boolean;
89
- /** Whether all versions have been loaded (hides the "load more" button). */
90
- hasLoadedAllVersions: boolean;
91
- /** Whether the current user has admin rights (can delete versions). */
92
- hasAdminRights: boolean;
93
- /** Whether the current user has edit capability (can create/restore versions). */
94
- hasEditCapability: boolean;
95
- /** Version count limits for the current space. */
96
- versionLimit?: VersionLimit;
97
- /** URL to a pricing/upgrade page shown when the version limit is reached. */
98
- upgradeUrl?: string;
99
- /** Whether the item lives in a private space (affects limit messaging). */
100
- isPrivate?: boolean;
101
- /** Props to pass to the restore version option. */
102
- restoreOption?: RestoreOption;
103
- };
104
- export {};
105
- //# sourceMappingURL=types.d.ts.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4EAA4E;IAC5E,oBAAoB,EAAE,OAAO,CAAC;IAC9B,uEAAuE;IACvE,cAAc,EAAE,OAAO,CAAC;IACxB,kFAAkF;IAClF,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kDAAkD;IAClD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mDAAmD;IACnD,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from './VersionHistory';
2
- export type * from './VersionHistory';
3
- export * from './CreateVersionForm';
4
- export type * from './CreateVersionForm';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/versions/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,mBAAmB,kBAAkB,CAAC;AAEtC,cAAc,qBAAqB,CAAC;AACpC,mBAAmB,qBAAqB,CAAC"}