@m4l/components 9.38.0 → 9.39.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.
Files changed (56) hide show
  1. package/components/DynamicFilter/DynamicFilter.styles.d.ts.map +1 -1
  2. package/components/DynamicFilter/DynamicFilter.styles.js +82 -60
  3. package/components/DynamicFilter/hooks/useChipsOverflow.d.ts +1 -0
  4. package/components/DynamicFilter/hooks/useChipsOverflow.d.ts.map +1 -1
  5. package/components/DynamicFilter/hooks/useChipsOverflow.js +50 -44
  6. package/components/DynamicFilter/slots/SlotsEnum.d.ts +1 -0
  7. package/components/DynamicFilter/slots/SlotsEnum.d.ts.map +1 -1
  8. package/components/DynamicFilter/slots/SlotsEnum.js +1 -1
  9. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +3 -0
  10. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts.map +1 -1
  11. package/components/DynamicFilter/slots/dynamicFilterSlots.js +43 -39
  12. package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.d.ts.map +1 -1
  13. package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.js +26 -19
  14. package/components/DynamicSort/DynamicSort.js +6 -6
  15. package/components/DynamicSort/DynamicSort.styles.d.ts.map +1 -1
  16. package/components/DynamicSort/DynamicSort.styles.js +40 -14
  17. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +3 -0
  18. package/components/DynamicSort/slots/DynamicSortSlots.d.ts.map +1 -1
  19. package/components/DynamicSort/slots/DynamicSortSlots.js +44 -40
  20. package/components/DynamicSort/slots/SlotsEnum.d.ts +1 -0
  21. package/components/DynamicSort/slots/SlotsEnum.d.ts.map +1 -1
  22. package/components/DynamicSort/slots/SlotsEnum.js +1 -1
  23. package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.d.ts +2 -1
  24. package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.d.ts.map +1 -1
  25. package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.js +70 -54
  26. package/components/DynamicSort/subcomponents/AppliedSorts/types.d.ts +5 -0
  27. package/components/DynamicSort/subcomponents/AppliedSorts/types.d.ts.map +1 -0
  28. package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.d.ts +1 -0
  29. package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.d.ts.map +1 -1
  30. package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.js +23 -21
  31. package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.d.ts.map +1 -1
  32. package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +15 -17
  33. package/components/DynamicSort/subcomponents/DynamicSortBase/types.d.ts +2 -0
  34. package/components/DynamicSort/subcomponents/DynamicSortBase/types.d.ts.map +1 -1
  35. package/components/DynamicSort/subcomponents/PopoverMenuFields/PopoverMenuFields.d.ts.map +1 -1
  36. package/components/DynamicSort/subcomponents/PopoverMenuFields/PopoverMenuFields.js +58 -46
  37. package/components/DynamicSort/subcomponents/SortActions/SortActions.d.ts.map +1 -1
  38. package/components/DynamicSort/subcomponents/SortActions/SortActions.js +30 -30
  39. package/components/DynamicSort/types.d.ts +6 -0
  40. package/components/DynamicSort/types.d.ts.map +1 -1
  41. package/hooks/useDynamicFilterAndSort/constants.d.ts +1 -0
  42. package/hooks/useDynamicFilterAndSort/constants.d.ts.map +1 -1
  43. package/hooks/useDynamicFilterAndSort/constants.js +4 -3
  44. package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortEnum.d.ts +2 -1
  45. package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortEnum.d.ts.map +1 -1
  46. package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortEnum.js +2 -2
  47. package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.d.ts +3 -0
  48. package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.d.ts.map +1 -1
  49. package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.js +19 -15
  50. package/hooks/useDynamicFilterAndSort/styles.d.ts.map +1 -1
  51. package/hooks/useDynamicFilterAndSort/styles.js +58 -37
  52. package/hooks/useDynamicFilterAndSort/types.d.ts +1 -0
  53. package/hooks/useDynamicFilterAndSort/types.d.ts.map +1 -1
  54. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.d.ts.map +1 -1
  55. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +204 -172
  56. package/package.json +8 -8
