@revolist/revogrid 4.9.26 → 4.9.27
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.types.js","sourceRoot":"","sources":["../../../src/plugins/filter/filter.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ColumnProp } from '@type';\nimport { FilterType } from './filter.indexed';\n\nexport type DateEnum =\n | 'today'\n | 'yesterday'\n | 'tomorrow'\n | 'thisweek'\n | 'lastweek'\n | 'nextweek'\n | 'thismonth'\n | 'lastmonth'\n | 'nextmonth'\n | 'thisyear'\n | 'lastyear'\n | 'nextyear';\n\nexport type ExtraField = 'input' | 'select' | 'multi' | 'datepicker';\n\nexport type LogicFunctionParam = any;\nexport type LogicFunctionExtraParam =\n | 'select'\n | 'input'\n | 'multi'\n | 'datepicker'\n | number\n | Date\n | DateEnum\n | null\n | undefined\n | string\n | string[]\n | number[];\nexport type LogicFunction = {\n (value:
|
|
1
|
+
{"version":3,"file":"filter.types.js","sourceRoot":"","sources":["../../../src/plugins/filter/filter.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ColumnProp } from '@type';\nimport { FilterType } from './filter.indexed';\n\nexport type DateEnum =\n | 'today'\n | 'yesterday'\n | 'tomorrow'\n | 'thisweek'\n | 'lastweek'\n | 'nextweek'\n | 'thismonth'\n | 'lastmonth'\n | 'nextmonth'\n | 'thisyear'\n | 'lastyear'\n | 'nextyear';\n\nexport type ExtraField = 'input' | 'select' | 'multi' | 'datepicker';\n\nexport type LogicFunctionParam = any;\nexport type LogicFunctionExtraParam =\n | 'select'\n | 'input'\n | 'multi'\n | 'datepicker'\n | number\n | Date\n | DateEnum\n | null\n | undefined\n | string\n | string[]\n | number[];\nexport type LogicFunction<T1 = LogicFunctionParam, T2 = LogicFunctionExtraParam> = {\n (value: T1, extra?: T2): boolean;\n extra?: ExtraField;\n};\n\ntype CustomFilter = {\n columnFilterType: string; // property defined in column filter: string/number/abstract/enum...etc\n name: string;\n func: LogicFunction;\n};\n\nexport type FilterCaptions = {\n title: string;\n save: string;\n reset: string;\n cancel: string;\n add: string;\n placeholder: string;\n and: string;\n or: string;\n};\n\nexport type FilterLocalization = {\n captions: FilterCaptions;\n filterNames: Record<FilterType, string>;\n};\n/**\n * Filter configuration for a column. This is the type of the `filter` property on a column.\n */\nexport type ColumnFilterConfig = {\n /**\n * The collection of filters to be applied to the column.\n */\n collection?: FilterCollection;\n /**\n * The names of the filters to be included in the filter dropdown.\n */\n include?: string[];\n /**\n * A mapping of custom filter names to custom filter functions.\n */\n customFilters?: Record<string, CustomFilter>;\n /**\n * The property on the column idintifying which has the filter is applied.\n */\n filterProp?: string;\n /**\n * The localization for the filter dropdown.\n */\n localization?: FilterLocalization;\n /**\n * Information about the multi-filter items.\n */\n multiFilterItems?: MultiFilterItem;\n /**\n * Whether or not to disable dynamic filtering. If set to true, the filter will only be applied\n * when the user clicks on the filter button.\n */\n disableDynamicFiltering?: boolean;\n};\ntype FilterCollectionItem = {\n filter: LogicFunction;\n type: FilterType;\n value?: any;\n};\n\nexport type FilterCollection = Record<ColumnProp, FilterCollectionItem>;\n\n\nexport type FilterItem = {\n // column id\n prop?: ColumnProp;\n // filter type definition\n type?: FilterType;\n // value for additional filtering, text value or some id\n value?: any;\n};\n\nexport type FilterData = {\n id: number;\n type: FilterType;\n value?: any;\n relation: 'and' | 'or';\n};\n\nexport type MultiFilterItem = {\n [prop: string]: FilterData[];\n};\n\nexport type ShowData = {\n x: number;\n y: number;\n /**\n * Auto correct position if it is out of document bounds\n */\n autoCorrect?: boolean;\n filterTypes?: Record<string, string[]>;\n} & FilterItem;\n"]}
|
|
@@ -4,8 +4,8 @@ export type DateEnum = 'today' | 'yesterday' | 'tomorrow' | 'thisweek' | 'lastwe
|
|
|
4
4
|
export type ExtraField = 'input' | 'select' | 'multi' | 'datepicker';
|
|
5
5
|
export type LogicFunctionParam = any;
|
|
6
6
|
export type LogicFunctionExtraParam = 'select' | 'input' | 'multi' | 'datepicker' | number | Date | DateEnum | null | undefined | string | string[] | number[];
|
|
7
|
-
export type LogicFunction = {
|
|
8
|
-
(value:
|
|
7
|
+
export type LogicFunction<T1 = LogicFunctionParam, T2 = LogicFunctionExtraParam> = {
|
|
8
|
+
(value: T1, extra?: T2): boolean;
|
|
9
9
|
extra?: ExtraField;
|
|
10
10
|
};
|
|
11
11
|
type CustomFilter = {
|