@ishibashi0112/spreadsheet-grid 1.0.0 → 1.0.2
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 +132 -108
- package/README.md +6 -6
- package/dist/ColumnFilterPopover-BEeU4H00.cjs +1 -0
- package/dist/ColumnFilterPopover-CTJGE2vR.js +1054 -0
- package/dist/ai/GridAskBar.d.ts +5 -5
- package/dist/ai/useGridAsk.d.ts +8 -8
- package/dist/ai.cjs +1 -1
- package/dist/ai.js +13 -13
- package/dist/editors/DateCellEditor.d.ts +3 -1
- package/dist/editors/NumberCellEditor.d.ts +2 -1
- package/dist/editors/SelectCellEditor.d.ts +2 -1
- package/dist/editors/TextCellEditor.d.ts +2 -1
- package/dist/editors/editorVisibleBounds.d.ts +10 -0
- package/dist/features/types.d.ts +33 -33
- package/dist/hooks/useColumnSelectOptionsCollector.d.ts +2 -1
- package/dist/hooks/useGridLocaleText.d.ts +1 -1
- package/dist/hooks/useGridViewportSync.d.ts +2 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +3340 -2988
- package/dist/lite/ColumnFilterPopover-B0Ry9U-4.cjs +1 -0
- package/dist/lite/ColumnFilterPopover-D87ZPNhR.js +1054 -0
- package/dist/lite/columnMenu-C8LMgSDh.cjs +1 -0
- package/dist/lite/{columnMenu-tZSAVFch.js → columnMenu-DImtqeXz.js} +27 -12
- package/dist/lite/createSpreadsheetGrid-DfL9QD8j.cjs +7 -0
- package/dist/lite/createSpreadsheetGrid-Vysclx0F.js +4614 -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/filtering.cjs +1 -1
- package/dist/lite/features/filtering.js +1 -1
- package/dist/lite/features/labelRow.cjs +1 -1
- package/dist/lite/features/labelRow.js +1 -1
- package/dist/lite/features/rowDrag.cjs +1 -1
- package/dist/lite/features/rowDrag.js +1 -1
- package/dist/lite/features/selectionAggregates.cjs +1 -1
- package/dist/lite/features/selectionAggregates.js +1 -1
- 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/filtering-D7E6KUld.js +411 -0
- package/dist/lite/filtering-cR2EpvA4.cjs +1 -0
- package/dist/lite/{labelRow-BNZoTxsT.js → labelRow-C9mLsqiB.js} +1 -0
- package/dist/lite/labelRow-D434smUt.cjs +1 -0
- package/dist/lite/{lazyPopups-DVqRlLJf.js → lazyPopups-CoX4Zxvb.js} +1 -1
- package/dist/lite/{lazyPopups-BJXlFn1p.cjs → lazyPopups-D0tOufrR.cjs} +1 -1
- package/dist/lite/{rowDrag-BbE6--vV.js → rowDrag-BDYMGwvB.js} +1 -1
- package/dist/lite/rowDrag-E2YahPwG.cjs +1 -0
- package/dist/lite/{selectionAggregates-3u3kJh4W.js → selectionAggregates-DoHetiAE.js} +11 -12
- package/dist/lite/{selectionAggregates-D5TcCyB5.cjs → selectionAggregates-DuSb6U5D.cjs} +1 -1
- package/dist/lite/{toolPanel-E0gQydUn.cjs → toolPanel-BkdryfVw.cjs} +1 -1
- package/dist/lite/{toolPanel-DZFTU5l3.js → toolPanel-DcQrkZzk.js} +1 -1
- package/dist/lite/toolPanelViews-B-QP_ZDZ.cjs +1 -0
- package/dist/lite/{toolPanelViews-CbMCZSFx.js → toolPanelViews-Dllz41nc.js} +5 -2
- package/dist/lite.cjs +1 -1
- package/dist/lite.js +8 -8
- package/dist/model/gridTypes.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/style.layer.css +1 -1
- package/dist/themes/heroui.css +2 -1
- package/dist/themes/shadcn.css +2 -1
- package/dist/{toolPanelViews-BywJx-1p.js → toolPanelViews-DwlD9m4j.js} +5 -2
- package/dist/toolPanelViews-Qnzjs5wF.cjs +1 -0
- package/dist/view/DefaultGridTopBar.d.ts +1 -1
- package/dist/view/GridDetailLayer.d.ts +2 -1
- package/package.json +2 -2
- package/skills/spreadsheet-grid/SKILL.md +7 -7
- package/dist/ColumnFilterPopover-BPUTyi1X.js +0 -1023
- package/dist/ColumnFilterPopover-C0BaV7ne.cjs +0 -1
- package/dist/lite/ColumnFilterPopover-CRrelKCm.cjs +0 -1
- package/dist/lite/ColumnFilterPopover-DZj1S5tC.js +0 -1023
- package/dist/lite/columnMenu-Dp1_-G7T.cjs +0 -1
- package/dist/lite/createSpreadsheetGrid--0D_J_WV.js +0 -4305
- package/dist/lite/createSpreadsheetGrid-BVm9M39W.cjs +0 -7
- package/dist/lite/filtering-DWiGawv7.js +0 -383
- package/dist/lite/filtering-SjDjhxZN.cjs +0 -1
- package/dist/lite/labelRow-JKoR6wHG.cjs +0 -1
- package/dist/lite/rowDrag-BJzh34bd.cjs +0 -1
- package/dist/lite/toolPanelViews-CRRJt6BV.cjs +0 -1
- package/dist/toolPanelViews-lSrwZauC.cjs +0 -1
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ More runnable examples (server-side row model, Astryx) are in [`examples/`](http
|
|
|
52
52
|
|
|
53
53
|
## Smaller bundles: `/lite` (0.54.0+)
|
|
54
54
|
|
|
55
|
-
`SpreadsheetGrid` includes every feature (about
|
|
55
|
+
`SpreadsheetGrid` includes every feature (about 140KB gzip of initial JS). The `/lite` entry builds a grid with only the features you pass; the rest is left out of your bundle (about 80KB with no features, about 102KB with the `standardFeatures` preset).
|
|
56
56
|
|
|
57
57
|
```tsx
|
|
58
58
|
import { createSpreadsheetGrid, standardFeatures, serverSideFeature } from '@ishibashi0112/spreadsheet-grid/lite'
|
|
@@ -66,7 +66,7 @@ Props, the `ref` handle and types are the same as `SpreadsheetGrid`. Props of fe
|
|
|
66
66
|
|
|
67
67
|
## Natural-language filtering: `/ai` (0.57.0+)
|
|
68
68
|
|
|
69
|
-
`GridAskBar` from the `/ai` entry turns a sentence ("Tokyo items with 10 or fewer in stock, most expensive first") into the grid's filters, sort, global search and column visibility. The grid never calls an AI: your `ask` function forwards the request to your own server, which calls any model with structured output. Row data is never sent, and every answer is validated, shown as chips and undoable. It is a separate entry (about
|
|
69
|
+
`GridAskBar` from the `/ai` entry turns a sentence ("Tokyo items with 10 or fewer in stock, most expensive first") into the grid's filters, sort, global search and column visibility. The grid never calls an AI: your `ask` function forwards the request to your own server, which calls any model with structured output. Row data is never sent, and every answer is validated, shown as chips and undoable. It is a separate entry (about 14.0KB gzip). Server code for Claude, OpenAI, Gemini and the Vercel AI SDK (AI Gateway) is in the [guide](https://datasheet-grid.vercel.app/docs/guides/ai-filter); the API is in `API_REFERENCE.md` (「ことばで絞り込み」).
|
|
70
70
|
|
|
71
71
|
```tsx
|
|
72
72
|
import { GridAskBar } from '@ishibashi0112/spreadsheet-grid/ai'
|
|
@@ -100,7 +100,7 @@ This library is new, so AI coding assistants rarely know its API and tend to gue
|
|
|
100
100
|
- **Row keys.** Return a stable key from `rowKeyGetter` (the default is the row index).
|
|
101
101
|
- **`rows` or `dataSource`.** `rows` is the client-side row model; `dataSource` switches to the server-side row model. They are mutually exclusive.
|
|
102
102
|
- **Height.** Use the `height` prop, not `style.height` on the root. A value containing `%` (`'100%'`) sizes the **whole grid including its bars** and needs a parent with a definite height; a number sizes the **scroll area only**. Without `height`, the scroll area is capped at `480px` (`maxHeight`).
|
|
103
|
-
- **Imperative API.** Pass `ref` to get a `SpreadsheetGridHandle<T>` (no `forwardRef` needed on your side; works the same on React 18.3 and 19).
|
|
103
|
+
- **Imperative API.** Pass `ref` to get a `SpreadsheetGridHandle<T>` (no `forwardRef` needed on your side; works the same on React 18.3 and 19). If you wrap the grid in your own component and pass `ref` to the wrapper, make the wrapper a `forwardRef` on React 18: the types accept `ref` either way, but React 18 does not pass it as a prop, so the handle stays `null`.
|
|
104
104
|
- **Positions are view positions.** `viewRowIndex` / `colIndex` (in `selectCell` and the like) are positions after sorting and filtering, and `colIndex` also counts the columns the grid adds (row drag handle, detail toggle, auto group column). Look them up with `getViewRowIndex(rowKey)` / `getColIndex(columnKey)` instead of `rows.findIndex`.
|
|
105
105
|
- **Next.js App Router.** Render the grid from a Client Component (a file with `'use client'`); the package does not add the directive.
|
|
106
106
|
- **UI language.** The grid's own texts are Japanese by default. For English pass `localeText={localeTextEn}` from `@ishibashi0112/spreadsheet-grid/locales/en` (and `gridAskLocaleTextEn` to `GridAskBar`).
|
|
@@ -133,7 +133,7 @@ Astryx / Mantine / HeroUI v3 / shadcn/ui の中で使うときは、`style.css`
|
|
|
133
133
|
|
|
134
134
|
### バンドルを小さくする: `/lite`(0.54.0 から)
|
|
135
135
|
|
|
136
|
-
`SpreadsheetGrid` は全機能入りです(初期読み込みの JS が約
|
|
136
|
+
`SpreadsheetGrid` は全機能入りです(初期読み込みの JS が約 140KB gzip)。`/lite` の入口では、渡した機能だけを入れたグリッドを作れます。渡さなかった機能はバンドルに入りません(機能なしで約 80KB、プリセット `standardFeatures` で約 102KB)。
|
|
137
137
|
|
|
138
138
|
```tsx
|
|
139
139
|
import { createSpreadsheetGrid, standardFeatures, serverSideFeature } from '@ishibashi0112/spreadsheet-grid/lite'
|
|
@@ -147,7 +147,7 @@ props・`ref` ハンドル・型は `SpreadsheetGrid` と同じです。渡し
|
|
|
147
147
|
|
|
148
148
|
### ことばで絞り込み: `/ai`(0.57.0 から)
|
|
149
149
|
|
|
150
|
-
`/ai` の入口の `GridAskBar` は、「東京の在庫が 10 個以下を高い順に」のような文から、グリッドのフィルター・並び・グローバル検索・列の表示を AI に入れさせます。グリッドは AI を呼びません。利用側の `ask` が自分のサーバーへ頼みを送り、サーバーが好きな AI を構造化出力で呼びます。行のデータは送らず、答えはすべて検査してチップで見せ、元に戻せます。別の入口です(約
|
|
150
|
+
`/ai` の入口の `GridAskBar` は、「東京の在庫が 10 個以下を高い順に」のような文から、グリッドのフィルター・並び・グローバル検索・列の表示を AI に入れさせます。グリッドは AI を呼びません。利用側の `ask` が自分のサーバーへ頼みを送り、サーバーが好きな AI を構造化出力で呼びます。行のデータは送らず、答えはすべて検査してチップで見せ、元に戻せます。別の入口です(約 14.0KB gzip)。Claude・OpenAI・Gemini・Vercel AI SDK(AI Gateway)のサーバー側のコードは[ガイド](https://datasheet-grid.vercel.app/docs/guides/ai-filter)に、API は `API_REFERENCE.md` の「ことばで絞り込み」にあります。
|
|
151
151
|
|
|
152
152
|
```tsx
|
|
153
153
|
import { GridAskBar } from '@ishibashi0112/spreadsheet-grid/ai'
|
|
@@ -181,7 +181,7 @@ npm パッケージに同梱されているため、オフライン(`node_module
|
|
|
181
181
|
- **行キー。** `rowKeyGetter` で安定したキーを返してください(既定は行 index)。
|
|
182
182
|
- **`rows` か `dataSource`。** `rows` はクライアントサイド行モデル、`dataSource` を渡すとサーバーサイド行モデルです。両者は排他です。
|
|
183
183
|
- **高さ。** ルートの `style.height` ではなく `height` prop で指定します。`%` を含む値(`'100%'`)は**バーを含むグリッド全体**の高さで、親要素に確定高さが必要です。数値は**スクロール領域だけ**の高さです。`height` 未指定時のスクロール領域は `480px`(`maxHeight`)が上限です。
|
|
184
|
-
- **命令的 API。** `ref` を渡すと `SpreadsheetGridHandle<T>` を受け取れます(利用側で `forwardRef` は不要。React 18.3 / 19 のどちらでも同じ)。
|
|
184
|
+
- **命令的 API。** `ref` を渡すと `SpreadsheetGridHandle<T>` を受け取れます(利用側で `forwardRef` は不要。React 18.3 / 19 のどちらでも同じ)。グリッドを自分のコンポーネントで包んでその部品へ `ref` を渡すときは、React 18 では包む部品を `forwardRef` にします(型はどちらでも通りますが、React 18 は `ref` を props として渡さないので、ハンドルが `null` のままになります)。
|
|
185
185
|
- **位置は表示の位置。** `selectCell` などの `viewRowIndex` / `colIndex` は並べ替え・絞り込みの後の表示の位置で、`colIndex` は行ドラッグのハンドル列・展開トグル列・自動グループ列(ライブラリが足す列)も数えます。`rows.findIndex` ではなく `getViewRowIndex(rowKey)` / `getColIndex(columnKey)` で引いてください。
|
|
186
186
|
- **Next.js App Router。** クライアントコンポーネント(`'use client'` のファイル)から描画してください。パッケージ側はディレクティブを付けていません。
|
|
187
187
|
- **UI の言語。** グリッドが出す文言の既定は日本語です。英語は `@ishibashi0112/spreadsheet-grid/locales/en` の `localeTextEn` を `localeText` に渡します(`GridAskBar` には `gridAskLocaleTextEn`)。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useGridLocaleText-D74sCoAT.cjs"),t=require("./useVirtualizerCore-DTzCVMhF.cjs"),n=require("./usePopupLocaleText-BAn7AGEy.cjs");let r=require("react"),i=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/cx"),a=require("react-dom"),o=require("@ishibashi0112/spreadsheet-grid-core/internal/controllers/escapeClaimController"),s=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards"),c=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText"),l=require("react/jsx-runtime"),u=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/filtering"),d=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/dateFilterPresets"),f=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFilters"),p=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/focusCycle"),m=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/setFilterSearch"),h=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/setFilterSelection"),g=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/numberFilterCondition"),_=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/textFilterCondition"),v=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/dateFilterCondition"),y=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/datePickerCalendar"),b=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/dateFilterTree");function x({value:e,onCommit:t,ariaLabel:a,inputRef:o,onRequestClose:d,align:f=`left`}){let p=n.t(),[m,h]=(0,r.useState)(null),[g,_]=(0,r.useState)(!1),[v,b]=(0,r.useState)(!1),[x,S]=(0,r.useState)(`days`),[C,w]=(0,r.useState)(()=>new Date().getFullYear()),[T,E]=(0,r.useState)(()=>new Date().getMonth()),D=(0,r.useRef)(null),O=m??(0,y.formatFilterDateDisplay)(e),k=(0,u.toDateKey)(new Date)??``,A=()=>{if(m===null)return;let e=m.trim();if(e===``){t(``),h(null),_(!1);return}let n=(0,u.toDateKey)(e);if(n===null){_(!0);return}t(n),h(null),_(!1)},j=()=>{let[t,n]=(e===``?k:e).split(`-`);w(Number(t)),E(Number(n)-1),S(`days`),b(!0)},M=()=>{b(!1)},N=e=>{t(e),h(null),_(!1),M()};(0,r.useEffect)(()=>{if(!v)return;let e=e=>{let t=e.target;t&&D.current?.contains(t)||b(!1)};return document.addEventListener(`pointerdown`,e,!0),()=>{document.removeEventListener(`pointerdown`,e,!0)}},[v]);let P=e=>{if(e.stopPropagation(),e.key===`Enter`){if((0,s.isImeComposingKeyEvent)(e.nativeEvent))return;e.preventDefault(),A(),M();return}if(e.key===`Escape`){if(e.preventDefault(),v){M();return}d()}},F=e=>({onPointerDown:t=>{t.preventDefault(),t.stopPropagation(),e()},onKeyDown:t=>{if(t.stopPropagation(),t.key===`Enter`||t.key===` `){t.preventDefault(),e();return}if(t.key===`Escape`){if(t.preventDefault(),v){M(),t.currentTarget.closest(`.ssg-dp-root`)?.querySelector(`.ssg-dp-input`)?.focus();return}d()}}}),I=e=>{if(x===`days`){let t=new Date(C,T+e,1);w(t.getFullYear()),E(t.getMonth());return}if(x===`months`){w(t=>t+e);return}w(t=>t+e*12)},L=()=>{S(e=>e===`days`?`months`:`years`)},R=()=>{S(e=>e===`years`?`months`:`days`)},z=x===`days`?(0,c.formatLocaleText)(p.calendarTitle,{year:C,month:T+1}):x===`months`?(0,c.formatLocaleText)(p.calendarYear,{year:C}):`${(0,y.yearGridStart)(C)} – ${(0,y.yearGridStart)(C)+11}`;return(0,l.jsxs)(`div`,{ref:D,className:`ssg-dp-root`,children:[(0,l.jsxs)(`div`,{className:(0,i.cx)(`ssg-dp-field`,v&&`ssg-dp-field--open`,g&&`ssg-dp-field--invalid`),children:[(0,l.jsx)(`input`,{ref:o,type:`text`,inputMode:`numeric`,value:O,placeholder:`yyyy/mm/dd`,"aria-label":a,"aria-invalid":g||void 0,className:`ssg-dp-input`,onChange:e=>{h(e.target.value),_(!1)},onKeyDown:P,onBlur:A}),(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-cal-btn`,"aria-label":v?p.calendarClose:p.calendarOpen,...F(()=>{v?M():j()}),children:(0,l.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 16 16`,"aria-hidden":`true`,children:[(0,l.jsx)(`rect`,{x:`1.5`,y:`2.5`,width:`13`,height:`12`,rx:`1.5`,fill:`none`,stroke:`currentColor`}),(0,l.jsx)(`line`,{x1:`1.5`,y1:`6`,x2:`14.5`,y2:`6`,stroke:`currentColor`}),(0,l.jsx)(`line`,{x1:`5`,y1:`1`,x2:`5`,y2:`4`,stroke:`currentColor`}),(0,l.jsx)(`line`,{x1:`11`,y1:`1`,x2:`11`,y2:`4`,stroke:`currentColor`})]})})]}),v&&(0,l.jsxs)(`div`,{className:(0,i.cx)(`ssg-dp-panel`,f===`right`&&`ssg-dp-panel--right`),children:[(0,l.jsxs)(`div`,{className:`ssg-dp-nav`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-nav-btn`,"aria-label":p.calendarPrevious,...F(()=>I(-1)),children:`‹`}),(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-nav-title`,disabled:x===`years`,"aria-label":p.calendarChangeView,...F(L),children:z}),(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-nav-btn`,"aria-label":p.calendarNext,...F(()=>I(1)),children:`›`})]}),x===`days`&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`div`,{className:`ssg-dp-dow`,children:p.calendarWeekdays.map((e,t)=>(0,l.jsx)(`span`,{className:(0,i.cx)(t===0&&`ssg-dp-dow--sun`,t===6&&`ssg-dp-dow--sat`),children:e},t))}),(0,l.jsx)(`div`,{className:`ssg-dp-days`,children:(0,y.buildCalendarDayCells)(C,T).map(t=>(0,l.jsx)(`button`,{type:`button`,className:(0,i.cx)(`ssg-dp-day`,!t.inCurrentMonth&&`ssg-dp-day--out`,t.key===k&&`ssg-dp-day--today`,t.key===e&&`ssg-dp-day--selected`),"aria-label":t.key,...F(()=>N(t.key)),children:t.day},t.key))})]}),x===`months`&&(0,l.jsx)(`div`,{className:`ssg-dp-grid`,children:p.calendarMonths.map((e,t)=>(0,l.jsx)(`button`,{type:`button`,className:(0,i.cx)(`ssg-dp-cell`,t===T&&`ssg-dp-cell--selected`),...F(()=>{E(t),S(`days`)}),children:e},t))}),x===`years`&&(0,l.jsx)(`div`,{className:`ssg-dp-grid`,children:(0,y.buildYearGrid)(C).map(e=>(0,l.jsx)(`button`,{type:`button`,className:(0,i.cx)(`ssg-dp-cell`,e===C&&`ssg-dp-cell--selected`),...F(()=>{w(e),S(`months`)}),children:e},e))}),(0,l.jsxs)(`div`,{className:`ssg-dp-foot`,children:[x!==`days`&&(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-foot-btn`,...F(R),children:p.calendarBack}),(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-foot-btn`,...F(()=>N(k)),children:p.calendarToday}),(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-foot-btn ssg-dp-foot-btn--muted`,...F(()=>N(``)),children:p.clear})]})]})]})}var S=24,C=(e,t,n)=>e===``&&t===f.DEFAULT_FILTER_LOCALE_TEXT.blank?n:t,w=(e,t)=>t===f.DEFAULT_FILTER_LOCALE_TEXT.blank?e:e.map(e=>e.value===``&&e.label===f.DEFAULT_FILTER_LOCALE_TEXT.blank?{...e,label:t}:e);function T({options:e,setSelection:i,searchInputRef:a,onValueToggle:o,onSelectAllChange:u,onReplaceSelection:d,onRequestClose:f,isServerSide:p,selectAllUsesExplicitScope:g=!1,truncated:_=!1}){let v=n.t(),[y,b]=(0,r.useState)(``),x=(0,r.useDeferredValue)(y),T=(0,r.useMemo)(()=>w(e,v.blank),[e,v.blank]),E=(0,r.useMemo)(()=>(0,m.filterSetOptionsBySearch)(T,x),[T,x]),D=x.trim().length>0,O=(0,r.useRef)(null),k=t.t({count:E.length,getScrollElement:()=>O.current,estimateSize:()=>S,overscan:10}),A=(0,r.useMemo)(()=>{if(i===null)return E.length;let e=0;for(let t of E)(0,h.isSetValueSelected)(i,t.value)&&(e+=1);return e},[i,E]),j=E.length>0&&A===E.length,M=A>0&&!j,N=(0,r.useMemo)(()=>new Set(e.map(e=>e.value)),[e]),F=(0,r.useMemo)(()=>{if(i===null)return e.length;let t=0;for(let e of i.values)N.has(e)&&(t+=1);return i.mode===`include`?t:e.length-t},[i,N,e.length]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`input`,{ref:a,type:`text`,value:y,onChange:e=>b(e.target.value),onKeyDown:e=>{if(e.stopPropagation(),e.key===`Escape`&&(e.preventDefault(),f()),e.key===`Enter`){if((0,s.isImeComposingKeyEvent)(e.nativeEvent))return;e.preventDefault();let t=(0,m.resolveSetFilterEnterAction)(T,y);if(t.kind===`none`)return;t.kind===`replace`&&d(t.values),f()}},placeholder:v.filterSearchPlaceholder,"aria-label":v.filterSearchPlaceholder,className:`ssg-filter-input`}),(0,l.jsxs)(`label`,{className:`ssg-filter-selectall`,children:[(0,l.jsx)(`input`,{type:`checkbox`,checked:j,ref:e=>{e&&(e.indeterminate=M)},onChange:()=>{u(D||g?E.map(e=>e.value):`all`,!j)}}),(0,l.jsx)(`span`,{className:`ssg-filter-selectall-label`,children:D?v.filterSelectAllResults:v.filterSelectAll})]}),(0,l.jsx)(`div`,{ref:O,className:`ssg-filter-list`,children:E.length===0?(0,l.jsx)(`div`,{className:`ssg-filter-empty`,children:e.length===0?p?v.filterNoOptionsSource:v.noOptions:v.filterNoMatches}):(0,l.jsx)(`div`,{className:`ssg-filter-virt`,style:{height:k.getTotalSize()},children:k.getVirtualItems().map(e=>{let t=E[e.index];if(!t)return null;let n=(0,h.isSetValueSelected)(i,t.value);return(0,l.jsxs)(`label`,{className:`ssg-filter-option`,style:{transform:`translateY(${e.start}px)`,height:e.size},children:[(0,l.jsx)(`input`,{type:`checkbox`,checked:n,onChange:()=>o(t.value)}),(0,l.jsx)(`span`,{className:`ssg-filter-option-label`,children:C(t.value,t.label,v.blank)})]},t.value)})})}),(0,l.jsxs)(`div`,{className:`ssg-filter-meta`,children:[(0,c.formatLocaleText)(v.filterSelectedCount,{selected:F,total:e.length}),D?(0,c.formatLocaleText)(v.filterShownCount,{count:E.length}):``,_&&(0,l.jsx)(P,{})]})]})}var E=e=>{e.key!==`Escape`&&e.stopPropagation()},D=e=>e.nativeEvent.isComposing===!0,O=(e,t,n)=>{if(D(n)){e(t,{commit:!1});return}e(t)};function k({draft:e,valueInputRef:t,onDraftChange:r,onKeyDown:i}){let a=n.t(),o=(0,g.numberFilterOperandCount)(e.operator);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`select`,{value:e.operator,onChange:t=>r({...e,operator:t.target.value}),onKeyDown:i,className:`ssg-filter-select`,"aria-label":a.filterOperator,children:g.NUMBER_FILTER_OPERATOR_OPTIONS.map(e=>(0,l.jsx)(`option`,{value:e.value,children:a[e.labelKey]},e.value))}),o>0?(0,l.jsxs)(`div`,{className:`ssg-filter-cond-values`,children:[(0,l.jsx)(`input`,{ref:t,type:`text`,inputMode:`decimal`,value:e.value1,onChange:t=>O(r,{...e,value1:t.target.value},t),onCompositionEnd:t=>r({...e,value1:t.currentTarget.value}),onKeyDown:i,placeholder:o===2?a.filterMin:a.filterValuePlaceholder,className:`ssg-filter-input`,"aria-label":o===2?a.filterMin:a.filterValue}),o===2&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`span`,{className:`ssg-filter-cond-tilde`,children:a.filterRangeSeparator}),(0,l.jsx)(`input`,{type:`text`,inputMode:`decimal`,value:e.value2,onChange:t=>O(r,{...e,value2:t.target.value},t),onCompositionEnd:t=>r({...e,value2:t.currentTarget.value}),onKeyDown:i,placeholder:a.filterMax,className:`ssg-filter-input`,"aria-label":a.filterMax})]})]}):(0,l.jsx)(`div`,{className:`ssg-filter-meta`,children:a.filterNoValue})]})}function A({draft:e,valueInputRef:t,onDraftChange:r,onKeyDown:i}){let a=n.t(),o=(0,_.textFilterOperandCount)(e.operator);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`select`,{value:e.operator,onChange:t=>r({...e,operator:t.target.value}),onKeyDown:i,className:`ssg-filter-select`,"aria-label":a.filterOperator,children:_.TEXT_FILTER_OPERATOR_OPTIONS.map(e=>(0,l.jsx)(`option`,{value:e.value,children:a[e.labelKey]},e.value))}),o>0?(0,l.jsx)(`div`,{className:`ssg-filter-cond-values`,children:(0,l.jsx)(`input`,{ref:t,type:`text`,value:e.value,onChange:t=>O(r,{...e,value:t.target.value},t),onCompositionEnd:t=>r({...e,value:t.currentTarget.value}),onKeyDown:i,placeholder:a.filterValuePlaceholder,className:`ssg-filter-input`,"aria-label":a.filterValue})}):(0,l.jsx)(`div`,{className:`ssg-filter-meta`,children:a.filterNoValue})]})}function j({draft:e,valueInputRef:t,onDraftChange:r,onKeyDown:a,presets:o,renderDateInput:s,onRequestClose:c}){let u=n.t(),d=e.preset===null?(0,v.dateFilterOperandCount)(e.operator):0,f=(t,n)=>{r({...e,[t]:(0,v.normalizeFilterDateInputValue)(n),preset:null})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`select`,{value:e.operator,onChange:t=>r({...e,operator:t.target.value,preset:null}),onKeyDown:a,className:`ssg-filter-select`,"aria-label":u.filterOperator,children:v.DATE_FILTER_OPERATOR_OPTIONS.map(e=>(0,l.jsx)(`option`,{value:e.value,children:u[e.labelKey]},e.value))}),d>0?(0,l.jsxs)(`div`,{className:`ssg-filter-cond-values`,children:[s?s({value:e.value1,onChange:e=>f(`value1`,e),ariaLabel:d===2?u.filterStartDate:u.filterDate,slot:d===2?`from`:`single`}):(0,l.jsx)(x,{value:e.value1,onCommit:t=>r({...e,value1:t,preset:null}),ariaLabel:d===2?u.filterStartDate:u.filterDate,inputRef:t,onRequestClose:c}),d===2&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`span`,{className:`ssg-filter-cond-tilde`,children:u.filterRangeSeparator}),s?s({value:e.value2,onChange:e=>f(`value2`,e),ariaLabel:u.filterEndDate,slot:`to`}):(0,l.jsx)(x,{value:e.value2,onCommit:t=>r({...e,value2:t,preset:null}),ariaLabel:u.filterEndDate,onRequestClose:c,align:`right`})]})]}):e.preset===null?(0,l.jsx)(`div`,{className:`ssg-filter-meta`,children:u.filterNoValue}):null,o.length>0&&(0,l.jsx)(`div`,{className:`ssg-filter-presets`,children:o.map(t=>(0,l.jsx)(`button`,{type:`button`,onPointerDown:n=>{n.preventDefault(),n.stopPropagation(),r({...e,preset:e.preset===t.id?null:t.id})},onKeyDown:n=>{E(n),(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),r({...e,preset:e.preset===t.id?null:t.id}))},className:(0,i.cx)(`ssg-filter-preset-chip`,e.preset===t.id&&`ssg-filter-preset-chip--active`),children:t.label},t.id))})]})}function M({options:e,setSelection:i,searchInputRef:a,onValueToggle:o,onSelectAllChange:u,onReplaceSelection:d,onRequestClose:f,isServerSide:p,truncated:g=!1}){let _=n.t(),[v,y]=(0,r.useState)(``),x=(0,r.useDeferredValue)(v),[T,D]=(0,r.useState)(()=>new Set),O=x.trim().length>0,k=(0,r.useMemo)(()=>w(e,_.blank),[e,_.blank]),A=(0,r.useMemo)(()=>(0,m.filterSetOptionsBySearch)(k,x),[k,x]),j=(0,r.useMemo)(()=>(0,b.buildDateTreeRows)(e,T,_),[e,T,_]),M=(0,r.useRef)(null),N=O?A.length:j.length,F=t.t({count:N,getScrollElement:()=>M.current,estimateSize:()=>S,overscan:10}),I=(0,r.useMemo)(()=>(O?A:e).map(e=>e.value),[O,A,e]),L=(0,r.useMemo)(()=>{let e=0;for(let t of I)(0,h.isSetValueSelected)(i,t)&&(e+=1);return e},[I,i]),R=I.length>0&&L===I.length,z=L>0&&!R,B=(0,r.useMemo)(()=>new Set(e.map(e=>e.value)),[e]),ee=(0,r.useMemo)(()=>{if(i===null)return e.length;let t=0;for(let e of i.values)B.has(e)&&(t+=1);return i.mode===`include`?t:e.length-t},[i,B,e.length]),V=e=>{D(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},H=e=>{let t=0;for(let n of e)(0,h.isSetValueSelected)(i,n)&&(t+=1);return t},U=e=>{if(e.type===`leaf`){o(e.key);return}let t=e.leafKeys.length>0&&H(e.leafKeys)===e.leafKeys.length;u(e.leafKeys,!t)},te=e=>{let t=H(e.leafKeys),n=e.leafKeys.length>0&&t===e.leafKeys.length,r=t>0&&!n;return(0,l.jsxs)(l.Fragment,{children:[e.type===`group`?(0,l.jsx)(`button`,{type:`button`,onPointerDown:t=>{t.preventDefault(),t.stopPropagation(),V(e.key)},onKeyDown:t=>{E(t),(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),V(e.key))},className:`ssg-filter-tree-toggle`,"aria-label":e.expanded?_.treeCollapse:_.treeExpand,children:e.expanded?`▾`:`▸`}):(0,l.jsx)(`span`,{className:`ssg-filter-tree-toggle ssg-filter-tree-toggle--placeholder`}),(0,l.jsx)(`input`,{type:`checkbox`,checked:n,ref:e=>{e&&(e.indeterminate=r)},"aria-label":C(e.key,e.label,_.blank),onChange:()=>U(e)}),(0,l.jsx)(`span`,{className:`ssg-filter-option-label`,children:C(e.key,e.label,_.blank)})]})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`input`,{ref:a,type:`text`,value:v,onChange:e=>y(e.target.value),onKeyDown:e=>{if(e.stopPropagation(),e.key===`Escape`&&(e.preventDefault(),f()),e.key===`Enter`){if((0,s.isImeComposingKeyEvent)(e.nativeEvent))return;e.preventDefault();let t=(0,m.resolveSetFilterEnterAction)(k,v);if(t.kind===`none`)return;t.kind===`replace`&&d(t.values),f()}},placeholder:_.filterSearchPlaceholder,"aria-label":_.filterSearchPlaceholder,className:`ssg-filter-input`}),(0,l.jsxs)(`label`,{className:`ssg-filter-selectall`,children:[(0,l.jsx)(`input`,{type:`checkbox`,checked:R,ref:e=>{e&&(e.indeterminate=z)},onChange:()=>u(I,!R)}),(0,l.jsx)(`span`,{className:`ssg-filter-selectall-label`,children:O?_.filterSelectAllResults:_.filterSelectAll})]}),(0,l.jsx)(`div`,{ref:M,className:`ssg-filter-list`,children:N===0?(0,l.jsx)(`div`,{className:`ssg-filter-empty`,children:e.length===0?p?_.filterNoOptionsSource:_.noOptions:_.filterNoMatches}):(0,l.jsx)(`div`,{className:`ssg-filter-virt`,style:{height:F.getTotalSize()},children:F.getVirtualItems().map(e=>{if(O){let t=A[e.index];return t?(0,l.jsxs)(`label`,{className:`ssg-filter-option`,style:{transform:`translateY(${e.start}px)`,height:e.size},children:[(0,l.jsx)(`input`,{type:`checkbox`,checked:(0,h.isSetValueSelected)(i,t.value),onChange:()=>o(t.value)}),(0,l.jsx)(`span`,{className:`ssg-filter-option-label`,children:C(t.value,t.label,_.blank)})]},t.value):null}let t=j[e.index];return t?(0,l.jsx)(`div`,{className:`ssg-filter-option`,style:{transform:`translateY(${e.start}px)`,height:e.size,paddingLeft:8+t.depth*16},onClick:e=>{e.target.closest(`button, input`)||U(t)},children:te(t)},t.key):null})})}),(0,l.jsxs)(`div`,{className:`ssg-filter-meta`,children:[(0,c.formatLocaleText)(_.filterSelectedCount,{selected:ee,total:e.length}),O?(0,c.formatLocaleText)(_.filterShownCount,{count:A.length}):``,g&&(0,l.jsx)(P,{})]})]})}function N({status:e,errorMessage:t,onRetry:r}){let i=n.t();return e===`loading`?(0,l.jsx)(`div`,{className:`ssg-filter-collecting`,children:i.filterOptionsLoading}):(0,l.jsxs)(`div`,{className:`ssg-filter-error`,role:`alert`,children:[(0,l.jsx)(`div`,{children:i.filterOptionsFailed}),t?(0,l.jsx)(`div`,{className:`ssg-filter-error-detail`,title:t,children:t}):null,r?(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),r()},onKeyDown:e=>{E(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:`ssg-filter-btn-secondary`,children:i.retry}):null]})}function P(){return(0,l.jsx)(`span`,{className:`ssg-filter-truncated`,children:n.t().filterOptionsTruncated})}function F({conditionEditor:e,conditionActive:t,onConditionClear:r,options:i,setSelection:a,onSelectionClear:o,summaryText:s,children:u,optionsMeta:d}){let f=n.t();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`ssg-filter-sec-head`,children:[(0,l.jsx)(`span`,{className:`ssg-filter-sec-label`,children:f.filterConditionSection}),(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),r()},onKeyDown:e=>{E(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:`ssg-filter-sec-clear`,disabled:!t,children:f.clear})]}),e,(0,l.jsx)(`div`,{className:`ssg-filter-sep`}),(0,l.jsxs)(`div`,{className:`ssg-filter-sec-head`,children:[(0,l.jsx)(`span`,{className:`ssg-filter-sec-label`,children:f.filterValuesSection}),(0,l.jsx)(`span`,{className:`ssg-filter-sec-meta`,children:d??(0,c.formatLocaleText)(t?f.filterMatchCount:f.filterTotalCount,{count:i.length})}),(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),o()},onKeyDown:e=>{E(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),o())},className:`ssg-filter-sec-clear`,disabled:a===null,children:f.clear})]}),u,(0,l.jsxs)(`div`,{className:`ssg-filter-summary`,children:[`🔽 `,s]})]})}function I({isOpen:t,themeClassName:u,popoverSlot:f,title:m,filterType:h,draftValue:y,numberConditionDraft:b,onNumberConditionDraftChange:x,textConditionDraft:S,onTextConditionDraftChange:w,dateConditionDraft:D,onDateConditionDraftChange:O,datePresets:I,renderDateInput:L,onComboConditionClear:R,onComboSelectionClear:z,comboSummaryText:B,currentValueText:ee,layout:V,selectOptions:H,optionsStatus:U,optionsProgress:te,optionsTruncated:W=!1,optionsErrorMessage:ne,onOptionsRetry:re,setSelection:G,popoverRef:ie,textInputRef:K,selectRef:ae,onRequestClose:q,onDraftChange:oe,onApply:J,onClear:se,onSetValueToggle:ce,onSetSelectAllChange:le,onSetClear:ue,onSetReplaceSelection:de,isServerSide:fe=!1}){let Y=n.t(),pe=(0,r.useRef)(null),[me]=(0,r.useState)(()=>new Date);if(e.o(ie,t&&V!==null,u),typeof document>`u`||!t||!V)return null;let he={top:V.top,left:V.left,width:V.width,maxHeight:V.maxHeight},ge=e=>{e.stopPropagation(),e.key===`Escape`&&!(0,o.isEscapePreventedInside)(e.nativeEvent)&&!(0,s.isImeComposingKeyEvent)(e.nativeEvent)&&(e.preventDefault(),q())},_e=e=>{if(e.key!==`Tab`||e.altKey||e.ctrlKey||e.metaKey||(0,s.isImeComposingKeyEvent)(e.nativeEvent))return;let t=(0,p.resolveFocusWrapTarget)(e.currentTarget,e.target instanceof Element?e.target:null,e.shiftKey);t!==null&&(e.preventDefault(),t.focus())},ve=e=>{e.stopPropagation()},ye=h===`set`,X=h===`numberSet`,Z=h===`textSet`,Q=h===`dateSet`,be=X||Z||Q,xe=ye||be,Se=U===`loading`||U===`error`,Ce=b??g.DEFAULT_NUMBER_FILTER_DRAFT,we=S??_.DEFAULT_TEXT_FILTER_DRAFT,Te=D??v.DEFAULT_DATE_FILTER_DRAFT,Ee=I??(0,d.normalizeDateFilterPresets)(void 0,Y),De=X?(0,g.buildParsedNumberFilterFromDraft)(Ce):null,Oe=Z?(0,_.buildParsedTextFilterFromDraft)(we):null,ke=Q?(0,v.buildParsedDateFilterFromDraft)(Te):null,Ae=De!==null||Oe!==null||ke!==null,$=X?(0,g.filterOptionsByNumberCondition)(H,De):Z?(0,_.filterOptionsByTextCondition)(H,Oe):Q?(0,v.filterOptionsByDateCondition)(H,ke,me,Ee):H,je=e=>{if(e.stopPropagation(),!(0,s.isImeComposingKeyEvent)(e.nativeEvent)){if(e.key===`Enter`){e.preventDefault(),J();return}e.key===`Escape`&&(e.preventDefault(),q())}},Me=X?(0,l.jsx)(k,{draft:Ce,valueInputRef:K,onDraftChange:x,onKeyDown:je}):Z?(0,l.jsx)(A,{draft:we,valueInputRef:K,onDraftChange:w,onKeyDown:je}):(0,l.jsx)(j,{draft:Te,valueInputRef:K,onDraftChange:O,onKeyDown:je,presets:Ee,renderDateInput:L,onRequestClose:q});return(0,a.createPortal)((0,l.jsxs)(`div`,{ref:ie,onPointerDown:ve,onKeyDown:ge,onKeyDownCapture:_e,onPasteCapture:e=>{e.stopPropagation()},className:(0,i.cx)(`ssg-filter-popover`,u,f?.className),style:{...f?.style,...he},role:`dialog`,"aria-label":(0,c.formatLocaleText)(Y.filterTitle,{column:m}),tabIndex:-1,children:[(0,l.jsx)(`div`,{className:`ssg-filter-title`,children:(0,c.formatLocaleText)(Y.filterTitle,{column:m})}),(xe||h===`select`)&&U===`collecting`?be?(0,l.jsx)(F,{conditionEditor:Me,conditionActive:Ae,onConditionClear:R,options:$,setSelection:G,onSelectionClear:z,summaryText:B,optionsMeta:Y.filterOptionsLoadingShort,children:(0,l.jsx)(`div`,{className:`ssg-filter-collecting`,children:(0,c.formatLocaleText)(Y.filterCollecting,{percent:Math.round(te*100)})})}):(0,l.jsx)(`div`,{className:`ssg-filter-collecting`,children:(0,c.formatLocaleText)(Y.filterCollecting,{percent:Math.round(te*100)})}):(xe||h===`select`)&&Se?be?(0,l.jsx)(F,{conditionEditor:Me,conditionActive:Ae,onConditionClear:R,options:$,setSelection:G,onSelectionClear:z,summaryText:B,optionsMeta:U===`loading`?Y.filterOptionsLoadingShort:Y.filterOptionsFailedShort,children:(0,l.jsx)(N,{status:U===`loading`?`loading`:`error`,errorMessage:ne,onRetry:re})}):(0,l.jsx)(N,{status:U===`loading`?`loading`:`error`,errorMessage:ne,onRetry:re}):be?(0,l.jsx)(F,{conditionEditor:Me,conditionActive:Ae,onConditionClear:R,options:$,setSelection:G,onSelectionClear:z,summaryText:B,children:Q?(0,l.jsx)(M,{options:$,setSelection:G,searchInputRef:pe,onValueToggle:ce,onSelectAllChange:le,onReplaceSelection:de,onRequestClose:q,isServerSide:fe,truncated:W}):(0,l.jsx)(T,{options:$,setSelection:G,searchInputRef:pe,onValueToggle:ce,onSelectAllChange:le,onReplaceSelection:de,onRequestClose:q,isServerSide:fe,selectAllUsesExplicitScope:!0,truncated:W})}):ye?(0,l.jsx)(T,{options:H,setSelection:G,searchInputRef:K,onValueToggle:ce,onSelectAllChange:le,onReplaceSelection:de,onRequestClose:q,isServerSide:fe,truncated:W}):h===`number`?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(k,{draft:Ce,valueInputRef:K,onDraftChange:x,onKeyDown:je})}):h===`select`?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`select`,{ref:ae,value:y,onChange:e=>oe(e.target.value),onKeyDown:e=>{if(e.stopPropagation(),e.key===`Enter`){e.preventDefault(),J();return}e.key===`Escape`&&(e.preventDefault(),q())},className:`ssg-filter-select`,children:[(0,l.jsx)(`option`,{value:``,children:Y.filterAll}),H.map(e=>(0,l.jsx)(`option`,{value:e.value,children:C(e.value,e.label,Y.blank)},`${m}-${e.value}`))]}),(0,l.jsxs)(`div`,{className:`ssg-filter-meta`,children:[(0,c.formatLocaleText)(Y.filterOptionCount,{count:H.length}),W&&(0,l.jsx)(P,{})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`input`,{ref:K,type:`text`,value:y,onChange:e=>oe(e.target.value),onKeyDown:e=>{if(e.stopPropagation(),!(0,s.isImeComposingKeyEvent)(e.nativeEvent)){if(e.key===`Enter`){e.preventDefault(),J();return}e.key===`Escape`&&(e.preventDefault(),q())}},placeholder:Y.filterTextPlaceholder,"aria-label":Y.filterTextPlaceholder,className:`ssg-filter-input`}),(0,l.jsx)(`div`,{className:`ssg-filter-meta ssg-filter-meta--ellipsis`,children:Y.filterTextHint})]}),!xe&&(0,l.jsx)(`div`,{className:`ssg-filter-meta ssg-filter-meta--ellipsis`,children:(0,c.formatLocaleText)(Y.filterCurrentValue,{value:ee})}),(0,l.jsx)(`div`,{className:`ssg-filter-footer`,children:xe?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),ue()},onKeyDown:e=>{E(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),ue())},className:`ssg-filter-btn-secondary`,children:Y.clear}),(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),q()},onKeyDown:e=>{E(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),q())},className:`ssg-filter-btn-primary`,children:Y.close})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),se()},onKeyDown:e=>{E(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),se())},className:`ssg-filter-btn-secondary`,children:Y.clear}),(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),J()},onKeyDown:e=>{E(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),J())},className:`ssg-filter-btn-primary`,children:Y.apply})]})})]}),document.body)}exports.ColumnFilterPopover=I,exports.default=I;
|