@webitel/ui-sdk 24.10.79 → 24.10.81

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.79",
3
+ "version": "24.10.81",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -112,12 +112,14 @@ const getList = async (params) => {
112
112
  id,
113
113
  qin,
114
114
  );
115
- const { data, next } = applyTransform(response.data, [
115
+
116
+ const { items, next } = applyTransform({ ...response.data, items: response.data.data || [] }, [
116
117
  snakeToCamel(),
117
118
  merge(getDefaultGetListResponse()),
118
119
  ]);
120
+
119
121
  return {
120
- items: applyTransform(data, [(items) => items?.map((item) => formatAccessMode(item)), listResponseHandler]),
122
+ items: applyTransform(items, [(items) => items?.map((item) => formatAccessMode(item)), listResponseHandler]),
121
123
  next,
122
124
  };
123
125
  } catch (err) {
@@ -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
  /**