@popmenu/table 0.69.0 → 0.71.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.
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare type FilterPanelContextValue = {
3
+ anchorState: [Element | null, React.Dispatch<React.SetStateAction<Element | null>>];
4
+ };
5
+ export declare const FilterPanelContext: React.Context<FilterPanelContextValue | null>;
6
+ export declare const useFilterPanelContext: () => FilterPanelContextValue;
7
+ export {};
@@ -0,0 +1 @@
1
+ export { FilterPanelContext, useFilterPanelContext } from './FilterPanelContext';
@@ -3,6 +3,7 @@ import { TableProps } from './TableProps';
3
3
  declare const defaultTableProps: {
4
4
  enableSortingRemoval: boolean;
5
5
  fullWidth: boolean;
6
+ paginated: boolean;
6
7
  sortable: boolean;
7
8
  searchable: boolean;
8
9
  };
@@ -12,6 +13,7 @@ export declare const Table: {
12
13
  defaultProps: {
13
14
  enableSortingRemoval: boolean;
14
15
  fullWidth: boolean;
16
+ paginated: boolean;
15
17
  sortable: boolean;
16
18
  searchable: boolean;
17
19
  };
@@ -22,6 +22,8 @@ export interface TableProps<T = unknown> {
22
22
  searchable?: boolean;
23
23
  /** Makes columns sortable. For uncontrolled sorting only. */
24
24
  sortable?: boolean;
25
+ /** Enables and disables pagination all together for the table. */
26
+ paginated?: boolean;
25
27
  /** Sorting state. Expects the result of a React useState hook. Used only for manual sorting. */
26
28
  sortingState?: [SortingState, Dispatch<SetStateAction<SortingState>>];
27
29
  /** Pagination state. Expects the result of a React useState hook. Used only for manual pagination. */
package/build/index.es.js CHANGED
@@ -139,7 +139,7 @@ function __rest$2(s, e) {
139
139
  return t;
140
140
  }
141
141
 
142
- var _g$1j$1;
142
+ var _g$1i$1;
143
143
 
144
144
  function _extends$2j$1() { _extends$2j$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2j$1.apply(this, arguments); }
145
145
 
@@ -151,7 +151,7 @@ function SvgCheckCircle$1(props) {
151
151
  strokeLinejoin: "round",
152
152
  width: "1em",
153
153
  height: "1em"
154
- }, props), _g$1j$1 || (_g$1j$1 = /*#__PURE__*/React.createElement("g", {
154
+ }, props), _g$1i$1 || (_g$1i$1 = /*#__PURE__*/React.createElement("g", {
155
155
  stroke: "currentColor"
156
156
  }, /*#__PURE__*/React.createElement("path", {
157
157
  d: "M14.667 7.387V8a6.667 6.667 0 11-3.954-6.093"
@@ -160,7 +160,7 @@ function SvgCheckCircle$1(props) {
160
160
  }))));
161
161
  }
162
162
 
163
- var _g$1h, _defs$H;
163
+ var _g$1g, _defs$G;
164
164
 
165
165
  function _extends$2g() { _extends$2g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2g.apply(this, arguments); }
166
166
 
@@ -172,12 +172,12 @@ function SvgXCircle(props) {
172
172
  strokeLinejoin: "round",
173
173
  width: "1em",
174
174
  height: "1em"
175
- }, props), _g$1h || (_g$1h = /*#__PURE__*/React.createElement("g", {
175
+ }, props), _g$1g || (_g$1g = /*#__PURE__*/React.createElement("g", {
176
176
  clipPath: "url(#x-circle_svg__clip0_8_6136)",
177
177
  stroke: "currentColor"
178
178
  }, /*#__PURE__*/React.createElement("path", {
179
179
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM10 6l-4 4m0-4l4 4"
180
- }))), _defs$H || (_defs$H = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
180
+ }))), _defs$G || (_defs$G = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
181
181
  id: "x-circle_svg__clip0_8_6136"
182
182
  }, /*#__PURE__*/React.createElement("path", {
183
183
  fill: "currentColor",
@@ -185,7 +185,7 @@ function SvgXCircle(props) {
185
185
  })))));
