@stenajs-webui/filter 19.0.0-next.12 → 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 +97 -79
- 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,56 +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 { jsx as o, jsxs as g, Fragment as
|
|
3
|
-
import { createContext as L, useContext as
|
|
4
|
-
import { Drawer as
|
|
5
|
-
import { cssColor as
|
|
6
|
-
import { Spacing as X, Row as w, Space as O, Heading as Z, Column as P, Box as A, truthyKeysAsList as
|
|
7
|
-
import { FlatButton as H, stenaTimes as _, SecondaryButton as N, stenaSlidersMini as ee, MenuButton as te, Spinner as ne, Banner as re, Chip as
|
|
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 = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /* @__PURE__ */ o(
|
|
16
|
-
|
|
15
|
+
const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /* @__PURE__ */ o(
|
|
16
|
+
X,
|
|
17
17
|
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
+
)
|
|
39
48
|
}
|
|
40
|
-
)
|
|
41
|
-
const e =
|
|
49
|
+
), W = L(null), I = () => {
|
|
50
|
+
const e = k(W);
|
|
42
51
|
if (!e)
|
|
43
52
|
throw new Error(
|
|
44
53
|
"Missing search filter context, wrap components with SearchFilterContext component."
|
|
45
54
|
);
|
|
46
55
|
return e;
|
|
47
56
|
}, K = L(null), F = () => {
|
|
48
|
-
const e =
|
|
57
|
+
const e = k(K);
|
|
49
58
|
if (!e)
|
|
50
59
|
throw new Error("Missing search filter dispatch context.");
|
|
51
60
|
return e;
|
|
52
61
|
}, Y = L(null), x = () => {
|
|
53
|
-
const e =
|
|
62
|
+
const e = k(Y);
|
|
54
63
|
if (!e)
|
|
55
64
|
throw new Error("Missing search filter actions context.");
|
|
56
65
|
return e;
|
|
@@ -62,28 +71,37 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
62
71
|
}) => {
|
|
63
72
|
const {
|
|
64
73
|
settings: { open: c }
|
|
65
|
-
} =
|
|
74
|
+
} = I(), s = F(), i = x(), l = u(() => {
|
|
66
75
|
s(i.closeFilters());
|
|
67
76
|
}, [i, s]);
|
|
68
|
-
return /* @__PURE__ */ o(
|
|
69
|
-
|
|
77
|
+
return /* @__PURE__ */ o(
|
|
78
|
+
U,
|
|
70
79
|
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
+
)
|
|
85
103
|
}
|
|
86
|
-
)
|
|
104
|
+
);
|
|
87
105
|
}, Ge = ({
|
|
88
106
|
label: e = "Filters",
|
|
89
107
|
leftIcon: t = ee
|
|
@@ -111,10 +129,10 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
111
129
|
contentRight: S
|
|
112
130
|
}) {
|
|
113
131
|
var j;
|
|
114
|
-
const a =
|
|
132
|
+
const a = I(), m = F(), f = x(), h = (j = a.expandedSections.values[t]) != null ? j : !1, E = u(() => {
|
|
115
133
|
m(f.setSectionExpanded(t, !h));
|
|
116
134
|
}, [f, m, h, t]), y = n != null ? n : me(t);
|
|
117
|
-
return /* @__PURE__ */ g(
|
|
135
|
+
return /* @__PURE__ */ g($, { children: [
|
|
118
136
|
/* @__PURE__ */ o(
|
|
119
137
|
te,
|
|
120
138
|
{
|
|
@@ -123,7 +141,7 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
123
141
|
expandable: !0,
|
|
124
142
|
expanded: h,
|
|
125
143
|
selected: h,
|
|
126
|
-
onClick:
|
|
144
|
+
onClick: E,
|
|
127
145
|
right: S,
|
|
128
146
|
children: r ? /* @__PURE__ */ o(w, { spacing: !0, justifyContent: "center", flex: 1, children: /* @__PURE__ */ o(ne, { size: "small" }) }) : c ? /* @__PURE__ */ o(
|
|
129
147
|
re,
|
|
@@ -152,8 +170,8 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
152
170
|
...t,
|
|
153
171
|
children: e
|
|
154
172
|
}
|
|
155
|
-
),
|
|
156
|
-
const e =
|
|
173
|
+
), J = L(null), Ie = () => {
|
|
174
|
+
const e = k(J);
|
|
157
175
|
if (!e)
|
|
158
176
|
throw new Error(
|
|
159
177
|
"Missing search filter context, wrap components with SearchFilterContext component."
|
|
@@ -169,7 +187,7 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
169
187
|
K.Provider,
|
|
170
188
|
{
|
|
171
189
|
value: n,
|
|
172
|
-
children: /* @__PURE__ */ o(Y.Provider, { value: r, children: /* @__PURE__ */ o(
|
|
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 }) }) })
|
|
173
191
|
}
|
|
174
192
|
);
|
|
175
193
|
}, fe = (e) => ({
|
|
@@ -185,11 +203,11 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
185
203
|
),
|
|
186
204
|
formModel: B(
|
|
187
205
|
d(e, "formModel"),
|
|
188
|
-
|
|
206
|
+
z(t.formModel)
|
|
189
207
|
),
|
|
190
208
|
settings: B(
|
|
191
209
|
d(e, "settings"),
|
|
192
|
-
|
|
210
|
+
z(t.settings)
|
|
193
211
|
)
|
|
194
212
|
}), xe = (e, t) => ({
|
|
195
213
|
openFilters: () => C(
|
|
@@ -236,13 +254,13 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
236
254
|
"local",
|
|
237
255
|
e.formModel
|
|
238
256
|
)
|
|
239
|
-
), [r, c] =
|
|
257
|
+
), [r, c] = Q(t, e);
|
|
240
258
|
return {
|
|
241
259
|
actions: n,
|
|
242
260
|
state: r,
|
|
243
261
|
dispatch: c
|
|
244
262
|
};
|
|
245
|
-
},
|
|
263
|
+
}, Ke = function({
|
|
246
264
|
initialFormModel: t,
|
|
247
265
|
children: n
|
|
248
266
|
}) {
|
|
@@ -253,7 +271,7 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
253
271
|
}, V = ae.div`
|
|
254
272
|
padding: calc(var(--swui-metrics-spacing) / 2)
|
|
255
273
|
calc(var(--swui-metrics-indent) / 2);
|
|
256
|
-
`,
|
|
274
|
+
`, Ye = ({
|
|
257
275
|
children: e,
|
|
258
276
|
disableClearAllButton: t = !1
|
|
259
277
|
}) => {
|
|
@@ -279,7 +297,7 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
279
297
|
const r = F(), c = x(), s = u(() => {
|
|
280
298
|
r(c.clearExpandedSections()), r(c.expandSection(n)), r(c.openFilters());
|
|
281
299
|
}, [c, r, n]);
|
|
282
|
-
return /* @__PURE__ */ o(V, { children: /* @__PURE__ */ o(
|
|
300
|
+
return /* @__PURE__ */ o(V, { children: /* @__PURE__ */ o(G, { label: t, variant: "secondary", onClick: s }) });
|
|
283
301
|
}, ve = function({
|
|
284
302
|
sectionId: t,
|
|
285
303
|
label: n,
|
|
@@ -295,7 +313,7 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
295
313
|
s(i.clearExpandedSections()), s(i.expandSection(t)), s(i.openFilters());
|
|
296
314
|
}, [i, s, t]);
|
|
297
315
|
return /* @__PURE__ */ o(V, { children: /* @__PURE__ */ o(
|
|
298
|
-
|
|
316
|
+
G,
|
|
299
317
|
{
|
|
300
318
|
label: n != null ? n : t,
|
|
301
319
|
onClick: S,
|
|
@@ -308,7 +326,7 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
308
326
|
emptyChipLabel: r,
|
|
309
327
|
onClickRemoveOnChip: c
|
|
310
328
|
}) {
|
|
311
|
-
return n != null && n.length ? /* @__PURE__ */ o(
|
|
329
|
+
return n != null && n.length ? /* @__PURE__ */ o($, { children: n.map(({ label: s, value: i }) => /* @__PURE__ */ o(
|
|
312
330
|
ve,
|
|
313
331
|
{
|
|
314
332
|
label: s != null ? s : t,
|
|
@@ -327,7 +345,7 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
327
345
|
e,
|
|
328
346
|
t
|
|
329
347
|
)
|
|
330
|
-
}), Re = (e, t) =>
|
|
348
|
+
}), Re = (e, t) => q(e).map((n) => {
|
|
331
349
|
var c;
|
|
332
350
|
const r = t == null ? void 0 : t.find((s) => s.value === n);
|
|
333
351
|
return { value: n, label: (c = r == null ? void 0 : r.label) != null ? c : n };
|
|
@@ -360,7 +378,7 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
360
378
|
...c
|
|
361
379
|
}) => {
|
|
362
380
|
const [s, i] = M(""), l = b(
|
|
363
|
-
() => t ?
|
|
381
|
+
() => t ? q(t).map((a) => {
|
|
364
382
|
var f;
|
|
365
383
|
const m = e == null ? void 0 : e.find((h) => h.value === a);
|
|
366
384
|
return { value: a, label: (f = m == null ? void 0 : m.label) != null ? f : a };
|
|
@@ -391,13 +409,13 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
391
409
|
e[t],
|
|
392
410
|
e[n]
|
|
393
411
|
),
|
|
394
|
-
onClickRemoveOnChip:
|
|
412
|
+
onClickRemoveOnChip: ke(
|
|
395
413
|
t,
|
|
396
414
|
n
|
|
397
415
|
)
|
|
398
416
|
}), Le = (e, t) => !e && !t ? [] : [
|
|
399
417
|
{ value: "dateRange", label: `${e != null ? e : ""} - ${t != null ? t : ""}` }
|
|
400
|
-
],
|
|
418
|
+
], ke = (e, t) => ({ setFormModelFields: n }) => {
|
|
401
419
|
n({
|
|
402
420
|
[e]: void 0,
|
|
403
421
|
[t]: void 0
|
|
@@ -427,7 +445,7 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
427
445
|
const p = F(), S = x(), a = b(
|
|
428
446
|
() => ({ dispatch: p, actions: S }),
|
|
429
447
|
[S, p]
|
|
430
|
-
), [m, f] = M("startDate"), h = b(() => ue(e), [e]),
|
|
448
|
+
), [m, f] = M("startDate"), h = b(() => ue(e), [e]), E = u(
|
|
431
449
|
(y) => {
|
|
432
450
|
t(he(y), a);
|
|
433
451
|
},
|
|
@@ -447,7 +465,7 @@ const Se = ({ onRequestClose: e, header: t = "Filter", contentRight: n }) => /*
|
|
|
447
465
|
setFocusedInput: f,
|
|
448
466
|
focusedInput: m,
|
|
449
467
|
value: h,
|
|
450
|
-
onValueChange:
|
|
468
|
+
onValueChange: E,
|
|
451
469
|
...l
|
|
452
470
|
}
|
|
453
471
|
) }) })
|
|
@@ -461,15 +479,15 @@ export {
|
|
|
461
479
|
Y as SearchFilterActionsContext,
|
|
462
480
|
Ge as SearchFilterButton,
|
|
463
481
|
ve as SearchFilterChip,
|
|
464
|
-
|
|
482
|
+
Ye as SearchFilterChips,
|
|
465
483
|
Ce as SearchFilterContext,
|
|
466
484
|
K as SearchFilterDispatchContext,
|
|
467
485
|
qe as SearchFilterDrawer,
|
|
468
|
-
|
|
469
|
-
|
|
486
|
+
Ke as SearchFilterLocalStateContext,
|
|
487
|
+
J as SearchFilterModelContext,
|
|
470
488
|
Se as SearchFilterPanelHeader,
|
|
471
489
|
T as SearchFilterSection,
|
|
472
|
-
|
|
490
|
+
W as SearchFilterStateContext,
|
|
473
491
|
Je as SectionChips,
|
|
474
492
|
Ue as SimpleCheckboxListSection,
|
|
475
493
|
We as StickyFooter,
|
|
@@ -479,7 +497,7 @@ export {
|
|
|
479
497
|
Ze as createChipsPropsForDateRange,
|
|
480
498
|
_e as createDateRangeSectionProps,
|
|
481
499
|
Me as createOnClickRemoveOnChipForBooleanRecord,
|
|
482
|
-
|
|
500
|
+
ke as createOnClickRemoveOnChipForDateRange,
|
|
483
501
|
xe as createSearchFilterActions,
|
|
484
502
|
fe as createSearchFilterInitialState,
|
|
485
503
|
Fe as createSearchFilterReducer,
|
|
@@ -488,7 +506,7 @@ export {
|
|
|
488
506
|
ge as useLocalSearchFilterState,
|
|
489
507
|
x as useSearchFilterActions,
|
|
490
508
|
F as useSearchFilterDispatch,
|
|
491
|
-
|
|
492
|
-
|
|
509
|
+
Ie as useSearchFilterModel,
|
|
510
|
+
I as useSearchFilterState
|
|
493
511
|
};
|
|
494
512
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/features/search-filter/components/SearchFilterPanelHeader.tsx","../src/features/search-filter/context/SearchFilterStateContext.ts","../src/features/search-filter/context/SearchFilterDispatchContext.ts","../src/features/search-filter/context/SearchFilterActionsContext.ts","../src/features/search-filter/components/SearchFilterDrawer.tsx","../src/features/search-filter/components/SearchFilterButton.tsx","../src/features/search-filter/components/SearchFilterSection.tsx","../src/features/search-filter/components/StickyFooter.tsx","../src/features/search-filter/context/SearchFilterModelContext.ts","../src/features/search-filter/components/context/SearchFilterContext.tsx","../src/features/search-filter/redux/SearchFilterRedux.ts","../src/features/search-filter/hooks/UseLocalSearchFilterState.ts","../src/features/search-filter/components/context/SearchFilterLocalStateContext.tsx","../src/features/search-filter/features/chips/ChipSpacer.tsx","../src/features/search-filter/features/chips/SearchFilterChips.tsx","../src/features/search-filter/features/chips/EmptyChip.tsx","../src/features/search-filter/features/chips/SearchFilterChip.tsx","../src/features/search-filter/features/chips/SectionChips.tsx","../src/features/search-filter/section-factories/boolean-record/BooleanRecordChips.ts","../src/features/search-filter/section-factories/boolean-record/components/SimpleCheckboxListSection.tsx","../src/features/search-filter/section-factories/boolean-record/components/ChipMultiSelectSection.tsx","../src/features/search-filter/section-factories/date-range/DateRangeChips.ts","../src/features/search-filter/section-factories/date-range/DateRangePropsFactory.ts","../src/features/search-filter/section-factories/date-range/components/DateRangeCalendarSection.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport { FlatButton, stenaTimes } from \"@stenajs-webui/elements\";\nimport { Heading, Row, Space, Spacing } from \"@stenajs-webui/core\";\n\ninterface SearchFilterPanelHeaderProps {\n onRequestClose: () => void;\n header?: string;\n contentRight?: ReactNode;\n}\n\nexport const SearchFilterPanelHeader: React.FC<\n SearchFilterPanelHeaderProps\n> = ({ onRequestClose, header = \"Filter\", contentRight }) => {\n return (\n <Spacing>\n <Row\n justifyContent={\"space-between\"}\n alignItems={\"center\"}\n height={\"48px\"}\n >\n <Row>\n <Space num={3} />\n <Heading variant={\"h4\"}>{header}</Heading>\n </Row>\n <Row gap={1}>\n {contentRight}\n <FlatButton\n leftIcon={stenaTimes}\n onClick={onRequestClose}\n variant={\"danger\"}\n />\n <Space num={0.5} />\n </Row>\n </Row>\n </Spacing>\n );\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterState } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterStateContext = createContext<\n SearchFilterState<unknown>\n>(null as unknown as SearchFilterState<unknown>);\n\nexport const useSearchFilterState = <\n TFormModel\n>(): SearchFilterState<TFormModel> => {\n const c = useContext(SearchFilterStateContext);\n if (!c) {\n throw new Error(\n \"Missing search filter context, wrap components with SearchFilterContext component.\"\n );\n }\n return c as SearchFilterState<TFormModel>;\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterDispatch } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterDispatchContext = createContext<\n SearchFilterDispatch<unknown>\n>(null as unknown as SearchFilterDispatch<unknown>);\n\nexport const useSearchFilterDispatch = () => {\n const c = useContext(SearchFilterDispatchContext);\n if (!c) {\n throw new Error(\"Missing search filter dispatch context.\");\n }\n return c;\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterActions } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterActionsContext = createContext<\n SearchFilterActions<unknown, any>\n>(null as unknown as SearchFilterActions<unknown, any>);\n\nexport const useSearchFilterActions = <\n TFormModel,\n TSectionKey extends string\n>() => {\n const c = useContext(SearchFilterActionsContext);\n if (!c) {\n throw new Error(\"Missing search filter actions context.\");\n }\n return c as SearchFilterActions<TFormModel, TSectionKey>;\n};\n","import * as React from \"react\";\nimport { ReactNode, useCallback } from \"react\";\nimport { Drawer, DrawerProps } from \"@stenajs-webui/modal\";\nimport { cssColor } from \"@stenajs-webui/theme\";\nimport { Box, Column } from \"@stenajs-webui/core\";\nimport { SearchFilterPanelHeader } from \"./SearchFilterPanelHeader\";\nimport { useSearchFilterState } from \"../context/SearchFilterStateContext\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\n\ninterface SearchFilterDrawerProps\n extends Omit<DrawerProps, \"isOpen\" | \"onRequestClose\"> {\n header?: string;\n headerContentRight?: ReactNode;\n}\n\nexport const SearchFilterDrawer: React.FC<SearchFilterDrawerProps> = ({\n children,\n header,\n headerContentRight,\n ...drawerProps\n}) => {\n const {\n settings: { open },\n } = useSearchFilterState();\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const closeDrawer = useCallback(() => {\n dispatch(actions.closeFilters());\n }, [actions, dispatch]);\n\n return (\n <Drawer isOpen={open} onRequestClose={closeDrawer} {...drawerProps}>\n <Column\n height={\"100%\"}\n borderRadius={\"var(--swui-border-radius)\"}\n background={cssColor(\"--lhds-color-ui-50\")}\n >\n <SearchFilterPanelHeader\n onRequestClose={closeDrawer}\n header={header}\n contentRight={headerContentRight}\n />\n <Box spacing={1} indent={1} gap={1}>\n {children}\n </Box>\n </Column>\n </Drawer>\n );\n};\n","import { SecondaryButton, stenaSlidersMini } from \"@stenajs-webui/elements\";\nimport * as React from \"react\";\nimport { useCallback } from \"react\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\n\ninterface SearchFilterDrawerButtonProps {\n label?: string;\n leftIcon?: IconDefinition;\n}\n\nexport const SearchFilterButton: React.FC<SearchFilterDrawerButtonProps> = ({\n label = \"Filters\",\n leftIcon = stenaSlidersMini,\n}) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickButton = useCallback(() => {\n dispatch(actions.openFilters());\n }, [actions, dispatch]);\n\n return (\n <SecondaryButton\n label={label}\n leftIcon={leftIcon}\n onClick={onClickButton}\n />\n );\n};\n","import * as React from \"react\";\nimport { PropsWithChildren, useCallback } from \"react\";\nimport { Row, Space } from \"@stenajs-webui/core\";\nimport { lowerCase, upperFirst } from \"lodash\";\nimport {\n Banner,\n FlatButton,\n MenuButton,\n Spinner,\n} from \"@stenajs-webui/elements\";\nimport { useSearchFilterState } from \"../context/SearchFilterStateContext\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\n\nexport interface SearchFilterSectionProps<TSectionKey extends string> {\n sectionId: TSectionKey;\n label?: string;\n leftIcon?: IconDefinition;\n contentRight?: React.ReactNode;\n disableContentPadding?: boolean;\n loading?: boolean;\n error?: string;\n onRetry?: () => void;\n}\n\nexport const SearchFilterSection = function SearchFilterSection<\n TSectionKey extends string\n>({\n sectionId,\n label,\n loading,\n error,\n onRetry,\n disableContentPadding,\n children,\n leftIcon,\n contentRight,\n}: PropsWithChildren<SearchFilterSectionProps<TSectionKey>>) {\n const state = useSearchFilterState();\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const expanded = state.expandedSections.values[sectionId] ?? false;\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.setSectionExpanded(sectionId, !expanded));\n }, [actions, dispatch, expanded, sectionId]);\n\n const activeLabel = label ?? formatColumnIdToHeaderCellLabel(sectionId);\n\n return (\n <>\n <MenuButton\n label={activeLabel}\n leftIcon={leftIcon}\n expandable\n expanded={expanded}\n selected={expanded}\n onClick={onClickLabel}\n right={contentRight}\n >\n {loading ? (\n <Row spacing justifyContent={\"center\"} flex={1}>\n <Spinner size={\"small\"} />\n </Row>\n ) : error ? (\n <Banner\n variant={\"error\"}\n text={error}\n contentRight={\n onRetry ? <FlatButton label={\"Retry\"} onClick={onRetry} /> : null\n }\n />\n ) : disableContentPadding ? (\n children\n ) : (\n children\n )}\n </MenuButton>\n {expanded && <Space />}\n </>\n );\n};\n\nexport const formatColumnIdToHeaderCellLabel = (columnId: string): string =>\n upperFirst(lowerCase(columnId));\n","import { BoxProps, Column } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { ReactNode } from \"react\";\n\nexport interface StickySearchButtonProps extends Pick<BoxProps, \"gap\"> {\n children?: ReactNode;\n}\n\nexport const StickyFooter: React.FC<StickySearchButtonProps> = ({\n children,\n ...boxProps\n}) => {\n return (\n <Column\n style={{ marginTop: \"auto\" }}\n justifyContent={\"center\"}\n spacing={2}\n indent\n shadow={\"popover\"}\n zIndex={1}\n {...boxProps}\n >\n {children}\n </Column>\n );\n};\n","import { createContext, useContext } from \"react\";\n\nexport const SearchFilterModelContext = createContext<unknown>(null as unknown);\n\nexport const useSearchFilterModel = <TFormModel>(): TFormModel => {\n const c = useContext(SearchFilterModelContext);\n if (!c) {\n throw new Error(\n \"Missing search filter context, wrap components with SearchFilterContext component.\"\n );\n }\n return c as TFormModel;\n};\n","import * as React from \"react\";\nimport { PropsWithChildren } from \"react\";\nimport {\n SearchFilterActions,\n SearchFilterDispatch,\n SearchFilterState,\n} from \"../../redux/SearchFilterRedux\";\nimport { SearchFilterDispatchContext } from \"../../context/SearchFilterDispatchContext\";\nimport { SearchFilterActionsContext } from \"../../context/SearchFilterActionsContext\";\nimport { SearchFilterStateContext } from \"../../context/SearchFilterStateContext\";\nimport { SearchFilterModelContext } from \"../../context/SearchFilterModelContext\";\n\ninterface SearchFilterScopeProps<TFormModel, TSectionKey extends string> {\n state: SearchFilterState<TFormModel>;\n dispatch: SearchFilterDispatch<TFormModel>;\n actions: SearchFilterActions<TFormModel, TSectionKey>;\n}\n\nexport const SearchFilterContext = function SearchFilterScope<\n TFormModel,\n TSectionKey extends string\n>({\n state,\n dispatch,\n actions,\n children,\n}: PropsWithChildren<SearchFilterScopeProps<TFormModel, TSectionKey>>) {\n return (\n <SearchFilterDispatchContext.Provider\n value={dispatch as SearchFilterDispatch<unknown>}\n >\n <SearchFilterActionsContext.Provider value={actions}>\n <SearchFilterStateContext.Provider value={state}>\n <SearchFilterModelContext.Provider value={state.formModel}>\n {children}\n </SearchFilterModelContext.Provider>\n </SearchFilterStateContext.Provider>\n </SearchFilterActionsContext.Provider>\n </SearchFilterDispatchContext.Provider>\n );\n};\n","import { combineReducers } from \"redux\";\nimport {\n createEntityActions,\n createEntityReducer,\n createValueByIdActions,\n createValueByIdReducer,\n EntityAction,\n EntityState,\n reducerIdGate,\n reducerIdGateAction,\n ReducerIdGateAction,\n ValueByIdAction,\n ValueByIdState,\n} from \"@stenajs-webui/redux\";\nimport { Dispatch } from \"react\";\n\nexport interface SearchFilterSettings {\n open: boolean;\n}\n\nexport type SearchFilterDispatch<TFormModel> = Dispatch<\n SearchFilterAction<TFormModel>\n>;\n\nexport interface SearchFilterState<TFormModel> {\n expandedSections: ValueByIdState<boolean>;\n formModel: EntityState<TFormModel>;\n settings: EntityState<SearchFilterSettings>;\n}\n\nexport type SearchFilterAction<TFormModel> =\n | ReducerIdGateAction<ValueByIdAction<boolean>>\n | ReducerIdGateAction<EntityAction<TFormModel>>\n | ReducerIdGateAction<EntityAction<SearchFilterSettings>>;\n\nexport const createSearchFilterInitialState = <TFormModel>(\n initialFormModel: TFormModel\n): SearchFilterState<TFormModel> => ({\n settings: {\n open: false,\n },\n formModel: initialFormModel,\n expandedSections: { values: {} },\n});\n\nexport const createSearchFilterReducer = <TFormModel>(\n reducerId: string,\n initialState: SearchFilterState<TFormModel>\n) =>\n combineReducers({\n expandedSections: reducerIdGate(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdReducer<boolean>(initialState.expandedSections)\n ),\n formModel: reducerIdGate(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityReducer<TFormModel>(initialState.formModel)\n ),\n settings: reducerIdGate(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityReducer<SearchFilterSettings>(initialState.settings)\n ),\n });\n\nexport interface SearchFilterActions<TFormModel, TSectionKey extends string> {\n openFilters: () => SearchFilterAction<TFormModel>;\n closeFilters: () => SearchFilterAction<TFormModel>;\n setFormModelFields: (\n fields: Partial<TFormModel>\n ) => SearchFilterAction<TFormModel>;\n clearFormModel: () => SearchFilterAction<TFormModel>;\n expandSection: (section: TSectionKey) => SearchFilterAction<TFormModel>;\n collapseSection: (section: TSectionKey) => SearchFilterAction<TFormModel>;\n setSectionExpanded: (\n section: TSectionKey,\n expanded: boolean\n ) => SearchFilterAction<TFormModel>;\n clearExpandedSections: () => SearchFilterAction<TFormModel>;\n}\n\nexport const createSearchFilterActions = <\n TFormModel,\n TSectionKey extends string\n>(\n reducerId: string,\n initialFormModel: TFormModel\n): SearchFilterActions<TFormModel, TSectionKey> => ({\n openFilters: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityActions<SearchFilterSettings>().setEntityFields({\n open: true,\n })\n ),\n closeFilters: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityActions<SearchFilterSettings>().setEntityFields({\n open: false,\n })\n ),\n setFormModelFields: (fields: Partial<TFormModel>) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityActions<TFormModel>().setEntityFields(fields)\n ),\n clearFormModel: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityActions<TFormModel>().setEntity(initialFormModel)\n ),\n expandSection: (section: TSectionKey) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, true)\n ),\n collapseSection: (section: TSectionKey) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, false)\n ),\n setSectionExpanded: (section: TSectionKey, expanded: boolean) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, expanded)\n ),\n clearExpandedSections: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().clearAllValues()\n ),\n});\n\nexport const getReducerIdFor = (\n reducerId: string,\n reducerIdSuffix: keyof SearchFilterState<unknown>\n): string => `${reducerId}.${reducerIdSuffix}`;\n","import {\n createSearchFilterActions,\n createSearchFilterReducer,\n SearchFilterState,\n} from \"../redux/SearchFilterRedux\";\nimport { useReducer, useState } from \"react\";\n\nexport const useLocalSearchFilterState = <\n TFormModel,\n TSectionKey extends string\n>(\n initialState: SearchFilterState<TFormModel>\n) => {\n const [reducer] = useState(() =>\n createSearchFilterReducer<TFormModel>(\"local\", initialState)\n );\n\n const [actions] = useState(() =>\n createSearchFilterActions<TFormModel, TSectionKey>(\n \"local\",\n initialState.formModel\n )\n );\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n return {\n actions,\n state,\n dispatch,\n };\n};\n","import * as React from \"react\";\nimport { PropsWithChildren } from \"react\";\nimport { useLocalSearchFilterState } from \"../../hooks/UseLocalSearchFilterState\";\nimport { SearchFilterContext } from \"./SearchFilterContext\";\nimport { createSearchFilterInitialState } from \"../../redux/SearchFilterRedux\";\n\ninterface SearchFilterLocalScopeProps<TFormModel> {\n initialFormModel: TFormModel;\n}\n\nexport const SearchFilterLocalStateContext = function SearchFilterLocalScope<\n TFormModel\n>({\n initialFormModel,\n children,\n}: PropsWithChildren<SearchFilterLocalScopeProps<TFormModel>>) {\n const { state, actions, dispatch } = useLocalSearchFilterState(\n createSearchFilterInitialState(initialFormModel)\n );\n\n return (\n <SearchFilterContext state={state} actions={actions} dispatch={dispatch}>\n {children}\n </SearchFilterContext>\n );\n};\n","import styled from \"@emotion/styled\";\n\nexport const ChipSpacer = styled.div`\n padding: calc(var(--swui-metrics-spacing) / 2)\n calc(var(--swui-metrics-indent) / 2);\n`;\n","import * as React from \"react\";\nimport { ReactNode, useCallback } from \"react\";\nimport { Row } from \"@stenajs-webui/core\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { FlatButton } from \"@stenajs-webui/elements\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\n\ninterface SearchFilterChipsProps {\n disableClearAllButton?: boolean;\n children?: ReactNode;\n}\n\nexport const SearchFilterChips: React.FC<SearchFilterChipsProps> = ({\n children,\n disableClearAllButton = false,\n}) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickClearAll = useCallback(\n () => dispatch(actions.clearFormModel()),\n [actions, dispatch]\n );\n\n return (\n <Row flexWrap={\"wrap\"}>\n {children}\n {!disableClearAllButton && (\n <ChipSpacer>\n <FlatButton\n size={\"small\"}\n label={\"Clear all\"}\n onClick={onClickClearAll}\n />\n </ChipSpacer>\n )}\n </Row>\n );\n};\n","import * as React from \"react\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { Chip } from \"@stenajs-webui/elements\";\nimport { useCallback } from \"react\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\n\ninterface EmptyChipProps<TSectionKey extends string> {\n sectionId: TSectionKey;\n label: string;\n}\n\nexport const EmptyChip = function EmptyChip<TSectionKey extends string>({\n label,\n sectionId,\n}: EmptyChipProps<TSectionKey>) {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.clearExpandedSections());\n dispatch(actions.expandSection(sectionId));\n dispatch(actions.openFilters());\n }, [actions, dispatch, sectionId]);\n\n return (\n <ChipSpacer>\n <Chip label={label} variant={\"secondary\"} onClick={onClickLabel} />\n </ChipSpacer>\n );\n};\n","import * as React from \"react\";\nimport { useCallback } from \"react\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { Chip } from \"@stenajs-webui/elements\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\nimport { SearchFilterSectionOnClickRemoveOnChip } from \"../../config/SearchFilterConfig\";\n\ninterface SearchFilterChipProps<TFormModel, TSectionKey> {\n sectionId: TSectionKey;\n label: string;\n value: string;\n onClickRemove?: SearchFilterSectionOnClickRemoveOnChip<TFormModel>;\n}\n\nexport const SearchFilterChip = function SearchFilterChip<\n TFormModel,\n TSectionKey extends string\n>({\n sectionId,\n label,\n value,\n onClickRemove,\n}: SearchFilterChipProps<TFormModel, TSectionKey>) {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const setFormModelFields = useCallback(\n (fields: Partial<TFormModel>) =>\n dispatch(actions.setFormModelFields(fields)),\n [dispatch, actions]\n );\n\n const onClickRemoveHandler = useCallback(() => {\n onClickRemove?.({ value, setFormModelFields });\n }, [onClickRemove, setFormModelFields, value]);\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.clearExpandedSections());\n dispatch(actions.expandSection(sectionId));\n dispatch(actions.openFilters());\n }, [actions, dispatch, sectionId]);\n\n return (\n <ChipSpacer>\n <Chip\n label={label ?? sectionId}\n onClick={onClickLabel}\n onClickRemove={onClickRemove ? onClickRemoveHandler : undefined}\n />\n </ChipSpacer>\n );\n};\n","import * as React from \"react\";\nimport {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { EmptyChip } from \"./EmptyChip\";\nimport { SearchFilterChip } from \"./SearchFilterChip\";\n\nexport interface SectionChipsProps<TFormModel, TSectionKey extends string> {\n sectionId: TSectionKey;\n chips?: Array<SearchFilterSectionChipModel>;\n emptyChipLabel?: string;\n onClickRemoveOnChip?: SearchFilterSectionOnClickRemoveOnChip<TFormModel>;\n}\n\nexport const SectionChips = function SectionChips<\n TFormModel,\n TSectionKey extends string\n>({\n sectionId,\n chips,\n emptyChipLabel,\n onClickRemoveOnChip,\n}: SectionChipsProps<TFormModel, TSectionKey>) {\n if (!chips?.length) {\n if (!emptyChipLabel) {\n return null;\n }\n return <EmptyChip sectionId={sectionId} label={emptyChipLabel} />;\n }\n\n return (\n <>\n {chips.map(({ label, value }) => (\n <SearchFilterChip\n key={value}\n label={label ?? sectionId}\n sectionId={sectionId}\n onClickRemove={onClickRemoveOnChip}\n value={value}\n />\n ))}\n </>\n );\n};\n","import { BooleanRecord, BooleanRecordOptions } from \"./BooleanRecordTypes\";\nimport {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { PickByValue, truthyKeysAsList } from \"@stenajs-webui/core\";\nimport { SectionChipsProps } from \"../../features/chips/SectionChips\";\n\nexport const createChipsPropsForBooleanRecord = <\n TFormModel,\n TSectionKey extends string,\n TField extends keyof PickByValue<TFormModel, BooleanRecord>\n>(\n formModel: TFormModel,\n fieldName: TField,\n options?: BooleanRecordOptions\n): Pick<\n SectionChipsProps<TFormModel, TSectionKey>,\n \"chips\" | \"onClickRemoveOnChip\"\n> => ({\n chips: createChipsForBooleanRecord(\n formModel[fieldName] as unknown as BooleanRecord,\n options\n ),\n onClickRemoveOnChip: createOnClickRemoveOnChipForBooleanRecord(\n formModel,\n fieldName\n ),\n});\n\nexport const createChipsForBooleanRecord = (\n booleanRecord: BooleanRecord,\n options?: BooleanRecordOptions\n): Array<SearchFilterSectionChipModel> =>\n truthyKeysAsList(booleanRecord).map((key) => {\n const option = options?.find((o) => o.value === key);\n return { value: key, label: option?.label ?? key };\n });\n\nexport const createOnClickRemoveOnChipForBooleanRecord = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, BooleanRecord>\n>(\n formModel: TFormModel,\n fieldName: TField\n): SearchFilterSectionOnClickRemoveOnChip<TFormModel> => {\n return ({ setFormModelFields, value }) => {\n const newRecord = { ...formModel[fieldName] };\n newRecord[value] = false;\n setFormModelFields({\n [fieldName]: newRecord,\n } as unknown as Partial<TFormModel>);\n };\n};\n","import * as React from \"react\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport { Column, Row } from \"@stenajs-webui/core\";\nimport {\n CheckboxWithLabel,\n ValueAndOnValueChangeProps,\n} from \"@stenajs-webui/forms\";\nimport { BooleanRecord, BooleanRecordOptions } from \"../BooleanRecordTypes\";\n\nexport interface SimpleCheckboxSectionProps<TSectionKey extends string>\n extends SearchFilterSectionProps<TSectionKey>,\n ValueAndOnValueChangeProps<BooleanRecord> {\n options?: BooleanRecordOptions;\n}\n\nexport const SimpleCheckboxListSection = <TSectionKey extends string>({\n options,\n value,\n onValueChange,\n ...sectionProps\n}: SimpleCheckboxSectionProps<TSectionKey>): React.ReactElement => (\n <SearchFilterSection disableContentPadding {...sectionProps}>\n <Column maxHeight={\"400px\"} overflowY={\"auto\"} flex={1} gap={1} spacing={1}>\n {options?.map((d) => (\n <Row key={d.value} alignItems={\"center\"}>\n <CheckboxWithLabel\n tabIndex={-1}\n value={value?.[d.value]}\n label={d.label}\n onValueChange={(v) =>\n onValueChange?.({\n ...value,\n [d.value]: v,\n })\n }\n />\n </Row>\n ))}\n </Column>\n </SearchFilterSection>\n);\n","import * as React from \"react\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport { ValueAndOnValueChangeProps } from \"@stenajs-webui/forms\";\nimport { BooleanRecord, BooleanRecordOptions } from \"../BooleanRecordTypes\";\nimport { ChipMultiSelect, ChipMultiSelectValue } from \"@stenajs-webui/select\";\nimport { truthyKeysAsList } from \"@stenajs-webui/core\";\n\ninterface ChipMultiSelectSectionProps<TSectionKey extends string>\n extends SearchFilterSectionProps<TSectionKey>,\n ValueAndOnValueChangeProps<BooleanRecord> {\n noneSelectedLabel?: string;\n options?: BooleanRecordOptions;\n}\n\nexport const ChipMultiSelectSection = <TSectionKey extends string>({\n options,\n value,\n noneSelectedLabel,\n onValueChange,\n ...sectionProps\n}: ChipMultiSelectSectionProps<TSectionKey>): React.ReactElement => {\n const [text, setText] = useState<string>(\"\");\n\n const listValue = useMemo<Array<ChipMultiSelectValue>>(\n () =>\n value\n ? truthyKeysAsList(value).map<ChipMultiSelectValue>((key) => {\n const option = options?.find((o) => o.value === key);\n return { value: key, label: option?.label ?? key };\n })\n : [],\n [options, value]\n );\n\n const filteredOptions = useMemo(() => {\n return options?.filter(\n (p) =>\n p.value.toLocaleLowerCase().indexOf(text.toLocaleLowerCase()) > -1 ||\n p.label.toLocaleLowerCase().indexOf(text.toLocaleLowerCase()) > -1\n );\n }, [options, text]);\n\n const onValueChangeInternal = useCallback(\n (value: Array<ChipMultiSelectValue>) => {\n onValueChange?.(createBooleanRecordFromValue(value));\n },\n [onValueChange]\n );\n\n return (\n <SearchFilterSection {...sectionProps}>\n <ChipMultiSelect\n options={filteredOptions}\n value={listValue}\n onValueChange={onValueChangeInternal}\n inputValue={text}\n noneSelectedLabel={noneSelectedLabel}\n onInputChange={setText}\n closeMenuOnSelect={false}\n />\n </SearchFilterSection>\n );\n};\n\nconst createBooleanRecordFromValue = (\n value: Array<ChipMultiSelectValue>\n): BooleanRecord => {\n return value.reduce<BooleanRecord>((sum, item) => {\n sum[item.value] = true;\n return sum;\n }, {});\n};\n","import {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { PickByValue } from \"@stenajs-webui/core\";\nimport { SectionChipsProps } from \"../../features/chips/SectionChips\";\n\nexport const createChipsPropsForDateRange = <\n TFormModel,\n TSectionKey extends string,\n TField extends keyof PickByValue<TFormModel, string | undefined>\n>(\n formModel: TFormModel,\n startDateFieldName: TField,\n endDateFieldName: TField\n): Pick<\n SectionChipsProps<TFormModel, TSectionKey>,\n \"chips\" | \"onClickRemoveOnChip\"\n> => ({\n chips: createChipsForDateRange(\n formModel[startDateFieldName] as unknown as string | undefined,\n formModel[endDateFieldName] as unknown as string | undefined\n ),\n onClickRemoveOnChip: createOnClickRemoveOnChipForDateRange(\n startDateFieldName,\n endDateFieldName\n ),\n});\n\nexport const createChipsForDateRange = (\n startDate: string | undefined,\n endDate: string | undefined\n): Array<SearchFilterSectionChipModel> => {\n if (!startDate && !endDate) {\n return [];\n }\n return [\n { value: \"dateRange\", label: `${startDate ?? \"\"} - ${endDate ?? \"\"}` },\n ];\n};\n\nexport const createOnClickRemoveOnChipForDateRange = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, string | undefined>\n>(\n startDateFieldName: TField,\n endDateFieldName: TField\n): SearchFilterSectionOnClickRemoveOnChip<TFormModel> => {\n return ({ setFormModelFields }) => {\n setFormModelFields({\n [startDateFieldName]: undefined,\n [endDateFieldName]: undefined,\n } as unknown as Partial<TFormModel>);\n };\n};\n","import { PickByValue } from \"@stenajs-webui/core\";\nimport { DateRangeCalendarSectionProps } from \"./components/DateRangeCalendarSection\";\n\nexport const createDateRangeSectionProps = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, string | undefined>,\n TSectionKey extends string\n>(\n formModel: TFormModel,\n startDateFieldName: TField,\n endDateFieldName: TField\n): Pick<\n DateRangeCalendarSectionProps<TFormModel, TSectionKey>,\n \"value\" | \"onValueChange\"\n> => ({\n value: {\n startDate: formModel[startDateFieldName] as unknown as string | undefined,\n endDate: formModel[endDateFieldName] as unknown as string | undefined,\n },\n onValueChange: (value, { dispatch, actions }) => {\n const fields: Partial<TFormModel> = {\n [startDateFieldName]: value.startDate,\n [endDateFieldName]: value.endDate,\n } as any;\n dispatch(actions.setFormModelFields(fields));\n },\n});\n","import {\n DateRange,\n DateRangeCalendar,\n DateRangeCalendarProps,\n DateRangeFocusedInput,\n dateRangeToStrings,\n DateStringRange,\n stringsToDateRange,\n} from \"@stenajs-webui/calendar\";\nimport * as React from \"react\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport { Box } from \"@stenajs-webui/core\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport {\n SearchFilterActions,\n SearchFilterDispatch,\n} from \"../../../redux/SearchFilterRedux\";\nimport { useSearchFilterDispatch } from \"../../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../../context/SearchFilterActionsContext\";\n\nexport interface DateRangeCalendarSectionProps<\n TFormModel,\n TSectionKey extends string\n> extends Omit<\n SearchFilterSectionProps<TSectionKey>,\n \"label\" | \"onRetry\" | \"error\" | \"loading\"\n >,\n Omit<\n DateRangeCalendarProps<{}>,\n \"value\" | \"onValueChange\" | \"focusedInput\" | \"setFocusedInput\"\n > {\n value: DateStringRange;\n onValueChange: (\n value: DateStringRange,\n options: SetDateOptions<TFormModel, TSectionKey>\n ) => void;\n label?: string;\n}\n\nexport interface SetDateOptions<TFormModel, TSectionKey extends string> {\n dispatch: SearchFilterDispatch<TFormModel>;\n actions: SearchFilterActions<TFormModel, TSectionKey>;\n}\n\nexport const DateRangeCalendarSection = <\n TFormModel,\n TSectionKey extends string\n>({\n value,\n onValueChange,\n sectionId,\n contentRight,\n disableContentPadding,\n label,\n leftIcon,\n ...dateRangeCalendarProps\n}: DateRangeCalendarSectionProps<TFormModel, TSectionKey>) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions<TFormModel, TSectionKey>();\n\n const options = useMemo<SetDateOptions<TFormModel, TSectionKey>>(\n () => ({ dispatch, actions }),\n [actions, dispatch]\n );\n const [focusedInput, setFocusedInput] =\n useState<DateRangeFocusedInput>(\"startDate\");\n\n const dateRangeValue = useMemo(() => stringsToDateRange(value), [value]);\n\n const onValueChangeHandler = useCallback(\n (value: DateRange) => {\n onValueChange(dateRangeToStrings(value), options);\n },\n [onValueChange, options]\n );\n\n return (\n <SearchFilterSection\n label={label}\n leftIcon={leftIcon}\n sectionId={sectionId}\n contentRight={contentRight}\n disableContentPadding={disableContentPadding}\n >\n <Box flex={1} alignItems={\"center\"}>\n <Box background={\"white\"} indent>\n <DateRangeCalendar\n setFocusedInput={setFocusedInput}\n focusedInput={focusedInput}\n value={dateRangeValue}\n onValueChange={onValueChangeHandler}\n {...dateRangeCalendarProps}\n />\n </Box>\n </Box>\n </SearchFilterSection>\n );\n};\n"],"names":["SearchFilterPanelHeader","onRequestClose","header","contentRight","Spacing","jsxs","Row","jsx","Space","Heading","FlatButton","stenaTimes","SearchFilterStateContext","createContext","useSearchFilterState","c","useContext","SearchFilterDispatchContext","useSearchFilterDispatch","SearchFilterActionsContext","useSearchFilterActions","SearchFilterDrawer","children","headerContentRight","drawerProps","open","dispatch","actions","closeDrawer","useCallback","Drawer","Column","cssColor","Box","SearchFilterButton","label","leftIcon","stenaSlidersMini","onClickButton","SecondaryButton","SearchFilterSection","sectionId","loading","error","onRetry","disableContentPadding","state","expanded","_a","onClickLabel","activeLabel","formatColumnIdToHeaderCellLabel","Fragment","MenuButton","Spinner","Banner","columnId","upperFirst","lowerCase","StickyFooter","boxProps","SearchFilterModelContext","useSearchFilterModel","SearchFilterContext","createSearchFilterInitialState","initialFormModel","createSearchFilterReducer","reducerId","initialState","combineReducers","reducerIdGate","getReducerIdFor","createValueByIdReducer","createEntityReducer","createSearchFilterActions","reducerIdGateAction","createEntityActions","fields","section","createValueByIdActions","reducerIdSuffix","useLocalSearchFilterState","reducer","useState","useReducer","SearchFilterLocalStateContext","ChipSpacer","styled","SearchFilterChips","disableClearAllButton","onClickClearAll","EmptyChip","Chip","SearchFilterChip","value","onClickRemove","setFormModelFields","onClickRemoveHandler","SectionChips","chips","emptyChipLabel","onClickRemoveOnChip","createChipsPropsForBooleanRecord","formModel","fieldName","options","createChipsForBooleanRecord","createOnClickRemoveOnChipForBooleanRecord","booleanRecord","truthyKeysAsList","key","option","o","newRecord","SimpleCheckboxListSection","onValueChange","sectionProps","d","CheckboxWithLabel","v","ChipMultiSelectSection","noneSelectedLabel","text","setText","listValue","useMemo","filteredOptions","p","onValueChangeInternal","createBooleanRecordFromValue","ChipMultiSelect","sum","item","createChipsPropsForDateRange","startDateFieldName","endDateFieldName","createChipsForDateRange","createOnClickRemoveOnChipForDateRange","startDate","endDate","createDateRangeSectionProps","DateRangeCalendarSection","dateRangeCalendarProps","focusedInput","setFocusedInput","dateRangeValue","stringsToDateRange","onValueChangeHandler","dateRangeToStrings","DateRangeCalendar"],"mappings":";;;;;;;;;;;;;AAWO,MAAMA,KAET,CAAC,EAAE,gBAAAC,GAAgB,QAAAC,IAAS,UAAU,cAAAC,0BAErCC,GACC,EAAA,UAAA,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,QAAQ;AAAA,IAER,UAAA;AAAA,MAAA,gBAAAD,EAACC,GACC,EAAA,UAAA;AAAA,QAAC,gBAAAC,EAAAC,GAAA,EAAM,KAAK,EAAG,CAAA;AAAA,QACd,gBAAAD,EAAAE,GAAA,EAAQ,SAAS,MAAO,UAAOP,GAAA;AAAA,MAAA,GAClC;AAAA,MACA,gBAAAG,EAACC,GAAI,EAAA,KAAK,GACP,UAAA;AAAA,QAAAH;AAAA,QACD,gBAAAI;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,UAAUC;AAAA,YACV,SAASV;AAAA,YACT,SAAS;AAAA,UAAA;AAAA,QACX;AAAA,QACA,gBAAAM,EAACC,GAAM,EAAA,KAAK,IAAK,CAAA;AAAA,MAAA,GACnB;AAAA,IAAA;AAAA,EAAA;AAEJ,EAAA,CAAA,GChCSI,IAA2BC,EAEtC,IAA6C,GAElCC,IAAuB,MAEE;AAC9B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ACA,uBAAA0C;AAAA,MAEA,UAAA,gBAAAtC,EAAC0B,GAAI,EAAA,MAAM,GAAG,YAAY,UACxB,UAAA,gBAAA1B,EAAC0B,GAAI,EAAA,YAAY,SAAS,QAAM,IAC9B,UAAA,gBAAA1B;AAAA,QAAC8I;AAAA,QAAA;AAAA,UACC,iBAAAL;AAAA,UACA,cAAAD;AAAA,UACA,OAAOE;AAAA,UACP,eAAeE;AAAA,UACd,GAAGL;AAAA,QAAA;AAAA,SAER,EACF,CAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/features/search-filter/components/SearchFilterPanelHeader.tsx","../src/features/search-filter/context/SearchFilterStateContext.ts","../src/features/search-filter/context/SearchFilterDispatchContext.ts","../src/features/search-filter/context/SearchFilterActionsContext.ts","../src/features/search-filter/components/SearchFilterDrawer.tsx","../src/features/search-filter/components/SearchFilterButton.tsx","../src/features/search-filter/components/SearchFilterSection.tsx","../src/features/search-filter/components/StickyFooter.tsx","../src/features/search-filter/context/SearchFilterModelContext.ts","../src/features/search-filter/components/context/SearchFilterContext.tsx","../src/features/search-filter/redux/SearchFilterRedux.ts","../src/features/search-filter/hooks/UseLocalSearchFilterState.ts","../src/features/search-filter/components/context/SearchFilterLocalStateContext.tsx","../src/features/search-filter/features/chips/ChipSpacer.tsx","../src/features/search-filter/features/chips/SearchFilterChips.tsx","../src/features/search-filter/features/chips/EmptyChip.tsx","../src/features/search-filter/features/chips/SearchFilterChip.tsx","../src/features/search-filter/features/chips/SectionChips.tsx","../src/features/search-filter/section-factories/boolean-record/BooleanRecordChips.ts","../src/features/search-filter/section-factories/boolean-record/components/SimpleCheckboxListSection.tsx","../src/features/search-filter/section-factories/boolean-record/components/ChipMultiSelectSection.tsx","../src/features/search-filter/section-factories/date-range/DateRangeChips.ts","../src/features/search-filter/section-factories/date-range/DateRangePropsFactory.ts","../src/features/search-filter/section-factories/date-range/components/DateRangeCalendarSection.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport { FlatButton, stenaTimes } from \"@stenajs-webui/elements\";\nimport { Heading, Row, Space, Spacing } from \"@stenajs-webui/core\";\nimport { cssColor } from \"@stenajs-webui/theme\";\n\ninterface SearchFilterPanelHeaderProps {\n onRequestClose: () => void;\n header?: string;\n contentRight?: ReactNode;\n}\n\nexport const SearchFilterPanelHeader: React.FC<\n SearchFilterPanelHeaderProps\n> = ({ onRequestClose, header = \"Filter\", contentRight }) => {\n return (\n <Spacing\n position={\"sticky\"}\n top={0}\n background={cssColor(\"--lhds-color-ui-50\")}\n zIndex={100}\n >\n <Row\n justifyContent={\"space-between\"}\n alignItems={\"center\"}\n height={\"48px\"}\n >\n <Row>\n <Space num={3} />\n <Heading variant={\"h4\"}>{header}</Heading>\n </Row>\n <Row gap={1}>\n {contentRight}\n <FlatButton\n leftIcon={stenaTimes}\n onClick={onRequestClose}\n variant={\"danger\"}\n />\n <Space num={0.5} />\n </Row>\n </Row>\n </Spacing>\n );\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterState } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterStateContext = createContext<\n SearchFilterState<unknown>\n>(null as unknown as SearchFilterState<unknown>);\n\nexport const useSearchFilterState = <\n TFormModel\n>(): SearchFilterState<TFormModel> => {\n const c = useContext(SearchFilterStateContext);\n if (!c) {\n throw new Error(\n \"Missing search filter context, wrap components with SearchFilterContext component.\"\n );\n }\n return c as SearchFilterState<TFormModel>;\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterDispatch } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterDispatchContext = createContext<\n SearchFilterDispatch<unknown>\n>(null as unknown as SearchFilterDispatch<unknown>);\n\nexport const useSearchFilterDispatch = () => {\n const c = useContext(SearchFilterDispatchContext);\n if (!c) {\n throw new Error(\"Missing search filter dispatch context.\");\n }\n return c;\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterActions } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterActionsContext = createContext<\n SearchFilterActions<unknown, any>\n>(null as unknown as SearchFilterActions<unknown, any>);\n\nexport const useSearchFilterActions = <\n TFormModel,\n TSectionKey extends string\n>() => {\n const c = useContext(SearchFilterActionsContext);\n if (!c) {\n throw new Error(\"Missing search filter actions context.\");\n }\n return c as SearchFilterActions<TFormModel, TSectionKey>;\n};\n","import * as React from \"react\";\nimport { ReactNode, useCallback } from \"react\";\nimport { Drawer, DrawerProps } from \"@stenajs-webui/modal\";\nimport { cssColor } from \"@stenajs-webui/theme\";\nimport { Box, Column } from \"@stenajs-webui/core\";\nimport { SearchFilterPanelHeader } from \"./SearchFilterPanelHeader\";\nimport { useSearchFilterState } from \"../context/SearchFilterStateContext\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\n\ninterface SearchFilterDrawerProps\n extends Omit<DrawerProps, \"isOpen\" | \"onRequestClose\"> {\n header?: string;\n headerContentRight?: ReactNode;\n}\n\nexport const SearchFilterDrawer: React.FC<SearchFilterDrawerProps> = ({\n children,\n header,\n headerContentRight,\n ...drawerProps\n}) => {\n const {\n settings: { open },\n } = useSearchFilterState();\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const closeDrawer = useCallback(() => {\n dispatch(actions.closeFilters());\n }, [actions, dispatch]);\n\n return (\n <Drawer\n floating\n isOpen={open}\n onRequestClose={closeDrawer}\n {...drawerProps}\n >\n <Column\n height={\"100%\"}\n borderRadius={\"var(--swui-border-radius)\"}\n background={cssColor(\"--lhds-color-ui-50\")}\n >\n <SearchFilterPanelHeader\n onRequestClose={closeDrawer}\n header={header}\n contentRight={headerContentRight}\n />\n <Box spacing={1} indent={1} gap={1}>\n {children}\n </Box>\n </Column>\n </Drawer>\n );\n};\n","import { SecondaryButton, stenaSlidersMini } from \"@stenajs-webui/elements\";\nimport * as React from \"react\";\nimport { useCallback } from \"react\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\n\ninterface SearchFilterDrawerButtonProps {\n label?: string;\n leftIcon?: IconDefinition;\n}\n\nexport const SearchFilterButton: React.FC<SearchFilterDrawerButtonProps> = ({\n label = \"Filters\",\n leftIcon = stenaSlidersMini,\n}) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickButton = useCallback(() => {\n dispatch(actions.openFilters());\n }, [actions, dispatch]);\n\n return (\n <SecondaryButton\n label={label}\n leftIcon={leftIcon}\n onClick={onClickButton}\n />\n );\n};\n","import * as React from \"react\";\nimport { PropsWithChildren, useCallback } from \"react\";\nimport { Row, Space } from \"@stenajs-webui/core\";\nimport { lowerCase, upperFirst } from \"lodash\";\nimport {\n Banner,\n FlatButton,\n MenuButton,\n Spinner,\n} from \"@stenajs-webui/elements\";\nimport { useSearchFilterState } from \"../context/SearchFilterStateContext\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\n\nexport interface SearchFilterSectionProps<TSectionKey extends string> {\n sectionId: TSectionKey;\n label?: string;\n leftIcon?: IconDefinition;\n contentRight?: React.ReactNode;\n disableContentPadding?: boolean;\n loading?: boolean;\n error?: string;\n onRetry?: () => void;\n}\n\nexport const SearchFilterSection = function SearchFilterSection<\n TSectionKey extends string\n>({\n sectionId,\n label,\n loading,\n error,\n onRetry,\n disableContentPadding,\n children,\n leftIcon,\n contentRight,\n}: PropsWithChildren<SearchFilterSectionProps<TSectionKey>>) {\n const state = useSearchFilterState();\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const expanded = state.expandedSections.values[sectionId] ?? false;\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.setSectionExpanded(sectionId, !expanded));\n }, [actions, dispatch, expanded, sectionId]);\n\n const activeLabel = label ?? formatColumnIdToHeaderCellLabel(sectionId);\n\n return (\n <>\n <MenuButton\n label={activeLabel}\n leftIcon={leftIcon}\n expandable\n expanded={expanded}\n selected={expanded}\n onClick={onClickLabel}\n right={contentRight}\n >\n {loading ? (\n <Row spacing justifyContent={\"center\"} flex={1}>\n <Spinner size={\"small\"} />\n </Row>\n ) : error ? (\n <Banner\n variant={\"error\"}\n text={error}\n contentRight={\n onRetry ? <FlatButton label={\"Retry\"} onClick={onRetry} /> : null\n }\n />\n ) : disableContentPadding ? (\n children\n ) : (\n children\n )}\n </MenuButton>\n {expanded && <Space />}\n </>\n );\n};\n\nexport const formatColumnIdToHeaderCellLabel = (columnId: string): string =>\n upperFirst(lowerCase(columnId));\n","import { BoxProps, Column } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { ReactNode } from \"react\";\n\nexport interface StickySearchButtonProps extends Pick<BoxProps, \"gap\"> {\n children?: ReactNode;\n}\n\nexport const StickyFooter: React.FC<StickySearchButtonProps> = ({\n children,\n ...boxProps\n}) => {\n return (\n <Column\n style={{ marginTop: \"auto\" }}\n justifyContent={\"center\"}\n spacing={2}\n indent\n shadow={\"popover\"}\n zIndex={1}\n {...boxProps}\n >\n {children}\n </Column>\n );\n};\n","import { createContext, useContext } from \"react\";\n\nexport const SearchFilterModelContext = createContext<unknown>(null as unknown);\n\nexport const useSearchFilterModel = <TFormModel>(): TFormModel => {\n const c = useContext(SearchFilterModelContext);\n if (!c) {\n throw new Error(\n \"Missing search filter context, wrap components with SearchFilterContext component.\"\n );\n }\n return c as TFormModel;\n};\n","import * as React from \"react\";\nimport { PropsWithChildren } from \"react\";\nimport {\n SearchFilterActions,\n SearchFilterDispatch,\n SearchFilterState,\n} from \"../../redux/SearchFilterRedux\";\nimport { SearchFilterDispatchContext } from \"../../context/SearchFilterDispatchContext\";\nimport { SearchFilterActionsContext } from \"../../context/SearchFilterActionsContext\";\nimport { SearchFilterStateContext } from \"../../context/SearchFilterStateContext\";\nimport { SearchFilterModelContext } from \"../../context/SearchFilterModelContext\";\n\ninterface SearchFilterScopeProps<TFormModel, TSectionKey extends string> {\n state: SearchFilterState<TFormModel>;\n dispatch: SearchFilterDispatch<TFormModel>;\n actions: SearchFilterActions<TFormModel, TSectionKey>;\n}\n\nexport const SearchFilterContext = function SearchFilterScope<\n TFormModel,\n TSectionKey extends string\n>({\n state,\n dispatch,\n actions,\n children,\n}: PropsWithChildren<SearchFilterScopeProps<TFormModel, TSectionKey>>) {\n return (\n <SearchFilterDispatchContext.Provider\n value={dispatch as SearchFilterDispatch<unknown>}\n >\n <SearchFilterActionsContext.Provider value={actions}>\n <SearchFilterStateContext.Provider value={state}>\n <SearchFilterModelContext.Provider value={state.formModel}>\n {children}\n </SearchFilterModelContext.Provider>\n </SearchFilterStateContext.Provider>\n </SearchFilterActionsContext.Provider>\n </SearchFilterDispatchContext.Provider>\n );\n};\n","import { combineReducers } from \"redux\";\nimport {\n createEntityActions,\n createEntityReducer,\n createValueByIdActions,\n createValueByIdReducer,\n EntityAction,\n EntityState,\n reducerIdGate,\n reducerIdGateAction,\n ReducerIdGateAction,\n ValueByIdAction,\n ValueByIdState,\n} from \"@stenajs-webui/redux\";\nimport { Dispatch } from \"react\";\n\nexport interface SearchFilterSettings {\n open: boolean;\n}\n\nexport type SearchFilterDispatch<TFormModel> = Dispatch<\n SearchFilterAction<TFormModel>\n>;\n\nexport interface SearchFilterState<TFormModel> {\n expandedSections: ValueByIdState<boolean>;\n formModel: EntityState<TFormModel>;\n settings: EntityState<SearchFilterSettings>;\n}\n\nexport type SearchFilterAction<TFormModel> =\n | ReducerIdGateAction<ValueByIdAction<boolean>>\n | ReducerIdGateAction<EntityAction<TFormModel>>\n | ReducerIdGateAction<EntityAction<SearchFilterSettings>>;\n\nexport const createSearchFilterInitialState = <TFormModel>(\n initialFormModel: TFormModel\n): SearchFilterState<TFormModel> => ({\n settings: {\n open: false,\n },\n formModel: initialFormModel,\n expandedSections: { values: {} },\n});\n\nexport const createSearchFilterReducer = <TFormModel>(\n reducerId: string,\n initialState: SearchFilterState<TFormModel>\n) =>\n combineReducers({\n expandedSections: reducerIdGate(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdReducer<boolean>(initialState.expandedSections)\n ),\n formModel: reducerIdGate(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityReducer<TFormModel>(initialState.formModel)\n ),\n settings: reducerIdGate(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityReducer<SearchFilterSettings>(initialState.settings)\n ),\n });\n\nexport interface SearchFilterActions<TFormModel, TSectionKey extends string> {\n openFilters: () => SearchFilterAction<TFormModel>;\n closeFilters: () => SearchFilterAction<TFormModel>;\n setFormModelFields: (\n fields: Partial<TFormModel>\n ) => SearchFilterAction<TFormModel>;\n clearFormModel: () => SearchFilterAction<TFormModel>;\n expandSection: (section: TSectionKey) => SearchFilterAction<TFormModel>;\n collapseSection: (section: TSectionKey) => SearchFilterAction<TFormModel>;\n setSectionExpanded: (\n section: TSectionKey,\n expanded: boolean\n ) => SearchFilterAction<TFormModel>;\n clearExpandedSections: () => SearchFilterAction<TFormModel>;\n}\n\nexport const createSearchFilterActions = <\n TFormModel,\n TSectionKey extends string\n>(\n reducerId: string,\n initialFormModel: TFormModel\n): SearchFilterActions<TFormModel, TSectionKey> => ({\n openFilters: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityActions<SearchFilterSettings>().setEntityFields({\n open: true,\n })\n ),\n closeFilters: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityActions<SearchFilterSettings>().setEntityFields({\n open: false,\n })\n ),\n setFormModelFields: (fields: Partial<TFormModel>) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityActions<TFormModel>().setEntityFields(fields)\n ),\n clearFormModel: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityActions<TFormModel>().setEntity(initialFormModel)\n ),\n expandSection: (section: TSectionKey) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, true)\n ),\n collapseSection: (section: TSectionKey) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, false)\n ),\n setSectionExpanded: (section: TSectionKey, expanded: boolean) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, expanded)\n ),\n clearExpandedSections: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().clearAllValues()\n ),\n});\n\nexport const getReducerIdFor = (\n reducerId: string,\n reducerIdSuffix: keyof SearchFilterState<unknown>\n): string => `${reducerId}.${reducerIdSuffix}`;\n","import {\n createSearchFilterActions,\n createSearchFilterReducer,\n SearchFilterState,\n} from \"../redux/SearchFilterRedux\";\nimport { useReducer, useState } from \"react\";\n\nexport const useLocalSearchFilterState = <\n TFormModel,\n TSectionKey extends string\n>(\n initialState: SearchFilterState<TFormModel>\n) => {\n const [reducer] = useState(() =>\n createSearchFilterReducer<TFormModel>(\"local\", initialState)\n );\n\n const [actions] = useState(() =>\n createSearchFilterActions<TFormModel, TSectionKey>(\n \"local\",\n initialState.formModel\n )\n );\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n return {\n actions,\n state,\n dispatch,\n };\n};\n","import * as React from \"react\";\nimport { PropsWithChildren } from \"react\";\nimport { useLocalSearchFilterState } from \"../../hooks/UseLocalSearchFilterState\";\nimport { SearchFilterContext } from \"./SearchFilterContext\";\nimport { createSearchFilterInitialState } from \"../../redux/SearchFilterRedux\";\n\ninterface SearchFilterLocalScopeProps<TFormModel> {\n initialFormModel: TFormModel;\n}\n\nexport const SearchFilterLocalStateContext = function SearchFilterLocalScope<\n TFormModel\n>({\n initialFormModel,\n children,\n}: PropsWithChildren<SearchFilterLocalScopeProps<TFormModel>>) {\n const { state, actions, dispatch } = useLocalSearchFilterState(\n createSearchFilterInitialState(initialFormModel)\n );\n\n return (\n <SearchFilterContext state={state} actions={actions} dispatch={dispatch}>\n {children}\n </SearchFilterContext>\n );\n};\n","import styled from \"@emotion/styled\";\n\nexport const ChipSpacer = styled.div`\n padding: calc(var(--swui-metrics-spacing) / 2)\n calc(var(--swui-metrics-indent) / 2);\n`;\n","import * as React from \"react\";\nimport { ReactNode, useCallback } from \"react\";\nimport { Row } from \"@stenajs-webui/core\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { FlatButton } from \"@stenajs-webui/elements\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\n\ninterface SearchFilterChipsProps {\n disableClearAllButton?: boolean;\n children?: ReactNode;\n}\n\nexport const SearchFilterChips: React.FC<SearchFilterChipsProps> = ({\n children,\n disableClearAllButton = false,\n}) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickClearAll = useCallback(\n () => dispatch(actions.clearFormModel()),\n [actions, dispatch]\n );\n\n return (\n <Row flexWrap={\"wrap\"}>\n {children}\n {!disableClearAllButton && (\n <ChipSpacer>\n <FlatButton\n size={\"small\"}\n label={\"Clear all\"}\n onClick={onClickClearAll}\n />\n </ChipSpacer>\n )}\n </Row>\n );\n};\n","import * as React from \"react\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { Chip } from \"@stenajs-webui/elements\";\nimport { useCallback } from \"react\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\n\ninterface EmptyChipProps<TSectionKey extends string> {\n sectionId: TSectionKey;\n label: string;\n}\n\nexport const EmptyChip = function EmptyChip<TSectionKey extends string>({\n label,\n sectionId,\n}: EmptyChipProps<TSectionKey>) {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.clearExpandedSections());\n dispatch(actions.expandSection(sectionId));\n dispatch(actions.openFilters());\n }, [actions, dispatch, sectionId]);\n\n return (\n <ChipSpacer>\n <Chip label={label} variant={\"secondary\"} onClick={onClickLabel} />\n </ChipSpacer>\n );\n};\n","import * as React from \"react\";\nimport { useCallback } from \"react\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { Chip } from \"@stenajs-webui/elements\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\nimport { SearchFilterSectionOnClickRemoveOnChip } from \"../../config/SearchFilterConfig\";\n\ninterface SearchFilterChipProps<TFormModel, TSectionKey> {\n sectionId: TSectionKey;\n label: string;\n value: string;\n onClickRemove?: SearchFilterSectionOnClickRemoveOnChip<TFormModel>;\n}\n\nexport const SearchFilterChip = function SearchFilterChip<\n TFormModel,\n TSectionKey extends string\n>({\n sectionId,\n label,\n value,\n onClickRemove,\n}: SearchFilterChipProps<TFormModel, TSectionKey>) {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const setFormModelFields = useCallback(\n (fields: Partial<TFormModel>) =>\n dispatch(actions.setFormModelFields(fields)),\n [dispatch, actions]\n );\n\n const onClickRemoveHandler = useCallback(() => {\n onClickRemove?.({ value, setFormModelFields });\n }, [onClickRemove, setFormModelFields, value]);\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.clearExpandedSections());\n dispatch(actions.expandSection(sectionId));\n dispatch(actions.openFilters());\n }, [actions, dispatch, sectionId]);\n\n return (\n <ChipSpacer>\n <Chip\n label={label ?? sectionId}\n onClick={onClickLabel}\n onClickRemove={onClickRemove ? onClickRemoveHandler : undefined}\n />\n </ChipSpacer>\n );\n};\n","import * as React from \"react\";\nimport {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { EmptyChip } from \"./EmptyChip\";\nimport { SearchFilterChip } from \"./SearchFilterChip\";\n\nexport interface SectionChipsProps<TFormModel, TSectionKey extends string> {\n sectionId: TSectionKey;\n chips?: Array<SearchFilterSectionChipModel>;\n emptyChipLabel?: string;\n onClickRemoveOnChip?: SearchFilterSectionOnClickRemoveOnChip<TFormModel>;\n}\n\nexport const SectionChips = function SectionChips<\n TFormModel,\n TSectionKey extends string\n>({\n sectionId,\n chips,\n emptyChipLabel,\n onClickRemoveOnChip,\n}: SectionChipsProps<TFormModel, TSectionKey>) {\n if (!chips?.length) {\n if (!emptyChipLabel) {\n return null;\n }\n return <EmptyChip sectionId={sectionId} label={emptyChipLabel} />;\n }\n\n return (\n <>\n {chips.map(({ label, value }) => (\n <SearchFilterChip\n key={value}\n label={label ?? sectionId}\n sectionId={sectionId}\n onClickRemove={onClickRemoveOnChip}\n value={value}\n />\n ))}\n </>\n );\n};\n","import { BooleanRecord, BooleanRecordOptions } from \"./BooleanRecordTypes\";\nimport {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { PickByValue, truthyKeysAsList } from \"@stenajs-webui/core\";\nimport { SectionChipsProps } from \"../../features/chips/SectionChips\";\n\nexport const createChipsPropsForBooleanRecord = <\n TFormModel,\n TSectionKey extends string,\n TField extends keyof PickByValue<TFormModel, BooleanRecord>\n>(\n formModel: TFormModel,\n fieldName: TField,\n options?: BooleanRecordOptions\n): Pick<\n SectionChipsProps<TFormModel, TSectionKey>,\n \"chips\" | \"onClickRemoveOnChip\"\n> => ({\n chips: createChipsForBooleanRecord(\n formModel[fieldName] as unknown as BooleanRecord,\n options\n ),\n onClickRemoveOnChip: createOnClickRemoveOnChipForBooleanRecord(\n formModel,\n fieldName\n ),\n});\n\nexport const createChipsForBooleanRecord = (\n booleanRecord: BooleanRecord,\n options?: BooleanRecordOptions\n): Array<SearchFilterSectionChipModel> =>\n truthyKeysAsList(booleanRecord).map((key) => {\n const option = options?.find((o) => o.value === key);\n return { value: key, label: option?.label ?? key };\n });\n\nexport const createOnClickRemoveOnChipForBooleanRecord = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, BooleanRecord>\n>(\n formModel: TFormModel,\n fieldName: TField\n): SearchFilterSectionOnClickRemoveOnChip<TFormModel> => {\n return ({ setFormModelFields, value }) => {\n const newRecord = { ...formModel[fieldName] };\n newRecord[value] = false;\n setFormModelFields({\n [fieldName]: newRecord,\n } as unknown as Partial<TFormModel>);\n };\n};\n","import * as React from \"react\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport { Column, Row } from \"@stenajs-webui/core\";\nimport {\n CheckboxWithLabel,\n ValueAndOnValueChangeProps,\n} from \"@stenajs-webui/forms\";\nimport { BooleanRecord, BooleanRecordOptions } from \"../BooleanRecordTypes\";\n\nexport interface SimpleCheckboxSectionProps<TSectionKey extends string>\n extends SearchFilterSectionProps<TSectionKey>,\n ValueAndOnValueChangeProps<BooleanRecord> {\n options?: BooleanRecordOptions;\n}\n\nexport const SimpleCheckboxListSection = <TSectionKey extends string>({\n options,\n value,\n onValueChange,\n ...sectionProps\n}: SimpleCheckboxSectionProps<TSectionKey>): React.ReactElement => (\n <SearchFilterSection disableContentPadding {...sectionProps}>\n <Column maxHeight={\"400px\"} overflowY={\"auto\"} flex={1} gap={1} spacing={1}>\n {options?.map((d) => (\n <Row key={d.value} alignItems={\"center\"}>\n <CheckboxWithLabel\n tabIndex={-1}\n value={value?.[d.value]}\n label={d.label}\n onValueChange={(v) =>\n onValueChange?.({\n ...value,\n [d.value]: v,\n })\n }\n />\n </Row>\n ))}\n </Column>\n </SearchFilterSection>\n);\n","import * as React from \"react\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport { ValueAndOnValueChangeProps } from \"@stenajs-webui/forms\";\nimport { BooleanRecord, BooleanRecordOptions } from \"../BooleanRecordTypes\";\nimport { ChipMultiSelect, ChipMultiSelectValue } from \"@stenajs-webui/select\";\nimport { truthyKeysAsList } from \"@stenajs-webui/core\";\n\ninterface ChipMultiSelectSectionProps<TSectionKey extends string>\n extends SearchFilterSectionProps<TSectionKey>,\n ValueAndOnValueChangeProps<BooleanRecord> {\n noneSelectedLabel?: string;\n options?: BooleanRecordOptions;\n}\n\nexport const ChipMultiSelectSection = <TSectionKey extends string>({\n options,\n value,\n noneSelectedLabel,\n onValueChange,\n ...sectionProps\n}: ChipMultiSelectSectionProps<TSectionKey>): React.ReactElement => {\n const [text, setText] = useState<string>(\"\");\n\n const listValue = useMemo<Array<ChipMultiSelectValue>>(\n () =>\n value\n ? truthyKeysAsList(value).map<ChipMultiSelectValue>((key) => {\n const option = options?.find((o) => o.value === key);\n return { value: key, label: option?.label ?? key };\n })\n : [],\n [options, value]\n );\n\n const filteredOptions = useMemo(() => {\n return options?.filter(\n (p) =>\n p.value.toLocaleLowerCase().indexOf(text.toLocaleLowerCase()) > -1 ||\n p.label.toLocaleLowerCase().indexOf(text.toLocaleLowerCase()) > -1\n );\n }, [options, text]);\n\n const onValueChangeInternal = useCallback(\n (value: Array<ChipMultiSelectValue>) => {\n onValueChange?.(createBooleanRecordFromValue(value));\n },\n [onValueChange]\n );\n\n return (\n <SearchFilterSection {...sectionProps}>\n <ChipMultiSelect\n options={filteredOptions}\n value={listValue}\n onValueChange={onValueChangeInternal}\n inputValue={text}\n noneSelectedLabel={noneSelectedLabel}\n onInputChange={setText}\n closeMenuOnSelect={false}\n />\n </SearchFilterSection>\n );\n};\n\nconst createBooleanRecordFromValue = (\n value: Array<ChipMultiSelectValue>\n): BooleanRecord => {\n return value.reduce<BooleanRecord>((sum, item) => {\n sum[item.value] = true;\n return sum;\n }, {});\n};\n","import {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { PickByValue } from \"@stenajs-webui/core\";\nimport { SectionChipsProps } from \"../../features/chips/SectionChips\";\n\nexport const createChipsPropsForDateRange = <\n TFormModel,\n TSectionKey extends string,\n TField extends keyof PickByValue<TFormModel, string | undefined>\n>(\n formModel: TFormModel,\n startDateFieldName: TField,\n endDateFieldName: TField\n): Pick<\n SectionChipsProps<TFormModel, TSectionKey>,\n \"chips\" | \"onClickRemoveOnChip\"\n> => ({\n chips: createChipsForDateRange(\n formModel[startDateFieldName] as unknown as string | undefined,\n formModel[endDateFieldName] as unknown as string | undefined\n ),\n onClickRemoveOnChip: createOnClickRemoveOnChipForDateRange(\n startDateFieldName,\n endDateFieldName\n ),\n});\n\nexport const createChipsForDateRange = (\n startDate: string | undefined,\n endDate: string | undefined\n): Array<SearchFilterSectionChipModel> => {\n if (!startDate && !endDate) {\n return [];\n }\n return [\n { value: \"dateRange\", label: `${startDate ?? \"\"} - ${endDate ?? \"\"}` },\n ];\n};\n\nexport const createOnClickRemoveOnChipForDateRange = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, string | undefined>\n>(\n startDateFieldName: TField,\n endDateFieldName: TField\n): SearchFilterSectionOnClickRemoveOnChip<TFormModel> => {\n return ({ setFormModelFields }) => {\n setFormModelFields({\n [startDateFieldName]: undefined,\n [endDateFieldName]: undefined,\n } as unknown as Partial<TFormModel>);\n };\n};\n","import { PickByValue } from \"@stenajs-webui/core\";\nimport { DateRangeCalendarSectionProps } from \"./components/DateRangeCalendarSection\";\n\nexport const createDateRangeSectionProps = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, string | undefined>,\n TSectionKey extends string\n>(\n formModel: TFormModel,\n startDateFieldName: TField,\n endDateFieldName: TField\n): Pick<\n DateRangeCalendarSectionProps<TFormModel, TSectionKey>,\n \"value\" | \"onValueChange\"\n> => ({\n value: {\n startDate: formModel[startDateFieldName] as unknown as string | undefined,\n endDate: formModel[endDateFieldName] as unknown as string | undefined,\n },\n onValueChange: (value, { dispatch, actions }) => {\n const fields: Partial<TFormModel> = {\n [startDateFieldName]: value.startDate,\n [endDateFieldName]: value.endDate,\n } as any;\n dispatch(actions.setFormModelFields(fields));\n },\n});\n","import {\n DateRange,\n DateRangeCalendar,\n DateRangeCalendarProps,\n DateRangeFocusedInput,\n dateRangeToStrings,\n DateStringRange,\n stringsToDateRange,\n} from \"@stenajs-webui/calendar\";\nimport * as React from \"react\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport { Box } from \"@stenajs-webui/core\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport {\n SearchFilterActions,\n SearchFilterDispatch,\n} from \"../../../redux/SearchFilterRedux\";\nimport { useSearchFilterDispatch } from \"../../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../../context/SearchFilterActionsContext\";\n\nexport interface DateRangeCalendarSectionProps<\n TFormModel,\n TSectionKey extends string\n> extends Omit<\n SearchFilterSectionProps<TSectionKey>,\n \"label\" | \"onRetry\" | \"error\" | \"loading\"\n >,\n Omit<\n DateRangeCalendarProps<{}>,\n \"value\" | \"onValueChange\" | \"focusedInput\" | \"setFocusedInput\"\n > {\n value: DateStringRange;\n onValueChange: (\n value: DateStringRange,\n options: SetDateOptions<TFormModel, TSectionKey>\n ) => void;\n label?: string;\n}\n\nexport interface SetDateOptions<TFormModel, TSectionKey extends string> {\n dispatch: SearchFilterDispatch<TFormModel>;\n actions: SearchFilterActions<TFormModel, TSectionKey>;\n}\n\nexport const DateRangeCalendarSection = <\n TFormModel,\n TSectionKey extends string\n>({\n value,\n onValueChange,\n sectionId,\n contentRight,\n disableContentPadding,\n label,\n leftIcon,\n ...dateRangeCalendarProps\n}: DateRangeCalendarSectionProps<TFormModel, TSectionKey>) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions<TFormModel, TSectionKey>();\n\n const options = useMemo<SetDateOptions<TFormModel, TSectionKey>>(\n () => ({ dispatch, actions }),\n [actions, dispatch]\n );\n const [focusedInput, setFocusedInput] =\n useState<DateRangeFocusedInput>(\"startDate\");\n\n const dateRangeValue = useMemo(() => stringsToDateRange(value), [value]);\n\n const onValueChangeHandler = useCallback(\n (value: DateRange) => {\n onValueChange(dateRangeToStrings(value), options);\n },\n [onValueChange, options]\n );\n\n return (\n <SearchFilterSection\n label={label}\n leftIcon={leftIcon}\n sectionId={sectionId}\n contentRight={contentRight}\n disableContentPadding={disableContentPadding}\n >\n <Box flex={1} alignItems={\"center\"}>\n <Box background={\"white\"} indent>\n <DateRangeCalendar\n setFocusedInput={setFocusedInput}\n focusedInput={focusedInput}\n value={dateRangeValue}\n onValueChange={onValueChangeHandler}\n {...dateRangeCalendarProps}\n />\n </Box>\n </Box>\n </SearchFilterSection>\n );\n};\n"],"names":["SearchFilterPanelHeader","onRequestClose","header","contentRight","jsx","Spacing","cssColor","jsxs","Row","Space","Heading","FlatButton","stenaTimes","SearchFilterStateContext","createContext","useSearchFilterState","c","useContext","SearchFilterDispatchContext","useSearchFilterDispatch","SearchFilterActionsContext","useSearchFilterActions","SearchFilterDrawer","children","headerContentRight","drawerProps","open","dispatch","actions","closeDrawer","useCallback","Drawer","Column","Box","SearchFilterButton","label","leftIcon","stenaSlidersMini","onClickButton","SecondaryButton","SearchFilterSection","sectionId","loading","error","onRetry","disableContentPadding","state","expanded","_a","onClickLabel","activeLabel","formatColumnIdToHeaderCellLabel","Fragment","MenuButton","Spinner","Banner","columnId","upperFirst","lowerCase","StickyFooter","boxProps","SearchFilterModelContext","useSearchFilterModel","SearchFilterContext","createSearchFilterInitialState","initialFormModel","createSearchFilterReducer","reducerId","initialState","combineReducers","reducerIdGate","getReducerIdFor","createValueByIdReducer","createEntityReducer","createSearchFilterActions","reducerIdGateAction","createEntityActions","fields","section","createValueByIdActions","reducerIdSuffix","useLocalSearchFilterState","reducer","useState","useReducer","SearchFilterLocalStateContext","ChipSpacer","styled","SearchFilterChips","disableClearAllButton","onClickClearAll","EmptyChip","Chip","SearchFilterChip","value","onClickRemove","setFormModelFields","onClickRemoveHandler","SectionChips","chips","emptyChipLabel","onClickRemoveOnChip","createChipsPropsForBooleanRecord","formModel","fieldName","options","createChipsForBooleanRecord","createOnClickRemoveOnChipForBooleanRecord","booleanRecord","truthyKeysAsList","key","option","o","newRecord","SimpleCheckboxListSection","onValueChange","sectionProps","d","CheckboxWithLabel","v","ChipMultiSelectSection","noneSelectedLabel","text","setText","listValue","useMemo","filteredOptions","p","onValueChangeInternal","createBooleanRecordFromValue","ChipMultiSelect","sum","item","createChipsPropsForDateRange","startDateFieldName","endDateFieldName","createChipsForDateRange","createOnClickRemoveOnChipForDateRange","startDate","endDate","createDateRangeSectionProps","DateRangeCalendarSection","dateRangeCalendarProps","focusedInput","setFocusedInput","dateRangeValue","stringsToDateRange","onValueChangeHandler","dateRangeToStrings","DateRangeCalendar"],"mappings":";;;;;;;;;;;;;AAYO,MAAMA,KAET,CAAC,EAAE,gBAAAC,GAAgB,QAAAC,IAAS,UAAU,cAAAC,QAEtC,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,UAAU;AAAA,IACV,KAAK;AAAA,IACL,YAAYC,EAAS,oBAAoB;AAAA,IACzC,QAAQ;AAAA,IAER,UAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,gBAAgB;AAAA,QAChB,YAAY;AAAA,QACZ,QAAQ;AAAA,QAER,UAAA;AAAA,UAAA,gBAAAD,EAACC,GACC,EAAA,UAAA;AAAA,YAAC,gBAAAJ,EAAAK,GAAA,EAAM,KAAK,EAAG,CAAA;AAAA,YACd,gBAAAL,EAAAM,GAAA,EAAQ,SAAS,MAAO,UAAOR,GAAA;AAAA,UAAA,GAClC;AAAA,UACA,gBAAAK,EAACC,GAAI,EAAA,KAAK,GACP,UAAA;AAAA,YAAAL;AAAA,YACD,gBAAAC;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,UAAUC;AAAA,gBACV,SAASX;AAAA,gBACT,SAAS;AAAA,cAAA;AAAA,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qD,IAAuBrH;AAAA,IAC3B,CAACgE,MAAqB;AACN,MAAAqB,EAAAiC,GAAmBtD,CAAK,GAAGW,CAAO;AAAA,IAClD;AAAA,IACA,CAACU,GAAeV,CAAO;AAAA,EAAA;AAIvB,SAAA,gBAAArG;AAAA,IAACoC;AAAA,IAAA;AAAA,MACC,OAAAL;AAAA,MACA,UAAAC;AAAA,MACA,WAAAK;AAAA,MACA,cAAAtC;AAAA,MACA,uBAAA0C;AAAA,MAEA,UAAA,gBAAAzC,EAAC6B,GAAI,EAAA,MAAM,GAAG,YAAY,UACxB,UAAA,gBAAA7B,EAAC6B,GAAI,EAAA,YAAY,SAAS,QAAM,IAC9B,UAAA,gBAAA7B;AAAA,QAACiJ;AAAA,QAAA;AAAA,UACC,iBAAAL;AAAA,UACA,cAAAD;AAAA,UACA,OAAOE;AAAA,UACP,eAAeE;AAAA,UACd,GAAGL;AAAA,QAAA;AAAA,SAER,EACF,CAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),a=require("react"),
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),a=require("react"),J=require("@stenajs-webui/modal"),O=require("@stenajs-webui/theme"),u=require("@stenajs-webui/core"),S=require("@stenajs-webui/elements"),I=require("lodash"),Q=require("redux"),i=require("@stenajs-webui/redux"),U=require("@emotion/styled"),X=require("@stenajs-webui/forms"),Z=require("@stenajs-webui/select"),v=require("@stenajs-webui/calendar"),N=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},ee=N(U),q=({onRequestClose:e,header:t="Filter",contentRight:n})=>r.jsx(u.Spacing,{position:"sticky",top:0,background:O.cssColor("--lhds-color-ui-50"),zIndex:100,children:r.jsxs(u.Row,{justifyContent:"space-between",alignItems:"center",height:"48px",children:[r.jsxs(u.Row,{children:[r.jsx(u.Space,{num:3}),r.jsx(u.Heading,{variant:"h4",children:t})]}),r.jsxs(u.Row,{gap:1,children:[n,r.jsx(S.FlatButton,{leftIcon:S.stenaTimes,onClick:e,variant:"danger"}),r.jsx(u.Space,{num:.5})]})]})}),y=a.createContext(null),M=()=>{const e=a.useContext(y);if(!e)throw new Error("Missing search filter context, wrap components with SearchFilterContext component.");return e},k=a.createContext(null),g=()=>{const e=a.useContext(k);if(!e)throw new Error("Missing search filter dispatch context.");return e},A=a.createContext(null),m=()=>{const e=a.useContext(A);if(!e)throw new Error("Missing search filter actions context.");return e},te=({children:e,header:t,headerContentRight:n,...c})=>{const{settings:{open:s}}=M(),o=g(),l=m(),h=a.useCallback(()=>{o(l.closeFilters())},[l,o]);return r.jsx(J.Drawer,{floating:!0,isOpen:s,onRequestClose:h,...c,children:r.jsxs(u.Column,{height:"100%",borderRadius:"var(--swui-border-radius)",background:O.cssColor("--lhds-color-ui-50"),children:[r.jsx(q,{onRequestClose:h,header:t,contentRight:n}),r.jsx(u.Box,{spacing:1,indent:1,gap:1,children:e})]})})},ne=({label:e="Filters",leftIcon:t=S.stenaSlidersMini})=>{const n=g(),c=m(),s=a.useCallback(()=>{n(c.openFilters())},[c,n]);return r.jsx(S.SecondaryButton,{label:e,leftIcon:t,onClick:s})},R=function({sectionId:t,label:n,loading:c,error:s,onRetry:o,disableContentPadding:l,children:h,leftIcon:C,contentRight:F}){var E;const d=M(),j=g(),f=m(),p=(E=d.expandedSections.values[t])!=null?E:!1,w=a.useCallback(()=>{j(f.setSectionExpanded(t,!p))},[f,j,p,t]),b=n!=null?n:P(t);return r.jsxs(r.Fragment,{children:[r.jsx(S.MenuButton,{label:b,leftIcon:C,expandable:!0,expanded:p,selected:p,onClick:w,right:F,children:c?r.jsx(u.Row,{spacing:!0,justifyContent:"center",flex:1,children:r.jsx(S.Spinner,{size:"small"})}):s?r.jsx(S.Banner,{variant:"error",text:s,contentRight:o?r.jsx(S.FlatButton,{label:"Retry",onClick:o}):null}):h}),p&&r.jsx(u.Space,{})]})},P=e=>I.upperFirst(I.lowerCase(e)),re=({children:e,...t})=>r.jsx(u.Column,{style:{marginTop:"auto"},justifyContent:"center",spacing:2,indent:!0,shadow:"popover",zIndex:1,...t,children:e}),B=a.createContext(null),ce=()=>{const e=a.useContext(B);if(!e)throw new Error("Missing search filter context, wrap components with SearchFilterContext component.");return e},D=function({state:t,dispatch:n,actions:c,children:s}){return r.jsx(k.Provider,{value:n,children:r.jsx(A.Provider,{value:c,children:r.jsx(y.Provider,{value:t,children:r.jsx(B.Provider,{value:t.formModel,children:s})})})})},G=e=>({settings:{open:!1},formModel:e,expandedSections:{values:{}}}),V=(e,t)=>Q.combineReducers({expandedSections:i.reducerIdGate(x(e,"expandedSections"),i.createValueByIdReducer(t.expandedSections)),formModel:i.reducerIdGate(x(e,"formModel"),i.createEntityReducer(t.formModel)),settings:i.reducerIdGate(x(e,"settings"),i.createEntityReducer(t.settings))}),H=(e,t)=>({openFilters:()=>i.reducerIdGateAction(x(e,"settings"),i.createEntityActions().setEntityFields({open:!0})),closeFilters:()=>i.reducerIdGateAction(x(e,"settings"),i.createEntityActions().setEntityFields({open:!1})),setFormModelFields:n=>i.reducerIdGateAction(x(e,"formModel"),i.createEntityActions().setEntityFields(n)),clearFormModel:()=>i.reducerIdGateAction(x(e,"formModel"),i.createEntityActions().setEntity(t)),expandSection:n=>i.reducerIdGateAction(x(e,"expandedSections"),i.createValueByIdActions().setValue(n,!0)),collapseSection:n=>i.reducerIdGateAction(x(e,"expandedSections"),i.createValueByIdActions().setValue(n,!1)),setSectionExpanded:(n,c)=>i.reducerIdGateAction(x(e,"expandedSections"),i.createValueByIdActions().setValue(n,c)),clearExpandedSections:()=>i.reducerIdGateAction(x(e,"expandedSections"),i.createValueByIdActions().clearAllValues())}),x=(e,t)=>`${e}.${t}`,T=e=>{const[t]=a.useState(()=>V("local",e)),[n]=a.useState(()=>H("local",e.formModel)),[c,s]=a.useReducer(t,e);return{actions:n,state:c,dispatch:s}},se=function({initialFormModel:t,children:n}){const{state:c,actions:s,dispatch:o}=T(G(t));return r.jsx(D,{state:c,actions:s,dispatch:o,children:n})},L=ee.default.div`
|
|
3
3
|
padding: calc(var(--swui-metrics-spacing) / 2)
|
|
4
4
|
calc(var(--swui-metrics-indent) / 2);
|
|
5
|
-
`,oe=({children:e,disableClearAllButton:t=!1})=>{const n=g(),c=m(),s=a.useCallback(()=>n(c.clearFormModel()),[c,n]);return r.jsxs(u.Row,{flexWrap:"wrap",children:[e,!t&&r.jsx(L,{children:r.jsx(S.FlatButton,{size:"small",label:"Clear all",onClick:s})})]})},
|
|
5
|
+
`,oe=({children:e,disableClearAllButton:t=!1})=>{const n=g(),c=m(),s=a.useCallback(()=>n(c.clearFormModel()),[c,n]);return r.jsxs(u.Row,{flexWrap:"wrap",children:[e,!t&&r.jsx(L,{children:r.jsx(S.FlatButton,{size:"small",label:"Clear all",onClick:s})})]})},_=function({label:t,sectionId:n}){const c=g(),s=m(),o=a.useCallback(()=>{c(s.clearExpandedSections()),c(s.expandSection(n)),c(s.openFilters())},[s,c,n]);return r.jsx(L,{children:r.jsx(S.Chip,{label:t,variant:"secondary",onClick:o})})},$=function({sectionId:t,label:n,value:c,onClickRemove:s}){const o=g(),l=m(),h=a.useCallback(d=>o(l.setFormModelFields(d)),[o,l]),C=a.useCallback(()=>{s==null||s({value:c,setFormModelFields:h})},[s,h,c]),F=a.useCallback(()=>{o(l.clearExpandedSections()),o(l.expandSection(t)),o(l.openFilters())},[l,o,t]);return r.jsx(L,{children:r.jsx(S.Chip,{label:n!=null?n:t,onClick:F,onClickRemove:s?C:void 0})})},ae=function({sectionId:t,chips:n,emptyChipLabel:c,onClickRemoveOnChip:s}){return n!=null&&n.length?r.jsx(r.Fragment,{children:n.map(({label:o,value:l})=>r.jsx($,{label:o!=null?o:t,sectionId:t,onClickRemove:s,value:l},l))}):c?r.jsx(_,{sectionId:t,label:c}):null},ie=(e,t,n)=>({chips:z(e[t],n),onClickRemoveOnChip:K(e,t)}),z=(e,t)=>u.truthyKeysAsList(e).map(n=>{var s;const c=t==null?void 0:t.find(o=>o.value===n);return{value:n,label:(s=c==null?void 0:c.label)!=null?s:n}}),K=(e,t)=>({setFormModelFields:n,value:c})=>{const s={...e[t]};s[c]=!1,n({[t]:s})},le=({options:e,value:t,onValueChange:n,...c})=>r.jsx(R,{disableContentPadding:!0,...c,children:r.jsx(u.Column,{maxHeight:"400px",overflowY:"auto",flex:1,gap:1,spacing:1,children:e==null?void 0:e.map(s=>r.jsx(u.Row,{alignItems:"center",children:r.jsx(X.CheckboxWithLabel,{tabIndex:-1,value:t==null?void 0:t[s.value],label:s.label,onValueChange:o=>n==null?void 0:n({...t,[s.value]:o})})},s.value))})}),ue=({options:e,value:t,noneSelectedLabel:n,onValueChange:c,...s})=>{const[o,l]=a.useState(""),h=a.useMemo(()=>t?u.truthyKeysAsList(t).map(d=>{var f;const j=e==null?void 0:e.find(p=>p.value===d);return{value:d,label:(f=j==null?void 0:j.label)!=null?f:d}}):[],[e,t]),C=a.useMemo(()=>e==null?void 0:e.filter(d=>d.value.toLocaleLowerCase().indexOf(o.toLocaleLowerCase())>-1||d.label.toLocaleLowerCase().indexOf(o.toLocaleLowerCase())>-1),[e,o]),F=a.useCallback(d=>{c==null||c(de(d))},[c]);return r.jsx(R,{...s,children:r.jsx(Z.ChipMultiSelect,{options:C,value:h,onValueChange:F,inputValue:o,noneSelectedLabel:n,onInputChange:l,closeMenuOnSelect:!1})})},de=e=>e.reduce((t,n)=>(t[n.value]=!0,t),{}),he=(e,t,n)=>({chips:W(e[t],e[n]),onClickRemoveOnChip:Y(t,n)}),W=(e,t)=>!e&&!t?[]:[{value:"dateRange",label:`${e!=null?e:""} - ${t!=null?t:""}`}],Y=(e,t)=>({setFormModelFields:n})=>{n({[e]:void 0,[t]:void 0})},xe=(e,t,n)=>({value:{startDate:e[t],endDate:e[n]},onValueChange:(c,{dispatch:s,actions:o})=>{const l={[t]:c.startDate,[n]:c.endDate};s(o.setFormModelFields(l))}}),Se=({value:e,onValueChange:t,sectionId:n,contentRight:c,disableContentPadding:s,label:o,leftIcon:l,...h})=>{const C=g(),F=m(),d=a.useMemo(()=>({dispatch:C,actions:F}),[F,C]),[j,f]=a.useState("startDate"),p=a.useMemo(()=>v.stringsToDateRange(e),[e]),w=a.useCallback(b=>{t(v.dateRangeToStrings(b),d)},[t,d]);return r.jsx(R,{label:o,leftIcon:l,sectionId:n,contentRight:c,disableContentPadding:s,children:r.jsx(u.Box,{flex:1,alignItems:"center",children:r.jsx(u.Box,{background:"white",indent:!0,children:r.jsx(v.DateRangeCalendar,{setFocusedInput:f,focusedInput:j,value:p,onValueChange:w,...h})})})})};exports.ChipMultiSelectSection=ue;exports.DateRangeCalendarSection=Se;exports.EmptyChip=_;exports.SearchFilterActionsContext=A;exports.SearchFilterButton=ne;exports.SearchFilterChip=$;exports.SearchFilterChips=oe;exports.SearchFilterContext=D;exports.SearchFilterDispatchContext=k;exports.SearchFilterDrawer=te;exports.SearchFilterLocalStateContext=se;exports.SearchFilterModelContext=B;exports.SearchFilterPanelHeader=q;exports.SearchFilterSection=R;exports.SearchFilterStateContext=y;exports.SectionChips=ae;exports.SimpleCheckboxListSection=le;exports.StickyFooter=re;exports.createChipsForBooleanRecord=z;exports.createChipsForDateRange=W;exports.createChipsPropsForBooleanRecord=ie;exports.createChipsPropsForDateRange=he;exports.createDateRangeSectionProps=xe;exports.createOnClickRemoveOnChipForBooleanRecord=K;exports.createOnClickRemoveOnChipForDateRange=Y;exports.createSearchFilterActions=H;exports.createSearchFilterInitialState=G;exports.createSearchFilterReducer=V;exports.formatColumnIdToHeaderCellLabel=P;exports.getReducerIdFor=x;exports.useLocalSearchFilterState=T;exports.useSearchFilterActions=m;exports.useSearchFilterDispatch=g;exports.useSearchFilterModel=ce;exports.useSearchFilterState=M;
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/features/search-filter/components/SearchFilterPanelHeader.tsx","../src/features/search-filter/context/SearchFilterStateContext.ts","../src/features/search-filter/context/SearchFilterDispatchContext.ts","../src/features/search-filter/context/SearchFilterActionsContext.ts","../src/features/search-filter/components/SearchFilterDrawer.tsx","../src/features/search-filter/components/SearchFilterButton.tsx","../src/features/search-filter/components/SearchFilterSection.tsx","../src/features/search-filter/components/StickyFooter.tsx","../src/features/search-filter/context/SearchFilterModelContext.ts","../src/features/search-filter/components/context/SearchFilterContext.tsx","../src/features/search-filter/redux/SearchFilterRedux.ts","../src/features/search-filter/hooks/UseLocalSearchFilterState.ts","../src/features/search-filter/components/context/SearchFilterLocalStateContext.tsx","../src/features/search-filter/features/chips/ChipSpacer.tsx","../src/features/search-filter/features/chips/SearchFilterChips.tsx","../src/features/search-filter/features/chips/EmptyChip.tsx","../src/features/search-filter/features/chips/SearchFilterChip.tsx","../src/features/search-filter/features/chips/SectionChips.tsx","../src/features/search-filter/section-factories/boolean-record/BooleanRecordChips.ts","../src/features/search-filter/section-factories/boolean-record/components/SimpleCheckboxListSection.tsx","../src/features/search-filter/section-factories/boolean-record/components/ChipMultiSelectSection.tsx","../src/features/search-filter/section-factories/date-range/DateRangeChips.ts","../src/features/search-filter/section-factories/date-range/DateRangePropsFactory.ts","../src/features/search-filter/section-factories/date-range/components/DateRangeCalendarSection.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport { FlatButton, stenaTimes } from \"@stenajs-webui/elements\";\nimport { Heading, Row, Space, Spacing } from \"@stenajs-webui/core\";\n\ninterface SearchFilterPanelHeaderProps {\n onRequestClose: () => void;\n header?: string;\n contentRight?: ReactNode;\n}\n\nexport const SearchFilterPanelHeader: React.FC<\n SearchFilterPanelHeaderProps\n> = ({ onRequestClose, header = \"Filter\", contentRight }) => {\n return (\n <Spacing>\n <Row\n justifyContent={\"space-between\"}\n alignItems={\"center\"}\n height={\"48px\"}\n >\n <Row>\n <Space num={3} />\n <Heading variant={\"h4\"}>{header}</Heading>\n </Row>\n <Row gap={1}>\n {contentRight}\n <FlatButton\n leftIcon={stenaTimes}\n onClick={onRequestClose}\n variant={\"danger\"}\n />\n <Space num={0.5} />\n </Row>\n </Row>\n </Spacing>\n );\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterState } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterStateContext = createContext<\n SearchFilterState<unknown>\n>(null as unknown as SearchFilterState<unknown>);\n\nexport const useSearchFilterState = <\n TFormModel\n>(): SearchFilterState<TFormModel> => {\n const c = useContext(SearchFilterStateContext);\n if (!c) {\n throw new Error(\n \"Missing search filter context, wrap components with SearchFilterContext component.\"\n );\n }\n return c as SearchFilterState<TFormModel>;\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterDispatch } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterDispatchContext = createContext<\n SearchFilterDispatch<unknown>\n>(null as unknown as SearchFilterDispatch<unknown>);\n\nexport const useSearchFilterDispatch = () => {\n const c = useContext(SearchFilterDispatchContext);\n if (!c) {\n throw new Error(\"Missing search filter dispatch context.\");\n }\n return c;\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterActions } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterActionsContext = createContext<\n SearchFilterActions<unknown, any>\n>(null as unknown as SearchFilterActions<unknown, any>);\n\nexport const useSearchFilterActions = <\n TFormModel,\n TSectionKey extends string\n>() => {\n const c = useContext(SearchFilterActionsContext);\n if (!c) {\n throw new Error(\"Missing search filter actions context.\");\n }\n return c as SearchFilterActions<TFormModel, TSectionKey>;\n};\n","import * as React from \"react\";\nimport { ReactNode, useCallback } from \"react\";\nimport { Drawer, DrawerProps } from \"@stenajs-webui/modal\";\nimport { cssColor } from \"@stenajs-webui/theme\";\nimport { Box, Column } from \"@stenajs-webui/core\";\nimport { SearchFilterPanelHeader } from \"./SearchFilterPanelHeader\";\nimport { useSearchFilterState } from \"../context/SearchFilterStateContext\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\n\ninterface SearchFilterDrawerProps\n extends Omit<DrawerProps, \"isOpen\" | \"onRequestClose\"> {\n header?: string;\n headerContentRight?: ReactNode;\n}\n\nexport const SearchFilterDrawer: React.FC<SearchFilterDrawerProps> = ({\n children,\n header,\n headerContentRight,\n ...drawerProps\n}) => {\n const {\n settings: { open },\n } = useSearchFilterState();\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const closeDrawer = useCallback(() => {\n dispatch(actions.closeFilters());\n }, [actions, dispatch]);\n\n return (\n <Drawer isOpen={open} onRequestClose={closeDrawer} {...drawerProps}>\n <Column\n height={\"100%\"}\n borderRadius={\"var(--swui-border-radius)\"}\n background={cssColor(\"--lhds-color-ui-50\")}\n >\n <SearchFilterPanelHeader\n onRequestClose={closeDrawer}\n header={header}\n contentRight={headerContentRight}\n />\n <Box spacing={1} indent={1} gap={1}>\n {children}\n </Box>\n </Column>\n </Drawer>\n );\n};\n","import { SecondaryButton, stenaSlidersMini } from \"@stenajs-webui/elements\";\nimport * as React from \"react\";\nimport { useCallback } from \"react\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\n\ninterface SearchFilterDrawerButtonProps {\n label?: string;\n leftIcon?: IconDefinition;\n}\n\nexport const SearchFilterButton: React.FC<SearchFilterDrawerButtonProps> = ({\n label = \"Filters\",\n leftIcon = stenaSlidersMini,\n}) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickButton = useCallback(() => {\n dispatch(actions.openFilters());\n }, [actions, dispatch]);\n\n return (\n <SecondaryButton\n label={label}\n leftIcon={leftIcon}\n onClick={onClickButton}\n />\n );\n};\n","import * as React from \"react\";\nimport { PropsWithChildren, useCallback } from \"react\";\nimport { Row, Space } from \"@stenajs-webui/core\";\nimport { lowerCase, upperFirst } from \"lodash\";\nimport {\n Banner,\n FlatButton,\n MenuButton,\n Spinner,\n} from \"@stenajs-webui/elements\";\nimport { useSearchFilterState } from \"../context/SearchFilterStateContext\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\n\nexport interface SearchFilterSectionProps<TSectionKey extends string> {\n sectionId: TSectionKey;\n label?: string;\n leftIcon?: IconDefinition;\n contentRight?: React.ReactNode;\n disableContentPadding?: boolean;\n loading?: boolean;\n error?: string;\n onRetry?: () => void;\n}\n\nexport const SearchFilterSection = function SearchFilterSection<\n TSectionKey extends string\n>({\n sectionId,\n label,\n loading,\n error,\n onRetry,\n disableContentPadding,\n children,\n leftIcon,\n contentRight,\n}: PropsWithChildren<SearchFilterSectionProps<TSectionKey>>) {\n const state = useSearchFilterState();\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const expanded = state.expandedSections.values[sectionId] ?? false;\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.setSectionExpanded(sectionId, !expanded));\n }, [actions, dispatch, expanded, sectionId]);\n\n const activeLabel = label ?? formatColumnIdToHeaderCellLabel(sectionId);\n\n return (\n <>\n <MenuButton\n label={activeLabel}\n leftIcon={leftIcon}\n expandable\n expanded={expanded}\n selected={expanded}\n onClick={onClickLabel}\n right={contentRight}\n >\n {loading ? (\n <Row spacing justifyContent={\"center\"} flex={1}>\n <Spinner size={\"small\"} />\n </Row>\n ) : error ? (\n <Banner\n variant={\"error\"}\n text={error}\n contentRight={\n onRetry ? <FlatButton label={\"Retry\"} onClick={onRetry} /> : null\n }\n />\n ) : disableContentPadding ? (\n children\n ) : (\n children\n )}\n </MenuButton>\n {expanded && <Space />}\n </>\n );\n};\n\nexport const formatColumnIdToHeaderCellLabel = (columnId: string): string =>\n upperFirst(lowerCase(columnId));\n","import { BoxProps, Column } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { ReactNode } from \"react\";\n\nexport interface StickySearchButtonProps extends Pick<BoxProps, \"gap\"> {\n children?: ReactNode;\n}\n\nexport const StickyFooter: React.FC<StickySearchButtonProps> = ({\n children,\n ...boxProps\n}) => {\n return (\n <Column\n style={{ marginTop: \"auto\" }}\n justifyContent={\"center\"}\n spacing={2}\n indent\n shadow={\"popover\"}\n zIndex={1}\n {...boxProps}\n >\n {children}\n </Column>\n );\n};\n","import { createContext, useContext } from \"react\";\n\nexport const SearchFilterModelContext = createContext<unknown>(null as unknown);\n\nexport const useSearchFilterModel = <TFormModel>(): TFormModel => {\n const c = useContext(SearchFilterModelContext);\n if (!c) {\n throw new Error(\n \"Missing search filter context, wrap components with SearchFilterContext component.\"\n );\n }\n return c as TFormModel;\n};\n","import * as React from \"react\";\nimport { PropsWithChildren } from \"react\";\nimport {\n SearchFilterActions,\n SearchFilterDispatch,\n SearchFilterState,\n} from \"../../redux/SearchFilterRedux\";\nimport { SearchFilterDispatchContext } from \"../../context/SearchFilterDispatchContext\";\nimport { SearchFilterActionsContext } from \"../../context/SearchFilterActionsContext\";\nimport { SearchFilterStateContext } from \"../../context/SearchFilterStateContext\";\nimport { SearchFilterModelContext } from \"../../context/SearchFilterModelContext\";\n\ninterface SearchFilterScopeProps<TFormModel, TSectionKey extends string> {\n state: SearchFilterState<TFormModel>;\n dispatch: SearchFilterDispatch<TFormModel>;\n actions: SearchFilterActions<TFormModel, TSectionKey>;\n}\n\nexport const SearchFilterContext = function SearchFilterScope<\n TFormModel,\n TSectionKey extends string\n>({\n state,\n dispatch,\n actions,\n children,\n}: PropsWithChildren<SearchFilterScopeProps<TFormModel, TSectionKey>>) {\n return (\n <SearchFilterDispatchContext.Provider\n value={dispatch as SearchFilterDispatch<unknown>}\n >\n <SearchFilterActionsContext.Provider value={actions}>\n <SearchFilterStateContext.Provider value={state}>\n <SearchFilterModelContext.Provider value={state.formModel}>\n {children}\n </SearchFilterModelContext.Provider>\n </SearchFilterStateContext.Provider>\n </SearchFilterActionsContext.Provider>\n </SearchFilterDispatchContext.Provider>\n );\n};\n","import { combineReducers } from \"redux\";\nimport {\n createEntityActions,\n createEntityReducer,\n createValueByIdActions,\n createValueByIdReducer,\n EntityAction,\n EntityState,\n reducerIdGate,\n reducerIdGateAction,\n ReducerIdGateAction,\n ValueByIdAction,\n ValueByIdState,\n} from \"@stenajs-webui/redux\";\nimport { Dispatch } from \"react\";\n\nexport interface SearchFilterSettings {\n open: boolean;\n}\n\nexport type SearchFilterDispatch<TFormModel> = Dispatch<\n SearchFilterAction<TFormModel>\n>;\n\nexport interface SearchFilterState<TFormModel> {\n expandedSections: ValueByIdState<boolean>;\n formModel: EntityState<TFormModel>;\n settings: EntityState<SearchFilterSettings>;\n}\n\nexport type SearchFilterAction<TFormModel> =\n | ReducerIdGateAction<ValueByIdAction<boolean>>\n | ReducerIdGateAction<EntityAction<TFormModel>>\n | ReducerIdGateAction<EntityAction<SearchFilterSettings>>;\n\nexport const createSearchFilterInitialState = <TFormModel>(\n initialFormModel: TFormModel\n): SearchFilterState<TFormModel> => ({\n settings: {\n open: false,\n },\n formModel: initialFormModel,\n expandedSections: { values: {} },\n});\n\nexport const createSearchFilterReducer = <TFormModel>(\n reducerId: string,\n initialState: SearchFilterState<TFormModel>\n) =>\n combineReducers({\n expandedSections: reducerIdGate(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdReducer<boolean>(initialState.expandedSections)\n ),\n formModel: reducerIdGate(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityReducer<TFormModel>(initialState.formModel)\n ),\n settings: reducerIdGate(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityReducer<SearchFilterSettings>(initialState.settings)\n ),\n });\n\nexport interface SearchFilterActions<TFormModel, TSectionKey extends string> {\n openFilters: () => SearchFilterAction<TFormModel>;\n closeFilters: () => SearchFilterAction<TFormModel>;\n setFormModelFields: (\n fields: Partial<TFormModel>\n ) => SearchFilterAction<TFormModel>;\n clearFormModel: () => SearchFilterAction<TFormModel>;\n expandSection: (section: TSectionKey) => SearchFilterAction<TFormModel>;\n collapseSection: (section: TSectionKey) => SearchFilterAction<TFormModel>;\n setSectionExpanded: (\n section: TSectionKey,\n expanded: boolean\n ) => SearchFilterAction<TFormModel>;\n clearExpandedSections: () => SearchFilterAction<TFormModel>;\n}\n\nexport const createSearchFilterActions = <\n TFormModel,\n TSectionKey extends string\n>(\n reducerId: string,\n initialFormModel: TFormModel\n): SearchFilterActions<TFormModel, TSectionKey> => ({\n openFilters: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityActions<SearchFilterSettings>().setEntityFields({\n open: true,\n })\n ),\n closeFilters: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityActions<SearchFilterSettings>().setEntityFields({\n open: false,\n })\n ),\n setFormModelFields: (fields: Partial<TFormModel>) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityActions<TFormModel>().setEntityFields(fields)\n ),\n clearFormModel: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityActions<TFormModel>().setEntity(initialFormModel)\n ),\n expandSection: (section: TSectionKey) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, true)\n ),\n collapseSection: (section: TSectionKey) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, false)\n ),\n setSectionExpanded: (section: TSectionKey, expanded: boolean) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, expanded)\n ),\n clearExpandedSections: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().clearAllValues()\n ),\n});\n\nexport const getReducerIdFor = (\n reducerId: string,\n reducerIdSuffix: keyof SearchFilterState<unknown>\n): string => `${reducerId}.${reducerIdSuffix}`;\n","import {\n createSearchFilterActions,\n createSearchFilterReducer,\n SearchFilterState,\n} from \"../redux/SearchFilterRedux\";\nimport { useReducer, useState } from \"react\";\n\nexport const useLocalSearchFilterState = <\n TFormModel,\n TSectionKey extends string\n>(\n initialState: SearchFilterState<TFormModel>\n) => {\n const [reducer] = useState(() =>\n createSearchFilterReducer<TFormModel>(\"local\", initialState)\n );\n\n const [actions] = useState(() =>\n createSearchFilterActions<TFormModel, TSectionKey>(\n \"local\",\n initialState.formModel\n )\n );\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n return {\n actions,\n state,\n dispatch,\n };\n};\n","import * as React from \"react\";\nimport { PropsWithChildren } from \"react\";\nimport { useLocalSearchFilterState } from \"../../hooks/UseLocalSearchFilterState\";\nimport { SearchFilterContext } from \"./SearchFilterContext\";\nimport { createSearchFilterInitialState } from \"../../redux/SearchFilterRedux\";\n\ninterface SearchFilterLocalScopeProps<TFormModel> {\n initialFormModel: TFormModel;\n}\n\nexport const SearchFilterLocalStateContext = function SearchFilterLocalScope<\n TFormModel\n>({\n initialFormModel,\n children,\n}: PropsWithChildren<SearchFilterLocalScopeProps<TFormModel>>) {\n const { state, actions, dispatch } = useLocalSearchFilterState(\n createSearchFilterInitialState(initialFormModel)\n );\n\n return (\n <SearchFilterContext state={state} actions={actions} dispatch={dispatch}>\n {children}\n </SearchFilterContext>\n );\n};\n","import styled from \"@emotion/styled\";\n\nexport const ChipSpacer = styled.div`\n padding: calc(var(--swui-metrics-spacing) / 2)\n calc(var(--swui-metrics-indent) / 2);\n`;\n","import * as React from \"react\";\nimport { ReactNode, useCallback } from \"react\";\nimport { Row } from \"@stenajs-webui/core\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { FlatButton } from \"@stenajs-webui/elements\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\n\ninterface SearchFilterChipsProps {\n disableClearAllButton?: boolean;\n children?: ReactNode;\n}\n\nexport const SearchFilterChips: React.FC<SearchFilterChipsProps> = ({\n children,\n disableClearAllButton = false,\n}) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickClearAll = useCallback(\n () => dispatch(actions.clearFormModel()),\n [actions, dispatch]\n );\n\n return (\n <Row flexWrap={\"wrap\"}>\n {children}\n {!disableClearAllButton && (\n <ChipSpacer>\n <FlatButton\n size={\"small\"}\n label={\"Clear all\"}\n onClick={onClickClearAll}\n />\n </ChipSpacer>\n )}\n </Row>\n );\n};\n","import * as React from \"react\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { Chip } from \"@stenajs-webui/elements\";\nimport { useCallback } from \"react\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\n\ninterface EmptyChipProps<TSectionKey extends string> {\n sectionId: TSectionKey;\n label: string;\n}\n\nexport const EmptyChip = function EmptyChip<TSectionKey extends string>({\n label,\n sectionId,\n}: EmptyChipProps<TSectionKey>) {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.clearExpandedSections());\n dispatch(actions.expandSection(sectionId));\n dispatch(actions.openFilters());\n }, [actions, dispatch, sectionId]);\n\n return (\n <ChipSpacer>\n <Chip label={label} variant={\"secondary\"} onClick={onClickLabel} />\n </ChipSpacer>\n );\n};\n","import * as React from \"react\";\nimport { useCallback } from \"react\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { Chip } from \"@stenajs-webui/elements\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\nimport { SearchFilterSectionOnClickRemoveOnChip } from \"../../config/SearchFilterConfig\";\n\ninterface SearchFilterChipProps<TFormModel, TSectionKey> {\n sectionId: TSectionKey;\n label: string;\n value: string;\n onClickRemove?: SearchFilterSectionOnClickRemoveOnChip<TFormModel>;\n}\n\nexport const SearchFilterChip = function SearchFilterChip<\n TFormModel,\n TSectionKey extends string\n>({\n sectionId,\n label,\n value,\n onClickRemove,\n}: SearchFilterChipProps<TFormModel, TSectionKey>) {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const setFormModelFields = useCallback(\n (fields: Partial<TFormModel>) =>\n dispatch(actions.setFormModelFields(fields)),\n [dispatch, actions]\n );\n\n const onClickRemoveHandler = useCallback(() => {\n onClickRemove?.({ value, setFormModelFields });\n }, [onClickRemove, setFormModelFields, value]);\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.clearExpandedSections());\n dispatch(actions.expandSection(sectionId));\n dispatch(actions.openFilters());\n }, [actions, dispatch, sectionId]);\n\n return (\n <ChipSpacer>\n <Chip\n label={label ?? sectionId}\n onClick={onClickLabel}\n onClickRemove={onClickRemove ? onClickRemoveHandler : undefined}\n />\n </ChipSpacer>\n );\n};\n","import * as React from \"react\";\nimport {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { EmptyChip } from \"./EmptyChip\";\nimport { SearchFilterChip } from \"./SearchFilterChip\";\n\nexport interface SectionChipsProps<TFormModel, TSectionKey extends string> {\n sectionId: TSectionKey;\n chips?: Array<SearchFilterSectionChipModel>;\n emptyChipLabel?: string;\n onClickRemoveOnChip?: SearchFilterSectionOnClickRemoveOnChip<TFormModel>;\n}\n\nexport const SectionChips = function SectionChips<\n TFormModel,\n TSectionKey extends string\n>({\n sectionId,\n chips,\n emptyChipLabel,\n onClickRemoveOnChip,\n}: SectionChipsProps<TFormModel, TSectionKey>) {\n if (!chips?.length) {\n if (!emptyChipLabel) {\n return null;\n }\n return <EmptyChip sectionId={sectionId} label={emptyChipLabel} />;\n }\n\n return (\n <>\n {chips.map(({ label, value }) => (\n <SearchFilterChip\n key={value}\n label={label ?? sectionId}\n sectionId={sectionId}\n onClickRemove={onClickRemoveOnChip}\n value={value}\n />\n ))}\n </>\n );\n};\n","import { BooleanRecord, BooleanRecordOptions } from \"./BooleanRecordTypes\";\nimport {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { PickByValue, truthyKeysAsList } from \"@stenajs-webui/core\";\nimport { SectionChipsProps } from \"../../features/chips/SectionChips\";\n\nexport const createChipsPropsForBooleanRecord = <\n TFormModel,\n TSectionKey extends string,\n TField extends keyof PickByValue<TFormModel, BooleanRecord>\n>(\n formModel: TFormModel,\n fieldName: TField,\n options?: BooleanRecordOptions\n): Pick<\n SectionChipsProps<TFormModel, TSectionKey>,\n \"chips\" | \"onClickRemoveOnChip\"\n> => ({\n chips: createChipsForBooleanRecord(\n formModel[fieldName] as unknown as BooleanRecord,\n options\n ),\n onClickRemoveOnChip: createOnClickRemoveOnChipForBooleanRecord(\n formModel,\n fieldName\n ),\n});\n\nexport const createChipsForBooleanRecord = (\n booleanRecord: BooleanRecord,\n options?: BooleanRecordOptions\n): Array<SearchFilterSectionChipModel> =>\n truthyKeysAsList(booleanRecord).map((key) => {\n const option = options?.find((o) => o.value === key);\n return { value: key, label: option?.label ?? key };\n });\n\nexport const createOnClickRemoveOnChipForBooleanRecord = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, BooleanRecord>\n>(\n formModel: TFormModel,\n fieldName: TField\n): SearchFilterSectionOnClickRemoveOnChip<TFormModel> => {\n return ({ setFormModelFields, value }) => {\n const newRecord = { ...formModel[fieldName] };\n newRecord[value] = false;\n setFormModelFields({\n [fieldName]: newRecord,\n } as unknown as Partial<TFormModel>);\n };\n};\n","import * as React from \"react\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport { Column, Row } from \"@stenajs-webui/core\";\nimport {\n CheckboxWithLabel,\n ValueAndOnValueChangeProps,\n} from \"@stenajs-webui/forms\";\nimport { BooleanRecord, BooleanRecordOptions } from \"../BooleanRecordTypes\";\n\nexport interface SimpleCheckboxSectionProps<TSectionKey extends string>\n extends SearchFilterSectionProps<TSectionKey>,\n ValueAndOnValueChangeProps<BooleanRecord> {\n options?: BooleanRecordOptions;\n}\n\nexport const SimpleCheckboxListSection = <TSectionKey extends string>({\n options,\n value,\n onValueChange,\n ...sectionProps\n}: SimpleCheckboxSectionProps<TSectionKey>): React.ReactElement => (\n <SearchFilterSection disableContentPadding {...sectionProps}>\n <Column maxHeight={\"400px\"} overflowY={\"auto\"} flex={1} gap={1} spacing={1}>\n {options?.map((d) => (\n <Row key={d.value} alignItems={\"center\"}>\n <CheckboxWithLabel\n tabIndex={-1}\n value={value?.[d.value]}\n label={d.label}\n onValueChange={(v) =>\n onValueChange?.({\n ...value,\n [d.value]: v,\n })\n }\n />\n </Row>\n ))}\n </Column>\n </SearchFilterSection>\n);\n","import * as React from \"react\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport { ValueAndOnValueChangeProps } from \"@stenajs-webui/forms\";\nimport { BooleanRecord, BooleanRecordOptions } from \"../BooleanRecordTypes\";\nimport { ChipMultiSelect, ChipMultiSelectValue } from \"@stenajs-webui/select\";\nimport { truthyKeysAsList } from \"@stenajs-webui/core\";\n\ninterface ChipMultiSelectSectionProps<TSectionKey extends string>\n extends SearchFilterSectionProps<TSectionKey>,\n ValueAndOnValueChangeProps<BooleanRecord> {\n noneSelectedLabel?: string;\n options?: BooleanRecordOptions;\n}\n\nexport const ChipMultiSelectSection = <TSectionKey extends string>({\n options,\n value,\n noneSelectedLabel,\n onValueChange,\n ...sectionProps\n}: ChipMultiSelectSectionProps<TSectionKey>): React.ReactElement => {\n const [text, setText] = useState<string>(\"\");\n\n const listValue = useMemo<Array<ChipMultiSelectValue>>(\n () =>\n value\n ? truthyKeysAsList(value).map<ChipMultiSelectValue>((key) => {\n const option = options?.find((o) => o.value === key);\n return { value: key, label: option?.label ?? key };\n })\n : [],\n [options, value]\n );\n\n const filteredOptions = useMemo(() => {\n return options?.filter(\n (p) =>\n p.value.toLocaleLowerCase().indexOf(text.toLocaleLowerCase()) > -1 ||\n p.label.toLocaleLowerCase().indexOf(text.toLocaleLowerCase()) > -1\n );\n }, [options, text]);\n\n const onValueChangeInternal = useCallback(\n (value: Array<ChipMultiSelectValue>) => {\n onValueChange?.(createBooleanRecordFromValue(value));\n },\n [onValueChange]\n );\n\n return (\n <SearchFilterSection {...sectionProps}>\n <ChipMultiSelect\n options={filteredOptions}\n value={listValue}\n onValueChange={onValueChangeInternal}\n inputValue={text}\n noneSelectedLabel={noneSelectedLabel}\n onInputChange={setText}\n closeMenuOnSelect={false}\n />\n </SearchFilterSection>\n );\n};\n\nconst createBooleanRecordFromValue = (\n value: Array<ChipMultiSelectValue>\n): BooleanRecord => {\n return value.reduce<BooleanRecord>((sum, item) => {\n sum[item.value] = true;\n return sum;\n }, {});\n};\n","import {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { PickByValue } from \"@stenajs-webui/core\";\nimport { SectionChipsProps } from \"../../features/chips/SectionChips\";\n\nexport const createChipsPropsForDateRange = <\n TFormModel,\n TSectionKey extends string,\n TField extends keyof PickByValue<TFormModel, string | undefined>\n>(\n formModel: TFormModel,\n startDateFieldName: TField,\n endDateFieldName: TField\n): Pick<\n SectionChipsProps<TFormModel, TSectionKey>,\n \"chips\" | \"onClickRemoveOnChip\"\n> => ({\n chips: createChipsForDateRange(\n formModel[startDateFieldName] as unknown as string | undefined,\n formModel[endDateFieldName] as unknown as string | undefined\n ),\n onClickRemoveOnChip: createOnClickRemoveOnChipForDateRange(\n startDateFieldName,\n endDateFieldName\n ),\n});\n\nexport const createChipsForDateRange = (\n startDate: string | undefined,\n endDate: string | undefined\n): Array<SearchFilterSectionChipModel> => {\n if (!startDate && !endDate) {\n return [];\n }\n return [\n { value: \"dateRange\", label: `${startDate ?? \"\"} - ${endDate ?? \"\"}` },\n ];\n};\n\nexport const createOnClickRemoveOnChipForDateRange = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, string | undefined>\n>(\n startDateFieldName: TField,\n endDateFieldName: TField\n): SearchFilterSectionOnClickRemoveOnChip<TFormModel> => {\n return ({ setFormModelFields }) => {\n setFormModelFields({\n [startDateFieldName]: undefined,\n [endDateFieldName]: undefined,\n } as unknown as Partial<TFormModel>);\n };\n};\n","import { PickByValue } from \"@stenajs-webui/core\";\nimport { DateRangeCalendarSectionProps } from \"./components/DateRangeCalendarSection\";\n\nexport const createDateRangeSectionProps = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, string | undefined>,\n TSectionKey extends string\n>(\n formModel: TFormModel,\n startDateFieldName: TField,\n endDateFieldName: TField\n): Pick<\n DateRangeCalendarSectionProps<TFormModel, TSectionKey>,\n \"value\" | \"onValueChange\"\n> => ({\n value: {\n startDate: formModel[startDateFieldName] as unknown as string | undefined,\n endDate: formModel[endDateFieldName] as unknown as string | undefined,\n },\n onValueChange: (value, { dispatch, actions }) => {\n const fields: Partial<TFormModel> = {\n [startDateFieldName]: value.startDate,\n [endDateFieldName]: value.endDate,\n } as any;\n dispatch(actions.setFormModelFields(fields));\n },\n});\n","import {\n DateRange,\n DateRangeCalendar,\n DateRangeCalendarProps,\n DateRangeFocusedInput,\n dateRangeToStrings,\n DateStringRange,\n stringsToDateRange,\n} from \"@stenajs-webui/calendar\";\nimport * as React from \"react\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport { Box } from \"@stenajs-webui/core\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport {\n SearchFilterActions,\n SearchFilterDispatch,\n} from \"../../../redux/SearchFilterRedux\";\nimport { useSearchFilterDispatch } from \"../../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../../context/SearchFilterActionsContext\";\n\nexport interface DateRangeCalendarSectionProps<\n TFormModel,\n TSectionKey extends string\n> extends Omit<\n SearchFilterSectionProps<TSectionKey>,\n \"label\" | \"onRetry\" | \"error\" | \"loading\"\n >,\n Omit<\n DateRangeCalendarProps<{}>,\n \"value\" | \"onValueChange\" | \"focusedInput\" | \"setFocusedInput\"\n > {\n value: DateStringRange;\n onValueChange: (\n value: DateStringRange,\n options: SetDateOptions<TFormModel, TSectionKey>\n ) => void;\n label?: string;\n}\n\nexport interface SetDateOptions<TFormModel, TSectionKey extends string> {\n dispatch: SearchFilterDispatch<TFormModel>;\n actions: SearchFilterActions<TFormModel, TSectionKey>;\n}\n\nexport const DateRangeCalendarSection = <\n TFormModel,\n TSectionKey extends string\n>({\n value,\n onValueChange,\n sectionId,\n contentRight,\n disableContentPadding,\n label,\n leftIcon,\n ...dateRangeCalendarProps\n}: DateRangeCalendarSectionProps<TFormModel, TSectionKey>) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions<TFormModel, TSectionKey>();\n\n const options = useMemo<SetDateOptions<TFormModel, TSectionKey>>(\n () => ({ dispatch, actions }),\n [actions, dispatch]\n );\n const [focusedInput, setFocusedInput] =\n useState<DateRangeFocusedInput>(\"startDate\");\n\n const dateRangeValue = useMemo(() => stringsToDateRange(value), [value]);\n\n const onValueChangeHandler = useCallback(\n (value: DateRange) => {\n onValueChange(dateRangeToStrings(value), options);\n },\n [onValueChange, options]\n );\n\n return (\n <SearchFilterSection\n label={label}\n leftIcon={leftIcon}\n sectionId={sectionId}\n contentRight={contentRight}\n disableContentPadding={disableContentPadding}\n >\n <Box flex={1} alignItems={\"center\"}>\n <Box background={\"white\"} indent>\n <DateRangeCalendar\n setFocusedInput={setFocusedInput}\n focusedInput={focusedInput}\n value={dateRangeValue}\n onValueChange={onValueChangeHandler}\n {...dateRangeCalendarProps}\n />\n </Box>\n </Box>\n </SearchFilterSection>\n );\n};\n"],"names":["SearchFilterPanelHeader","onRequestClose","header","contentRight","Spacing","jsxs","Row","jsx","Space","Heading","FlatButton","stenaTimes","SearchFilterStateContext","createContext","useSearchFilterState","c","useContext","SearchFilterDispatchContext","useSearchFilterDispatch","SearchFilterActionsContext","useSearchFilterActions","SearchFilterDrawer","children","headerContentRight","drawerProps","open","dispatch","actions","closeDrawer","useCallback","Drawer","Column","cssColor","Box","SearchFilterButton","label","leftIcon","stenaSlidersMini","onClickButton","SecondaryButton","SearchFilterSection","sectionId","loading","error","onRetry","disableContentPadding","state","expanded","_a","onClickLabel","activeLabel","formatColumnIdToHeaderCellLabel","Fragment","MenuButton","Spinner","Banner","columnId","upperFirst","lowerCase","StickyFooter","boxProps","SearchFilterModelContext","useSearchFilterModel","SearchFilterContext","createSearchFilterInitialState","initialFormModel","createSearchFilterReducer","reducerId","initialState","combineReducers","reducerIdGate","getReducerIdFor","createValueByIdReducer","createEntityReducer","createSearchFilterActions","reducerIdGateAction","createEntityActions","fields","section","createValueByIdActions","reducerIdSuffix","useLocalSearchFilterState","reducer","useState","useReducer","SearchFilterLocalStateContext","ChipSpacer","styled","SearchFilterChips","disableClearAllButton","onClickClearAll","EmptyChip","Chip","SearchFilterChip","value","onClickRemove","setFormModelFields","onClickRemoveHandler","SectionChips","chips","emptyChipLabel","onClickRemoveOnChip","createChipsPropsForBooleanRecord","formModel","fieldName","options","createChipsForBooleanRecord","createOnClickRemoveOnChipForBooleanRecord","booleanRecord","truthyKeysAsList","key","option","newRecord","SimpleCheckboxListSection","onValueChange","sectionProps","d","CheckboxWithLabel","v","ChipMultiSelectSection","noneSelectedLabel","text","setText","listValue","useMemo","o","filteredOptions","p","onValueChangeInternal","createBooleanRecordFromValue","ChipMultiSelect","sum","item","createChipsPropsForDateRange","startDateFieldName","endDateFieldName","createChipsForDateRange","createOnClickRemoveOnChipForDateRange","startDate","endDate","createDateRangeSectionProps","DateRangeCalendarSection","dateRangeCalendarProps","focusedInput","setFocusedInput","dateRangeValue","stringsToDateRange","onValueChangeHandler","dateRangeToStrings","DateRangeCalendar"],"mappings":"8jBAWaA,EAET,CAAC,CAAE,eAAAC,EAAgB,OAAAC,EAAS,SAAU,aAAAC,WAErCC,EAAAA,QACC,CAAA,SAAAC,EAAA,KAACC,EAAA,IAAA,CACC,eAAgB,gBAChB,WAAY,SACZ,OAAQ,OAER,SAAA,CAAAD,OAACC,EAAAA,IACC,CAAA,SAAA,CAACC,EAAAA,IAAAC,EAAA,MAAA,CAAM,IAAK,CAAG,CAAA,EACdD,EAAA,IAAAE,EAAA,QAAA,CAAQ,QAAS,KAAO,SAAOP,EAAA,CAAA,EAClC,EACAG,EAAAA,KAACC,EAAAA,IAAI,CAAA,IAAK,EACP,SAAA,CAAAH,EACDI,EAAA,IAACG,EAAA,WAAA,CACC,SAAUC,EAAA,WACV,QAASV,EACT,QAAS,QAAA,CACX,EACAM,EAAAA,IAACC,EAAM,MAAA,CAAA,IAAK,EAAK,CAAA,CAAA,EACnB,CAAA,CAAA,CAEJ,CAAA,CAAA,EChCSI,EAA2BC,gBAEtC,IAA6C,EAElCC,EAAuB,IAEE,CAC9B,MAAAC,EAAIC,aAAWJ,CAAwB,EAC7C,GAAI,CAACG,EACH,MAAM,IAAI,MACR,oFAAA,EAGG,OAAAA,CACT,ECdaE,EAA8BJ,gBAEzC,IAAgD,EAErCK,EAA0B,IAAM,CACrC,MAAAH,EAAIC,aAAWC,CAA2B,EAChD,GAAI,CAACF,EACG,MAAA,IAAI,MAAM,yCAAyC,EAEpD,OAAAA,CACT,ECVaI,EAA6BN,gBAExC,IAAoD,EAEzCO,EAAyB,IAG/B,CACC,MAAAL,EAAIC,aAAWG,CAA0B,EAC/C,GAAI,CAACJ,EACG,MAAA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,EACA,SAAAC,KACG0G,CACL,IAA8D,CAC5D,MAAMpH,EAAWR,IACXS,EAAUP,IAEVqF,EAAUmB,EAAA,QACd,KAAO,CAAE,SAAAlG,EAAU,QAAAC,IACnB,CAACA,EAASD,CAAQ,CAAA,EAEd,CAACqH,EAAcC,CAAe,EAClC7D,WAAgC,WAAW,EAEvC8D,EAAiBrB,EAAAA,QAAQ,IAAMsB,EAAAA,mBAAmBpD,CAAK,EAAG,CAACA,CAAK,CAAC,EAEjEqD,EAAuBtH,EAAA,YAC1BiE,GAAqB,CACNoB,EAAAkC,EAAA,mBAAmBtD,CAAK,EAAGW,CAAO,CAClD,EACA,CAACS,EAAeT,CAAO,CAAA,EAIvB,OAAAlG,EAAA,IAACiC,EAAA,CACC,MAAAL,EACA,SAAAC,EACA,UAAAK,EACA,aAAAtC,EACA,sBAAA0C,EAEA,SAAAtC,EAAA,IAAC0B,MAAI,CAAA,KAAM,EAAG,WAAY,SACxB,SAAA1B,EAAAA,IAAC0B,EAAAA,IAAI,CAAA,WAAY,QAAS,OAAM,GAC9B,SAAA1B,EAAA,IAAC8I,EAAA,kBAAA,CACC,gBAAAL,EACA,aAAAD,EACA,MAAOE,EACP,cAAeE,EACd,GAAGL,CAAA,GAER,CACF,CAAA,CAAA,CAAA,CAGN"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/features/search-filter/components/SearchFilterPanelHeader.tsx","../src/features/search-filter/context/SearchFilterStateContext.ts","../src/features/search-filter/context/SearchFilterDispatchContext.ts","../src/features/search-filter/context/SearchFilterActionsContext.ts","../src/features/search-filter/components/SearchFilterDrawer.tsx","../src/features/search-filter/components/SearchFilterButton.tsx","../src/features/search-filter/components/SearchFilterSection.tsx","../src/features/search-filter/components/StickyFooter.tsx","../src/features/search-filter/context/SearchFilterModelContext.ts","../src/features/search-filter/components/context/SearchFilterContext.tsx","../src/features/search-filter/redux/SearchFilterRedux.ts","../src/features/search-filter/hooks/UseLocalSearchFilterState.ts","../src/features/search-filter/components/context/SearchFilterLocalStateContext.tsx","../src/features/search-filter/features/chips/ChipSpacer.tsx","../src/features/search-filter/features/chips/SearchFilterChips.tsx","../src/features/search-filter/features/chips/EmptyChip.tsx","../src/features/search-filter/features/chips/SearchFilterChip.tsx","../src/features/search-filter/features/chips/SectionChips.tsx","../src/features/search-filter/section-factories/boolean-record/BooleanRecordChips.ts","../src/features/search-filter/section-factories/boolean-record/components/SimpleCheckboxListSection.tsx","../src/features/search-filter/section-factories/boolean-record/components/ChipMultiSelectSection.tsx","../src/features/search-filter/section-factories/date-range/DateRangeChips.ts","../src/features/search-filter/section-factories/date-range/DateRangePropsFactory.ts","../src/features/search-filter/section-factories/date-range/components/DateRangeCalendarSection.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport { FlatButton, stenaTimes } from \"@stenajs-webui/elements\";\nimport { Heading, Row, Space, Spacing } from \"@stenajs-webui/core\";\nimport { cssColor } from \"@stenajs-webui/theme\";\n\ninterface SearchFilterPanelHeaderProps {\n onRequestClose: () => void;\n header?: string;\n contentRight?: ReactNode;\n}\n\nexport const SearchFilterPanelHeader: React.FC<\n SearchFilterPanelHeaderProps\n> = ({ onRequestClose, header = \"Filter\", contentRight }) => {\n return (\n <Spacing\n position={\"sticky\"}\n top={0}\n background={cssColor(\"--lhds-color-ui-50\")}\n zIndex={100}\n >\n <Row\n justifyContent={\"space-between\"}\n alignItems={\"center\"}\n height={\"48px\"}\n >\n <Row>\n <Space num={3} />\n <Heading variant={\"h4\"}>{header}</Heading>\n </Row>\n <Row gap={1}>\n {contentRight}\n <FlatButton\n leftIcon={stenaTimes}\n onClick={onRequestClose}\n variant={\"danger\"}\n />\n <Space num={0.5} />\n </Row>\n </Row>\n </Spacing>\n );\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterState } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterStateContext = createContext<\n SearchFilterState<unknown>\n>(null as unknown as SearchFilterState<unknown>);\n\nexport const useSearchFilterState = <\n TFormModel\n>(): SearchFilterState<TFormModel> => {\n const c = useContext(SearchFilterStateContext);\n if (!c) {\n throw new Error(\n \"Missing search filter context, wrap components with SearchFilterContext component.\"\n );\n }\n return c as SearchFilterState<TFormModel>;\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterDispatch } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterDispatchContext = createContext<\n SearchFilterDispatch<unknown>\n>(null as unknown as SearchFilterDispatch<unknown>);\n\nexport const useSearchFilterDispatch = () => {\n const c = useContext(SearchFilterDispatchContext);\n if (!c) {\n throw new Error(\"Missing search filter dispatch context.\");\n }\n return c;\n};\n","import { createContext, useContext } from \"react\";\nimport { SearchFilterActions } from \"../redux/SearchFilterRedux\";\n\nexport const SearchFilterActionsContext = createContext<\n SearchFilterActions<unknown, any>\n>(null as unknown as SearchFilterActions<unknown, any>);\n\nexport const useSearchFilterActions = <\n TFormModel,\n TSectionKey extends string\n>() => {\n const c = useContext(SearchFilterActionsContext);\n if (!c) {\n throw new Error(\"Missing search filter actions context.\");\n }\n return c as SearchFilterActions<TFormModel, TSectionKey>;\n};\n","import * as React from \"react\";\nimport { ReactNode, useCallback } from \"react\";\nimport { Drawer, DrawerProps } from \"@stenajs-webui/modal\";\nimport { cssColor } from \"@stenajs-webui/theme\";\nimport { Box, Column } from \"@stenajs-webui/core\";\nimport { SearchFilterPanelHeader } from \"./SearchFilterPanelHeader\";\nimport { useSearchFilterState } from \"../context/SearchFilterStateContext\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\n\ninterface SearchFilterDrawerProps\n extends Omit<DrawerProps, \"isOpen\" | \"onRequestClose\"> {\n header?: string;\n headerContentRight?: ReactNode;\n}\n\nexport const SearchFilterDrawer: React.FC<SearchFilterDrawerProps> = ({\n children,\n header,\n headerContentRight,\n ...drawerProps\n}) => {\n const {\n settings: { open },\n } = useSearchFilterState();\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const closeDrawer = useCallback(() => {\n dispatch(actions.closeFilters());\n }, [actions, dispatch]);\n\n return (\n <Drawer\n floating\n isOpen={open}\n onRequestClose={closeDrawer}\n {...drawerProps}\n >\n <Column\n height={\"100%\"}\n borderRadius={\"var(--swui-border-radius)\"}\n background={cssColor(\"--lhds-color-ui-50\")}\n >\n <SearchFilterPanelHeader\n onRequestClose={closeDrawer}\n header={header}\n contentRight={headerContentRight}\n />\n <Box spacing={1} indent={1} gap={1}>\n {children}\n </Box>\n </Column>\n </Drawer>\n );\n};\n","import { SecondaryButton, stenaSlidersMini } from \"@stenajs-webui/elements\";\nimport * as React from \"react\";\nimport { useCallback } from \"react\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\n\ninterface SearchFilterDrawerButtonProps {\n label?: string;\n leftIcon?: IconDefinition;\n}\n\nexport const SearchFilterButton: React.FC<SearchFilterDrawerButtonProps> = ({\n label = \"Filters\",\n leftIcon = stenaSlidersMini,\n}) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickButton = useCallback(() => {\n dispatch(actions.openFilters());\n }, [actions, dispatch]);\n\n return (\n <SecondaryButton\n label={label}\n leftIcon={leftIcon}\n onClick={onClickButton}\n />\n );\n};\n","import * as React from \"react\";\nimport { PropsWithChildren, useCallback } from \"react\";\nimport { Row, Space } from \"@stenajs-webui/core\";\nimport { lowerCase, upperFirst } from \"lodash\";\nimport {\n Banner,\n FlatButton,\n MenuButton,\n Spinner,\n} from \"@stenajs-webui/elements\";\nimport { useSearchFilterState } from \"../context/SearchFilterStateContext\";\nimport { useSearchFilterDispatch } from \"../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../context/SearchFilterActionsContext\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\n\nexport interface SearchFilterSectionProps<TSectionKey extends string> {\n sectionId: TSectionKey;\n label?: string;\n leftIcon?: IconDefinition;\n contentRight?: React.ReactNode;\n disableContentPadding?: boolean;\n loading?: boolean;\n error?: string;\n onRetry?: () => void;\n}\n\nexport const SearchFilterSection = function SearchFilterSection<\n TSectionKey extends string\n>({\n sectionId,\n label,\n loading,\n error,\n onRetry,\n disableContentPadding,\n children,\n leftIcon,\n contentRight,\n}: PropsWithChildren<SearchFilterSectionProps<TSectionKey>>) {\n const state = useSearchFilterState();\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const expanded = state.expandedSections.values[sectionId] ?? false;\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.setSectionExpanded(sectionId, !expanded));\n }, [actions, dispatch, expanded, sectionId]);\n\n const activeLabel = label ?? formatColumnIdToHeaderCellLabel(sectionId);\n\n return (\n <>\n <MenuButton\n label={activeLabel}\n leftIcon={leftIcon}\n expandable\n expanded={expanded}\n selected={expanded}\n onClick={onClickLabel}\n right={contentRight}\n >\n {loading ? (\n <Row spacing justifyContent={\"center\"} flex={1}>\n <Spinner size={\"small\"} />\n </Row>\n ) : error ? (\n <Banner\n variant={\"error\"}\n text={error}\n contentRight={\n onRetry ? <FlatButton label={\"Retry\"} onClick={onRetry} /> : null\n }\n />\n ) : disableContentPadding ? (\n children\n ) : (\n children\n )}\n </MenuButton>\n {expanded && <Space />}\n </>\n );\n};\n\nexport const formatColumnIdToHeaderCellLabel = (columnId: string): string =>\n upperFirst(lowerCase(columnId));\n","import { BoxProps, Column } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { ReactNode } from \"react\";\n\nexport interface StickySearchButtonProps extends Pick<BoxProps, \"gap\"> {\n children?: ReactNode;\n}\n\nexport const StickyFooter: React.FC<StickySearchButtonProps> = ({\n children,\n ...boxProps\n}) => {\n return (\n <Column\n style={{ marginTop: \"auto\" }}\n justifyContent={\"center\"}\n spacing={2}\n indent\n shadow={\"popover\"}\n zIndex={1}\n {...boxProps}\n >\n {children}\n </Column>\n );\n};\n","import { createContext, useContext } from \"react\";\n\nexport const SearchFilterModelContext = createContext<unknown>(null as unknown);\n\nexport const useSearchFilterModel = <TFormModel>(): TFormModel => {\n const c = useContext(SearchFilterModelContext);\n if (!c) {\n throw new Error(\n \"Missing search filter context, wrap components with SearchFilterContext component.\"\n );\n }\n return c as TFormModel;\n};\n","import * as React from \"react\";\nimport { PropsWithChildren } from \"react\";\nimport {\n SearchFilterActions,\n SearchFilterDispatch,\n SearchFilterState,\n} from \"../../redux/SearchFilterRedux\";\nimport { SearchFilterDispatchContext } from \"../../context/SearchFilterDispatchContext\";\nimport { SearchFilterActionsContext } from \"../../context/SearchFilterActionsContext\";\nimport { SearchFilterStateContext } from \"../../context/SearchFilterStateContext\";\nimport { SearchFilterModelContext } from \"../../context/SearchFilterModelContext\";\n\ninterface SearchFilterScopeProps<TFormModel, TSectionKey extends string> {\n state: SearchFilterState<TFormModel>;\n dispatch: SearchFilterDispatch<TFormModel>;\n actions: SearchFilterActions<TFormModel, TSectionKey>;\n}\n\nexport const SearchFilterContext = function SearchFilterScope<\n TFormModel,\n TSectionKey extends string\n>({\n state,\n dispatch,\n actions,\n children,\n}: PropsWithChildren<SearchFilterScopeProps<TFormModel, TSectionKey>>) {\n return (\n <SearchFilterDispatchContext.Provider\n value={dispatch as SearchFilterDispatch<unknown>}\n >\n <SearchFilterActionsContext.Provider value={actions}>\n <SearchFilterStateContext.Provider value={state}>\n <SearchFilterModelContext.Provider value={state.formModel}>\n {children}\n </SearchFilterModelContext.Provider>\n </SearchFilterStateContext.Provider>\n </SearchFilterActionsContext.Provider>\n </SearchFilterDispatchContext.Provider>\n );\n};\n","import { combineReducers } from \"redux\";\nimport {\n createEntityActions,\n createEntityReducer,\n createValueByIdActions,\n createValueByIdReducer,\n EntityAction,\n EntityState,\n reducerIdGate,\n reducerIdGateAction,\n ReducerIdGateAction,\n ValueByIdAction,\n ValueByIdState,\n} from \"@stenajs-webui/redux\";\nimport { Dispatch } from \"react\";\n\nexport interface SearchFilterSettings {\n open: boolean;\n}\n\nexport type SearchFilterDispatch<TFormModel> = Dispatch<\n SearchFilterAction<TFormModel>\n>;\n\nexport interface SearchFilterState<TFormModel> {\n expandedSections: ValueByIdState<boolean>;\n formModel: EntityState<TFormModel>;\n settings: EntityState<SearchFilterSettings>;\n}\n\nexport type SearchFilterAction<TFormModel> =\n | ReducerIdGateAction<ValueByIdAction<boolean>>\n | ReducerIdGateAction<EntityAction<TFormModel>>\n | ReducerIdGateAction<EntityAction<SearchFilterSettings>>;\n\nexport const createSearchFilterInitialState = <TFormModel>(\n initialFormModel: TFormModel\n): SearchFilterState<TFormModel> => ({\n settings: {\n open: false,\n },\n formModel: initialFormModel,\n expandedSections: { values: {} },\n});\n\nexport const createSearchFilterReducer = <TFormModel>(\n reducerId: string,\n initialState: SearchFilterState<TFormModel>\n) =>\n combineReducers({\n expandedSections: reducerIdGate(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdReducer<boolean>(initialState.expandedSections)\n ),\n formModel: reducerIdGate(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityReducer<TFormModel>(initialState.formModel)\n ),\n settings: reducerIdGate(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityReducer<SearchFilterSettings>(initialState.settings)\n ),\n });\n\nexport interface SearchFilterActions<TFormModel, TSectionKey extends string> {\n openFilters: () => SearchFilterAction<TFormModel>;\n closeFilters: () => SearchFilterAction<TFormModel>;\n setFormModelFields: (\n fields: Partial<TFormModel>\n ) => SearchFilterAction<TFormModel>;\n clearFormModel: () => SearchFilterAction<TFormModel>;\n expandSection: (section: TSectionKey) => SearchFilterAction<TFormModel>;\n collapseSection: (section: TSectionKey) => SearchFilterAction<TFormModel>;\n setSectionExpanded: (\n section: TSectionKey,\n expanded: boolean\n ) => SearchFilterAction<TFormModel>;\n clearExpandedSections: () => SearchFilterAction<TFormModel>;\n}\n\nexport const createSearchFilterActions = <\n TFormModel,\n TSectionKey extends string\n>(\n reducerId: string,\n initialFormModel: TFormModel\n): SearchFilterActions<TFormModel, TSectionKey> => ({\n openFilters: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityActions<SearchFilterSettings>().setEntityFields({\n open: true,\n })\n ),\n closeFilters: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"settings\"),\n createEntityActions<SearchFilterSettings>().setEntityFields({\n open: false,\n })\n ),\n setFormModelFields: (fields: Partial<TFormModel>) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityActions<TFormModel>().setEntityFields(fields)\n ),\n clearFormModel: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"formModel\"),\n createEntityActions<TFormModel>().setEntity(initialFormModel)\n ),\n expandSection: (section: TSectionKey) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, true)\n ),\n collapseSection: (section: TSectionKey) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, false)\n ),\n setSectionExpanded: (section: TSectionKey, expanded: boolean) =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().setValue(section, expanded)\n ),\n clearExpandedSections: () =>\n reducerIdGateAction(\n getReducerIdFor(reducerId, \"expandedSections\"),\n createValueByIdActions<boolean>().clearAllValues()\n ),\n});\n\nexport const getReducerIdFor = (\n reducerId: string,\n reducerIdSuffix: keyof SearchFilterState<unknown>\n): string => `${reducerId}.${reducerIdSuffix}`;\n","import {\n createSearchFilterActions,\n createSearchFilterReducer,\n SearchFilterState,\n} from \"../redux/SearchFilterRedux\";\nimport { useReducer, useState } from \"react\";\n\nexport const useLocalSearchFilterState = <\n TFormModel,\n TSectionKey extends string\n>(\n initialState: SearchFilterState<TFormModel>\n) => {\n const [reducer] = useState(() =>\n createSearchFilterReducer<TFormModel>(\"local\", initialState)\n );\n\n const [actions] = useState(() =>\n createSearchFilterActions<TFormModel, TSectionKey>(\n \"local\",\n initialState.formModel\n )\n );\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n return {\n actions,\n state,\n dispatch,\n };\n};\n","import * as React from \"react\";\nimport { PropsWithChildren } from \"react\";\nimport { useLocalSearchFilterState } from \"../../hooks/UseLocalSearchFilterState\";\nimport { SearchFilterContext } from \"./SearchFilterContext\";\nimport { createSearchFilterInitialState } from \"../../redux/SearchFilterRedux\";\n\ninterface SearchFilterLocalScopeProps<TFormModel> {\n initialFormModel: TFormModel;\n}\n\nexport const SearchFilterLocalStateContext = function SearchFilterLocalScope<\n TFormModel\n>({\n initialFormModel,\n children,\n}: PropsWithChildren<SearchFilterLocalScopeProps<TFormModel>>) {\n const { state, actions, dispatch } = useLocalSearchFilterState(\n createSearchFilterInitialState(initialFormModel)\n );\n\n return (\n <SearchFilterContext state={state} actions={actions} dispatch={dispatch}>\n {children}\n </SearchFilterContext>\n );\n};\n","import styled from \"@emotion/styled\";\n\nexport const ChipSpacer = styled.div`\n padding: calc(var(--swui-metrics-spacing) / 2)\n calc(var(--swui-metrics-indent) / 2);\n`;\n","import * as React from \"react\";\nimport { ReactNode, useCallback } from \"react\";\nimport { Row } from \"@stenajs-webui/core\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { FlatButton } from \"@stenajs-webui/elements\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\n\ninterface SearchFilterChipsProps {\n disableClearAllButton?: boolean;\n children?: ReactNode;\n}\n\nexport const SearchFilterChips: React.FC<SearchFilterChipsProps> = ({\n children,\n disableClearAllButton = false,\n}) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickClearAll = useCallback(\n () => dispatch(actions.clearFormModel()),\n [actions, dispatch]\n );\n\n return (\n <Row flexWrap={\"wrap\"}>\n {children}\n {!disableClearAllButton && (\n <ChipSpacer>\n <FlatButton\n size={\"small\"}\n label={\"Clear all\"}\n onClick={onClickClearAll}\n />\n </ChipSpacer>\n )}\n </Row>\n );\n};\n","import * as React from \"react\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { Chip } from \"@stenajs-webui/elements\";\nimport { useCallback } from \"react\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\n\ninterface EmptyChipProps<TSectionKey extends string> {\n sectionId: TSectionKey;\n label: string;\n}\n\nexport const EmptyChip = function EmptyChip<TSectionKey extends string>({\n label,\n sectionId,\n}: EmptyChipProps<TSectionKey>) {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.clearExpandedSections());\n dispatch(actions.expandSection(sectionId));\n dispatch(actions.openFilters());\n }, [actions, dispatch, sectionId]);\n\n return (\n <ChipSpacer>\n <Chip label={label} variant={\"secondary\"} onClick={onClickLabel} />\n </ChipSpacer>\n );\n};\n","import * as React from \"react\";\nimport { useCallback } from \"react\";\nimport { ChipSpacer } from \"./ChipSpacer\";\nimport { Chip } from \"@stenajs-webui/elements\";\nimport { useSearchFilterDispatch } from \"../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../context/SearchFilterActionsContext\";\nimport { SearchFilterSectionOnClickRemoveOnChip } from \"../../config/SearchFilterConfig\";\n\ninterface SearchFilterChipProps<TFormModel, TSectionKey> {\n sectionId: TSectionKey;\n label: string;\n value: string;\n onClickRemove?: SearchFilterSectionOnClickRemoveOnChip<TFormModel>;\n}\n\nexport const SearchFilterChip = function SearchFilterChip<\n TFormModel,\n TSectionKey extends string\n>({\n sectionId,\n label,\n value,\n onClickRemove,\n}: SearchFilterChipProps<TFormModel, TSectionKey>) {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions();\n\n const setFormModelFields = useCallback(\n (fields: Partial<TFormModel>) =>\n dispatch(actions.setFormModelFields(fields)),\n [dispatch, actions]\n );\n\n const onClickRemoveHandler = useCallback(() => {\n onClickRemove?.({ value, setFormModelFields });\n }, [onClickRemove, setFormModelFields, value]);\n\n const onClickLabel = useCallback(() => {\n dispatch(actions.clearExpandedSections());\n dispatch(actions.expandSection(sectionId));\n dispatch(actions.openFilters());\n }, [actions, dispatch, sectionId]);\n\n return (\n <ChipSpacer>\n <Chip\n label={label ?? sectionId}\n onClick={onClickLabel}\n onClickRemove={onClickRemove ? onClickRemoveHandler : undefined}\n />\n </ChipSpacer>\n );\n};\n","import * as React from \"react\";\nimport {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { EmptyChip } from \"./EmptyChip\";\nimport { SearchFilterChip } from \"./SearchFilterChip\";\n\nexport interface SectionChipsProps<TFormModel, TSectionKey extends string> {\n sectionId: TSectionKey;\n chips?: Array<SearchFilterSectionChipModel>;\n emptyChipLabel?: string;\n onClickRemoveOnChip?: SearchFilterSectionOnClickRemoveOnChip<TFormModel>;\n}\n\nexport const SectionChips = function SectionChips<\n TFormModel,\n TSectionKey extends string\n>({\n sectionId,\n chips,\n emptyChipLabel,\n onClickRemoveOnChip,\n}: SectionChipsProps<TFormModel, TSectionKey>) {\n if (!chips?.length) {\n if (!emptyChipLabel) {\n return null;\n }\n return <EmptyChip sectionId={sectionId} label={emptyChipLabel} />;\n }\n\n return (\n <>\n {chips.map(({ label, value }) => (\n <SearchFilterChip\n key={value}\n label={label ?? sectionId}\n sectionId={sectionId}\n onClickRemove={onClickRemoveOnChip}\n value={value}\n />\n ))}\n </>\n );\n};\n","import { BooleanRecord, BooleanRecordOptions } from \"./BooleanRecordTypes\";\nimport {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { PickByValue, truthyKeysAsList } from \"@stenajs-webui/core\";\nimport { SectionChipsProps } from \"../../features/chips/SectionChips\";\n\nexport const createChipsPropsForBooleanRecord = <\n TFormModel,\n TSectionKey extends string,\n TField extends keyof PickByValue<TFormModel, BooleanRecord>\n>(\n formModel: TFormModel,\n fieldName: TField,\n options?: BooleanRecordOptions\n): Pick<\n SectionChipsProps<TFormModel, TSectionKey>,\n \"chips\" | \"onClickRemoveOnChip\"\n> => ({\n chips: createChipsForBooleanRecord(\n formModel[fieldName] as unknown as BooleanRecord,\n options\n ),\n onClickRemoveOnChip: createOnClickRemoveOnChipForBooleanRecord(\n formModel,\n fieldName\n ),\n});\n\nexport const createChipsForBooleanRecord = (\n booleanRecord: BooleanRecord,\n options?: BooleanRecordOptions\n): Array<SearchFilterSectionChipModel> =>\n truthyKeysAsList(booleanRecord).map((key) => {\n const option = options?.find((o) => o.value === key);\n return { value: key, label: option?.label ?? key };\n });\n\nexport const createOnClickRemoveOnChipForBooleanRecord = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, BooleanRecord>\n>(\n formModel: TFormModel,\n fieldName: TField\n): SearchFilterSectionOnClickRemoveOnChip<TFormModel> => {\n return ({ setFormModelFields, value }) => {\n const newRecord = { ...formModel[fieldName] };\n newRecord[value] = false;\n setFormModelFields({\n [fieldName]: newRecord,\n } as unknown as Partial<TFormModel>);\n };\n};\n","import * as React from \"react\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport { Column, Row } from \"@stenajs-webui/core\";\nimport {\n CheckboxWithLabel,\n ValueAndOnValueChangeProps,\n} from \"@stenajs-webui/forms\";\nimport { BooleanRecord, BooleanRecordOptions } from \"../BooleanRecordTypes\";\n\nexport interface SimpleCheckboxSectionProps<TSectionKey extends string>\n extends SearchFilterSectionProps<TSectionKey>,\n ValueAndOnValueChangeProps<BooleanRecord> {\n options?: BooleanRecordOptions;\n}\n\nexport const SimpleCheckboxListSection = <TSectionKey extends string>({\n options,\n value,\n onValueChange,\n ...sectionProps\n}: SimpleCheckboxSectionProps<TSectionKey>): React.ReactElement => (\n <SearchFilterSection disableContentPadding {...sectionProps}>\n <Column maxHeight={\"400px\"} overflowY={\"auto\"} flex={1} gap={1} spacing={1}>\n {options?.map((d) => (\n <Row key={d.value} alignItems={\"center\"}>\n <CheckboxWithLabel\n tabIndex={-1}\n value={value?.[d.value]}\n label={d.label}\n onValueChange={(v) =>\n onValueChange?.({\n ...value,\n [d.value]: v,\n })\n }\n />\n </Row>\n ))}\n </Column>\n </SearchFilterSection>\n);\n","import * as React from \"react\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport { ValueAndOnValueChangeProps } from \"@stenajs-webui/forms\";\nimport { BooleanRecord, BooleanRecordOptions } from \"../BooleanRecordTypes\";\nimport { ChipMultiSelect, ChipMultiSelectValue } from \"@stenajs-webui/select\";\nimport { truthyKeysAsList } from \"@stenajs-webui/core\";\n\ninterface ChipMultiSelectSectionProps<TSectionKey extends string>\n extends SearchFilterSectionProps<TSectionKey>,\n ValueAndOnValueChangeProps<BooleanRecord> {\n noneSelectedLabel?: string;\n options?: BooleanRecordOptions;\n}\n\nexport const ChipMultiSelectSection = <TSectionKey extends string>({\n options,\n value,\n noneSelectedLabel,\n onValueChange,\n ...sectionProps\n}: ChipMultiSelectSectionProps<TSectionKey>): React.ReactElement => {\n const [text, setText] = useState<string>(\"\");\n\n const listValue = useMemo<Array<ChipMultiSelectValue>>(\n () =>\n value\n ? truthyKeysAsList(value).map<ChipMultiSelectValue>((key) => {\n const option = options?.find((o) => o.value === key);\n return { value: key, label: option?.label ?? key };\n })\n : [],\n [options, value]\n );\n\n const filteredOptions = useMemo(() => {\n return options?.filter(\n (p) =>\n p.value.toLocaleLowerCase().indexOf(text.toLocaleLowerCase()) > -1 ||\n p.label.toLocaleLowerCase().indexOf(text.toLocaleLowerCase()) > -1\n );\n }, [options, text]);\n\n const onValueChangeInternal = useCallback(\n (value: Array<ChipMultiSelectValue>) => {\n onValueChange?.(createBooleanRecordFromValue(value));\n },\n [onValueChange]\n );\n\n return (\n <SearchFilterSection {...sectionProps}>\n <ChipMultiSelect\n options={filteredOptions}\n value={listValue}\n onValueChange={onValueChangeInternal}\n inputValue={text}\n noneSelectedLabel={noneSelectedLabel}\n onInputChange={setText}\n closeMenuOnSelect={false}\n />\n </SearchFilterSection>\n );\n};\n\nconst createBooleanRecordFromValue = (\n value: Array<ChipMultiSelectValue>\n): BooleanRecord => {\n return value.reduce<BooleanRecord>((sum, item) => {\n sum[item.value] = true;\n return sum;\n }, {});\n};\n","import {\n SearchFilterSectionChipModel,\n SearchFilterSectionOnClickRemoveOnChip,\n} from \"../../config/SearchFilterConfig\";\nimport { PickByValue } from \"@stenajs-webui/core\";\nimport { SectionChipsProps } from \"../../features/chips/SectionChips\";\n\nexport const createChipsPropsForDateRange = <\n TFormModel,\n TSectionKey extends string,\n TField extends keyof PickByValue<TFormModel, string | undefined>\n>(\n formModel: TFormModel,\n startDateFieldName: TField,\n endDateFieldName: TField\n): Pick<\n SectionChipsProps<TFormModel, TSectionKey>,\n \"chips\" | \"onClickRemoveOnChip\"\n> => ({\n chips: createChipsForDateRange(\n formModel[startDateFieldName] as unknown as string | undefined,\n formModel[endDateFieldName] as unknown as string | undefined\n ),\n onClickRemoveOnChip: createOnClickRemoveOnChipForDateRange(\n startDateFieldName,\n endDateFieldName\n ),\n});\n\nexport const createChipsForDateRange = (\n startDate: string | undefined,\n endDate: string | undefined\n): Array<SearchFilterSectionChipModel> => {\n if (!startDate && !endDate) {\n return [];\n }\n return [\n { value: \"dateRange\", label: `${startDate ?? \"\"} - ${endDate ?? \"\"}` },\n ];\n};\n\nexport const createOnClickRemoveOnChipForDateRange = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, string | undefined>\n>(\n startDateFieldName: TField,\n endDateFieldName: TField\n): SearchFilterSectionOnClickRemoveOnChip<TFormModel> => {\n return ({ setFormModelFields }) => {\n setFormModelFields({\n [startDateFieldName]: undefined,\n [endDateFieldName]: undefined,\n } as unknown as Partial<TFormModel>);\n };\n};\n","import { PickByValue } from \"@stenajs-webui/core\";\nimport { DateRangeCalendarSectionProps } from \"./components/DateRangeCalendarSection\";\n\nexport const createDateRangeSectionProps = <\n TFormModel,\n TField extends keyof PickByValue<TFormModel, string | undefined>,\n TSectionKey extends string\n>(\n formModel: TFormModel,\n startDateFieldName: TField,\n endDateFieldName: TField\n): Pick<\n DateRangeCalendarSectionProps<TFormModel, TSectionKey>,\n \"value\" | \"onValueChange\"\n> => ({\n value: {\n startDate: formModel[startDateFieldName] as unknown as string | undefined,\n endDate: formModel[endDateFieldName] as unknown as string | undefined,\n },\n onValueChange: (value, { dispatch, actions }) => {\n const fields: Partial<TFormModel> = {\n [startDateFieldName]: value.startDate,\n [endDateFieldName]: value.endDate,\n } as any;\n dispatch(actions.setFormModelFields(fields));\n },\n});\n","import {\n DateRange,\n DateRangeCalendar,\n DateRangeCalendarProps,\n DateRangeFocusedInput,\n dateRangeToStrings,\n DateStringRange,\n stringsToDateRange,\n} from \"@stenajs-webui/calendar\";\nimport * as React from \"react\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport { Box } from \"@stenajs-webui/core\";\nimport {\n SearchFilterSection,\n SearchFilterSectionProps,\n} from \"../../../components/SearchFilterSection\";\nimport {\n SearchFilterActions,\n SearchFilterDispatch,\n} from \"../../../redux/SearchFilterRedux\";\nimport { useSearchFilterDispatch } from \"../../../context/SearchFilterDispatchContext\";\nimport { useSearchFilterActions } from \"../../../context/SearchFilterActionsContext\";\n\nexport interface DateRangeCalendarSectionProps<\n TFormModel,\n TSectionKey extends string\n> extends Omit<\n SearchFilterSectionProps<TSectionKey>,\n \"label\" | \"onRetry\" | \"error\" | \"loading\"\n >,\n Omit<\n DateRangeCalendarProps<{}>,\n \"value\" | \"onValueChange\" | \"focusedInput\" | \"setFocusedInput\"\n > {\n value: DateStringRange;\n onValueChange: (\n value: DateStringRange,\n options: SetDateOptions<TFormModel, TSectionKey>\n ) => void;\n label?: string;\n}\n\nexport interface SetDateOptions<TFormModel, TSectionKey extends string> {\n dispatch: SearchFilterDispatch<TFormModel>;\n actions: SearchFilterActions<TFormModel, TSectionKey>;\n}\n\nexport const DateRangeCalendarSection = <\n TFormModel,\n TSectionKey extends string\n>({\n value,\n onValueChange,\n sectionId,\n contentRight,\n disableContentPadding,\n label,\n leftIcon,\n ...dateRangeCalendarProps\n}: DateRangeCalendarSectionProps<TFormModel, TSectionKey>) => {\n const dispatch = useSearchFilterDispatch();\n const actions = useSearchFilterActions<TFormModel, TSectionKey>();\n\n const options = useMemo<SetDateOptions<TFormModel, TSectionKey>>(\n () => ({ dispatch, actions }),\n [actions, dispatch]\n );\n const [focusedInput, setFocusedInput] =\n useState<DateRangeFocusedInput>(\"startDate\");\n\n const dateRangeValue = useMemo(() => stringsToDateRange(value), [value]);\n\n const onValueChangeHandler = useCallback(\n (value: DateRange) => {\n onValueChange(dateRangeToStrings(value), options);\n },\n [onValueChange, options]\n );\n\n return (\n <SearchFilterSection\n label={label}\n leftIcon={leftIcon}\n sectionId={sectionId}\n contentRight={contentRight}\n disableContentPadding={disableContentPadding}\n >\n <Box flex={1} alignItems={\"center\"}>\n <Box background={\"white\"} indent>\n <DateRangeCalendar\n setFocusedInput={setFocusedInput}\n focusedInput={focusedInput}\n value={dateRangeValue}\n onValueChange={onValueChangeHandler}\n {...dateRangeCalendarProps}\n />\n </Box>\n </Box>\n </SearchFilterSection>\n );\n};\n"],"names":["SearchFilterPanelHeader","onRequestClose","header","contentRight","jsx","Spacing","cssColor","jsxs","Row","Space","Heading","FlatButton","stenaTimes","SearchFilterStateContext","createContext","useSearchFilterState","c","useContext","SearchFilterDispatchContext","useSearchFilterDispatch","SearchFilterActionsContext","useSearchFilterActions","SearchFilterDrawer","children","headerContentRight","drawerProps","open","dispatch","actions","closeDrawer","useCallback","Drawer","Column","Box","SearchFilterButton","label","leftIcon","stenaSlidersMini","onClickButton","SecondaryButton","SearchFilterSection","sectionId","loading","error","onRetry","disableContentPadding","state","expanded","_a","onClickLabel","activeLabel","formatColumnIdToHeaderCellLabel","Fragment","MenuButton","Spinner","Banner","columnId","upperFirst","lowerCase","StickyFooter","boxProps","SearchFilterModelContext","useSearchFilterModel","SearchFilterContext","createSearchFilterInitialState","initialFormModel","createSearchFilterReducer","reducerId","initialState","combineReducers","reducerIdGate","getReducerIdFor","createValueByIdReducer","createEntityReducer","createSearchFilterActions","reducerIdGateAction","createEntityActions","fields","section","createValueByIdActions","reducerIdSuffix","useLocalSearchFilterState","reducer","useState","useReducer","SearchFilterLocalStateContext","ChipSpacer","styled","SearchFilterChips","disableClearAllButton","onClickClearAll","EmptyChip","Chip","SearchFilterChip","value","onClickRemove","setFormModelFields","onClickRemoveHandler","SectionChips","chips","emptyChipLabel","onClickRemoveOnChip","createChipsPropsForBooleanRecord","formModel","fieldName","options","createChipsForBooleanRecord","createOnClickRemoveOnChipForBooleanRecord","booleanRecord","truthyKeysAsList","key","option","newRecord","SimpleCheckboxListSection","onValueChange","sectionProps","d","CheckboxWithLabel","v","ChipMultiSelectSection","noneSelectedLabel","text","setText","listValue","useMemo","o","filteredOptions","p","onValueChangeInternal","createBooleanRecordFromValue","ChipMultiSelect","sum","item","createChipsPropsForDateRange","startDateFieldName","endDateFieldName","createChipsForDateRange","createOnClickRemoveOnChipForDateRange","startDate","endDate","createDateRangeSectionProps","DateRangeCalendarSection","dateRangeCalendarProps","focusedInput","setFocusedInput","dateRangeValue","stringsToDateRange","onValueChangeHandler","dateRangeToStrings","DateRangeCalendar"],"mappings":"8jBAYaA,EAET,CAAC,CAAE,eAAAC,EAAgB,OAAAC,EAAS,SAAU,aAAAC,KAEtCC,EAAA,IAACC,EAAA,QAAA,CACC,SAAU,SACV,IAAK,EACL,WAAYC,WAAS,oBAAoB,EACzC,OAAQ,IAER,SAAAC,EAAA,KAACC,EAAA,IAAA,CACC,eAAgB,gBAChB,WAAY,SACZ,OAAQ,OAER,SAAA,CAAAD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,CAAK,EAAGW,CAAO,CAClD,EACA,CAACS,EAAeT,CAAO,CAAA,EAIvB,OAAArG,EAAA,IAACoC,EAAA,CACC,MAAAL,EACA,SAAAC,EACA,UAAAK,EACA,aAAAtC,EACA,sBAAA0C,EAEA,SAAAzC,EAAA,IAAC6B,MAAI,CAAA,KAAM,EAAG,WAAY,SACxB,SAAA7B,EAAAA,IAAC6B,EAAAA,IAAI,CAAA,WAAY,QAAS,OAAM,GAC9B,SAAA7B,EAAA,IAACiJ,EAAA,kBAAA,CACC,gBAAAL,EACA,aAAAD,EACA,MAAOE,EACP,cAAeE,EACd,GAAGL,CAAA,GAER,CACF,CAAA,CAAA,CAAA,CAGN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stenajs-webui/filter",
|
|
3
|
-
"version": "19.0.0-next.
|
|
3
|
+
"version": "19.0.0-next.13",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "mattias800",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"deploy": "gh-pages -d example/build"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@stenajs-webui/calendar": "19.0.0-next.
|
|
30
|
-
"@stenajs-webui/core": "19.0.0-next.
|
|
31
|
-
"@stenajs-webui/elements": "19.0.0-next.
|
|
32
|
-
"@stenajs-webui/forms": "19.0.0-next.
|
|
33
|
-
"@stenajs-webui/modal": "19.0.0-next.
|
|
34
|
-
"@stenajs-webui/panels": "19.0.0-next.
|
|
35
|
-
"@stenajs-webui/redux": "19.0.0-next.
|
|
36
|
-
"@stenajs-webui/select": "19.0.0-next.
|
|
37
|
-
"@stenajs-webui/theme": "19.0.0-next.
|
|
29
|
+
"@stenajs-webui/calendar": "19.0.0-next.13",
|
|
30
|
+
"@stenajs-webui/core": "19.0.0-next.13",
|
|
31
|
+
"@stenajs-webui/elements": "19.0.0-next.13",
|
|
32
|
+
"@stenajs-webui/forms": "19.0.0-next.13",
|
|
33
|
+
"@stenajs-webui/modal": "19.0.0-next.13",
|
|
34
|
+
"@stenajs-webui/panels": "19.0.0-next.13",
|
|
35
|
+
"@stenajs-webui/redux": "19.0.0-next.13",
|
|
36
|
+
"@stenajs-webui/select": "19.0.0-next.13",
|
|
37
|
+
"@stenajs-webui/theme": "19.0.0-next.13",
|
|
38
38
|
"date-fns": "2.26.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"files": [
|
|
66
66
|
"dist"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "55e05b5f7db76c2114582b386d1dd807c20ff7de"
|
|
69
69
|
}
|