@webitel/ui-sdk 24.12.87 → 24.12.89
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 +6 -0
- package/dist/ui-sdk.js +229 -229
- package/dist/ui-sdk.umd.cjs +2 -2
- package/package.json +1 -1
- package/src/composables/useWtTable/useWtTable.js +20 -19
- package/src/composables/useWtTable/useWtTable.ts +1 -1
- package/src/locale/en/en.js +1 -0
- package/src/locale/ru/ru.js +1 -0
- package/src/locale/ua/ua.js +1 -0
package/package.json
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { computed } from 'vue';
|
|
2
2
|
import { useI18n } from 'vue-i18n';
|
|
3
3
|
export const useWtTable = ({ headers }) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
4
|
+
const { t } = useI18n();
|
|
5
|
+
const tableHeaders = computed(() => {
|
|
6
|
+
return headers
|
|
7
|
+
.filter((header) => header.show === undefined || header.show)
|
|
8
|
+
.map((header) => {
|
|
9
|
+
if (!header.text && header.locale) {
|
|
10
|
+
return {
|
|
11
|
+
...header,
|
|
12
|
+
text:
|
|
13
|
+
typeof header.locale === 'string'
|
|
14
|
+
? t(header.locale)
|
|
15
|
+
: t(...header.locale),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return header;
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
tableHeaders,
|
|
23
|
+
};
|
|
23
24
|
};
|
package/src/locale/en/en.js
CHANGED
package/src/locale/ru/ru.js
CHANGED