@bigbinary/neeto-filters-frontend 3.1.3 → 3.2.0-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-filters-frontend",
3
- "version": "3.1.3",
3
+ "version": "3.2.0-beta.1",
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.14",
55
- "@bigbinary/neeto-filters-frontend": "3.1.2",
54
+ "@bigbinary/neeto-commons-frontend": "3.1.17",
55
+ "@bigbinary/neeto-filters-frontend": "3.1.3",
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.0",
59
+ "@bigbinary/neetoui": "6.2.2",
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.14",
158
- "@bigbinary/neeto-filters-frontend": "3.1.2",
157
+ "@bigbinary/neeto-commons-frontend": "3.1.17",
158
+ "@bigbinary/neeto-filters-frontend": "3.1.3",
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.0",
162
+ "@bigbinary/neetoui": "6.2.2",
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,6 +1,12 @@
1
1
  import React from "react";
2
2
  import { ButtonProps, PaneProps } from "@bigbinary/neetoui";
3
- import { UseQueryResult, UseQueryOptions, UseMutationOptions, UseMutationResult, MutationOptions } from "react-query";
3
+ import {
4
+ UseQueryResult,
5
+ UseQueryOptions,
6
+ UseMutationOptions,
7
+ UseMutationResult,
8
+ MutationOptions,
9
+ } from "react-query";
4
10
 
5
11
  interface labelAndValue {
6
12
  label: string | number;
@@ -11,10 +17,10 @@ type helpIconProps = {
11
17
  icon?: string;
12
18
  onClick?: () => void;
13
19
  tooltipProps: {
14
- content: string,
15
- position?: string,
16
- }
17
- }
20
+ content: string;
21
+ position?: string;
22
+ };
23
+ };
18
24
  interface ColumnType {
19
25
  suffixComponent?: React.ComponentType<any>;
20
26
  helpIconProps?: helpIconProps;
@@ -41,9 +47,9 @@ interface KeywordType {
41
47
  }
42
48
 
43
49
  interface SegmentType {
44
- id: string,
45
- name: string,
46
- filters: filters[]
50
+ id: string;
51
+ name: string;
52
+ filters: filters[];
47
53
  }
48
54
 
49
55
  type condition = {
@@ -116,6 +122,7 @@ export function Bar(props: {
116
122
  onSelectorsChange?: (selectors: selectors) => void;
117
123
  childrenKeys?: string[];
118
124
  defaultSegmentName?: string;
125
+ customFilters?: React.ReactNode;
119
126
  [otherProps: string]: any;
120
127
  }): JSX.Element;
121
128
 
@@ -124,6 +131,8 @@ export function Segments(props: {
124
131
  columns: ColumnType[];
125
132
  setIsFilterPaneOpen: (boolean) => void;
126
133
  defaultSegmentName?: string;
134
+ customFilters?: React.ReactNode;
135
+ childrenKeys?: string[];
127
136
  }): JSX.Element;
128
137
 
129
138
  export function buildFiltersFromURL(
@@ -144,33 +153,40 @@ type FieldType = {
144
153
  displayOrder?: number;
145
154
  ownerType?: string;
146
155
  ownerId?: string;
147
- }
156
+ };
148
157
 
149
158
  export function buildFilterColumnsFromFields(args: {
150
- fields: Array<FieldType>,
151
- selectedFields?: string[],
152
- showRuleSelector?: boolean,
153
- groupName?: string
159
+ fields: Array<FieldType>;
160
+ selectedFields?: string[];
161
+ showRuleSelector?: boolean;
162
+ groupName?: string;
154
163
  }): ColumnType[];
155
164
 
156
- export function useFetchSegments(args: {
157
- entity: string,
158
- searchTerm?: string,
159
- }, options?: UseQueryOptions): UseQueryResult<SegmentType[]>
165
+ export function useFetchSegments(
166
+ args: {
167
+ entity: string;
168
+ searchTerm?: string;
169
+ },
170
+ options?: UseQueryOptions
171
+ ): UseQueryResult<SegmentType[]>;
160
172
 
161
173
  export function buildUrlFromSegment(args: {
162
- columns: ColumnType[],
163
- filters: filters[],
164
- id: string
174
+ columns: ColumnType[];
175
+ filters: filters[];
176
+ id: string;
165
177
  }): string;
166
178
 
167
- export function useDestroySegment(options?: UseMutationOptions): UseMutationResult<TData, TError, TVariables, TContext>;
179
+ export function useDestroySegment(
180
+ options?: UseMutationOptions
181
+ ): UseMutationResult<TData, TError, TVariables, TContext>;
168
182
 
169
- export function useUpdateSegment(options?: UseMutationOptions): UseMutationResult<TData, TError, TVariables, TContext>;
183
+ export function useUpdateSegment(
184
+ options?: UseMutationOptions
185
+ ): UseMutationResult<TData, TError, TVariables, TContext>;
170
186
 
171
187
  export function buildUrlFromFilters(args: {
172
- columns: ColumnType[],
173
- filters: filters[],
174
- isClearAll?: boolean,
175
- childrenKeys?: string[]
188
+ columns: ColumnType[];
189
+ filters: filters[];
190
+ isClearAll?: boolean;
191
+ childrenKeys?: string[];
176
192
  }): string;