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