@bigbinary/neeto-filters-frontend 2.7.3 → 2.8.1
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 +47 -7
- package/dist/index.cjs.js +121695 -1
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.js +121661 -1
- package/dist/index.js.map +1 -0
- package/package.json +2 -12
- package/types.d.ts +22 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-filters-frontend",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "Manage filters across neeto products.",
|
|
5
5
|
"author": "BigBinary",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"yarn": ">=1.22"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"dist",
|
|
17
|
+
"dist/*",
|
|
18
18
|
"types.d.ts"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"@rollup/plugin-alias": "3.1.9",
|
|
55
55
|
"@rollup/plugin-babel": "5.3.1",
|
|
56
56
|
"@rollup/plugin-commonjs": "22.0.2",
|
|
57
|
-
"@rollup/plugin-html": "0.2.4",
|
|
58
57
|
"@rollup/plugin-json": "4.1.0",
|
|
59
58
|
"@rollup/plugin-node-resolve": "14.1.0",
|
|
60
59
|
"@rollup/plugin-replace": "4.0.0",
|
|
@@ -105,16 +104,7 @@
|
|
|
105
104
|
"react-toastify": "8.0.2",
|
|
106
105
|
"react-transition-group": "4.4.5",
|
|
107
106
|
"rollup": "2.79.1",
|
|
108
|
-
"rollup-plugin-analyzer": "4.0.0",
|
|
109
|
-
"rollup-plugin-bundle-html": "0.2.2",
|
|
110
|
-
"rollup-plugin-cleaner": "1.0.0",
|
|
111
|
-
"rollup-plugin-generate-html-template": "1.7.0",
|
|
112
|
-
"rollup-plugin-livereload": "2.0.5",
|
|
113
|
-
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
114
|
-
"rollup-plugin-polyfill-node": "0.10.2",
|
|
115
|
-
"rollup-plugin-serve": "2.0.1",
|
|
116
107
|
"rollup-plugin-styles": "4.0.0",
|
|
117
|
-
"rollup-plugin-terser": "7.0.2",
|
|
118
108
|
"sass": "^1.54.9",
|
|
119
109
|
"sass-loader": "^13.0.2",
|
|
120
110
|
"style-loader": "3.3.1",
|
package/types.d.ts
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
import { ButtonProps, PaneProps } from "@bigbinary/neetoui";
|
|
2
|
+
|
|
3
|
+
interface labelAndValue {
|
|
4
|
+
label: string | number;
|
|
5
|
+
value: string | number;
|
|
6
|
+
}
|
|
2
7
|
interface ColumnType {
|
|
3
8
|
key: string;
|
|
4
|
-
node
|
|
9
|
+
node?: string;
|
|
5
10
|
label: string;
|
|
6
11
|
type: string;
|
|
7
12
|
model?: string;
|
|
8
|
-
values?:
|
|
13
|
+
values?: labelAndValue[];
|
|
9
14
|
hidden?: boolean;
|
|
10
15
|
showRuleSelector?: boolean;
|
|
16
|
+
isClearable?: any;
|
|
17
|
+
defaultValue?: any;
|
|
11
18
|
[otherProps: string]: any;
|
|
12
19
|
}
|
|
13
20
|
|
|
14
|
-
|
|
15
21
|
interface KeywordType {
|
|
16
22
|
node: string;
|
|
17
23
|
value: string;
|
|
18
|
-
setValue:
|
|
24
|
+
setValue: React.Dispatch<React.SetStateAction<string>>;
|
|
19
25
|
model?: string;
|
|
20
26
|
[otherProps: string]: any;
|
|
21
27
|
}
|
|
@@ -52,17 +58,22 @@ type condition = {
|
|
|
52
58
|
[otherProps: string]: any;
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
type
|
|
61
|
+
type filters = {
|
|
56
62
|
conditions: condition[];
|
|
57
63
|
[otherProps: string]: any;
|
|
58
64
|
}
|
|
59
65
|
|
|
66
|
+
type selectors = {
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
};
|
|
69
|
+
|
|
60
70
|
export function Filters(
|
|
61
71
|
props: {
|
|
62
72
|
isOpen: boolean;
|
|
63
73
|
setIsOpen: (boolean) => void;
|
|
64
74
|
columns: ColumnType[];
|
|
65
|
-
onChange
|
|
75
|
+
onChange: (filters: filters) => void;
|
|
76
|
+
onSelectorsChange?: (selectors: selectors) => void;
|
|
66
77
|
buttonProps?: ButtonProps;
|
|
67
78
|
paneProps?: PaneProps;
|
|
68
79
|
isSearchable?: boolean;
|
|
@@ -78,8 +89,12 @@ export function Bar(
|
|
|
78
89
|
columns: ColumnType[];
|
|
79
90
|
keyword?: KeywordType;
|
|
80
91
|
className?: string;
|
|
92
|
+
onChange: (filters: filters) => void;
|
|
93
|
+
onSelectorsChange?: (selectors: selectors) => void;
|
|
81
94
|
[otherProps: string]: any;
|
|
82
95
|
}
|
|
83
96
|
): JSX.Element;
|
|
84
97
|
|
|
85
|
-
export function buildFiltersFromURL(columns: Array<ColumnType | KeywordType>):
|
|
98
|
+
export function buildFiltersFromURL(columns: Array<ColumnType | KeywordType>): filters[];
|
|
99
|
+
|
|
100
|
+
export function buildSelectorsFromURL(columns: Array<ColumnType>): selectors;
|