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