186
186
  }
187
187
 
188
- var _g$18$1, _defs$B$1;
188
+ var _g$17$1, _defs$A$1;
189
189
 
190
190
  function _extends$24$1() { _extends$24$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$24$1.apply(this, arguments); }
191
191
 
@@ -197,12 +197,12 @@ function SvgInfo$1(props) {
197
197
  strokeLinejoin: "round",
198
198
  width: "1em",
199
199
  height: "1em"
200
- }, props), _g$18$1 || (_g$18$1 = /*#__PURE__*/React.createElement("g", {
200
+ }, props), _g$17$1 || (_g$17$1 = /*#__PURE__*/React.createElement("g", {
201
201
  clipPath: "url(#info_svg__clip0_8_5377)",
202
202
  stroke: "currentColor"
203
203
  }, /*#__PURE__*/React.createElement("path", {
204
204
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-4V8m0-2.667h.007"
205
- }))), _defs$B$1 || (_defs$B$1 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
205
+ }))), _defs$A$1 || (_defs$A$1 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
206
206
  id: "info_svg__clip0_8_5377"
207
207
  }, /*#__PURE__*/React.createElement("path", {
208
208
  fill: "currentColor",
@@ -210,7 +210,7 @@ function SvgInfo$1(props) {
210
210
  })))));
211
211
  }
212
212
 
213
- var _path$I$1;
213
+ var _path$J$1;
214
214
 
215
215
  function _extends$1D$1() { _extends$1D$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1D$1.apply(this, arguments); }
216
216
 
@@ -222,13 +222,13 @@ function SvgUser$1(props) {
222
222
  strokeLinejoin: "round",
223
223
  width: "1em",
224
224
  height: "1em"
225
- }, props), _path$I$1 || (_path$I$1 = /*#__PURE__*/React.createElement("path", {
225
+ }, props), _path$J$1 || (_path$J$1 = /*#__PURE__*/React.createElement("path", {
226
226
  d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z",
227
227
  stroke: "currentColor"
228
228
  })));
229
229
  }
230
230
 
231
- var _g$U$1, _defs$s$1;
231
+ var _g$T$1, _defs$r$1;
232
232
 
233
233
  function _extends$1z$1() { _extends$1z$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1z$1.apply(this, arguments); }
234
234
 
@@ -240,12 +240,12 @@ function SvgError$1(props) {
240
240
  strokeLinejoin: "round",
241
241
  width: "1em",
242
242
  height: "1em"
243
- }, props), _g$U$1 || (_g$U$1 = /*#__PURE__*/React.createElement("g", {
243
+ }, props), _g$T$1 || (_g$T$1 = /*#__PURE__*/React.createElement("g", {
244
244
  clipPath: "url(#error_svg__clip0_8_5411)",
245
245
  stroke: "currentColor"
246
246
  }, /*#__PURE__*/React.createElement("path", {
247
247
  d: "M5.24 1.333h5.52l3.907 3.907v5.52l-3.907 3.907H5.24L1.333 10.76V5.24L5.24 1.333zm2.76 4V8m0 2.666h.008"
248
- }))), _defs$s$1 || (_defs$s$1 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
248
+ }))), _defs$r$1 || (_defs$r$1 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
249
249
  id: "error_svg__clip0_8_5411"
250
250
  }, /*#__PURE__*/React.createElement("path", {
251
251
  fill: "currentColor",
@@ -253,7 +253,7 @@ function SvgError$1(props) {
253
253
  })))));
254
254
  }
255
255
 
256
- var _path$F$1;
256
+ var _path$G$1;
257
257
 
258
258
  function _extends$1y$1() { _extends$1y$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1y$1.apply(this, arguments); }
259
259
 
