@ishibashi0112/spreadsheet-grid 1.9.0 → 1.11.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 +262 -30
- package/README.md +2 -2
- package/dist/CellEditorLayer.d.ts +6 -1
- package/dist/ColumnFilterPopover-DObE236Y.cjs +1 -0
- package/dist/{ColumnFilterPopover-BkvL8LdP.js → ColumnFilterPopover-xpVqTNCI.js} +5 -5
- package/dist/DateEditorCalendar-C4DuVjsL.js +128 -0
- package/dist/DateEditorCalendar-Cg4a2Y8d.cjs +1 -0
- package/dist/GridShell.d.ts +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/editors/DateCellEditor.d.ts +2 -1
- package/dist/editors/DateTimeCellEditor.d.ts +25 -0
- package/dist/editors/MultiSelectCellEditor.d.ts +23 -0
- package/dist/editors/NumberCellEditor.d.ts +2 -1
- package/dist/editors/SearchSelectCellEditor.d.ts +2 -1
- package/dist/editors/SelectCellEditor.d.ts +2 -1
- package/dist/editors/TextCellEditor.d.ts +2 -1
- package/dist/features/dateTimeEditors.d.ts +2 -0
- package/dist/features/excelShortcuts.d.ts +2 -0
- package/dist/features/multiSelect.d.ts +2 -0
- package/dist/features/newRow.d.ts +2 -0
- package/dist/features/types.d.ts +18 -0
- package/dist/hooks/useGridClipboardController.d.ts +1 -0
- package/dist/hooks/useGridLocaleText.d.ts +1 -1
- package/dist/hooks/useGridStore.d.ts +1 -1
- package/dist/index.cjs +11 -9
- package/dist/index.js +4870 -4032
- package/dist/lite/CellEditorErrorBubble-BH68ZTcj.js +23 -0
- package/dist/lite/CellEditorErrorBubble-DDoxYBXj.cjs +1 -0
- package/dist/lite/CopyRangeOverlay-BrCXRBtd.js +23 -0
- package/dist/lite/CopyRangeOverlay-CJGp8xo5.cjs +1 -0
- package/dist/lite/DateCellEditor-BPCZK7xI.js +81 -0
- package/dist/lite/DateCellEditor-BQfImAET.cjs +1 -0
- package/dist/lite/DateEditorCalendar-C4DuVjsL.js +128 -0
- package/dist/lite/DateEditorCalendar-Cg4a2Y8d.cjs +1 -0
- package/dist/lite/createSpreadsheetGrid-D7fxsRZG.cjs +11 -0
- package/dist/lite/createSpreadsheetGrid-DRJX-y38.js +5075 -0
- package/dist/lite/createSpreadsheetGrid.cjs +1 -1
- package/dist/lite/createSpreadsheetGrid.js +1 -1
- package/dist/lite/dateTimeEditors-BrNH3QkX.cjs +1 -0
- package/dist/lite/dateTimeEditors-CbxvlPg6.js +277 -0
- package/dist/lite/features/dateTimeEditors.cjs +1 -0
- package/dist/lite/features/dateTimeEditors.js +2 -0
- package/dist/lite/features/excelShortcuts.cjs +1 -0
- package/dist/lite/features/excelShortcuts.js +5 -0
- package/dist/lite/features/filtering.cjs +1 -1
- package/dist/lite/features/filtering.js +1 -1
- package/dist/lite/features/motionExtras.cjs +1 -1
- package/dist/lite/features/motionExtras.js +1 -1
- package/dist/lite/features/multiSelect.cjs +1 -0
- package/dist/lite/features/multiSelect.js +2 -0
- package/dist/lite/features/newRow.cjs +1 -0
- package/dist/lite/features/newRow.js +11 -0
- package/dist/lite/features/pinnedRows.cjs +1 -1
- package/dist/lite/features/pinnedRows.js +1 -1
- package/dist/lite/features/rowDrag.cjs +1 -1
- package/dist/lite/features/rowDrag.js +1 -1
- package/dist/lite/features/selectSearch.cjs +1 -1
- package/dist/lite/features/selectSearch.js +1 -1
- package/dist/lite/features/standard.cjs +1 -1
- package/dist/lite/features/standard.js +2 -2
- package/dist/lite/features/toolPanel.cjs +1 -1
- package/dist/lite/features/toolPanel.js +1 -1
- package/dist/lite/{filtering-c1X_zP3o.js → filtering-DaFmWbBq.js} +145 -142
- package/dist/lite/filtering-DskgJ8zD.cjs +1 -0
- package/dist/lite/lazyPopups-Cokq5TOf.cjs +2 -0
- package/dist/lite/{lazyPopups-DV5yAqW8.js → lazyPopups-DlBfI7Iu.js} +13 -9
- package/dist/lite/motionExtras-CZvGdgRi.js +26 -0
- package/dist/lite/motionExtras-Cz6DeWVG.cjs +1 -0
- package/dist/lite/multiSelect-CcxB2bAd.cjs +1 -0
- package/dist/lite/multiSelect-fz6tgldg.js +296 -0
- package/dist/lite/pinnedRows-Bx5s2ykl.cjs +1 -0
- package/dist/lite/pinnedRows-ibpSVG2h.js +149 -0
- package/dist/lite/{rowDrag-Bb1xlVXa.cjs → rowDrag--lPuW0-D.cjs} +1 -1
- package/dist/lite/{rowDrag-Dvg4JlGR.js → rowDrag-DVqgwSaj.js} +2 -1
- package/dist/lite/selectSearch-UHDjcmLg.cjs +1 -0
- package/dist/lite/{selectSearch-B1OSCMbw.js → selectSearch-n7CsaJiu.js} +53 -39
- package/dist/lite/{toolPanel-DQlOiytT.cjs → toolPanel-BD5l2a18.cjs} +1 -1
- package/dist/lite/{toolPanel-B1e18z68.js → toolPanel-BEzcyMBS.js} +1 -1
- package/dist/lite/useTopAlignedInput-BPhb8DcZ.js +15 -0
- package/dist/lite/useTopAlignedInput-T3k_V2-u.cjs +1 -0
- package/dist/lite.cjs +1 -1
- package/dist/lite.d.ts +4 -0
- package/dist/lite.js +25 -21
- package/dist/model/gridTypes.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/style.layer.css +1 -1
- package/dist/{toolPanelViews-Biz2p7sx.js → toolPanelViews-C8Vw3fEC.js} +2 -2
- package/dist/toolPanelViews-GXwba3Zw.cjs +1 -0
- package/dist/useGridLocaleText-CRSWUb4o.cjs +1 -0
- package/dist/useGridLocaleText-CpoTVgyp.js +6 -0
- package/dist/{usePopupLocaleText-DJN10Asc.js → usePopupLocaleText-Cfb4fQ8G.js} +1 -1
- package/dist/{usePopupLocaleText-lEFHqTvJ.cjs → usePopupLocaleText-CmlJsMAf.cjs} +1 -1
- package/dist/usePortalTokens-CeVR4LF2.cjs +1 -0
- package/dist/usePortalTokens-CkjVoVTY.js +45 -0
- package/dist/{useVirtualizerCore-C1k6Aw8p.js → useVirtualizerCore-BKZtPhuo.js} +1 -1
- package/dist/useVirtualizerCore-CA1UYXG3.cjs +1 -0
- package/dist/view/DateEditorCalendar.d.ts +14 -0
- package/dist/view/GridBodyLayer.d.ts +9 -1
- package/dist/view/GridMultiSelectChips.d.ts +6 -0
- package/dist/view/GridPinnedRows.d.ts +2 -1
- package/dist/view/lazyPopups.d.ts +3 -1
- package/package.json +2 -2
- package/skills/spreadsheet-grid/SKILL.md +8 -2
- package/dist/ColumnFilterPopover-cNVxOkoI.cjs +0 -1
- package/dist/lite/createSpreadsheetGrid-B8ove8hh.js +0 -4857
- package/dist/lite/createSpreadsheetGrid-M3WJSRoB.cjs +0 -9
- package/dist/lite/filtering-BTAXzOAK.cjs +0 -1
- package/dist/lite/lazyPopups-B1nKq4RV.cjs +0 -2
- package/dist/lite/motionExtras-aDs-d_Qv.cjs +0 -1
- package/dist/lite/motionExtras-pdhFC4q1.js +0 -46
- package/dist/lite/pinnedRows-C0z2lLC4.js +0 -144
- package/dist/lite/pinnedRows-CrwRr7W0.cjs +0 -1
- package/dist/lite/selectSearch-BIeA4Xhg.cjs +0 -1
- package/dist/lite/useTopAlignedInput-BAL_0rjw.cjs +0 -1
- package/dist/lite/useTopAlignedInput-CAagCTj-.js +0 -37
- package/dist/toolPanelViews-BAy-NXrx.cjs +0 -1
- package/dist/useGridLocaleText-BV4EomZe.cjs +0 -1
- package/dist/useGridLocaleText-Drud4qg0.js +0 -49
- package/dist/useVirtualizerCore-Cif7t8mS.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 207KB 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 107KB with no features, about 133KB with the `standardFeatures` preset).
|
|
56
56
|
|
|
57
57
|
```tsx
|
|
58
58
|
import { createSpreadsheetGrid, standardFeatures, serverSideFeature } from '@ishibashi0112/spreadsheet-grid/lite'
|
|
@@ -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 が約 207KB gzip)。`/lite` の入口では、渡した機能だけを入れたグリッドを作れます。渡さなかった機能はバンドルに入りません(機能なしで約 107KB、プリセット `standardFeatures` で約 133KB)。
|
|
137
137
|
|
|
138
138
|
```tsx
|
|
139
139
|
import { createSpreadsheetGrid, standardFeatures, serverSideFeature } from '@ishibashi0112/spreadsheet-grid/lite'
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { EditorCommitDirection, EditorCommitResult, EditorEnterMove, GridColumn, GridColumnEditor, GridRowKey, GridSelectEditorOption } from './model/gridTypes.js';
|
|
2
2
|
import type { SearchSelectCellEditor } from './editors/SearchSelectCellEditor.js';
|
|
3
|
+
import type { DateTimeCellEditor } from './editors/DateTimeCellEditor.js';
|
|
4
|
+
import type { MultiSelectCellEditor } from './editors/MultiSelectCellEditor.js';
|
|
3
5
|
import type { GridResolvedSlots } from './model/gridTypes.js';
|
|
4
6
|
import type { LateEditCommitReceiver } from '@ishibashi0112/spreadsheet-grid-core/internal/controllers/editController';
|
|
5
7
|
export type { EditorCommitDirection };
|
|
@@ -30,7 +32,10 @@ type CellEditorLayerProps<T> = {
|
|
|
30
32
|
slots?: GridResolvedSlots;
|
|
31
33
|
onCommit: (value: unknown, direction?: EditorCommitDirection, option?: GridSelectEditorOption, forwardText?: string) => EditorCommitResult | void;
|
|
32
34
|
onCancel: () => void;
|
|
35
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
33
36
|
SearchSelectEditor?: typeof SearchSelectCellEditor | undefined;
|
|
37
|
+
DateTimeEditor?: typeof DateTimeCellEditor | undefined;
|
|
38
|
+
MultiSelectEditor?: typeof MultiSelectCellEditor | undefined;
|
|
34
39
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
35
40
|
onRegisterLateCommit?: ((receiver: LateEditCommitReceiver) => () => void) | undefined;
|
|
36
41
|
align?: 'left' | 'center' | 'right';
|
|
@@ -39,5 +44,5 @@ type CellEditorLayerProps<T> = {
|
|
|
39
44
|
alignTop?: boolean;
|
|
40
45
|
leadingInset?: string | undefined;
|
|
41
46
|
};
|
|
42
|
-
export declare function CellEditorLayer<T>({ rect, headerHeight, leadingWidth, baseOffset, initialValue, editor, editorSession, themeClassName, slots, onCommit, onCancel, onRegisterFlush, onRegisterLateCommit, SearchSelectEditor, align, enterMove, domId, alignTop, leadingInset, }: CellEditorLayerProps<T>): import("react").JSX.Element | null;
|
|
47
|
+
export declare function CellEditorLayer<T>({ rect, headerHeight, leadingWidth, baseOffset, initialValue, editor, editorSession, themeClassName, slots, onCommit, onCancel, onCommitToSelection, onRegisterFlush, onRegisterLateCommit, SearchSelectEditor, DateTimeEditor, MultiSelectEditor, align, enterMove, domId, alignTop, leadingInset, }: CellEditorLayerProps<T>): import("react").JSX.Element | null;
|
|
43
48
|
export default CellEditorLayer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./usePortalTokens-CeVR4LF2.cjs"),t=require("./useVirtualizerCore-CA1UYXG3.cjs"),n=require("./usePopupLocaleText-CmlJsMAf.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/editorValues"),d=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/filtering"),f=require("@ishibashi0112/spreadsheet-grid-core/internal/utils/shadowDom"),p=require("@ishibashi0112/spreadsheet-grid-core/internal/controllers/dateRolloverStore"),m=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/dateFilterPresets"),h=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFilters"),g=require("@ishibashi0112/spreadsheet-grid-core/internal/controllers/popoverSupport"),_=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/focusCycle"),v=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/setFilterSearch"),y=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/setFilterSelection"),b=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/numberFilterCondition"),x=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/textFilterCondition"),S=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/dateFilterCondition"),C=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/datePickerCalendar"),w=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/dateFilterTree");function T({value:e,onCommit:t,ariaLabel:a,inputRef:o,onRequestClose:p,align:m=`left`}){let h=n.t(),[g,_]=(0,r.useState)(null),[v,y]=(0,r.useState)(!1),[b,x]=(0,r.useState)(!1),[S,w]=(0,r.useState)(`days`),[T,E]=(0,r.useState)(()=>new Date().getFullYear()),[D,O]=(0,r.useState)(()=>new Date().getMonth()),k=(0,r.useRef)(null),A=g??(0,C.formatFilterDateDisplay)(e),j=(0,d.toDateKey)(new Date)??``,M=()=>{if(g===null)return;let e=g.trim();if(e===``){t(``),_(null),y(!1);return}let n=(0,u.parseFilterDateText)(e);if(n===null){y(!0);return}t(n),_(null),y(!1)},N=()=>{let[t,n]=(e===``?j:e).split(`-`);E(Number(t)),O(Number(n)-1),w(`days`),x(!0)},P=()=>{x(!1)},F=e=>{t(e),_(null),y(!1),P()};(0,r.useEffect)(()=>{if(!b)return;let e=e=>{let t=(0,f.getEventTarget)(e,k.current??null);t&&k.current?.contains(t)||x(!1)};return document.addEventListener(`pointerdown`,e,!0),()=>{document.removeEventListener(`pointerdown`,e,!0)}},[b]);let I=e=>{if(e.stopPropagation(),e.key===`Enter`){if((0,s.isImeComposingKeyEvent)(e.nativeEvent))return;e.preventDefault(),M(),P();return}if(e.key===`Escape`){if(e.preventDefault(),b){P();return}p()}},L=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(),b){P(),t.currentTarget.closest(`.ssg-dp-root`)?.querySelector(`.ssg-dp-input`)?.focus();return}p()}}}),R=e=>{if(S===`days`){let t=new Date(T,D+e,1);E(t.getFullYear()),O(t.getMonth());return}if(S===`months`){E(t=>t+e);return}E(t=>t+e*12)},z=()=>{w(e=>e===`days`?`months`:`years`)},B=()=>{w(e=>e===`years`?`months`:`days`)},V=S===`days`?(0,c.formatLocaleText)(h.calendarTitle,{year:T,month:D+1}):S===`months`?(0,c.formatLocaleText)(h.calendarYear,{year:T}):`${(0,C.yearGridStart)(T)} – ${(0,C.yearGridStart)(T)+11}`;return(0,l.jsxs)(`div`,{ref:k,className:`ssg-dp-root`,children:[(0,l.jsxs)(`div`,{className:(0,i.cx)(`ssg-dp-field`,b&&`ssg-dp-field--open`,v&&`ssg-dp-field--invalid`),children:[(0,l.jsx)(`input`,{ref:o,type:`text`,inputMode:`numeric`,value:A,placeholder:`yyyy/mm/dd`,"aria-label":a,"aria-invalid":v||void 0,className:`ssg-dp-input`,onChange:e=>{_(e.target.value),y(!1)},onKeyDown:I,onBlur:M}),(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-cal-btn`,"aria-label":b?h.calendarClose:h.calendarOpen,...L(()=>{b?P():N()}),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`})]})})]}),b&&(0,l.jsxs)(`div`,{className:(0,i.cx)(`ssg-dp-panel`,m===`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":h.calendarPrevious,...L(()=>R(-1)),children:`‹`}),(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-nav-title`,disabled:S===`years`,"aria-label":h.calendarChangeView,...L(z),children:V}),(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-nav-btn`,"aria-label":h.calendarNext,...L(()=>R(1)),children:`›`})]}),S===`days`&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`div`,{className:`ssg-dp-dow`,children:h.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,C.buildCalendarDayCells)(T,D).map(t=>(0,l.jsx)(`button`,{type:`button`,className:(0,i.cx)(`ssg-dp-day`,!t.inCurrentMonth&&`ssg-dp-day--out`,t.key===j&&`ssg-dp-day--today`,t.key===e&&`ssg-dp-day--selected`),"aria-label":t.key,...L(()=>F(t.key)),children:t.day},t.key))})]}),S===`months`&&(0,l.jsx)(`div`,{className:`ssg-dp-grid`,children:h.calendarMonths.map((e,t)=>(0,l.jsx)(`button`,{type:`button`,className:(0,i.cx)(`ssg-dp-cell`,t===D&&`ssg-dp-cell--selected`),...L(()=>{O(t),w(`days`)}),children:e},t))}),S===`years`&&(0,l.jsx)(`div`,{className:`ssg-dp-grid`,children:(0,C.buildYearGrid)(T).map(e=>(0,l.jsx)(`button`,{type:`button`,className:(0,i.cx)(`ssg-dp-cell`,e===T&&`ssg-dp-cell--selected`),...L(()=>{E(e),w(`months`)}),children:e},e))}),(0,l.jsxs)(`div`,{className:`ssg-dp-foot`,children:[S!==`days`&&(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-foot-btn`,...L(B),children:h.calendarBack}),(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-foot-btn`,...L(()=>F(j)),children:h.calendarToday}),(0,l.jsx)(`button`,{type:`button`,className:`ssg-dp-foot-btn ssg-dp-foot-btn--muted`,...L(()=>F(``)),children:h.clear})]})]})]})}var E=24,D=40,O=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(pointer: coarse)`).matches?D:E,k=(e,t,n)=>e===``&&t===h.DEFAULT_FILTER_LOCALE_TEXT.blank?n:t,A=(e,t)=>t===h.DEFAULT_FILTER_LOCALE_TEXT.blank?e:e.map(e=>e.value===``&&e.label===h.DEFAULT_FILTER_LOCALE_TEXT.blank?{...e,label:t}:e);function j({options:e,setSelection:i,searchInputRef:a,onValueToggle:o,onSelectAllChange:u,onReplaceSelection:d,onRequestClose:f,isServerSide:p,selectAllUsesExplicitScope:m=!1,truncated:h=!1}){let g=n.t(),[_,b]=(0,r.useState)(``),x=(0,r.useDeferredValue)(_),S=(0,r.useMemo)(()=>A(e,g.blank),[e,g.blank]),C=(0,r.useMemo)(()=>(0,v.filterSetOptionsBySearch)(S,x),[S,x]),w=x.trim().length>0,T=(0,r.useRef)(null),[E]=(0,r.useState)(O),D=t.t({count:C.length,getScrollElement:()=>T.current,estimateSize:()=>E,overscan:10}),j=(0,r.useMemo)(()=>{if(i===null)return C.length;let e=0;for(let t of C)(0,y.isSetValueSelected)(i,t.value)&&(e+=1);return e},[i,C]),M=C.length>0&&j===C.length,N=j>0&&!M,P=(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)P.has(e)&&(t+=1);return i.mode===`include`?t:e.length-t},[i,P,e.length]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`input`,{ref:a,type:`text`,value:_,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,v.resolveSetFilterEnterAction)(S,_);if(t.kind===`none`)return;t.kind===`replace`&&d(t.values),f()}},placeholder:g.filterSearchPlaceholder,"aria-label":g.filterSearchPlaceholder,className:`ssg-filter-input`}),(0,l.jsxs)(`label`,{className:`ssg-filter-selectall`,children:[(0,l.jsx)(`input`,{type:`checkbox`,checked:M,ref:e=>{e&&(e.indeterminate=N)},onChange:()=>{u(w||m?C.map(e=>e.value):`all`,!M)}}),(0,l.jsx)(`span`,{className:`ssg-filter-selectall-label`,children:w?g.filterSelectAllResults:g.filterSelectAll})]}),(0,l.jsx)(`div`,{ref:T,className:`ssg-filter-list`,children:C.length===0?(0,l.jsx)(`div`,{className:`ssg-filter-empty`,children:e.length===0?p?g.filterNoOptionsSource:g.noOptions:g.filterNoMatches}):(0,l.jsx)(`div`,{className:`ssg-filter-virt`,style:{height:D.getTotalSize()},children:D.getVirtualItems().map(e=>{let t=C[e.index];if(!t)return null;let n=(0,y.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:k(t.value,t.label,g.blank)})]},t.value)})})}),(0,l.jsxs)(`div`,{className:`ssg-filter-meta`,children:[(0,c.formatLocaleText)(g.filterSelectedCount,{selected:F,total:e.length}),w?(0,c.formatLocaleText)(g.filterShownCount,{count:C.length}):``,h&&(0,l.jsx)(B,{})]})]})}var M=e=>{e.key!==`Escape`&&e.stopPropagation()},N=e=>e.nativeEvent.isComposing===!0,P=(e,t,n)=>{if(N(n)){e(t,{commit:!1});return}e(t)};function F({draft:e,valueInputRef:t,onDraftChange:r,onKeyDown:i}){let a=n.t(),o=(0,b.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:b.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=>P(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=>P(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 I({draft:e,valueInputRef:t,onDraftChange:r,onKeyDown:i}){let a=n.t(),o=(0,x.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:x.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=>P(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 L({draft:e,valueInputRef:t,onDraftChange:r,onKeyDown:a,presets:o,renderDateInput:s,onRequestClose:c}){let u=n.t(),d=e.preset===null?(0,S.dateFilterOperandCount)(e.operator):0,f=(t,n)=>{r({...e,[t]:(0,S.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:S.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)(T,{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)(T,{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}),(0,g.keepFocusAfterPress)(n.currentTarget)},onKeyDown:n=>{M(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 R({options:e,setSelection:i,searchInputRef:a,onValueToggle:o,onSelectAllChange:u,onReplaceSelection:d,onRequestClose:f,isServerSide:p,truncated:m=!1}){let h=n.t(),[g,_]=(0,r.useState)(``),b=(0,r.useDeferredValue)(g),[x,S]=(0,r.useState)(()=>new Set),C=b.trim().length>0,T=(0,r.useMemo)(()=>A(e,h.blank),[e,h.blank]),E=(0,r.useMemo)(()=>(0,v.filterSetOptionsBySearch)(T,b),[T,b]),D=(0,r.useMemo)(()=>(0,w.buildDateTreeRows)(e,x,h),[e,x,h]),j=(0,r.useRef)(null),N=C?E.length:D.length,[P]=(0,r.useState)(O),F=t.t({count:N,getScrollElement:()=>j.current,estimateSize:()=>P,overscan:10}),I=(0,r.useMemo)(()=>(C?E:e).map(e=>e.value),[C,E,e]),L=(0,r.useMemo)(()=>{let e=0;for(let t of I)(0,y.isSetValueSelected)(i,t)&&(e+=1);return e},[I,i]),R=I.length>0&&L===I.length,z=L>0&&!R,V=(0,r.useMemo)(()=>new Set(e.map(e=>e.value)),[e]),H=(0,r.useMemo)(()=>{if(i===null)return e.length;let t=0;for(let e of i.values)V.has(e)&&(t+=1);return i.mode===`include`?t:e.length-t},[i,V,e.length]),U=e=>{S(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},W=e=>{let t=0;for(let n of e)(0,y.isSetValueSelected)(i,n)&&(t+=1);return t},G=e=>{if(e.type===`leaf`){o(e.key);return}let t=e.leafKeys.length>0&&W(e.leafKeys)===e.leafKeys.length;u(e.leafKeys,!t)},ee=e=>{let t=W(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(),U(e.key)},onKeyDown:t=>{M(t),(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),U(e.key))},className:`ssg-filter-tree-toggle`,"aria-label":e.expanded?h.treeCollapse:h.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":k(e.key,e.label,h.blank),onChange:()=>G(e)}),(0,l.jsx)(`span`,{className:`ssg-filter-option-label`,children:k(e.key,e.label,h.blank)})]})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`input`,{ref:a,type:`text`,value:g,onChange:e=>_(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,v.resolveSetFilterEnterAction)(T,g);if(t.kind===`none`)return;t.kind===`replace`&&d(t.values),f()}},placeholder:h.filterSearchPlaceholder,"aria-label":h.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:C?h.filterSelectAllResults:h.filterSelectAll})]}),(0,l.jsx)(`div`,{ref:j,className:`ssg-filter-list`,children:N===0?(0,l.jsx)(`div`,{className:`ssg-filter-empty`,children:e.length===0?p?h.filterNoOptionsSource:h.noOptions:h.filterNoMatches}):(0,l.jsx)(`div`,{className:`ssg-filter-virt`,style:{height:F.getTotalSize()},children:F.getVirtualItems().map(e=>{if(C){let t=E[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,y.isSetValueSelected)(i,t.value),onChange:()=>o(t.value)}),(0,l.jsx)(`span`,{className:`ssg-filter-option-label`,children:k(t.value,t.label,h.blank)})]},t.value):null}let t=D[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`)||G(t)},children:ee(t)},t.key):null})})}),(0,l.jsxs)(`div`,{className:`ssg-filter-meta`,children:[(0,c.formatLocaleText)(h.filterSelectedCount,{selected:H,total:e.length}),C?(0,c.formatLocaleText)(h.filterShownCount,{count:E.length}):``,m&&(0,l.jsx)(B,{})]})]})}function z({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=>{M(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:`ssg-filter-btn-secondary`,children:i.retry}):null]})}function B(){return(0,l.jsx)(`span`,{className:`ssg-filter-truncated`,children:n.t().filterOptionsTruncated})}function V({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=>{M(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=>{M(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 H({isOpen:t,themeClassName:u,popoverSlot:d,title:f,filterType:h,draftValue:g,numberConditionDraft:v,onNumberConditionDraftChange:y,textConditionDraft:C,onTextConditionDraftChange:w,dateConditionDraft:T,onDateConditionDraftChange:E,datePresets:D,renderDateInput:O,onComboConditionClear:A,onComboSelectionClear:N,comboSummaryText:P,currentValueText:H,layout:U,selectOptions:W,optionsStatus:G,optionsProgress:ee,optionsTruncated:K=!1,optionsErrorMessage:te,onOptionsRetry:ne,setSelection:q,popoverRef:re,textInputRef:J,selectRef:ie,onRequestClose:Y,onDraftChange:ae,onApply:X,onClear:oe,onSetValueToggle:se,onSetSelectAllChange:ce,onSetClear:le,onSetReplaceSelection:ue,isServerSide:de=!1}){let Z=n.t(),fe=(0,r.useRef)(null),[pe]=(0,r.useState)(()=>new Date),[Q]=(0,r.useState)(p.createDateRolloverStore);e.o(Q,{active:t&&h===`dateSet`&&(T?.preset??null)!==null});let me=(0,S.resolveComboReferenceDate)(pe,(0,r.useSyncExternalStore)(Q.subscribe,Q.getSnapshot,Q.getSnapshot));e.i(re,t&&U!==null,u,{layout:U});let he=e.r(t&&U!==null);if(typeof document>`u`||!t||!U||!he)return null;let ge={top:U.top,left:U.left,width:U.width,maxHeight:U.maxHeight},_e=e=>{e.stopPropagation(),e.key===`Escape`&&!(0,o.isEscapePreventedInside)(e.nativeEvent)&&!(0,s.isImeComposingKeyEvent)(e.nativeEvent)&&(e.preventDefault(),Y())},ve=e=>{if(e.key!==`Tab`||e.altKey||e.ctrlKey||e.metaKey||(0,s.isImeComposingKeyEvent)(e.nativeEvent))return;let t=(0,_.resolveFocusWrapTarget)(e.currentTarget,e.target instanceof Element?e.target:null,e.shiftKey);t!==null&&(e.preventDefault(),t.focus())},ye=e=>{e.stopPropagation()},be=h===`set`,xe=h===`numberSet`,Se=h===`textSet`,Ce=h===`dateSet`,we=xe||Se||Ce,Te=be||we,Ee=G===`loading`||G===`error`,De=v??b.DEFAULT_NUMBER_FILTER_DRAFT,Oe=C??x.DEFAULT_TEXT_FILTER_DRAFT,ke=T??S.DEFAULT_DATE_FILTER_DRAFT,Ae=D??(0,m.normalizeDateFilterPresets)(void 0,Z),je=xe?(0,b.buildParsedNumberFilterFromDraft)(De):null,Me=Se?(0,x.buildParsedTextFilterFromDraft)(Oe):null,Ne=Ce?(0,S.buildParsedDateFilterFromDraft)(ke):null,Pe=je!==null||Me!==null||Ne!==null,$=xe?(0,b.filterOptionsByNumberCondition)(W,je):Se?(0,x.filterOptionsByTextCondition)(W,Me):Ce?(0,S.filterOptionsByDateCondition)(W,Ne,me,Ae):W,Fe=e=>{if(e.stopPropagation(),!(0,s.isImeComposingKeyEvent)(e.nativeEvent)){if(e.key===`Enter`){e.preventDefault(),X();return}e.key===`Escape`&&(e.preventDefault(),Y())}},Ie=xe?(0,l.jsx)(F,{draft:De,valueInputRef:J,onDraftChange:y,onKeyDown:Fe}):Se?(0,l.jsx)(I,{draft:Oe,valueInputRef:J,onDraftChange:w,onKeyDown:Fe}):(0,l.jsx)(L,{draft:ke,valueInputRef:J,onDraftChange:E,onKeyDown:Fe,presets:Ae,renderDateInput:O,onRequestClose:Y});return(0,a.createPortal)((0,l.jsxs)(`div`,{ref:re,onPointerDown:ye,onKeyDown:_e,onKeyDownCapture:ve,onPasteCapture:e=>{e.stopPropagation()},className:(0,i.cx)(`ssg-filter-popover`,u,d?.className),style:{...d?.style,...ge},role:`dialog`,"aria-label":(0,c.formatLocaleText)(Z.filterTitle,{column:f}),tabIndex:-1,children:[(0,l.jsx)(`div`,{className:`ssg-filter-title`,children:(0,c.formatLocaleText)(Z.filterTitle,{column:f})}),(Te||h===`select`)&&G===`collecting`?we?(0,l.jsx)(V,{conditionEditor:Ie,conditionActive:Pe,onConditionClear:A,options:$,setSelection:q,onSelectionClear:N,summaryText:P,optionsMeta:Z.filterOptionsLoadingShort,children:(0,l.jsx)(`div`,{className:`ssg-filter-collecting`,children:(0,c.formatLocaleText)(Z.filterCollecting,{percent:Math.round(ee*100)})})}):(0,l.jsx)(`div`,{className:`ssg-filter-collecting`,children:(0,c.formatLocaleText)(Z.filterCollecting,{percent:Math.round(ee*100)})}):(Te||h===`select`)&&Ee?we?(0,l.jsx)(V,{conditionEditor:Ie,conditionActive:Pe,onConditionClear:A,options:$,setSelection:q,onSelectionClear:N,summaryText:P,optionsMeta:G===`loading`?Z.filterOptionsLoadingShort:Z.filterOptionsFailedShort,children:(0,l.jsx)(z,{status:G===`loading`?`loading`:`error`,errorMessage:te,onRetry:ne})}):(0,l.jsx)(z,{status:G===`loading`?`loading`:`error`,errorMessage:te,onRetry:ne}):we?(0,l.jsx)(V,{conditionEditor:Ie,conditionActive:Pe,onConditionClear:A,options:$,setSelection:q,onSelectionClear:N,summaryText:P,children:Ce?(0,l.jsx)(R,{options:$,setSelection:q,searchInputRef:fe,onValueToggle:se,onSelectAllChange:ce,onReplaceSelection:ue,onRequestClose:Y,isServerSide:de,truncated:K}):(0,l.jsx)(j,{options:$,setSelection:q,searchInputRef:fe,onValueToggle:se,onSelectAllChange:ce,onReplaceSelection:ue,onRequestClose:Y,isServerSide:de,selectAllUsesExplicitScope:!0,truncated:K})}):be?(0,l.jsx)(j,{options:W,setSelection:q,searchInputRef:J,onValueToggle:se,onSelectAllChange:ce,onReplaceSelection:ue,onRequestClose:Y,isServerSide:de,truncated:K}):h===`number`?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(F,{draft:De,valueInputRef:J,onDraftChange:y,onKeyDown:Fe})}):h===`select`?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`select`,{ref:ie,value:g,onChange:e=>ae(e.target.value),onKeyDown:e=>{if(e.stopPropagation(),e.key===`Enter`){e.preventDefault(),X();return}e.key===`Escape`&&(e.preventDefault(),Y())},className:`ssg-filter-select`,children:[(0,l.jsx)(`option`,{value:``,children:Z.filterAll}),W.map(e=>(0,l.jsx)(`option`,{value:e.value,children:k(e.value,e.label,Z.blank)},`${f}-${e.value}`))]}),(0,l.jsxs)(`div`,{className:`ssg-filter-meta`,children:[(0,c.formatLocaleText)(Z.filterOptionCount,{count:W.length}),K&&(0,l.jsx)(B,{})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`input`,{ref:J,type:`text`,value:g,onChange:e=>ae(e.target.value),onKeyDown:e=>{if(e.stopPropagation(),!(0,s.isImeComposingKeyEvent)(e.nativeEvent)){if(e.key===`Enter`){e.preventDefault(),X();return}e.key===`Escape`&&(e.preventDefault(),Y())}},placeholder:Z.filterTextPlaceholder,"aria-label":Z.filterTextPlaceholder,className:`ssg-filter-input`}),(0,l.jsx)(`div`,{className:`ssg-filter-meta ssg-filter-meta--ellipsis`,children:Z.filterTextHint})]}),!Te&&(0,l.jsx)(`div`,{className:`ssg-filter-meta ssg-filter-meta--ellipsis`,children:(0,c.formatLocaleText)(Z.filterCurrentValue,{value:H})}),(0,l.jsx)(`div`,{className:`ssg-filter-footer`,children:Te?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),le()},onKeyDown:e=>{M(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),le())},className:`ssg-filter-btn-secondary`,children:Z.clear}),(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),Y()},onKeyDown:e=>{M(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),Y())},className:`ssg-filter-btn-primary`,children:Z.close})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),oe()},onKeyDown:e=>{M(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),oe())},className:`ssg-filter-btn-secondary`,children:Z.clear}),(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),X()},onKeyDown:e=>{M(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),X())},className:`ssg-filter-btn-primary`,children:Z.apply})]})})]}),he)}exports.ColumnFilterPopover=H,exports.default=H;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as r } from "./useVirtualizerCore-
|
|
3
|
-
import { t as i } from "./usePopupLocaleText-
|
|
1
|
+
import { i as e, o as t, r as n } from "./usePortalTokens-CkjVoVTY.js";
|
|
2
|
+
import { t as r } from "./useVirtualizerCore-BKZtPhuo.js";
|
|
3
|
+
import { t as i } from "./usePopupLocaleText-Cfb4fQ8G.js";
|
|
4
4
|
import { useDeferredValue as a, useEffect as o, useMemo as s, useRef as c, useState as l, useSyncExternalStore as u } from "react";
|
|
5
5
|
import { cx as d } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cx";
|
|
6
6
|
import { createPortal as f } from "react-dom";
|
|
@@ -819,10 +819,10 @@ function ge({ conditionEditor: e, conditionActive: t, onConditionClear: n, optio
|
|
|
819
819
|
}
|
|
820
820
|
function Q({ isOpen: r, themeClassName: a, popoverSlot: o, title: s, filterType: y, draftValue: b, numberConditionDraft: x, onNumberConditionDraftChange: w, textConditionDraft: T, onTextConditionDraftChange: D, dateConditionDraft: O, onDateConditionDraftChange: k, datePresets: j, renderDateInput: P, onComboConditionClear: I, onComboSelectionClear: z, comboSummaryText: B, currentValueText: H, layout: U, selectOptions: W, optionsStatus: G, optionsProgress: re, optionsTruncated: K = !1, optionsErrorMessage: ie, onOptionsRetry: ae, setSelection: q, popoverRef: oe, textInputRef: J, selectRef: se, onRequestClose: Z, onDraftChange: le, onApply: Q, onClear: _e, onSetValueToggle: ve, onSetSelectAllChange: ye, onSetClear: be, onSetReplaceSelection: xe, isServerSide: Se = !1 }) {
|
|
821
821
|
let $ = i(), Ce = c(null), [we] = l(() => /* @__PURE__ */ new Date()), [Te] = l(S);
|
|
822
|
-
|
|
822
|
+
t(Te, { active: r && y === "dateSet" && (O?.preset ?? null) !== null });
|
|
823
823
|
let Ee = ne(we, u(Te.subscribe, Te.getSnapshot, Te.getSnapshot));
|
|
824
824
|
e(oe, r && U !== null, a, { layout: U });
|
|
825
|
-
let De =
|
|
825
|
+
let De = n(r && U !== null);
|
|
826
826
|
if (typeof document > "u" || !r || !U || !De) return null;
|
|
827
827
|
let Oe = {
|
|
828
828
|
top: U.top,
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { t as e } from "./usePopupLocaleText-Cfb4fQ8G.js";
|
|
2
|
+
import { cx as t } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cx";
|
|
3
|
+
import { formatLocaleText as n } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
4
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import { formatDateKey as o } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/filtering";
|
|
6
|
+
import { buildCalendarDayCells as s, buildYearGrid as c, yearGridStart as l } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/datePickerCalendar";
|
|
7
|
+
//#region src/view/DateEditorCalendar.tsx
|
|
8
|
+
function u({ controller: u, snapshot: d, timeInput: f, timeInputLabel: p, timeInputRef: m, onTimeKeyDown: h, onTimeBlur: g, notice: _ }) {
|
|
9
|
+
let v = e(), { calendarYear: y, calendarMonth: b, calendarView: x, selectedDate: S } = d, C = o(/* @__PURE__ */ new Date()), w = x === "days" ? n(v.calendarTitle, {
|
|
10
|
+
year: y,
|
|
11
|
+
month: b + 1
|
|
12
|
+
}) : x === "months" ? n(v.calendarYear, { year: y }) : `${l(y)} – ${l(y) + 11}`;
|
|
13
|
+
return /* @__PURE__ */ a(r, { children: [
|
|
14
|
+
_,
|
|
15
|
+
/* @__PURE__ */ a("div", {
|
|
16
|
+
className: "ssg-dp-nav",
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ i("button", {
|
|
19
|
+
type: "button",
|
|
20
|
+
tabIndex: -1,
|
|
21
|
+
className: "ssg-dp-nav-btn",
|
|
22
|
+
"aria-label": v.calendarPrevious,
|
|
23
|
+
onClick: () => u.navigate(-1),
|
|
24
|
+
children: "‹"
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ i("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
tabIndex: -1,
|
|
29
|
+
className: "ssg-dp-nav-title",
|
|
30
|
+
disabled: x === "years",
|
|
31
|
+
"aria-label": v.calendarChangeView,
|
|
32
|
+
onClick: () => u.drillUp(),
|
|
33
|
+
children: w
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ i("button", {
|
|
36
|
+
type: "button",
|
|
37
|
+
tabIndex: -1,
|
|
38
|
+
className: "ssg-dp-nav-btn",
|
|
39
|
+
"aria-label": v.calendarNext,
|
|
40
|
+
onClick: () => u.navigate(1),
|
|
41
|
+
children: "›"
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
}),
|
|
45
|
+
x === "days" ? /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("div", {
|
|
46
|
+
className: "ssg-dp-dow",
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
children: v.calendarWeekdays.map((e, n) => /* @__PURE__ */ i("span", {
|
|
49
|
+
className: t(n === 0 && "ssg-dp-dow--sun", n === 6 && "ssg-dp-dow--sat"),
|
|
50
|
+
children: e
|
|
51
|
+
}, n))
|
|
52
|
+
}), /* @__PURE__ */ i("div", {
|
|
53
|
+
className: "ssg-dp-days",
|
|
54
|
+
children: s(y, b).map((e) => /* @__PURE__ */ i("button", {
|
|
55
|
+
type: "button",
|
|
56
|
+
tabIndex: -1,
|
|
57
|
+
className: t("ssg-dp-day", !e.inCurrentMonth && "ssg-dp-day--out", e.key === C && "ssg-dp-day--today", e.key === S && "ssg-dp-day--selected"),
|
|
58
|
+
"aria-label": e.key,
|
|
59
|
+
"aria-pressed": e.key === S,
|
|
60
|
+
onClick: () => u.chooseDay(e.key),
|
|
61
|
+
children: e.day
|
|
62
|
+
}, e.key))
|
|
63
|
+
})] }) : /* @__PURE__ */ i("div", {
|
|
64
|
+
className: "ssg-dp-grid",
|
|
65
|
+
children: x === "months" ? v.calendarMonths.map((e, n) => /* @__PURE__ */ i("button", {
|
|
66
|
+
type: "button",
|
|
67
|
+
tabIndex: -1,
|
|
68
|
+
className: t("ssg-dp-cell", n === b && "ssg-dp-cell--selected"),
|
|
69
|
+
onClick: () => u.chooseMonth(n),
|
|
70
|
+
children: e
|
|
71
|
+
}, n)) : c(y).map((e) => /* @__PURE__ */ i("button", {
|
|
72
|
+
type: "button",
|
|
73
|
+
tabIndex: -1,
|
|
74
|
+
className: t("ssg-dp-cell", e === y && "ssg-dp-cell--selected"),
|
|
75
|
+
onClick: () => u.chooseYear(e),
|
|
76
|
+
children: e
|
|
77
|
+
}, e))
|
|
78
|
+
}),
|
|
79
|
+
f ? /* @__PURE__ */ a("label", {
|
|
80
|
+
className: "ssg-date-editor-time",
|
|
81
|
+
children: [/* @__PURE__ */ i("span", {
|
|
82
|
+
className: "ssg-date-editor-time-label",
|
|
83
|
+
children: p
|
|
84
|
+
}), /* @__PURE__ */ i("input", {
|
|
85
|
+
ref: m,
|
|
86
|
+
type: "text",
|
|
87
|
+
inputMode: "numeric",
|
|
88
|
+
autoComplete: "off",
|
|
89
|
+
spellCheck: !1,
|
|
90
|
+
className: "ssg-date-editor-time-input",
|
|
91
|
+
value: d.timeText,
|
|
92
|
+
placeholder: "--:--",
|
|
93
|
+
onChange: (e) => u.inputTime(e.target.value, e.nativeEvent.isComposing === !0),
|
|
94
|
+
onCompositionEnd: (e) => u.inputTime(e.currentTarget.value, !1),
|
|
95
|
+
onKeyDown: h,
|
|
96
|
+
onBlur: g
|
|
97
|
+
})]
|
|
98
|
+
}) : null,
|
|
99
|
+
/* @__PURE__ */ a("div", {
|
|
100
|
+
className: "ssg-dp-foot",
|
|
101
|
+
children: [
|
|
102
|
+
x === "days" ? null : /* @__PURE__ */ i("button", {
|
|
103
|
+
type: "button",
|
|
104
|
+
tabIndex: -1,
|
|
105
|
+
className: "ssg-dp-foot-btn",
|
|
106
|
+
onClick: () => u.drillDown(),
|
|
107
|
+
children: v.calendarBack
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ i("button", {
|
|
110
|
+
type: "button",
|
|
111
|
+
tabIndex: -1,
|
|
112
|
+
className: "ssg-dp-foot-btn",
|
|
113
|
+
onClick: () => u.chooseToday(),
|
|
114
|
+
children: v.calendarToday
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ i("button", {
|
|
117
|
+
type: "button",
|
|
118
|
+
tabIndex: -1,
|
|
119
|
+
className: "ssg-dp-foot-btn ssg-dp-foot-btn--muted",
|
|
120
|
+
onClick: () => u.clear(),
|
|
121
|
+
children: v.clear
|
|
122
|
+
})
|
|
123
|
+
]
|
|
124
|
+
})
|
|
125
|
+
] });
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
export { u as DateEditorCalendar, u as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./usePopupLocaleText-CmlJsMAf.cjs");let t=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/cx"),n=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText"),r=require("react/jsx-runtime"),i=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/filtering"),a=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/datePickerCalendar");function o({controller:o,snapshot:s,timeInput:c,timeInputLabel:l,timeInputRef:u,onTimeKeyDown:d,onTimeBlur:f,notice:p}){let m=e.t(),{calendarYear:h,calendarMonth:g,calendarView:_,selectedDate:v}=s,y=(0,i.formatDateKey)(new Date),b=_===`days`?(0,n.formatLocaleText)(m.calendarTitle,{year:h,month:g+1}):_===`months`?(0,n.formatLocaleText)(m.calendarYear,{year:h}):`${(0,a.yearGridStart)(h)} – ${(0,a.yearGridStart)(h)+11}`;return(0,r.jsxs)(r.Fragment,{children:[p,(0,r.jsxs)(`div`,{className:`ssg-dp-nav`,children:[(0,r.jsx)(`button`,{type:`button`,tabIndex:-1,className:`ssg-dp-nav-btn`,"aria-label":m.calendarPrevious,onClick:()=>o.navigate(-1),children:`‹`}),(0,r.jsx)(`button`,{type:`button`,tabIndex:-1,className:`ssg-dp-nav-title`,disabled:_===`years`,"aria-label":m.calendarChangeView,onClick:()=>o.drillUp(),children:b}),(0,r.jsx)(`button`,{type:`button`,tabIndex:-1,className:`ssg-dp-nav-btn`,"aria-label":m.calendarNext,onClick:()=>o.navigate(1),children:`›`})]}),_===`days`?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`div`,{className:`ssg-dp-dow`,"aria-hidden":`true`,children:m.calendarWeekdays.map((e,n)=>(0,r.jsx)(`span`,{className:(0,t.cx)(n===0&&`ssg-dp-dow--sun`,n===6&&`ssg-dp-dow--sat`),children:e},n))}),(0,r.jsx)(`div`,{className:`ssg-dp-days`,children:(0,a.buildCalendarDayCells)(h,g).map(e=>(0,r.jsx)(`button`,{type:`button`,tabIndex:-1,className:(0,t.cx)(`ssg-dp-day`,!e.inCurrentMonth&&`ssg-dp-day--out`,e.key===y&&`ssg-dp-day--today`,e.key===v&&`ssg-dp-day--selected`),"aria-label":e.key,"aria-pressed":e.key===v,onClick:()=>o.chooseDay(e.key),children:e.day},e.key))})]}):(0,r.jsx)(`div`,{className:`ssg-dp-grid`,children:_===`months`?m.calendarMonths.map((e,n)=>(0,r.jsx)(`button`,{type:`button`,tabIndex:-1,className:(0,t.cx)(`ssg-dp-cell`,n===g&&`ssg-dp-cell--selected`),onClick:()=>o.chooseMonth(n),children:e},n)):(0,a.buildYearGrid)(h).map(e=>(0,r.jsx)(`button`,{type:`button`,tabIndex:-1,className:(0,t.cx)(`ssg-dp-cell`,e===h&&`ssg-dp-cell--selected`),onClick:()=>o.chooseYear(e),children:e},e))}),c?(0,r.jsxs)(`label`,{className:`ssg-date-editor-time`,children:[(0,r.jsx)(`span`,{className:`ssg-date-editor-time-label`,children:l}),(0,r.jsx)(`input`,{ref:u,type:`text`,inputMode:`numeric`,autoComplete:`off`,spellCheck:!1,className:`ssg-date-editor-time-input`,value:s.timeText,placeholder:`--:--`,onChange:e=>o.inputTime(e.target.value,e.nativeEvent.isComposing===!0),onCompositionEnd:e=>o.inputTime(e.currentTarget.value,!1),onKeyDown:d,onBlur:f})]}):null,(0,r.jsxs)(`div`,{className:`ssg-dp-foot`,children:[_===`days`?null:(0,r.jsx)(`button`,{type:`button`,tabIndex:-1,className:`ssg-dp-foot-btn`,onClick:()=>o.drillDown(),children:m.calendarBack}),(0,r.jsx)(`button`,{type:`button`,tabIndex:-1,className:`ssg-dp-foot-btn`,onClick:()=>o.chooseToday(),children:m.calendarToday}),(0,r.jsx)(`button`,{type:`button`,tabIndex:-1,className:`ssg-dp-foot-btn ssg-dp-foot-btn--muted`,onClick:()=>o.clear(),children:m.clear})]})]})}exports.DateEditorCalendar=o,exports.default=o;
|
package/dist/GridShell.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { SpreadsheetGridProps } from './model/gridTypes.js';
|
|
2
2
|
import type { GridShellFeatures } from './features/types.js';
|
|
3
|
-
export declare function useGridShell<T extends object>({ rows: rowsProp, dataSource, serverSideRefreshToken, serverSideRefetch, onServerSideLoadError, onServerSideWriteError, columns: columnsProp, onRowsChange, onColumnsChange, rowKeyGetter, isRowExportable, createRow, createOverflowColumn, onPasteSkipped, pasteFillsSelection, rowHeight: rowHeightProp, autoHeight, estimateRowHeight, verticalAlign, headerHeight: headerHeightProp, density, theme, motion, popupContainer, animateRows, showCopyRange, hoverHighlight, highlightChanges, showSaveStatus, rowDragMotion, columnDragMotion, find, onFindChange, rowHeaderWidth, height, maxHeight, readOnly, dimReadOnlyCells, canEditCell: canEditCellProp, enableUndoRedo, enableClearOnDelete, editorEnterMove, imeDirectInput, undoHistoryLimit, onUndoRedoStateChange, trackChanges, onChangesChange, enableRangeSelection, enableRowSelection, rowSelectionMode, enableSelectAllRows: enableSelectAllRowsProp, rowSelection: rowSelectionProp, selectedRowKeys: selectedRowKeysProp, onRowSelectionChange, enableGlobalFilter, globalFilterMatch, enableColumnFilter, renderFilterDateInput, getFilterOptions, enableSorting, manualFiltering, manualSorting, enableColumnResize, autoSizeColumns, showCellOverflowTooltip, showValidationMarks, enableRowHover, enableColumnHeaderHover, hoveredRowIndex: hoveredRowIndexProp, onHoveredRowChange, onCellClick, onCellDoubleClick, onActiveCellChange, enableColumnMenu, noMatchingRowsText, noRowsText, ariaLabel, showTopBar, showBottomBar, showTopBarSummary, showTopBarFilter, globalFilterPlaceholder, globalFilterIcon, localeText, showTopBarCounts, showBottomBarCounts, showSelectionAggregates, showFilterChipBar, renderTopBar, renderBottomBar, className, style, classNames, getRowClassName, detailRow, onExpandedDetailRowKeysChange, labelRow, totalRow, pinnedTopRows, pinnedBottomRows, pinnedBottomRowsPlacement, columnGroups: columnGroupsProp, columnGroupHeaderHeight: columnGroupHeaderHeightProp, onColumnGroupOpenChange, treeData, onTreeRowOpenChange, fillHandle, enableRowDrag, isRowDraggable, onRowMove, canDropRow, enableContextMenu, getContextMenuItems, onContextMenuOpen, scrollHint, ref, onStateChange, initialState, includeGroupingInState, activeCellFollows, onFiltersChange, onSortChange, onScroll, }: SpreadsheetGridProps<T>, features: GridShellFeatures): import("react").JSX.Element;
|
|
3
|
+
export declare function useGridShell<T extends object>({ rows: rowsProp, dataSource, serverSideRefreshToken, serverSideRefetch, onServerSideLoadError, onServerSideWriteError, columns: columnsProp, onRowsChange, onColumnsChange, rowKeyGetter, isRowExportable, createRow, createOverflowColumn, onPasteSkipped, pasteFillsSelection, excelShortcuts, newRow, rowHeight: rowHeightProp, autoHeight, estimateRowHeight, verticalAlign, headerHeight: headerHeightProp, density, theme, motion, popupContainer, animateRows, showCopyRange, hoverHighlight, highlightChanges, showSaveStatus, rowDragMotion, columnDragMotion, find, onFindChange, rowHeaderWidth, height, maxHeight, readOnly, dimReadOnlyCells, canEditCell: canEditCellProp, enableUndoRedo, enableClearOnDelete, editorEnterMove, imeDirectInput, undoHistoryLimit, onUndoRedoStateChange, trackChanges, onChangesChange, enableRangeSelection, enableRowSelection, rowSelectionMode, enableSelectAllRows: enableSelectAllRowsProp, rowSelection: rowSelectionProp, selectedRowKeys: selectedRowKeysProp, onRowSelectionChange, enableGlobalFilter, globalFilterMatch, enableColumnFilter, renderFilterDateInput, getFilterOptions, enableSorting, manualFiltering, manualSorting, enableColumnResize, autoSizeColumns, showCellOverflowTooltip, showValidationMarks, enableRowHover, enableColumnHeaderHover, hoveredRowIndex: hoveredRowIndexProp, onHoveredRowChange, onCellClick, onCellDoubleClick, onActiveCellChange, enableColumnMenu, noMatchingRowsText, noRowsText, ariaLabel, showTopBar, showBottomBar, showTopBarSummary, showTopBarFilter, globalFilterPlaceholder, globalFilterIcon, localeText, showTopBarCounts, showBottomBarCounts, showSelectionAggregates, showFilterChipBar, renderTopBar, renderBottomBar, className, style, classNames, getRowClassName, detailRow, onExpandedDetailRowKeysChange, labelRow, totalRow, pinnedTopRows, pinnedBottomRows, pinnedBottomRowsPlacement, columnGroups: columnGroupsProp, columnGroupHeaderHeight: columnGroupHeaderHeightProp, onColumnGroupOpenChange, treeData, onTreeRowOpenChange, fillHandle, enableRowDrag, isRowDraggable, onRowMove, canDropRow, enableContextMenu, getContextMenuItems, onContextMenuOpen, scrollHint, ref, onStateChange, initialState, includeGroupingInState, activeCellFollows, onFiltersChange, onSortChange, onScroll, }: SpreadsheetGridProps<T>, features: GridShellFeatures): import("react").JSX.Element;
|
package/dist/common.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export { numberFormatter } from '@ishibashi0112/spreadsheet-grid-core/internal/l
|
|
|
2
2
|
export { numberParser } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueParsers';
|
|
3
3
|
export { restoreColumnsFromState } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/gridState';
|
|
4
4
|
export { preloadGridPopups } from './view/lazyPopups.js';
|
|
5
|
-
export type { SpreadsheetGridProps, GridColumn, GridColumnPinned, GridColumnEditor, EditorCommitDirection, EditorEnterMove, CellEditorContext, GridSelectEditorOption, GridSelectLoadOptionsParams, GridSelectFillRowContext, GridValidationMode, CellValidationContext, CellValidationResult, GridInvalidCell, EditorCommitResult, GridChanges, GridChangedRow, GridChangesSummary, GridChangesSavedTarget, GridTreeDataOptions, GridTreeRow, CellTreeContext, CellTreeState, TreeRowOpenChangeParams, GridRevealRowOptions, GridRowKey, GridAggFuncName, GridAggFuncParams, GridAggFunc, GridGroupRow, GridSelectFilterOption, GetFilterOptionsParams, GetFilterOptionsResult, ColumnFilterTypeOption, ColumnFilterUiType, CellRenderContext, HeaderRenderContext, GridColumnGroup, GridColumnGroupCollapsible, ColumnGroupHeaderRenderContext, ColumnGroupOpenChangeParams, GridExportColumnGroup, CellStyleContext, CanEditCellContext, GridConditionalFormat, RowStyleContext, DetailRowOptions, GridClassNames, GridSlotProps, GridFrameworkTypes, ReactGridTypes, DetailRowRenderContext, CellDetailContext, LabelRowOptions, LabelRowRenderContext, GridLabelRow, LabelRowSortMode, TotalRowOptions, TotalRowCellContext, TotalRowCellKind, FillHandleOptions, GridFillValueParams, GridFillDirection, GridFillKind, RowDragContext, RowMoveParams, RowDropParams, GridCellRef, GridCellEventParams, GridCellDoubleClickParams, CellValueFormatter, CellValueFormatterParams, SpreadsheetGridSlotContext, SpreadsheetGridDerivedSummary, SpreadsheetGridSelectionStats, GridLocaleText, GridLocaleTextTemplate, GridVerticalAlign, GridTextEditorEnterKey, GlobalFilterStatus, GridSelectionAggregates, CellCoord, CellRange, GridSelection, GridSortState, GridSortEntry, GridSortDirection, ColumnFilterValue, GridFilterState, SetColumnFilterValue, NumberColumnFilterValue, NumberSetColumnFilterValue, ParsedNumberFilter, TextSetColumnFilterValue, ParsedTextFilter, DateSetColumnFilterValue, ParsedDateFilter, DateFilterPreset, DateFilterPresetOption, CustomDateFilterPreset, DateFilterPresetRange, FilterDateInputContext, TextColumnFilterValue, DateColumnFilterValue, SelectColumnFilterValue, CustomColumnFilterValue, ServerSideDataSource, ServerSideQuery, ServerSideGetRowsParams, ServerSideGetRowsResult, ServerSideLoadErrorParams, ServerSideCellChange, ServerSideRowUpdate, ServerSideUpdateRowsParams, ServerSideUpdateRowsResult, ServerSideWriteErrorParams, RowModel, SpreadsheetGridHandle, RowSelectionModel, RowSelectionMode, ScrollAlign, GridScrollPosition, GridScrollEventParams, CsvExportScope, CsvExportOptions, GridExportOptions, GridExportCell, GridExportData, GridState, GridStatePatch, GridColumnState, GridDensity, GridTheme, UndoRedoState, GridMotion, GridPopupContainer, GridGlobalFilterMatch, GridPasteSkippedCell, GridPasteSkippedParams, GridApplyRowsOptions, GridPinnedRowPosition, FindOptions, FindChangeParams, GridDataBarFormat, GridColorScaleFormat, GridChipTone, GridChipSpec, GridChipMap, AutoSizeColumnsMode, GridContextMenuTarget, GridContextMenuParams, GridContextMenuItem, GridContextMenuActionItem, GridContextMenuLabelItem, GridContextMenuSeparatorItem, GridContextMenuCustomItem, ScrollHintOptions, ScrollHintTrigger, ScrollHintRenderArgs, } from './model/gridTypes.js';
|
|
5
|
+
export type { SpreadsheetGridProps, GridColumn, GridColumnPinned, GridColumnEditor, EditorCommitDirection, EditorEnterMove, CellEditorContext, GridSelectEditorOption, GridSelectLoadOptionsParams, GridSelectFillRowContext, GridValidationMode, CellValidationContext, CellValidationResult, GridInvalidCell, EditorCommitResult, GridChanges, GridChangedRow, GridChangesSummary, GridChangesSavedTarget, GridAddedRow, GridRemovedRow, GridTrackChangesOptions, GridTreeDataOptions, GridTreeRow, CellTreeContext, CellTreeState, TreeRowOpenChangeParams, GridRevealRowOptions, GridRowKey, GridAggFuncName, GridAggFuncParams, GridAggFunc, GridGroupRow, GridSelectFilterOption, GetFilterOptionsParams, GetFilterOptionsResult, ColumnFilterTypeOption, ColumnFilterUiType, CellRenderContext, HeaderRenderContext, GridColumnGroup, GridColumnGroupCollapsible, ColumnGroupHeaderRenderContext, ColumnGroupOpenChangeParams, GridExportColumnGroup, CellStyleContext, CanEditCellContext, GridConditionalFormat, RowStyleContext, DetailRowOptions, GridClassNames, GridSlotProps, GridFrameworkTypes, ReactGridTypes, DetailRowRenderContext, CellDetailContext, LabelRowOptions, LabelRowRenderContext, GridLabelRow, LabelRowSortMode, TotalRowOptions, TotalRowCellContext, TotalRowCellKind, FillHandleOptions, GridFillValueParams, GridFillDirection, GridFillKind, RowDragContext, RowMoveParams, RowDropParams, GridCellRef, GridCellEventParams, GridCellDoubleClickParams, CellValueFormatter, CellValueFormatterParams, SpreadsheetGridSlotContext, SpreadsheetGridDerivedSummary, SpreadsheetGridSelectionStats, GridLocaleText, GridLocaleTextTemplate, GridVerticalAlign, GridTextEditorEnterKey, GlobalFilterStatus, GridSelectionAggregates, CellCoord, CellRange, GridSelection, GridSortState, GridSortEntry, GridSortDirection, ColumnFilterValue, GridFilterState, SetColumnFilterValue, NumberColumnFilterValue, NumberSetColumnFilterValue, ParsedNumberFilter, TextSetColumnFilterValue, ParsedTextFilter, DateSetColumnFilterValue, ParsedDateFilter, DateFilterPreset, DateFilterPresetOption, CustomDateFilterPreset, DateFilterPresetRange, FilterDateInputContext, TextColumnFilterValue, DateColumnFilterValue, SelectColumnFilterValue, CustomColumnFilterValue, ServerSideDataSource, ServerSideQuery, ServerSideGetRowsParams, ServerSideGetRowsResult, ServerSideLoadErrorParams, ServerSideCellChange, ServerSideRowUpdate, ServerSideUpdateRowsParams, ServerSideUpdateRowsResult, ServerSideWriteErrorParams, RowModel, SpreadsheetGridHandle, RowSelectionModel, RowSelectionMode, ScrollAlign, GridScrollPosition, GridScrollEventParams, CsvExportScope, CsvExportOptions, GridExportOptions, GridExportCell, GridExportData, GridState, GridStatePatch, GridColumnState, GridDensity, GridTheme, UndoRedoState, GridMotion, GridPopupContainer, GridGlobalFilterMatch, GridPasteSkippedCell, GridPasteSkippedParams, GridExcelShortcutsOptions, GridNewRowOptions, GridApplyRowsOptions, GridPinnedRowPosition, FindOptions, FindChangeParams, GridDataBarFormat, GridColorScaleFormat, GridChipTone, GridChipSpec, GridChipMap, AutoSizeColumnsMode, GridContextMenuTarget, GridContextMenuParams, GridContextMenuItem, GridContextMenuActionItem, GridContextMenuLabelItem, GridContextMenuSeparatorItem, GridContextMenuCustomItem, ScrollHintOptions, ScrollHintTrigger, ScrollHintRenderArgs, } from './model/gridTypes.js';
|
|
6
6
|
export type { NumberFormatterOptions } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueFormatters';
|
|
7
7
|
export type { NumberParserOptions } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueParsers';
|
|
@@ -5,11 +5,12 @@ type DateCellEditorProps = {
|
|
|
5
5
|
initialText?: string;
|
|
6
6
|
onCommit: (value: unknown, direction?: EditorCommitDirection) => EditorCommitResult | void;
|
|
7
7
|
onCancel: () => void;
|
|
8
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
8
9
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
9
10
|
align?: 'left' | 'center' | 'right';
|
|
10
11
|
enterMove?: EditorEnterMove;
|
|
11
12
|
cellHeight?: number;
|
|
12
13
|
alignTop?: boolean;
|
|
13
14
|
};
|
|
14
|
-
export declare function DateCellEditor({ ariaLabel, initialValue, initialText, onCommit, onCancel, onRegisterFlush, align, enterMove, cellHeight, alignTop, }: DateCellEditorProps): import("react").JSX.Element;
|
|
15
|
+
export declare function DateCellEditor({ ariaLabel, initialValue, initialText, onCommit, onCancel, onCommitToSelection, onRegisterFlush, align, enterMove, cellHeight, alignTop, }: DateCellEditorProps): import("react").JSX.Element;
|
|
15
16
|
export default DateCellEditor;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { EditorCommitDirection, EditorCommitResult, EditorEnterMove, GridColumnEditor, GridResolvedSlot } from '../model/gridTypes.js';
|
|
2
|
+
type DateTimeEditorConfig = Extract<GridColumnEditor<unknown>, {
|
|
3
|
+
type: 'date' | 'time' | 'datetime';
|
|
4
|
+
}>;
|
|
5
|
+
export type DateTimeCellEditorProps = {
|
|
6
|
+
ariaLabel?: string | undefined;
|
|
7
|
+
editor: DateTimeEditorConfig;
|
|
8
|
+
columnTitle: string;
|
|
9
|
+
value: unknown;
|
|
10
|
+
initialValue: string;
|
|
11
|
+
onCommit: (value: unknown, direction?: EditorCommitDirection) => EditorCommitResult | void;
|
|
12
|
+
onCancel: () => void;
|
|
13
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
14
|
+
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
15
|
+
align?: 'left' | 'center' | 'right' | undefined;
|
|
16
|
+
themeClassName?: string | undefined;
|
|
17
|
+
popoverSlot?: GridResolvedSlot | undefined;
|
|
18
|
+
enterMove?: EditorEnterMove | undefined;
|
|
19
|
+
cellTop?: number | undefined;
|
|
20
|
+
cellLeft?: number | undefined;
|
|
21
|
+
cellHeight?: number | undefined;
|
|
22
|
+
alignTop?: boolean | undefined;
|
|
23
|
+
};
|
|
24
|
+
export declare function DateTimeCellEditor(props: DateTimeCellEditorProps): import("react").JSX.Element;
|
|
25
|
+
export default DateTimeCellEditor;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { EditorCommitDirection, EditorCommitResult, EditorEnterMove, GridResolvedSlot, GridSelectEditorOption } from '../model/gridTypes.js';
|
|
2
|
+
import type { SearchSelectLoad } from '@ishibashi0112/spreadsheet-grid-core/internal/controllers/searchSelectEditorController';
|
|
3
|
+
export type MultiSelectCellEditorProps = {
|
|
4
|
+
ariaLabel?: string | undefined;
|
|
5
|
+
options: readonly GridSelectEditorOption[];
|
|
6
|
+
value: unknown;
|
|
7
|
+
search: boolean;
|
|
8
|
+
load?: SearchSelectLoad | undefined;
|
|
9
|
+
onCommit: (value: unknown, direction?: EditorCommitDirection) => EditorCommitResult | void;
|
|
10
|
+
onCancel: () => void;
|
|
11
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
12
|
+
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
13
|
+
align?: 'left' | 'center' | 'right' | undefined;
|
|
14
|
+
themeClassName?: string | undefined;
|
|
15
|
+
popoverSlot?: GridResolvedSlot | undefined;
|
|
16
|
+
enterMove?: EditorEnterMove | undefined;
|
|
17
|
+
initialText?: string | undefined;
|
|
18
|
+
cellTop?: number | undefined;
|
|
19
|
+
cellLeft?: number | undefined;
|
|
20
|
+
cellHeight?: number | undefined;
|
|
21
|
+
alignTop?: boolean | undefined;
|
|
22
|
+
};
|
|
23
|
+
export declare function MultiSelectCellEditor({ ariaLabel, options, value, search, load, onCommit, onCancel, onCommitToSelection, onRegisterFlush, align, themeClassName, popoverSlot, enterMove, initialText, cellTop, cellLeft, alignTop, }: MultiSelectCellEditorProps): import("react").JSX.Element;
|
|
@@ -7,11 +7,12 @@ type NumberCellEditorProps = {
|
|
|
7
7
|
step?: number;
|
|
8
8
|
onCommit: (value: unknown, direction?: EditorCommitDirection) => EditorCommitResult | void;
|
|
9
9
|
onCancel: () => void;
|
|
10
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
10
11
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
11
12
|
align?: 'left' | 'center' | 'right';
|
|
12
13
|
enterMove?: EditorEnterMove;
|
|
13
14
|
cellHeight?: number;
|
|
14
15
|
alignTop?: boolean;
|
|
15
16
|
};
|
|
16
|
-
export declare function NumberCellEditor({ ariaLabel, initialValue, min, max, step, onCommit, onCancel, onRegisterFlush, align, enterMove, cellHeight, alignTop, }: NumberCellEditorProps): import("react").JSX.Element;
|
|
17
|
+
export declare function NumberCellEditor({ ariaLabel, initialValue, min, max, step, onCommit, onCancel, onCommitToSelection, onRegisterFlush, align, enterMove, cellHeight, alignTop, }: NumberCellEditorProps): import("react").JSX.Element;
|
|
17
18
|
export default NumberCellEditor;
|
|
@@ -9,6 +9,7 @@ export type SearchSelectCellEditorProps = {
|
|
|
9
9
|
load?: SearchSelectLoad | undefined;
|
|
10
10
|
onCommit: (value: unknown, direction?: EditorCommitDirection, option?: GridSelectEditorOption, forwardText?: string) => EditorCommitResult | void;
|
|
11
11
|
onCancel: () => void;
|
|
12
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
12
13
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
13
14
|
align?: 'left' | 'center' | 'right' | undefined;
|
|
14
15
|
themeClassName?: string | undefined;
|
|
@@ -20,5 +21,5 @@ export type SearchSelectCellEditorProps = {
|
|
|
20
21
|
cellHeight?: number | undefined;
|
|
21
22
|
alignTop?: boolean | undefined;
|
|
22
23
|
};
|
|
23
|
-
export declare function SearchSelectCellEditor({ ariaLabel, options, value, displayText, allowFreeText, load, onCommit, onCancel, onRegisterFlush, align, themeClassName, popoverSlot, enterMove, initialText, cellTop, cellLeft, cellHeight, alignTop, }: SearchSelectCellEditorProps): import("react").JSX.Element;
|
|
24
|
+
export declare function SearchSelectCellEditor({ ariaLabel, options, value, displayText, allowFreeText, load, onCommit, onCancel, onCommitToSelection, onRegisterFlush, align, themeClassName, popoverSlot, enterMove, initialText, cellTop, cellLeft, cellHeight, alignTop, }: SearchSelectCellEditorProps): import("react").JSX.Element;
|
|
24
25
|
export default SearchSelectCellEditor;
|
|
@@ -6,6 +6,7 @@ type SelectCellEditorProps = {
|
|
|
6
6
|
value: unknown;
|
|
7
7
|
onCommit: (value: unknown, direction?: EditorCommitDirection, option?: GridSelectEditorOption) => EditorCommitResult | void;
|
|
8
8
|
onCancel: () => void;
|
|
9
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
9
10
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
10
11
|
align?: 'left' | 'center' | 'right';
|
|
11
12
|
themeClassName?: string;
|
|
@@ -17,5 +18,5 @@ type SelectCellEditorProps = {
|
|
|
17
18
|
cellHeight?: number;
|
|
18
19
|
alignTop?: boolean;
|
|
19
20
|
};
|
|
20
|
-
export declare function SelectCellEditor({ ariaLabel, options, value, onCommit, onCancel, onRegisterFlush, align, themeClassName, popoverSlot, enterMove, initialText, cellHeight, alignTop, cellTop, cellLeft, }: SelectCellEditorProps): import("react").JSX.Element;
|
|
21
|
+
export declare function SelectCellEditor({ ariaLabel, options, value, onCommit, onCancel, onCommitToSelection, onRegisterFlush, align, themeClassName, popoverSlot, enterMove, initialText, cellHeight, alignTop, cellTop, cellLeft, }: SelectCellEditorProps): import("react").JSX.Element;
|
|
21
22
|
export default SelectCellEditor;
|
|
@@ -4,6 +4,7 @@ type TextCellEditorProps = {
|
|
|
4
4
|
initialValue: string;
|
|
5
5
|
onCommit: (value: unknown, direction?: EditorCommitDirection) => EditorCommitResult | void;
|
|
6
6
|
onCancel: () => void;
|
|
7
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
7
8
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
8
9
|
align?: 'left' | 'center' | 'right';
|
|
9
10
|
enterMove?: EditorEnterMove;
|
|
@@ -14,5 +15,5 @@ type TextCellEditorProps = {
|
|
|
14
15
|
lineBreak?: string;
|
|
15
16
|
alignTop?: boolean;
|
|
16
17
|
};
|
|
17
|
-
export declare function TextCellEditor({ ariaLabel, initialValue, onCommit, onCancel, onRegisterFlush, align, enterMove, multiline, enterKey, cellHeight, wordBreak, lineBreak, alignTop, }: TextCellEditorProps): import("react").JSX.Element;
|
|
18
|
+
export declare function TextCellEditor({ ariaLabel, initialValue, onCommit, onCancel, onCommitToSelection, onRegisterFlush, align, enterMove, multiline, enterKey, cellHeight, wordBreak, lineBreak, alignTop, }: TextCellEditorProps): import("react").JSX.Element;
|
|
18
19
|
export default TextCellEditor;
|
package/dist/features/types.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type { DateRolloverStore } from '@ishibashi0112/spreadsheet-grid-core/int
|
|
|
12
12
|
import type { RowOrder } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/filtering';
|
|
13
13
|
import type { buildRevertMenuItems, describeUnsavedCell, formatUnsavedSummary } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/changeTracking';
|
|
14
14
|
import type { ResolvedGridLocaleText } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText';
|
|
15
|
+
import type { resolveNewRowPlaceholder } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/newRow';
|
|
15
16
|
import type { GridUiAction } from '@ishibashi0112/spreadsheet-grid-core/internal/model/gridActions';
|
|
16
17
|
import type { ColumnPane, GridPaneLayout } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/geometry';
|
|
17
18
|
import type { DetailRowExtra, RowMetrics } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/verticalGeometry';
|
|
@@ -22,6 +23,10 @@ import type { GridTotalRow } from '../view/GridTotalRow.js';
|
|
|
22
23
|
import type { GridPinnedRows } from '../view/GridPinnedRows.js';
|
|
23
24
|
import type { GridColumnGroupHeader } from '../view/GridColumnGroupHeader.js';
|
|
24
25
|
import type { SearchSelectCellEditor } from '../editors/SearchSelectCellEditor.js';
|
|
26
|
+
import type { DateTimeCellEditor } from '../editors/DateTimeCellEditor.js';
|
|
27
|
+
import type { MultiSelectCellEditor } from '../editors/MultiSelectCellEditor.js';
|
|
28
|
+
import type { GridMultiSelectChips } from '../view/GridMultiSelectChips.js';
|
|
29
|
+
import type { resolveMultiSelectChipLabels, splitRangesByChips } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect';
|
|
25
30
|
import type { GridTreeAggregateValue, GridTreeCellPrefix } from '../view/GridTreeCell.js';
|
|
26
31
|
import type { GridBodyLabelRow } from '../view/GridBodyLabelRow.js';
|
|
27
32
|
import type { GridBodyGroupRow } from '../view/GridBodyGroupRow.js';
|
|
@@ -278,11 +283,24 @@ export type ReactGridFeatures = {
|
|
|
278
283
|
selectSearch?: FeatureLocaleDefaults & {
|
|
279
284
|
SearchSelectCellEditor: typeof SearchSelectCellEditor;
|
|
280
285
|
} | undefined;
|
|
286
|
+
dateTimeEditors?: FeatureLocaleDefaults & {
|
|
287
|
+
DateTimeCellEditor: typeof DateTimeCellEditor;
|
|
288
|
+
} | undefined;
|
|
289
|
+
multiSelect?: FeatureLocaleDefaults & {
|
|
290
|
+
MultiSelectCellEditor: typeof MultiSelectCellEditor;
|
|
291
|
+
MultiSelectChips: typeof GridMultiSelectChips;
|
|
292
|
+
resolveChipLabels: typeof resolveMultiSelectChipLabels;
|
|
293
|
+
splitRangesByChips: typeof splitRangesByChips;
|
|
294
|
+
} | undefined;
|
|
281
295
|
changeTracking?: NonNullable<GridCoreFeatures['changeTracking']> & FeatureLocaleDefaults & {
|
|
282
296
|
describeUnsavedCell: typeof describeUnsavedCell;
|
|
283
297
|
formatUnsavedSummary: typeof formatUnsavedSummary;
|
|
284
298
|
buildRevertMenuItems: typeof buildRevertMenuItems;
|
|
285
299
|
} | undefined;
|
|
300
|
+
excelShortcuts?: NonNullable<GridCoreFeatures['excelShortcuts']> | undefined;
|
|
301
|
+
newRow?: NonNullable<GridCoreFeatures['newRow']> & FeatureLocaleDefaults & {
|
|
302
|
+
resolveNewRowPlaceholder: typeof resolveNewRowPlaceholder;
|
|
303
|
+
} | undefined;
|
|
286
304
|
treeData?: NonNullable<GridCoreFeatures['treeData']> & FeatureLocaleDefaults & {
|
|
287
305
|
TreeCellPrefix: typeof GridTreeCellPrefix;
|
|
288
306
|
TreeAggregateValue: typeof GridTreeAggregateValue;
|
|
@@ -3,6 +3,7 @@ import { type ClipboardControllerArgs } from '@ishibashi0112/spreadsheet-grid-co
|
|
|
3
3
|
export declare const useGridClipboardController: <T extends object>(args: ClipboardControllerArgs<T>) => {
|
|
4
4
|
isWholeGridSelected: boolean;
|
|
5
5
|
handleCopy: () => Promise<void>;
|
|
6
|
+
handleCut: () => Promise<void>;
|
|
6
7
|
handlePaste: (event: ClipboardEvent<HTMLDivElement>) => void;
|
|
7
8
|
};
|
|
8
9
|
export default useGridClipboardController;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FeatureLocaleText, type ResolvedGridLocaleText } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText';
|
|
2
|
-
export declare const GridLocaleTextContext: import("react").Context<Readonly<Pick<import("@ishibashi0112/spreadsheet-grid-core").GridLocaleText, "none" | "blank" | "selection" | "globalFilterPlaceholder" | "rowCount" | "columnCount" | "filterSummary" | "filterGlobal" | "filterColumns" | "sortSummary" | "sortEntry" | "sortAscending" | "sortDescending" | "activeCell" | "selectionSize" | "selectedColumns" | "detailColumnName" | "rowDragColumnName" | "listSeparator" | "globalFilterLabel" | "clearGlobalFilter" | "toggleFilterPanel" | "clear" | "close" | "retry" | "noOptions" | "noRows" | "noMatchingRows" | "selectAllRows" | "selectRow" | "sortedAscending" | "sortedDescending" | "sortPriority" | "columnFiltered" | "dragColumn" | "columnMenu" | "columnMenuFor" | "showDetails" | "hideDetails" | "editCell" | "cellInput" | "sizingColumns" | "applyingFilter" | "resetColumnsHint" | "toolPanelFilters" | "toolPanelSort" | "toolPanelColumns" | "filterNone" | "filterCustom" | "filterExcluded" | "filterExcludedValues" | "filterSelected" | "filterMatches" | "filterBoth" | "conditionGreaterThanOrEqual" | "conditionGreaterThan" | "conditionLessThanOrEqual" | "conditionLessThan" | "conditionEquals" | "conditionNotEquals" | "conditionRange" | "conditionOnOrAfter" | "conditionOnOrBefore" | "conditionContains" | "conditionStartsWith" | "conditionEndsWith" | "conditionBlank" | "conditionNotBlank" | "datePresetToday" | "datePresetThisMonth" | "datePresetLast30Days" | "invalidValue" | "enterNumber" | "enterInteger" | "enterMin" | "enterMax" | "enterRange" | "enterDate" | "saveFailedCell" | "totalRowLabel" | "totalAverage" | "totalMin" | "totalMax" | "totalCount" | "exportSubtotal"> & Partial<import("@ishibashi0112/spreadsheet-grid-core").GridLocaleText>>>;
|
|
2
|
+
export declare const GridLocaleTextContext: import("react").Context<Readonly<Pick<import("@ishibashi0112/spreadsheet-grid-core").GridLocaleText, "none" | "blank" | "selection" | "globalFilterPlaceholder" | "rowCount" | "columnCount" | "filterSummary" | "filterGlobal" | "filterColumns" | "sortSummary" | "sortEntry" | "sortAscending" | "sortDescending" | "activeCell" | "selectionSize" | "selectedColumns" | "detailColumnName" | "rowDragColumnName" | "listSeparator" | "multiSelectSeparator" | "globalFilterLabel" | "clearGlobalFilter" | "toggleFilterPanel" | "clear" | "close" | "retry" | "noOptions" | "noRows" | "noMatchingRows" | "selectAllRows" | "selectRow" | "sortedAscending" | "sortedDescending" | "sortPriority" | "columnFiltered" | "dragColumn" | "columnMenu" | "columnMenuFor" | "showDetails" | "hideDetails" | "editCell" | "cellInput" | "sizingColumns" | "applyingFilter" | "resetColumnsHint" | "toolPanelFilters" | "toolPanelSort" | "toolPanelColumns" | "filterNone" | "filterCustom" | "filterExcluded" | "filterExcludedValues" | "filterSelected" | "filterMatches" | "filterBoth" | "conditionGreaterThanOrEqual" | "conditionGreaterThan" | "conditionLessThanOrEqual" | "conditionLessThan" | "conditionEquals" | "conditionNotEquals" | "conditionRange" | "conditionOnOrAfter" | "conditionOnOrBefore" | "conditionContains" | "conditionStartsWith" | "conditionEndsWith" | "conditionBlank" | "conditionNotBlank" | "datePresetToday" | "datePresetThisMonth" | "datePresetLast30Days" | "invalidValue" | "enterNumber" | "enterInteger" | "enterMin" | "enterMax" | "enterRange" | "enterDate" | "enterTime" | "enterDateTime" | "saveFailedCell" | "totalRowLabel" | "totalAverage" | "totalMin" | "totalMax" | "totalCount" | "exportSubtotal"> & Partial<import("@ishibashi0112/spreadsheet-grid-core").GridLocaleText>>>;
|
|
3
3
|
export declare const useGridLocaleText: () => ResolvedGridLocaleText;
|
|
4
4
|
export declare const useFeatureLocaleText: <D>() => FeatureLocaleText<D>;
|
|
5
5
|
export declare const mergeFeatureLocaleDefaults: (features: object) => ResolvedGridLocaleText;
|
|
@@ -2,6 +2,6 @@ import { type GridStore, type GridViewState, type Updater } from '@ishibashi0112
|
|
|
2
2
|
import type { GridUiState } from '../model/gridTypes.js';
|
|
3
3
|
export declare function useGridStore(store: GridStore): [GridUiState, GridStore['dispatch']];
|
|
4
4
|
export type GridViewStateSetters = {
|
|
5
|
-
[K in Exclude<keyof GridViewState, 'maxBodyPx'> as `set${Capitalize<K>}`]-?: (next: Updater<Exclude<GridViewState[K], undefined>>) => void;
|
|
5
|
+
[K in Exclude<keyof GridViewState, 'maxBodyPx' | 'newRowDraft'> as `set${Capitalize<K>}`]-?: (next: Updater<Exclude<GridViewState[K], undefined>>) => void;
|
|
6
6
|
};
|
|
7
7
|
export declare function useGridViewState(store: GridStore): [GridViewState, GridViewStateSetters];
|