@ishibashi0112/spreadsheet-grid 1.0.2 → 1.1.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/API_REFERENCE.md +162 -29
- package/dist/ColumnFilterPopover-BPKRqQ0j.js +1056 -0
- package/dist/ColumnFilterPopover-mXX137Y4.cjs +1 -0
- package/dist/GridShell.d.ts +1 -1
- package/dist/common.d.ts +3 -1
- package/dist/features/pinnedRows.d.ts +2 -0
- package/dist/features/types.d.ts +16 -2
- package/dist/hooks/useCellContextMenuController.d.ts +1 -1
- package/dist/hooks/useGridHistoryController.d.ts +1 -0
- package/dist/hooks/useGridViewportSync.d.ts +1 -1
- package/dist/hooks/usePortalTokens.d.ts +6 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +3409 -3075
- package/dist/lite/CheckboxCell-BBzjMEcs.cjs +1 -0
- package/dist/lite/CheckboxCell-DAGCJJkg.js +40 -0
- package/dist/lite/ColumnFilterPopover-DCydc4GT.cjs +1 -0
- package/dist/{ColumnFilterPopover-CTJGE2vR.js → lite/ColumnFilterPopover-Mm4bBD9q.js} +362 -360
- package/dist/lite/columnMenu-C2rH9Ti8.cjs +1 -0
- package/dist/lite/columnMenu-CfiIYwpG.js +392 -0
- package/dist/lite/contextMenu-BrvrFfbj.js +160 -0
- package/dist/lite/contextMenu-CAUiZ93K.cjs +1 -0
- package/dist/lite/createSpreadsheetGrid-8FiJsd7p.js +4723 -0
- package/dist/lite/createSpreadsheetGrid-Dvn09NZv.cjs +7 -0
- package/dist/lite/createSpreadsheetGrid.cjs +1 -1
- package/dist/lite/createSpreadsheetGrid.js +1 -1
- package/dist/lite/features/columnMenu.cjs +1 -1
- package/dist/lite/features/columnMenu.js +1 -1
- package/dist/lite/features/contextMenu.cjs +1 -1
- package/dist/lite/features/contextMenu.js +1 -1
- package/dist/lite/features/fillHandle.cjs +1 -1
- package/dist/lite/features/fillHandle.js +1 -1
- package/dist/lite/features/filtering.cjs +1 -1
- package/dist/lite/features/filtering.js +1 -1
- package/dist/lite/features/grouping.cjs +1 -1
- package/dist/lite/features/grouping.js +1 -1
- package/dist/lite/features/labelRow.cjs +1 -1
- package/dist/lite/features/labelRow.js +1 -1
- package/dist/lite/features/pinnedRows.cjs +1 -0
- package/dist/lite/features/pinnedRows.js +2 -0
- package/dist/lite/features/standard.cjs +1 -1
- package/dist/lite/features/standard.js +3 -3
- package/dist/lite/features/toolPanel.cjs +1 -1
- package/dist/lite/features/toolPanel.js +1 -1
- package/dist/lite/fillHandle-CHJESnrk.cjs +1 -0
- package/dist/lite/fillHandle-CzA_uxgV.js +326 -0
- package/dist/lite/filtering-B9NSMjHq.cjs +1 -0
- package/dist/lite/{filtering-D7E6KUld.js → filtering-BZoWpt28.js} +131 -131
- package/dist/lite/grouping-BsOdLS32.cjs +1 -0
- package/dist/lite/{grouping-B6mO2bSd.js → grouping-DCR9Z6JK.js} +32 -32
- package/dist/lite/{labelRow-C9mLsqiB.js → labelRow-l9spGw-3.js} +20 -21
- package/dist/lite/labelRow-rhK34_qd.cjs +1 -0
- package/dist/lite/{lazyPopups-D0tOufrR.cjs → lazyPopups-Bx3u_NA9.cjs} +1 -1
- package/dist/lite/{lazyPopups-CoX4Zxvb.js → lazyPopups-DbnjvQXX.js} +1 -1
- package/dist/lite/pinnedRows-BzH-qw2i.js +143 -0
- package/dist/lite/pinnedRows-DwhFtppH.cjs +1 -0
- package/dist/lite/{toolPanel-BkdryfVw.cjs → toolPanel-CSADXAfv.cjs} +1 -1
- package/dist/lite/{toolPanel-DcQrkZzk.js → toolPanel-ULXPL1kC.js} +1 -1
- package/dist/lite/toolPanelViews-C4qswcP_.cjs +1 -0
- package/dist/lite/toolPanelViews-DwUa6rm1.js +689 -0
- package/dist/lite/usePortalTokens-CUAiwfmK.cjs +1 -0
- package/dist/lite/usePortalTokens-hsX2T3ep.js +32 -0
- package/dist/lite.cjs +1 -1
- package/dist/lite.d.ts +1 -0
- package/dist/lite.js +20 -18
- package/dist/style.css +1 -1
- package/dist/style.layer.css +1 -1
- package/dist/themes/astryx.css +3 -1
- package/dist/themes/heroui.css +3 -1
- package/dist/themes/mantine.css +3 -1
- package/dist/themes/shadcn.css +3 -1
- package/dist/toolPanelViews-CKKThiAQ.cjs +1 -0
- package/dist/toolPanelViews-DCpqVIEd.js +689 -0
- package/dist/useGridLocaleText-BV4EomZe.cjs +1 -0
- package/dist/useGridLocaleText-Drud4qg0.js +49 -0
- package/dist/{usePopupLocaleText-u-9PpBon.js → usePopupLocaleText-DJN10Asc.js} +1 -1
- package/dist/{usePopupLocaleText-BAn7AGEy.cjs → usePopupLocaleText-lEFHqTvJ.cjs} +1 -1
- package/dist/{useVirtualizerCore-BubgiDzY.js → useVirtualizerCore-C1k6Aw8p.js} +1 -1
- package/dist/{useVirtualizerCore-DTzCVMhF.cjs → useVirtualizerCore-Cif7t8mS.cjs} +1 -1
- package/dist/view/DefaultGridTopBar.d.ts +2 -1
- package/dist/view/FillHandleLayer.d.ts +1 -1
- package/dist/view/GridBodyGroupRow.d.ts +2 -1
- package/dist/view/GridBodyLabelRow.d.ts +2 -1
- package/dist/view/GridBodyLayer.d.ts +2 -1
- package/dist/view/GridPinnedRows.d.ts +29 -0
- package/package.json +2 -2
- package/skills/spreadsheet-grid/SKILL.md +3 -0
- package/dist/ColumnFilterPopover-BEeU4H00.cjs +0 -1
- package/dist/lite/ColumnFilterPopover-B0Ry9U-4.cjs +0 -1
- package/dist/lite/ColumnFilterPopover-D87ZPNhR.js +0 -1054
- package/dist/lite/columnMenu-C8LMgSDh.cjs +0 -1
- package/dist/lite/columnMenu-DImtqeXz.js +0 -351
- package/dist/lite/contextMenu-B6c_gXfn.cjs +0 -1
- package/dist/lite/contextMenu-C2IbM5fN.js +0 -137
- package/dist/lite/createSpreadsheetGrid-DfL9QD8j.cjs +0 -7
- package/dist/lite/createSpreadsheetGrid-Vysclx0F.js +0 -4614
- package/dist/lite/fillHandle-C7rhbEAc.js +0 -321
- package/dist/lite/fillHandle-DufUH_57.cjs +0 -1
- package/dist/lite/filtering-cR2EpvA4.cjs +0 -1
- package/dist/lite/grouping-wPCuEmD1.cjs +0 -1
- package/dist/lite/labelRow-D434smUt.cjs +0 -1
- package/dist/lite/toolPanelViews-B-QP_ZDZ.cjs +0 -1
- package/dist/lite/toolPanelViews-Dllz41nc.js +0 -669
- package/dist/lite/usePortalTokens-BVnykmkk.cjs +0 -1
- package/dist/lite/usePortalTokens-mFOziRD2.js +0 -19
- package/dist/toolPanelViews-DwlD9m4j.js +0 -669
- package/dist/toolPanelViews-Qnzjs5wF.cjs +0 -1
- package/dist/useGridLocaleText-B4ZVUbqa.js +0 -36
- package/dist/useGridLocaleText-D74sCoAT.cjs +0 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import { t as
|
|
4
|
-
import { useDeferredValue as
|
|
5
|
-
import { cx as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import { isEscapePreventedInside as
|
|
8
|
-
import { isImeComposingKeyEvent as
|
|
9
|
-
import { formatLocaleText as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { toDateKey as
|
|
12
|
-
import { normalizeDateFilterPresets as
|
|
13
|
-
import { DEFAULT_FILTER_LOCALE_TEXT as v } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFilters";
|
|
1
|
+
import { t as e } from "./useVirtualizerCore-fzQ-OUU9.js";
|
|
2
|
+
import { i as t, r as n } from "./usePortalTokens-hsX2T3ep.js";
|
|
3
|
+
import { t as r } from "./usePopupLocaleText-Cfb4fQ8G.js";
|
|
4
|
+
import { useDeferredValue as i, useEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
5
|
+
import { cx as l } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cx";
|
|
6
|
+
import { createPortal as u } from "react-dom";
|
|
7
|
+
import { isEscapePreventedInside as d } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/escapeClaimController";
|
|
8
|
+
import { isImeComposingKeyEvent as f } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
|
|
9
|
+
import { formatLocaleText as p } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
10
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
11
|
+
import { toDateKey as _ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/filtering";
|
|
12
|
+
import { normalizeDateFilterPresets as v } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/dateFilterPresets";
|
|
14
13
|
import { resolveFocusWrapTarget as y } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/focusCycle";
|
|
15
14
|
import { filterSetOptionsBySearch as b, resolveSetFilterEnterAction as x } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/setFilterSearch";
|
|
16
15
|
import { isSetValueSelected as S } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/setFilterSelection";
|
|
17
16
|
import { DEFAULT_NUMBER_FILTER_DRAFT as C, NUMBER_FILTER_OPERATOR_OPTIONS as w, buildParsedNumberFilterFromDraft as T, filterOptionsByNumberCondition as E, numberFilterOperandCount as D } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/numberFilterCondition";
|
|
18
17
|
import { DEFAULT_TEXT_FILTER_DRAFT as O, TEXT_FILTER_OPERATOR_OPTIONS as k, buildParsedTextFilterFromDraft as A, filterOptionsByTextCondition as j, textFilterOperandCount as M } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/textFilterCondition";
|
|
19
18
|
import { DATE_FILTER_OPERATOR_OPTIONS as N, DEFAULT_DATE_FILTER_DRAFT as P, buildParsedDateFilterFromDraft as F, dateFilterOperandCount as I, filterOptionsByDateCondition as L, normalizeFilterDateInputValue as R } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/dateFilterCondition";
|
|
20
|
-
import { buildCalendarDayCells as z, buildYearGrid as
|
|
19
|
+
import { buildCalendarDayCells as z, buildYearGrid as B, formatFilterDateDisplay as ee, yearGridStart as V } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/datePickerCalendar";
|
|
21
20
|
import { buildDateTreeRows as H } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/dateFilterTree";
|
|
21
|
+
import { DEFAULT_FILTER_LOCALE_TEXT as U } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFilters";
|
|
22
22
|
//#region src/view/FilterDateField.tsx
|
|
23
|
-
function
|
|
24
|
-
let
|
|
23
|
+
function W({ value: e, onCommit: t, ariaLabel: n, inputRef: i, onRequestClose: o, align: u = "left" }) {
|
|
24
|
+
let d = r(), [v, y] = c(null), [b, x] = c(!1), [S, C] = c(!1), [w, T] = c("days"), [E, D] = c(() => (/* @__PURE__ */ new Date()).getFullYear()), [O, k] = c(() => (/* @__PURE__ */ new Date()).getMonth()), A = s(null), j = v ?? ee(e), M = _(/* @__PURE__ */ new Date()) ?? "", N = () => {
|
|
25
25
|
if (v === null) return;
|
|
26
26
|
let e = v.trim();
|
|
27
27
|
if (e === "") {
|
|
28
28
|
t(""), y(null), x(!1);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
let n =
|
|
31
|
+
let n = _(e);
|
|
32
32
|
if (n === null) {
|
|
33
33
|
x(!0);
|
|
34
34
|
return;
|
|
@@ -42,7 +42,7 @@ function U({ value: e, onCommit: t, ariaLabel: r, inputRef: a, onRequestClose: l
|
|
|
42
42
|
}, I = (e) => {
|
|
43
43
|
t(e), y(null), x(!1), F();
|
|
44
44
|
};
|
|
45
|
-
|
|
45
|
+
a(() => {
|
|
46
46
|
if (!S) return;
|
|
47
47
|
let e = (e) => {
|
|
48
48
|
let t = e.target;
|
|
@@ -54,7 +54,7 @@ function U({ value: e, onCommit: t, ariaLabel: r, inputRef: a, onRequestClose: l
|
|
|
54
54
|
}, [S]);
|
|
55
55
|
let L = (e) => {
|
|
56
56
|
if (e.stopPropagation(), e.key === "Enter") {
|
|
57
|
-
if (
|
|
57
|
+
if (f(e.nativeEvent)) return;
|
|
58
58
|
e.preventDefault(), N(), F();
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
@@ -63,7 +63,7 @@ function U({ value: e, onCommit: t, ariaLabel: r, inputRef: a, onRequestClose: l
|
|
|
63
63
|
F();
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
o();
|
|
67
67
|
}
|
|
68
68
|
}, R = (e) => ({
|
|
69
69
|
onPointerDown: (t) => {
|
|
@@ -79,7 +79,7 @@ function U({ value: e, onCommit: t, ariaLabel: r, inputRef: a, onRequestClose: l
|
|
|
79
79
|
F(), t.currentTarget.closest(".ssg-dp-root")?.querySelector(".ssg-dp-input")?.focus();
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
o();
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}), H = (e) => {
|
|
@@ -97,22 +97,22 @@ function U({ value: e, onCommit: t, ariaLabel: r, inputRef: a, onRequestClose: l
|
|
|
97
97
|
T((e) => e === "days" ? "months" : "years");
|
|
98
98
|
}, W = () => {
|
|
99
99
|
T((e) => e === "years" ? "months" : "days");
|
|
100
|
-
}, G = w === "days" ?
|
|
100
|
+
}, G = w === "days" ? p(d.calendarTitle, {
|
|
101
101
|
year: E,
|
|
102
102
|
month: O + 1
|
|
103
|
-
}) : w === "months" ?
|
|
104
|
-
return /* @__PURE__ */
|
|
103
|
+
}) : w === "months" ? p(d.calendarYear, { year: E }) : `${V(E)} – ${V(E) + 11}`;
|
|
104
|
+
return /* @__PURE__ */ g("div", {
|
|
105
105
|
ref: A,
|
|
106
106
|
className: "ssg-dp-root",
|
|
107
|
-
children: [/* @__PURE__ */
|
|
108
|
-
className:
|
|
109
|
-
children: [/* @__PURE__ */
|
|
110
|
-
ref:
|
|
107
|
+
children: [/* @__PURE__ */ g("div", {
|
|
108
|
+
className: l("ssg-dp-field", S && "ssg-dp-field--open", b && "ssg-dp-field--invalid"),
|
|
109
|
+
children: [/* @__PURE__ */ h("input", {
|
|
110
|
+
ref: i,
|
|
111
111
|
type: "text",
|
|
112
112
|
inputMode: "numeric",
|
|
113
113
|
value: j,
|
|
114
114
|
placeholder: "yyyy/mm/dd",
|
|
115
|
-
"aria-label":
|
|
115
|
+
"aria-label": n,
|
|
116
116
|
"aria-invalid": b || void 0,
|
|
117
117
|
className: "ssg-dp-input",
|
|
118
118
|
onChange: (e) => {
|
|
@@ -120,20 +120,20 @@ function U({ value: e, onCommit: t, ariaLabel: r, inputRef: a, onRequestClose: l
|
|
|
120
120
|
},
|
|
121
121
|
onKeyDown: L,
|
|
122
122
|
onBlur: N
|
|
123
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ h("button", {
|
|
124
124
|
type: "button",
|
|
125
125
|
className: "ssg-dp-cal-btn",
|
|
126
|
-
"aria-label": S ?
|
|
126
|
+
"aria-label": S ? d.calendarClose : d.calendarOpen,
|
|
127
127
|
...R(() => {
|
|
128
128
|
S ? F() : P();
|
|
129
129
|
}),
|
|
130
|
-
children: /* @__PURE__ */
|
|
130
|
+
children: /* @__PURE__ */ g("svg", {
|
|
131
131
|
width: "12",
|
|
132
132
|
height: "12",
|
|
133
133
|
viewBox: "0 0 16 16",
|
|
134
134
|
"aria-hidden": "true",
|
|
135
135
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ h("rect", {
|
|
137
137
|
x: "1.5",
|
|
138
138
|
y: "2.5",
|
|
139
139
|
width: "13",
|
|
@@ -142,21 +142,21 @@ function U({ value: e, onCommit: t, ariaLabel: r, inputRef: a, onRequestClose: l
|
|
|
142
142
|
fill: "none",
|
|
143
143
|
stroke: "currentColor"
|
|
144
144
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ h("line", {
|
|
146
146
|
x1: "1.5",
|
|
147
147
|
y1: "6",
|
|
148
148
|
x2: "14.5",
|
|
149
149
|
y2: "6",
|
|
150
150
|
stroke: "currentColor"
|
|
151
151
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ h("line", {
|
|
153
153
|
x1: "5",
|
|
154
154
|
y1: "1",
|
|
155
155
|
x2: "5",
|
|
156
156
|
y2: "4",
|
|
157
157
|
stroke: "currentColor"
|
|
158
158
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ h("line", {
|
|
160
160
|
x1: "11",
|
|
161
161
|
y1: "1",
|
|
162
162
|
x2: "11",
|
|
@@ -166,94 +166,94 @@ function U({ value: e, onCommit: t, ariaLabel: r, inputRef: a, onRequestClose: l
|
|
|
166
166
|
]
|
|
167
167
|
})
|
|
168
168
|
})]
|
|
169
|
-
}), S && /* @__PURE__ */
|
|
170
|
-
className:
|
|
169
|
+
}), S && /* @__PURE__ */ g("div", {
|
|
170
|
+
className: l("ssg-dp-panel", u === "right" && "ssg-dp-panel--right"),
|
|
171
171
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ g("div", {
|
|
173
173
|
className: "ssg-dp-nav",
|
|
174
174
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ h("button", {
|
|
176
176
|
type: "button",
|
|
177
177
|
className: "ssg-dp-nav-btn",
|
|
178
|
-
"aria-label":
|
|
178
|
+
"aria-label": d.calendarPrevious,
|
|
179
179
|
...R(() => H(-1)),
|
|
180
180
|
children: "‹"
|
|
181
181
|
}),
|
|
182
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ h("button", {
|
|
183
183
|
type: "button",
|
|
184
184
|
className: "ssg-dp-nav-title",
|
|
185
185
|
disabled: w === "years",
|
|
186
|
-
"aria-label":
|
|
186
|
+
"aria-label": d.calendarChangeView,
|
|
187
187
|
...R(U),
|
|
188
188
|
children: G
|
|
189
189
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ h("button", {
|
|
191
191
|
type: "button",
|
|
192
192
|
className: "ssg-dp-nav-btn",
|
|
193
|
-
"aria-label":
|
|
193
|
+
"aria-label": d.calendarNext,
|
|
194
194
|
...R(() => H(1)),
|
|
195
195
|
children: "›"
|
|
196
196
|
})
|
|
197
197
|
]
|
|
198
198
|
}),
|
|
199
|
-
w === "days" && /* @__PURE__ */
|
|
199
|
+
w === "days" && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
|
|
200
200
|
className: "ssg-dp-dow",
|
|
201
|
-
children:
|
|
202
|
-
className:
|
|
201
|
+
children: d.calendarWeekdays.map((e, t) => /* @__PURE__ */ h("span", {
|
|
202
|
+
className: l(t === 0 && "ssg-dp-dow--sun", t === 6 && "ssg-dp-dow--sat"),
|
|
203
203
|
children: e
|
|
204
204
|
}, t))
|
|
205
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ h("div", {
|
|
206
206
|
className: "ssg-dp-days",
|
|
207
|
-
children: z(E, O).map((t) => /* @__PURE__ */
|
|
207
|
+
children: z(E, O).map((t) => /* @__PURE__ */ h("button", {
|
|
208
208
|
type: "button",
|
|
209
|
-
className:
|
|
209
|
+
className: l("ssg-dp-day", !t.inCurrentMonth && "ssg-dp-day--out", t.key === M && "ssg-dp-day--today", t.key === e && "ssg-dp-day--selected"),
|
|
210
210
|
"aria-label": t.key,
|
|
211
211
|
...R(() => I(t.key)),
|
|
212
212
|
children: t.day
|
|
213
213
|
}, t.key))
|
|
214
214
|
})] }),
|
|
215
|
-
w === "months" && /* @__PURE__ */
|
|
215
|
+
w === "months" && /* @__PURE__ */ h("div", {
|
|
216
216
|
className: "ssg-dp-grid",
|
|
217
|
-
children:
|
|
217
|
+
children: d.calendarMonths.map((e, t) => /* @__PURE__ */ h("button", {
|
|
218
218
|
type: "button",
|
|
219
|
-
className:
|
|
219
|
+
className: l("ssg-dp-cell", t === O && "ssg-dp-cell--selected"),
|
|
220
220
|
...R(() => {
|
|
221
221
|
k(t), T("days");
|
|
222
222
|
}),
|
|
223
223
|
children: e
|
|
224
224
|
}, t))
|
|
225
225
|
}),
|
|
226
|
-
w === "years" && /* @__PURE__ */
|
|
226
|
+
w === "years" && /* @__PURE__ */ h("div", {
|
|
227
227
|
className: "ssg-dp-grid",
|
|
228
|
-
children:
|
|
228
|
+
children: B(E).map((e) => /* @__PURE__ */ h("button", {
|
|
229
229
|
type: "button",
|
|
230
|
-
className:
|
|
230
|
+
className: l("ssg-dp-cell", e === E && "ssg-dp-cell--selected"),
|
|
231
231
|
...R(() => {
|
|
232
232
|
D(e), T("months");
|
|
233
233
|
}),
|
|
234
234
|
children: e
|
|
235
235
|
}, e))
|
|
236
236
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ g("div", {
|
|
238
238
|
className: "ssg-dp-foot",
|
|
239
239
|
children: [
|
|
240
|
-
w !== "days" && /* @__PURE__ */
|
|
240
|
+
w !== "days" && /* @__PURE__ */ h("button", {
|
|
241
241
|
type: "button",
|
|
242
242
|
className: "ssg-dp-foot-btn",
|
|
243
243
|
...R(W),
|
|
244
|
-
children:
|
|
244
|
+
children: d.calendarBack
|
|
245
245
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ h("button", {
|
|
247
247
|
type: "button",
|
|
248
248
|
className: "ssg-dp-foot-btn",
|
|
249
249
|
...R(() => I(M)),
|
|
250
|
-
children:
|
|
250
|
+
children: d.calendarToday
|
|
251
251
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ h("button", {
|
|
253
253
|
type: "button",
|
|
254
254
|
className: "ssg-dp-foot-btn ssg-dp-foot-btn--muted",
|
|
255
255
|
...R(() => I("")),
|
|
256
|
-
children:
|
|
256
|
+
children: d.clear
|
|
257
257
|
})
|
|
258
258
|
]
|
|
259
259
|
})
|
|
@@ -263,53 +263,53 @@ function U({ value: e, onCommit: t, ariaLabel: r, inputRef: a, onRequestClose: l
|
|
|
263
263
|
}
|
|
264
264
|
//#endregion
|
|
265
265
|
//#region src/view/ColumnFilterPopover.tsx
|
|
266
|
-
var
|
|
266
|
+
var G = 24, K = (e, t, n) => e === "" && t === U.blank ? n : t, te = (e, t) => t === U.blank ? e : e.map((e) => e.value === "" && e.label === U.blank ? {
|
|
267
267
|
...e,
|
|
268
268
|
label: t
|
|
269
269
|
} : e);
|
|
270
|
-
function
|
|
271
|
-
let w =
|
|
270
|
+
function ne({ options: t, setSelection: n, searchInputRef: a, onValueToggle: l, onSelectAllChange: u, onReplaceSelection: d, onRequestClose: _, isServerSide: v, selectAllUsesExplicitScope: y = !1, truncated: C = !1 }) {
|
|
271
|
+
let w = r(), [T, E] = c(""), D = i(T), O = o(() => te(t, w.blank), [t, w.blank]), k = o(() => b(O, D), [O, D]), A = D.trim().length > 0, j = s(null), M = e({
|
|
272
272
|
count: k.length,
|
|
273
273
|
getScrollElement: () => j.current,
|
|
274
|
-
estimateSize: () =>
|
|
274
|
+
estimateSize: () => G,
|
|
275
275
|
overscan: 10
|
|
276
|
-
}), N =
|
|
277
|
-
if (
|
|
276
|
+
}), N = o(() => {
|
|
277
|
+
if (n === null) return k.length;
|
|
278
278
|
let e = 0;
|
|
279
|
-
for (let t of k) S(
|
|
279
|
+
for (let t of k) S(n, t.value) && (e += 1);
|
|
280
280
|
return e;
|
|
281
|
-
}, [
|
|
282
|
-
if (
|
|
283
|
-
let
|
|
284
|
-
for (let
|
|
285
|
-
return
|
|
281
|
+
}, [n, k]), P = k.length > 0 && N === k.length, F = N > 0 && !P, I = o(() => new Set(t.map((e) => e.value)), [t]), L = o(() => {
|
|
282
|
+
if (n === null) return t.length;
|
|
283
|
+
let e = 0;
|
|
284
|
+
for (let t of n.values) I.has(t) && (e += 1);
|
|
285
|
+
return n.mode === "include" ? e : t.length - e;
|
|
286
286
|
}, [
|
|
287
|
-
|
|
287
|
+
n,
|
|
288
288
|
I,
|
|
289
|
-
|
|
289
|
+
t.length
|
|
290
290
|
]);
|
|
291
|
-
return /* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
ref:
|
|
291
|
+
return /* @__PURE__ */ g(m, { children: [
|
|
292
|
+
/* @__PURE__ */ h("input", {
|
|
293
|
+
ref: a,
|
|
294
294
|
type: "text",
|
|
295
295
|
value: T,
|
|
296
296
|
onChange: (e) => E(e.target.value),
|
|
297
297
|
onKeyDown: (e) => {
|
|
298
298
|
if (e.stopPropagation(), e.key === "Escape" && (e.preventDefault(), _()), e.key === "Enter") {
|
|
299
|
-
if (
|
|
299
|
+
if (f(e.nativeEvent)) return;
|
|
300
300
|
e.preventDefault();
|
|
301
301
|
let t = x(O, T);
|
|
302
302
|
if (t.kind === "none") return;
|
|
303
|
-
t.kind === "replace" &&
|
|
303
|
+
t.kind === "replace" && d(t.values), _();
|
|
304
304
|
}
|
|
305
305
|
},
|
|
306
306
|
placeholder: w.filterSearchPlaceholder,
|
|
307
307
|
"aria-label": w.filterSearchPlaceholder,
|
|
308
308
|
className: "ssg-filter-input"
|
|
309
309
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ g("label", {
|
|
311
311
|
className: "ssg-filter-selectall",
|
|
312
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ h("input", {
|
|
313
313
|
type: "checkbox",
|
|
314
314
|
checked: P,
|
|
315
315
|
ref: (e) => {
|
|
@@ -318,91 +318,91 @@ function te({ options: e, setSelection: i, searchInputRef: c, onValueToggle: l,
|
|
|
318
318
|
onChange: () => {
|
|
319
319
|
u(A || y ? k.map((e) => e.value) : "all", !P);
|
|
320
320
|
}
|
|
321
|
-
}), /* @__PURE__ */
|
|
321
|
+
}), /* @__PURE__ */ h("span", {
|
|
322
322
|
className: "ssg-filter-selectall-label",
|
|
323
323
|
children: A ? w.filterSelectAllResults : w.filterSelectAll
|
|
324
324
|
})]
|
|
325
325
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ h("div", {
|
|
327
327
|
ref: j,
|
|
328
328
|
className: "ssg-filter-list",
|
|
329
|
-
children: k.length === 0 ? /* @__PURE__ */
|
|
329
|
+
children: k.length === 0 ? /* @__PURE__ */ h("div", {
|
|
330
330
|
className: "ssg-filter-empty",
|
|
331
|
-
children:
|
|
332
|
-
}) : /* @__PURE__ */
|
|
331
|
+
children: t.length === 0 ? v ? w.filterNoOptionsSource : w.noOptions : w.filterNoMatches
|
|
332
|
+
}) : /* @__PURE__ */ h("div", {
|
|
333
333
|
className: "ssg-filter-virt",
|
|
334
334
|
style: { height: M.getTotalSize() },
|
|
335
335
|
children: M.getVirtualItems().map((e) => {
|
|
336
336
|
let t = k[e.index];
|
|
337
337
|
if (!t) return null;
|
|
338
|
-
let
|
|
339
|
-
return /* @__PURE__ */
|
|
338
|
+
let r = S(n, t.value);
|
|
339
|
+
return /* @__PURE__ */ g("label", {
|
|
340
340
|
className: "ssg-filter-option",
|
|
341
341
|
style: {
|
|
342
342
|
transform: `translateY(${e.start}px)`,
|
|
343
343
|
height: e.size
|
|
344
344
|
},
|
|
345
|
-
children: [/* @__PURE__ */
|
|
345
|
+
children: [/* @__PURE__ */ h("input", {
|
|
346
346
|
type: "checkbox",
|
|
347
|
-
checked:
|
|
347
|
+
checked: r,
|
|
348
348
|
onChange: () => l(t.value)
|
|
349
|
-
}), /* @__PURE__ */
|
|
349
|
+
}), /* @__PURE__ */ h("span", {
|
|
350
350
|
className: "ssg-filter-option-label",
|
|
351
|
-
children:
|
|
351
|
+
children: K(t.value, t.label, w.blank)
|
|
352
352
|
})]
|
|
353
353
|
}, t.value);
|
|
354
354
|
})
|
|
355
355
|
})
|
|
356
356
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ g("div", {
|
|
358
358
|
className: "ssg-filter-meta",
|
|
359
359
|
children: [
|
|
360
|
-
|
|
360
|
+
p(w.filterSelectedCount, {
|
|
361
361
|
selected: L,
|
|
362
|
-
total:
|
|
362
|
+
total: t.length
|
|
363
363
|
}),
|
|
364
|
-
A ?
|
|
365
|
-
C && /* @__PURE__ */
|
|
364
|
+
A ? p(w.filterShownCount, { count: k.length }) : "",
|
|
365
|
+
C && /* @__PURE__ */ h(le, {})
|
|
366
366
|
]
|
|
367
367
|
})
|
|
368
368
|
] });
|
|
369
369
|
}
|
|
370
370
|
var q = (e) => {
|
|
371
371
|
e.key !== "Escape" && e.stopPropagation();
|
|
372
|
-
},
|
|
373
|
-
if (
|
|
372
|
+
}, re = (e) => e.nativeEvent.isComposing === !0, J = (e, t, n) => {
|
|
373
|
+
if (re(n)) {
|
|
374
374
|
e(t, { commit: !1 });
|
|
375
375
|
return;
|
|
376
376
|
}
|
|
377
377
|
e(t);
|
|
378
378
|
};
|
|
379
|
-
function
|
|
380
|
-
let a =
|
|
381
|
-
return /* @__PURE__ */
|
|
379
|
+
function ie({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i }) {
|
|
380
|
+
let a = r(), o = D(e.operator);
|
|
381
|
+
return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("select", {
|
|
382
382
|
value: e.operator,
|
|
383
|
-
onChange: (t) =>
|
|
383
|
+
onChange: (t) => n({
|
|
384
384
|
...e,
|
|
385
385
|
operator: t.target.value
|
|
386
386
|
}),
|
|
387
387
|
onKeyDown: i,
|
|
388
388
|
className: "ssg-filter-select",
|
|
389
389
|
"aria-label": a.filterOperator,
|
|
390
|
-
children: w.map((e) => /* @__PURE__ */
|
|
390
|
+
children: w.map((e) => /* @__PURE__ */ h("option", {
|
|
391
391
|
value: e.value,
|
|
392
392
|
children: a[e.labelKey]
|
|
393
393
|
}, e.value))
|
|
394
|
-
}), o > 0 ? /* @__PURE__ */
|
|
394
|
+
}), o > 0 ? /* @__PURE__ */ g("div", {
|
|
395
395
|
className: "ssg-filter-cond-values",
|
|
396
|
-
children: [/* @__PURE__ */
|
|
396
|
+
children: [/* @__PURE__ */ h("input", {
|
|
397
397
|
ref: t,
|
|
398
398
|
type: "text",
|
|
399
399
|
inputMode: "decimal",
|
|
400
400
|
value: e.value1,
|
|
401
|
-
onChange: (t) => J(
|
|
401
|
+
onChange: (t) => J(n, {
|
|
402
402
|
...e,
|
|
403
403
|
value1: t.target.value
|
|
404
404
|
}, t),
|
|
405
|
-
onCompositionEnd: (t) =>
|
|
405
|
+
onCompositionEnd: (t) => n({
|
|
406
406
|
...e,
|
|
407
407
|
value1: t.currentTarget.value
|
|
408
408
|
}),
|
|
@@ -410,18 +410,18 @@ function re({ draft: e, valueInputRef: t, onDraftChange: r, onKeyDown: i }) {
|
|
|
410
410
|
placeholder: o === 2 ? a.filterMin : a.filterValuePlaceholder,
|
|
411
411
|
className: "ssg-filter-input",
|
|
412
412
|
"aria-label": o === 2 ? a.filterMin : a.filterValue
|
|
413
|
-
}), o === 2 && /* @__PURE__ */
|
|
413
|
+
}), o === 2 && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
|
|
414
414
|
className: "ssg-filter-cond-tilde",
|
|
415
415
|
children: a.filterRangeSeparator
|
|
416
|
-
}), /* @__PURE__ */
|
|
416
|
+
}), /* @__PURE__ */ h("input", {
|
|
417
417
|
type: "text",
|
|
418
418
|
inputMode: "decimal",
|
|
419
419
|
value: e.value2,
|
|
420
|
-
onChange: (t) => J(
|
|
420
|
+
onChange: (t) => J(n, {
|
|
421
421
|
...e,
|
|
422
422
|
value2: t.target.value
|
|
423
423
|
}, t),
|
|
424
|
-
onCompositionEnd: (t) =>
|
|
424
|
+
onCompositionEnd: (t) => n({
|
|
425
425
|
...e,
|
|
426
426
|
value2: t.currentTarget.value
|
|
427
427
|
}),
|
|
@@ -430,37 +430,37 @@ function re({ draft: e, valueInputRef: t, onDraftChange: r, onKeyDown: i }) {
|
|
|
430
430
|
className: "ssg-filter-input",
|
|
431
431
|
"aria-label": a.filterMax
|
|
432
432
|
})] })]
|
|
433
|
-
}) : /* @__PURE__ */
|
|
433
|
+
}) : /* @__PURE__ */ h("div", {
|
|
434
434
|
className: "ssg-filter-meta",
|
|
435
435
|
children: a.filterNoValue
|
|
436
436
|
})] });
|
|
437
437
|
}
|
|
438
|
-
function
|
|
439
|
-
let a =
|
|
440
|
-
return /* @__PURE__ */
|
|
438
|
+
function ae({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i }) {
|
|
439
|
+
let a = r(), o = M(e.operator);
|
|
440
|
+
return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("select", {
|
|
441
441
|
value: e.operator,
|
|
442
|
-
onChange: (t) =>
|
|
442
|
+
onChange: (t) => n({
|
|
443
443
|
...e,
|
|
444
444
|
operator: t.target.value
|
|
445
445
|
}),
|
|
446
446
|
onKeyDown: i,
|
|
447
447
|
className: "ssg-filter-select",
|
|
448
448
|
"aria-label": a.filterOperator,
|
|
449
|
-
children: k.map((e) => /* @__PURE__ */
|
|
449
|
+
children: k.map((e) => /* @__PURE__ */ h("option", {
|
|
450
450
|
value: e.value,
|
|
451
451
|
children: a[e.labelKey]
|
|
452
452
|
}, e.value))
|
|
453
|
-
}), o > 0 ? /* @__PURE__ */
|
|
453
|
+
}), o > 0 ? /* @__PURE__ */ h("div", {
|
|
454
454
|
className: "ssg-filter-cond-values",
|
|
455
|
-
children: /* @__PURE__ */
|
|
455
|
+
children: /* @__PURE__ */ h("input", {
|
|
456
456
|
ref: t,
|
|
457
457
|
type: "text",
|
|
458
458
|
value: e.value,
|
|
459
|
-
onChange: (t) => J(
|
|
459
|
+
onChange: (t) => J(n, {
|
|
460
460
|
...e,
|
|
461
461
|
value: t.target.value
|
|
462
462
|
}, t),
|
|
463
|
-
onCompositionEnd: (t) =>
|
|
463
|
+
onCompositionEnd: (t) => n({
|
|
464
464
|
...e,
|
|
465
465
|
value: t.currentTarget.value
|
|
466
466
|
}),
|
|
@@ -469,124 +469,124 @@ function ie({ draft: e, valueInputRef: t, onDraftChange: r, onKeyDown: i }) {
|
|
|
469
469
|
className: "ssg-filter-input",
|
|
470
470
|
"aria-label": a.filterValue
|
|
471
471
|
})
|
|
472
|
-
}) : /* @__PURE__ */
|
|
472
|
+
}) : /* @__PURE__ */ h("div", {
|
|
473
473
|
className: "ssg-filter-meta",
|
|
474
474
|
children: a.filterNoValue
|
|
475
475
|
})] });
|
|
476
476
|
}
|
|
477
|
-
function
|
|
478
|
-
let
|
|
479
|
-
|
|
477
|
+
function oe({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i, presets: a, renderDateInput: o, onRequestClose: s }) {
|
|
478
|
+
let c = r(), u = e.preset === null ? I(e.operator) : 0, d = (t, r) => {
|
|
479
|
+
n({
|
|
480
480
|
...e,
|
|
481
|
-
[t]: R(
|
|
481
|
+
[t]: R(r),
|
|
482
482
|
preset: null
|
|
483
483
|
});
|
|
484
484
|
};
|
|
485
|
-
return /* @__PURE__ */
|
|
486
|
-
/* @__PURE__ */
|
|
485
|
+
return /* @__PURE__ */ g(m, { children: [
|
|
486
|
+
/* @__PURE__ */ h("select", {
|
|
487
487
|
value: e.operator,
|
|
488
|
-
onChange: (t) =>
|
|
488
|
+
onChange: (t) => n({
|
|
489
489
|
...e,
|
|
490
490
|
operator: t.target.value,
|
|
491
491
|
preset: null
|
|
492
492
|
}),
|
|
493
493
|
onKeyDown: i,
|
|
494
494
|
className: "ssg-filter-select",
|
|
495
|
-
"aria-label":
|
|
496
|
-
children: N.map((e) => /* @__PURE__ */
|
|
495
|
+
"aria-label": c.filterOperator,
|
|
496
|
+
children: N.map((e) => /* @__PURE__ */ h("option", {
|
|
497
497
|
value: e.value,
|
|
498
|
-
children:
|
|
498
|
+
children: c[e.labelKey]
|
|
499
499
|
}, e.value))
|
|
500
500
|
}),
|
|
501
|
-
u > 0 ? /* @__PURE__ */
|
|
501
|
+
u > 0 ? /* @__PURE__ */ g("div", {
|
|
502
502
|
className: "ssg-filter-cond-values",
|
|
503
503
|
children: [o ? o({
|
|
504
504
|
value: e.value1,
|
|
505
505
|
onChange: (e) => d("value1", e),
|
|
506
|
-
ariaLabel: u === 2 ?
|
|
506
|
+
ariaLabel: u === 2 ? c.filterStartDate : c.filterDate,
|
|
507
507
|
slot: u === 2 ? "from" : "single"
|
|
508
|
-
}) : /* @__PURE__ */
|
|
508
|
+
}) : /* @__PURE__ */ h(W, {
|
|
509
509
|
value: e.value1,
|
|
510
|
-
onCommit: (t) =>
|
|
510
|
+
onCommit: (t) => n({
|
|
511
511
|
...e,
|
|
512
512
|
value1: t,
|
|
513
513
|
preset: null
|
|
514
514
|
}),
|
|
515
|
-
ariaLabel: u === 2 ?
|
|
515
|
+
ariaLabel: u === 2 ? c.filterStartDate : c.filterDate,
|
|
516
516
|
inputRef: t,
|
|
517
517
|
onRequestClose: s
|
|
518
|
-
}), u === 2 && /* @__PURE__ */
|
|
518
|
+
}), u === 2 && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
|
|
519
519
|
className: "ssg-filter-cond-tilde",
|
|
520
|
-
children:
|
|
520
|
+
children: c.filterRangeSeparator
|
|
521
521
|
}), o ? o({
|
|
522
522
|
value: e.value2,
|
|
523
523
|
onChange: (e) => d("value2", e),
|
|
524
|
-
ariaLabel:
|
|
524
|
+
ariaLabel: c.filterEndDate,
|
|
525
525
|
slot: "to"
|
|
526
|
-
}) : /* @__PURE__ */
|
|
526
|
+
}) : /* @__PURE__ */ h(W, {
|
|
527
527
|
value: e.value2,
|
|
528
|
-
onCommit: (t) =>
|
|
528
|
+
onCommit: (t) => n({
|
|
529
529
|
...e,
|
|
530
530
|
value2: t,
|
|
531
531
|
preset: null
|
|
532
532
|
}),
|
|
533
|
-
ariaLabel:
|
|
533
|
+
ariaLabel: c.filterEndDate,
|
|
534
534
|
onRequestClose: s,
|
|
535
535
|
align: "right"
|
|
536
536
|
})] })]
|
|
537
|
-
}) : e.preset === null ? /* @__PURE__ */
|
|
537
|
+
}) : e.preset === null ? /* @__PURE__ */ h("div", {
|
|
538
538
|
className: "ssg-filter-meta",
|
|
539
|
-
children:
|
|
539
|
+
children: c.filterNoValue
|
|
540
540
|
}) : null,
|
|
541
|
-
a.length > 0 && /* @__PURE__ */
|
|
541
|
+
a.length > 0 && /* @__PURE__ */ h("div", {
|
|
542
542
|
className: "ssg-filter-presets",
|
|
543
|
-
children: a.map((t) => /* @__PURE__ */
|
|
543
|
+
children: a.map((t) => /* @__PURE__ */ h("button", {
|
|
544
544
|
type: "button",
|
|
545
|
-
onPointerDown: (
|
|
546
|
-
|
|
545
|
+
onPointerDown: (r) => {
|
|
546
|
+
r.preventDefault(), r.stopPropagation(), n({
|
|
547
547
|
...e,
|
|
548
548
|
preset: e.preset === t.id ? null : t.id
|
|
549
549
|
});
|
|
550
550
|
},
|
|
551
|
-
onKeyDown: (
|
|
552
|
-
q(
|
|
551
|
+
onKeyDown: (r) => {
|
|
552
|
+
q(r), (r.key === "Enter" || r.key === " ") && (r.preventDefault(), n({
|
|
553
553
|
...e,
|
|
554
554
|
preset: e.preset === t.id ? null : t.id
|
|
555
555
|
}));
|
|
556
556
|
},
|
|
557
|
-
className:
|
|
557
|
+
className: l("ssg-filter-preset-chip", e.preset === t.id && "ssg-filter-preset-chip--active"),
|
|
558
558
|
children: t.label
|
|
559
559
|
}, t.id))
|
|
560
560
|
})
|
|
561
561
|
] });
|
|
562
562
|
}
|
|
563
|
-
function
|
|
564
|
-
let C =
|
|
565
|
-
|
|
563
|
+
function se({ options: t, setSelection: n, searchInputRef: a, onValueToggle: l, onSelectAllChange: u, onReplaceSelection: d, onRequestClose: _, isServerSide: v, truncated: y = !1 }) {
|
|
564
|
+
let C = r(), [w, T] = c(""), E = i(w), [D, O] = c(() => /* @__PURE__ */ new Set()), k = E.trim().length > 0, A = o(() => te(t, C.blank), [t, C.blank]), j = o(() => b(A, E), [A, E]), M = o(() => H(t, D, C), [
|
|
565
|
+
t,
|
|
566
566
|
D,
|
|
567
567
|
C
|
|
568
|
-
]), N =
|
|
568
|
+
]), N = s(null), P = k ? j.length : M.length, F = e({
|
|
569
569
|
count: P,
|
|
570
570
|
getScrollElement: () => N.current,
|
|
571
|
-
estimateSize: () =>
|
|
571
|
+
estimateSize: () => G,
|
|
572
572
|
overscan: 10
|
|
573
|
-
}), I =
|
|
573
|
+
}), I = o(() => (k ? j : t).map((e) => e.value), [
|
|
574
574
|
k,
|
|
575
575
|
j,
|
|
576
|
-
|
|
577
|
-
]), L =
|
|
576
|
+
t
|
|
577
|
+
]), L = o(() => {
|
|
578
578
|
let e = 0;
|
|
579
|
-
for (let t of I) S(
|
|
579
|
+
for (let t of I) S(n, t) && (e += 1);
|
|
580
580
|
return e;
|
|
581
|
-
}, [I,
|
|
582
|
-
if (
|
|
583
|
-
let
|
|
584
|
-
for (let
|
|
585
|
-
return
|
|
581
|
+
}, [I, n]), R = I.length > 0 && L === I.length, z = L > 0 && !R, B = o(() => new Set(t.map((e) => e.value)), [t]), ee = o(() => {
|
|
582
|
+
if (n === null) return t.length;
|
|
583
|
+
let e = 0;
|
|
584
|
+
for (let t of n.values) B.has(t) && (e += 1);
|
|
585
|
+
return n.mode === "include" ? e : t.length - e;
|
|
586
586
|
}, [
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
587
|
+
n,
|
|
588
|
+
B,
|
|
589
|
+
t.length
|
|
590
590
|
]), V = (e) => {
|
|
591
591
|
O((t) => {
|
|
592
592
|
let n = new Set(t);
|
|
@@ -594,9 +594,9 @@ function oe({ options: e, setSelection: i, searchInputRef: c, onValueToggle: l,
|
|
|
594
594
|
});
|
|
595
595
|
}, U = (e) => {
|
|
596
596
|
let t = 0;
|
|
597
|
-
for (let
|
|
597
|
+
for (let r of e) S(n, r) && (t += 1);
|
|
598
598
|
return t;
|
|
599
|
-
},
|
|
599
|
+
}, W = (e) => {
|
|
600
600
|
if (e.type === "leaf") {
|
|
601
601
|
l(e.key);
|
|
602
602
|
return;
|
|
@@ -605,8 +605,8 @@ function oe({ options: e, setSelection: i, searchInputRef: c, onValueToggle: l,
|
|
|
605
605
|
u(e.leafKeys, !t);
|
|
606
606
|
}, ne = (e) => {
|
|
607
607
|
let t = U(e.leafKeys), n = e.leafKeys.length > 0 && t === e.leafKeys.length, r = t > 0 && !n;
|
|
608
|
-
return /* @__PURE__ */
|
|
609
|
-
e.type === "group" ? /* @__PURE__ */
|
|
608
|
+
return /* @__PURE__ */ g(m, { children: [
|
|
609
|
+
e.type === "group" ? /* @__PURE__ */ h("button", {
|
|
610
610
|
type: "button",
|
|
611
611
|
onPointerDown: (t) => {
|
|
612
612
|
t.preventDefault(), t.stopPropagation(), V(e.key);
|
|
@@ -617,85 +617,85 @@ function oe({ options: e, setSelection: i, searchInputRef: c, onValueToggle: l,
|
|
|
617
617
|
className: "ssg-filter-tree-toggle",
|
|
618
618
|
"aria-label": e.expanded ? C.treeCollapse : C.treeExpand,
|
|
619
619
|
children: e.expanded ? "▾" : "▸"
|
|
620
|
-
}) : /* @__PURE__ */
|
|
621
|
-
/* @__PURE__ */
|
|
620
|
+
}) : /* @__PURE__ */ h("span", { className: "ssg-filter-tree-toggle ssg-filter-tree-toggle--placeholder" }),
|
|
621
|
+
/* @__PURE__ */ h("input", {
|
|
622
622
|
type: "checkbox",
|
|
623
623
|
checked: n,
|
|
624
624
|
ref: (e) => {
|
|
625
625
|
e && (e.indeterminate = r);
|
|
626
626
|
},
|
|
627
|
-
"aria-label":
|
|
628
|
-
onChange: () =>
|
|
627
|
+
"aria-label": K(e.key, e.label, C.blank),
|
|
628
|
+
onChange: () => W(e)
|
|
629
629
|
}),
|
|
630
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ h("span", {
|
|
631
631
|
className: "ssg-filter-option-label",
|
|
632
|
-
children:
|
|
632
|
+
children: K(e.key, e.label, C.blank)
|
|
633
633
|
})
|
|
634
634
|
] });
|
|
635
635
|
};
|
|
636
|
-
return /* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
ref:
|
|
636
|
+
return /* @__PURE__ */ g(m, { children: [
|
|
637
|
+
/* @__PURE__ */ h("input", {
|
|
638
|
+
ref: a,
|
|
639
639
|
type: "text",
|
|
640
640
|
value: w,
|
|
641
641
|
onChange: (e) => T(e.target.value),
|
|
642
642
|
onKeyDown: (e) => {
|
|
643
643
|
if (e.stopPropagation(), e.key === "Escape" && (e.preventDefault(), _()), e.key === "Enter") {
|
|
644
|
-
if (
|
|
644
|
+
if (f(e.nativeEvent)) return;
|
|
645
645
|
e.preventDefault();
|
|
646
646
|
let t = x(A, w);
|
|
647
647
|
if (t.kind === "none") return;
|
|
648
|
-
t.kind === "replace" &&
|
|
648
|
+
t.kind === "replace" && d(t.values), _();
|
|
649
649
|
}
|
|
650
650
|
},
|
|
651
651
|
placeholder: C.filterSearchPlaceholder,
|
|
652
652
|
"aria-label": C.filterSearchPlaceholder,
|
|
653
653
|
className: "ssg-filter-input"
|
|
654
654
|
}),
|
|
655
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ g("label", {
|
|
656
656
|
className: "ssg-filter-selectall",
|
|
657
|
-
children: [/* @__PURE__ */
|
|
657
|
+
children: [/* @__PURE__ */ h("input", {
|
|
658
658
|
type: "checkbox",
|
|
659
659
|
checked: R,
|
|
660
660
|
ref: (e) => {
|
|
661
661
|
e && (e.indeterminate = z);
|
|
662
662
|
},
|
|
663
663
|
onChange: () => u(I, !R)
|
|
664
|
-
}), /* @__PURE__ */
|
|
664
|
+
}), /* @__PURE__ */ h("span", {
|
|
665
665
|
className: "ssg-filter-selectall-label",
|
|
666
666
|
children: k ? C.filterSelectAllResults : C.filterSelectAll
|
|
667
667
|
})]
|
|
668
668
|
}),
|
|
669
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ h("div", {
|
|
670
670
|
ref: N,
|
|
671
671
|
className: "ssg-filter-list",
|
|
672
|
-
children: P === 0 ? /* @__PURE__ */
|
|
672
|
+
children: P === 0 ? /* @__PURE__ */ h("div", {
|
|
673
673
|
className: "ssg-filter-empty",
|
|
674
|
-
children:
|
|
675
|
-
}) : /* @__PURE__ */
|
|
674
|
+
children: t.length === 0 ? v ? C.filterNoOptionsSource : C.noOptions : C.filterNoMatches
|
|
675
|
+
}) : /* @__PURE__ */ h("div", {
|
|
676
676
|
className: "ssg-filter-virt",
|
|
677
677
|
style: { height: F.getTotalSize() },
|
|
678
678
|
children: F.getVirtualItems().map((e) => {
|
|
679
679
|
if (k) {
|
|
680
680
|
let t = j[e.index];
|
|
681
|
-
return t ? /* @__PURE__ */
|
|
681
|
+
return t ? /* @__PURE__ */ g("label", {
|
|
682
682
|
className: "ssg-filter-option",
|
|
683
683
|
style: {
|
|
684
684
|
transform: `translateY(${e.start}px)`,
|
|
685
685
|
height: e.size
|
|
686
686
|
},
|
|
687
|
-
children: [/* @__PURE__ */
|
|
687
|
+
children: [/* @__PURE__ */ h("input", {
|
|
688
688
|
type: "checkbox",
|
|
689
|
-
checked: S(
|
|
689
|
+
checked: S(n, t.value),
|
|
690
690
|
onChange: () => l(t.value)
|
|
691
|
-
}), /* @__PURE__ */
|
|
691
|
+
}), /* @__PURE__ */ h("span", {
|
|
692
692
|
className: "ssg-filter-option-label",
|
|
693
|
-
children:
|
|
693
|
+
children: K(t.value, t.label, C.blank)
|
|
694
694
|
})]
|
|
695
695
|
}, t.value) : null;
|
|
696
696
|
}
|
|
697
697
|
let t = M[e.index];
|
|
698
|
-
return t ? /* @__PURE__ */
|
|
698
|
+
return t ? /* @__PURE__ */ h("div", {
|
|
699
699
|
className: "ssg-filter-option",
|
|
700
700
|
style: {
|
|
701
701
|
transform: `translateY(${e.start}px)`,
|
|
@@ -703,48 +703,48 @@ function oe({ options: e, setSelection: i, searchInputRef: c, onValueToggle: l,
|
|
|
703
703
|
paddingLeft: 8 + t.depth * 16
|
|
704
704
|
},
|
|
705
705
|
onClick: (e) => {
|
|
706
|
-
e.target.closest("button, input") ||
|
|
706
|
+
e.target.closest("button, input") || W(t);
|
|
707
707
|
},
|
|
708
708
|
children: ne(t)
|
|
709
709
|
}, t.key) : null;
|
|
710
710
|
})
|
|
711
711
|
})
|
|
712
712
|
}),
|
|
713
|
-
/* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ g("div", {
|
|
714
714
|
className: "ssg-filter-meta",
|
|
715
715
|
children: [
|
|
716
|
-
|
|
717
|
-
selected:
|
|
718
|
-
total:
|
|
716
|
+
p(C.filterSelectedCount, {
|
|
717
|
+
selected: ee,
|
|
718
|
+
total: t.length
|
|
719
719
|
}),
|
|
720
|
-
k ?
|
|
721
|
-
y && /* @__PURE__ */
|
|
720
|
+
k ? p(C.filterShownCount, { count: j.length }) : "",
|
|
721
|
+
y && /* @__PURE__ */ h(le, {})
|
|
722
722
|
]
|
|
723
723
|
})
|
|
724
724
|
] });
|
|
725
725
|
}
|
|
726
|
-
function
|
|
727
|
-
let i =
|
|
728
|
-
return e === "loading" ? /* @__PURE__ */
|
|
726
|
+
function ce({ status: e, errorMessage: t, onRetry: n }) {
|
|
727
|
+
let i = r();
|
|
728
|
+
return e === "loading" ? /* @__PURE__ */ h("div", {
|
|
729
729
|
className: "ssg-filter-collecting",
|
|
730
730
|
children: i.filterOptionsLoading
|
|
731
|
-
}) : /* @__PURE__ */
|
|
731
|
+
}) : /* @__PURE__ */ g("div", {
|
|
732
732
|
className: "ssg-filter-error",
|
|
733
733
|
role: "alert",
|
|
734
734
|
children: [
|
|
735
|
-
/* @__PURE__ */
|
|
736
|
-
t ? /* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ h("div", { children: i.filterOptionsFailed }),
|
|
736
|
+
t ? /* @__PURE__ */ h("div", {
|
|
737
737
|
className: "ssg-filter-error-detail",
|
|
738
738
|
title: t,
|
|
739
739
|
children: t
|
|
740
740
|
}) : null,
|
|
741
|
-
|
|
741
|
+
n ? /* @__PURE__ */ h("button", {
|
|
742
742
|
type: "button",
|
|
743
743
|
onPointerDown: (e) => {
|
|
744
|
-
e.preventDefault(), e.stopPropagation(),
|
|
744
|
+
e.preventDefault(), e.stopPropagation(), n();
|
|
745
745
|
},
|
|
746
746
|
onKeyDown: (e) => {
|
|
747
|
-
q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
747
|
+
q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n());
|
|
748
748
|
},
|
|
749
749
|
className: "ssg-filter-btn-secondary",
|
|
750
750
|
children: i.retry
|
|
@@ -752,27 +752,27 @@ function se({ status: e, errorMessage: t, onRetry: r }) {
|
|
|
752
752
|
]
|
|
753
753
|
});
|
|
754
754
|
}
|
|
755
|
-
function
|
|
756
|
-
return /* @__PURE__ */
|
|
755
|
+
function le() {
|
|
756
|
+
return /* @__PURE__ */ h("span", {
|
|
757
757
|
className: "ssg-filter-truncated",
|
|
758
|
-
children:
|
|
758
|
+
children: r().filterOptionsTruncated
|
|
759
759
|
});
|
|
760
760
|
}
|
|
761
|
-
function
|
|
762
|
-
let u =
|
|
763
|
-
return /* @__PURE__ */
|
|
764
|
-
/* @__PURE__ */
|
|
761
|
+
function ue({ conditionEditor: e, conditionActive: t, onConditionClear: n, options: i, setSelection: a, onSelectionClear: o, summaryText: s, children: c, optionsMeta: l }) {
|
|
762
|
+
let u = r();
|
|
763
|
+
return /* @__PURE__ */ g(m, { children: [
|
|
764
|
+
/* @__PURE__ */ g("div", {
|
|
765
765
|
className: "ssg-filter-sec-head",
|
|
766
|
-
children: [/* @__PURE__ */
|
|
766
|
+
children: [/* @__PURE__ */ h("span", {
|
|
767
767
|
className: "ssg-filter-sec-label",
|
|
768
768
|
children: u.filterConditionSection
|
|
769
|
-
}), /* @__PURE__ */
|
|
769
|
+
}), /* @__PURE__ */ h("button", {
|
|
770
770
|
type: "button",
|
|
771
771
|
onPointerDown: (e) => {
|
|
772
|
-
e.preventDefault(), e.stopPropagation(),
|
|
772
|
+
e.preventDefault(), e.stopPropagation(), n();
|
|
773
773
|
},
|
|
774
774
|
onKeyDown: (e) => {
|
|
775
|
-
q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
775
|
+
q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n());
|
|
776
776
|
},
|
|
777
777
|
className: "ssg-filter-sec-clear",
|
|
778
778
|
disabled: !t,
|
|
@@ -780,19 +780,19 @@ function le({ conditionEditor: e, conditionActive: t, onConditionClear: r, optio
|
|
|
780
780
|
})]
|
|
781
781
|
}),
|
|
782
782
|
e,
|
|
783
|
-
/* @__PURE__ */
|
|
784
|
-
/* @__PURE__ */
|
|
783
|
+
/* @__PURE__ */ h("div", { className: "ssg-filter-sep" }),
|
|
784
|
+
/* @__PURE__ */ g("div", {
|
|
785
785
|
className: "ssg-filter-sec-head",
|
|
786
786
|
children: [
|
|
787
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ h("span", {
|
|
788
788
|
className: "ssg-filter-sec-label",
|
|
789
789
|
children: u.filterValuesSection
|
|
790
790
|
}),
|
|
791
|
-
/* @__PURE__ */
|
|
791
|
+
/* @__PURE__ */ h("span", {
|
|
792
792
|
className: "ssg-filter-sec-meta",
|
|
793
|
-
children: l ??
|
|
793
|
+
children: l ?? p(t ? u.filterMatchCount : u.filterTotalCount, { count: i.length })
|
|
794
794
|
}),
|
|
795
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ h("button", {
|
|
796
796
|
type: "button",
|
|
797
797
|
onPointerDown: (e) => {
|
|
798
798
|
e.preventDefault(), e.stopPropagation(), o();
|
|
@@ -807,159 +807,161 @@ function le({ conditionEditor: e, conditionActive: t, onConditionClear: r, optio
|
|
|
807
807
|
]
|
|
808
808
|
}),
|
|
809
809
|
c,
|
|
810
|
-
/* @__PURE__ */
|
|
810
|
+
/* @__PURE__ */ g("div", {
|
|
811
811
|
className: "ssg-filter-summary",
|
|
812
812
|
children: ["🔽 ", s]
|
|
813
813
|
})
|
|
814
814
|
] });
|
|
815
815
|
}
|
|
816
|
-
function
|
|
817
|
-
let Q =
|
|
818
|
-
|
|
819
|
-
let
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
},
|
|
827
|
-
|
|
816
|
+
function de({ isOpen: e, themeClassName: i, popoverSlot: a, title: o, filterType: _, draftValue: b, numberConditionDraft: x, onNumberConditionDraftChange: S, textConditionDraft: w, onTextConditionDraftChange: D, dateConditionDraft: k, onDateConditionDraftChange: M, datePresets: N, renderDateInput: I, onComboConditionClear: R, onComboSelectionClear: z, comboSummaryText: B, currentValueText: ee, layout: V, selectOptions: H, optionsStatus: U, optionsProgress: W, optionsTruncated: G = !1, optionsErrorMessage: te, onOptionsRetry: re, setSelection: J, popoverRef: de, textInputRef: Y, selectRef: fe, onRequestClose: X, onDraftChange: pe, onApply: Z, onClear: me, onSetValueToggle: he, onSetSelectAllChange: ge, onSetClear: _e, onSetReplaceSelection: ve, isServerSide: ye = !1 }) {
|
|
817
|
+
let Q = r(), be = s(null), [xe] = c(() => /* @__PURE__ */ new Date());
|
|
818
|
+
t(de, e && V !== null, i, { layout: V });
|
|
819
|
+
let Se = n(e && V !== null);
|
|
820
|
+
if (typeof document > "u" || !e || !V || !Se) return null;
|
|
821
|
+
let Ce = {
|
|
822
|
+
top: V.top,
|
|
823
|
+
left: V.left,
|
|
824
|
+
width: V.width,
|
|
825
|
+
maxHeight: V.maxHeight
|
|
826
|
+
}, we = (e) => {
|
|
827
|
+
e.stopPropagation(), e.key === "Escape" && !d(e.nativeEvent) && !f(e.nativeEvent) && (e.preventDefault(), X());
|
|
828
|
+
}, Te = (e) => {
|
|
829
|
+
if (e.key !== "Tab" || e.altKey || e.ctrlKey || e.metaKey || f(e.nativeEvent)) return;
|
|
828
830
|
let t = y(e.currentTarget, e.target instanceof Element ? e.target : null, e.shiftKey);
|
|
829
831
|
t !== null && (e.preventDefault(), t.focus());
|
|
830
|
-
},
|
|
832
|
+
}, Ee = (e) => {
|
|
831
833
|
e.stopPropagation();
|
|
832
|
-
},
|
|
833
|
-
if (e.stopPropagation(), !
|
|
834
|
+
}, De = _ === "set", Oe = _ === "numberSet", ke = _ === "textSet", Ae = _ === "dateSet", je = Oe || ke || Ae, Me = De || je, Ne = U === "loading" || U === "error", Pe = x ?? C, Fe = w ?? O, Ie = k ?? P, Le = N ?? v(void 0, Q), Re = Oe ? T(Pe) : null, ze = ke ? A(Fe) : null, Be = Ae ? F(Ie) : null, Ve = Re !== null || ze !== null || Be !== null, $ = Oe ? E(H, Re) : ke ? j(H, ze) : Ae ? L(H, Be, xe, Le) : H, He = (e) => {
|
|
835
|
+
if (e.stopPropagation(), !f(e.nativeEvent)) {
|
|
834
836
|
if (e.key === "Enter") {
|
|
835
837
|
e.preventDefault(), Z();
|
|
836
838
|
return;
|
|
837
839
|
}
|
|
838
840
|
e.key === "Escape" && (e.preventDefault(), X());
|
|
839
841
|
}
|
|
840
|
-
},
|
|
841
|
-
draft:
|
|
842
|
+
}, Ue = Oe ? /* @__PURE__ */ h(ie, {
|
|
843
|
+
draft: Pe,
|
|
842
844
|
valueInputRef: Y,
|
|
843
|
-
onDraftChange:
|
|
844
|
-
onKeyDown:
|
|
845
|
-
}) :
|
|
846
|
-
draft:
|
|
845
|
+
onDraftChange: S,
|
|
846
|
+
onKeyDown: He
|
|
847
|
+
}) : ke ? /* @__PURE__ */ h(ae, {
|
|
848
|
+
draft: Fe,
|
|
847
849
|
valueInputRef: Y,
|
|
848
|
-
onDraftChange:
|
|
849
|
-
onKeyDown:
|
|
850
|
-
}) : /* @__PURE__ */
|
|
851
|
-
draft:
|
|
850
|
+
onDraftChange: D,
|
|
851
|
+
onKeyDown: He
|
|
852
|
+
}) : /* @__PURE__ */ h(oe, {
|
|
853
|
+
draft: Ie,
|
|
852
854
|
valueInputRef: Y,
|
|
853
|
-
onDraftChange:
|
|
854
|
-
onKeyDown:
|
|
855
|
-
presets:
|
|
856
|
-
renderDateInput:
|
|
855
|
+
onDraftChange: M,
|
|
856
|
+
onKeyDown: He,
|
|
857
|
+
presets: Le,
|
|
858
|
+
renderDateInput: I,
|
|
857
859
|
onRequestClose: X
|
|
858
860
|
});
|
|
859
|
-
return
|
|
860
|
-
ref:
|
|
861
|
-
onPointerDown:
|
|
862
|
-
onKeyDown:
|
|
863
|
-
onKeyDownCapture:
|
|
861
|
+
return u(/* @__PURE__ */ g("div", {
|
|
862
|
+
ref: de,
|
|
863
|
+
onPointerDown: Ee,
|
|
864
|
+
onKeyDown: we,
|
|
865
|
+
onKeyDownCapture: Te,
|
|
864
866
|
onPasteCapture: (e) => {
|
|
865
867
|
e.stopPropagation();
|
|
866
868
|
},
|
|
867
|
-
className:
|
|
869
|
+
className: l("ssg-filter-popover", i, a?.className),
|
|
868
870
|
style: {
|
|
869
|
-
...
|
|
870
|
-
...
|
|
871
|
+
...a?.style,
|
|
872
|
+
...Ce
|
|
871
873
|
},
|
|
872
874
|
role: "dialog",
|
|
873
|
-
"aria-label":
|
|
875
|
+
"aria-label": p(Q.filterTitle, { column: o }),
|
|
874
876
|
tabIndex: -1,
|
|
875
877
|
children: [
|
|
876
|
-
/* @__PURE__ */
|
|
878
|
+
/* @__PURE__ */ h("div", {
|
|
877
879
|
className: "ssg-filter-title",
|
|
878
|
-
children:
|
|
880
|
+
children: p(Q.filterTitle, { column: o })
|
|
879
881
|
}),
|
|
880
|
-
(
|
|
881
|
-
conditionEditor:
|
|
882
|
-
conditionActive:
|
|
883
|
-
onConditionClear:
|
|
882
|
+
(Me || _ === "select") && U === "collecting" ? je ? /* @__PURE__ */ h(ue, {
|
|
883
|
+
conditionEditor: Ue,
|
|
884
|
+
conditionActive: Ve,
|
|
885
|
+
onConditionClear: R,
|
|
884
886
|
options: $,
|
|
885
887
|
setSelection: J,
|
|
886
|
-
onSelectionClear:
|
|
887
|
-
summaryText:
|
|
888
|
+
onSelectionClear: z,
|
|
889
|
+
summaryText: B,
|
|
888
890
|
optionsMeta: Q.filterOptionsLoadingShort,
|
|
889
|
-
children: /* @__PURE__ */
|
|
891
|
+
children: /* @__PURE__ */ h("div", {
|
|
890
892
|
className: "ssg-filter-collecting",
|
|
891
|
-
children:
|
|
893
|
+
children: p(Q.filterCollecting, { percent: Math.round(W * 100) })
|
|
892
894
|
})
|
|
893
|
-
}) : /* @__PURE__ */
|
|
895
|
+
}) : /* @__PURE__ */ h("div", {
|
|
894
896
|
className: "ssg-filter-collecting",
|
|
895
|
-
children:
|
|
896
|
-
}) : (
|
|
897
|
-
conditionEditor:
|
|
898
|
-
conditionActive:
|
|
899
|
-
onConditionClear:
|
|
897
|
+
children: p(Q.filterCollecting, { percent: Math.round(W * 100) })
|
|
898
|
+
}) : (Me || _ === "select") && Ne ? je ? /* @__PURE__ */ h(ue, {
|
|
899
|
+
conditionEditor: Ue,
|
|
900
|
+
conditionActive: Ve,
|
|
901
|
+
onConditionClear: R,
|
|
900
902
|
options: $,
|
|
901
903
|
setSelection: J,
|
|
902
|
-
onSelectionClear:
|
|
903
|
-
summaryText:
|
|
904
|
-
optionsMeta:
|
|
905
|
-
children: /* @__PURE__ */
|
|
906
|
-
status:
|
|
907
|
-
errorMessage:
|
|
908
|
-
onRetry:
|
|
904
|
+
onSelectionClear: z,
|
|
905
|
+
summaryText: B,
|
|
906
|
+
optionsMeta: U === "loading" ? Q.filterOptionsLoadingShort : Q.filterOptionsFailedShort,
|
|
907
|
+
children: /* @__PURE__ */ h(ce, {
|
|
908
|
+
status: U === "loading" ? "loading" : "error",
|
|
909
|
+
errorMessage: te,
|
|
910
|
+
onRetry: re
|
|
909
911
|
})
|
|
910
|
-
}) : /* @__PURE__ */
|
|
911
|
-
status:
|
|
912
|
-
errorMessage:
|
|
913
|
-
onRetry:
|
|
914
|
-
}) :
|
|
915
|
-
conditionEditor:
|
|
916
|
-
conditionActive:
|
|
917
|
-
onConditionClear:
|
|
912
|
+
}) : /* @__PURE__ */ h(ce, {
|
|
913
|
+
status: U === "loading" ? "loading" : "error",
|
|
914
|
+
errorMessage: te,
|
|
915
|
+
onRetry: re
|
|
916
|
+
}) : je ? /* @__PURE__ */ h(ue, {
|
|
917
|
+
conditionEditor: Ue,
|
|
918
|
+
conditionActive: Ve,
|
|
919
|
+
onConditionClear: R,
|
|
918
920
|
options: $,
|
|
919
921
|
setSelection: J,
|
|
920
|
-
onSelectionClear:
|
|
921
|
-
summaryText:
|
|
922
|
-
children:
|
|
922
|
+
onSelectionClear: z,
|
|
923
|
+
summaryText: B,
|
|
924
|
+
children: Ae ? /* @__PURE__ */ h(se, {
|
|
923
925
|
options: $,
|
|
924
926
|
setSelection: J,
|
|
925
|
-
searchInputRef:
|
|
926
|
-
onValueToggle:
|
|
927
|
-
onSelectAllChange:
|
|
928
|
-
onReplaceSelection:
|
|
927
|
+
searchInputRef: be,
|
|
928
|
+
onValueToggle: he,
|
|
929
|
+
onSelectAllChange: ge,
|
|
930
|
+
onReplaceSelection: ve,
|
|
929
931
|
onRequestClose: X,
|
|
930
|
-
isServerSide:
|
|
931
|
-
truncated:
|
|
932
|
-
}) : /* @__PURE__ */
|
|
932
|
+
isServerSide: ye,
|
|
933
|
+
truncated: G
|
|
934
|
+
}) : /* @__PURE__ */ h(ne, {
|
|
933
935
|
options: $,
|
|
934
936
|
setSelection: J,
|
|
935
|
-
searchInputRef:
|
|
936
|
-
onValueToggle:
|
|
937
|
-
onSelectAllChange:
|
|
938
|
-
onReplaceSelection:
|
|
937
|
+
searchInputRef: be,
|
|
938
|
+
onValueToggle: he,
|
|
939
|
+
onSelectAllChange: ge,
|
|
940
|
+
onReplaceSelection: ve,
|
|
939
941
|
onRequestClose: X,
|
|
940
|
-
isServerSide:
|
|
942
|
+
isServerSide: ye,
|
|
941
943
|
selectAllUsesExplicitScope: !0,
|
|
942
|
-
truncated:
|
|
944
|
+
truncated: G
|
|
943
945
|
})
|
|
944
|
-
}) :
|
|
945
|
-
options:
|
|
946
|
+
}) : De ? /* @__PURE__ */ h(ne, {
|
|
947
|
+
options: H,
|
|
946
948
|
setSelection: J,
|
|
947
949
|
searchInputRef: Y,
|
|
948
|
-
onValueToggle:
|
|
949
|
-
onSelectAllChange:
|
|
950
|
-
onReplaceSelection:
|
|
950
|
+
onValueToggle: he,
|
|
951
|
+
onSelectAllChange: ge,
|
|
952
|
+
onReplaceSelection: ve,
|
|
951
953
|
onRequestClose: X,
|
|
952
|
-
isServerSide:
|
|
953
|
-
truncated:
|
|
954
|
-
}) :
|
|
955
|
-
draft:
|
|
954
|
+
isServerSide: ye,
|
|
955
|
+
truncated: G
|
|
956
|
+
}) : _ === "number" ? /* @__PURE__ */ h(m, { children: /* @__PURE__ */ h(ie, {
|
|
957
|
+
draft: Pe,
|
|
956
958
|
valueInputRef: Y,
|
|
957
|
-
onDraftChange:
|
|
958
|
-
onKeyDown:
|
|
959
|
-
}) }) :
|
|
960
|
-
ref:
|
|
961
|
-
value:
|
|
962
|
-
onChange: (e) =>
|
|
959
|
+
onDraftChange: S,
|
|
960
|
+
onKeyDown: He
|
|
961
|
+
}) }) : _ === "select" ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("select", {
|
|
962
|
+
ref: fe,
|
|
963
|
+
value: b,
|
|
964
|
+
onChange: (e) => pe(e.target.value),
|
|
963
965
|
onKeyDown: (e) => {
|
|
964
966
|
if (e.stopPropagation(), e.key === "Enter") {
|
|
965
967
|
e.preventDefault(), Z();
|
|
@@ -968,23 +970,23 @@ function ue({ isOpen: t, themeClassName: r, popoverSlot: i, title: a, filterType
|
|
|
968
970
|
e.key === "Escape" && (e.preventDefault(), X());
|
|
969
971
|
},
|
|
970
972
|
className: "ssg-filter-select",
|
|
971
|
-
children: [/* @__PURE__ */
|
|
973
|
+
children: [/* @__PURE__ */ h("option", {
|
|
972
974
|
value: "",
|
|
973
975
|
children: Q.filterAll
|
|
974
|
-
}),
|
|
976
|
+
}), H.map((e) => /* @__PURE__ */ h("option", {
|
|
975
977
|
value: e.value,
|
|
976
|
-
children:
|
|
977
|
-
}, `${
|
|
978
|
-
}), /* @__PURE__ */
|
|
978
|
+
children: K(e.value, e.label, Q.blank)
|
|
979
|
+
}, `${o}-${e.value}`))]
|
|
980
|
+
}), /* @__PURE__ */ g("div", {
|
|
979
981
|
className: "ssg-filter-meta",
|
|
980
|
-
children: [
|
|
981
|
-
})] }) : /* @__PURE__ */
|
|
982
|
+
children: [p(Q.filterOptionCount, { count: H.length }), G && /* @__PURE__ */ h(le, {})]
|
|
983
|
+
})] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("input", {
|
|
982
984
|
ref: Y,
|
|
983
985
|
type: "text",
|
|
984
|
-
value:
|
|
985
|
-
onChange: (e) =>
|
|
986
|
+
value: b,
|
|
987
|
+
onChange: (e) => pe(e.target.value),
|
|
986
988
|
onKeyDown: (e) => {
|
|
987
|
-
if (e.stopPropagation(), !
|
|
989
|
+
if (e.stopPropagation(), !f(e.nativeEvent)) {
|
|
988
990
|
if (e.key === "Enter") {
|
|
989
991
|
e.preventDefault(), Z();
|
|
990
992
|
return;
|
|
@@ -995,27 +997,27 @@ function ue({ isOpen: t, themeClassName: r, popoverSlot: i, title: a, filterType
|
|
|
995
997
|
placeholder: Q.filterTextPlaceholder,
|
|
996
998
|
"aria-label": Q.filterTextPlaceholder,
|
|
997
999
|
className: "ssg-filter-input"
|
|
998
|
-
}), /* @__PURE__ */
|
|
1000
|
+
}), /* @__PURE__ */ h("div", {
|
|
999
1001
|
className: "ssg-filter-meta ssg-filter-meta--ellipsis",
|
|
1000
1002
|
children: Q.filterTextHint
|
|
1001
1003
|
})] }),
|
|
1002
|
-
!
|
|
1004
|
+
!Me && /* @__PURE__ */ h("div", {
|
|
1003
1005
|
className: "ssg-filter-meta ssg-filter-meta--ellipsis",
|
|
1004
|
-
children:
|
|
1006
|
+
children: p(Q.filterCurrentValue, { value: ee })
|
|
1005
1007
|
}),
|
|
1006
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ h("div", {
|
|
1007
1009
|
className: "ssg-filter-footer",
|
|
1008
|
-
children:
|
|
1010
|
+
children: Me ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
|
|
1009
1011
|
type: "button",
|
|
1010
1012
|
onPointerDown: (e) => {
|
|
1011
|
-
e.preventDefault(), e.stopPropagation(),
|
|
1013
|
+
e.preventDefault(), e.stopPropagation(), _e();
|
|
1012
1014
|
},
|
|
1013
1015
|
onKeyDown: (e) => {
|
|
1014
|
-
q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
1016
|
+
q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), _e());
|
|
1015
1017
|
},
|
|
1016
1018
|
className: "ssg-filter-btn-secondary",
|
|
1017
1019
|
children: Q.clear
|
|
1018
|
-
}), /* @__PURE__ */
|
|
1020
|
+
}), /* @__PURE__ */ h("button", {
|
|
1019
1021
|
type: "button",
|
|
1020
1022
|
onPointerDown: (e) => {
|
|
1021
1023
|
e.preventDefault(), e.stopPropagation(), X();
|
|
@@ -1025,17 +1027,17 @@ function ue({ isOpen: t, themeClassName: r, popoverSlot: i, title: a, filterType
|
|
|
1025
1027
|
},
|
|
1026
1028
|
className: "ssg-filter-btn-primary",
|
|
1027
1029
|
children: Q.close
|
|
1028
|
-
})] }) : /* @__PURE__ */
|
|
1030
|
+
})] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
|
|
1029
1031
|
type: "button",
|
|
1030
1032
|
onPointerDown: (e) => {
|
|
1031
|
-
e.preventDefault(), e.stopPropagation(),
|
|
1033
|
+
e.preventDefault(), e.stopPropagation(), me();
|
|
1032
1034
|
},
|
|
1033
1035
|
onKeyDown: (e) => {
|
|
1034
|
-
q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
1036
|
+
q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), me());
|
|
1035
1037
|
},
|
|
1036
1038
|
className: "ssg-filter-btn-secondary",
|
|
1037
1039
|
children: Q.clear
|
|
1038
|
-
}), /* @__PURE__ */
|
|
1040
|
+
}), /* @__PURE__ */ h("button", {
|
|
1039
1041
|
type: "button",
|
|
1040
1042
|
onPointerDown: (e) => {
|
|
1041
1043
|
e.preventDefault(), e.stopPropagation(), Z();
|
|
@@ -1048,7 +1050,7 @@ function ue({ isOpen: t, themeClassName: r, popoverSlot: i, title: a, filterType
|
|
|
1048
1050
|
})] })
|
|
1049
1051
|
})
|
|
1050
1052
|
]
|
|
1051
|
-
}),
|
|
1053
|
+
}), Se);
|
|
1052
1054
|
}
|
|
1053
1055
|
//#endregion
|
|
1054
|
-
export {
|
|
1056
|
+
export { de as ColumnFilterPopover, de as default };
|