@webitel/ui-sdk 2.0.3-1 → 2.0.3-4

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-1",
3
+ "version": "2.0.3-4",
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"
@@ -71,7 +71,6 @@ export default {
71
71
  const queryValue = this.$route.query[`${this.filterQuery}To`];
72
72
  // this.value.to = +queryValue || to;
73
73
  const value = { from: this.value.from, to: +queryValue || to };
74
- console.info(value);
75
74
  this.setValue({ filter: this.filterQuery, value });
76
75
  },
77
76
 
@@ -101,11 +100,6 @@ export default {
101
100
 
102
101
  <style lang="scss" scoped>
103
102
  .filter-from-to {
104
-
105
- & > .wt-label {
106
- margin-bottom: 10px;
107
- }
108
-
109
103
  &:hover > .wt-label {
110
104
  color: var(--form-label--hover-color);
111
105
  }
@@ -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) {