@@ -265,7 +265,7 @@ function SvgWarning$1(props) {
265
265
  strokeLinejoin: "round",
266
266
  width: "1em",
267
267
  height: "1em"
268
- }, props), _path$F$1 || (_path$F$1 = /*#__PURE__*/React.createElement("path", {
268
+ }, props), _path$G$1 || (_path$G$1 = /*#__PURE__*/React.createElement("path", {
269
269
  d: "M6.86 2.573L1.213 12a1.334 1.334 0 001.14 2h11.294a1.332 1.332 0 001.14-2L9.14 2.573a1.333 1.333 0 00-2.28 0v0zM8 6v2.667m0 2.667h.007",
270
270
  stroke: "currentColor"
271
271
  })));
@@ -1086,7 +1086,7 @@ var useStyles$6 = makeStyles(function (theme) { return ({
1086
1086
  },
1087
1087
  }); });
1088
1088
 
1089
- var _path$1b;
1089
+ var _path$1c;
1090
1090
 
1091
1091
  function _extends$2E() { _extends$2E = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2E.apply(this, arguments); }
1092
1092
 
@@ -1098,13 +1098,13 @@ function SvgChevronDown(props) {
1098
1098
  strokeLinejoin: "round",
1099
1099
  width: "1em",
1100
1100
  height: "1em"
1101
- }, props), _path$1b || (_path$1b = /*#__PURE__*/React.createElement("path", {
1101
+ }, props), _path$1c || (_path$1c = /*#__PURE__*/React.createElement("path", {
1102
1102
  d: "M4 6l4 4 4-4",
1103
1103
  stroke: "currentColor"
1104
1104
  })));
1105
1105
  }
1106
1106
 
1107
- var _path$1a;
1107
+ var _path$1b;
1108
1108
 
1109
1109
  function _extends$2D() { _extends$2D = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2D.apply(this, arguments); }
1110
1110
 
@@ -1116,13 +1116,13 @@ function SvgChevronUp(props) {
1116
1116
  strokeLinejoin: "round",
1117
1117
  width: "1em",
1118
1118
  height: "1em"
1119
- }, props), _path$1a || (_path$1a = /*#__PURE__*/React.createElement("path", {
1119
+ }, props), _path$1b || (_path$1b = /*#__PURE__*/React.createElement("path", {
1120
1120
  d: "M12 10L8 6l-4 4",
1121
1121
  stroke: "currentColor"
1122
1122
  })));
1123
1123
  }
1124
1124
 
1125
- var _path$14;
1125
+ var _path$15;
1126
1126
 
1127
1127
  function _extends$2s() { _extends$2s = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2s.apply(this, arguments); }
1128
1128
 
@@ -1134,13 +1134,13 @@ function SvgSort(props) {
1134
1134
  strokeLinejoin: "round",
1135
1135
  width: "1em",
1136
1136
  height: "1em"
1137
- }, props), _path$14 || (_path$14 = /*#__PURE__*/React.createElement("path", {
1137
+ }, props), _path$15 || (_path$15 = /*#__PURE__*/React.createElement("path", {
1138
1138
  d: "M11.333 6L8 2.667 4.667 6m6.666 4L8 13.334 4.667 10",
1139
1139
  stroke: "currentColor"
1140
1140
  })));
1141
1141
  }
1142
1142
 
1143
- var _path$Y;
1143
+ var _path$Z;
1144
1144
 
1145
1145
  function _extends$2a() { _extends$2a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2a.apply(this, arguments); }
1146
1146
 
@@ -1152,13 +1152,13 @@ function SvgFilter(props) {
1152
1152
  strokeLinejoin: "round",
1153
1153
  width: "1em",
1154
1154
  height: "1em"
1155
- }, props), _path$Y || (_path$Y = /*#__PURE__*/React.createElement("path", {
1155
+ }, props), _path$Z || (_path$Z = /*#__PURE__*/React.createElement("path", {
1156
1156
  d: "M14.667 2H1.333l5.334 6.307v4.36L9.333 14V8.307L14.667 2z",
1157
1157
  stroke: "currentColor"
1158
1158
  })));
1159
1159
  }
1160
1160
 
1161
- var _path$Q;
1161
+ var _path$R;
1162
1162
 
