@webitel/ui-datalist 1.1.79 → 1.1.81
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/Readme.md +2 -0
- package/package.json +1 -1
- package/src/modules/card/composables/useCardAnyFieldEditedWatcher.ts +18 -0
- package/src/modules/card/index.ts +1 -0
- package/src/modules/filters/components/table-filters-panel.vue +2 -2
- package/src/modules/filters/composables/useFilterConfigsToolkit.ts +3 -3
- package/src/modules/filters/modules/filterConfig/components/_custom/filterConfig.ts +5 -5
- package/types/.tsbuildinfo +1 -1
- package/types/modules/card/composables/useCardAnyFieldEditedWatcher.d.ts +18 -0
- package/types/modules/card/index.d.ts +1 -0
- package/types/modules/filters/components/table-filters-panel.vue.d.ts +2 -2
- package/types/modules/filters/composables/useFilterConfigsToolkit.d.ts +2 -2
- package/types/modules/filters/modules/filterConfig/components/_custom/filterConfig.d.ts +5 -5
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Dirty flag for a local draft `ref`.
|
|
4
|
+
*
|
|
5
|
+
* Replacing `value` with a new object resets dirty. Mutating fields
|
|
6
|
+
* in place sets `isAnyFieldEdited` to `true`.
|
|
7
|
+
*
|
|
8
|
+
* Used by `useCardComponent`. Also usable on nested popups that keep
|
|
9
|
+
* a local draft instead of a card store.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const draft = ref({ name: '' });
|
|
14
|
+
* const { isAnyFieldEdited } = useCardAnyFieldEditedWatcher({ value: draft });
|
|
15
|
+
*
|
|
16
|
+
* draft.value = { name: 'Holiday' }; // reset
|
|
17
|
+
* draft.value.name = 'NY'; // dirty
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
2
20
|
export declare const useCardAnyFieldEditedWatcher: ({ value, }: {
|
|
3
21
|
value: Ref<object>;
|
|
4
22
|
}) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { DataField } from '@webitel/api-services/gen/models';
|
|
1
2
|
import { StoreGeneric } from 'pinia';
|
|
2
|
-
import { WebitelProtoDataField } from 'webitel-sdk';
|
|
3
3
|
import { FilterInitParams, IFilter } from '../classes/Filter';
|
|
4
4
|
import { IFiltersManager } from '../classes/FiltersManager';
|
|
5
5
|
import { AnyFilterConfig } from '../modules/filterConfig/classes/FilterConfig';
|
|
@@ -27,7 +27,7 @@ type Props = {
|
|
|
27
27
|
* Props.filterOptions, because this functionality can be expanded to many
|
|
28
28
|
* filter panels
|
|
29
29
|
*/
|
|
30
|
-
filterableExtensionFields?:
|
|
30
|
+
filterableExtensionFields?: DataField[];
|
|
31
31
|
/**
|
|
32
32
|
* @description
|
|
33
33
|
* QueryPreset "section" field
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { DataField } from '@webitel/api-services/gen/models';
|
|
1
2
|
import { type ComputedRef } from 'vue';
|
|
2
|
-
import type { WebitelProtoDataField } from 'webitel-sdk';
|
|
3
3
|
import type { FilterName, IFilter } from '../classes/Filter';
|
|
4
4
|
import type { IFiltersManager } from '../classes/FiltersManager';
|
|
5
5
|
import { type BaseFilterConfig } from '../modules/filterConfig/classes/FilterConfig';
|
|
@@ -31,7 +31,7 @@ export type FilterConfigToolkit = {
|
|
|
31
31
|
export type FilterConfigToolkitParams = {
|
|
32
32
|
filterOptions: (FilterOption | BaseFilterConfig)[];
|
|
33
33
|
filtersManager: IFiltersManager;
|
|
34
|
-
filterableExtensionFields?:
|
|
34
|
+
filterableExtensionFields?: DataField[];
|
|
35
35
|
staticMode?: boolean;
|
|
36
36
|
};
|
|
37
37
|
export declare const useFilterConfigsToolkit: ({ filterOptions, filtersManager, filterableExtensionFields, }: FilterConfigToolkitParams) => FilterConfigToolkit;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DataField } from '@webitel/api-services/gen/models';
|
|
2
2
|
import type { BaseFilterConfig, FilterConfigBaseParams, FilterConfigSearchRequestParams, IWtSysTypeFilterConfig } from '../../classes/FilterConfig';
|
|
3
3
|
import { FilterConfig } from '../../classes/FilterConfig';
|
|
4
4
|
export interface ITypeExtensionFilterConfig extends BaseFilterConfig {
|
|
5
|
-
readonly field:
|
|
5
|
+
readonly field: DataField;
|
|
6
6
|
searchRecords?: IWtSysTypeFilterConfig['searchRecords'];
|
|
7
7
|
}
|
|
8
8
|
declare class TypeExtensionFilterConfig extends FilterConfig implements ITypeExtensionFilterConfig {
|
|
9
|
-
readonly field:
|
|
9
|
+
readonly field: DataField;
|
|
10
10
|
constructor({ name }: FilterConfigBaseParams, { field, }: {
|
|
11
|
-
field:
|
|
11
|
+
field: DataField;
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
declare class TypeExtensionWtSysTypeFieldFilterConfig extends TypeExtensionFilterConfig implements IWtSysTypeFilterConfig {
|
|
@@ -19,5 +19,5 @@ declare class TypeExtensionWtSysTypeFieldFilterConfig extends TypeExtensionFilte
|
|
|
19
19
|
}
|
|
20
20
|
export type { TypeExtensionFilterConfig, TypeExtensionWtSysTypeFieldFilterConfig, };
|
|
21
21
|
export declare const createTypeExtensionFilterConfig: (params: FilterConfigBaseParams, { field, }: {
|
|
22
|
-
field:
|
|
22
|
+
field: DataField;
|
|
23
23
|
}) => TypeExtensionFilterConfig;
|