@bigbinary/neeto-filters-frontend 3.2.0-beta.1 → 3.2.0
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 +0 -4
- package/app/javascript/src/translations/en.json +5 -9
- package/dist/index.cjs.js +1494 -2718
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1517 -2739
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/types.d.ts +26 -43
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-filters-frontend",
|
|
3
|
-
"version": "3.2.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Manage filters across neeto products.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-filters-nano",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"@bigbinary/eslint-plugin-neeto": "1.1.42",
|
|
52
52
|
"@bigbinary/neeto-audit-frontend": "2.0.9",
|
|
53
53
|
"@bigbinary/neeto-cist": "1.0.8",
|
|
54
|
-
"@bigbinary/neeto-commons-frontend": "3.1.
|
|
55
|
-
"@bigbinary/neeto-filters-frontend": "3.1.
|
|
54
|
+
"@bigbinary/neeto-commons-frontend": "3.1.14",
|
|
55
|
+
"@bigbinary/neeto-filters-frontend": "3.1.2",
|
|
56
56
|
"@bigbinary/neeto-hotkeys": "^1.0.1",
|
|
57
57
|
"@bigbinary/neeto-icons": "1.17.11",
|
|
58
58
|
"@bigbinary/neeto-molecules": "1.6.3",
|
|
59
|
-
"@bigbinary/neetoui": "6.2.
|
|
59
|
+
"@bigbinary/neetoui": "6.2.0",
|
|
60
60
|
"@emotion/is-prop-valid": "1.2.0",
|
|
61
61
|
"@faker-js/faker": "8.2.0",
|
|
62
62
|
"@honeybadger-io/js": "6.5.3",
|
|
@@ -154,12 +154,12 @@
|
|
|
154
154
|
},
|
|
155
155
|
"peerDependencies": {
|
|
156
156
|
"@bigbinary/neeto-cist": "latest",
|
|
157
|
-
"@bigbinary/neeto-commons-frontend": "3.1.
|
|
158
|
-
"@bigbinary/neeto-filters-frontend": "3.1.
|
|
157
|
+
"@bigbinary/neeto-commons-frontend": "3.1.14",
|
|
158
|
+
"@bigbinary/neeto-filters-frontend": "3.1.2",
|
|
159
159
|
"@bigbinary/neeto-hotkeys": "^1.0.1",
|
|
160
160
|
"@bigbinary/neeto-icons": "1.17.11",
|
|
161
161
|
"@bigbinary/neeto-molecules": "1.6.3",
|
|
162
|
-
"@bigbinary/neetoui": "6.2.
|
|
162
|
+
"@bigbinary/neetoui": "6.2.0",
|
|
163
163
|
"@honeybadger-io/js": "^6.5.3",
|
|
164
164
|
"@honeybadger-io/react": "^6.1.9",
|
|
165
165
|
"axios": "^1.6.0",
|
package/types.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonProps, PaneProps } from "@bigbinary/neetoui";
|
|
3
|
-
import {
|
|
4
|
-
UseQueryResult,
|
|
5
|
-
UseQueryOptions,
|
|
6
|
-
UseMutationOptions,
|
|
7
|
-
UseMutationResult,
|
|
8
|
-
MutationOptions,
|
|
9
|
-
} from "react-query";
|
|
3
|
+
import { UseQueryResult, UseQueryOptions, UseMutationOptions, UseMutationResult, MutationOptions } from "react-query";
|
|
10
4
|
|
|
11
5
|
interface labelAndValue {
|
|
12
6
|
label: string | number;
|
|
@@ -17,10 +11,10 @@ type helpIconProps = {
|
|
|
17
11
|
icon?: string;
|
|
18
12
|
onClick?: () => void;
|
|
19
13
|
tooltipProps: {
|
|
20
|
-
content: string
|
|
21
|
-
position?: string
|
|
22
|
-
}
|
|
23
|
-
}
|
|
14
|
+
content: string,
|
|
15
|
+
position?: string,
|
|
16
|
+
}
|
|
17
|
+
}
|
|
24
18
|
interface ColumnType {
|
|
25
19
|
suffixComponent?: React.ComponentType<any>;
|
|
26
20
|
helpIconProps?: helpIconProps;
|
|
@@ -47,9 +41,9 @@ interface KeywordType {
|
|
|
47
41
|
}
|
|
48
42
|
|
|
49
43
|
interface SegmentType {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
id: string,
|
|
45
|
+
name: string,
|
|
46
|
+
filters: filters[]
|
|
53
47
|
}
|
|
54
48
|
|
|
55
49
|
type condition = {
|
|
@@ -96,7 +90,6 @@ type selectors = {
|
|
|
96
90
|
};
|
|
97
91
|
|
|
98
92
|
export function Filters(props: {
|
|
99
|
-
size?: "xsmall" | "small" | "large";
|
|
100
93
|
isOpen: boolean;
|
|
101
94
|
setIsOpen: (boolean) => void;
|
|
102
95
|
columns: ColumnType[];
|
|
@@ -122,7 +115,6 @@ export function Bar(props: {
|
|
|
122
115
|
onSelectorsChange?: (selectors: selectors) => void;
|
|
123
116
|
childrenKeys?: string[];
|
|
124
117
|
defaultSegmentName?: string;
|
|
125
|
-
customFilters?: React.ReactNode;
|
|
126
118
|
[otherProps: string]: any;
|
|
127
119
|
}): JSX.Element;
|
|
128
120
|
|
|
@@ -131,8 +123,6 @@ export function Segments(props: {
|
|
|
131
123
|
columns: ColumnType[];
|
|
132
124
|
setIsFilterPaneOpen: (boolean) => void;
|
|
133
125
|
defaultSegmentName?: string;
|
|
134
|
-
customFilters?: React.ReactNode;
|
|
135
|
-
childrenKeys?: string[];
|
|
136
126
|
}): JSX.Element;
|
|
137
127
|
|
|
138
128
|
export function buildFiltersFromURL(
|
|
@@ -153,40 +143,33 @@ type FieldType = {
|
|
|
153
143
|
displayOrder?: number;
|
|
154
144
|
ownerType?: string;
|
|
155
145
|
ownerId?: string;
|
|
156
|
-
}
|
|
146
|
+
}
|
|
157
147
|
|
|
158
148
|
export function buildFilterColumnsFromFields(args: {
|
|
159
|
-
fields: Array<FieldType
|
|
160
|
-
selectedFields?: string[]
|
|
161
|
-
showRuleSelector?: boolean
|
|
162
|
-
groupName?: string
|
|
149
|
+
fields: Array<FieldType>,
|
|
150
|
+
selectedFields?: string[],
|
|
151
|
+
showRuleSelector?: boolean,
|
|
152
|
+
groupName?: string
|
|
163
153
|
}): ColumnType[];
|
|
164
154
|
|
|
165
|
-
export function useFetchSegments(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
options?: UseQueryOptions
|
|
171
|
-
): UseQueryResult<SegmentType[]>;
|
|
155
|
+
export function useFetchSegments(args: {
|
|
156
|
+
entity: string,
|
|
157
|
+
searchTerm?: string,
|
|
158
|
+
}, options?: UseQueryOptions): UseQueryResult<SegmentType[]>
|
|
172
159
|
|
|
173
160
|
export function buildUrlFromSegment(args: {
|
|
174
|
-
columns: ColumnType[]
|
|
175
|
-
filters: filters[]
|
|
176
|
-
id: string
|
|
161
|
+
columns: ColumnType[],
|
|
162
|
+
filters: filters[],
|
|
163
|
+
id: string
|
|
177
164
|
}): string;
|
|
178
165
|
|
|
179
|
-
export function useDestroySegment(
|
|
180
|
-
options?: UseMutationOptions
|
|
181
|
-
): UseMutationResult<TData, TError, TVariables, TContext>;
|
|
166
|
+
export function useDestroySegment(options?: UseMutationOptions): UseMutationResult<TData, TError, TVariables, TContext>;
|
|
182
167
|
|
|
183
|
-
export function useUpdateSegment(
|
|
184
|
-
options?: UseMutationOptions
|
|
185
|
-
): UseMutationResult<TData, TError, TVariables, TContext>;
|
|
168
|
+
export function useUpdateSegment(options?: UseMutationOptions): UseMutationResult<TData, TError, TVariables, TContext>;
|
|
186
169
|
|
|
187
170
|
export function buildUrlFromFilters(args: {
|
|
188
|
-
columns: ColumnType[]
|
|
189
|
-
filters: filters[]
|
|
190
|
-
isClearAll?: boolean
|
|
191
|
-
childrenKeys?: string[]
|
|
171
|
+
columns: ColumnType[],
|
|
172
|
+
filters: filters[],
|
|
173
|
+
isClearAll?: boolean,
|
|
174
|
+
childrenKeys?: string[]
|
|
192
175
|
}): string;
|