1163
1163
  function _extends$1V() { _extends$1V = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1V.apply(this, arguments); }
1164
1164
 
@@ -1170,13 +1170,13 @@ function SvgMore(props) {
1170
1170
  strokeLinejoin: "round",
1171
1171
  width: "1em",
1172
1172
  height: "1em"
1173
- }, props), _path$Q || (_path$Q = /*#__PURE__*/React.createElement("path", {
1173
+ }, props), _path$R || (_path$R = /*#__PURE__*/React.createElement("path", {
1174
1174
  d: "M8 8.667a.667.667 0 100-1.334.667.667 0 000 1.334zM8 4a.667.667 0 100-1.334A.667.667 0 008 4zm0 9.333A.667.667 0 108 12a.667.667 0 000 1.333z",
1175
1175
  stroke: "currentColor"
1176
1176
  })));
1177
1177
  }
1178
1178
 
1179
- var _path$M;
1179
+ var _path$N;
1180
1180
 
1181
1181
  function _extends$1P() { _extends$1P = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1P.apply(this, arguments); }
1182
1182
 
@@ -1188,7 +1188,7 @@ function SvgSearch(props) {
1188
1188
  strokeLinejoin: "round",
1189
1189
  width: "1em",
1190
1190
  height: "1em"
1191
- }, props), _path$M || (_path$M = /*#__PURE__*/React.createElement("path", {
1191
+ }, props), _path$N || (_path$N = /*#__PURE__*/React.createElement("path", {
1192
1192
  d: "M7.333 12.667A5.333 5.333 0 107.333 2a5.333 5.333 0 000 10.667zM14 14l-2.9-2.9",
1193
1193
  stroke: "currentColor"
1194
1194
  })));
