@webitel/ui-datalist 1.0.53 → 1.0.54

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.0.53",
3
+ "version": "1.0.54",
4
4
  "description": "Toolkit for building data lists in webitel ui system",
5
5
  "scripts": {
6
6
  "make-all": "npm version patch --git-tag-version false && ( npm run lint:fix || true) && (npm run build:types || true) && npm run utils:publish",
@@ -37,7 +37,7 @@
37
37
  "@vuelidate/validators": "^2.0.4",
38
38
  "@webitel/styleguide": "^24.12.26",
39
39
  "@webitel/ui-sdk": "^25.8.7",
40
- "@webitel/api-services": "^0.0.24",
40
+ "@webitel/api-services": "^0.0.38",
41
41
  "zod": "^3.25.55",
42
42
  "@vueuse/core": "^13.3.0"
43
43
  },
@@ -1,7 +1,6 @@
1
1
  import { RegleBehaviourOptions } from '@regle/core';
2
2
  import { RegleSchemaBehaviourOptions, useRegleSchema } from '@regle/schemas';
3
3
  import { getDefaultsFromZodSchema } from '@webitel/api-services/utils';
4
- // @ts-ignore
5
4
  import { ApiModule } from '@webitel/ui-sdk/src/api/types/ApiModule';
6
5
  import { defineStore } from 'pinia';
7
6
  import { ref, toRaw, watch } from 'vue';
@@ -1,12 +1,14 @@
1
1
  <template>
2
2
  <div class="dynamic-filter-config-view">
3
- <slot
4
- name="activator"
5
- v-bind="{ toggle, disabled: props.disabled }"
6
- />
3
+ <wt-popover>
4
+ <template #activator="{ toggle }">
5
+ <slot
6
+ name="activator"
7
+ v-bind="{ toggle, disabled: props.disabled }"
8
+ />
9
+ </template>
7
10
 
8
- <wt-popover ref="popover">
9
- <template #default>
11
+ <template #default="{ hide }">
10
12
  <slot
11
13
  name="content"
12
14
  v-bind="{ hide }"
@@ -22,7 +24,6 @@
22
24
  * and their styling
23
25
  */
24
26
  import { WtPopover } from '@webitel/ui-sdk/components';
25
- import {useTemplateRef} from "vue";
26
27
 
