@stenajs-webui/filter 19.0.0-next.2 → 19.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,138 +1,151 @@
1
1
  (function(){"use strict";try{var e=document.createElement("style");e.appendChild(document.createTextNode("")),document.head.appendChild(e)}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { createContext as L, useContext as E, useCallback as p, useState as v, useReducer as Y, useMemo as M } from "react";
3
- import { Drawer as I } from "@stenajs-webui/modal";
4
- import { cssColor as J } from "@stenajs-webui/theme";
5
- import { Row as b, Column as O, Box as B, Space as Q, truthyKeysAsList as V } from "@stenajs-webui/core";
6
- import { CardHeader as U, FlatButton as A, stenaTimes as X, stenaSliders as j, SecondaryButton as Z, MenuButton as _, Spinner as N, Banner as ee, Chip as $ } from "@stenajs-webui/elements";
7
- import { jsx as o, jsxs as k, Fragment as z } from "react/jsx-runtime";
8
- import { upperFirst as te, lowerCase as ne } from "lodash";
9
- import { combineReducers as re } from "redux";
10
- import { reducerIdGate as y, createValueByIdReducer as ce, createEntityReducer as T, reducerIdGateAction as C, createEntityActions as w, createValueByIdActions as R } from "@stenajs-webui/redux";
11
- import oe from "@emotion/styled";
12
- import { CheckboxWithLabel as se } from "@stenajs-webui/forms";
13
- import { ChipMultiSelect as ie } from "@stenajs-webui/select";
14
- import { stringsToDateRange as ae, dateRangeToStrings as le, DateRangeCalendar as de } from "@stenajs-webui/calendar";
15
- const ue = ({
2
+ import { createContext as L, useContext as E, useCallback as u, useState as M, useReducer as J, useMemo as b } from "react";
3
+ import { Drawer as Q } from "@stenajs-webui/modal";
4
+ import { cssColor as U } from "@stenajs-webui/theme";
5
+ import { Spacing as X, Row as g, Space as O, Heading as Z, Column as P, Box as A, truthyKeysAsList as z } from "@stenajs-webui/core";
6
+ import { FlatButton as H, stenaTimes as _, SecondaryButton as N, stenaSlidersMini as ee, MenuButton as te, Spinner as ne, Banner as re, Chip as D } from "@stenajs-webui/elements";
7
+ import { jsx as o, jsxs as w, Fragment as q } from "react/jsx-runtime";
8
+ import { upperFirst as ce, lowerCase as oe } from "lodash";
9
+ import { combineReducers as se } from "redux";
10
+ import { reducerIdGate as B, createValueByIdReducer as ie, createEntityReducer as $, reducerIdGateAction as C, createEntityActions as v, createValueByIdActions as R } from "@stenajs-webui/redux";
11
+ import ae from "@emotion/styled";
12
+ import { CheckboxWithLabel as le } from "@stenajs-webui/forms";
13
+ import { ChipMultiSelect as de } from "@stenajs-webui/select";
14
+ import { stringsToDateRange as ue, dateRangeToStrings as he, DateRangeCalendar as pe } from "@stenajs-webui/calendar";
15
+ const Se = ({
16
16
  onRequestClose: e,
17
- header: t = "Filters",
18
- headerIcon: n = j,
19
- contentRight: r
20
- }) => /* @__PURE__ */ o(U, {
21
- flex: "0 0 auto",
22
- contentRight: /* @__PURE__ */ k(b, {
23
- gap: 2,
24
- children: [r, /* @__PURE__ */ o(A, {
25
- leftIcon: X,
26
- onClick: e,
27
- variant: "danger"
17
+ header: t = "Filter",
18
+ contentRight: n
19
+ }) => /* @__PURE__ */ o(X, {
20
+ children: /* @__PURE__ */ w(g, {
21
+ justifyContent: "space-between",
22
+ alignItems: "center",
23
+ height: "48px",
24
+ children: [/* @__PURE__ */ w(g, {
25
+ children: [/* @__PURE__ */ o(O, {
26
+ num: 3
27
+ }), /* @__PURE__ */ o(Z, {
28
+ variant: "h4",
29
+ children: t
30
+ })]
31
+ }), /* @__PURE__ */ w(g, {
32
+ gap: 1,
33
+ children: [n, /* @__PURE__ */ o(H, {
34
+ leftIcon: _,
35
+ onClick: e,
36
+ variant: "danger"
37
+ }), /* @__PURE__ */ o(O, {
38
+ num: 0.5
39
+ })]
28
40
  })]
29
- }),
30
- leftIcon: n,
31
- text: t
32
- }), D = L(null), q = () => {
33
- const e = E(D);
41
+ })
42
+ }), G = L(null), W = () => {
43
+ const e = E(G);
34
44
  if (!e)
35
45
  throw new Error(
36
46
  "Missing search filter context, wrap components with SearchFilterContext component."
37
47
  );
38
48
  return e;
39
- }, G = L(null), f = () => {
40
- const e = E(G);
49
+ }, K = L(null), F = () => {
50
+ const e = E(K);
41
51
  if (!e)
42
52
  throw new Error("Missing search filter dispatch context.");
43
53
  return e;
44
- }, W = L(null), m = () => {
45
- const e = E(W);
54
+ }, Y = L(null), x = () => {
55
+ const e = E(Y);
46
56
  if (!e)
47
57
  throw new Error("Missing search filter actions context.");
48
58
  return e;
49
- }, $e = ({
59
+ }, qe = ({
50
60
  children: e,
51
61
  header: t,
52
- headerIcon: n,
53
- headerContentRight: r,
54
- ...c
62
+ headerContentRight: n,
63
+ ...r
55
64
  }) => {
56
65
  const {
57
66
  settings: {
58
- open: s
67
+ open: c
59
68
  }
60
- } = q(), i = f(), l = m(), d = p(() => {
61
- i(l.closeFilters());
62
- }, [l, i]);
63
- return /* @__PURE__ */ o(I, {
64
- background: J("--lhds-color-ui-50"),
65
- width: "370px",
66
- isOpen: s,
67
- onRequestClose: d,
68
- ...c,
69
- children: /* @__PURE__ */ k(O, {
69
+ } = W(), s = F(), i = x(), l = u(() => {
70
+ s(i.closeFilters());
71
+ }, [i, s]);
72
+ return /* @__PURE__ */ o(Q, {
73
+ isOpen: c,
74
+ onRequestClose: l,
75
+ ...r,
76
+ children: /* @__PURE__ */ w(P, {
70
77
  height: "100%",
71
- children: [/* @__PURE__ */ o(ue, {
72
- onRequestClose: d,
78
+ borderRadius: "var(--swui-border-radius)",
79
+ background: U("--lhds-color-ui-50"),
80
+ children: [/* @__PURE__ */ o(Se, {
81
+ onRequestClose: l,
73
82
  header: t,
74
- headerIcon: n,
75
- contentRight: r
76
- }), /* @__PURE__ */ o(B, {
77
- spacing: !0,
78
- indent: !0,
83
+ contentRight: n
84
+ }), /* @__PURE__ */ o(A, {
85
+ spacing: 1,
86
+ indent: 1,
87
+ gap: 1,
79
88
  children: e
80
89
  })]
81
90
  })
82
91
  });
83
- }, ze = ({
92
+ }, Ge = ({
84
93
  label: e = "Filters",
85
- leftIcon: t = j
94
+ leftIcon: t = ee
86
95
  }) => {
87
- const n = f(), r = m(), c = p(() => {
96
+ const n = F(), r = x(), c = u(() => {
88
97
  n(r.openFilters());
89
98
  }, [r, n]);
90
- return /* @__PURE__ */ o(Z, {
99
+ return /* @__PURE__ */ o(N, {
91
100
  label: e,
92
101
  leftIcon: t,
93
102
  onClick: c
94
103
  });
95
- }, P = function({
104
+ }, T = function({
96
105
  sectionId: t,
97
106
  label: n,
98
107
  loading: r,
99
108
  error: c,
100
109
  onRetry: s,
101
110
  disableContentPadding: i,
102
- children: l
111
+ children: l,
112
+ leftIcon: p,
113
+ contentRight: S
103
114
  }) {
104
- var g;
105
- const d = q(), S = f(), a = m(), u = (g = d.expandedSections.values[t]) != null ? g : !1, F = p(() => {
106
- S(a.setSectionExpanded(t, !u));
107
- }, [a, S, u, t]), x = n != null ? n : he(t);
108
- return /* @__PURE__ */ k(z, {
109
- children: [/* @__PURE__ */ o(_, {
110
- label: x,
115
+ var j;
116
+ const a = W(), m = F(), f = x(), h = (j = a.expandedSections.values[t]) != null ? j : !1, k = u(() => {
117
+ m(f.setSectionExpanded(t, !h));
118
+ }, [f, m, h, t]), y = n != null ? n : me(t);
119
+ return /* @__PURE__ */ w(q, {
120
+ children: [/* @__PURE__ */ o(te, {
121
+ label: y,
122
+ leftIcon: p,
111
123
  expandable: !0,
112
- expanded: u,
113
- selected: u,
114
- onClick: F,
115
- children: r ? /* @__PURE__ */ o(b, {
124
+ expanded: h,
125
+ selected: h,
126
+ onClick: k,
127
+ right: S,
128
+ children: r ? /* @__PURE__ */ o(g, {
116
129
  spacing: !0,
117
130
  justifyContent: "center",
118
131
  flex: 1,
119
- children: /* @__PURE__ */ o(N, {
132
+ children: /* @__PURE__ */ o(ne, {
120
133
  size: "small"
121
134
  })
122
- }) : c ? /* @__PURE__ */ o(ee, {
135
+ }) : c ? /* @__PURE__ */ o(re, {
123
136
  variant: "error",
124
137
  text: c,
125
- contentRight: s ? /* @__PURE__ */ o(A, {
138
+ contentRight: s ? /* @__PURE__ */ o(H, {
126
139
  label: "Retry",
127
140
  onClick: s
128
141
  }) : null
129
142
  }) : l
130
- }), u && /* @__PURE__ */ o(Q, {})]
143
+ }), h && /* @__PURE__ */ o(O, {})]
131
144
  });
132
- }, he = (e) => te(ne(e)), De = ({
145
+ }, me = (e) => ce(oe(e)), We = ({
133
146
  children: e,
134
147
  ...t
135
- }) => /* @__PURE__ */ o(O, {
148
+ }) => /* @__PURE__ */ o(P, {
136
149
  style: {
137
150
  marginTop: "auto"
138
151
  },
@@ -143,103 +156,103 @@ const ue = ({
143
156
  zIndex: 1,
144
157
  ...t,
145
158
  children: e
146
- }), K = L(null), qe = () => {
147
- const e = E(K);
159
+ }), I = L(null), Ke = () => {
160
+ const e = E(I);
148
161
  if (!e)
149
162
  throw new Error(
150
163
  "Missing search filter context, wrap components with SearchFilterContext component."
151
164
  );
152
165
  return e;
153
- }, pe = function({
166
+ }, Ce = function({
154
167
  state: t,
155
168
  dispatch: n,
156
169
  actions: r,
157
170
  children: c
158
171
  }) {
159
- return /* @__PURE__ */ o(G.Provider, {
172
+ return /* @__PURE__ */ o(K.Provider, {
160
173
  value: n,
161
- children: /* @__PURE__ */ o(W.Provider, {
174
+ children: /* @__PURE__ */ o(Y.Provider, {
162
175
  value: r,
163
- children: /* @__PURE__ */ o(D.Provider, {
176
+ children: /* @__PURE__ */ o(G.Provider, {
164
177
  value: t,
165
- children: /* @__PURE__ */ o(K.Provider, {
178
+ children: /* @__PURE__ */ o(I.Provider, {
166
179
  value: t.formModel,
167
180
  children: c
168
181
  })
169
182
  })
170
183
  })
171
184
  });
172
- }, Se = (e) => ({
185
+ }, fe = (e) => ({
173
186
  settings: {
174
187
  open: !1
175
188
  },
176
189
  formModel: e,
177
190
  expandedSections: { values: {} }
178
- }), Ce = (e, t) => re({
179
- expandedSections: y(
180
- h(e, "expandedSections"),
181
- ce(t.expandedSections)
191
+ }), Fe = (e, t) => se({
192
+ expandedSections: B(
193
+ d(e, "expandedSections"),
194
+ ie(t.expandedSections)
182
195
  ),
183
- formModel: y(
184
- h(e, "formModel"),
185
- T(t.formModel)
196
+ formModel: B(
197
+ d(e, "formModel"),
198
+ $(t.formModel)
186
199
  ),
187
- settings: y(
188
- h(e, "settings"),
189
- T(t.settings)
200
+ settings: B(
201
+ d(e, "settings"),
202
+ $(t.settings)
190
203
  )
191
- }), fe = (e, t) => ({
204
+ }), xe = (e, t) => ({
192
205
  openFilters: () => C(
193
- h(e, "settings"),
194
- w().setEntityFields({
206
+ d(e, "settings"),
207
+ v().setEntityFields({
195
208
  open: !0
196
209
  })
197
210
  ),
198
211
  closeFilters: () => C(
199
- h(e, "settings"),
200
- w().setEntityFields({
212
+ d(e, "settings"),
213
+ v().setEntityFields({
201
214
  open: !1
202
215
  })
203
216
  ),
204
217
  setFormModelFields: (n) => C(
205
- h(e, "formModel"),
206
- w().setEntityFields(n)
218
+ d(e, "formModel"),
219
+ v().setEntityFields(n)
207
220
  ),
208
221
  clearFormModel: () => C(
209
- h(e, "formModel"),
210
- w().setEntity(t)
222
+ d(e, "formModel"),
223
+ v().setEntity(t)
211
224
  ),
212
225
  expandSection: (n) => C(
213
- h(e, "expandedSections"),
226
+ d(e, "expandedSections"),
214
227
  R().setValue(n, !0)
215
228
  ),
216
229
  collapseSection: (n) => C(
217
- h(e, "expandedSections"),
230
+ d(e, "expandedSections"),
218
231
  R().setValue(n, !1)
219
232
  ),
220
233
  setSectionExpanded: (n, r) => C(
221
- h(e, "expandedSections"),
234
+ d(e, "expandedSections"),
222
235
  R().setValue(n, r)
223
236
  ),
224
237
  clearExpandedSections: () => C(
225
- h(e, "expandedSections"),
238
+ d(e, "expandedSections"),
226
239
  R().clearAllValues()
227
240
  )
228
- }), h = (e, t) => `${e}.${t}`, me = (e) => {
229
- const [t] = v(
230
- () => Ce("local", e)
231
- ), [n] = v(
232
- () => fe(
241
+ }), d = (e, t) => `${e}.${t}`, ge = (e) => {
242
+ const [t] = M(
243
+ () => Fe("local", e)
244
+ ), [n] = M(
245
+ () => xe(
233
246
  "local",
234
247
  e.formModel
235
248
  )
236
- ), [r, c] = Y(t, e);
249
+ ), [r, c] = J(t, e);
237
250
  return {
238
251
  actions: n,
239
252
  state: r,
240
253
  dispatch: c
241
254
  };
242
- }, Ge = function({
255
+ }, Ye = function({
243
256
  initialFormModel: t,
244
257
  children: n
245
258
  }) {
@@ -247,121 +260,121 @@ const ue = ({
247
260
  state: r,
248
261
  actions: c,
249
262
  dispatch: s
250
- } = me(Se(t));
251
- return /* @__PURE__ */ o(pe, {
263
+ } = ge(fe(t));
264
+ return /* @__PURE__ */ o(Ce, {
252
265
  state: r,
253
266
  actions: c,
254
267
  dispatch: s,
255
268
  children: n
256
269
  });
257
- }, H = oe.div`
270
+ }, V = ae.div`
258
271
  padding: calc(var(--swui-metrics-spacing) / 2)
259
272
  calc(var(--swui-metrics-indent) / 2);
260
- `, We = ({
273
+ `, Ie = ({
261
274
  children: e,
262
275
  disableClearAllButton: t = !1
263
276
  }) => {
264
- const n = f(), r = m(), c = p(() => n(r.clearFormModel()), [r, n]);
265
- return /* @__PURE__ */ k(b, {
277
+ const n = F(), r = x(), c = u(() => n(r.clearFormModel()), [r, n]);
278
+ return /* @__PURE__ */ w(g, {
266
279
  flexWrap: "wrap",
267
- children: [e, !t && /* @__PURE__ */ o(H, {
268
- children: /* @__PURE__ */ o(A, {
280
+ children: [e, !t && /* @__PURE__ */ o(V, {
281
+ children: /* @__PURE__ */ o(H, {
269
282
  size: "small",
270
283
  label: "Clear all",
271
284
  onClick: c
272
285
  })
273
286
  })]
274
287
  });
275
- }, Fe = function({
288
+ }, we = function({
276
289
  label: t,
277
290
  sectionId: n
278
291
  }) {
279
- const r = f(), c = m(), s = p(() => {
292
+ const r = F(), c = x(), s = u(() => {
280
293
  r(c.clearExpandedSections()), r(c.expandSection(n)), r(c.openFilters());
281
294
  }, [c, r, n]);
282
- return /* @__PURE__ */ o(H, {
283
- children: /* @__PURE__ */ o($, {
295
+ return /* @__PURE__ */ o(V, {
296
+ children: /* @__PURE__ */ o(D, {
284
297
  label: t,
285
298
  variant: "secondary",
286
299
  onClick: s
287
300
  })
288
301
  });
289
- }, xe = function({
302
+ }, ve = function({
290
303
  sectionId: t,
291
304
  label: n,
292
305
  value: r,
293
306
  onClickRemove: c
294
307
  }) {
295
- const s = f(), i = m(), l = p((a) => s(i.setFormModelFields(a)), [s, i]), d = p(() => {
308
+ const s = F(), i = x(), l = u((a) => s(i.setFormModelFields(a)), [s, i]), p = u(() => {
296
309
  c == null || c({
297
310
  value: r,
298
311
  setFormModelFields: l
299
312
  });
300
- }, [c, l, r]), S = p(() => {
313
+ }, [c, l, r]), S = u(() => {
301
314
  s(i.clearExpandedSections()), s(i.expandSection(t)), s(i.openFilters());
302
315
  }, [i, s, t]);
303
- return /* @__PURE__ */ o(H, {
304
- children: /* @__PURE__ */ o($, {
316
+ return /* @__PURE__ */ o(V, {
317
+ children: /* @__PURE__ */ o(D, {
305
318
  label: n != null ? n : t,
306
319
  onClick: S,
307
- onClickRemove: c ? d : void 0
320
+ onClickRemove: c ? p : void 0
308
321
  })
309
322
  });
310
- }, Ke = function({
323
+ }, Je = function({
311
324
  sectionId: t,
312
325
  chips: n,
313
326
  emptyChipLabel: r,
314
327
  onClickRemoveOnChip: c
315
328
  }) {
316
- return n != null && n.length ? /* @__PURE__ */ o(z, {
329
+ return n != null && n.length ? /* @__PURE__ */ o(q, {
317
330
  children: n.map(({
318
331
  label: s,
319
332
  value: i
320
- }) => /* @__PURE__ */ o(xe, {
333
+ }) => /* @__PURE__ */ o(ve, {
321
334
  label: s != null ? s : t,
322
335
  sectionId: t,
323
336
  onClickRemove: c,
324
337
  value: i
325
338
  }, i))
326
- }) : r ? /* @__PURE__ */ o(Fe, {
339
+ }) : r ? /* @__PURE__ */ o(we, {
327
340
  sectionId: t,
328
341
  label: r
329
342
  }) : null;
330
- }, Ye = (e, t, n) => ({
331
- chips: ge(
343
+ }, Qe = (e, t, n) => ({
344
+ chips: Re(
332
345
  e[t],
333
346
  n
334
347
  ),
335
- onClickRemoveOnChip: we(
348
+ onClickRemoveOnChip: Me(
336
349
  e,
337
350
  t
338
351
  )
339
- }), ge = (e, t) => V(e).map((n) => {
352
+ }), Re = (e, t) => z(e).map((n) => {
340
353
  var c;
341
354
  const r = t == null ? void 0 : t.find((s) => s.value === n);
342
355
  return { value: n, label: (c = r == null ? void 0 : r.label) != null ? c : n };
343
- }), we = (e, t) => ({ setFormModelFields: n, value: r }) => {
356
+ }), Me = (e, t) => ({ setFormModelFields: n, value: r }) => {
344
357
  const c = { ...e[t] };
345
358
  c[r] = !1, n({
346
359
  [t]: c
347
360
  });
348
- }, Ie = ({
361
+ }, Ue = ({
349
362
  options: e,
350
363
  value: t,
351
364
  onValueChange: n,
352
365
  ...r
353
- }) => /* @__PURE__ */ o(P, {
366
+ }) => /* @__PURE__ */ o(T, {
354
367
  disableContentPadding: !0,
355
368
  ...r,
356
- children: /* @__PURE__ */ o(O, {
369
+ children: /* @__PURE__ */ o(P, {
357
370
  maxHeight: "400px",
358
371
  overflowY: "auto",
359
372
  flex: 1,
360
373
  gap: 1,
361
374
  spacing: 1,
362
- children: e == null ? void 0 : e.map((c) => /* @__PURE__ */ o(b, {
375
+ children: e == null ? void 0 : e.map((c) => /* @__PURE__ */ o(g, {
363
376
  alignItems: "center",
364
- children: /* @__PURE__ */ o(se, {
377
+ children: /* @__PURE__ */ o(le, {
365
378
  tabIndex: -1,
366
379
  value: t == null ? void 0 : t[c.value],
367
380
  label: c.label,
@@ -372,27 +385,27 @@ const ue = ({
372
385
  })
373
386
  }, c.value))
374
387
  })
375
- }), Je = ({
388
+ }), Xe = ({
376
389
  options: e,
377
390
  value: t,
378
391
  noneSelectedLabel: n,
379
392
  onValueChange: r,
380
393
  ...c
381
394
  }) => {
382
- const [s, i] = v(""), l = M(() => t ? V(t).map((a) => {
383
- var F;
384
- const u = e == null ? void 0 : e.find((x) => x.value === a);
395
+ const [s, i] = M(""), l = b(() => t ? z(t).map((a) => {
396
+ var f;
397
+ const m = e == null ? void 0 : e.find((h) => h.value === a);
385
398
  return {
386
399
  value: a,
387
- label: (F = u == null ? void 0 : u.label) != null ? F : a
400
+ label: (f = m == null ? void 0 : m.label) != null ? f : a
388
401
  };
389
- }) : [], [e, t]), d = M(() => e == null ? void 0 : e.filter((a) => a.value.toLocaleLowerCase().indexOf(s.toLocaleLowerCase()) > -1 || a.label.toLocaleLowerCase().indexOf(s.toLocaleLowerCase()) > -1), [e, s]), S = p((a) => {
390
- r == null || r(Re(a));
402
+ }) : [], [e, t]), p = b(() => e == null ? void 0 : e.filter((a) => a.value.toLocaleLowerCase().indexOf(s.toLocaleLowerCase()) > -1 || a.label.toLocaleLowerCase().indexOf(s.toLocaleLowerCase()) > -1), [e, s]), S = u((a) => {
403
+ r == null || r(be(a));
391
404
  }, [r]);
392
- return /* @__PURE__ */ o(P, {
405
+ return /* @__PURE__ */ o(T, {
393
406
  ...c,
394
- children: /* @__PURE__ */ o(ie, {
395
- options: d,
407
+ children: /* @__PURE__ */ o(de, {
408
+ options: p,
396
409
  value: l,
397
410
  onValueChange: S,
398
411
  inputValue: s,
@@ -401,23 +414,23 @@ const ue = ({
401
414
  closeMenuOnSelect: !1
402
415
  })
403
416
  });
404
- }, Re = (e) => e.reduce((t, n) => (t[n.value] = !0, t), {}), Qe = (e, t, n) => ({
405
- chips: ve(
417
+ }, be = (e) => e.reduce((t, n) => (t[n.value] = !0, t), {}), Ze = (e, t, n) => ({
418
+ chips: Le(
406
419
  e[t],
407
420
  e[n]
408
421
  ),
409
- onClickRemoveOnChip: Me(
422
+ onClickRemoveOnChip: Ee(
410
423
  t,
411
424
  n
412
425
  )
413
- }), ve = (e, t) => !e && !t ? [] : [
426
+ }), Le = (e, t) => !e && !t ? [] : [
414
427
  { value: "dateRange", label: `${e != null ? e : ""} - ${t != null ? t : ""}` }
415
- ], Me = (e, t) => ({ setFormModelFields: n }) => {
428
+ ], Ee = (e, t) => ({ setFormModelFields: n }) => {
416
429
  n({
417
430
  [e]: void 0,
418
431
  [t]: void 0
419
432
  });
420
- }, Ue = (e, t, n) => ({
433
+ }, _e = (e, t, n) => ({
421
434
  value: {
422
435
  startDate: e[t],
423
436
  endDate: e[n]
@@ -429,78 +442,80 @@ const ue = ({
429
442
  };
430
443
  c(s.setFormModelFields(i));
431
444
  }
432
- }), Xe = ({
445
+ }), Ne = ({
433
446
  value: e,
434
447
  onValueChange: t,
435
448
  sectionId: n,
436
- contentLeft: r,
437
- contentRight: c,
438
- disableContentPadding: s,
439
- ...i
449
+ contentRight: r,
450
+ disableContentPadding: c,
451
+ label: s,
452
+ leftIcon: i,
453
+ ...l
440
454
  }) => {
441
- const l = f(), d = m(), S = M(() => ({
442
- dispatch: l,
443
- actions: d
444
- }), [d, l]), [a, u] = v("startDate"), F = M(() => ae(e), [e]), x = p((g) => {
445
- t(le(g), S);
446
- }, [t, S]);
447
- return /* @__PURE__ */ o(P, {
455
+ const p = F(), S = x(), a = b(() => ({
456
+ dispatch: p,
457
+ actions: S
458
+ }), [S, p]), [m, f] = M("startDate"), h = b(() => ue(e), [e]), k = u((y) => {
459
+ t(he(y), a);
460
+ }, [t, a]);
461
+ return /* @__PURE__ */ o(T, {
462
+ label: s,
463
+ leftIcon: i,
448
464
  sectionId: n,
449
- contentRight: c,
450
- contentLeft: r,
451
- disableContentPadding: s,
452
- children: /* @__PURE__ */ o(B, {
465
+ contentRight: r,
466
+ disableContentPadding: c,
467
+ children: /* @__PURE__ */ o(A, {
453
468
  flex: 1,
454
469
  alignItems: "center",
455
- children: /* @__PURE__ */ o(B, {
470
+ children: /* @__PURE__ */ o(A, {
456
471
  background: "white",
457
472
  indent: !0,
458
- children: /* @__PURE__ */ o(de, {
459
- setFocusedInput: u,
460
- focusedInput: a,
461
- value: F,
462
- onValueChange: x,
463
- ...i
473
+ children: /* @__PURE__ */ o(pe, {
474
+ setFocusedInput: f,
475
+ focusedInput: m,
476
+ value: h,
477
+ onValueChange: k,
478
+ ...l
464
479
  })
465
480
  })
466
481
  })
467
482
  });
468
483
  };
469
484
  export {
470
- Je as ChipMultiSelectSection,
471
- Xe as DateRangeCalendarSection,
472
- Fe as EmptyChip,
473
- W as SearchFilterActionsContext,
474
- ze as SearchFilterButton,
475
- xe as SearchFilterChip,
476
- We as SearchFilterChips,
477
- pe as SearchFilterContext,
478
- G as SearchFilterDispatchContext,
479
- $e as SearchFilterDrawer,
480
- Ge as SearchFilterLocalStateContext,
481
- K as SearchFilterModelContext,
482
- ue as SearchFilterPanelHeader,
483
- P as SearchFilterSection,
484
- D as SearchFilterStateContext,
485
- Ke as SectionChips,
486
- Ie as SimpleCheckboxListSection,
487
- De as StickyFooter,
488
- ge as createChipsForBooleanRecord,
489
- ve as createChipsForDateRange,
490
- Ye as createChipsPropsForBooleanRecord,
491
- Qe as createChipsPropsForDateRange,
492
- Ue as createDateRangeSectionProps,
493
- we as createOnClickRemoveOnChipForBooleanRecord,
494
- Me as createOnClickRemoveOnChipForDateRange,
495
- fe as createSearchFilterActions,
496
- Se as createSearchFilterInitialState,
497
- Ce as createSearchFilterReducer,
498
- he as formatColumnIdToHeaderCellLabel,
499
- h as getReducerIdFor,
500
- me as useLocalSearchFilterState,
501
- m as useSearchFilterActions,
502
- f as useSearchFilterDispatch,
503
- qe as useSearchFilterModel,
504
- q as useSearchFilterState
485
+ Xe as ChipMultiSelectSection,
486
+ Ne as DateRangeCalendarSection,
487
+ we as EmptyChip,
488
+ Y as SearchFilterActionsContext,
489
+ Ge as SearchFilterButton,
490
+ ve as SearchFilterChip,
491
+ Ie as SearchFilterChips,
492
+ Ce as SearchFilterContext,
493
+ K as SearchFilterDispatchContext,
494
+ qe as SearchFilterDrawer,
495
+ Ye as SearchFilterLocalStateContext,
496
+ I as SearchFilterModelContext,
497
+ Se as SearchFilterPanelHeader,
498
+ T as SearchFilterSection,
499
+ G as SearchFilterStateContext,
500
+ Je as SectionChips,
501
+ Ue as SimpleCheckboxListSection,
502
+ We as StickyFooter,
503
+ Re as createChipsForBooleanRecord,
504
+ Le as createChipsForDateRange,
505
+ Qe as createChipsPropsForBooleanRecord,
506
+ Ze as createChipsPropsForDateRange,
507
+ _e as createDateRangeSectionProps,
508
+ Me as createOnClickRemoveOnChipForBooleanRecord,
509
+ Ee as createOnClickRemoveOnChipForDateRange,
510
+ xe as createSearchFilterActions,
511
+ fe as createSearchFilterInitialState,
512
+ Fe as createSearchFilterReducer,
513
+ me as formatColumnIdToHeaderCellLabel,
514
+ d as getReducerIdFor,
515
+ ge as useLocalSearchFilterState,
516
+ x as useSearchFilterActions,
517
+ F as useSearchFilterDispatch,
518
+ Ke as useSearchFilterModel,
519
+ W as useSearchFilterState
505
520
  };
506
521
  //# sourceMappingURL=index.es.js.map