@webitel/ui-datalist 26.8.29 → 26.12.1
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-datalist",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.12.1",
|
|
4
4
|
"description": "Toolkit for building data lists in webitel ui system",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:types": "vue-tsc -b tsconfig.build.json",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"@vuelidate/core": "^2.0.3",
|
|
40
40
|
"@vuelidate/validators": "^2.0.4",
|
|
41
41
|
"@vueuse/core": "^14.0",
|
|
42
|
-
"@webitel/api-services": "~26.
|
|
43
|
-
"@webitel/styleguide": "~26.
|
|
44
|
-
"@webitel/ui-sdk": "~26.
|
|
42
|
+
"@webitel/api-services": "~26.12",
|
|
43
|
+
"@webitel/styleguide": "~26.12",
|
|
44
|
+
"@webitel/ui-sdk": "~26.12",
|
|
45
45
|
"axios": "^1.15.2",
|
|
46
46
|
"date-fns": "^4",
|
|
47
47
|
"lodash-es": "^4.17.21",
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
caseCloseFieldsChecks,
|
|
7
7
|
caseSchema,
|
|
8
8
|
queueSchema,
|
|
9
|
+
resourceSchema,
|
|
9
10
|
} from '@webitel/api-services/validations';
|
|
10
11
|
import { describe, expect, it } from 'vitest';
|
|
11
12
|
import { effectScope, nextTick, ref } from 'vue';
|
|
@@ -134,3 +135,34 @@ describe('card validation of the close reason on a new final case', () => {
|
|
|
134
135
|
expect(r$.$fields.closeResult.$error).toBe(true);
|
|
135
136
|
});
|
|
136
137
|
});
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* [Claude] A required lookup cleared by the select becomes `{}`. regle builds a
|
|
141
|
+
* nested status for it, so the required issue has to land on `id` — otherwise
|
|
142
|
+
* the field shows no error and save stays enabled.
|
|
143
|
+
*
|
|
144
|
+
* [WTEL-10632](https://webitel.atlassian.net/browse/WTEL-10632)
|
|
145
|
+
*/
|
|
146
|
+
describe('card validation of a cleared required lookup', () => {
|
|
147
|
+
it('reports a cleared resource gateway on the field', async () => {
|
|
148
|
+
const state = ref({
|
|
149
|
+
...getDefaultsFromZodSchema(resourceSchema, {}),
|
|
150
|
+
name: 'a resource',
|
|
151
|
+
gateway: {},
|
|
152
|
+
});
|
|
153
|
+
const scope = effectScope(true);
|
|
154
|
+
// biome-ignore lint/suspicious/noExplicitAny: regle's inferred state type
|
|
155
|
+
let r$: any;
|
|
156
|
+
|
|
157
|
+
scope.run(() => {
|
|
158
|
+
({ r$ } = useRegleSchema(state, resourceSchema as never));
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const result = await r$.$validate();
|
|
162
|
+
|
|
163
|
+
expect(result.valid).toBe(false);
|
|
164
|
+
expect(r$.$error).toBe(true);
|
|
165
|
+
expect(r$.$fields.gateway.$error).toBe(true);
|
|
166
|
+
expect(r$.$fields.gateway.$errors.id).toHaveLength(1);
|
|
167
|
+
});
|
|
168
|
+
});
|