@@ -1215,12 +1215,22 @@ var useStyles$4 = makeStyles(function (theme) { return ({
1215
1215
 
1216
1216
  var TableContext = createContext({});
1217
1217
 
1218
+ var FilterPanelContext = createContext(null);
1219
+ var useFilterPanelContext = function () {
1220
+ var context = useContext(FilterPanelContext);
1221
+ if (!context) {
1222
+ throw new Error('useFilterPanelContext has to be used within <FilterPanelContext.Provider>');
1223
+ }
1224
+ return context;
1225
+ };
1226
+
1218
1227
  var SelectFilter = function (props) {
1219
1228
  var _a, _b, _c;
1220
1229
  var options = props.options, columnId = props.columnId, multiple = props.multiple;
1221
1230
  var classes = useStyles$4();
1222
1231
  var table = useContext(TableContext);
1223
- var _d = useState(false), open = _d[0], setOpen = _d[1];
1232
+ var _d = useFilterPanelContext().anchorState, setAnchorEl = _d[1];
1233
+ var _e = useState(false), open = _e[0], setOpen = _e[1];
1224
1234
  var column = table.getColumn(columnId);
1225
1235
  var meta = column.columnDef.meta;
1226
1236
  var filterName = (_a = meta === null || meta === void 0 ? void 0 : meta.filter) === null || _a === void 0 ? void 0 : _a.name;
@@ -1255,6 +1265,7 @@ var SelectFilter = function (props) {
1255
1265
  var handleChange = function (event) {
1256
1266
  event.stopPropagation();
1257
1267
  column.setFilterValue(event.target.value);
1268
+ setAnchorEl(null);
1258
1269
  };
1259
1270
  var handleItemClick = function () {
1260
1271
  if (multiple) {
@@ -1485,7 +1496,7 @@ function __rest(s, e) {
1485
1496
  return t;
1486
1497
  }
1487
1498
 
1488
- var _path$I;
1499
+ var _path$J;
1489
1500
 
1490
1501
  function _extends$1D() { _extends$1D = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1D.apply(this, arguments); }
1491
1502
 
@@ -1497,7 +1508,7 @@ function SvgUser(props) {
1497
1508
  strokeLinejoin: "round",
1498
1509
  width: "1em",
1499
1510
  height: "1em"
1500
- }, props), _path$I || (_path$I = /*#__PURE__*/React.createElement("path", {
1511
+ }, props), _path$J || (_path$J = /*#__PURE__*/React.createElement("path", {
1501
1512
  d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z",
1502
1513
  stroke: "currentColor"
1503
1514
  })));
@@ -2164,7 +2175,7 @@ makeStyles(function (theme) { return ({
2164
2175
  },
2165
2176
  }); });
2166
2177
 
2167
- var _g$1j;
2178
+ var _g$1i;
2168
2179
 
2169
2180
  function _extends$2j() { _extends$2j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2j.apply(this, arguments); }
2170
2181
 
@@ -2176,7 +2187,7 @@ function SvgCheckCircle(props) {
2176
2187
  strokeLinejoin: "round",
2177
2188
  width: "1em",
2178
2189
  height: "1em"
2179
- }, props), _g$1j || (_g$1j = /*#__PURE__*/React.createElement("g", {
2190
+ }, props), _g$1i || (_g$1i = /*#__PURE__*/React.createElement("g", {
2180
2191
  stroke: "currentColor"
2181
2192
  }, /*#__PURE__*/React.createElement("path", {
2182
2193
  d: "M14.667 7.387V8a6.667 6.667 0 11-3.954-6.093"
@@ -2185,7 +2196,7 @@ function SvgCheckCircle(props) {
2185
2196
  }))));
2186
2197
  }
2187
2198
 
2188
- var _path$_;
2199
+ var _path$$;
2189
2200
 
2190
2201
  function _extends$2h() { _extends$2h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2h.apply(this, arguments); }
2191
2202
 
@@ -2197,13 +2208,13 @@ function SvgX(props) {
2197
2208
  strokeLinejoin: "round",
2198
2209
  width: "1em",
2199
2210
  height: "1em"
2200
- }, props), _path$_ || (_path$_ = /*#__PURE__*/React.createElement("path", {
2211
+ }, props), _path$$ || (_path$$ = /*#__PURE__*/React.createElement("path", {
2201
2212
  d: "M12 4l-8 8m0-8l8 8",
2202
2213
  stroke: "currentColor"
2203
2214
  })));
2204
2215
  }
2205
2216
 
2206
- var _g$1b, _defs$C;
2217
+ var _g$1a, _defs$B;
2207
2218
 
2208
2219
  function _extends$27() { _extends$27 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$27.apply(this, arguments); }
2209
2220
 
@@ -2215,14 +2226,14 @@ function SvgHelp(props) {
2215
2226
  strokeLinejoin: "round",
2216
2227
  width: "1em",
2217
2228
  height: "1em"
2218
- }, props), _g$1b || (_g$1b = /*#__PURE__*/React.createElement("g", {
2229
+ }, props), _g$1a || (_g$1a = /*#__PURE__*/React.createElement("g", {
2219
2230
  clipPath: "url(#help_svg__clip0_8_5446)",
2220
2231
  stroke: "currentColor"
2221
2232
  }, /*#__PURE__*/React.createElement("path", {
2222
2233
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z"
2223
2234
  }), /*#__PURE__*/React.createElement("path", {
2224
2235
  d: "M6.06 6a2 2 0 013.887.667c0 1.333-2 2-2 2M8 11.334h.007"
2225
- }))), _defs$C || (_defs$C = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
2236
+ }))), _defs$B || (_defs$B = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
2226
2237
  id: "help_svg__clip0_8_5446"
2227
2238
  }, /*#__PURE__*/React.createElement("path", {
2228
2239
  fill: "currentColor",
@@ -2230,7 +2241,7 @@ function SvgHelp(props) {
2230
2241
  })))));
2231
2242
  }
2232
2243
 
2233
- var _g$18, _defs$B;
2244
+ var _g$17, _defs$A;
2234
2245
 
2235
2246
  function _extends$24() { _extends$24 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$24.apply(this, arguments); }
2236
2247
 
