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