@topgrid/grid-features 0.3.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/LICENSE +21 -0
- package/README.md +85 -0
- package/dist/index.cjs +835 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +655 -0
- package/dist/index.d.ts +655 -0
- package/dist/index.mjs +797 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +54 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,835 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var gridCore = require('@topgrid/grid-core');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var reactTable = require('@tanstack/react-table');
|
|
7
|
+
var dateFns = require('date-fns');
|
|
8
|
+
var DatePicker = require('react-datepicker');
|
|
9
|
+
var locale = require('date-fns/locale');
|
|
10
|
+
|
|
11
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var DatePicker__default = /*#__PURE__*/_interopDefault(DatePicker);
|
|
14
|
+
|
|
15
|
+
// src/column-drag/useColumnDrag.ts
|
|
16
|
+
|
|
17
|
+
// src/multi-sort/useMultiSort.ts
|
|
18
|
+
function useMultiSort(opts) {
|
|
19
|
+
const enableMultiSort = opts?.enableMultiSort ?? false;
|
|
20
|
+
const result = {
|
|
21
|
+
enableMultiSort,
|
|
22
|
+
isMultiSortEvent: (e) => {
|
|
23
|
+
if (e !== null && typeof e === "object" && "shiftKey" in e) {
|
|
24
|
+
return e.shiftKey === true;
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
if (opts?.maxMultiSortColCount !== void 0) {
|
|
30
|
+
result.maxMultiSortColCount = opts.maxMultiSortColCount;
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
function FilterPopover({ trigger, children, align = "left" }) {
|
|
35
|
+
const [open, setOpen] = react.useState(false);
|
|
36
|
+
const containerRef = react.useRef(null);
|
|
37
|
+
const triggerRef = react.useRef(null);
|
|
38
|
+
const contentRef = react.useRef(null);
|
|
39
|
+
react.useEffect(() => {
|
|
40
|
+
if (!open) return;
|
|
41
|
+
const handleMouseDown = (e) => {
|
|
42
|
+
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
43
|
+
setOpen(false);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
document.addEventListener("mousedown", handleMouseDown);
|
|
47
|
+
return () => {
|
|
48
|
+
document.removeEventListener("mousedown", handleMouseDown);
|
|
49
|
+
};
|
|
50
|
+
}, [open]);
|
|
51
|
+
react.useEffect(() => {
|
|
52
|
+
if (!open) return;
|
|
53
|
+
const handleKeyDown = (e) => {
|
|
54
|
+
if (e.key === "Escape") {
|
|
55
|
+
setOpen(false);
|
|
56
|
+
const btn = triggerRef.current?.querySelector("button");
|
|
57
|
+
btn?.focus();
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
61
|
+
return () => {
|
|
62
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
63
|
+
};
|
|
64
|
+
}, [open]);
|
|
65
|
+
react.useEffect(() => {
|
|
66
|
+
if (!open) return;
|
|
67
|
+
const id = setTimeout(() => {
|
|
68
|
+
const firstInput = contentRef.current?.querySelector("input, select");
|
|
69
|
+
firstInput?.focus();
|
|
70
|
+
}, 0);
|
|
71
|
+
return () => clearTimeout(id);
|
|
72
|
+
}, [open]);
|
|
73
|
+
const handleToggle = react.useCallback(() => {
|
|
74
|
+
setOpen((prev) => !prev);
|
|
75
|
+
}, []);
|
|
76
|
+
const alignClass = align === "right" ? "right-0" : "left-0";
|
|
77
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: "relative inline-block", children: [
|
|
78
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
79
|
+
"span",
|
|
80
|
+
{
|
|
81
|
+
ref: triggerRef,
|
|
82
|
+
onClick: handleToggle,
|
|
83
|
+
className: "inline-flex",
|
|
84
|
+
children: trigger
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
open && /* @__PURE__ */ jsxRuntime.jsx(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
ref: contentRef,
|
|
91
|
+
role: "dialog",
|
|
92
|
+
"aria-label": "\uD14D\uC2A4\uD2B8 \uD544\uD130",
|
|
93
|
+
"aria-modal": "false",
|
|
94
|
+
className: `absolute top-full mt-1 ${alignClass} z-[50] min-w-[220px] overflow-hidden rounded border border-gray-200 bg-white shadow-lg`,
|
|
95
|
+
children
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] });
|
|
99
|
+
}
|
|
100
|
+
function FilterIndicator({ isFiltered }) {
|
|
101
|
+
if (!isFiltered) return null;
|
|
102
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
103
|
+
"span",
|
|
104
|
+
{
|
|
105
|
+
"aria-label": "\uD544\uD130 \uD65C\uC131",
|
|
106
|
+
"aria-hidden": "false",
|
|
107
|
+
className: "inline-block w-2 h-2 rounded-full bg-blue-500 flex-shrink-0"
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
function FunnelIcon() {
|
|
112
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
113
|
+
"svg",
|
|
114
|
+
{
|
|
115
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
116
|
+
viewBox: "0 0 20 20",
|
|
117
|
+
fill: "currentColor",
|
|
118
|
+
"aria-hidden": "true",
|
|
119
|
+
className: "w-4 h-4",
|
|
120
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
121
|
+
"path",
|
|
122
|
+
{
|
|
123
|
+
fillRule: "evenodd",
|
|
124
|
+
d: "M2.628 1.601C5.028 1.206 7.49 1 10 1s4.973.206 7.372.601a.75.75 0 0 1 .628.74v2.288a2.25 2.25 0 0 1-.659 1.59l-4.682 4.683a2.25 2.25 0 0 0-.659 1.59v3.037c0 .684-.31 1.33-.844 1.757l-1.937 1.55A.75.75 0 0 1 9 18.25v-5.757a2.25 2.25 0 0 0-.659-1.591L3.659 6.22A2.25 2.25 0 0 1 3 4.629V2.34a.75.75 0 0 1 .628-.74z",
|
|
125
|
+
clipRule: "evenodd"
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
function TextFilter({
|
|
132
|
+
column,
|
|
133
|
+
defaultOperator,
|
|
134
|
+
popoverAlign
|
|
135
|
+
}) {
|
|
136
|
+
const currentValue = column.getFilterValue();
|
|
137
|
+
const [operator, setOperator] = react.useState(
|
|
138
|
+
currentValue?.operator ?? defaultOperator ?? "contains"
|
|
139
|
+
);
|
|
140
|
+
const [inputValue, setInputValue] = react.useState(currentValue?.value ?? "");
|
|
141
|
+
react.useEffect(() => {
|
|
142
|
+
const timer = setTimeout(() => {
|
|
143
|
+
if (inputValue.trim() === "") {
|
|
144
|
+
column.setFilterValue(void 0);
|
|
145
|
+
} else {
|
|
146
|
+
column.setFilterValue({ operator, value: inputValue });
|
|
147
|
+
}
|
|
148
|
+
}, 300);
|
|
149
|
+
return () => clearTimeout(timer);
|
|
150
|
+
}, [inputValue, operator, column]);
|
|
151
|
+
const handleClear = () => {
|
|
152
|
+
setInputValue("");
|
|
153
|
+
setOperator(defaultOperator ?? "contains");
|
|
154
|
+
column.setFilterValue(void 0);
|
|
155
|
+
};
|
|
156
|
+
const handleOperatorChange = (e) => {
|
|
157
|
+
setOperator(e.target.value);
|
|
158
|
+
};
|
|
159
|
+
const handleInputChange = (e) => {
|
|
160
|
+
setInputValue(e.target.value);
|
|
161
|
+
};
|
|
162
|
+
const alignProp = popoverAlign !== void 0 ? { align: popoverAlign } : {};
|
|
163
|
+
const isFiltered = column.getIsFiltered();
|
|
164
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-0.5", children: [
|
|
165
|
+
/* @__PURE__ */ jsxRuntime.jsx(FilterIndicator, { isFiltered }),
|
|
166
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
167
|
+
FilterPopover,
|
|
168
|
+
{
|
|
169
|
+
trigger: /* @__PURE__ */ jsxRuntime.jsx(
|
|
170
|
+
"button",
|
|
171
|
+
{
|
|
172
|
+
type: "button",
|
|
173
|
+
"aria-label": "\uD544\uD130",
|
|
174
|
+
"aria-pressed": isFiltered,
|
|
175
|
+
className: "inline-flex items-center justify-center w-5 h-5 rounded text-gray-400 hover:text-blue-500 hover:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-blue-400 transition-colors",
|
|
176
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(FunnelIcon, {})
|
|
177
|
+
}
|
|
178
|
+
),
|
|
179
|
+
...alignProp,
|
|
180
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 space-y-2", children: [
|
|
181
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
182
|
+
"select",
|
|
183
|
+
{
|
|
184
|
+
"aria-label": "\uC5F0\uC0B0\uC790",
|
|
185
|
+
value: operator,
|
|
186
|
+
onChange: handleOperatorChange,
|
|
187
|
+
className: "w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-400 bg-white",
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "contains", children: "\uD3EC\uD568" }),
|
|
190
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "equals", children: "\uAC19\uC74C" }),
|
|
191
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "startsWith", children: "\uC2DC\uC791" }),
|
|
192
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "endsWith", children: "\uB05D" })
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
),
|
|
196
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
197
|
+
"input",
|
|
198
|
+
{
|
|
199
|
+
type: "text",
|
|
200
|
+
"aria-label": "\uD544\uD130 \uAC12",
|
|
201
|
+
value: inputValue,
|
|
202
|
+
onChange: handleInputChange,
|
|
203
|
+
placeholder: "\uAC12 \uC785\uB825...",
|
|
204
|
+
className: "w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-400"
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
208
|
+
"button",
|
|
209
|
+
{
|
|
210
|
+
type: "button",
|
|
211
|
+
onClick: handleClear,
|
|
212
|
+
className: "w-full px-2 py-1 text-xs text-gray-600 border border-gray-200 rounded hover:bg-gray-50 hover:text-gray-900 transition-colors",
|
|
213
|
+
children: "\uCD08\uAE30\uD654"
|
|
214
|
+
}
|
|
215
|
+
)
|
|
216
|
+
] })
|
|
217
|
+
}
|
|
218
|
+
)
|
|
219
|
+
] });
|
|
220
|
+
}
|
|
221
|
+
var textFilterFn = (row, columnId, filterValue) => {
|
|
222
|
+
const rawCell = row.getValue(columnId);
|
|
223
|
+
if (rawCell == null) return false;
|
|
224
|
+
const cellStr = String(rawCell).toLowerCase();
|
|
225
|
+
const filterStr = filterValue.value.trim().toLowerCase();
|
|
226
|
+
if (filterStr === "") return true;
|
|
227
|
+
switch (filterValue.operator) {
|
|
228
|
+
case "contains":
|
|
229
|
+
return cellStr.includes(filterStr);
|
|
230
|
+
case "equals":
|
|
231
|
+
return cellStr === filterStr;
|
|
232
|
+
case "startsWith":
|
|
233
|
+
return cellStr.startsWith(filterStr);
|
|
234
|
+
case "endsWith":
|
|
235
|
+
return cellStr.endsWith(filterStr);
|
|
236
|
+
default: {
|
|
237
|
+
const _exhaustive = filterValue.operator;
|
|
238
|
+
return _exhaustive;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
textFilterFn.autoRemove = (val) => !val || val.value.trim() === "";
|
|
243
|
+
var numberFilterFn = (row, columnId, filterValue) => {
|
|
244
|
+
const rawCell = row.getValue(columnId);
|
|
245
|
+
if (rawCell == null) return false;
|
|
246
|
+
const cell = Number(rawCell);
|
|
247
|
+
if (isNaN(cell)) return false;
|
|
248
|
+
const { operator, value, min, max } = filterValue;
|
|
249
|
+
switch (operator) {
|
|
250
|
+
case "=":
|
|
251
|
+
return value !== void 0 && !isNaN(value) ? cell === value : true;
|
|
252
|
+
case "!=":
|
|
253
|
+
return value !== void 0 && !isNaN(value) ? cell !== value : true;
|
|
254
|
+
case ">":
|
|
255
|
+
return value !== void 0 && !isNaN(value) ? cell > value : true;
|
|
256
|
+
case "<":
|
|
257
|
+
return value !== void 0 && !isNaN(value) ? cell < value : true;
|
|
258
|
+
case ">=":
|
|
259
|
+
return value !== void 0 && !isNaN(value) ? cell >= value : true;
|
|
260
|
+
case "<=":
|
|
261
|
+
return value !== void 0 && !isNaN(value) ? cell <= value : true;
|
|
262
|
+
case "between": {
|
|
263
|
+
const minOk = min !== void 0 && !isNaN(min) ? cell >= min : true;
|
|
264
|
+
const maxOk = max !== void 0 && !isNaN(max) ? cell <= max : true;
|
|
265
|
+
return minOk && maxOk;
|
|
266
|
+
}
|
|
267
|
+
default: {
|
|
268
|
+
const _exhaustive = operator;
|
|
269
|
+
return _exhaustive;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
numberFilterFn.autoRemove = (val) => {
|
|
274
|
+
if (!val) return true;
|
|
275
|
+
if (val.operator === "between") {
|
|
276
|
+
return (val.min === void 0 || isNaN(val.min)) && (val.max === void 0 || isNaN(val.max));
|
|
277
|
+
}
|
|
278
|
+
return val.value === void 0 || isNaN(val.value);
|
|
279
|
+
};
|
|
280
|
+
var dateRangeFilterFn = (row, columnId, filterValue) => {
|
|
281
|
+
const rawCell = row.getValue(columnId);
|
|
282
|
+
if (rawCell == null) return false;
|
|
283
|
+
const cellDate = new Date(rawCell);
|
|
284
|
+
if (isNaN(cellDate.getTime())) return false;
|
|
285
|
+
const { from, to } = filterValue;
|
|
286
|
+
if (from === void 0 && to === void 0) return true;
|
|
287
|
+
if (from !== void 0 && to === void 0) {
|
|
288
|
+
return cellDate >= dateFns.startOfDay(from);
|
|
289
|
+
}
|
|
290
|
+
if (from === void 0 && to !== void 0) {
|
|
291
|
+
return cellDate <= dateFns.endOfDay(to);
|
|
292
|
+
}
|
|
293
|
+
try {
|
|
294
|
+
return dateFns.isWithinInterval(cellDate, {
|
|
295
|
+
start: dateFns.startOfDay(from),
|
|
296
|
+
end: dateFns.endOfDay(to)
|
|
297
|
+
});
|
|
298
|
+
} catch {
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
dateRangeFilterFn.autoRemove = (val) => !val || val.from === void 0 && val.to === void 0;
|
|
303
|
+
var selectFilterFn = reactTable.filterFns.arrIncludes;
|
|
304
|
+
function FunnelIcon2() {
|
|
305
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
306
|
+
"svg",
|
|
307
|
+
{
|
|
308
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
309
|
+
viewBox: "0 0 20 20",
|
|
310
|
+
fill: "currentColor",
|
|
311
|
+
"aria-hidden": "true",
|
|
312
|
+
className: "w-4 h-4",
|
|
313
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
314
|
+
"path",
|
|
315
|
+
{
|
|
316
|
+
fillRule: "evenodd",
|
|
317
|
+
d: "M2.628 1.601C5.028 1.206 7.49 1 10 1s4.973.206 7.372.601a.75.75 0 0 1 .628.74v2.288a2.25 2.25 0 0 1-.659 1.59l-4.682 4.683a2.25 2.25 0 0 0-.659 1.59v3.037c0 .684-.31 1.33-.844 1.757l-1.937 1.55A.75.75 0 0 1 9 18.25v-5.757a2.25 2.25 0 0 0-.659-1.591L3.659 6.22A2.25 2.25 0 0 1 3 4.629V2.34a.75.75 0 0 1 .628-.74z",
|
|
318
|
+
clipRule: "evenodd"
|
|
319
|
+
}
|
|
320
|
+
)
|
|
321
|
+
}
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
function NumberFilter({
|
|
325
|
+
column,
|
|
326
|
+
defaultOperator,
|
|
327
|
+
popoverAlign
|
|
328
|
+
}) {
|
|
329
|
+
const currentValue = column.getFilterValue();
|
|
330
|
+
const [operator, setOperator] = react.useState(
|
|
331
|
+
currentValue?.operator ?? defaultOperator ?? "="
|
|
332
|
+
);
|
|
333
|
+
const [inputValue, setInputValue] = react.useState(
|
|
334
|
+
currentValue?.value !== void 0 ? String(currentValue.value) : ""
|
|
335
|
+
);
|
|
336
|
+
const [minValue, setMinValue] = react.useState(
|
|
337
|
+
currentValue?.min !== void 0 ? String(currentValue.min) : ""
|
|
338
|
+
);
|
|
339
|
+
const [maxValue, setMaxValue] = react.useState(
|
|
340
|
+
currentValue?.max !== void 0 ? String(currentValue.max) : ""
|
|
341
|
+
);
|
|
342
|
+
react.useEffect(() => {
|
|
343
|
+
const timer = setTimeout(() => {
|
|
344
|
+
const num = parseFloat(inputValue);
|
|
345
|
+
if (inputValue === "" || isNaN(num)) {
|
|
346
|
+
column.setFilterValue(void 0);
|
|
347
|
+
} else {
|
|
348
|
+
column.setFilterValue({ operator, value: num });
|
|
349
|
+
}
|
|
350
|
+
}, 300);
|
|
351
|
+
return () => clearTimeout(timer);
|
|
352
|
+
}, [inputValue, operator, column]);
|
|
353
|
+
react.useEffect(() => {
|
|
354
|
+
if (operator !== "between") return;
|
|
355
|
+
const timer = setTimeout(() => {
|
|
356
|
+
const min = parseFloat(minValue);
|
|
357
|
+
const max = parseFloat(maxValue);
|
|
358
|
+
const hasMin = minValue !== "" && !isNaN(min);
|
|
359
|
+
const hasMax = maxValue !== "" && !isNaN(max);
|
|
360
|
+
if (!hasMin && !hasMax) {
|
|
361
|
+
column.setFilterValue(void 0);
|
|
362
|
+
} else {
|
|
363
|
+
column.setFilterValue({
|
|
364
|
+
operator: "between",
|
|
365
|
+
...hasMin ? { min } : {},
|
|
366
|
+
...hasMax ? { max } : {}
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
}, 300);
|
|
370
|
+
return () => clearTimeout(timer);
|
|
371
|
+
}, [minValue, maxValue, operator, column]);
|
|
372
|
+
const handleClear = () => {
|
|
373
|
+
setInputValue("");
|
|
374
|
+
setMinValue("");
|
|
375
|
+
setMaxValue("");
|
|
376
|
+
setOperator(defaultOperator ?? "=");
|
|
377
|
+
column.setFilterValue(void 0);
|
|
378
|
+
};
|
|
379
|
+
const handleOperatorChange = (e) => {
|
|
380
|
+
setOperator(e.target.value);
|
|
381
|
+
setInputValue("");
|
|
382
|
+
setMinValue("");
|
|
383
|
+
setMaxValue("");
|
|
384
|
+
column.setFilterValue(void 0);
|
|
385
|
+
};
|
|
386
|
+
const handleInputChange = (e) => {
|
|
387
|
+
setInputValue(e.target.value);
|
|
388
|
+
};
|
|
389
|
+
const handleMinChange = (e) => {
|
|
390
|
+
setMinValue(e.target.value);
|
|
391
|
+
};
|
|
392
|
+
const handleMaxChange = (e) => {
|
|
393
|
+
setMaxValue(e.target.value);
|
|
394
|
+
};
|
|
395
|
+
const alignProp = popoverAlign !== void 0 ? { align: popoverAlign } : {};
|
|
396
|
+
const isFiltered = column.getIsFiltered();
|
|
397
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-0.5", children: [
|
|
398
|
+
/* @__PURE__ */ jsxRuntime.jsx(FilterIndicator, { isFiltered }),
|
|
399
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
400
|
+
FilterPopover,
|
|
401
|
+
{
|
|
402
|
+
trigger: /* @__PURE__ */ jsxRuntime.jsx(
|
|
403
|
+
"button",
|
|
404
|
+
{
|
|
405
|
+
type: "button",
|
|
406
|
+
"aria-label": "\uC22B\uC790 \uD544\uD130",
|
|
407
|
+
"aria-pressed": isFiltered,
|
|
408
|
+
className: "inline-flex items-center justify-center w-5 h-5 rounded text-gray-400 hover:text-blue-500 hover:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-blue-400 transition-colors",
|
|
409
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(FunnelIcon2, {})
|
|
410
|
+
}
|
|
411
|
+
),
|
|
412
|
+
...alignProp,
|
|
413
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 space-y-2", children: [
|
|
414
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
415
|
+
"select",
|
|
416
|
+
{
|
|
417
|
+
"aria-label": "\uC5F0\uC0B0\uC790",
|
|
418
|
+
value: operator,
|
|
419
|
+
onChange: handleOperatorChange,
|
|
420
|
+
className: "w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-400 bg-white",
|
|
421
|
+
children: [
|
|
422
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "=", children: "\uAC19\uC74C (=)" }),
|
|
423
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "!=", children: "\uB2E4\uB984 (\u2260)" }),
|
|
424
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: ">", children: "\uCD08\uACFC (>)" }),
|
|
425
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "<", children: "\uBBF8\uB9CC (<)" }),
|
|
426
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: ">=", children: "\uC774\uC0C1 (\u2265)" }),
|
|
427
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "<=", children: "\uC774\uD558 (\u2264)" }),
|
|
428
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "between", children: "\uC0AC\uC774 (between)" })
|
|
429
|
+
]
|
|
430
|
+
}
|
|
431
|
+
),
|
|
432
|
+
operator === "between" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
433
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
434
|
+
"input",
|
|
435
|
+
{
|
|
436
|
+
type: "number",
|
|
437
|
+
"aria-label": "\uCD5C\uC19F\uAC12",
|
|
438
|
+
value: minValue,
|
|
439
|
+
onChange: handleMinChange,
|
|
440
|
+
placeholder: "\uCD5C\uC19F\uAC12...",
|
|
441
|
+
className: "w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-400"
|
|
442
|
+
}
|
|
443
|
+
),
|
|
444
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-center text-xs text-gray-400", children: "~" }),
|
|
445
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
446
|
+
"input",
|
|
447
|
+
{
|
|
448
|
+
type: "number",
|
|
449
|
+
"aria-label": "\uCD5C\uB313\uAC12",
|
|
450
|
+
value: maxValue,
|
|
451
|
+
onChange: handleMaxChange,
|
|
452
|
+
placeholder: "\uCD5C\uB313\uAC12...",
|
|
453
|
+
className: "w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-400"
|
|
454
|
+
}
|
|
455
|
+
)
|
|
456
|
+
] }) : (
|
|
457
|
+
/* 단항 연산자: 단일 value input */
|
|
458
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
459
|
+
"input",
|
|
460
|
+
{
|
|
461
|
+
type: "number",
|
|
462
|
+
"aria-label": "\uD544\uD130 \uAC12",
|
|
463
|
+
value: inputValue,
|
|
464
|
+
onChange: handleInputChange,
|
|
465
|
+
placeholder: "\uAC12 \uC785\uB825...",
|
|
466
|
+
className: "w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-400"
|
|
467
|
+
}
|
|
468
|
+
)
|
|
469
|
+
),
|
|
470
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
471
|
+
"button",
|
|
472
|
+
{
|
|
473
|
+
type: "button",
|
|
474
|
+
onClick: handleClear,
|
|
475
|
+
className: "w-full px-2 py-1 text-xs text-gray-600 border border-gray-200 rounded hover:bg-gray-50 hover:text-gray-900 transition-colors",
|
|
476
|
+
children: "\uCD08\uAE30\uD654"
|
|
477
|
+
}
|
|
478
|
+
)
|
|
479
|
+
] })
|
|
480
|
+
}
|
|
481
|
+
)
|
|
482
|
+
] });
|
|
483
|
+
}
|
|
484
|
+
DatePicker.registerLocale("ko", locale.ko);
|
|
485
|
+
function DateFilter({ column, popoverAlign }) {
|
|
486
|
+
const filterValue = column.getFilterValue();
|
|
487
|
+
const fromDate = filterValue?.from ?? null;
|
|
488
|
+
const toDate = filterValue?.to ?? null;
|
|
489
|
+
const handleFromChange = (date) => {
|
|
490
|
+
const from = date ?? void 0;
|
|
491
|
+
const to = filterValue?.to;
|
|
492
|
+
if (from === void 0 && to === void 0) {
|
|
493
|
+
column.setFilterValue(void 0);
|
|
494
|
+
} else {
|
|
495
|
+
const val = {
|
|
496
|
+
...from !== void 0 ? { from } : {},
|
|
497
|
+
...to !== void 0 ? { to } : {}
|
|
498
|
+
};
|
|
499
|
+
column.setFilterValue(val);
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
const handleToChange = (date) => {
|
|
503
|
+
const from = filterValue?.from;
|
|
504
|
+
const to = date ?? void 0;
|
|
505
|
+
if (from === void 0 && to === void 0) {
|
|
506
|
+
column.setFilterValue(void 0);
|
|
507
|
+
} else {
|
|
508
|
+
const val = {
|
|
509
|
+
...from !== void 0 ? { from } : {},
|
|
510
|
+
...to !== void 0 ? { to } : {}
|
|
511
|
+
};
|
|
512
|
+
column.setFilterValue(val);
|
|
513
|
+
}
|
|
514
|
+
};
|
|
515
|
+
const handleClear = () => {
|
|
516
|
+
column.setFilterValue(void 0);
|
|
517
|
+
};
|
|
518
|
+
const summaryText = () => {
|
|
519
|
+
if (fromDate && toDate) {
|
|
520
|
+
const fmt = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
521
|
+
return `${fmt(fromDate)} ~ ${fmt(toDate)}`;
|
|
522
|
+
}
|
|
523
|
+
if (fromDate) {
|
|
524
|
+
const d = fromDate;
|
|
525
|
+
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")} ~`;
|
|
526
|
+
}
|
|
527
|
+
if (toDate) {
|
|
528
|
+
const d = toDate;
|
|
529
|
+
return `~ ${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
530
|
+
}
|
|
531
|
+
return "\uB0A0\uC9DC \uD544\uD130";
|
|
532
|
+
};
|
|
533
|
+
const isFiltered = column.getIsFiltered();
|
|
534
|
+
const trigger = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
535
|
+
"button",
|
|
536
|
+
{
|
|
537
|
+
type: "button",
|
|
538
|
+
"aria-label": "\uB0A0\uC9DC \uD544\uD130",
|
|
539
|
+
"aria-pressed": isFiltered,
|
|
540
|
+
className: "inline-flex items-center gap-1 px-2 py-1 text-xs rounded border border-gray-300 bg-white hover:bg-gray-50 focus:outline-none focus:ring-1 focus:ring-blue-500",
|
|
541
|
+
children: [
|
|
542
|
+
/* @__PURE__ */ jsxRuntime.jsx(FilterIndicator, { isFiltered }),
|
|
543
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate max-w-[120px]", children: summaryText() })
|
|
544
|
+
]
|
|
545
|
+
}
|
|
546
|
+
);
|
|
547
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
548
|
+
FilterPopover,
|
|
549
|
+
{
|
|
550
|
+
trigger,
|
|
551
|
+
...popoverAlign !== void 0 ? { align: popoverAlign } : {},
|
|
552
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 space-y-2 min-w-[220px]", children: [
|
|
553
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
554
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-gray-700", children: "\uC2DC\uC791\uC77C" }),
|
|
555
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
556
|
+
DatePicker__default.default,
|
|
557
|
+
{
|
|
558
|
+
selected: fromDate,
|
|
559
|
+
onChange: handleFromChange,
|
|
560
|
+
locale: "ko",
|
|
561
|
+
placeholderText: "\uC2DC\uC791\uC77C",
|
|
562
|
+
dateFormat: "yyyy-MM-dd",
|
|
563
|
+
...toDate !== null ? { maxDate: toDate } : {},
|
|
564
|
+
className: "w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"
|
|
565
|
+
}
|
|
566
|
+
)
|
|
567
|
+
] }),
|
|
568
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
569
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-gray-700", children: "\uC885\uB8CC\uC77C" }),
|
|
570
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
571
|
+
DatePicker__default.default,
|
|
572
|
+
{
|
|
573
|
+
selected: toDate,
|
|
574
|
+
onChange: handleToChange,
|
|
575
|
+
locale: "ko",
|
|
576
|
+
placeholderText: "\uC885\uB8CC\uC77C",
|
|
577
|
+
dateFormat: "yyyy-MM-dd",
|
|
578
|
+
...fromDate !== null ? { minDate: fromDate } : {},
|
|
579
|
+
className: "w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"
|
|
580
|
+
}
|
|
581
|
+
)
|
|
582
|
+
] }),
|
|
583
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
584
|
+
"button",
|
|
585
|
+
{
|
|
586
|
+
type: "button",
|
|
587
|
+
onClick: handleClear,
|
|
588
|
+
className: "w-full px-2 py-1 text-xs text-gray-600 border border-gray-200 rounded hover:bg-gray-50 focus:outline-none focus:ring-1 focus:ring-blue-500",
|
|
589
|
+
children: "\uCD08\uAE30\uD654"
|
|
590
|
+
}
|
|
591
|
+
)
|
|
592
|
+
] })
|
|
593
|
+
}
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
function SelectFilter({
|
|
597
|
+
column,
|
|
598
|
+
searchThreshold = 50,
|
|
599
|
+
popoverAlign
|
|
600
|
+
}) {
|
|
601
|
+
const [searchText, setSearchText] = react.useState("");
|
|
602
|
+
const searchInputId = react.useId();
|
|
603
|
+
const uniqueValues = column.getFacetedUniqueValues();
|
|
604
|
+
const currentFilter = column.getFilterValue();
|
|
605
|
+
const isFiltered = column.getIsFiltered();
|
|
606
|
+
const allOptions = Array.from(uniqueValues.entries());
|
|
607
|
+
const showSearch = uniqueValues.size >= searchThreshold;
|
|
608
|
+
const filteredOptions = showSearch ? allOptions.filter(
|
|
609
|
+
([val]) => String(val === "" ? "" : val).toLowerCase().includes(searchText.toLowerCase())
|
|
610
|
+
) : allOptions;
|
|
611
|
+
const selectedSet = new Set(currentFilter ?? []);
|
|
612
|
+
const allSelected = allOptions.length > 0 && allOptions.every(([val]) => selectedSet.has(String(val)));
|
|
613
|
+
const handleToggle = (optionValue) => {
|
|
614
|
+
const next = new Set(selectedSet);
|
|
615
|
+
if (next.has(optionValue)) {
|
|
616
|
+
next.delete(optionValue);
|
|
617
|
+
} else {
|
|
618
|
+
next.add(optionValue);
|
|
619
|
+
}
|
|
620
|
+
const arr = Array.from(next);
|
|
621
|
+
column.setFilterValue(arr.length > 0 ? arr : void 0);
|
|
622
|
+
};
|
|
623
|
+
const handleToggleAll = () => {
|
|
624
|
+
if (allSelected) {
|
|
625
|
+
column.setFilterValue(void 0);
|
|
626
|
+
} else {
|
|
627
|
+
column.setFilterValue(allOptions.map(([val]) => String(val)));
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
const trigger = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
631
|
+
"button",
|
|
632
|
+
{
|
|
633
|
+
type: "button",
|
|
634
|
+
className: "inline-flex items-center gap-1 text-sm font-medium text-gray-700 hover:text-gray-900",
|
|
635
|
+
"aria-label": `${column.id} \uD544\uD130`,
|
|
636
|
+
children: [
|
|
637
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: column.id }),
|
|
638
|
+
/* @__PURE__ */ jsxRuntime.jsx(FilterIndicator, { isFiltered }),
|
|
639
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
640
|
+
"svg",
|
|
641
|
+
{
|
|
642
|
+
className: "w-3 h-3 text-gray-400",
|
|
643
|
+
fill: "none",
|
|
644
|
+
viewBox: "0 0 20 20",
|
|
645
|
+
"aria-hidden": "true",
|
|
646
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
647
|
+
"path",
|
|
648
|
+
{
|
|
649
|
+
stroke: "currentColor",
|
|
650
|
+
strokeLinecap: "round",
|
|
651
|
+
strokeLinejoin: "round",
|
|
652
|
+
strokeWidth: 2,
|
|
653
|
+
d: "M6 8l4 4 4-4"
|
|
654
|
+
}
|
|
655
|
+
)
|
|
656
|
+
}
|
|
657
|
+
)
|
|
658
|
+
]
|
|
659
|
+
}
|
|
660
|
+
);
|
|
661
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
662
|
+
FilterPopover,
|
|
663
|
+
{
|
|
664
|
+
...popoverAlign !== void 0 ? { align: popoverAlign } : {},
|
|
665
|
+
trigger,
|
|
666
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-2 w-52", children: [
|
|
667
|
+
showSearch && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
668
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: searchInputId, className: "sr-only", children: "\uC635\uC158 \uAC80\uC0C9" }),
|
|
669
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
670
|
+
"input",
|
|
671
|
+
{
|
|
672
|
+
id: searchInputId,
|
|
673
|
+
type: "text",
|
|
674
|
+
value: searchText,
|
|
675
|
+
onChange: (e) => setSearchText(e.target.value),
|
|
676
|
+
placeholder: "Search options\u2026",
|
|
677
|
+
className: "w-full rounded border border-gray-300 px-2 py-1 text-xs focus:outline-none focus:ring-1 focus:ring-blue-500"
|
|
678
|
+
}
|
|
679
|
+
)
|
|
680
|
+
] }),
|
|
681
|
+
allOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1 border-b border-gray-100 pb-1", children: /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 cursor-pointer px-1 py-0.5 rounded hover:bg-gray-50 text-xs text-gray-600", children: [
|
|
682
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
683
|
+
"input",
|
|
684
|
+
{
|
|
685
|
+
type: "checkbox",
|
|
686
|
+
checked: allSelected,
|
|
687
|
+
onChange: handleToggleAll,
|
|
688
|
+
className: "rounded border-gray-300 text-blue-600 focus:ring-blue-500"
|
|
689
|
+
}
|
|
690
|
+
),
|
|
691
|
+
"\uC804\uCCB4 \uC120\uD0DD/\uD574\uC81C"
|
|
692
|
+
] }) }),
|
|
693
|
+
filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 py-1 text-xs text-gray-400", children: "No options" }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "max-h-48 overflow-y-auto space-y-0.5", children: filteredOptions.map(([val, count]) => {
|
|
694
|
+
const rawStr = String(val);
|
|
695
|
+
const displayLabel = rawStr === "" ? "(blank)" : rawStr;
|
|
696
|
+
const optId = `${searchInputId}-opt-${rawStr}`;
|
|
697
|
+
const isChecked = selectedSet.has(rawStr);
|
|
698
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
699
|
+
"label",
|
|
700
|
+
{
|
|
701
|
+
htmlFor: optId,
|
|
702
|
+
className: "flex items-center gap-2 cursor-pointer px-1 py-0.5 rounded hover:bg-gray-50",
|
|
703
|
+
children: [
|
|
704
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
705
|
+
"input",
|
|
706
|
+
{
|
|
707
|
+
id: optId,
|
|
708
|
+
type: "checkbox",
|
|
709
|
+
checked: isChecked,
|
|
710
|
+
onChange: () => handleToggle(rawStr),
|
|
711
|
+
className: "rounded border-gray-300 text-blue-600 focus:ring-blue-500"
|
|
712
|
+
}
|
|
713
|
+
),
|
|
714
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate text-xs text-gray-700", children: displayLabel }),
|
|
715
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-gray-400", children: [
|
|
716
|
+
"(",
|
|
717
|
+
count,
|
|
718
|
+
")"
|
|
719
|
+
] })
|
|
720
|
+
]
|
|
721
|
+
}
|
|
722
|
+
) }, rawStr);
|
|
723
|
+
}) })
|
|
724
|
+
] })
|
|
725
|
+
}
|
|
726
|
+
);
|
|
727
|
+
}
|
|
728
|
+
function GlobalSearchInput({
|
|
729
|
+
table,
|
|
730
|
+
debounceMs = 300,
|
|
731
|
+
placeholder = "Search all columns\u2026"
|
|
732
|
+
}) {
|
|
733
|
+
const [inputValue, setInputValue] = react.useState("");
|
|
734
|
+
react.useEffect(() => {
|
|
735
|
+
const trimmed = inputValue.trim();
|
|
736
|
+
const timer = setTimeout(
|
|
737
|
+
() => table.setGlobalFilter(trimmed === "" ? void 0 : trimmed),
|
|
738
|
+
debounceMs
|
|
739
|
+
);
|
|
740
|
+
return () => clearTimeout(timer);
|
|
741
|
+
}, [inputValue, debounceMs, table]);
|
|
742
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
|
|
743
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
744
|
+
"svg",
|
|
745
|
+
{
|
|
746
|
+
className: "absolute left-2 w-4 h-4 text-gray-400 pointer-events-none",
|
|
747
|
+
fill: "none",
|
|
748
|
+
viewBox: "0 0 24 24",
|
|
749
|
+
stroke: "currentColor",
|
|
750
|
+
"aria-hidden": "true",
|
|
751
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
752
|
+
"path",
|
|
753
|
+
{
|
|
754
|
+
strokeLinecap: "round",
|
|
755
|
+
strokeLinejoin: "round",
|
|
756
|
+
strokeWidth: 2,
|
|
757
|
+
d: "M21 21l-4.35-4.35M16.65 16.65A7.5 7.5 0 1 0 4.5 4.5a7.5 7.5 0 0 0 12.15 12.15z"
|
|
758
|
+
}
|
|
759
|
+
)
|
|
760
|
+
}
|
|
761
|
+
),
|
|
762
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
763
|
+
"input",
|
|
764
|
+
{
|
|
765
|
+
type: "text",
|
|
766
|
+
value: inputValue,
|
|
767
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
768
|
+
placeholder,
|
|
769
|
+
className: "pl-8 pr-3 py-1.5 rounded border border-gray-300 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 w-56",
|
|
770
|
+
"aria-label": "\uC804\uCCB4 \uAC80\uC0C9"
|
|
771
|
+
}
|
|
772
|
+
)
|
|
773
|
+
] });
|
|
774
|
+
}
|
|
775
|
+
function FilterResetButton({
|
|
776
|
+
table,
|
|
777
|
+
children
|
|
778
|
+
}) {
|
|
779
|
+
const { columnFilters, globalFilter } = table.getState();
|
|
780
|
+
const isDisabled = columnFilters.length === 0 && !globalFilter;
|
|
781
|
+
const handleClick = () => {
|
|
782
|
+
table.resetColumnFilters();
|
|
783
|
+
table.setGlobalFilter(void 0);
|
|
784
|
+
};
|
|
785
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
786
|
+
"button",
|
|
787
|
+
{
|
|
788
|
+
type: "button",
|
|
789
|
+
onClick: handleClick,
|
|
790
|
+
disabled: isDisabled,
|
|
791
|
+
className: [
|
|
792
|
+
"inline-flex items-center gap-1 rounded border px-3 py-1.5 text-sm font-medium transition-colors",
|
|
793
|
+
isDisabled ? "border-gray-200 bg-gray-50 text-gray-400 opacity-50 cursor-not-allowed" : "border-gray-300 bg-white text-gray-700 hover:bg-gray-50 hover:text-gray-900"
|
|
794
|
+
].join(" "),
|
|
795
|
+
"aria-label": "\uD544\uD130 \uCD08\uAE30\uD654",
|
|
796
|
+
children: children ?? "Reset Filters"
|
|
797
|
+
}
|
|
798
|
+
);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
Object.defineProperty(exports, "DropIndicator", {
|
|
802
|
+
enumerable: true,
|
|
803
|
+
get: function () { return gridCore.DropIndicator; }
|
|
804
|
+
});
|
|
805
|
+
Object.defineProperty(exports, "SortBadge", {
|
|
806
|
+
enumerable: true,
|
|
807
|
+
get: function () { return gridCore.SortBadge; }
|
|
808
|
+
});
|
|
809
|
+
Object.defineProperty(exports, "SortClearButton", {
|
|
810
|
+
enumerable: true,
|
|
811
|
+
get: function () { return gridCore.SortClearButton; }
|
|
812
|
+
});
|
|
813
|
+
Object.defineProperty(exports, "useColumnDrag", {
|
|
814
|
+
enumerable: true,
|
|
815
|
+
get: function () { return gridCore.useColumnDrag; }
|
|
816
|
+
});
|
|
817
|
+
Object.defineProperty(exports, "useColumnOrderPersist", {
|
|
818
|
+
enumerable: true,
|
|
819
|
+
get: function () { return gridCore.useColumnOrderPersist; }
|
|
820
|
+
});
|
|
821
|
+
exports.DateFilter = DateFilter;
|
|
822
|
+
exports.FilterIndicator = FilterIndicator;
|
|
823
|
+
exports.FilterPopover = FilterPopover;
|
|
824
|
+
exports.FilterResetButton = FilterResetButton;
|
|
825
|
+
exports.GlobalSearchInput = GlobalSearchInput;
|
|
826
|
+
exports.NumberFilter = NumberFilter;
|
|
827
|
+
exports.SelectFilter = SelectFilter;
|
|
828
|
+
exports.TextFilter = TextFilter;
|
|
829
|
+
exports.dateRangeFilterFn = dateRangeFilterFn;
|
|
830
|
+
exports.numberFilterFn = numberFilterFn;
|
|
831
|
+
exports.selectFilterFn = selectFilterFn;
|
|
832
|
+
exports.textFilterFn = textFilterFn;
|
|
833
|
+
exports.useMultiSort = useMultiSort;
|
|
834
|
+
//# sourceMappingURL=index.cjs.map
|
|
835
|
+
//# sourceMappingURL=index.cjs.map
|