@webitel/ui-sdk 0.9.39 → 0.9.43

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.39",
3
+ "version": "0.9.43",
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
  });
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <wt-select
3
- :value="filterSchema.value"
3
+ :value="value"
4
4
  :options="localizedOptions"
5
5
  :label="$t(filterSchema.locale.label)"
6
6
  :track-by="filterSchema.storedProp"
@@ -3,7 +3,7 @@
3
3
  :value="filterSchema.value"
4
4
  debounce
5
5
  @input="setValue({ filter: filterQuery, value: $event })"
6
- @search="setValueToQuery({ filter: filterQuery, value: $event })"
6
+ @search="setValueToQuery({ filterQuery, value: $event })"
7
7
  :placeholder="$t('reusable.search')"
8
8
  />
9
9
  </template>
@@ -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
  };
@@ -33,11 +33,11 @@ export default {
33
33
  restoreValue(value) {
34
34
  let newValue;
35
35
  if (Array.isArray(value)) {
36
- newValue = this.options
36
+ newValue = this.localizedOptions
37
37
  .filter((option) => value
38
38
  .some((value) => value === option[this.storedProp]));
39
39
  } else {
40
- newValue = this.options
40
+ newValue = this.localizedOptions
41
41
  .find((option) => value === option[this.storedProp]);
42
42
  }
43
43
  this.setValue({ filter: this.filterQuery, value: newValue });