@knime/hub-features 1.6.0 → 1.6.2

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @knime/hub-features
2
2
 
3
+ ## 1.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [93103f5]
8
+ - @knime/components@1.22.2
9
+
10
+ ## 1.6.1
11
+
12
+ ### Patch Changes
13
+
14
+ - b4fbdb4: Miscellaneous VersionManager internal component fix
15
+ - Updated dependencies [4cc131a]
16
+ - @knime/components@1.22.1
17
+
3
18
  ## 1.6.0
4
19
 
5
20
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knime/hub-features",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Vue components & composables for shared hub features",
5
5
  "homepage": "https://knime.github.io/webapps-common/",
6
6
  "license": "GPL 3 and Additional Permissions according to Sec. 7 (SEE the file LICENSE)",
@@ -31,7 +31,7 @@
31
31
  "lodash-es": "4.17.21",
32
32
  "ofetch": "^1.4.1",
33
33
  "typescript": "^5.4.5",
34
- "@knime/components": "1.22.0",
34
+ "@knime/components": "1.22.2",
35
35
  "@knime/styles": "1.3.1",
36
36
  "@knime/utils": "1.3.2"
37
37
  },
@@ -43,7 +43,7 @@
43
43
  "@vitejs/plugin-vue": "^5.1.4",
44
44
  "@vue/test-utils": "2.4.6",
45
45
  "consola": "3.2.3",
46
- "vite": "5.4.12",
46
+ "vite": "5.4.15",
47
47
  "vite-svg-loader": "5.1.0",
48
48
  "vue-tsc": "2.2.0"
49
49
  },
@@ -13,6 +13,7 @@ import type { ItemSavepoint, WithAvatar, WithLabels } from "./types";
13
13
  const props = defineProps<{
14
14
  isSelected: boolean;
15
15
  hasEditCapability: boolean;
16
+ hasPreviousVersion: boolean;
16
17
  currentStateSavepoint: ItemSavepoint & WithAvatar & WithLabels;
17
18
  }>();
18
19
 
@@ -23,7 +24,7 @@ const emit = defineEmits<{
23
24
  }>();
24
25
 
25
26
  const menuItems = computed(() => {
26
- return props.hasEditCapability
27
+ return props.hasEditCapability && props.hasPreviousVersion
27
28
  ? [
28
29
  {
29
30
  text: "Discard",
@@ -69,7 +70,7 @@ const onMenuItemClick = (_: Event, item: (typeof menuItems.value)[number]) => {
69
70
  with-border
70
71
  compact
71
72
  class="create-button"
72
- @click="$emit('createVersion')"
73
+ @click.stop="$emit('createVersion')"
73
74
  >
74
75
  Create version
75
76
  </Button>
@@ -61,7 +61,8 @@ const closeLabelPopovers = throttle(() => {
61
61
  class="changes"
62
62
  >
63
63
  <CurrentState
64
- :has-edit-capability
64
+ :has-edit-capability="hasEditCapability"
65
+ :has-previous-version="versionHistory.length > 0"
65
66
  :is-selected="currentVersion === CURRENT_STATE_VERSION"
66
67
  :current-state-savepoint="unversionedSavepoint"
67
68
  @select="$emit('select', CURRENT_STATE_VERSION)"
@@ -36,7 +36,7 @@ defineEmits<{
36
36
  class="version-item"
37
37
  @delete="$emit('delete', itemVersion.version)"
38
38
  @restore="$emit('restore', itemVersion.version)"
39
- @select="$emit('select', $event)"
39
+ @select="$emit('select', $event ? itemVersion.version : null)"
40
40
  />
41
41
  <NoVersionItem v-if="!loading && versionHistory.length === 0" />
42
42
  </div>
@@ -21,7 +21,7 @@ const props = defineProps<{
21
21
  }>();
22
22
 
23
23
  const emit = defineEmits<{
24
- select: [version: NamedItemVersion["version"] | null];
24
+ select: [selectionStatus: boolean];
25
25
  delete: [];
26
26
  restore: [];
27
27
  }>();
@@ -50,11 +50,7 @@ const isDescriptionTruncated = computed(
50
50
  const isDescriptionExpanded = ref(false);
51
51
 
52
52
  const toggleVersionSelection = () => {
53
- if (props.isSelected) {
54
- emit("select", null);
55
- } else {
56
- emit("select", props.version.version);
57
- }
53
+ emit("select", !props.isSelected);
58
54
  };
59
55
 
60
56
  const menuItems = computed(() =>