@webitel/ui-datalist 1.1.72 → 1.1.74

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": "1.1.72",
3
+ "version": "1.1.74",
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",
@@ -2,6 +2,8 @@ import type { RegleShortcutDefinition } from '@regle/core';
2
2
  import type { RegleSchema } from '@regle/schemas';
3
3
  import { computed, type Ref } from 'vue';
4
4
 
5
+ import type { CardValidationFields } from '../types/CardValidationFields.types';
6
+
5
7
  export const useCardValidation = <
6
8
  // biome-ignore lint/suspicious/noExplicitAny: matches RegleSchema's own state constraint
7
9
  TState extends Record<string, any>,
@@ -16,7 +18,11 @@ export const useCardValidation = <
16
18
  });
17
19
 
18
20
  const validationFields = computed(() => {
19
- return validationSchema.value.r$.$fields;
21
+ // Regle types $fields as a union with an empty-object arm to also
22
+ // support discriminated-union state shapes; TState here is always a
23
+ // plain card entity, so that arm never applies — narrow it away once,
24
+ // here, instead of at every card component consuming this composable.
25
+ return validationSchema.value.r$.$fields as CardValidationFields<TState>;
20
26
  });
21
27
 
22
28
  const hasValidationErrors = computed(() => {
@@ -8,15 +8,12 @@
8
8
  @pointerenter="(event) => showChipPopover(event, showChipPopoverCb)"
9
9
  @pointerleave="hideChipPopover"
10
10
  >
11
- <wt-chip color="primary">
11
+ <wt-chip
12
+ color="primary"
13
+ :removable="!filterConfig.notDeletable && !readonly"
14
+ @remove.stop="deleteFilter"
15
+ >
12
16
  {{ filter.label || filterConfig.label }}
13
- <wt-icon-btn
14
- v-if="!filterConfig.notDeletable && !readonly"
15
- color="on-primary"
16
- icon="close--filled"
17
- size="sm"
18
- @mousedown.stop="deleteFilter"
19
- />
20
17
  </wt-chip>
21
18
  </div>
22
19
  </template>
@@ -67,12 +64,7 @@
67
64
  </template>
68
65
 
69
66
  <script lang="ts" setup>
70
- import {
71
- WtChip,
72
- WtIconBtn,
73
- WtLoader,
74
- WtPopover,
75
- } from '@webitel/ui-sdk/components';
67
+ import { WtChip, WtLoader, WtPopover } from '@webitel/ui-sdk/components';
76
68
  import { computed, ref, watch } from 'vue';
77
69
 
78
70
  import { FilterInitParams } from '../../classes/Filter';