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