@webitel/ui-sdk 2.0.3-2 → 2.0.3-3

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": "2.0.3-2",
3
+ "version": "2.0.3-3",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <wt-select
3
3
  :value="filterSchema.value"
4
- :label="$t(filterSchema.locale.label)"
4
+ :label="label"
5
5
  :track-by="filterSchema.storedProp"
6
6
  :multiple="filterSchema.multiple"
7
7
  :search-method="search"
@@ -2,7 +2,7 @@
2
2
  <wt-select
3
3
  :value="value"
4
4
  :options="localizedOptions"
5
- :label="$t(filterSchema.locale.label)"
5
+ :label="label"
6
6
  :track-by="filterSchema.storedProp"
7
7
  :multiple="filterSchema.multiple"
8
8
  v-bind="$attrs"
@@ -15,6 +15,11 @@ export default {
15
15
  closeOnSelect() {
16
16
  return this.filterSchema?.storedProp;
17
17
  },
18
+ label() {
19
+ return Array.isArray(this.locale.label)
20
+ ? this.$tc(...this.locale.label)
21
+ : this.$t(this.locale.label);
22
+ },
18
23
  },
19
24
  methods: {
20
25
  async restoreValue(id) {
@@ -18,6 +18,11 @@ export default {
18
18
  closeOnSelect() {
19
19
  return this.filterSchema?.storedProp;
20
20
  },
21
+ label() {
22
+ return Array.isArray(this.locale.label)
23
+ ? this.$tc(...this.locale.label)
24
+ : this.$t(this.locale.label);
25
+ },
21
26
  localizedOptions() {
22
27
  const optsHaveLocale = this.options.length && this.options[0].locale; // just check 1st el
23
28
  if (optsHaveLocale) {