@@ -2242,12 +2253,12 @@ function SvgInfo(props) {
2242
2253
  strokeLinejoin: "round",
2243
2254
  width: "1em",
2244
2255
  height: "1em"
2245
- }, props), _g$18 || (_g$18 = /*#__PURE__*/React.createElement("g", {
2256
+ }, props), _g$17 || (_g$17 = /*#__PURE__*/React.createElement("g", {
2246
2257
  clipPath: "url(#info_svg__clip0_8_5377)",
2247
2258
  stroke: "currentColor"
2248
2259
  }, /*#__PURE__*/React.createElement("path", {
2249
2260
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-4V8m0-2.667h.007"
2250
- }))), _defs$B || (_defs$B = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
2261
+ }))), _defs$A || (_defs$A = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
2251
2262
  id: "info_svg__clip0_8_5377"
2252
2263
  }, /*#__PURE__*/React.createElement("path", {
2253
2264
  fill: "currentColor",
@@ -2255,7 +2266,7 @@ function SvgInfo(props) {
2255
2266
  })))));
2256
2267
  }
2257
2268
 
2258
- var _g$U, _defs$s;
2269
+ var _g$T, _defs$r;
2259
2270
 
2260
2271
  function _extends$1z() { _extends$1z = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1z.apply(this, arguments); }
2261
2272
 
@@ -2267,12 +2278,12 @@ function SvgError(props) {
2267
2278
  strokeLinejoin: "round",
2268
2279
  width: "1em",
2269
2280
  height: "1em"
2270
- }, props), _g$U || (_g$U = /*#__PURE__*/React.createElement("g", {
2281
+ }, props), _g$T || (_g$T = /*#__PURE__*/React.createElement("g", {
2271
2282
  clipPath: "url(#error_svg__clip0_8_5411)",
2272
2283
  stroke: "currentColor"
2273
2284
  }, /*#__PURE__*/React.createElement("path", {
2274
2285
  d: "M5.24 1.333h5.52l3.907 3.907v5.52l-3.907 3.907H5.24L1.333 10.76V5.24L5.24 1.333zm2.76 4V8m0 2.666h.008"
2275
- }))), _defs$s || (_defs$s = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
2286
+ }))), _defs$r || (_defs$r = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
2276
2287
  id: "error_svg__clip0_8_5411"
2277
2288
  }, /*#__PURE__*/React.createElement("path", {
2278
2289
  fill: "currentColor",
@@ -2280,7 +2291,7 @@ function SvgError(props) {
2280
2291
  })))));
2281
2292
  }
2282
2293
 
2283
- var _path$F;
2294
+ var _path$G;
2284
2295
 
2285
2296
  function _extends$1y() { _extends$1y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1y.apply(this, arguments); }
2286
2297
 
@@ -2292,7 +2303,7 @@ function SvgWarning(props) {
2292
2303
  strokeLinejoin: "round",
2293
2304
  width: "1em",
2294
2305
  height: "1em"
2295
- }, props), _path$F || (_path$F = /*#__PURE__*/React.createElement("path", {
2306
+ }, props), _path$G || (_path$G = /*#__PURE__*/React.createElement("path", {
2296
2307
  d: "M6.86 2.573L1.213 12a1.334 1.334 0 001.14 2h11.294a1.332 1.332 0 001.14-2L9.14 2.573a1.333 1.333 0 00-2.28 0v0zM8 6v2.667m0 2.667h.007",
2297
2308
  stroke: "currentColor"
2298
2309
  })));
@@ -2805,17 +2816,17 @@ var useSettingsIndexCardStyles = makeStyles$1(function (theme) { return ({
2805
2816
  }); });
2806
2817
 
