@webitel/ui-sdk 24.12.4 → 24.12.6

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": "24.12.4",
3
+ "version": "24.12.6",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -100,7 +100,7 @@
100
100
  "src/plugins/*",
101
101
  "src/store/*",
102
102
  "src/tests/*",
103
- "src/install.js",
103
+ "src/install.ts",
104
104
  "CHANGELOG.md"
105
105
  ],
106
106
  "dependencies": {
@@ -137,11 +137,14 @@
137
137
  },
138
138
  "devDependencies": {
139
139
  "@biomejs/biome": "1.9.4",
140
+ "@tsconfig/node22": "^22.0.0",
141
+ "@types/node": "^22.9.1",
140
142
  "@vitejs/plugin-vue": "^5.2.0",
141
143
  "@vitest/coverage-v8": "^2.1.5",
142
144
  "@vue/compat": "^3.5.13",
143
145
  "@vue/compiler-sfc": "^3.5.13",
144
146
  "@vue/test-utils": "^2.4.6",
147
+ "@vue/tsconfig": "^0.6.0",
145
148
  "globby": "^14.0.2",
146
149
  "happy-dom": "^15.11.6",
147
150
  "markdown-it": "^14.1.0",
@@ -151,7 +154,10 @@
151
154
  "postcss-prefix-selector": "^2.1.0",
152
155
  "prismjs": "^1.29.0",
153
156
  "sass": "^1.81.0",
157
+ "typescript": "5.6.3",
158
+ "typescript-plugin-css-modules": "^5.1.0",
154
159
  "vite": "^5.4.11",
160
+ "vite-plugin-checker": "^0.8.0",
155
161
  "vite-plugin-node-polyfills": "^0.22.0",
156
162
  "vite-plugin-static-copy": "^2.1.0",
157
163
  "vite-plugin-svg-sprite": "^0.5.2",
@@ -159,6 +165,7 @@
159
165
  "vitepress": "1.5.0",
160
166
  "vitest": "^2.1.5",
161
167
  "vue": "^3.5.13",
168
+ "vue-tsc": "^2.1.10",
162
169
  "vuex": "^4.1.0"
163
170
  },
164
171
  "optionalDependencies": {
@@ -124,7 +124,7 @@
124
124
 
125
125
  import { computed, useSlots } from 'vue';
126
126
  import ComponentSize from '../../enums/ComponentSize/ComponentSize.enum.js';
127
- import { greaterOrEqual, smallerOrEqual } from '../../scripts/compareSize.js';
127
+ import { greaterOrEqual, smallerOrEqual } from '../../scripts/compareSize.ts';
128
128
  import WtImage from '../wt-image/wt-image.vue';
129
129
 
130
130
  const props = defineProps({
@@ -14,17 +14,19 @@
14
14
  </button>
15
15
  </template>
16
16
 
17
- <script setup>
17
+ <script setup lang="ts">
18
18
  import WtIcon from '../wt-icon/wt-icon.vue';
19
19
 
20
- const props = defineProps({
21
- disabled: {
22
- type: Boolean,
23
- default: false,
24
- },
25
- });
20
+ const {
21
+ disabled = false,
22
+ } = defineProps<{
23
+ disabled?: boolean
24
+ }>();
26
25
 
27
- const emit = defineEmits(['click', 'mousedown']);
26
+ const emit = defineEmits<{
27
+ click: MouseEvent[]
28
+ mousedown: MouseEvent[]
29
+ }>();
28
30
  </script>
29
31
 
30
32
  <style lang="scss">
@@ -87,7 +87,8 @@ export default {
87
87
  },
88
88
 
89
89
  async setFrom(value) {
90
- const filterValue = { from: value, to: this.value.to };
90
+ const from = value ? value : null; // if value is empty, set it to null
91
+ const filterValue = { from, to: this.value.to };
91
92
  await this.setValue({ filter: this.filterQuery, value: filterValue });
92
93
  await this.setValueToQuery({
93
94
  filterQuery: `${this.filterQuery}From`,
@@ -96,7 +97,8 @@ export default {
96
97
  },
97
98
 
98
99
  async setTo(value) {
99
- const filterValue = { from: this.value.from, to: value };
100
+ const to = value ? value : null; // if value is empty, set it to null
101
+ const filterValue = { from: this.value.from, to };
100
102
  await this.setValue({ filter: this.filterQuery, value: filterValue });
101
103
  await this.setValueToQuery({
102
104
  filterQuery: `${this.filterQuery}To`,
@@ -1,5 +1,13 @@
1
1
  import ComponentSize from '../enums/ComponentSize/ComponentSize.enum.js';
2
2
 
3
+ export enum eComponentSize {
4
+ XS = 'xs',
5
+ SM = 'sm',
6
+ MD = 'md',
7
+ LG = 'lg',
8
+ XL = 'xl',
9
+ }
10
+
3
11
  const numerics = Object.values(ComponentSize).reduce((nums, size, index) => {
4
12
  return {
5
13
  ...nums,
@@ -59,6 +67,6 @@ export const greaterThen = (s1, s2) => {
59
67
  * @param s2
60
68
  * @returns {boolean}
61
69
  */
62
- export const greaterOrEqual = (s1, s2) => {
70
+ export const greaterOrEqual = (s1: eComponentSize, s2: eComponentSize): boolean => {
63
71
  return compareSize(s1, s2) >= 0;
64
72
  };
@@ -19,7 +19,7 @@ import {
19
19
  greaterOrEqual as sizeGreaterOrEqual,
20
20
  smallerThen as sizeSmallerThen,
21
21
  greaterThen as sizeGreaterThen,
22
- } from './compareSize.js';
22
+ } from './compareSize.ts';
23
23
  import {
24
24
  camelToSnake,
25
25
  camelToKebab,
File without changes