@@ -1,196 +1,215 @@
1
- import { jsxs as M, jsx as f, Fragment as ye } from "@emotion/react/jsx-runtime";
2
- import { useEnvironment as ve, useModuleDictionary as De } from "@m4l/core";
3
- import { useState as S, useRef as w, useMemo as m, useCallback as a, useReducer as Te } from "react";
4
- import { DynamicFilter as Ae } from "../../components/DynamicFilter/DynamicFilter.js";
5
- import { DynamicSort as Ie } from "../../components/DynamicSort/DynamicSort.js";
6
- import { ToggleIconButton as se } from "../../components/extended/mui/ToggleIconButton/ToggleIconButton.js";
7
- import { getPropDataTestId as H } from "../../test/getNameDataTestId.js";
8
- import { COOKIE_APPLIED_FILTERS as x, COOKIE_APPLIED_SORTS as E, M4LDYNAMIC_KEY_FILTER_AND_SORT as N } from "./constants.js";
9
- import { ICON_PATH_FILTER as _e, ICON_PATH_SORT as be, ASSETS as Re } from "./icons.js";
10
- import { DynamicFilterAndSortSlots as V } from "./slots/DynamicFilterAndSortEnum.js";
11
- import { StackLeftActionsStyled as ke, StackRightActionsStyled as we, ActionRefreshStyled as le, StackCustomHeaderStyled as xe } from "./slots/DynamicFilterAndSortSlots.js";
12
- import { deepEqual as ae } from "fast-equals";
13
- import { getPurgedCookie as ce } from "./helpers.js";
14
- import { useWindowToolsMF as Ee } from "../../components/WindowBase/hooks/useWindowToolsMF/index.js";
15
- import { DICCTIONARY as $e } from "../../components/DynamicFilter/dictionary.js";
16
- const Ge = (ue) => {
1
+ import { jsxs as H, jsx as f, Fragment as De } from "@emotion/react/jsx-runtime";
2
+ import { useEnvironment as be, useModuleDictionary as Te } from "@m4l/core";
3
+ import { useState as g, useRef as F, useCallback as l, useEffect as _e, useMemo as h, useReducer as Ie } from "react";
4
+ import { DynamicFilter as Oe } from "../../components/DynamicFilter/DynamicFilter.js";
5
+ import { DynamicSort as ke } from "../../components/DynamicSort/DynamicSort.js";
6
+ import { ToggleIconButton as ue } from "../../components/extended/mui/ToggleIconButton/ToggleIconButton.js";
7
+ import { getPropDataTestId as V } from "../../test/getNameDataTestId.js";
8
+ import { COOKIE_APPLIED_FILTERS as $, COOKIE_APPLIED_SORTS as P, M4LDYNAMIC_KEY_FILTER_AND_SORT as z, STACK_NARROW_BREAKPOINT_PX as Ee } from "./constants.js";
9
+ import { ICON_PATH_FILTER as xe, ICON_PATH_SORT as $e, ASSETS as Pe } from "./icons.js";
10
+ import { DynamicFilterAndSortSlots as Y } from "./slots/DynamicFilterAndSortEnum.js";
11
+ import { StackLeftActionsStyled as Ke, StackRightActionsStyled as Le, ActionRefreshStyled as fe, SeparatorStyled as Ne, StackCustomHeaderStyled as Me } from "./slots/DynamicFilterAndSortSlots.js";
12
+ import { deepEqual as me } from "fast-equals";
13
+ import { getPurgedCookie as de } from "./helpers.js";
14
+ import { useWindowToolsMF as Be } from "../../components/WindowBase/hooks/useWindowToolsMF/index.js";
15
+ import { DICCTIONARY as He } from "../../components/DynamicFilter/dictionary.js";
16
+ import { Divider as Ve } from "../../components/extended/mui/Divider/Divider.js";
17
+ const ot = (ge) => {
17
18
  const {
18
19
  fields: o,
19
20
  sorts: r,
20
- onChangeFilterSort: d,
21
- dataTestId: g,
22
- withAllField: B,
23
- rightActions: Y,
24
- initialFilterToggleed: fe = !0,
25
- initialSortToggleed: me = !0,
26
- prefixCookie: s,
27
- setCookie: p,
28
- getCookie: j,
29
- filterSortAutomatic: u = !0,
30
- visibleRefresh: $ = !1,
31
- withExternalRefresh: q
32
- } = ue, { host_static_assets: C, environment_assets: F } = ve(), [c, y] = S(() => ({
33
- filter: fe,
34
- sort: me
35
- })), [v] = S(() => ce(
36
- j?.(
37
- s ? `${s}_${x}` : x
21
+ onChangeFilterSort: S,
22
+ dataTestId: p,
23
+ withAllField: j,
24
+ rightActions: q,
25
+ initialFilterToggleed: he = !0,
26
+ initialSortToggleed: Se = !0,
27
+ prefixCookie: c,
28
+ setCookie: y,
29
+ getCookie: W,
30
+ filterSortAutomatic: m = !0,
31
+ visibleRefresh: K = !1,
32
+ withExternalRefresh: U
33
+ } = ge, { host_static_assets: v, environment_assets: R } = be(), [i, A] = g(() => ({
34
+ filter: he,
35
+ sort: Se
36
+ })), [w] = g(() => de(
37
+ W?.(
38
+ c ? `${c}_${$}` : $
38
39
  )
39
- )), [D] = S(() => ce(
40
- j?.(
41
- s ? `${s}_${E}` : E
40
+ )), [D] = g(() => de(
41
+ W?.(
42
+ c ? `${c}_${P}` : P
42
43
  )
43
- )), T = w(0), l = w(null), i = w(null), [A, O] = S(!1), [I, P] = S(!1), { toast: U } = Ee(), { getLabel: W } = De(), [L, _] = S(() => ({
44
- filter: v?.length === 0,
44
+ )), b = F(0), a = F(null), s = F(null), [T, pe] = g(!1), L = F(null), C = F(null), X = l((e) => {
45
+ if (L.current?.disconnect(), C.current !== null && (cancelAnimationFrame(C.current), C.current = null), !e || typeof ResizeObserver > "u")
46
+ return;
47
+ const t = (d) => pe(d > 0 && d < Ee);
48
+ t(e.getBoundingClientRect().width), C.current = requestAnimationFrame(
49
+ () => t(e.getBoundingClientRect().width)
50
+ );
51
+ const u = new ResizeObserver((d) => {
52
+ t(d[0]?.contentRect.width ?? 0);
53
+ });
54
+ u.observe(e), L.current = u;
55
+ }, []);
56
+ _e(
57
+ () => () => {
58
+ L.current?.disconnect(), C.current !== null && cancelAnimationFrame(C.current);
59
+ },
60
+ []
61
+ );
62
+ const [_, N] = g(!1), [I, M] = g(!1), { toast: G } = Be(), { getLabel: J } = Te(), [B, O] = g(() => ({
63
+ filter: w?.length === 0,
45
64
  sort: D?.length === 0
46
- })), de = m(
47
- () => c.filter || c.sort,
48
- [c]
49
- ), b = `${C}/${F}/${Re.refresh}`, n = w({
50
- eventFilters: { filters: v, rawFilters: [] },
65
+ })), Ce = h(
66
+ () => i.filter || i.sort,
67
+ [i]
68
+ ), k = `${v}/${R}/${Pe.refresh}`, n = F({
69
+ eventFilters: { filters: w, rawFilters: [] },
51
70
  eventSorts: { sorts: D, rawSorts: [] }
52
- }), z = (e) => {
53
- y((t) => ({ ...t, [e]: !t[e] }));
54
- }, R = a(() => {
71
+ }), Q = (e) => {
72
+ A((t) => ({ ...t, [e]: !t[e] }));
73
+ }, E = l(() => {
55
74
  if (o.some((e) => e.presence === "fixed")) {
56
75
  const e = n.current?.eventFilters?.filters;
57
76
  return !(!e || e.length === 0);
58
77
  }
59
78
  return !0;
60
- }, [n, o]), [G, J] = Te(
79
+ }, [n, o]), [Z, ee] = Ie(
61
80
  (e, t) => ({ ...e, [t]: !e[t] }),
62
81
  { filters: !1, sorts: !1 }
63
- ), Q = a(() => {
64
- O(!0);
65
- }, [O]), X = a(
82
+ ), te = l(() => {
83
+ N(!0);
84
+ }, [N]), re = l(
66
85
  (e, t) => {
67
- _((h) => ({ ...h, filter: e.length === 0 })), n.current?.eventFilters?.filters && !ae(n.current?.eventFilters?.filters, e) && p?.(
68
- s ? `${s}_${x}` : x,
86
+ O((u) => ({ ...u, filter: e.length === 0 })), n.current?.eventFilters?.filters && !me(n.current?.eventFilters?.filters, e) && y?.(
87
+ c ? `${c}_${$}` : $,
69
88
  "window",
70
89
  e
71
90
  ), n.current = {
72
91
  ...n.current,
73
92
  eventFilters: { filters: e, rawFilters: t }
74
- }, (T.current > 0 || T.current === 0 && !r) && d(n.current), T.current++, J("filters"), O(!1);
93
+ }, (b.current > 0 || b.current === 0 && !r) && S(n.current), b.current++, ee("filters"), N(!1);
75
94
  },
76
- [d, s, p, _, r]
77
- ), Z = a(() => {
78
- P(!0);
79
- }, [P]), ee = a(
95
+ [S, c, y, O, r]
96
+ ), ne = l(() => {
97
+ M(!0);
98
+ }, [M]), ie = l(
80
99
  (e, t) => {
81
- _((h) => ({ ...h, sort: e.length === 0 })), n.current?.eventSorts?.sorts && !ae(n.current?.eventSorts?.sorts, e) && p?.(
82
- s ? `${s}_${E}` : E,
100
+ O((u) => ({ ...u, sort: e.length === 0 })), n.current?.eventSorts?.sorts && !me(n.current?.eventSorts?.sorts, e) && y?.(
101
+ c ? `${c}_${P}` : P,
83
102
  "window",
84
103
  e
85
104
  ), n.current = {
86
105
  ...n.current,
87
106
  eventSorts: { sorts: e, rawSorts: t }
88
- }, R() ? d(n.current) : T.current++, P(!1), J("sorts");
107
+ }, E() ? S(n.current) : b.current++, M(!1), ee("sorts");
89
108
  },
90
109
  [
91
- d,
92
- s,
93
- p,
94
- _,
95
- R
110
+ S,
111
+ c,
112
+ y,
113
+ O,
114
+ E
96
115
  ]
97
- ), k = a(() => {
98
- u ? R() ? d(n.current) : U(
99
- { title: W($e.error_invalid_filters_before) },
116
+ ), x = l(() => {
117
+ m ? E() ? S(n.current) : G(
118
+ { title: J(He.error_invalid_filters_before) },
100
119
  { type: "error" }
101
- ) : (l.current && l.current.fireOnChangeFilter(), i.current && i.current.fireOnChangeSort());
120
+ ) : (a.current && a.current.fireOnChangeFilter(), s.current && s.current.fireOnChangeSort());
102
121
  }, [
103
- u,
104
- W,
105
- R,
106
- d,
107
- U
108
- ]), ge = m(
109
- () => /* @__PURE__ */ M(
110
- ke,
122
+ m,
123
+ J,
124
+ E,
125
+ S,
126
+ G
127
+ ]), Fe = h(
128
+ () => /* @__PURE__ */ H(
129
+ Ke,
111
130
  {
112
131
  direction: "row",
113
- ...H(
114
- N,
115
- V.stackLeftActions,
116
- g
132
+ ...V(
133
+ z,
134
+ Y.stackLeftActions,
135
+ p
117
136
  ),
118
137
  children: [
119
138
  o && o.length > 0 && /* @__PURE__ */ f(
120
- se,
139
+ ue,
121
140
  {
122
141
  badgeProps: {
123
142
  variant: "dot",
124
- invisible: L.filter,
143
+ invisible: B.filter,
125
144
  color: "primary"
126
145
  },
127
- icon: `${C}/${F}/${_e}`,
128
- isToggled: c.filter,
129
- onToggle: () => z("filter")
146
+ icon: `${v}/${R}/${xe}`,
147
+ isToggled: i.filter,
148
+ onToggle: () => Q("filter")
130
149
  }
131
150
  ),
132
151
  r && r.length > 0 && /* @__PURE__ */ f(
133
- se,
152
+ ue,
134
153
  {
135
154
  badgeProps: {
136
155
  variant: "dot",
137
- invisible: L.sort,
156
+ invisible: B.sort,
138
157
  color: "primary"
139
158
  },
140
- icon: `${C}/${F}/${be}`,
141
- isToggled: c.sort,
142
- onToggle: () => z("sort")
159
+ icon: `${v}/${R}/${$e}`,
160
+ isToggled: i.sort,
161
+ onToggle: () => Q("sort")
143
162
  }
144
163
  )
145
164
  ]
146
165
  }
147
166
  ),
148
167
  [
149
- c,
150
- L,
151
- C,
152
- F,
153
- g,
168
+ i,
169
+ B,
170
+ v,
171
+ R,
172
+ p,
154
173
  o,
155
174
  r
156
175
  ]
157
- ), he = m(
158
- () => /* @__PURE__ */ M(
159
- we,
176
+ ), ye = h(
177
+ () => /* @__PURE__ */ H(
178
+ Le,
160
179
  {
161
180
  direction: "row",
162
- ...H(
163
- N,
164
- V.stackRightActions,
165
- g
181
+ ...V(
182
+ z,
183
+ Y.stackRightActions,
184
+ p
166
185
  ),
167
186
  children: [
168
187
  /* @__PURE__ */ f(
169
- le,
188
+ fe,
170
189
  {
171
190
  ownerState: {
172
- isDirty: A || I,
173
- automatic: u
191
+ isDirty: _ || I,
192
+ automatic: m
174
193
  },
175
- icon: b,
194
+ icon: k,
176
195
  "aria-label": "refresh",
177
- onClick: k,
196
+ onClick: x,
178
197
  variant: "outline"
179
198
  }
180
199
  ),
181
- Y
200
+ q
182
201
  ]
183
202
  }
184
203
  ),
185
- [g, A, I, u, b, k, Y]
186
- ), te = a(() => i.current ? i.current.getCurrentSorts() : [], [i]), re = a(
204
+ [p, _, I, m, k, x, q]
205
+ ), oe = l(() => s.current ? s.current.getCurrentSorts() : [], [s]), se = l(
187
206
  (e) => {
188
- if (i.current) {
189
- const t = r?.find((K) => K.name === e.columnKey), h = t?.presence === "fixed";
207
+ if (s.current) {
208
+ const t = r?.find((d) => d.name === e.columnKey), u = t?.presence === "fixed";
190
209
  switch (e.action) {
191
210
  case "add": {
192
- const K = {
193
- id: i.current.getNewId(),
211
+ const d = {
212
+ id: s.current.getNewId(),
194
213
  field: {
195
214
  name: e.columnKey,
196
215
  type: t?.type || "string",
@@ -198,108 +217,121 @@ const Ge = (ue) => {
198
217
  label: e.label
199
218
  },
200
219
  isSet: !0,
201
- fixed: h,
220
+ fixed: u,
202
221
  fieldType: t?.type || "string",
203
222
  operator: e.direction
204
223
  };
205
- y((Fe) => ({ ...Fe, sort: !0 })), i.current.addExternalSort(K);
224
+ A((we) => ({ ...we, sort: !0 })), s.current.addExternalSort(d);
206
225
  break;
207
226
  }
208
227
  case "remove":
209
- h || i.current.removeExternalSort(
228
+ u || s.current.removeExternalSort(
210
229
  e.columnKey
211
230
  );
212
231
  break;
213
232
  }
214
233
  }
215
234
  },
216
- [i, r]
217
- ), ne = a(
235
+ [s, r]
236
+ ), le = l(
218
237
  (e) => {
219
- if (l.current)
238
+ if (a.current)
220
239
  switch (e.action) {
221
240
  case "add":
222
- y((t) => ({ ...t, filter: !0 })), l.current.addExternalFilter(e.columnKey);
241
+ A((t) => ({ ...t, filter: !0 })), a.current.addExternalFilter(e.columnKey);
223
242
  break;
224
243
  case "openPopoverMenuFields":
225
- y((t) => ({ ...t, filter: !0 })), l.current.openPopoverMenuFields();
244
+ A((t) => ({ ...t, filter: !0 })), a.current.openPopoverMenuFields();
226
245
  break;
227
246
  default:
228
247
  return;
229
248
  }
230
249
  },
231
- [l]
232
- ), oe = a(() => l.current ? l.current.getCurrentFilters() : [], [l]), ie = m(
233
- () => /* @__PURE__ */ M(ye, { children: [
250
+ [a]
251
+ ), ce = l(() => a.current ? a.current.getCurrentFilters() : [], [a]), ae = h(
252
+ () => /* @__PURE__ */ H(De, { children: [
234
253
  /* @__PURE__ */ f(
235
- Ae,
254
+ Oe,
236
255
  {
237
- ref: l,
238
- visibleRefresh: $,
239
- automatic: u,
256
+ ref: a,
257
+ visibleRefresh: K,
258
+ automatic: m,
240
259
  fields: o,
241
- initialAppliedFilters: v,
242
- onChangeFilters: X,
243
- withAllField: B,
244
- onDirty: Q
260
+ initialAppliedFilters: w,
261
+ onChangeFilters: re,
262
+ withAllField: j,
263
+ onDirty: te
245
264
  }
246
265
  ),
247
266
  r ? /* @__PURE__ */ f(
248
- Ie,
267
+ ke,
249
268
  {
250
- ref: i,
251
- visibleRefresh: $,
252
- automatic: u,
269
+ ref: s,
270
+ visibleRefresh: K,
271
+ automatic: m,
253
272
  fields: r,
254
273
  initialAppliedSorts: D,
255
- onChangeSorts: ee,
256
- onDirty: Z
274
+ onChangeSorts: ie,
275
+ onDirty: ne,
276
+ leadingSeparator: /* @__PURE__ */ f(
277
+ Ne,
278
+ {
279
+ ownerState: {
280
+ showDynamicFilter: i.filter,
281
+ showDynamicSort: i.sort,
282
+ isNarrow: T
283
+ },
284
+ children: /* @__PURE__ */ f(Ve, { orientation: "vertical", customVariant: "solid" })
285
+ }
286
+ )
257
287
  }
258
288
  ) : null,
259
- q && /* @__PURE__ */ f(
260
- le,
289
+ U && /* @__PURE__ */ f(
290
+ fe,
261
291
  {
262
292
  ownerState: {
263
- automatic: u,
264
- isDirty: A || I
293
+ automatic: m,
294
+ isDirty: _ || I
265
295
  },
266
- icon: b,
296
+ icon: k,
267
297
  "aria-label": "refresh",
268
- onClick: k
298
+ onClick: x
269
299
  }
270
300
  )
271
301
  ] }),
272
- [$, u, o, v, X, B, Q, r, D, ee, Z, q, A, I, b, k]
273
- ), Se = m(
302
+ [K, m, o, w, re, j, te, r, D, ie, ne, U, _, I, k, x, i, T]
303
+ ), ve = h(
274
304
  () => /* @__PURE__ */ f(
275
- xe,
305
+ Me,
276
306
  {
307
+ ref: X,
277
308
  direction: "row",
278
309
  ownerState: {
279
- showDynamicFilter: c.filter,
280
- showDynamicSort: c.sort
310
+ showDynamicFilter: i.filter,
311
+ showDynamicSort: i.sort,
312
+ isNarrow: T
281
313
  },
282
- ...H(
283
- N,
284
- V.stackCustomHeader,
285
- g
314
+ ...V(
315
+ z,
316
+ Y.stackCustomHeader,
317
+ p
286
318
  ),
287
- children: ie
319
+ children: ae
288
320
  }
289
321
  ),
290
- [c, g, ie]
291
- ), pe = m(() => {
322
+ [i, p, ae, T, X]
323
+ ), Re = h(() => {
292
324
  if (!(!r || r.length === 0))
293
325
  return {
294
326
  sortsColumns: r.map((e) => e.name),
295
- sortsApplied: te().map((e) => ({
327
+ sortsApplied: oe().map((e) => ({
296
328
  columnKey: e.field.name,
297
329
  removable: !e.fixed,
298
330
  direction: e.operator
299
331
  })),
300
- onChange: re
332
+ onChange: se
301
333
  };
302
- }, [r, G.sorts, te, re]), Ce = m(() => {
334
+ }, [r, Z.sorts, oe, se]), Ae = h(() => {
303
335
  if (!(!o || o.length === 0))
304
336
  return {
305
337
  filterColumns: o.map((e) => ({
@@ -307,22 +339,22 @@ const Ge = (ue) => {
307
339
  multiple: e.multiple || !1,
308
340
  skipColumnValidation: e.skipColumnValidation || !1
309
341
  })),
310
- filtersApplied: oe().map((e) => ({
342
+ filtersApplied: ce().map((e) => ({
311
343
  columnKey: e.field.name,
312
344
  isValid: e.isSet
313
345
  })),
314
- onChange: ne
346
+ onChange: le
315
347
  };
316
- }, [o, G.filters, oe, ne]);
348
+ }, [o, Z.filters, ce, le]);
317
349
  return {
318
- leftActions: ge,
319
- rightActions: he,
320
- visibleCustomHeader: de,
321
- customHeaderComponent: Se,
322
- externalSortSettings: pe,
323
- externalFilterSettings: Ce
350
+ leftActions: Fe,
351
+ rightActions: ye,
352
+ visibleCustomHeader: Ce,
353
+ customHeaderComponent: ve,
354
+ externalSortSettings: Re,
355
+ externalFilterSettings: Ae
324
356
  };
325
357
  };
326
358
  export {
327
- Ge as useDynamicFilterAndSort
359
+ ot as useDynamicFilterAndSort
328
360
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.38.0",
3
+ "version": "9.39.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -52,24 +52,24 @@
52
52
  "@hookform/resolvers": "2.9.11",
53
53
  "nprogress": "0.2.0",
54
54
  "react-transition-group": "4.4.5",
55
- "react-rnd": "10.5.2",
56
- "@mui/x-date-pickers": "6.20.2",
57
- "react-dropzone": "14.4.1",
58
55
  "react-color": "2.19.3",
59
56
  "react-draggable": "4.5.0",
60
57
  "react-spinners": "0.13.8",
58
+ "react-dropzone": "14.4.1",
59
+ "@mui/x-date-pickers": "6.20.2",
60
+ "react-rnd": "10.5.2",
61
61
  "chart.js": "4.5.1",
62
62
  "chartjs-chart-error-bars": "4.4.5",
63
63
  "qrcode.react": "3.2.0",
64
- "simplebar-react": "3.2.6",
65
- "react-simple-code-editor": "0.14.1",
66
- "react-resizable-panels": "2.1.9",
67
64
  "react-data-grid": "7.0.0-beta.47",
68
65
  "react-dnd": "16.0.1",
69
66
  "react-dnd-html5-backend": "16.0.1",
67
+ "react-simple-code-editor": "0.14.1",
68
+ "react-resizable-panels": "2.1.9",
69
+ "simplebar-react": "3.2.6",
70
70
  "date-fns": "2.30.0",
71
- "react-resizable": "3.1.3",
72
71
  "react-window": "1.8.11",
72
+ "react-resizable": "3.1.3",
73
73
  "@tanstack/react-virtual": "3.13.23"
74
74
  }
75
75
  }