@knime/hub-features 1.28.0 → 1.29.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 +20 -0
- package/package.json +5 -5
- package/src/analytics/schema/cloudhome-event-functions.ts +6 -8
- package/src/analytics/schema/code-generator.js +1 -3
- package/src/analytics/schema/editor-event-functions.ts +7 -9
- package/src/analytics/schema/schema.d.ts +11 -11
- package/src/analytics/schema/schema.json +12 -12
- package/src/httpClient/constants.ts +1 -0
- package/src/{common/ofetchClient.ts → httpClient/createHttpClient.ts} +6 -5
- package/src/httpClient/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/useDownloadArtifact/useDownloadArtifact.ts +2 -2
- package/src/useFileUpload/useFileUpload.ts +2 -2
- package/src/common/constants.ts +0 -1
- package/src/components/versions/components/CreateVersionForm.vue +0 -155
- package/src/components/versions/components/CurrentState.vue +0 -258
- package/src/components/versions/components/LabelList.vue +0 -253
- package/src/components/versions/components/ManageVersions.vue +0 -191
- package/src/components/versions/components/NoVersionItem.vue +0 -23
- package/src/components/versions/components/VersionHistory.vue +0 -138
- package/src/components/versions/components/VersionItem.vue +0 -278
- package/src/components/versions/components/VersionLimitInfo.vue +0 -37
- package/src/components/versions/composables/useVersionsApi.ts +0 -254
- package/src/components/versions/constants.ts +0 -3
- package/src/components/versions/index.ts +0 -7
- package/src/components/versions/types.ts +0 -77
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="no-versions-item">No version created yet</div>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<style lang="postcss" scoped>
|
|
6
|
-
.no-versions-item {
|
|
7
|
-
padding-top: 4px;
|
|
8
|
-
font-size: 12px;
|
|
9
|
-
font-weight: 300;
|
|
10
|
-
line-height: 15px;
|
|
11
|
-
|
|
12
|
-
&::after {
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 11px;
|
|
15
|
-
left: -4px;
|
|
16
|
-
width: 6px;
|
|
17
|
-
height: 6px;
|
|
18
|
-
content: "";
|
|
19
|
-
background-color: var(--knime-masala);
|
|
20
|
-
border-radius: 100%;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
</style>
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { IdleReadyButton } from "@knime/components";
|
|
3
|
-
|
|
4
|
-
import type { NamedItemVersion, WithAvatar, WithLabels } from "../types";
|
|
5
|
-
|
|
6
|
-
import NoVersionItem from "./NoVersionItem.vue";
|
|
7
|
-
import VersionItem from "./VersionItem.vue";
|
|
8
|
-
|
|
9
|
-
defineProps<{
|
|
10
|
-
selectedVersion: NamedItemVersion["version"] | null;
|
|
11
|
-
versionHistory: Array<NamedItemVersion & WithAvatar & WithLabels>;
|
|
12
|
-
hasLoadedAllVersions: boolean;
|
|
13
|
-
loading: boolean;
|
|
14
|
-
hasUnversionedChanges: boolean;
|
|
15
|
-
hasAdminRights: boolean;
|
|
16
|
-
hasEditCapability: boolean;
|
|
17
|
-
}>();
|
|
18
|
-
|
|
19
|
-
defineEmits<{
|
|
20
|
-
loadAll: [];
|
|
21
|
-
delete: [version: NamedItemVersion["version"]];
|
|
22
|
-
restore: [version: NamedItemVersion["version"]];
|
|
23
|
-
select: [version: NamedItemVersion["version"] | null];
|
|
24
|
-
}>();
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<template>
|
|
28
|
-
<div class="version-history-container">
|
|
29
|
-
<div :class="['versions', { 'no-changes': !hasUnversionedChanges }]">
|
|
30
|
-
<VersionItem
|
|
31
|
-
v-for="itemVersion in versionHistory"
|
|
32
|
-
:key="itemVersion.version"
|
|
33
|
-
:is-selected="itemVersion.version === selectedVersion"
|
|
34
|
-
:version="itemVersion"
|
|
35
|
-
:has-admin-rights="hasAdminRights"
|
|
36
|
-
:has-edit-capability="hasEditCapability"
|
|
37
|
-
class="version-item"
|
|
38
|
-
@delete="$emit('delete', itemVersion.version)"
|
|
39
|
-
@restore="$emit('restore', itemVersion.version)"
|
|
40
|
-
@select="$emit('select', $event ? itemVersion.version : null)"
|
|
41
|
-
/>
|
|
42
|
-
<NoVersionItem v-if="!loading && versionHistory.length === 0" />
|
|
43
|
-
</div>
|
|
44
|
-
<IdleReadyButton
|
|
45
|
-
v-if="!hasLoadedAllVersions"
|
|
46
|
-
:with-border="false"
|
|
47
|
-
with-down-icon
|
|
48
|
-
:idle="loading"
|
|
49
|
-
ready-text=" Load all "
|
|
50
|
-
@click="$emit('loadAll')"
|
|
51
|
-
/>
|
|
52
|
-
</div>
|
|
53
|
-
</template>
|
|
54
|
-
|
|
55
|
-
<style lang="postcss" scoped>
|
|
56
|
-
@import url("@knime/styles/css/mixins.css");
|
|
57
|
-
|
|
58
|
-
.version-history-container {
|
|
59
|
-
height: 100%;
|
|
60
|
-
|
|
61
|
-
& .header {
|
|
62
|
-
display: flex;
|
|
63
|
-
align-items: center;
|
|
64
|
-
width: 440px;
|
|
65
|
-
height: 24px;
|
|
66
|
-
margin-bottom: 10px;
|
|
67
|
-
|
|
68
|
-
& .title {
|
|
69
|
-
display: inline;
|
|
70
|
-
margin: 0;
|
|
71
|
-
font-size: 16px;
|
|
72
|
-
font-weight: 700;
|
|
73
|
-
line-height: 19px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@media only screen and (width <= 900px) {
|
|
77
|
-
width: calc(100vw - 60px);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
& .versions {
|
|
82
|
-
position: relative;
|
|
83
|
-
display: flex;
|
|
84
|
-
flex-direction: column;
|
|
85
|
-
gap: 10px;
|
|
86
|
-
|
|
87
|
-
/*
|
|
88
|
-
Explicit min-height to ensure submenu is never cut off.
|
|
89
|
-
Height is equal to 2 versions.
|
|
90
|
-
*/
|
|
91
|
-
min-height: 50px;
|
|
92
|
-
padding: 0 0 10px 20px;
|
|
93
|
-
margin-left: 10px;
|
|
94
|
-
scrollbar-width: none; /* Hide scrollbar for Firefox */
|
|
95
|
-
-ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
|
|
96
|
-
|
|
97
|
-
&::before {
|
|
98
|
-
position: absolute;
|
|
99
|
-
top: -30px;
|
|
100
|
-
left: -2px;
|
|
101
|
-
width: 2px;
|
|
102
|
-
height: calc(100% + 35px);
|
|
103
|
-
content: "";
|
|
104
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 5'%3E%3Ccircle cx='1' cy='1' r='.5' fill='%236E6E6E'/%3E%3C/svg%3E");
|
|
105
|
-
background-repeat: repeat-y;
|
|
106
|
-
background-size: 5px;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&.no-changes::before {
|
|
110
|
-
top: -15px;
|
|
111
|
-
height: calc(100% + 20px);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
& .empty-versions {
|
|
116
|
-
padding: 7px;
|
|
117
|
-
font-size: 11px;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/* Hide scrollbar for now */
|
|
121
|
-
& .versions::-webkit-scrollbar {
|
|
122
|
-
display: none;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
@media only screen and (width <= 900px) {
|
|
126
|
-
width: 100vw;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
svg {
|
|
131
|
-
@mixin svg-icon-size 18;
|
|
132
|
-
|
|
133
|
-
display: inline-block;
|
|
134
|
-
margin-right: 5px;
|
|
135
|
-
vertical-align: middle;
|
|
136
|
-
stroke: var(--knime-masala);
|
|
137
|
-
}
|
|
138
|
-
</style>
|
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, ref } from "vue";
|
|
3
|
-
import { compact } from "lodash-es"; // eslint-disable-line depend/ban-dependencies
|
|
4
|
-
|
|
5
|
-
import { LocalDateTime, SubMenu, Tooltip } from "@knime/components";
|
|
6
|
-
import MenuIcon from "@knime/styles/img/icons/menu-options.svg";
|
|
7
|
-
import { truncateString } from "@knime/utils";
|
|
8
|
-
|
|
9
|
-
import HubAvatar from "../../avatars/HubAvatar.vue";
|
|
10
|
-
import type { NamedItemVersion, WithAvatar, WithLabels } from "../types";
|
|
11
|
-
|
|
12
|
-
import LabelList from "./LabelList.vue";
|
|
13
|
-
|
|
14
|
-
const DESCRIPTION_TRUNCATE_LENGTH = 120;
|
|
15
|
-
|
|
16
|
-
const props = defineProps<{
|
|
17
|
-
version: NamedItemVersion & WithAvatar & WithLabels;
|
|
18
|
-
isSelected: boolean;
|
|
19
|
-
hasAdminRights: boolean;
|
|
20
|
-
hasEditCapability: boolean;
|
|
21
|
-
}>();
|
|
22
|
-
|
|
23
|
-
const emit = defineEmits<{
|
|
24
|
-
select: [selectionStatus: boolean];
|
|
25
|
-
delete: [];
|
|
26
|
-
restore: [];
|
|
27
|
-
}>();
|
|
28
|
-
|
|
29
|
-
const hideTooltip = ref(false);
|
|
30
|
-
const tooltipText = computed(() => {
|
|
31
|
-
if (hideTooltip.value) {
|
|
32
|
-
return "";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (props.isSelected) {
|
|
36
|
-
return "Deselect to go back to latest";
|
|
37
|
-
} else {
|
|
38
|
-
return "Show version";
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
const truncatedDescription = computed(() => {
|
|
43
|
-
return truncateString(props.version.description, DESCRIPTION_TRUNCATE_LENGTH);
|
|
44
|
-
});
|
|
45
|
-
const isDescriptionTruncated = computed(
|
|
46
|
-
() =>
|
|
47
|
-
props.version.description &&
|
|
48
|
-
props.version.description.length !== truncatedDescription.value.length,
|
|
49
|
-
);
|
|
50
|
-
const isDescriptionExpanded = ref(false);
|
|
51
|
-
|
|
52
|
-
const toggleVersionSelection = () => {
|
|
53
|
-
emit("select", !props.isSelected);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const menuItems = computed(() =>
|
|
57
|
-
compact([
|
|
58
|
-
props.hasEditCapability && {
|
|
59
|
-
text: props.isSelected ? "Deselect this version" : "Show this version",
|
|
60
|
-
action: toggleVersionSelection,
|
|
61
|
-
},
|
|
62
|
-
props.hasEditCapability && {
|
|
63
|
-
text: "Restore this version",
|
|
64
|
-
action: () => emit("restore"),
|
|
65
|
-
},
|
|
66
|
-
props.hasAdminRights && {
|
|
67
|
-
text: "Delete this version",
|
|
68
|
-
action: () => emit("delete"),
|
|
69
|
-
},
|
|
70
|
-
]),
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
const onMenuItemClick = (_: Event, item: (typeof menuItems.value)[number]) => {
|
|
74
|
-
item.action();
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
const onExpandDescription = () => {
|
|
78
|
-
isDescriptionExpanded.value = true;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
const onLabelOver = () => {
|
|
82
|
-
hideTooltip.value = true;
|
|
83
|
-
};
|
|
84
|
-
const onLabelLeave = () => {
|
|
85
|
-
hideTooltip.value = false;
|
|
86
|
-
};
|
|
87
|
-
</script>
|
|
88
|
-
|
|
89
|
-
<template>
|
|
90
|
-
<div>
|
|
91
|
-
<div
|
|
92
|
-
:class="['version-item-container', isSelected && 'selected']"
|
|
93
|
-
@click="toggleVersionSelection"
|
|
94
|
-
>
|
|
95
|
-
<Tooltip ref="tooltip" class="tooltip" :text="tooltipText">
|
|
96
|
-
<div class="left">
|
|
97
|
-
<h6>
|
|
98
|
-
{{ version.title }}
|
|
99
|
-
</h6>
|
|
100
|
-
|
|
101
|
-
<div class="labels">
|
|
102
|
-
<LabelList
|
|
103
|
-
:labels="version.labels"
|
|
104
|
-
@label-over="onLabelOver"
|
|
105
|
-
@label-leave="onLabelLeave"
|
|
106
|
-
/>
|
|
107
|
-
</div>
|
|
108
|
-
|
|
109
|
-
<p v-if="isDescriptionTruncated && !isDescriptionExpanded">
|
|
110
|
-
{{ truncatedDescription }}
|
|
111
|
-
<button class="show-more-button" @click.stop="onExpandDescription">
|
|
112
|
-
Show more
|
|
113
|
-
</button>
|
|
114
|
-
</p>
|
|
115
|
-
<p v-else-if="version.description">{{ version.description }}</p>
|
|
116
|
-
<span class="footer-info">
|
|
117
|
-
Created on <LocalDateTime show-time :date="version.createdOn" /> –
|
|
118
|
-
Version {{ version.version }}
|
|
119
|
-
</span>
|
|
120
|
-
</div>
|
|
121
|
-
<div class="right">
|
|
122
|
-
<HubAvatar class="profile-picture" v-bind="version.avatar" />
|
|
123
|
-
<div v-if="menuItems.length" class="controls">
|
|
124
|
-
<nav>
|
|
125
|
-
<SubMenu
|
|
126
|
-
:items="menuItems"
|
|
127
|
-
button-title="Options"
|
|
128
|
-
@item-click="onMenuItemClick"
|
|
129
|
-
>
|
|
130
|
-
<MenuIcon class="open-icon" />
|
|
131
|
-
</SubMenu>
|
|
132
|
-
</nav>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
</Tooltip>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
</template>
|
|
139
|
-
|
|
140
|
-
<style lang="postcss" scoped>
|
|
141
|
-
.version-item-container {
|
|
142
|
-
position: relative;
|
|
143
|
-
display: flex;
|
|
144
|
-
gap: 15px;
|
|
145
|
-
align-items: center;
|
|
146
|
-
align-items: stretch;
|
|
147
|
-
padding: 10px;
|
|
148
|
-
background-color: var(--knime-white);
|
|
149
|
-
transition: background-color 0.25s ease;
|
|
150
|
-
|
|
151
|
-
& .tooltip {
|
|
152
|
-
display: flex;
|
|
153
|
-
justify-content: space-between;
|
|
154
|
-
width: 100%;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
& p {
|
|
158
|
-
margin: 10px 0;
|
|
159
|
-
font-size: 11px;
|
|
160
|
-
line-height: 1.5;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
& button {
|
|
164
|
-
all: unset;
|
|
165
|
-
font-size: 11px;
|
|
166
|
-
font-weight: 500;
|
|
167
|
-
color: var(--knime-dove-gray);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
& .left {
|
|
171
|
-
display: flex;
|
|
172
|
-
flex-direction: column;
|
|
173
|
-
gap: 3px;
|
|
174
|
-
word-break: normal;
|
|
175
|
-
overflow-wrap: break-word;
|
|
176
|
-
|
|
177
|
-
& h6 {
|
|
178
|
-
display: block;
|
|
179
|
-
margin: 0;
|
|
180
|
-
font-size: 13px;
|
|
181
|
-
font-weight: 700;
|
|
182
|
-
line-height: 18px;
|
|
183
|
-
transition: color 0.25s ease;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
& .footer-info {
|
|
187
|
-
margin: 0;
|
|
188
|
-
font-size: 11px;
|
|
189
|
-
font-weight: 300;
|
|
190
|
-
line-height: 1.5;
|
|
191
|
-
transition: color 0.25s ease;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
& .right {
|
|
196
|
-
display: flex;
|
|
197
|
-
gap: 8px;
|
|
198
|
-
align-items: stretch;
|
|
199
|
-
justify-content: flex-end;
|
|
200
|
-
width: 100px;
|
|
201
|
-
|
|
202
|
-
& .controls {
|
|
203
|
-
display: flex;
|
|
204
|
-
flex-direction: column;
|
|
205
|
-
justify-content: center;
|
|
206
|
-
padding-left: 5px;
|
|
207
|
-
margin-right: -4px;
|
|
208
|
-
border-left: 1px solid var(--knime-silver-sand);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
&::before {
|
|
213
|
-
position: absolute;
|
|
214
|
-
top: 12px;
|
|
215
|
-
left: -6px;
|
|
216
|
-
width: 12px;
|
|
217
|
-
height: 12px;
|
|
218
|
-
content: "";
|
|
219
|
-
background-color: var(--knime-white);
|
|
220
|
-
transform: rotateZ(45deg);
|
|
221
|
-
transition: background-color 0.25s ease;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
&::after {
|
|
225
|
-
position: absolute;
|
|
226
|
-
top: 15px;
|
|
227
|
-
left: -24px;
|
|
228
|
-
width: 6px;
|
|
229
|
-
height: 6px;
|
|
230
|
-
content: "";
|
|
231
|
-
background-color: var(--knime-masala);
|
|
232
|
-
border-radius: 100%;
|
|
233
|
-
box-shadow: 0 0 0 0 transparent;
|
|
234
|
-
transition:
|
|
235
|
-
background-color 0.25s ease,
|
|
236
|
-
box-shadow 0.25s ease;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
&:hover {
|
|
240
|
-
cursor: pointer;
|
|
241
|
-
box-shadow: 0 2px 10px 0 var(--knime-gray-dark-semi);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
&.selected {
|
|
245
|
-
background-color: var(--knime-cornflower-semi);
|
|
246
|
-
|
|
247
|
-
& .left {
|
|
248
|
-
& h6,
|
|
249
|
-
& .date {
|
|
250
|
-
color: var(--knime-cornflower-dark);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
& .controls {
|
|
255
|
-
border-left: 1px solid var(--knime-cornflower-light);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
& .footer-info {
|
|
259
|
-
color: var(--knime-cornflower-dark);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
&::before {
|
|
263
|
-
background-color: var(--knime-cornflower-semi);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
&::after {
|
|
267
|
-
background-color: var(--knime-cornflower);
|
|
268
|
-
box-shadow:
|
|
269
|
-
0 0 0 3px var(--knime-porcelain),
|
|
270
|
-
0 0 0 5px var(--knime-cornflower);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
@media only screen and (width <= 900px) {
|
|
275
|
-
width: calc(100vw - 100px);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
</style>
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from "vue";
|
|
3
|
-
|
|
4
|
-
import { InlineMessage } from "@knime/components";
|
|
5
|
-
|
|
6
|
-
import type { VersionLimit } from "../types";
|
|
7
|
-
|
|
8
|
-
const {
|
|
9
|
-
versionLimit,
|
|
10
|
-
upgradeUrl = undefined,
|
|
11
|
-
isPrivate = false,
|
|
12
|
-
} = defineProps<{
|
|
13
|
-
versionLimit: Required<VersionLimit>;
|
|
14
|
-
upgradeUrl?: string;
|
|
15
|
-
isPrivate?: boolean;
|
|
16
|
-
}>();
|
|
17
|
-
|
|
18
|
-
const isLimitReached = computed(
|
|
19
|
-
() => versionLimit.currentUsage >= versionLimit.limit,
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
const title = computed(() => {
|
|
23
|
-
if (isLimitReached.value) {
|
|
24
|
-
return `You've reached the maximum of ${versionLimit.limit} versions.`;
|
|
25
|
-
} else {
|
|
26
|
-
return `Using ${versionLimit.currentUsage} of ${versionLimit.limit} versions.`;
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<template>
|
|
32
|
-
<InlineMessage variant="info" :title>
|
|
33
|
-
<template v-if="upgradeUrl"><a :href="upgradeUrl">Upgrade</a></template>
|
|
34
|
-
<template v-else>Upgrade</template>
|
|
35
|
-
to use unlimited versions{{ isPrivate ? " for private items." : "." }}
|
|
36
|
-
</InlineMessage>
|
|
37
|
-
</template>
|