@veeqo/transfigure 1.2.4 → 1.2.5

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.
Files changed (73) hide show
  1. package/dist/index100.cjs +1 -19
  2. package/dist/index100.js +28 -23
  3. package/dist/index101.cjs +1 -1
  4. package/dist/index101.js +20 -14
  5. package/dist/index102.cjs +12 -1
  6. package/dist/index102.js +16 -21
  7. package/dist/index103.cjs +1 -1
  8. package/dist/index103.js +14 -37
  9. package/dist/index104.cjs +1 -1
  10. package/dist/index104.js +23 -28
  11. package/dist/index105.cjs +1 -12
  12. package/dist/index105.js +7 -16
  13. package/dist/index107.cjs +1 -1
  14. package/dist/index107.js +2 -19
  15. package/dist/index108.cjs +1 -1
  16. package/dist/index108.js +18 -7
  17. package/dist/index109.cjs +1 -1
  18. package/dist/index109.js +7 -63
  19. package/dist/index11.cjs +1 -1
  20. package/dist/index11.js +1 -1
  21. package/dist/index110.cjs +1 -1
  22. package/dist/index110.js +60 -26
  23. package/dist/index111.cjs +1 -1
  24. package/dist/index111.js +30 -2
  25. package/dist/index34.cjs +1 -1
  26. package/dist/index34.js +1 -1
  27. package/dist/index36.cjs +1 -1
  28. package/dist/index36.js +2 -2
  29. package/dist/index39.cjs +1 -1
  30. package/dist/index39.js +1 -1
  31. package/dist/index40.cjs +1 -1
  32. package/dist/index40.js +1 -1
  33. package/dist/index41.cjs +1 -1
  34. package/dist/index41.js +1 -1
  35. package/dist/index44.cjs +1 -1
  36. package/dist/index44.js +1 -1
  37. package/dist/index47.cjs +1 -1
  38. package/dist/index47.js +2 -2
  39. package/dist/index68.cjs +1 -1
  40. package/dist/index68.js +114 -114
  41. package/dist/index80.cjs +1 -1
  42. package/dist/index80.js +1 -1
  43. package/dist/index84.cjs +1 -1
  44. package/dist/index84.js +1 -1
  45. package/dist/index85.cjs +1 -1
  46. package/dist/index85.js +1 -1
  47. package/dist/index86.cjs +1 -1
  48. package/dist/index86.js +41 -5
  49. package/dist/index87.cjs +1 -1
  50. package/dist/index87.js +9 -41
  51. package/dist/index88.cjs +1 -1
  52. package/dist/index88.js +4 -8
  53. package/dist/index89.cjs +1 -1
  54. package/dist/index89.js +7 -7
  55. package/dist/index91.cjs +1 -1
  56. package/dist/index91.js +13 -7
  57. package/dist/index92.cjs +104 -1
  58. package/dist/index92.js +120 -13
  59. package/dist/index93.cjs +1 -104
  60. package/dist/index93.js +65 -117
  61. package/dist/index94.cjs +1 -1
  62. package/dist/index94.js +24 -63
  63. package/dist/index95.cjs +1 -1
  64. package/dist/index95.js +2 -29
  65. package/dist/index96.cjs +1 -1
  66. package/dist/index96.js +41 -2
  67. package/dist/index97.cjs +1 -1
  68. package/dist/index97.js +9 -39
  69. package/dist/index98.cjs +19 -1
  70. package/dist/index98.js +24 -11
  71. package/dist/index99.cjs +1 -1
  72. package/dist/index99.js +36 -22
  73. package/package.json +1 -1
