@webitel/ui-sdk 0.9.36 → 0.9.40

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": "0.9.36",
3
+ "version": "0.9.40",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -44,6 +44,6 @@ describe('Search Filter', () => {
44
44
  const setValueMock = jest.fn();
45
45
  jest.spyOn(baseFilterMixin.methods, 'setValue').mockImplementationOnce(setValueMock);
46
46
  shallowMount(SearchFilter, mountOptions);
47
- expect(setValueMock).toHaveBeenCalledWith({ filterQuery, value: search });
47
+ expect(setValueMock).toHaveBeenCalledWith({ filter: filterQuery, value: search });
48
48
  });
49
49
  });
@@ -29,8 +29,9 @@ export default {
29
29
  search(params) {
30
30
  return this.filterSchema.search(params);
31
31
  },
32
- fetchSelected(...args) {
33
- return this.filterSchema.fetchSelected(...args);
32
+ async fetchSelected(...args) {
33
+ const { items = [] } = await this.filterSchema.fetchSelected(...args);
34
+ return items;
34
35
  },
35
36
  },
36
37
  };
@@ -22,7 +22,7 @@ export default {
22
22
  },
23
23
  methods: {
24
24
  restoreValue(value) {
25
- this.setValue({ filterQuery: this.filterQuery, value });
25
+ this.setValue({ filter: this.filterQuery, value });
26
26
  },
27
27
  },
28
28
  };
@@ -21,7 +21,10 @@ export default {
21
21
  localizedOptions() {
22
22
  const optsHaveLocale = this.options.length && this.options[0].locale; // just check 1st el
23
23
  if (optsHaveLocale) {
24
- return this.options.map((opt) => ({ ...opt, name: this.$t(opt.locale) }));
24
+ return this.options.map((opt) => ({
25
+ ...opt,
26
+ name: Array.isArray(opt.locale) ? this.$tc(...opt.locale) : this.$t(opt.locale),
27
+ }));
25
28
  }
26
29
  return this.options;
27
30
  },