@webitel/ui-datalist 26.8.11 → 26.8.13
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 +1 -1
- package/src/modules/filters/components/config/dynamic-view/dynamic-filter-config-form.vue +1 -0
- package/src/modules/filters/components/config/static-view/__tests__/static-filter-field.spec.ts +127 -0
- package/src/modules/filters/components/config/static-view/static-filter-field.vue +17 -2
- package/src/modules/filters/components/search-bar/__tests__/dynamic-filter-search.spec.ts +97 -0
- package/src/modules/filters/components/search-bar/dynamic-filter-search.vue +7 -5
- package/src/modules/filters/composables/useFilterConfigsToolkit.ts +5 -5
- package/src/modules/filters/composables/useFilterValueChange.ts +1 -10
- package/src/modules/filters/modules/filterConfig/classes/FilterConfig.ts +9 -1
- package/src/modules/filters/modules/filterConfig/components/_shared/date-time-filter/date-time-options/__tests__/date-time-options-filter-value-field.spec.ts +43 -0
- package/src/modules/filters/modules/filterConfig/components/_shared/date-time-filter/date-time-options/date-time-options-filter-value-field.vue +81 -43
- package/src/modules/filters/modules/filterConfig/components/_shared/date-time-filter/filterConfig.ts +27 -0
- package/src/modules/filters/modules/filterConfig/components/_shared/string-filter/string-filter-value-field.vue +11 -2
- package/src/modules/filters/modules/filterConfig/components/agent/agent-filter-value-field.vue +6 -7
- package/src/modules/filters/modules/filterConfig/components/rating/rating-from-to-filter-value-field.vue +33 -7
- package/src/modules/filters/modules/filterConfig/index.ts +2 -1
- package/types/.tsbuildinfo +1 -1
- package/types/modules/filters/composables/useFilterValueChange.d.ts +0 -10
- package/types/modules/filters/modules/filterConfig/classes/FilterConfig.d.ts +5 -1
- package/types/modules/filters/modules/filterConfig/components/_shared/date-time-filter/date-time-options/date-time-options-filter-value-field.vue.d.ts +10 -0
- package/types/modules/filters/modules/filterConfig/components/_shared/date-time-filter/filterConfig.d.ts +7 -0
- package/types/modules/filters/modules/filterConfig/components/_shared/string-filter/string-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/agent/agent-filter-value-field.vue.d.ts +2 -2
- package/types/modules/filters/modules/filterConfig/components/rating/rating-from-to-filter-value-field.vue.d.ts +5 -3
- package/types/modules/filters/modules/filterConfig/index.d.ts +2 -1
|
@@ -3,16 +3,6 @@ import type { FilterValue, IFilter } from '../classes/Filter';
|
|
|
3
3
|
import type { StaticFilterEmits } from '../components/types/Filter.types';
|
|
4
4
|
import type { AnyFilterConfig } from '../modules/filterConfig';
|
|
5
5
|
type StaticFilterEmit = <K extends keyof StaticFilterEmits>(event: K, ...args: StaticFilterEmits[K]) => void;
|
|
6
|
-
/**
|
|
7
|
-
* Turns a new filter value into the right manager event:
|
|
8
|
-
* - empty value (except booleans) → `delete:filter` (only if the filter exists)
|
|
9
|
-
* - no filter yet → `add:filter`
|
|
10
|
-
* - filter exists → `update:filter`, keeping its label
|
|
11
|
-
*
|
|
12
|
-
* Shared by the static filter field and the column filter.
|
|
13
|
-
*
|
|
14
|
-
* [WTEL-7727](https://webitel.atlassian.net/browse/WTEL-7727)
|
|
15
|
-
*/
|
|
16
6
|
export declare const useFilterValueChange: ({ filterConfig, filter, emit, }: {
|
|
17
7
|
filterConfig: MaybeRefOrGetter<AnyFilterConfig>;
|
|
18
8
|
filter: MaybeRefOrGetter<IFilter | undefined>;
|
|
@@ -7,6 +7,7 @@ export interface BaseFilterConfig {
|
|
|
7
7
|
valuePreviewComponent: Component;
|
|
8
8
|
label?: ReturnType<MessageResolver> | string;
|
|
9
9
|
notDeletable?: boolean;
|
|
10
|
+
showFilterName?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export type FilterConfigBaseParams = {
|
|
12
13
|
name?: FilterName;
|
|
@@ -40,7 +41,10 @@ export type FilterConfigSearchMethodParams = [
|
|
|
40
41
|
filterConfig?: BaseFilterConfig;
|
|
41
42
|
}?
|
|
42
43
|
];
|
|
43
|
-
export
|
|
44
|
+
export interface IDateRangeFilterConfig extends BaseFilterConfig {
|
|
45
|
+
readonly hidePresets: boolean;
|
|
46
|
+
}
|
|
47
|
+
export type AnyFilterConfig = IWtSysTypeFilterConfig | IDateRangeFilterConfig | BaseFilterConfig;
|
|
44
48
|
/**
|
|
45
49
|
* Loose shapes forwarded into filter-config lookup calls by
|
|
46
50
|
* dynamic-filter-preview.vue and wt-select options loading. The callers pass
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { RelativeDatetimeValue } from '@webitel/ui-sdk/enums';
|
|
2
|
+
import type { IDateRangeFilterConfig } from '../../../../classes/FilterConfig';
|
|
2
3
|
type __VLS_Props = {
|
|
4
|
+
filterConfig?: IDateRangeFilterConfig;
|
|
3
5
|
disableValidation?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @description
|
|
8
|
+
* Suppresses the preselected preset. The static filters panel lists every
|
|
9
|
+
* configured filter, so a field that seeds itself would apply a filter the
|
|
10
|
+
* user never set.
|
|
11
|
+
*/
|
|
12
|
+
disableDefaultValue?: boolean;
|
|
13
|
+
staticView?: boolean;
|
|
4
14
|
};
|
|
5
15
|
type __VLS_ModelProps = {
|
|
6
16
|
modelValue?: RelativeDatetimeValue | {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FilterConfig, type FilterConfigBaseParams, type IDateRangeFilterConfig } from '../../../classes/FilterConfig';
|
|
2
|
+
declare class DateRangeFilterConfig extends FilterConfig implements IDateRangeFilterConfig {
|
|
3
|
+
readonly hidePresets = true;
|
|
4
|
+
constructor(params: FilterConfigBaseParams);
|
|
5
|
+
}
|
|
6
|
+
export type { DateRangeFilterConfig };
|
|
7
|
+
export declare const createDateRangeFilterConfig: (params: FilterConfigBaseParams) => DateRangeFilterConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BaseFilterConfig } from '../../classes/FilterConfig';
|
|
2
2
|
type ModelValue = number[];
|
|
3
3
|
type __VLS_Props = {
|
|
4
|
-
filterConfig?:
|
|
4
|
+
filterConfig?: BaseFilterConfig;
|
|
5
5
|
disableValidation?: boolean;
|
|
6
6
|
};
|
|
7
7
|
type __VLS_ModelProps = {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
type
|
|
2
|
-
disableValidation?: boolean;
|
|
3
|
-
};
|
|
1
|
+
import type { BaseFilterConfig } from '../../classes/FilterConfig';
|
|
4
2
|
type ModelValue = {
|
|
5
3
|
from: number | null;
|
|
6
4
|
to: number | null;
|
|
7
5
|
};
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
filterConfig?: BaseFilterConfig;
|
|
8
|
+
disableValidation?: boolean;
|
|
9
|
+
};
|
|
8
10
|
type __VLS_ModelProps = {
|
|
9
11
|
modelValue?: ModelValue;
|
|
10
12
|
};
|
|
@@ -2,4 +2,5 @@ export type * from './classes/FilterConfig';
|
|
|
2
2
|
export * from './types/DynamicFilterPreviewComponent';
|
|
3
3
|
export * from './types/FilterConfigDefinition';
|
|
4
4
|
import { createFilterConfig } from './classes/createFilterConfig';
|
|
5
|
-
|
|
5
|
+
import { createDateRangeFilterConfig } from './components/_shared/date-time-filter/filterConfig';
|
|
6
|
+
export { createDateRangeFilterConfig, createFilterConfig };
|