2807
2818
  var SettingsIndexCard = forwardRef(function (props, ref) {
2808
- var title = props.title, description = props.description, Icon = props.Icon, onClick = props.onClick, statusLabel = props.statusLabel, restProps = __rest$1(props, ["title", "description", "Icon", "onClick", "statusLabel"]);
2819
+ var title = props.title, description = props.description, Icon$1 = props.Icon, onClick = props.onClick, statusLabel = props.statusLabel, restProps = __rest$1(props, ["title", "description", "Icon", "onClick", "statusLabel"]);
2809
2820
  var classes = useSettingsIndexCardStyles(props);
2810
2821
  var showStatusLabel = (statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.text) && (statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.color);
2811
2822
  return (React__default.createElement(ButtonBase, __assign$1({ onClick: onClick, ref: ref }, restProps),
2812
2823
  React__default.createElement(Card, { classes: { root: classes.cardRoot } },
2813
2824
  React__default.createElement(CardContent, { classes: { root: classes.cardContentRoot } },
2814
2825
  React__default.createElement(Box, { fontSize: "32px", display: "flex", justifyContent: 'space-between', alignItems: "center", paddingBottom: 2 },
2815
- React__default.createElement(Icon$1, { icon: Icon || SvgHelp, size: "inherit" }),
2816
- showStatusLabel && (React__default.createElement(Typography$1, { weight: "semi-bold", variant: "body2", color: statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.color }, statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.text))),
2817
- React__default.createElement(Typography$1, { align: "left", variant: "h6", gutterBottom: true }, title),
2818
- description && (React__default.createElement(Typography$1, { align: "left", variant: "body2", color: "grey.700" }, description))))));
2826
+ React__default.createElement(Icon, { icon: Icon$1 || SvgHelp, size: "inherit" }),
2827
+ showStatusLabel && (React__default.createElement(Typography, { weight: "semi-bold", variant: "body2", color: statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.color }, statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.text))),
2828
+ React__default.createElement(Typography, { align: "left", variant: "h6", gutterBottom: true }, title),
2829
+ description && (React__default.createElement(Typography, { align: "left", variant: "body2", color: "grey.700" }, description))))));
2819
2830
  });
2820
2831
  SettingsIndexCard.displayName = 'SettingsIndexCard';
2821
2832
 
