@knime/hub-features 1.12.3 → 1.12.5

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,18 @@
1
1
  # @knime/hub-features
2
2
 
3
+ ## 1.12.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 70f61b3: Version panel emitting unsaved changes from Creation form
8
+
9
+ ## 1.12.4
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [e1c15d1]
14
+ - @knime/components@1.35.0
15
+
3
16
  ## 1.12.3
4
17
 
5
18
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knime/hub-features",
3
- "version": "1.12.3",
3
+ "version": "1.12.5",
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.8.3",
34
- "@knime/components": "1.34.3",
34
+ "@knime/components": "1.35.0",
35
35
  "@knime/styles": "1.11.0",
36
36
  "@knime/utils": "1.5.4"
37
37
  },
@@ -18,7 +18,7 @@ withDefaults(defineProps<Props>(), { isCreationPending: false });
18
18
 
19
19
  const emit = defineEmits<{
20
20
  create: [{ name: string; description: string }];
21
- cancel: [];
21
+ cancel: [hasUnsavedChanges: boolean];
22
22
  }>();
23
23
 
24
24
  const versionName = ref("");
@@ -39,6 +39,10 @@ const isVersionNameInvalid = computed(() => {
39
39
  return versionName.value.length <= 0 && doValidate.value;
40
40
  });
41
41
 
42
+ const hasUnsavedChanges = computed(() => {
43
+ return versionName.value !== "" || versionDescription.value !== "";
44
+ });
45
+
42
46
  const onCreate = async () => {
43
47
  doValidate.value = true;
44
48
  await nextTick();
@@ -77,7 +81,7 @@ const onCreate = async () => {
77
81
  with-border
78
82
  compact
79
83
  class="button cancel"
80
- @click="$emit('cancel')"
84
+ @click="$emit('cancel', hasUnsavedChanges)"
81
85
  >
82
86
  <strong>Cancel</strong>
83
87
  </Button>