@webitel/ui-sdk 24.10.78 → 24.10.80

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "24.10.78",
3
+ "version": "24.10.80",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -25,6 +25,7 @@
25
25
  >
26
26
  <wt-icon-action
27
27
  :action="action"
28
+ :disabled="props[`disabled:${action}`]"
28
29
  @click="emit(`click:${action}`)"
29
30
  />
30
31
  </slot>
@@ -81,6 +82,21 @@ const props = defineProps({
81
82
  type: Array,
82
83
  default: () => [],
83
84
  },
85
+
86
+ /**
87
+ * Built dynamically on `disabled:[IconAction]` pattern for all available [IconActions](../../enums/IconAction/Readme.md).
88
+ */
89
+
90
+ disabled: { // Not implemented, but can be used to disable all actions
91
+ type: Boolean,
92
+ default: false,
93
+ },
94
+
95
+ ...Object.values(IconAction).reduce((acc, action) => {
96
+ acc[`disabled:${action}`] = { type: Boolean, default: false };
97
+ return acc;
98
+ }, {}),
99
+
84
100
  });
85
101
  const emit = defineEmits([
86
102
  /**
@@ -33,7 +33,7 @@ export const useCardComponent = (params) => {
33
33
  const redirectToEdit = () => {
34
34
  return router.replace({
35
35
  ...route,
36
- params: { id },
36
+ params: { id: id?.value },
37
37
  });
38
38
  };
39
39
 
@@ -46,7 +46,7 @@ export const useCardComponent = (params) => {
46
46
  await updateItem();
47
47
  }
48
48
 
49
- if (id.value) {
49
+ if (id?.value) {
50
50
  await redirectToEdit();
51
51
  }
52
52
  };