@raystack/apsara 0.48.2 → 0.48.4
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/dist/components/avatar/avatar.cjs +1 -1
- package/dist/components/avatar/avatar.cjs.map +1 -1
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/breadcrumb/breadcrumb-item.cjs +26 -0
- package/dist/components/breadcrumb/breadcrumb-item.cjs.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-item.d.ts +14 -0
- package/dist/components/breadcrumb/breadcrumb-item.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-item.js +24 -0
- package/dist/components/breadcrumb/breadcrumb-item.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-misc.cjs +20 -0
- package/dist/components/breadcrumb/breadcrumb-misc.cjs.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-misc.d.ts +8 -0
- package/dist/components/breadcrumb/breadcrumb-misc.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-misc.js +17 -0
- package/dist/components/breadcrumb/breadcrumb-misc.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-root.cjs +25 -0
- package/dist/components/breadcrumb/breadcrumb-root.cjs.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-root.d.ts +10 -0
- package/dist/components/breadcrumb/breadcrumb-root.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-root.js +23 -0
- package/dist/components/breadcrumb/breadcrumb-root.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.cjs +7 -53
- package/dist/components/breadcrumb/breadcrumb.cjs.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +5 -27
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +7 -53
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.module.css.cjs +1 -1
- package/dist/components/breadcrumb/breadcrumb.module.css.js +1 -1
- package/dist/components/breadcrumb/index.d.ts +1 -1
- package/dist/components/data-table/utils/filter-operations.cjs +46 -22
- package/dist/components/data-table/utils/filter-operations.cjs.map +1 -1
- package/dist/components/data-table/utils/filter-operations.d.ts +10 -9
- package/dist/components/data-table/utils/filter-operations.d.ts.map +1 -1
- package/dist/components/data-table/utils/filter-operations.js +46 -22
- package/dist/components/data-table/utils/filter-operations.js.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-misc.cjs +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-misc.cjs.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-misc.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-misc.js.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-root.cjs +10 -10
- package/dist/components/dropdown-menu/dropdown-menu-root.cjs.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-root.d.ts +8 -5
- package/dist/components/dropdown-menu/dropdown-menu-root.d.ts.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-root.js +11 -11
- package/dist/components/dropdown-menu/dropdown-menu-root.js.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-trigger.cjs +6 -2
- package/dist/components/dropdown-menu/dropdown-menu-trigger.cjs.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-trigger.d.ts +1 -0
- package/dist/components/dropdown-menu/dropdown-menu-trigger.d.ts.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-trigger.js +6 -2
- package/dist/components/dropdown-menu/dropdown-menu-trigger.js.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/components/filter-chip/filter-chip-operation.cjs +31 -0
- package/dist/components/filter-chip/filter-chip-operation.cjs.map +1 -0
- package/dist/components/filter-chip/filter-chip-operation.d.ts +11 -0
- package/dist/components/filter-chip/filter-chip-operation.d.ts.map +1 -0
- package/dist/components/filter-chip/filter-chip-operation.js +29 -0
- package/dist/components/filter-chip/filter-chip-operation.js.map +1 -0
- package/dist/components/filter-chip/filter-chip.cjs +37 -41
- package/dist/components/filter-chip/filter-chip.cjs.map +1 -1
- package/dist/components/filter-chip/filter-chip.d.ts +6 -5
- package/dist/components/filter-chip/filter-chip.d.ts.map +1 -1
- package/dist/components/filter-chip/filter-chip.js +37 -41
- package/dist/components/filter-chip/filter-chip.js.map +1 -1
- package/dist/components/filter-chip/filter-chip.module.css.cjs +1 -1
- package/dist/components/filter-chip/filter-chip.module.css.js +1 -1
- package/dist/components/select/select-item.cjs +2 -1
- package/dist/components/select/select-item.cjs.map +1 -1
- package/dist/components/select/select-item.d.ts.map +1 -1
- package/dist/components/select/select-item.js +2 -1
- package/dist/components/select/select-item.js.map +1 -1
- package/dist/components/select/select-root.cjs +2 -2
- package/dist/components/select/select-root.cjs.map +1 -1
- package/dist/components/select/select-root.d.ts.map +1 -1
- package/dist/components/select/select-root.js +2 -2
- package/dist/components/select/select-root.js.map +1 -1
- package/dist/components/sidebar/index.d.ts +1 -1
- package/dist/components/sidebar/sidebar.cjs +11 -12
- package/dist/components/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/sidebar/sidebar.d.ts +5 -10
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.js +12 -13
- package/dist/components/sidebar/sidebar.js.map +1 -1
- package/dist/components/sidebar/sidebar.module.css.cjs +1 -1
- package/dist/components/sidebar/sidebar.module.css.js +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip-provider.cjs +17 -0
- package/dist/components/tooltip/tooltip-provider.cjs.map +1 -0
- package/dist/components/tooltip/tooltip-provider.d.ts +9 -0
- package/dist/components/tooltip/tooltip-provider.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip-provider.js +14 -0
- package/dist/components/tooltip/tooltip-provider.js.map +1 -0
- package/dist/components/tooltip/tooltip-root.cjs +65 -0
- package/dist/components/tooltip/tooltip-root.cjs.map +1 -0
- package/dist/components/tooltip/tooltip-root.d.ts +29 -0
- package/dist/components/tooltip/tooltip-root.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip-root.js +62 -0
- package/dist/components/tooltip/tooltip-root.js.map +1 -0
- package/dist/components/tooltip/tooltip.cjs +4 -50
- package/dist/components/tooltip/tooltip.cjs.map +1 -1
- package/dist/components/tooltip/tooltip.d.ts +3 -30
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +5 -50
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/index.cjs +0 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-tooltip@1.2.7_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-tooltip/dist/index.cjs +8 -8
- package/dist/style.css +1 -1
- package/dist/types/filters.cjs +26 -21
- package/dist/types/filters.cjs.map +1 -1
- package/dist/types/filters.d.ts +19 -6
- package/dist/types/filters.d.ts.map +1 -1
- package/dist/types/filters.js +26 -21
- package/dist/types/filters.js.map +1 -1
- package/package.json +1 -1
package/dist/types/filters.cjs
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const FilterType = {
|
|
4
|
-
number:
|
|
5
|
-
string:
|
|
6
|
-
date:
|
|
7
|
-
select:
|
|
4
|
+
number: 'number',
|
|
5
|
+
string: 'string',
|
|
6
|
+
date: 'date',
|
|
7
|
+
select: 'select',
|
|
8
|
+
multiselect: 'multiselect'
|
|
8
9
|
};
|
|
9
10
|
const filterOperators = {
|
|
10
11
|
number: [
|
|
11
|
-
{ value:
|
|
12
|
-
{ value:
|
|
13
|
-
{ value:
|
|
14
|
-
{ value:
|
|
15
|
-
{ value:
|
|
16
|
-
{ value:
|
|
12
|
+
{ value: 'eq', label: 'is' },
|
|
13
|
+
{ value: 'neq', label: 'is not' },
|
|
14
|
+
{ value: 'lt', label: 'less than' },
|
|
15
|
+
{ value: 'lte', label: 'less than or equal' },
|
|
16
|
+
{ value: 'gt', label: 'greater than' },
|
|
17
|
+
{ value: 'gte', label: 'greater than or equal' }
|
|
17
18
|
],
|
|
18
19
|
string: [
|
|
19
|
-
{ value:
|
|
20
|
-
{ value:
|
|
21
|
-
{ value:
|
|
20
|
+
{ value: 'eq', label: 'is' },
|
|
21
|
+
{ value: 'neq', label: 'is not' },
|
|
22
|
+
{ value: 'like', label: 'contains' }
|
|
22
23
|
],
|
|
23
24
|
date: [
|
|
24
|
-
{ value:
|
|
25
|
-
{ value:
|
|
26
|
-
{ value:
|
|
27
|
-
{ value:
|
|
28
|
-
{ value:
|
|
29
|
-
{ value:
|
|
25
|
+
{ value: 'eq', label: 'is' },
|
|
26
|
+
{ value: 'neq', label: 'is not' },
|
|
27
|
+
{ value: 'lt', label: 'is before' },
|
|
28
|
+
{ value: 'lte', label: 'is on or before' },
|
|
29
|
+
{ value: 'gt', label: 'is after' },
|
|
30
|
+
{ value: 'gte', label: 'is on or after' }
|
|
30
31
|
],
|
|
31
32
|
select: [
|
|
32
|
-
{ value:
|
|
33
|
-
{ value:
|
|
33
|
+
{ value: 'eq', label: 'is' },
|
|
34
|
+
{ value: 'neq', label: 'is not' }
|
|
34
35
|
],
|
|
36
|
+
multiselect: [
|
|
37
|
+
{ value: 'in', label: 'is any of', alternateLabel: 'is' },
|
|
38
|
+
{ value: 'notin', label: 'is none of', alternateLabel: 'is not' }
|
|
39
|
+
]
|
|
35
40
|
};
|
|
36
41
|
|
|
37
42
|
exports.FilterType = FilterType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.cjs","sources":["../../types/filters.tsx"],"sourcesContent":["export const FilterType = {\n number:
|
|
1
|
+
{"version":3,"file":"filters.cjs","sources":["../../types/filters.tsx"],"sourcesContent":["export const FilterType = {\n number: 'number',\n string: 'string',\n date: 'date',\n select: 'select',\n multiselect: 'multiselect'\n} as const;\n\nexport type FilterValueType = 'string' | 'number' | 'boolean';\n\nexport interface FilterValue {\n value?: FilterValueType;\n // values?: Array<string | number>;\n date?: Date;\n // dateRange?: DateRange;\n}\n\nexport type FilterOperation = {\n value: string;\n label: string;\n};\n\nexport type NumberFilterOperatorType =\n | 'eq'\n | 'neq'\n | 'lt'\n | 'lte'\n | 'gt'\n | 'gte';\nexport type StringFilterOperatorType = 'eq' | 'neq' | 'like';\nexport type DateFilterOperatorType = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte';\nexport type SelectFilterOperatorType = 'eq' | 'neq';\nexport type MultiSelectFilterOperatorType = 'in' | 'notin';\n\nexport type FilterOperatorTypes =\n | NumberFilterOperatorType\n | StringFilterOperatorType\n | DateFilterOperatorType\n | SelectFilterOperatorType\n | MultiSelectFilterOperatorType\n | 'empty';\n\nexport type FilterOperator<T> = {\n /**\n * @description Value of the filter operator\n */\n value: T;\n /**\n * @description Label to be shown in the filter chip operation\n */\n label: string;\n /**\n * @description Used to show alternate operation label when single value is selected in multiselect column\n */\n alternateLabel?: string;\n};\n\nexport type FilterOperatorsMap = {\n number: FilterOperator<NumberFilterOperatorType>[];\n string: FilterOperator<StringFilterOperatorType>[];\n date: FilterOperator<DateFilterOperatorType>[];\n select: FilterOperator<SelectFilterOperatorType>[];\n multiselect: FilterOperator<MultiSelectFilterOperatorType>[];\n};\n\nexport type FilterTypes = keyof typeof FilterType;\n\nexport const filterOperators: FilterOperatorsMap = {\n number: [\n { value: 'eq', label: 'is' },\n { value: 'neq', label: 'is not' },\n { value: 'lt', label: 'less than' },\n { value: 'lte', label: 'less than or equal' },\n { value: 'gt', label: 'greater than' },\n { value: 'gte', label: 'greater than or equal' }\n ],\n string: [\n { value: 'eq', label: 'is' },\n { value: 'neq', label: 'is not' },\n { value: 'like', label: 'contains' }\n ],\n date: [\n { value: 'eq', label: 'is' },\n { value: 'neq', label: 'is not' },\n { value: 'lt', label: 'is before' },\n { value: 'lte', label: 'is on or before' },\n { value: 'gt', label: 'is after' },\n { value: 'gte', label: 'is on or after' }\n ],\n select: [\n { value: 'eq', label: 'is' },\n { value: 'neq', label: 'is not' }\n ],\n multiselect: [\n { value: 'in', label: 'is any of', alternateLabel: 'is' },\n { value: 'notin', label: 'is none of', alternateLabel: 'is not' }\n ]\n} as const;\n\nexport type Filter = {\n type: FilterTypes;\n filterOperation: string;\n value: string;\n};\n\nexport interface FilterSelectOption {\n value: FilterValueType;\n label: string;\n}\n"],"names":[],"mappings":";;AAAa,MAAA,UAAU,GAAG;AACxB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,WAAW,EAAE,aAAa;EACjB;AA6DE,MAAA,eAAe,GAAuB;AACjD,IAAA,MAAM,EAAE;AACN,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE;AACjC,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;AACnC,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE;AAC7C,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE;AACtC,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,uBAAuB,EAAE;AACjD,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE;AACjC,QAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE;AACrC,KAAA;AACD,IAAA,IAAI,EAAE;AACJ,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE;AACjC,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;AACnC,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE;AAC1C,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;AAClC,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE;AAC1C,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE;AAClC,KAAA;AACD,IAAA,WAAW,EAAE;QACX,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,IAAI,EAAE;QACzD,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE;AAClE,KAAA;;;;;;"}
|
package/dist/types/filters.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ export declare const FilterType: {
|
|
|
3
3
|
readonly string: "string";
|
|
4
4
|
readonly date: "date";
|
|
5
5
|
readonly select: "select";
|
|
6
|
+
readonly multiselect: "multiselect";
|
|
6
7
|
};
|
|
7
|
-
export type FilterValueType =
|
|
8
|
+
export type FilterValueType = 'string' | 'number' | 'boolean';
|
|
8
9
|
export interface FilterValue {
|
|
9
10
|
value?: FilterValueType;
|
|
10
11
|
date?: Date;
|
|
@@ -13,20 +14,32 @@ export type FilterOperation = {
|
|
|
13
14
|
value: string;
|
|
14
15
|
label: string;
|
|
15
16
|
};
|
|
16
|
-
export type NumberFilterOperatorType =
|
|
17
|
-
export type StringFilterOperatorType =
|
|
18
|
-
export type DateFilterOperatorType =
|
|
19
|
-
export type SelectFilterOperatorType =
|
|
20
|
-
export type
|
|
17
|
+
export type NumberFilterOperatorType = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte';
|
|
18
|
+
export type StringFilterOperatorType = 'eq' | 'neq' | 'like';
|
|
19
|
+
export type DateFilterOperatorType = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte';
|
|
20
|
+
export type SelectFilterOperatorType = 'eq' | 'neq';
|
|
21
|
+
export type MultiSelectFilterOperatorType = 'in' | 'notin';
|
|
22
|
+
export type FilterOperatorTypes = NumberFilterOperatorType | StringFilterOperatorType | DateFilterOperatorType | SelectFilterOperatorType | MultiSelectFilterOperatorType | 'empty';
|
|
21
23
|
export type FilterOperator<T> = {
|
|
24
|
+
/**
|
|
25
|
+
* @description Value of the filter operator
|
|
26
|
+
*/
|
|
22
27
|
value: T;
|
|
28
|
+
/**
|
|
29
|
+
* @description Label to be shown in the filter chip operation
|
|
30
|
+
*/
|
|
23
31
|
label: string;
|
|
32
|
+
/**
|
|
33
|
+
* @description Used to show alternate operation label when single value is selected in multiselect column
|
|
34
|
+
*/
|
|
35
|
+
alternateLabel?: string;
|
|
24
36
|
};
|
|
25
37
|
export type FilterOperatorsMap = {
|
|
26
38
|
number: FilterOperator<NumberFilterOperatorType>[];
|
|
27
39
|
string: FilterOperator<StringFilterOperatorType>[];
|
|
28
40
|
date: FilterOperator<DateFilterOperatorType>[];
|
|
29
41
|
select: FilterOperator<SelectFilterOperatorType>[];
|
|
42
|
+
multiselect: FilterOperator<MultiSelectFilterOperatorType>[];
|
|
30
43
|
};
|
|
31
44
|
export type FilterTypes = keyof typeof FilterType;
|
|
32
45
|
export declare const filterOperators: FilterOperatorsMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../types/filters.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../types/filters.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,eAAe,CAAC;IAExB,IAAI,CAAC,EAAE,IAAI,CAAC;CAEb;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAChC,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,KAAK,CAAC;AACV,MAAM,MAAM,wBAAwB,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;AAC7D,MAAM,MAAM,sBAAsB,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;AAChF,MAAM,MAAM,wBAAwB,GAAG,IAAI,GAAG,KAAK,CAAC;AACpD,MAAM,MAAM,6BAA6B,GAAG,IAAI,GAAG,OAAO,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAC3B,wBAAwB,GACxB,wBAAwB,GACxB,sBAAsB,GACtB,wBAAwB,GACxB,6BAA6B,GAC7B,OAAO,CAAC;AAEZ,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC;IACT;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,cAAc,CAAC,wBAAwB,CAAC,EAAE,CAAC;IACnD,MAAM,EAAE,cAAc,CAAC,wBAAwB,CAAC,EAAE,CAAC;IACnD,IAAI,EAAE,cAAc,CAAC,sBAAsB,CAAC,EAAE,CAAC;IAC/C,MAAM,EAAE,cAAc,CAAC,wBAAwB,CAAC,EAAE,CAAC;IACnD,WAAW,EAAE,cAAc,CAAC,6BAA6B,CAAC,EAAE,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,UAAU,CAAC;AAElD,eAAO,MAAM,eAAe,EAAE,kBA8BpB,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,WAAW,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
package/dist/types/filters.js
CHANGED
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
const FilterType = {
|
|
2
|
-
number:
|
|
3
|
-
string:
|
|
4
|
-
date:
|
|
5
|
-
select:
|
|
2
|
+
number: 'number',
|
|
3
|
+
string: 'string',
|
|
4
|
+
date: 'date',
|
|
5
|
+
select: 'select',
|
|
6
|
+
multiselect: 'multiselect'
|
|
6
7
|
};
|
|
7
8
|
const filterOperators = {
|
|
8
9
|
number: [
|
|
9
|
-
{ value:
|
|
10
|
-
{ value:
|
|
11
|
-
{ value:
|
|
12
|
-
{ value:
|
|
13
|
-
{ value:
|
|
14
|
-
{ value:
|
|
10
|
+
{ value: 'eq', label: 'is' },
|
|
11
|
+
{ value: 'neq', label: 'is not' },
|
|
12
|
+
{ value: 'lt', label: 'less than' },
|
|
13
|
+
{ value: 'lte', label: 'less than or equal' },
|
|
14
|
+
{ value: 'gt', label: 'greater than' },
|
|
15
|
+
{ value: 'gte', label: 'greater than or equal' }
|
|
15
16
|
],
|
|
16
17
|
string: [
|
|
17
|
-
{ value:
|
|
18
|
-
{ value:
|
|
19
|
-
{ value:
|
|
18
|
+
{ value: 'eq', label: 'is' },
|
|
19
|
+
{ value: 'neq', label: 'is not' },
|
|
20
|
+
{ value: 'like', label: 'contains' }
|
|
20
21
|
],
|
|
21
22
|
date: [
|
|
22
|
-
{ value:
|
|
23
|
-
{ value:
|
|
24
|
-
{ value:
|
|
25
|
-
{ value:
|
|
26
|
-
{ value:
|
|
27
|
-
{ value:
|
|
23
|
+
{ value: 'eq', label: 'is' },
|
|
24
|
+
{ value: 'neq', label: 'is not' },
|
|
25
|
+
{ value: 'lt', label: 'is before' },
|
|
26
|
+
{ value: 'lte', label: 'is on or before' },
|
|
27
|
+
{ value: 'gt', label: 'is after' },
|
|
28
|
+
{ value: 'gte', label: 'is on or after' }
|
|
28
29
|
],
|
|
29
30
|
select: [
|
|
30
|
-
{ value:
|
|
31
|
-
{ value:
|
|
31
|
+
{ value: 'eq', label: 'is' },
|
|
32
|
+
{ value: 'neq', label: 'is not' }
|
|
32
33
|
],
|
|
34
|
+
multiselect: [
|
|
35
|
+
{ value: 'in', label: 'is any of', alternateLabel: 'is' },
|
|
36
|
+
{ value: 'notin', label: 'is none of', alternateLabel: 'is not' }
|
|
37
|
+
]
|
|
33
38
|
};
|
|
34
39
|
|
|
35
40
|
export { FilterType, filterOperators };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.js","sources":["../../types/filters.tsx"],"sourcesContent":["export const FilterType = {\n number:
|
|
1
|
+
{"version":3,"file":"filters.js","sources":["../../types/filters.tsx"],"sourcesContent":["export const FilterType = {\n number: 'number',\n string: 'string',\n date: 'date',\n select: 'select',\n multiselect: 'multiselect'\n} as const;\n\nexport type FilterValueType = 'string' | 'number' | 'boolean';\n\nexport interface FilterValue {\n value?: FilterValueType;\n // values?: Array<string | number>;\n date?: Date;\n // dateRange?: DateRange;\n}\n\nexport type FilterOperation = {\n value: string;\n label: string;\n};\n\nexport type NumberFilterOperatorType =\n | 'eq'\n | 'neq'\n | 'lt'\n | 'lte'\n | 'gt'\n | 'gte';\nexport type StringFilterOperatorType = 'eq' | 'neq' | 'like';\nexport type DateFilterOperatorType = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte';\nexport type SelectFilterOperatorType = 'eq' | 'neq';\nexport type MultiSelectFilterOperatorType = 'in' | 'notin';\n\nexport type FilterOperatorTypes =\n | NumberFilterOperatorType\n | StringFilterOperatorType\n | DateFilterOperatorType\n | SelectFilterOperatorType\n | MultiSelectFilterOperatorType\n | 'empty';\n\nexport type FilterOperator<T> = {\n /**\n * @description Value of the filter operator\n */\n value: T;\n /**\n * @description Label to be shown in the filter chip operation\n */\n label: string;\n /**\n * @description Used to show alternate operation label when single value is selected in multiselect column\n */\n alternateLabel?: string;\n};\n\nexport type FilterOperatorsMap = {\n number: FilterOperator<NumberFilterOperatorType>[];\n string: FilterOperator<StringFilterOperatorType>[];\n date: FilterOperator<DateFilterOperatorType>[];\n select: FilterOperator<SelectFilterOperatorType>[];\n multiselect: FilterOperator<MultiSelectFilterOperatorType>[];\n};\n\nexport type FilterTypes = keyof typeof FilterType;\n\nexport const filterOperators: FilterOperatorsMap = {\n number: [\n { value: 'eq', label: 'is' },\n { value: 'neq', label: 'is not' },\n { value: 'lt', label: 'less than' },\n { value: 'lte', label: 'less than or equal' },\n { value: 'gt', label: 'greater than' },\n { value: 'gte', label: 'greater than or equal' }\n ],\n string: [\n { value: 'eq', label: 'is' },\n { value: 'neq', label: 'is not' },\n { value: 'like', label: 'contains' }\n ],\n date: [\n { value: 'eq', label: 'is' },\n { value: 'neq', label: 'is not' },\n { value: 'lt', label: 'is before' },\n { value: 'lte', label: 'is on or before' },\n { value: 'gt', label: 'is after' },\n { value: 'gte', label: 'is on or after' }\n ],\n select: [\n { value: 'eq', label: 'is' },\n { value: 'neq', label: 'is not' }\n ],\n multiselect: [\n { value: 'in', label: 'is any of', alternateLabel: 'is' },\n { value: 'notin', label: 'is none of', alternateLabel: 'is not' }\n ]\n} as const;\n\nexport type Filter = {\n type: FilterTypes;\n filterOperation: string;\n value: string;\n};\n\nexport interface FilterSelectOption {\n value: FilterValueType;\n label: string;\n}\n"],"names":[],"mappings":"AAAa,MAAA,UAAU,GAAG;AACxB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,WAAW,EAAE,aAAa;EACjB;AA6DE,MAAA,eAAe,GAAuB;AACjD,IAAA,MAAM,EAAE;AACN,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE;AACjC,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;AACnC,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE;AAC7C,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE;AACtC,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,uBAAuB,EAAE;AACjD,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE;AACjC,QAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE;AACrC,KAAA;AACD,IAAA,IAAI,EAAE;AACJ,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE;AACjC,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;AACnC,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE;AAC1C,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;AAClC,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE;AAC1C,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE;AAClC,KAAA;AACD,IAAA,WAAW,EAAE;QACX,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,IAAI,EAAE;QACzD,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE;AAClE,KAAA;;;;;"}
|