package/dist/index68.js CHANGED
@@ -1,15 +1,15 @@
1
- var U = Object.defineProperty;
2
- var O = (b, t, l) => t in b ? U(b, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : b[t] = l;
3
- var f = (b, t, l) => O(b, typeof t != "symbol" ? t + "" : t, l);
4
- import { makeObservable as L, computed as M, action as g, observable as c } from "mobx";
5
- import { DateRanges as C } from "@veeqo/ui";
6
- import { parseDate as D } from "@internationalized/date";
7
- import I from "lodash/isEqual";
1
+ var C = Object.defineProperty;
2
+ var U = (b, t, l) => t in b ? C(b, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : b[t] = l;
3
+ var h = (b, t, l) => U(b, typeof t != "symbol" ? t + "" : t, l);
4
+ import { makeObservable as O, computed as M, action as F, observable as c } from "mobx";
5
+ import { DateRanges as L } from "@veeqo/ui";
6
+ import { parseDate as _ } from "@internationalized/date";
7
+ import D from "lodash/isEqual";
8
8
  import G from "lodash/get";
9
9
  import R from "lodash/set";
10
10
  import T from "qs";
11
11
  import { FilterChoiceValue as m } from "./index49.js";
12
- import { SortingMode as P } from "./index2.js";
12
+ import { SortingMode as I } from "./index2.js";
13
13
  import { RangeFilter as w } from "./index70.js";
14
14
  import { NumberRangeFilter as v } from "./index69.js";
15
15
  import { ALL_VIEW_ID as V } from "./index79.js";
@@ -18,38 +18,38 @@ import { BusinessLogicManager as d } from "./index9.js";
18
18
  class ee {
19
19
  constructor() {
20
20
  // PAGINATION
21
- f(this, "defaultPageSize");
22
- f(this, "pageSize");
23
- f(this, "currentPage");
21
+ h(this, "defaultPageSize");
22
+ h(this, "pageSize");
23
+ h(this, "currentPage");
24
24
  // DEFAULT FILTERS
25
- f(this, "defaultFilters");
26
- f(this, "defaultArrayFilters");
27
- f(this, "defaultDateRangeFilters");
28
- f(this, "defaultNumberRangeFilters");
25
+ h(this, "defaultFilters");
26
+ h(this, "defaultArrayFilters");
27
+ h(this, "defaultDateRangeFilters");
28
+ h(this, "defaultNumberRangeFilters");
29
29
  // CURRENT FILTERS
30
- f(this, "filters");
31
- f(this, "arrayFilters");
32
- f(this, "dateRangeFilters");
33
- f(this, "numberRangeFilters");
30
+ h(this, "filters");
31
+ h(this, "arrayFilters");
32
+ h(this, "dateRangeFilters");
33
+ h(this, "numberRangeFilters");
34
34
  // VIEWS
35
- f(this, "activeViewId");
35
+ h(this, "activeViewId");
36
36
  // VISIBILITY STATE
37
- f(this, "isFiltersDropdownVisible");
38
- f(this, "initDefaultFilterMaps", () => {
37
+ h(this, "isFiltersDropdownVisible");
38
+ h(this, "initDefaultFilterMaps", () => {
39
39
  this.defaultFilters = new Map(this.filters), this.defaultArrayFilters = new Map(this.arrayFilters), this.defaultDateRangeFilters = new Map(this.dateRangeFilters), this.defaultNumberRangeFilters = new Map(this.numberRangeFilters);
40
40
  });
41
- f(this, "updateUrl", (t = !1) => {
41
+ h(this, "updateUrl", (t = !1) => {
42
42
  try {
43
- const { SORT_FILTER_ID: l, SORTING_MODE: s } = d.getBusinessLogic(), e = T.parse(window.location.search, { ignoreQueryPrefix: !0 }), i = e[l], h = e.sort_order, F = e.sort;
43
+ const { SORT_FILTER_ID: l, SORTING_MODE: s } = d.getBusinessLogic(), e = T.parse(window.location.search, { ignoreQueryPrefix: !0 }), i = e[l], f = e.sort_order, g = e.sort;
44
44
  let o = "";
45
45
  switch (s) {
46
- case P.CORAL:
47
- if (h && F) {
48
- const u = { ...this.queryParamsObject, sort: F, sort_order: h };
46
+ case I.CORAL:
47
+ if (f && g) {
48
+ const u = { ...this.queryParamsObject, sort: g, sort_order: f };
49
49
  o = `${window.location.pathname}?${T.stringify(u, { arrayFormat: "brackets" })}`;
50
50
  }
51
51
  break;
52
- case P.MONOLITH:
52
+ case I.MONOLITH:
53
53
  default:
54
54
  if (i) {
55
55
  const u = { ...this.queryParamsObject, [l]: i };
@@ -62,73 +62,73 @@ class ee {
62
62
  }
63
63
  });
64
64
  // PAGINATION
65
- f(this, "setCurrentPage", (t) => {
65
+ h(this, "setCurrentPage", (t) => {
66
66
  this.currentPage = t;
67
67
  });
68
- f(this, "setPageSize", (t) => {
68
+ h(this, "setPageSize", (t) => {
69
69
  this.pageSize = t, this.updateUrl();
70
70
  });
71
71
  // TEXT FILTERS
72
- f(this, "setFilter", (t, l) => {
73
- this.filters.set(t, l), this.updateUrl();
72
+ h(this, "setFilter", (t, l) => {
73
+ this.filters.set(t, l), this.setCurrentPage(1), this.updateUrl();
74
74
  });
75
- f(this, "clearFilter", (t) => {
76
- this.filters.set(t, ""), this.updateUrl();
75
+ h(this, "clearFilter", (t) => {
76
+ this.filters.set(t, ""), this.setCurrentPage(1), this.updateUrl();
77
77
  });
78
78
  // ARRAY FILTERS
79
- f(this, "setArrayFilter", (t, l) => {
80
- this.arrayFilters.set(t, l), this.updateUrl();
79
+ h(this, "setArrayFilter", (t, l) => {
80
+ this.arrayFilters.set(t, l), this.setCurrentPage(1), this.updateUrl();
81
81
  });
82
- f(this, "clearArrayFilter", (t) => {
83
- this.arrayFilters.set(t, []), this.updateUrl();
82
+ h(this, "clearArrayFilter", (t) => {
83
+ this.arrayFilters.set(t, []), this.setCurrentPage(1), this.updateUrl();
84
84
  });
85
85
  // RANGE FILTERS
86
- f(this, "setRangeFilter", ({
86
+ h(this, "setRangeFilter", ({
87
87
  key: t,
88
88
  range: l,
89
89
  dates: s
90
90
  }) => {
91
- l.setFilterType(t), l.setDates(s.start, s.end), this.updateUrl();
91
+ l.setFilterType(t), l.setDates(s.start, s.end), this.setCurrentPage(1), this.updateUrl();
92
92
  });
93
- f(this, "clearRangeFilter", (t) => {
93
+ h(this, "clearRangeFilter", (t) => {
94
94
  const l = this.dateRangeFilters.get(t);
95
- l && (l.clear(), this.updateUrl());
95
+ l && (l.clear(), this.setCurrentPage(1), this.updateUrl());
96
96
  });
97
97
  // NUMBER RANGE FILTERS
98
- f(this, "setNumberRangeFilter", ({
98
+ h(this, "setNumberRangeFilter", ({
99
99
  numberRange: t,
100
100
  gte: l,
101
101
  lte: s
102
102
  }) => {
103
- t.setGte(l), t.setLte(s), this.updateUrl();
103
+ t.setGte(l), t.setLte(s), this.setCurrentPage(1), this.updateUrl();
104
104
  });
105
- f(this, "clearNumberRangeFilter", (t) => {
105
+ h(this, "clearNumberRangeFilter", (t) => {
106
106
  const l = this.numberRangeFilters.get(t);
107
- l && (l.clear(), this.updateUrl());
107
+ l && (l.clear(), this.setCurrentPage(1), this.updateUrl());
108
108
  });
109
109
  // CLEARING ALL FILTERS
110
- f(this, "clearAllFilters", (t = !1) => {
110
+ h(this, "clearAllFilters", (t = !1) => {
111
111
  const { SEARCH_FILTER_ID: l } = d.getBusinessLogic();
112
112
  this.filters.forEach((s, e) => {
113
113
  e !== l && this.filters.set(e, "");
114
- }), this.arrayFilters.forEach((s, e) => this.arrayFilters.set(e, [])), this.dateRangeFilters.forEach((s) => s.clear()), this.numberRangeFilters.forEach((s) => s.clear()), t || this.updateUrl();
114
+ }), this.arrayFilters.forEach((s, e) => this.arrayFilters.set(e, [])), this.dateRangeFilters.forEach((s) => s.clear()), this.numberRangeFilters.forEach((s) => s.clear()), this.setCurrentPage(1), t || this.updateUrl();
115
115
  });
116
- f(this, "clearFiltersForGroup", (t) => {
116
+ h(this, "clearFiltersForGroup", (t) => {
117
117
  const { GROUP_MAP: l } = d.getBusinessLogic(), s = l.get(t);
118
118
  s && s.fields.forEach((e) => {
119
119
  this.arrayFilters.has(e.id) ? this.clearArrayFilter(e.id) : this.dateRangeFilters.has(e.id) ? this.clearRangeFilter(e.id) : this.numberRangeFilters.has(e.id) ? this.clearNumberRangeFilter(e.id) : this.clearFilter(e.id);
120
120
  });
121
121
  });
122
122
  // VIEWS
123
- f(this, "setActiveViewId", (t) => {
123
+ h(this, "setActiveViewId", (t) => {
124
124
  this.activeViewId = t, this.updateUrl();
125
125
  });
126
126
  // VISIBILITY
127
- f(this, "toggleFiltersDropdownVisible", (t) => {
127
+ h(this, "toggleFiltersDropdownVisible", (t) => {
128
128
  this.isFiltersDropdownVisible = t;
129
129
  });
130
130
  // FILTER GROUPS
131
- f(this, "getFiltersForGroup", (t) => {
131
+ h(this, "getFiltersForGroup", (t) => {
132
132
  const { GROUP_MAP: l } = d.getBusinessLogic(), s = l.get(t);
133
133
  if (!s) return {};
134
134
  const e = {};
@@ -136,39 +136,39 @@ class ee {
136
136
  this.arrayFilters.has(i.id) ? e[i.id] = this.arrayFilters.get(i.id) : this.dateRangeFilters.has(i.id) ? e[i.id] = this.dateRangeFilters.get(i.id) : this.numberRangeFilters.has(i.id) ? e[i.id] = this.numberRangeFilters.get(i.id) : e[i.id] = this.filters.get(i.id);
137
137
  }), e;
138
138
  });
139
- f(this, "initFiltersFromView", (t) => {
139
+ h(this, "initFiltersFromView", (t) => {
140
140
  var s;
141
141
  const { PAGE_SIZE_OPTIONS: l } = d.getBusinessLogic();
142
- (s = t.page) != null && s.size && l.includes(t.page.size) && (this.defaultPageSize = t.page.size, this.pageSize = t.page.size), this.defaultFilters = new Map(t.filterMaps.filters), this.defaultArrayFilters = new Map(t.filterMaps.arrayFilters), this.defaultDateRangeFilters = new Map(
142
+ (s = t.page) != null && s.size && l.includes(t.page.size) && (this.defaultPageSize = t.page.size, this.pageSize = t.page.size), this.setCurrentPage(1), this.defaultFilters = new Map(t.filterMaps.filters), this.defaultArrayFilters = new Map(t.filterMaps.arrayFilters), this.defaultDateRangeFilters = new Map(
143
143
  Array.from(t.filterMaps.rangeFilters.entries()).map(([e, i]) => {
144
- const h = new w(i.filterType);
145
- return i.gte && i.lte && h.setDates(i.gte, i.lte), [e, h];
144
+ const f = new w(i.filterType);
145
+ return i.gte && i.lte && f.setDates(i.gte, i.lte), [e, f];
146
146
  })
147
147
  ), this.defaultNumberRangeFilters = new Map(
148
148
  Array.from(t.filterMaps.numberRangeFilters.entries()).map(([e, i]) => {
149
- const h = i.clone();
150
- return i.gte && h.setGte(i.gte), i.lte && h.setLte(i.lte), [e, h];
149
+ const f = i.clone();
150
+ return i.gte && f.setGte(i.gte), i.lte && f.setLte(i.lte), [e, f];
151
151
  })
152
152
  ), this.filters = new Map(t.filterMaps.filters), this.arrayFilters = new Map(t.filterMaps.arrayFilters), this.dateRangeFilters = new Map(
153
153
  Array.from(t.filterMaps.rangeFilters.entries()).map(([e, i]) => {
154
- const h = new w(i.filterType);
155
- return i.gte && i.lte && h.setDates(i.gte, i.lte), [e, h];
154
+ const f = new w(i.filterType);
155
+ return i.gte && i.lte && f.setDates(i.gte, i.lte), [e, f];
156
156
  })
157
157
  ), this.numberRangeFilters = new Map(
158
158
  Array.from(t.filterMaps.numberRangeFilters.entries()).map(([e, i]) => {
159
- const h = i.clone();
160
- return i.gte && h.setGte(i.gte), i.lte && h.setLte(i.lte), [e, h];
159
+ const f = i.clone();
160
+ return i.gte && f.setGte(i.gte), i.lte && f.setLte(i.lte), [e, f];
161
161
  })
162
162
  ), this.activeViewId = t.id;
163
163
  });
164
- f(this, "initFromUrl", (t = !0) => {
164
+ h(this, "initFromUrl", (t = !0) => {
165
165
  const { GROUP_MAP: l, PAGE_SIZE_OPTIONS: s, PAGE_SIZE_FILTER_ID: e } = d.getBusinessLogic(), i = T.parse(window.location.search, {
166
166
  ignoreQueryPrefix: !0
167
- }), h = Array.from(l.values()).flatMap((n) => n.fields), F = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
167
+ }), f = Array.from(l.values()).flatMap((n) => n.fields), g = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
168
168
  t && i.view && (this.activeViewId = i.view), i[e] && s.includes(Number(i[e])) && (this.pageSize = Number(i[e]));
169
- const _ = i.filter || {};
170
- h.forEach((n) => {
171
- const r = G(_, n.id);
169
+ const P = i.filter || {};
170
+ f.forEach((n) => {
171
+ const r = G(P, n.id);
172
172
  if (r !== void 0)
173
173
  switch (n.filterType) {
174
174
  case m.CHECKBOX:
@@ -183,10 +183,10 @@ class ee {
183
183
  u.set(n.id, new w(a.relative));
184
184
  else if (a.gte && a.lte)
185
185
  try {
186
- const p = D(a.gte), A = D(a.lte), y = new w("CUSTOM");
186
+ const p = _(a.gte), A = _(a.lte), y = new w("CUSTOM");
187
187
  y.setDates(p, A), u.set(n.id, y);
188
188
  } catch {
189
- u.set(n.id, new w(C.TODAY));
189
+ u.set(n.id, new w(L.TODAY));
190
190
  }
191
191
  }
192
192
  break;
@@ -199,17 +199,17 @@ class ee {
199
199
  case m.TEXT:
200
200
  case m.NUMBER:
201
201
  case m.RADIO:
202
- (typeof r == "string" || typeof r == "number") && F.set(n.id, String(r));
202
+ (typeof r == "string" || typeof r == "number") && g.set(n.id, String(r));
203
203
  break;
204
204
  }
205
- }), this.filters = F, this.arrayFilters = o, this.dateRangeFilters = u, this.numberRangeFilters = S, this.updateUrl();
205
+ }), this.filters = g, this.arrayFilters = o, this.dateRangeFilters = u, this.numberRangeFilters = S, this.updateUrl();
206
206
  });
207
- f(this, "discardChanges", (t = !1) => {
207
+ h(this, "discardChanges", (t = !1) => {
208
208
  this.pageSize = this.defaultPageSize;
209
209
  const { SEARCH_FILTER_ID: l } = d.getBusinessLogic(), s = new Map(this.defaultFilters);
210
210
  this.filters.has(l) && s.set(l, this.filters.get(l)), this.filters = s, this.arrayFilters = new Map(this.defaultArrayFilters), this.dateRangeFilters.clear(), this.defaultDateRangeFilters.forEach((e, i) => {
211
- const h = new w(e.filterType);
212
- h.setDates(e.gte, e.lte), this.dateRangeFilters.set(i, h);
211
+ const f = new w(e.filterType);
212
+ f.setDates(e.gte, e.lte), this.dateRangeFilters.set(i, f);
213
213
  }), this.numberRangeFilters.clear(), this.defaultNumberRangeFilters.forEach((e, i) => {
214
214
  this.numberRangeFilters.set(i, e.clone());
215
215
  }), this.updateUrl(t);
@@ -228,7 +228,7 @@ class ee {
228
228
  const e = new v({ filterId: s.id });
229
229
  return [s.id, e];
230
230
  })
231
- ), this.defaultArrayFilters = /* @__PURE__ */ new Map(), this.defaultFilters = /* @__PURE__ */ new Map(), this.defaultDateRangeFilters = /* @__PURE__ */ new Map(), this.defaultNumberRangeFilters = /* @__PURE__ */ new Map(), this.currentPage = 1, this.pageSize = 10, this.defaultPageSize = 10, this.initDefaultFilterMaps(), this.isFiltersDropdownVisible = !1, this.activeViewId = void 0, L(this, {
231
+ ), this.defaultArrayFilters = /* @__PURE__ */ new Map(), this.defaultFilters = /* @__PURE__ */ new Map(), this.defaultDateRangeFilters = /* @__PURE__ */ new Map(), this.defaultNumberRangeFilters = /* @__PURE__ */ new Map(), this.currentPage = 1, this.pageSize = 10, this.defaultPageSize = 10, this.initDefaultFilterMaps(), this.isFiltersDropdownVisible = !1, this.activeViewId = void 0, O(this, {
232
232
  defaultPageSize: c,
233
233
  pageSize: c,
234
234
  currentPage: c,
@@ -242,26 +242,26 @@ class ee {
242
242
  dateRangeFilters: c,
243
243
  isFiltersDropdownVisible: c,
244
244
  activeViewId: c,
245
- setPageSize: g,
246
- setCurrentPage: g,
247
- toggleFiltersDropdownVisible: g,
248
- setActiveViewId: g,
249
- setFilter: g,
250
- setArrayFilter: g,
251
- setRangeFilter: g,
252
- setNumberRangeFilter: g,
253
- clearFilter: g,
254
- clearArrayFilter: g,
255
- clearRangeFilter: g,
256
- clearNumberRangeFilter: g,
257
- clearAllFilters: g,
258
- getFiltersForGroup: g,
259
- clearFiltersForGroup: g,
260
- initFromUrl: g,
261
- initFiltersFromView: g,
262
- initDefaultFilterMaps: g,
263
- discardChanges: g,
264
- updateUrl: g,
245
+ setPageSize: F,
246
+ setCurrentPage: F,
247
+ toggleFiltersDropdownVisible: F,
248
+ setActiveViewId: F,
249
+ setFilter: F,
250
+ setArrayFilter: F,
251
+ setRangeFilter: F,
252
+ setNumberRangeFilter: F,
253
+ clearFilter: F,
254
+ clearArrayFilter: F,
255
+ clearRangeFilter: F,
256
+ clearNumberRangeFilter: F,
257
+ clearAllFilters: F,
258
+ getFiltersForGroup: F,
259
+ clearFiltersForGroup: F,
260
+ initFromUrl: F,
261
+ initFiltersFromView: F,
262
+ initDefaultFilterMaps: F,
263
+ discardChanges: F,
264
+ updateUrl: F,
265
265
  hasActiveFilters: M,
266
266
  activeFilterKeysList: M,
267
267
  queryParamsObject: M,
@@ -276,32 +276,32 @@ class ee {
276
276
  get activeFilterKeysList() {
277
277
  const { DATE_RANGE_FILTERS: t, NUMBER_RANGE_FILTERS: l } = d.getBusinessLogic(), s = Array.from(this.filters.entries()).filter(
278
278
  ([o, u]) => u !== "" && !t.includes(o) && !l.includes(o)
279
- ).map(([o]) => o), e = Array.from(this.arrayFilters.entries()).filter(([, o]) => o.length > 0).map(([o]) => o), i = Array.from(this.dateRangeFilters.entries()).filter(([, o]) => o.filterType !== void 0).map(([o]) => o), h = Array.from(this.numberRangeFilters.entries()).filter(([, o]) => o.isActive).map(([o]) => o);
280
- return [.../* @__PURE__ */ new Set([...s, ...e, ...i, ...h])];
279
+ ).map(([o]) => o), e = Array.from(this.arrayFilters.entries()).filter(([, o]) => o.length > 0).map(([o]) => o), i = Array.from(this.dateRangeFilters.entries()).filter(([, o]) => o.filterType !== void 0).map(([o]) => o), f = Array.from(this.numberRangeFilters.entries()).filter(([, o]) => o.isActive).map(([o]) => o);
280
+ return [.../* @__PURE__ */ new Set([...s, ...e, ...i, ...f])];
281
281
  }
282
282
  get queryParamsObject() {
283
283
  const { DATE_RANGE_FILTERS: t, NUMBER_RANGE_FILTERS: l, PAGE_SIZE_FILTER_ID: s, PAGE_NUMBER_FILTER_ID: e } = d.getBusinessLogic(), i = {};
284
284
  Array.from(this.filters.entries()).filter(
285
- ([F, o]) => o !== "" && !t.includes(F) && !l.includes(F)
286
- ).forEach(([F, o]) => {
287
- R(i, F, o);
288
- }), Array.from(this.arrayFilters.entries()).filter(([, F]) => F.length > 0).forEach(([F, o]) => {
289
- R(i, F, o);
290
- }), Array.from(this.dateRangeFilters.entries()).filter(([, F]) => F.filterType !== void 0).forEach(([F, o]) => {
291
- o.filterType === "CUSTOM" ? R(i, F, {
285
+ ([g, o]) => o !== "" && !t.includes(g) && !l.includes(g)
286
+ ).forEach(([g, o]) => {
287
+ R(i, g, o);
288
+ }), Array.from(this.arrayFilters.entries()).filter(([, g]) => g.length > 0).forEach(([g, o]) => {
289
+ R(i, g, o);
290
+ }), Array.from(this.dateRangeFilters.entries()).filter(([, g]) => g.filterType !== void 0).forEach(([g, o]) => {
291
+ o.filterType === "CUSTOM" ? R(i, g, {
292
292
  gte: o.gte.toString(),
293
293
  lte: o.lte.toString()
294
- }) : R(i, F, { relative: o.filterType });
295
- }), Array.from(this.numberRangeFilters.entries()).filter(([, F]) => F.isActive).forEach(([F, o]) => {
294
+ }) : R(i, g, { relative: o.filterType });
295
+ }), Array.from(this.numberRangeFilters.entries()).filter(([, g]) => g.isActive).forEach(([g, o]) => {
296
296
  const u = {};
297
- o.gte !== void 0 && (u.gte = o.gte), o.isValidLte && (u.lte = o.lte), R(i, F, u);
297
+ o.gte !== void 0 && (u.gte = o.gte), o.isValidLte && (u.lte = o.lte), R(i, g, u);
298
298
  });
299
- const h = {
299
+ const f = {
300
300
  filter: i,
301
301
  [s]: String(this.pageSize),
302
302
  [e]: String(this.currentPage)
303
303
  };
304
- return this.activeViewId && (h.view = this.activeViewId), h;
304
+ return this.activeViewId && (f.view = this.activeViewId), f;
305
305
  }
306
306
  get queryParams() {
307
307
  return T.stringify(this.queryParamsObject, {
@@ -317,14 +317,14 @@ class ee {
317
317
  return a === void 0 && r !== "" || a !== void 0 && r !== a;
318
318
  }))
319
319
  return !0;
320
- const h = Array.from(this.defaultArrayFilters.entries()).filter(([n]) => e.has(n)).some(([n, r]) => {
320
+ const f = Array.from(this.defaultArrayFilters.entries()).filter(([n]) => e.has(n)).some(([n, r]) => {
321
321
  const a = this.defaultArrayFilters.get(n) || [];
322
- return r.length > 0 || a.length > 0 ? r.length !== a.length || !I(r, a) : !1;
323
- }), F = Array.from(this.arrayFilters.entries()).filter(([n]) => e.has(n)).some(([n, r]) => {
322
+ return r.length > 0 || a.length > 0 ? r.length !== a.length || !D(r, a) : !1;
323
+ }), g = Array.from(this.arrayFilters.entries()).filter(([n]) => e.has(n)).some(([n, r]) => {
324
324
  const a = this.defaultArrayFilters.get(n) || [];
325
- return r.length > 0 || a.length > 0 ? r.length !== a.length || !I(r, a) : !1;
325
+ return r.length > 0 || a.length > 0 ? r.length !== a.length || !D(r, a) : !1;
326
326
  });
327
- if (h || F)
327
+ if (f || g)
328
328
  return !0;
329
329
  const o = Array.from(this.numberRangeFilters.entries()).filter(([n]) => e.has(n)).some(([n, r]) => {
330
330
  const a = this.defaultNumberRangeFilters.get(n);
package/dist/index80.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index91.cjs"),w=require("./index79.cjs"),V=require("./index78.cjs"),d=({data:n,canUpdateCustomViews:u})=>{const l={fixedViews:[...r.INITIAL_VIEWS_STATE.fixedViews],customViews:[...r.INITIAL_VIEWS_STATE.customViews],viewsMap:new Map(r.INITIAL_VIEWS_STATE.viewsMap)};if(!n)return l;let o=!1;const i=n.reduce((e,s)=>{const t=V.viewsAdapter({view:s,canUpdateCustomViews:u});return e.viewsMap.set(s.id,t),s.editable?e.customViews.push(t):e.fixedViews.push(t),s.title==="All"&&(o=!0),e},l);return o&&(i.viewsMap.delete(w.ALL_VIEW_ID),i.fixedViews.shift()),i};exports.organiseViews=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index105.cjs"),w=require("./index79.cjs"),V=require("./index78.cjs"),d=({data:n,canUpdateCustomViews:u})=>{const l={fixedViews:[...r.INITIAL_VIEWS_STATE.fixedViews],customViews:[...r.INITIAL_VIEWS_STATE.customViews],viewsMap:new Map(r.INITIAL_VIEWS_STATE.viewsMap)};if(!n)return l;let o=!1;const i=n.reduce((e,s)=>{const t=V.viewsAdapter({view:s,canUpdateCustomViews:u});return e.viewsMap.set(s.id,t),s.editable?e.customViews.push(t):e.fixedViews.push(t),s.title==="All"&&(o=!0),e},l);return o&&(i.viewsMap.delete(w.ALL_VIEW_ID),i.fixedViews.shift()),i};exports.organiseViews=d;
package/dist/index80.js CHANGED
@@ -1,4 +1,4 @@
1
- import { INITIAL_VIEWS_STATE as r } from "./index91.js";
1
+ import { INITIAL_VIEWS_STATE as r } from "./index105.js";
2
2
  import { ALL_VIEW_ID as p } from "./index79.js";
3
3
  import { viewsAdapter as u } from "./index78.js";
4
4
  const m = ({ data: o, canUpdateCustomViews: w }) => {
package/dist/index84.cjs CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index111.cjs"),s=e=>{if(!l.isError(e))return e;if(e.stack){const t=e.stack.split(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index107.cjs"),s=e=>{if(!l.isError(e))return e;if(e.stack){const t=e.stack.split(`
2
2
  `);if(t.length<=10)return e;const n=t==null?void 0:t[0],i=t==null?void 0:t.splice(9),r=[n,...i].join(`
3
3
  `);e.stack=r}return e};exports.filterErrorStack=s;
package/dist/index84.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isError as l } from "./index111.js";
1
+ import { isError as l } from "./index107.js";
2
2
  const s = (e) => {
3
3
  if (!l(e)) return e;
4
4
  if (e.stack) {
package/dist/index85.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index111.cjs"),n=({customError:t,originalError:e,type:c})=>{!s.isError(e)||!s.isError(t)||(e.stack&&(e.stack=t.stack),e.name&&(e.name=`${c} (${e.name})`))};exports.injectIntoError=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index107.cjs"),n=({customError:t,originalError:e,type:c})=>{!s.isError(e)||!s.isError(t)||(e.stack&&(e.stack=t.stack),e.name&&(e.name=`${c} (${e.name})`))};exports.injectIntoError=n;
package/dist/index85.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isError as c } from "./index111.js";
1
+ import { isError as c } from "./index107.js";
2
2
  const s = ({
3
3
  customError: e,
4
4
  originalError: t,
package/dist/index86.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_actionsHeaderContainer_fgqms_1",t={actionsHeaderContainer:e};exports.actionsHeaderContainer=e;exports.default=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),w=require("react-use"),L=require("./index8.cjs"),m=require("./index61.cjs"),v=require("./index67.cjs"),q=require("./index55.cjs");function V(){const{TABLE_DATA_URL:h}=L.useBusinessLogic(),{Filters:{pageSize:s,activeViewId:n}}=m.useStores(),{queryParams:S}=v.useUrlParams();async function c(){const e=`${h}?${S}`,g=await q.fetcherV2(e);return JSON.stringify(g)}const[u,a]=t.useState(null),[o,l]=t.useState(!1),[f,C]=t.useState(n),[y,P]=t.useState(s),i=3e5,[D,r]=t.useState(i);return t.useEffect(()=>{const e=()=>{document.hidden?r(null):r(i)};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),w.useInterval(async()=>{const e=await c();if(u===null||f!==n||y!==s){a(e),C(n),P(s);return}const d=e!==u;d&&(a(e),l(d))},o?null:D),{hasChanges:o,acknowledgeButtonClick:async()=>{l(!1),r(i),a(await c())}}}exports.usePollData=V;
package/dist/index86.js CHANGED
@@ -1,7 +1,43 @@
1
- const e = "_actionsHeaderContainer_fgqms_1", a = {
2
- actionsHeaderContainer: e
3
- };
1
+ import { useState as t, useEffect as p } from "react";
2
+ import { useInterval as P } from "react-use";
3
+ import { useBusinessLogic as S } from "./index8.js";
4
+ import { useStores as L } from "./index61.js";
5
+ import { useUrlParams as v } from "./index67.js";
6
+ import { fetcherV2 as V } from "./index55.js";
7
+ function T() {
8
+ const { TABLE_DATA_URL: h } = S(), {
9
+ Filters: {
10
+ pageSize: n,
11
+ activeViewId: s
12
+ }
13
+ } = L(), { queryParams: m } = v();
14
+ async function r() {
15
+ const e = `${h}?${m}`, g = await V(e);
16
+ return JSON.stringify(g);
17
+ }
18
+ const [c, a] = t(null), [l, u] = t(!1), [f, C] = t(s), [w, y] = t(n), i = 3e5, [D, o] = t(i);
19
+ return p(() => {
20
+ const e = () => {
21
+ document.hidden ? o(null) : o(i);
22
+ };
23
+ return document.addEventListener("visibilitychange", e), () => {
24
+ document.removeEventListener("visibilitychange", e);
25
+ };
26
+ }, []), P(
27
+ async () => {
28
+ const e = await r();
29
+ if (c === null || f !== s || w !== n) {
30
+ a(e), C(s), y(n);
31
+ return;
32
+ }
33
+ const d = e !== c;
34
+ d && (a(e), u(d));
35
+ },
36
+ l ? null : D
37
+ ), { hasChanges: l, acknowledgeButtonClick: async () => {
38
+ u(!1), o(i), a(await r());
39
+ } };
40
+ }
4
41
  export {
5
- e as actionsHeaderContainer,
6
- a as default
42
+ T as usePollData
7
43
  };
package/dist/index87.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),w=require("react-use"),L=require("./index8.cjs"),m=require("./index61.cjs"),v=require("./index67.cjs"),q=require("./index55.cjs");function V(){const{TABLE_DATA_URL:h}=L.useBusinessLogic(),{Filters:{pageSize:s,activeViewId:n}}=m.useStores(),{queryParams:S}=v.useUrlParams();async function c(){const e=`${h}?${S}`,g=await q.fetcherV2(e);return JSON.stringify(g)}const[u,a]=t.useState(null),[o,l]=t.useState(!1),[f,C]=t.useState(n),[y,P]=t.useState(s),i=3e5,[D,r]=t.useState(i);return t.useEffect(()=>{const e=()=>{document.hidden?r(null):r(i)};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),w.useInterval(async()=>{const e=await c();if(u===null||f!==n||y!==s){a(e),C(n),P(s);return}const d=e!==u;d&&(a(e),l(d))},o?null:D),{hasChanges:o,acknowledgeButtonClick:async()=>{l(!1),r(i),a(await c())}}}exports.usePollData=V;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_refreshTooltip_v0eu8_1",r="_refreshButton_v0eu8_5",t="_refreshIndicator_v0eu8_9",o={refreshTooltip:e,refreshButton:r,refreshIndicator:t};exports.default=o;exports.refreshButton=r;exports.refreshIndicator=t;exports.refreshTooltip=e;
package/dist/index87.js CHANGED
@@ -1,43 +1,11 @@
1
- import { useState as t, useEffect as p } from "react";
2
- import { useInterval as P } from "react-use";
3
- import { useBusinessLogic as S } from "./index8.js";
4
- import { useStores as L } from "./index61.js";
5
- import { useUrlParams as v } from "./index67.js";
6
- import { fetcherV2 as V } from "./index55.js";
7
- function T() {
8
- const { TABLE_DATA_URL: h } = S(), {
9
- Filters: {
10
- pageSize: n,
11
- activeViewId: s
12
- }
13
- } = L(), { queryParams: m } = v();
14
- async function r() {
15
- const e = `${h}?${m}`, g = await V(e);
16
- return JSON.stringify(g);
17
- }
18
- const [c, a] = t(null), [l, u] = t(!1), [f, C] = t(s), [w, y] = t(n), i = 3e5, [D, o] = t(i);
19
- return p(() => {
20
- const e = () => {
21
- document.hidden ? o(null) : o(i);
22
- };
23
- return document.addEventListener("visibilitychange", e), () => {
24
- document.removeEventListener("visibilitychange", e);
25
- };
26
- }, []), P(
27
- async () => {
28
- const e = await r();
29
- if (c === null || f !== s || w !== n) {
30
- a(e), C(s), y(n);
31
- return;
32
- }
33
- const d = e !== c;
34
- d && (a(e), u(d));
35
- },
36
- l ? null : D
37
- ), { hasChanges: l, acknowledgeButtonClick: async () => {
38
- u(!1), o(i), a(await r());
39
- } };
40
- }
1
+ const e = "_refreshTooltip_v0eu8_1", r = "_refreshButton_v0eu8_5", t = "_refreshIndicator_v0eu8_9", o = {
2
+ refreshTooltip: e,
3
+ refreshButton: r,
4
+ refreshIndicator: t
5
+ };
41
6
  export {
42
- T as usePollData
7
+ o as default,
8
+ r as refreshButton,
9
+ t as refreshIndicator,
10
+ e as refreshTooltip
43
11
  };
package/dist/index88.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_refreshTooltip_v0eu8_1",r="_refreshButton_v0eu8_5",t="_refreshIndicator_v0eu8_9",o={refreshTooltip:e,refreshButton:r,refreshIndicator:t};exports.default=o;exports.refreshButton=r;exports.refreshIndicator=t;exports.refreshTooltip=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_actionsHeaderContainer_fgqms_1",t={actionsHeaderContainer:e};exports.actionsHeaderContainer=e;exports.default=t;
package/dist/index88.js CHANGED
@@ -1,11 +1,7 @@
1
- const e = "_refreshTooltip_v0eu8_1", r = "_refreshButton_v0eu8_5", t = "_refreshIndicator_v0eu8_9", o = {
2
- refreshTooltip: e,
3
- refreshButton: r,
4
- refreshIndicator: t
1
+ const e = "_actionsHeaderContainer_fgqms_1", a = {
2
+ actionsHeaderContainer: e
5
3
  };
6
4
  export {
7
- o as default,
8
- r as refreshButton,
9
- t as refreshIndicator,
10
- e as refreshTooltip
5
+ e as actionsHeaderContainer,
6
+ a as default
11
7
  };
package/dist/index89.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("@veeqo/ui"),s=require("react"),w=require("@veeqo/components"),S=require("./index92.cjs"),i=require("./index93.cjs"),T=require("./index94.cjs"),V=require("./index95.cjs"),n=require("./index96.cjs"),D=require("./index90.cjs"),H=require("./index97.cjs"),j=require("./index98.cjs"),{Glyph:O}=w.VeeqoCommon,$=({onClose:u,columnDefinitions:G,hiddenColumns:d,visibleColumns:m,pinnedLeftColumnIds:y,pinnedRightColumnIds:f})=>{const[c,p]=s.useState(""),a=s.useMemo(()=>new Map(G.map(r=>[r.id,r])),[]),[o,g]=s.useState(()=>({[n.ColumnGroupIds.Hidden]:d,[n.ColumnGroupIds.Visible]:m})),I=s.useMemo(()=>{const r=o[n.ColumnGroupIds.Visible].map(t=>a.get(`${t}`));return j.filterColumnsBySearch(r,c)},[o,a,c]),v=s.useMemo(()=>{const r=o[n.ColumnGroupIds.Hidden].map(t=>a.get(`${t}`));return j.filterColumnsBySearch(r,c)},[o,a,c]),{isSavingColumns:h,saveColumns:M}=H.usePersistColumns({pinnedLeftColumnIds:y,pinnedRightColumnIds:f}),q=()=>{p(""),g({[n.ColumnGroupIds.Hidden]:d,[n.ColumnGroupIds.Visible]:m})},x=s.useCallback(r=>{if(p(r),!r){const t=new Set([...d,...m]);g(b=>({[n.ColumnGroupIds.Hidden]:b[n.ColumnGroupIds.Hidden].filter(C=>t.has(`${C}`)),[n.ColumnGroupIds.Visible]:b[n.ColumnGroupIds.Visible].filter(C=>t.has(`${C}`))}))}},[d,m]),k=s.useCallback(r=>{const t=a.get(`${r}`);return t?e.jsx(V.ColumnItem,{column:t,isDragOverlay:!0}):null},[a]);return e.jsx(l.Modal,{variant:"lg",style:{overflowY:"hidden"},shouldShow:!0,onClose:()=>u==null?void 0:u(),headerSlot:e.jsxs(i.HeaderContainer,{children:[e.jsxs(l.Stack,{direction:"horizontal",alignX:"between",alignY:"center",children:[e.jsxs(l.Stack,{direction:"horizontal",alignX:"start",alignY:"center",spacing:"sm",children:[e.jsx(D.TableManagementGlyph,{height:32,width:32}),e.jsx(l.Text,{variant:"headingLarge",as:"h1",children:"Table management"})]}),e.jsx(l.Button,{"aria-label":"Close modal",onClick:u,variant:"flat",iconSlot:e.jsx(O,{name:"close"})})]}),e.jsxs(l.Text,{variant:"subheadingMedium",children:["Show, hide, or change the order of the columns in the view, so you always see the data that's most important to you. Learn more with our"," ",e.jsx(l.Anchor,{href:"#",target:"_blank",children:"help guide (TODO)"}),"."]}),e.jsx(l.Text,{variant:"headingSmall",children:"Column management"}),e.jsx(i.ColumnSearch,{name:"column-search-query",placeholder:"Search",value:c,onChange:x,onClearClick:()=>x(""),fill:"100%"})]}),leftActions:[{label:"Reset",onClick:q,variant:"default",disabled:h}],rightActions:[{label:"Cancel",onClick:u,variant:"default",disabled:h},{label:"Save",onClick:()=>M({visibleColumns:o[n.ColumnGroupIds.Visible]}),variant:"primary",disabled:h,loading:h}],children:e.jsx(l.Stack,{spacing:"md",alignX:"stretch",children:e.jsx(l.Stack,{spacing:4,alignX:"stretch",children:e.jsx(T.DndContainer,{items:o,setItems:g,renderDragOverlay:k,children:e.jsx(i.Container,{children:e.jsxs(i.ColumnGroupsGrid,{columns:2,spacing:"xl",children:[e.jsx(S.ColumnGroup,{id:n.ColumnGroupIds.Visible,title:"Shown columns:",columns:I}),e.jsx(i.VerticalSeparator,{children:e.jsx(i.VerticalText,{children:"Drag & Drop columns"})}),e.jsx(S.ColumnGroup,{id:n.ColumnGroupIds.Hidden,title:"Hidden columns:",columns:v})]})})})})})})};exports.TableManagementModal=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("@veeqo/ui"),s=require("react"),w=require("@veeqo/components"),S=require("./index91.cjs"),i=require("./index92.cjs"),T=require("./index93.cjs"),V=require("./index94.cjs"),n=require("./index95.cjs"),D=require("./index90.cjs"),H=require("./index96.cjs"),j=require("./index97.cjs"),{Glyph:O}=w.VeeqoCommon,$=({onClose:u,columnDefinitions:G,hiddenColumns:d,visibleColumns:m,pinnedLeftColumnIds:y,pinnedRightColumnIds:f})=>{const[c,p]=s.useState(""),a=s.useMemo(()=>new Map(G.map(r=>[r.id,r])),[]),[o,g]=s.useState(()=>({[n.ColumnGroupIds.Hidden]:d,[n.ColumnGroupIds.Visible]:m})),I=s.useMemo(()=>{const r=o[n.ColumnGroupIds.Visible].map(t=>a.get(`${t}`));return j.filterColumnsBySearch(r,c)},[o,a,c]),v=s.useMemo(()=>{const r=o[n.ColumnGroupIds.Hidden].map(t=>a.get(`${t}`));return j.filterColumnsBySearch(r,c)},[o,a,c]),{isSavingColumns:h,saveColumns:M}=H.usePersistColumns({pinnedLeftColumnIds:y,pinnedRightColumnIds:f}),q=()=>{p(""),g({[n.ColumnGroupIds.Hidden]:d,[n.ColumnGroupIds.Visible]:m})},x=s.useCallback(r=>{if(p(r),!r){const t=new Set([...d,...m]);g(b=>({[n.ColumnGroupIds.Hidden]:b[n.ColumnGroupIds.Hidden].filter(C=>t.has(`${C}`)),[n.ColumnGroupIds.Visible]:b[n.ColumnGroupIds.Visible].filter(C=>t.has(`${C}`))}))}},[d,m]),k=s.useCallback(r=>{const t=a.get(`${r}`);return t?e.jsx(V.ColumnItem,{column:t,isDragOverlay:!0}):null},[a]);return e.jsx(l.Modal,{variant:"lg",style:{overflowY:"hidden"},shouldShow:!0,onClose:()=>u==null?void 0:u(),headerSlot:e.jsxs(i.HeaderContainer,{children:[e.jsxs(l.Stack,{direction:"horizontal",alignX:"between",alignY:"center",children:[e.jsxs(l.Stack,{direction:"horizontal",alignX:"start",alignY:"center",spacing:"sm",children:[e.jsx(D.TableManagementGlyph,{height:32,width:32}),e.jsx(l.Text,{variant:"headingLarge",as:"h1",children:"Table management"})]}),e.jsx(l.Button,{"aria-label":"Close modal",onClick:u,variant:"flat",iconSlot:e.jsx(O,{name:"close"})})]}),e.jsxs(l.Text,{variant:"subheadingMedium",children:["Show, hide, or change the order of the columns in the view, so you always see the data that's most important to you. Learn more with our"," ",e.jsx(l.Anchor,{href:"#",target:"_blank",children:"help guide (TODO)"}),"."]}),e.jsx(l.Text,{variant:"headingSmall",children:"Column management"}),e.jsx(i.ColumnSearch,{name:"column-search-query",placeholder:"Search",value:c,onChange:x,onClearClick:()=>x(""),fill:"100%"})]}),leftActions:[{label:"Reset",onClick:q,variant:"default",disabled:h}],rightActions:[{label:"Cancel",onClick:u,variant:"default",disabled:h},{label:"Save",onClick:()=>M({visibleColumns:o[n.ColumnGroupIds.Visible]}),variant:"primary",disabled:h,loading:h}],children:e.jsx(l.Stack,{spacing:"md",alignX:"stretch",children:e.jsx(l.Stack,{spacing:4,alignX:"stretch",children:e.jsx(T.DndContainer,{items:o,setItems:g,renderDragOverlay:k,children:e.jsx(i.Container,{children:e.jsxs(i.ColumnGroupsGrid,{columns:2,spacing:"xl",children:[e.jsx(S.ColumnGroup,{id:n.ColumnGroupIds.Visible,title:"Shown columns:",columns:I}),e.jsx(i.VerticalSeparator,{children:e.jsx(i.VerticalText,{children:"Drag & Drop columns"})}),e.jsx(S.ColumnGroup,{id:n.ColumnGroupIds.Hidden,title:"Hidden columns:",columns:v})]})})})})})})};exports.TableManagementModal=$;
package/dist/index89.js CHANGED
@@ -2,14 +2,14 @@ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
2
  import { Modal as O, Stack as h, Text as p, Button as X, Anchor as A } from "@veeqo/ui";
3
3
  import { useState as v, useMemo as f, useCallback as y } from "react";
4
4
  import { VeeqoCommon as I } from "@veeqo/components";
5
- import { ColumnGroup as w } from "./index92.js";
6
- import { Container as Y, ColumnGroupsGrid as j, VerticalSeparator as z, VerticalText as B, HeaderContainer as L, ColumnSearch as Q } from "./index93.js";
7
- import { DndContainer as R } from "./index94.js";
8
- import { ColumnItem as q } from "./index95.js";
9
- import { ColumnGroupIds as n } from "./index96.js";
5
+ import { ColumnGroup as w } from "./index91.js";
6
+ import { Container as Y, ColumnGroupsGrid as j, VerticalSeparator as z, VerticalText as B, HeaderContainer as L, ColumnSearch as Q } from "./index92.js";
7
+ import { DndContainer as R } from "./index93.js";
8
+ import { ColumnItem as q } from "./index94.js";
9
+ import { ColumnGroupIds as n } from "./index95.js";
10
10
  import { TableManagementGlyph as P } from "./index90.js";
11
- import { usePersistColumns as _ } from "./index97.js";
12
- import { filterColumnsBySearch as V } from "./index98.js";
11
+ import { usePersistColumns as _ } from "./index96.js";
12
+ import { filterColumnsBySearch as V } from "./index97.js";
13
13
  const { Glyph: E } = I, te = ({
14
14
  onClose: l,
15
15
  columnDefinitions: k,
package/dist/index91.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index79.cjs"),e=i.createAllView(),t={fixedViews:[e],customViews:[],viewsMap:new Map([[e.id,e]])};exports.INITIAL_VIEWS_STATE=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("@veeqo/ui"),s=require("@dnd-kit/sortable"),a=require("./index108.cjs"),l=require("./index109.cjs"),c=require("./index94.cjs"),u=require("./index95.cjs"),d=require("./index92.cjs"),m=({id:r,title:n,columns:i})=>e.jsxs(o.Stack,{spacing:"sm",alignX:"stretch",children:[e.jsx(d.StickyText,{variant:"bodyBold",children:n}),e.jsx(s.SortableContext,{id:r,items:i,strategy:s.verticalListSortingStrategy,children:e.jsx(l.DroppableArea,{id:r,spacing:"sm",alignX:"stretch",children:i.map(t=>e.jsx(a.SortableItem,{id:t.id,children:e.jsx(c.ColumnItem,{column:t,isHidden:r===u.ColumnGroupIds.Hidden})},t.id))})})]});exports.ColumnGroup=m;