27
28
  interface Props {
28
29
  disabled?: boolean;
@@ -30,16 +31,6 @@ interface Props {
30
31
  }
31
32
 
32
33
  const props = defineProps<Props>();
33
-
34
- const popover = useTemplateRef('popover');
35
-
36
- const toggle = (event) => {
37
- popover.value.toggle(event);
38
- };
39
-
40
- const hide = () => {
41
- popover.value.hide()
42
- };
43
34
  </script>
44
35
 
45
36
  <style scoped></style>
@@ -1,50 +1,51 @@
1
1
  <template>
2
2
  <dynamic-filter-config-view :disabled="readonly">
3
- <template #activator="{ disabled: configFormVisible, toggle }">
4
- <wt-tooltip
5
- :disabled="configFormVisible"
6
- @update:visible="!localValue && fillLocalValue()"
7
- @click="toggle"
8
- >
9
- <template #activator>
10
- <div @click="toggle">
11
- <wt-chip color="primary">
12
- {{ 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
- </wt-chip>
21
- </div>
22
- </template>
23
-
24
- <template #default>
25
- <dynamic-filter-preview-info>
26
- <template #header>
27
- {{ filterConfig.label }}
28
- </template>
29
-
30
- <template #default>
31
- <slot name="info">
32
- <wt-loader
33
- v-if="!isRenderPreview"
3
+ <template #activator="{ toggle }">
4
+ <div @click="toggle">
5
+ <wt-popover>
6
+ <template #activator="{ show: showCheapPopoverCb, hide: hideCheapPopover }">
7
+ <div
8
+ @pointerenter="(event) => showCheapPopover(event, showCheapPopoverCb)"
9
+ @pointerleave="hideCheapPopover"
10
+ >
11
+ <wt-chip color="primary">
12
+ {{ filter.label || filterConfig.label }}
13
+ <wt-icon-btn
14
+ v-if="!filterConfig.notDeletable && !readonly"
15
+ color="on-primary"
16
+ icon="close--filled"
34
17
  size="sm"
18
+ @mousedown.stop="deleteFilter"
35
19
  />
36
- <component
37
- :is="filterConfig.valuePreviewComponent"
38
- v-else
39
- :filter="props.filter"
40
- :filter-config="filterConfig"
41
- :value="localValue"
42
- />
43
- </slot>
44
- </template>
45
- </dynamic-filter-preview-info>
46
- </template>
47
- </wt-tooltip>
20
+ </wt-chip>
21
+ </div>
22
+ </template>
23
+
24
+ <template #default>
25
+ <dynamic-filter-preview-info>
26
+ <template #header>
27
+ {{ filterConfig.label }}
28
+ </template>
29
+
30
+ <template #default>
31
+ <slot name="info">
32
+ <wt-loader
33
+ v-if="!isRenderPreview"
34
+ size="sm"
35
+ />
36
+ <component
37
+ :is="filterConfig.valuePreviewComponent"
38
+ v-else
39
+ :filter="props.filter"
40
+ :filter-config="filterConfig"
41
+ :value="localValue"
42
+ />
43
+ </slot>
44
+ </template>
45
+ </dynamic-filter-preview-info>
46
+ </template>
47
+ </wt-popover>
48
+ </div>
48
49
  </template>
49
50
 
50
51
  <template #content="{ hide }">
@@ -70,9 +71,9 @@ import {
70
71
  WtChip,
71
72
  WtIconBtn,
72
73
  WtLoader,
73
- WtTooltip,
74
+ WtPopover,
74
75
  } from '@webitel/ui-sdk/components';
75
- import { computed, ref, watch } from 'vue';
76
+ import {computed, ref, useTemplateRef, watch} from 'vue';
76
77
 
77
78
  import { IFilter } from '../../classes/Filter';
78
79
  import { FilterOptionToPreviewApiSearchMethodMap } from '../../modules/filterConfig/components';
@@ -87,6 +88,14 @@ const emit = defineEmits<DynamicFilterEmits>();
87
88
 
88
89
  const localValue = ref();
89
90
 
91
+ const showCheapPopover = (event, showPopoverCb: (event) => void) => {
92
+ if (!localValue.value) {
93
+ fillLocalValue()
94
+ }
95
+
96
+ showPopoverCb(event);
97
+ };
98
+
90
99
  /**
91
100
  * @author @dlohvinov
92
101
  *
@@ -7,24 +7,20 @@ interface Props {
7
7
  disabled?: boolean;
8
8
  disableClickAway?: boolean;
9
9
  }
10
- declare const toggle: (event: any) => void;
11
- declare const hide: () => void;
12
10
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
13
- declare var __VLS_1: {
14
- toggle: (event: any) => void;
11
+ declare var __VLS_5: {
12
+ toggle: any;
15
13
  disabled: boolean;
16
- }, __VLS_9: {
17
- hide: () => void;
14
+ }, __VLS_7: {
15
+ hide: any;
18
16
  };
19
17
  type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
20
- activator?: (props: typeof __VLS_1) => any;
18
+ activator?: (props: typeof __VLS_5) => any;
21
19
  } & {
22
- content?: (props: typeof __VLS_9) => any;
20
+ content?: (props: typeof __VLS_7) => any;
23
21
  }>;
24
22
  declare const __VLS_self: import("vue").DefineComponent<Props, {
25
23
  WtPopover: typeof WtPopover;
26
- toggle: typeof toggle;
27
- hide: typeof hide;
28
24
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
29
25
  declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
30
26
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -1,42 +1,35 @@
1
- import { WtChip, WtIconBtn, WtLoader, WtTooltip } from '@webitel/ui-sdk/components';
1
+ import { WtChip, WtIconBtn, WtLoader, WtPopover } from '@webitel/ui-sdk/components';
2
2
  import { IFilter } from '../../classes/Filter';
3
3
  import DynamicFilterConfigForm from '../config/dynamic-view/dynamic-filter-config-form.vue';
4
4
  import DynamicFilterConfigView from '../config/dynamic-view/dynamic-filter-config-view.vue';
5
5
  import { DynamicFilterProps } from '../types/Filter.types';
6
6
  import DynamicFilterPreviewInfo from './dynamic-filter-preview-info.vue';
7
7
  declare const localValue: import("vue").Ref<any, any>;
8
- /**
9
- * @author @dlohvinov
10
- *
11
- * @description
12
- * loading filters preview data -> main preview component
13
- * instead of tooltip-components to avoid api requests spam
14
- */
15
- declare const fillLocalValue: (filter?: IFilter) => Promise<void>;
8
+ declare const showCheapPopover: (event: any, showPopoverCb: (event: any) => void) => void;
16
9
  declare const isRenderPreview: import("vue").ComputedRef<any>;
17
10
  declare const submit: (filter: IFilter, { hide }: {
18
11
  hide: any;
19
12
  }) => void;
20
13
  declare const deleteFilter: () => void;
21
14
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
22
- declare var __VLS_29: {}, __VLS_39: {
23
- hide: () => void;
15
+ declare var __VLS_24: {}, __VLS_34: {
16
+ hide: any;
24
17
  };
25
18
  type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
26
- info?: (props: typeof __VLS_29) => any;
19
+ info?: (props: typeof __VLS_24) => any;
27
20
  } & {
28
- form?: (props: typeof __VLS_39) => any;
21
+ form?: (props: typeof __VLS_34) => any;
29
22
  }>;
30
23
  declare const __VLS_self: import("vue").DefineComponent<DynamicFilterProps, {
31
24
  WtChip: typeof WtChip;
32
25
  WtIconBtn: typeof WtIconBtn;
33
26
  WtLoader: typeof WtLoader;
34
- WtTooltip: typeof WtTooltip;
27
+ WtPopover: typeof WtPopover;
35
28
  DynamicFilterConfigForm: typeof DynamicFilterConfigForm;
36
29
  DynamicFilterConfigView: typeof DynamicFilterConfigView;
37
30
  DynamicFilterPreviewInfo: typeof DynamicFilterPreviewInfo;
38
31
  localValue: typeof localValue;
39
- fillLocalValue: typeof fillLocalValue;
32
+ showCheapPopover: typeof showCheapPopover;
40
33
  isRenderPreview: typeof isRenderPreview;
41
34
  submit: typeof submit;
42
35
  deleteFilter: typeof deleteFilter;