@@ -3183,7 +3194,7 @@ var FilterPanel = function () {
3183
3194
  var handleClose = function () {
3184
3195
  setAnchorEl(null);
3185
3196
  };
3186
- return (React__default.createElement(React__default.Fragment, null,
3197
+ return (React__default.createElement(FilterPanelContext.Provider, { value: { anchorState: [anchorEl, setAnchorEl] } },
3187
3198
  React__default.createElement(Trigger, { onClick: handleClick }),
3188
3199
  React__default.createElement(Panel, { onClose: handleClose, anchorEl: anchorEl })));
3189
3200
  };
@@ -3991,11 +4002,12 @@ var ColumnFilterResetButton = function (props) {
3991
4002
  var defaultTableProps = {
3992
4003
  enableSortingRemoval: true,
3993
4004
  fullWidth: true,
4005
+ paginated: true,
3994
4006
  sortable: false,
3995
4007
  searchable: false,
3996
4008
  };
3997
4009
  var Table = function (props) {
3998
- var title = props.title, data = props.data, columns = props.columns, enableSortingRemoval = props.enableSortingRemoval, loading = props.loading, searchable = props.searchable, sortable = props.sortable, externalFilterState = props.filterState, externalGlobalFilterState = props.globalFilterState, externalPaginationState = props.paginationState, externalSortingState = props.sortingState, externalVisibilityState = props.visibilityState, pageCount = props.pageCount, GlobalFilterProps = props.GlobalFilterProps, Empty = props.Empty, idBase = props.idBase;
4010
+ var title = props.title, data = props.data, columns = props.columns, enableSortingRemoval = props.enableSortingRemoval, loading = props.loading, searchable = props.searchable, sortable = props.sortable, externalFilterState = props.filterState, externalGlobalFilterState = props.globalFilterState, externalPaginationState = props.paginationState, externalSortingState = props.sortingState, externalVisibilityState = props.visibilityState, paginated = props.paginated, pageCount = props.pageCount, GlobalFilterProps = props.GlobalFilterProps, Empty = props.Empty, idBase = props.idBase;
3999
4011
  var classes = useStyles$7(props);
4000
4012
  var rootRef = useRef(null);
4001
4013
  // Prepare Empty State
@@ -4021,7 +4033,7 @@ var Table = function (props) {
4021
4033
  var columnVisibility = (externalVisibilityState || [])[0];
4022
4034
  var isControlledColumnVisibility = Boolean(externalVisibilityState);
4023
4035
  // Init table instance
4024
- var table = useReactTable(__assign$3(__assign$3(__assign$3(__assign$3(__assign$3({ data: data, columns: columns, state: __assign$3(__assign$3(__assign$3(__assign$3(__assign$3({}, (isControlledPagination && { pagination: pagination })), (isControlledGlobalFilter && { globalFilter: globalFilter })), (isControlledColumnFilters && { columnFilters: columnFilters })), (isControlledColumnVisibility && { columnVisibility: columnVisibility })), (isControlledColumnSort && { sorting: sorting })), enableSorting: sortable, enableSortingRemoval: enableSortingRemoval, globalFilterFn: coercedValueIncludesString, getCoreRowModel: getCoreRowModel(), getSortedRowModel: getSortedRowModel(), getFilteredRowModel: getFilteredRowModel(), getPaginationRowModel: getPaginationRowModel() }, (isControlledPagination && controlledPaginationOptions)), (isControlledGlobalFilter && controlledGlobalFilterOptions)), (isControlledColumnFilters && controlledColumnFiltersOptions)), (isControlledColumnSort && controlledColumnSortOptions)), { meta: { idBase: idBase } }));
4036
+ var table = useReactTable(__assign$3(__assign$3(__assign$3(__assign$3(__assign$3(__assign$3({ data: data, columns: columns, state: __assign$3(__assign$3(__assign$3(__assign$3(__assign$3({}, (isControlledPagination && { pagination: pagination })), (isControlledGlobalFilter && { globalFilter: globalFilter })), (isControlledColumnFilters && { columnFilters: columnFilters })), (isControlledColumnVisibility && { columnVisibility: columnVisibility })), (isControlledColumnSort && { sorting: sorting })), enableSorting: sortable, enableSortingRemoval: enableSortingRemoval, globalFilterFn: coercedValueIncludesString, getCoreRowModel: getCoreRowModel(), getSortedRowModel: getSortedRowModel(), getFilteredRowModel: getFilteredRowModel() }, (paginated && { getPaginationRowModel: getPaginationRowModel() })), (isControlledPagination && controlledPaginationOptions)), (isControlledGlobalFilter && controlledGlobalFilterOptions)), (isControlledColumnFilters && controlledColumnFiltersOptions)), (isControlledColumnSort && controlledColumnSortOptions)), { meta: { idBase: idBase } }));
4025
4037
  var _f = useColumnFilters(table), selectedColumnFilters = _f.selectedColumnFilters, hasColumnFilters = _f.hasColumnFilters, deselectColumnFilter = _f.deselectColumnFilter, formatSelectedFilterText = _f.formatSelectedFilterText, resetColumnFilters = _f.resetColumnFilters;
4026
4038
  var handlePagination = function (_e, pageNumber) {
4027
4039
  var pageIndex = pageNumber - 1;
@@ -4050,7 +4062,7 @@ var Table = function (props) {
4050
4062
  isEmpty && isEmptyComponentValid && Empty && !loading && (React__default.createElement(Box, { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", p: 2, flexGrow: 1 }, createElement(Empty))),
4051
4063
  loading && (React__default.createElement(Box, { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", p: 2, flexGrow: 1 },
4052
4064
  React__default.createElement(CircularProgress, { size: 80, color: "inherit" }))),
4053
- table.getPageCount() > 1 && (React__default.createElement(TableFooter, null,
4065
+ paginated && table.getPageCount() > 1 && (React__default.createElement(TableFooter, null,
4054
4066
  React__default.createElement(Pagination, { page: table.getState().pagination.pageIndex + 1, count: table.getPageCount(), onChange: handlePagination, disabled: loading }))))));
4055
4067
  };
4056
4068
  Table.defaultProps = defaultTableProps;