@ishibashi0112/spreadsheet-grid 1.1.0 → 1.2.1

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.
Files changed (82) hide show
  1. package/API_REFERENCE.md +124 -61
  2. package/README.md +1 -1
  3. package/dist/ColumnFilterPopover-BEZ0T7Qo.cjs +1 -0
  4. package/dist/{ColumnFilterPopover-BPKRqQ0j.js → ColumnFilterPopover-CnocXZZn.js} +88 -88
  5. package/dist/GridShell.d.ts +1 -1
  6. package/dist/common.d.ts +1 -1
  7. package/dist/editors/DateCellEditor.d.ts +3 -1
  8. package/dist/editors/NumberCellEditor.d.ts +3 -1
  9. package/dist/editors/SelectCellEditor.d.ts +3 -1
  10. package/dist/editors/editorKeyBindings.d.ts +3 -20
  11. package/dist/editors/useTopAlignedInput.d.ts +2 -0
  12. package/dist/features/types.d.ts +7 -3
  13. package/dist/index.cjs +6 -7
  14. package/dist/index.js +2574 -2976
  15. package/dist/lite/ColumnFilterPopover-BUCdIETo.cjs +1 -0
  16. package/dist/lite/{ColumnFilterPopover-Mm4bBD9q.js → ColumnFilterPopover-ulqfKfmD.js} +88 -88
  17. package/dist/lite/{columnMenu-CfiIYwpG.js → columnMenu-B_8gLraV.js} +130 -126
  18. package/dist/lite/columnMenu-CBAvHYIy.cjs +1 -0
  19. package/dist/lite/{contextMenu-BrvrFfbj.js → contextMenu-B6cpSlFr.js} +47 -39
  20. package/dist/lite/contextMenu-VLz_wVlY.cjs +1 -0
  21. package/dist/lite/createSpreadsheetGrid-BxaYty_c.js +4290 -0
  22. package/dist/lite/createSpreadsheetGrid-CfUnI6Xl.cjs +6 -0
  23. package/dist/lite/createSpreadsheetGrid.cjs +1 -1
  24. package/dist/lite/createSpreadsheetGrid.js +1 -1
  25. package/dist/lite/features/columnMenu.cjs +1 -1
  26. package/dist/lite/features/columnMenu.js +1 -1
  27. package/dist/lite/features/contextMenu.cjs +1 -1
  28. package/dist/lite/features/contextMenu.js +1 -1
  29. package/dist/lite/features/filtering.cjs +1 -1
  30. package/dist/lite/features/filtering.js +1 -1
  31. package/dist/lite/features/grouping.cjs +1 -1
  32. package/dist/lite/features/grouping.js +1 -1
  33. package/dist/lite/features/pinnedRows.cjs +1 -1
  34. package/dist/lite/features/pinnedRows.js +1 -1
  35. package/dist/lite/features/rowDrag.cjs +1 -1
  36. package/dist/lite/features/rowDrag.js +1 -1
  37. package/dist/lite/features/scrollHint.cjs +1 -1
  38. package/dist/lite/features/scrollHint.js +1 -1
  39. package/dist/lite/features/standard.cjs +1 -1
  40. package/dist/lite/features/standard.js +3 -3
  41. package/dist/lite/features/toolPanel.cjs +1 -1
  42. package/dist/lite/features/toolPanel.js +1 -1
  43. package/dist/lite/features/totalRow.cjs +1 -1
  44. package/dist/lite/features/totalRow.js +1 -1
  45. package/dist/lite/{filtering-B9NSMjHq.cjs → filtering-DDIQnB3a.cjs} +1 -1
  46. package/dist/lite/{filtering-BZoWpt28.js → filtering-ReroATyh.js} +138 -138
  47. package/dist/lite/grouping-DKYPOjCk.cjs +1 -0
  48. package/dist/lite/{grouping-DCR9Z6JK.js → grouping-u4J8Rl0V.js} +5 -3
  49. package/dist/lite/{lazyPopups-Bx3u_NA9.cjs → lazyPopups-B0DhlAYW.cjs} +1 -1
  50. package/dist/lite/{lazyPopups-DbnjvQXX.js → lazyPopups-C7Y7Kx8w.js} +1 -1
  51. package/dist/lite/{pinnedRows-BzH-qw2i.js → pinnedRows-BtvLVkLa.js} +8 -8
  52. package/dist/lite/pinnedRows-CBgirKjW.cjs +1 -0
  53. package/dist/lite/rowDrag-D17wXvSj.cjs +1 -0
  54. package/dist/lite/rowDrag-WVJUKKL8.js +157 -0
  55. package/dist/lite/scrollHint-Bt8fuU7l.cjs +1 -0
  56. package/dist/lite/{scrollHint-ENNefJ2y.js → scrollHint-Dr4TOFNn.js} +57 -57
  57. package/dist/lite/{toolPanel-ULXPL1kC.js → toolPanel-DXG3w8Zp.js} +1 -1
  58. package/dist/lite/{toolPanel-CSADXAfv.cjs → toolPanel-H94h6g2U.cjs} +1 -1
  59. package/dist/lite/{totalRow-BWxSeHGg.js → totalRow-Btq5XqtJ.js} +12 -10
  60. package/dist/lite/totalRow-CPe9CVv6.cjs +1 -0
  61. package/dist/lite.cjs +1 -1
  62. package/dist/lite.js +11 -11
  63. package/dist/style.css +1 -1
  64. package/dist/style.layer.css +1 -1
  65. package/dist/view/CellContextMenuPopover.d.ts +2 -1
  66. package/dist/view/GridTotalRow.d.ts +2 -1
  67. package/dist/view/gridBarHelpers.d.ts +1 -27
  68. package/package.json +2 -2
  69. package/skills/spreadsheet-grid/SKILL.md +2 -1
  70. package/dist/ColumnFilterPopover-mXX137Y4.cjs +0 -1
  71. package/dist/editors/editorVisibleBounds.d.ts +0 -10
  72. package/dist/lite/ColumnFilterPopover-DCydc4GT.cjs +0 -1
  73. package/dist/lite/columnMenu-C2rH9Ti8.cjs +0 -1
  74. package/dist/lite/contextMenu-CAUiZ93K.cjs +0 -1
  75. package/dist/lite/createSpreadsheetGrid-8FiJsd7p.js +0 -4723
  76. package/dist/lite/createSpreadsheetGrid-Dvn09NZv.cjs +0 -7
  77. package/dist/lite/grouping-BsOdLS32.cjs +0 -1
  78. package/dist/lite/pinnedRows-DwhFtppH.cjs +0 -1
  79. package/dist/lite/rowDrag-BDYMGwvB.js +0 -140
  80. package/dist/lite/rowDrag-E2YahPwG.cjs +0 -1
  81. package/dist/lite/scrollHint-DFr8vI15.cjs +0 -1
  82. package/dist/lite/totalRow-D4nvpUwD.cjs +0 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@ A virtualized spreadsheet / data grid for React 18.3 / 19 (~1M rows, pinned colu
10
10
  npm install @ishibashi0112/spreadsheet-grid
11
11
  ```
12
12
 
13
- Peer dependencies: `react` / `react-dom` `^18.3.0 || ^19.0.0` (React 18 is supported from v0.58.0). Supported browsers: Chrome / Edge 111+, Firefox 121+, Safari 16.4+. Import the CSS once:
13
+ Peer dependencies: `react` / `react-dom` `^18.3.0 || ^19.0.0`. Supported browsers: Chrome / Edge 111+, Firefox 121+, Safari 16.4+. Import the CSS once:
14
14
 
15
15
  ```ts
16
16
  import '@ishibashi0112/spreadsheet-grid/style.css'
@@ -0,0 +1 @@
1
+ const e=require("./useGridLocaleText-BV4EomZe.cjs"),t=require("./useVirtualizerCore-Cif7t8mS.cjs"),n=require("./usePopupLocaleText-lEFHqTvJ.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=40,w=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(pointer: coarse)`).matches?C:S,T=(e,t,n)=>e===``&&t===f.DEFAULT_FILTER_LOCALE_TEXT.blank?n:t,E=(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 D({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),S=(0,r.useMemo)(()=>E(e,v.blank),[e,v.blank]),C=(0,r.useMemo)(()=>(0,m.filterSetOptionsBySearch)(S,x),[S,x]),D=x.trim().length>0,O=(0,r.useRef)(null),[k]=(0,r.useState)(w),A=t.t({count:C.length,getScrollElement:()=>O.current,estimateSize:()=>k,overscan:10}),j=(0,r.useMemo)(()=>{if(i===null)return C.length;let e=0;for(let t of C)(0,h.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: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)(S,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:M,ref:e=>{e&&(e.indeterminate=N)},onChange:()=>{u(D||g?C.map(e=>e.value):`all`,!M)}}),(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:C.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:A.getTotalSize()},children:A.getVirtualItems().map(e=>{let t=C[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:T(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:C.length}):``,_&&(0,l.jsx)(I,{})]})]})}var O=e=>{e.key!==`Escape`&&e.stopPropagation()},k=e=>e.nativeEvent.isComposing===!0,A=(e,t,n)=>{if(k(n)){e(t,{commit:!1});return}e(t)};function j({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=>A(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=>A(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 M({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=>A(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 N({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=>{O(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 P({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),[S,C]=(0,r.useState)(()=>new Set),D=x.trim().length>0,k=(0,r.useMemo)(()=>E(e,_.blank),[e,_.blank]),A=(0,r.useMemo)(()=>(0,m.filterSetOptionsBySearch)(k,x),[k,x]),j=(0,r.useMemo)(()=>(0,b.buildDateTreeRows)(e,S,_),[e,S,_]),M=(0,r.useRef)(null),N=D?A.length:j.length,[P]=(0,r.useState)(w),F=t.t({count:N,getScrollElement:()=>M.current,estimateSize:()=>P,overscan:10}),L=(0,r.useMemo)(()=>(D?A:e).map(e=>e.value),[D,A,e]),R=(0,r.useMemo)(()=>{let e=0;for(let t of L)(0,h.isSetValueSelected)(i,t)&&(e+=1);return e},[L,i]),z=L.length>0&&R===L.length,B=R>0&&!z,ee=(0,r.useMemo)(()=>new Set(e.map(e=>e.value)),[e]),V=(0,r.useMemo)(()=>{if(i===null)return e.length;let t=0;for(let e of i.values)ee.has(e)&&(t+=1);return i.mode===`include`?t:e.length-t},[i,ee,e.length]),H=e=>{C(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},U=e=>{let t=0;for(let n of e)(0,h.isSetValueSelected)(i,n)&&(t+=1);return t},W=e=>{if(e.type===`leaf`){o(e.key);return}let t=e.leafKeys.length>0&&U(e.leafKeys)===e.leafKeys.length;u(e.leafKeys,!t)},G=e=>{let t=U(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(),H(e.key)},onKeyDown:t=>{O(t),(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),H(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":T(e.key,e.label,_.blank),onChange:()=>W(e)}),(0,l.jsx)(`span`,{className:`ssg-filter-option-label`,children:T(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:z,ref:e=>{e&&(e.indeterminate=B)},onChange:()=>u(L,!z)}),(0,l.jsx)(`span`,{className:`ssg-filter-selectall-label`,children:D?_.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(D){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:T(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`)||W(t)},children:G(t)},t.key):null})})}),(0,l.jsxs)(`div`,{className:`ssg-filter-meta`,children:[(0,c.formatLocaleText)(_.filterSelectedCount,{selected:V,total:e.length}),D?(0,c.formatLocaleText)(_.filterShownCount,{count:A.length}):``,g&&(0,l.jsx)(I,{})]})]})}function F({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=>{O(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:`ssg-filter-btn-secondary`,children:i.retry}):null]})}function I(){return(0,l.jsx)(`span`,{className:`ssg-filter-truncated`,children:n.t().filterOptionsTruncated})}function L({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=>{O(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=>{O(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 R({isOpen:t,themeClassName:u,popoverSlot:f,title:m,filterType:h,draftValue:y,numberConditionDraft:b,onNumberConditionDraftChange:x,textConditionDraft:S,onTextConditionDraftChange:C,dateConditionDraft:w,onDateConditionDraftChange:E,datePresets:k,renderDateInput:A,onComboConditionClear:R,onComboSelectionClear:z,comboSummaryText:B,currentValueText:ee,layout:V,selectOptions:H,optionsStatus:U,optionsProgress:W,optionsTruncated:G=!1,optionsErrorMessage:te,onOptionsRetry:ne,setSelection:K,popoverRef:re,textInputRef:q,selectRef:ie,onRequestClose:J,onDraftChange:ae,onApply:Y,onClear:oe,onSetValueToggle:se,onSetSelectAllChange:ce,onSetClear:le,onSetReplaceSelection:ue,isServerSide:de=!1}){let X=n.t(),fe=(0,r.useRef)(null),[pe]=(0,r.useState)(()=>new Date);e.c(re,t&&V!==null,u,{layout:V});let me=e.s(t&&V!==null);if(typeof document>`u`||!t||!V||!me)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(),J())},_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`,Z=h===`numberSet`,Q=h===`textSet`,be=h===`dateSet`,xe=Z||Q||be,Se=ye||xe,Ce=U===`loading`||U===`error`,we=b??g.DEFAULT_NUMBER_FILTER_DRAFT,Te=S??_.DEFAULT_TEXT_FILTER_DRAFT,Ee=w??v.DEFAULT_DATE_FILTER_DRAFT,De=k??(0,d.normalizeDateFilterPresets)(void 0,X),Oe=Z?(0,g.buildParsedNumberFilterFromDraft)(we):null,ke=Q?(0,_.buildParsedTextFilterFromDraft)(Te):null,Ae=be?(0,v.buildParsedDateFilterFromDraft)(Ee):null,je=Oe!==null||ke!==null||Ae!==null,$=Z?(0,g.filterOptionsByNumberCondition)(H,Oe):Q?(0,_.filterOptionsByTextCondition)(H,ke):be?(0,v.filterOptionsByDateCondition)(H,Ae,pe,De):H,Me=e=>{if(e.stopPropagation(),!(0,s.isImeComposingKeyEvent)(e.nativeEvent)){if(e.key===`Enter`){e.preventDefault(),Y();return}e.key===`Escape`&&(e.preventDefault(),J())}},Ne=Z?(0,l.jsx)(j,{draft:we,valueInputRef:q,onDraftChange:x,onKeyDown:Me}):Q?(0,l.jsx)(M,{draft:Te,valueInputRef:q,onDraftChange:C,onKeyDown:Me}):(0,l.jsx)(N,{draft:Ee,valueInputRef:q,onDraftChange:E,onKeyDown:Me,presets:De,renderDateInput:A,onRequestClose:J});return(0,a.createPortal)((0,l.jsxs)(`div`,{ref:re,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)(X.filterTitle,{column:m}),tabIndex:-1,children:[(0,l.jsx)(`div`,{className:`ssg-filter-title`,children:(0,c.formatLocaleText)(X.filterTitle,{column:m})}),(Se||h===`select`)&&U===`collecting`?xe?(0,l.jsx)(L,{conditionEditor:Ne,conditionActive:je,onConditionClear:R,options:$,setSelection:K,onSelectionClear:z,summaryText:B,optionsMeta:X.filterOptionsLoadingShort,children:(0,l.jsx)(`div`,{className:`ssg-filter-collecting`,children:(0,c.formatLocaleText)(X.filterCollecting,{percent:Math.round(W*100)})})}):(0,l.jsx)(`div`,{className:`ssg-filter-collecting`,children:(0,c.formatLocaleText)(X.filterCollecting,{percent:Math.round(W*100)})}):(Se||h===`select`)&&Ce?xe?(0,l.jsx)(L,{conditionEditor:Ne,conditionActive:je,onConditionClear:R,options:$,setSelection:K,onSelectionClear:z,summaryText:B,optionsMeta:U===`loading`?X.filterOptionsLoadingShort:X.filterOptionsFailedShort,children:(0,l.jsx)(F,{status:U===`loading`?`loading`:`error`,errorMessage:te,onRetry:ne})}):(0,l.jsx)(F,{status:U===`loading`?`loading`:`error`,errorMessage:te,onRetry:ne}):xe?(0,l.jsx)(L,{conditionEditor:Ne,conditionActive:je,onConditionClear:R,options:$,setSelection:K,onSelectionClear:z,summaryText:B,children:be?(0,l.jsx)(P,{options:$,setSelection:K,searchInputRef:fe,onValueToggle:se,onSelectAllChange:ce,onReplaceSelection:ue,onRequestClose:J,isServerSide:de,truncated:G}):(0,l.jsx)(D,{options:$,setSelection:K,searchInputRef:fe,onValueToggle:se,onSelectAllChange:ce,onReplaceSelection:ue,onRequestClose:J,isServerSide:de,selectAllUsesExplicitScope:!0,truncated:G})}):ye?(0,l.jsx)(D,{options:H,setSelection:K,searchInputRef:q,onValueToggle:se,onSelectAllChange:ce,onReplaceSelection:ue,onRequestClose:J,isServerSide:de,truncated:G}):h===`number`?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(j,{draft:we,valueInputRef:q,onDraftChange:x,onKeyDown:Me})}):h===`select`?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`select`,{ref:ie,value:y,onChange:e=>ae(e.target.value),onKeyDown:e=>{if(e.stopPropagation(),e.key===`Enter`){e.preventDefault(),Y();return}e.key===`Escape`&&(e.preventDefault(),J())},className:`ssg-filter-select`,children:[(0,l.jsx)(`option`,{value:``,children:X.filterAll}),H.map(e=>(0,l.jsx)(`option`,{value:e.value,children:T(e.value,e.label,X.blank)},`${m}-${e.value}`))]}),(0,l.jsxs)(`div`,{className:`ssg-filter-meta`,children:[(0,c.formatLocaleText)(X.filterOptionCount,{count:H.length}),G&&(0,l.jsx)(I,{})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`input`,{ref:q,type:`text`,value:y,onChange:e=>ae(e.target.value),onKeyDown:e=>{if(e.stopPropagation(),!(0,s.isImeComposingKeyEvent)(e.nativeEvent)){if(e.key===`Enter`){e.preventDefault(),Y();return}e.key===`Escape`&&(e.preventDefault(),J())}},placeholder:X.filterTextPlaceholder,"aria-label":X.filterTextPlaceholder,className:`ssg-filter-input`}),(0,l.jsx)(`div`,{className:`ssg-filter-meta ssg-filter-meta--ellipsis`,children:X.filterTextHint})]}),!Se&&(0,l.jsx)(`div`,{className:`ssg-filter-meta ssg-filter-meta--ellipsis`,children:(0,c.formatLocaleText)(X.filterCurrentValue,{value:ee})}),(0,l.jsx)(`div`,{className:`ssg-filter-footer`,children:Se?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),le()},onKeyDown:e=>{O(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),le())},className:`ssg-filter-btn-secondary`,children:X.clear}),(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),J()},onKeyDown:e=>{O(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),J())},className:`ssg-filter-btn-primary`,children:X.close})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),oe()},onKeyDown:e=>{O(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),oe())},className:`ssg-filter-btn-secondary`,children:X.clear}),(0,l.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),Y()},onKeyDown:e=>{O(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),Y())},className:`ssg-filter-btn-primary`,children:X.apply})]})})]}),me)}exports.ColumnFilterPopover=R,exports.default=R;
@@ -263,29 +263,29 @@ function W({ value: e, onCommit: t, ariaLabel: n, inputRef: i, onRequestClose: o
263
263
  }
264
264
  //#endregion
265
265
  //#region src/view/ColumnFilterPopover.tsx
266
- var G = 24, K = (e, t, n) => e === "" && t === y.blank ? n : t, te = (e, t) => t === y.blank ? e : e.map((e) => e.value === "" && e.label === y.blank ? {
266
+ var G = 24, te = 40, ne = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(pointer: coarse)").matches ? te : G, K = (e, t, n) => e === "" && t === y.blank ? n : t, q = (e, t) => t === y.blank ? e : e.map((e) => e.value === "" && e.label === y.blank ? {
267
267
  ...e,
268
268
  label: t
269
269
  } : e);
270
- function ne({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l, onSelectAllChange: u, onReplaceSelection: d, onRequestClose: _, isServerSide: v, selectAllUsesExplicitScope: y = !1, truncated: b = !1 }) {
271
- let w = r(), [T, E] = c(""), D = i(T), O = o(() => te(e, w.blank), [e, w.blank]), k = o(() => x(O, D), [O, D]), A = D.trim().length > 0, j = s(null), M = n({
270
+ function re({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l, onSelectAllChange: u, onReplaceSelection: d, onRequestClose: _, isServerSide: v, selectAllUsesExplicitScope: y = !1, truncated: b = !1 }) {
271
+ let w = r(), [T, E] = c(""), D = i(T), O = o(() => q(e, w.blank), [e, w.blank]), k = o(() => x(O, D), [O, D]), A = D.trim().length > 0, j = s(null), [M] = c(ne), N = n({
272
272
  count: k.length,
273
273
  getScrollElement: () => j.current,
274
- estimateSize: () => G,
274
+ estimateSize: () => M,
275
275
  overscan: 10
276
- }), N = o(() => {
276
+ }), P = o(() => {
277
277
  if (t === null) return k.length;
278
278
  let e = 0;
279
279
  for (let n of k) C(t, n.value) && (e += 1);
280
280
  return e;
281
- }, [t, k]), P = k.length > 0 && N === k.length, F = N > 0 && !P, I = o(() => new Set(e.map((e) => e.value)), [e]), L = o(() => {
281
+ }, [t, k]), F = k.length > 0 && P === k.length, I = P > 0 && !F, L = o(() => new Set(e.map((e) => e.value)), [e]), R = o(() => {
282
282
  if (t === null) return e.length;
283
283
  let n = 0;
284
- for (let e of t.values) I.has(e) && (n += 1);
284
+ for (let e of t.values) L.has(e) && (n += 1);
285
285
  return t.mode === "include" ? n : e.length - n;
286
286
  }, [
287
287
  t,
288
- I,
288
+ L,
289
289
  e.length
290
290
  ]);
291
291
  return /* @__PURE__ */ g(m, { children: [
@@ -311,12 +311,12 @@ function ne({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l,
311
311
  className: "ssg-filter-selectall",
312
312
  children: [/* @__PURE__ */ h("input", {
313
313
  type: "checkbox",
314
- checked: P,
314
+ checked: F,
315
315
  ref: (e) => {
316
- e && (e.indeterminate = F);
316
+ e && (e.indeterminate = I);
317
317
  },
318
318
  onChange: () => {
319
- u(A || y ? k.map((e) => e.value) : "all", !P);
319
+ u(A || y ? k.map((e) => e.value) : "all", !F);
320
320
  }
321
321
  }), /* @__PURE__ */ h("span", {
322
322
  className: "ssg-filter-selectall-label",
@@ -331,8 +331,8 @@ function ne({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l,
331
331
  children: e.length === 0 ? v ? w.filterNoOptionsSource : w.noOptions : w.filterNoMatches
332
332
  }) : /* @__PURE__ */ h("div", {
333
333
  className: "ssg-filter-virt",
334
- style: { height: M.getTotalSize() },
335
- children: M.getVirtualItems().map((e) => {
334
+ style: { height: N.getTotalSize() },
335
+ children: N.getVirtualItems().map((e) => {
336
336
  let n = k[e.index];
337
337
  if (!n) return null;
338
338
  let r = C(t, n.value);
@@ -358,25 +358,25 @@ function ne({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l,
358
358
  className: "ssg-filter-meta",
359
359
  children: [
360
360
  p(w.filterSelectedCount, {
361
- selected: L,
361
+ selected: R,
362
362
  total: e.length
363
363
  }),
364
364
  A ? p(w.filterShownCount, { count: k.length }) : "",
365
- b && /* @__PURE__ */ h(le, {})
365
+ b && /* @__PURE__ */ h(ue, {})
366
366
  ]
367
367
  })
368
368
  ] });
369
369
  }
370
- var q = (e) => {
370
+ var J = (e) => {
371
371
  e.key !== "Escape" && e.stopPropagation();
372
- }, re = (e) => e.nativeEvent.isComposing === !0, J = (e, t, n) => {
373
- if (re(n)) {
372
+ }, ie = (e) => e.nativeEvent.isComposing === !0, Y = (e, t, n) => {
373
+ if (ie(n)) {
374
374
  e(t, { commit: !1 });
375
375
  return;
376
376
  }
377
377
  e(t);
378
378
  };
379
- function ie({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i }) {
379
+ function ae({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i }) {
380
380
  let a = r(), o = O(e.operator);
381
381
  return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("select", {
382
382
  value: e.operator,
@@ -398,7 +398,7 @@ function ie({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i }) {
398
398
  type: "text",
399
399
  inputMode: "decimal",
400
400
  value: e.value1,
401
- onChange: (t) => J(n, {
401
+ onChange: (t) => Y(n, {
402
402
  ...e,
403
403
  value1: t.target.value
404
404
  }, t),
@@ -417,7 +417,7 @@ function ie({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i }) {
417
417
  type: "text",
418
418
  inputMode: "decimal",
419
419
  value: e.value2,
420
- onChange: (t) => J(n, {
420
+ onChange: (t) => Y(n, {
421
421
  ...e,
422
422
  value2: t.target.value
423
423
  }, t),
@@ -435,7 +435,7 @@ function ie({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i }) {
435
435
  children: a.filterNoValue
436
436
  })] });
437
437
  }
438
- function ae({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i }) {
438
+ function oe({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i }) {
439
439
  let a = r(), o = N(e.operator);
440
440
  return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("select", {
441
441
  value: e.operator,
@@ -456,7 +456,7 @@ function ae({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i }) {
456
456
  ref: t,
457
457
  type: "text",
458
458
  value: e.value,
459
- onChange: (t) => J(n, {
459
+ onChange: (t) => Y(n, {
460
460
  ...e,
461
461
  value: t.target.value
462
462
  }, t),
@@ -474,7 +474,7 @@ function ae({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i }) {
474
474
  children: a.filterNoValue
475
475
  })] });
476
476
  }
477
- function oe({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i, presets: a, renderDateInput: o, onRequestClose: s }) {
477
+ function se({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i, presets: a, renderDateInput: o, onRequestClose: s }) {
478
478
  let c = r(), u = e.preset === null ? L(e.operator) : 0, d = (t, r) => {
479
479
  n({
480
480
  ...e,
@@ -549,7 +549,7 @@ function oe({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i, preset
549
549
  });
550
550
  },
551
551
  onKeyDown: (r) => {
552
- q(r), (r.key === "Enter" || r.key === " ") && (r.preventDefault(), n({
552
+ J(r), (r.key === "Enter" || r.key === " ") && (r.preventDefault(), n({
553
553
  ...e,
554
554
  preset: e.preset === t.id ? null : t.id
555
555
  }));
@@ -560,59 +560,59 @@ function oe({ draft: e, valueInputRef: t, onDraftChange: n, onKeyDown: i, preset
560
560
  })
561
561
  ] });
562
562
  }
563
- function se({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l, onSelectAllChange: u, onReplaceSelection: d, onRequestClose: _, isServerSide: v, truncated: y = !1 }) {
564
- let b = r(), [w, T] = c(""), E = i(w), [D, O] = c(() => /* @__PURE__ */ new Set()), k = E.trim().length > 0, A = o(() => te(e, b.blank), [e, b.blank]), j = o(() => x(A, E), [A, E]), M = o(() => U(e, D, b), [
563
+ function ce({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l, onSelectAllChange: u, onReplaceSelection: d, onRequestClose: _, isServerSide: v, truncated: y = !1 }) {
564
+ let b = r(), [w, T] = c(""), E = i(w), [D, O] = c(() => /* @__PURE__ */ new Set()), k = E.trim().length > 0, A = o(() => q(e, b.blank), [e, b.blank]), j = o(() => x(A, E), [A, E]), M = o(() => U(e, D, b), [
565
565
  e,
566
566
  D,
567
567
  b
568
- ]), N = s(null), P = k ? j.length : M.length, F = n({
568
+ ]), N = s(null), P = k ? j.length : M.length, [F] = c(ne), I = n({
569
569
  count: P,
570
570
  getScrollElement: () => N.current,
571
- estimateSize: () => G,
571
+ estimateSize: () => F,
572
572
  overscan: 10
573
- }), I = o(() => (k ? j : e).map((e) => e.value), [
573
+ }), L = o(() => (k ? j : e).map((e) => e.value), [
574
574
  k,
575
575
  j,
576
576
  e
577
- ]), L = o(() => {
577
+ ]), R = o(() => {
578
578
  let e = 0;
579
- for (let n of I) C(t, n) && (e += 1);
579
+ for (let n of L) C(t, n) && (e += 1);
580
580
  return e;
581
- }, [I, t]), R = I.length > 0 && L === I.length, z = L > 0 && !R, B = o(() => new Set(e.map((e) => e.value)), [e]), ee = o(() => {
581
+ }, [L, t]), z = L.length > 0 && R === L.length, B = R > 0 && !z, ee = o(() => new Set(e.map((e) => e.value)), [e]), V = o(() => {
582
582
  if (t === null) return e.length;
583
583
  let n = 0;
584
- for (let e of t.values) B.has(e) && (n += 1);
584
+ for (let e of t.values) ee.has(e) && (n += 1);
585
585
  return t.mode === "include" ? n : e.length - n;
586
586
  }, [
587
587
  t,
588
- B,
588
+ ee,
589
589
  e.length
590
- ]), V = (e) => {
590
+ ]), H = (e) => {
591
591
  O((t) => {
592
592
  let n = new Set(t);
593
593
  return n.has(e) ? n.delete(e) : n.add(e), n;
594
594
  });
595
- }, H = (e) => {
595
+ }, W = (e) => {
596
596
  let n = 0;
597
597
  for (let r of e) C(t, r) && (n += 1);
598
598
  return n;
599
- }, W = (e) => {
599
+ }, G = (e) => {
600
600
  if (e.type === "leaf") {
601
601
  l(e.key);
602
602
  return;
603
603
  }
604
- let t = e.leafKeys.length > 0 && H(e.leafKeys) === e.leafKeys.length;
604
+ let t = e.leafKeys.length > 0 && W(e.leafKeys) === e.leafKeys.length;
605
605
  u(e.leafKeys, !t);
606
- }, ne = (e) => {
607
- let t = H(e.leafKeys), n = e.leafKeys.length > 0 && t === e.leafKeys.length, r = t > 0 && !n;
606
+ }, te = (e) => {
607
+ let t = W(e.leafKeys), n = e.leafKeys.length > 0 && t === e.leafKeys.length, r = t > 0 && !n;
608
608
  return /* @__PURE__ */ g(m, { children: [
609
609
  e.type === "group" ? /* @__PURE__ */ h("button", {
610
610
  type: "button",
611
611
  onPointerDown: (t) => {
612
- t.preventDefault(), t.stopPropagation(), V(e.key);
612
+ t.preventDefault(), t.stopPropagation(), H(e.key);
613
613
  },
614
614
  onKeyDown: (t) => {
615
- q(t), (t.key === "Enter" || t.key === " ") && (t.preventDefault(), V(e.key));
615
+ J(t), (t.key === "Enter" || t.key === " ") && (t.preventDefault(), H(e.key));
616
616
  },
617
617
  className: "ssg-filter-tree-toggle",
618
618
  "aria-label": e.expanded ? b.treeCollapse : b.treeExpand,
@@ -625,7 +625,7 @@ function se({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l,
625
625
  e && (e.indeterminate = r);
626
626
  },
627
627
  "aria-label": K(e.key, e.label, b.blank),
628
- onChange: () => W(e)
628
+ onChange: () => G(e)
629
629
  }),
630
630
  /* @__PURE__ */ h("span", {
631
631
  className: "ssg-filter-option-label",
@@ -656,11 +656,11 @@ function se({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l,
656
656
  className: "ssg-filter-selectall",
657
657
  children: [/* @__PURE__ */ h("input", {
658
658
  type: "checkbox",
659
- checked: R,
659
+ checked: z,
660
660
  ref: (e) => {
661
- e && (e.indeterminate = z);
661
+ e && (e.indeterminate = B);
662
662
  },
663
- onChange: () => u(I, !R)
663
+ onChange: () => u(L, !z)
664
664
  }), /* @__PURE__ */ h("span", {
665
665
  className: "ssg-filter-selectall-label",
666
666
  children: k ? b.filterSelectAllResults : b.filterSelectAll
@@ -674,8 +674,8 @@ function se({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l,
674
674
  children: e.length === 0 ? v ? b.filterNoOptionsSource : b.noOptions : b.filterNoMatches
675
675
  }) : /* @__PURE__ */ h("div", {
676
676
  className: "ssg-filter-virt",
677
- style: { height: F.getTotalSize() },
678
- children: F.getVirtualItems().map((e) => {
677
+ style: { height: I.getTotalSize() },
678
+ children: I.getVirtualItems().map((e) => {
679
679
  if (k) {
680
680
  let n = j[e.index];
681
681
  return n ? /* @__PURE__ */ g("label", {
@@ -703,9 +703,9 @@ function se({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l,
703
703
  paddingLeft: 8 + n.depth * 16
704
704
  },
705
705
  onClick: (e) => {
706
- e.target.closest("button, input") || W(n);
706
+ e.target.closest("button, input") || G(n);
707
707
  },
708
- children: ne(n)
708
+ children: te(n)
709
709
  }, n.key) : null;
710
710
  })
711
711
  })
@@ -714,16 +714,16 @@ function se({ options: e, setSelection: t, searchInputRef: a, onValueToggle: l,
714
714
  className: "ssg-filter-meta",
715
715
  children: [
716
716
  p(b.filterSelectedCount, {
717
- selected: ee,
717
+ selected: V,
718
718
  total: e.length
719
719
  }),
720
720
  k ? p(b.filterShownCount, { count: j.length }) : "",
721
- y && /* @__PURE__ */ h(le, {})
721
+ y && /* @__PURE__ */ h(ue, {})
722
722
  ]
723
723
  })
724
724
  ] });
725
725
  }
726
- function ce({ status: e, errorMessage: t, onRetry: n }) {
726
+ function le({ status: e, errorMessage: t, onRetry: n }) {
727
727
  let i = r();
728
728
  return e === "loading" ? /* @__PURE__ */ h("div", {
729
729
  className: "ssg-filter-collecting",
@@ -744,7 +744,7 @@ function ce({ status: e, errorMessage: t, onRetry: n }) {
744
744
  e.preventDefault(), e.stopPropagation(), n();
745
745
  },
746
746
  onKeyDown: (e) => {
747
- q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n());
747
+ J(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n());
748
748
  },
749
749
  className: "ssg-filter-btn-secondary",
750
750
  children: i.retry
@@ -752,13 +752,13 @@ function ce({ status: e, errorMessage: t, onRetry: n }) {
752
752
  ]
753
753
  });
754
754
  }
755
- function le() {
755
+ function ue() {
756
756
  return /* @__PURE__ */ h("span", {
757
757
  className: "ssg-filter-truncated",
758
758
  children: r().filterOptionsTruncated
759
759
  });
760
760
  }
761
- function ue({ conditionEditor: e, conditionActive: t, onConditionClear: n, options: i, setSelection: a, onSelectionClear: o, summaryText: s, children: c, optionsMeta: l }) {
761
+ function de({ conditionEditor: e, conditionActive: t, onConditionClear: n, options: i, setSelection: a, onSelectionClear: o, summaryText: s, children: c, optionsMeta: l }) {
762
762
  let u = r();
763
763
  return /* @__PURE__ */ g(m, { children: [
764
764
  /* @__PURE__ */ g("div", {
@@ -772,7 +772,7 @@ function ue({ conditionEditor: e, conditionActive: t, onConditionClear: n, optio
772
772
  e.preventDefault(), e.stopPropagation(), n();
773
773
  },
774
774
  onKeyDown: (e) => {
775
- q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n());
775
+ J(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n());
776
776
  },
777
777
  className: "ssg-filter-sec-clear",
778
778
  disabled: !t,
@@ -798,7 +798,7 @@ function ue({ conditionEditor: e, conditionActive: t, onConditionClear: n, optio
798
798
  e.preventDefault(), e.stopPropagation(), o();
799
799
  },
800
800
  onKeyDown: (e) => {
801
- q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), o());
801
+ J(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), o());
802
802
  },
803
803
  className: "ssg-filter-sec-clear",
804
804
  disabled: a === null,
@@ -813,9 +813,9 @@ function ue({ conditionEditor: e, conditionActive: t, onConditionClear: n, optio
813
813
  })
814
814
  ] });
815
815
  }
816
- function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType: _, draftValue: y, numberConditionDraft: x, onNumberConditionDraftChange: S, textConditionDraft: C, onTextConditionDraftChange: T, dateConditionDraft: O, onDateConditionDraftChange: A, datePresets: N, renderDateInput: P, onComboConditionClear: L, onComboSelectionClear: z, comboSummaryText: B, currentValueText: ee, layout: V, selectOptions: H, optionsStatus: U, optionsProgress: W, optionsTruncated: G = !1, optionsErrorMessage: te, onOptionsRetry: re, setSelection: J, popoverRef: de, textInputRef: Y, selectRef: fe, onRequestClose: X, onDraftChange: pe, onApply: Z, onClear: me, onSetValueToggle: he, onSetSelectAllChange: ge, onSetClear: _e, onSetReplaceSelection: ve, isServerSide: ye = !1 }) {
816
+ function fe({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType: _, draftValue: y, numberConditionDraft: x, onNumberConditionDraftChange: S, textConditionDraft: C, onTextConditionDraftChange: T, dateConditionDraft: O, onDateConditionDraftChange: A, datePresets: N, renderDateInput: P, onComboConditionClear: L, onComboSelectionClear: z, comboSummaryText: B, currentValueText: ee, layout: V, selectOptions: H, optionsStatus: U, optionsProgress: W, optionsTruncated: G = !1, optionsErrorMessage: te, onOptionsRetry: ne, setSelection: q, popoverRef: ie, textInputRef: Y, selectRef: fe, onRequestClose: X, onDraftChange: pe, onApply: Z, onClear: me, onSetValueToggle: he, onSetSelectAllChange: ge, onSetClear: _e, onSetReplaceSelection: ve, isServerSide: ye = !1 }) {
817
817
  let Q = r(), be = s(null), [xe] = c(() => /* @__PURE__ */ new Date());
818
- e(de, n && V !== null, i, { layout: V });
818
+ e(ie, n && V !== null, i, { layout: V });
819
819
  let Se = t(n && V !== null);
820
820
  if (typeof document > "u" || !n || !V || !Se) return null;
821
821
  let Ce = {
@@ -839,17 +839,17 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
839
839
  }
840
840
  e.key === "Escape" && (e.preventDefault(), X());
841
841
  }
842
- }, Ue = Oe ? /* @__PURE__ */ h(ie, {
842
+ }, Ue = Oe ? /* @__PURE__ */ h(ae, {
843
843
  draft: Pe,
844
844
  valueInputRef: Y,
845
845
  onDraftChange: S,
846
846
  onKeyDown: He
847
- }) : ke ? /* @__PURE__ */ h(ae, {
847
+ }) : ke ? /* @__PURE__ */ h(oe, {
848
848
  draft: Fe,
849
849
  valueInputRef: Y,
850
850
  onDraftChange: T,
851
851
  onKeyDown: He
852
- }) : /* @__PURE__ */ h(oe, {
852
+ }) : /* @__PURE__ */ h(se, {
853
853
  draft: Ie,
854
854
  valueInputRef: Y,
855
855
  onDraftChange: A,
@@ -859,7 +859,7 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
859
859
  onRequestClose: X
860
860
  });
861
861
  return u(/* @__PURE__ */ g("div", {
862
- ref: de,
862
+ ref: ie,
863
863
  onPointerDown: Ee,
864
864
  onKeyDown: we,
865
865
  onKeyDownCapture: Te,
@@ -879,12 +879,12 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
879
879
  className: "ssg-filter-title",
880
880
  children: p(Q.filterTitle, { column: o })
881
881
  }),
882
- (Me || _ === "select") && U === "collecting" ? je ? /* @__PURE__ */ h(ue, {
882
+ (Me || _ === "select") && U === "collecting" ? je ? /* @__PURE__ */ h(de, {
883
883
  conditionEditor: Ue,
884
884
  conditionActive: Ve,
885
885
  onConditionClear: L,
886
886
  options: $,
887
- setSelection: J,
887
+ setSelection: q,
888
888
  onSelectionClear: z,
889
889
  summaryText: B,
890
890
  optionsMeta: Q.filterOptionsLoadingShort,
@@ -895,35 +895,35 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
895
895
  }) : /* @__PURE__ */ h("div", {
896
896
  className: "ssg-filter-collecting",
897
897
  children: p(Q.filterCollecting, { percent: Math.round(W * 100) })
898
- }) : (Me || _ === "select") && Ne ? je ? /* @__PURE__ */ h(ue, {
898
+ }) : (Me || _ === "select") && Ne ? je ? /* @__PURE__ */ h(de, {
899
899
  conditionEditor: Ue,
900
900
  conditionActive: Ve,
901
901
  onConditionClear: L,
902
902
  options: $,
903
- setSelection: J,
903
+ setSelection: q,
904
904
  onSelectionClear: z,
905
905
  summaryText: B,
906
906
  optionsMeta: U === "loading" ? Q.filterOptionsLoadingShort : Q.filterOptionsFailedShort,
907
- children: /* @__PURE__ */ h(ce, {
907
+ children: /* @__PURE__ */ h(le, {
908
908
  status: U === "loading" ? "loading" : "error",
909
909
  errorMessage: te,
910
- onRetry: re
910
+ onRetry: ne
911
911
  })
912
- }) : /* @__PURE__ */ h(ce, {
912
+ }) : /* @__PURE__ */ h(le, {
913
913
  status: U === "loading" ? "loading" : "error",
914
914
  errorMessage: te,
915
- onRetry: re
916
- }) : je ? /* @__PURE__ */ h(ue, {
915
+ onRetry: ne
916
+ }) : je ? /* @__PURE__ */ h(de, {
917
917
  conditionEditor: Ue,
918
918
  conditionActive: Ve,
919
919
  onConditionClear: L,
920
920
  options: $,
921
- setSelection: J,
921
+ setSelection: q,
922
922
  onSelectionClear: z,
923
923
  summaryText: B,
924
- children: Ae ? /* @__PURE__ */ h(se, {
924
+ children: Ae ? /* @__PURE__ */ h(ce, {
925
925
  options: $,
926
- setSelection: J,
926
+ setSelection: q,
927
927
  searchInputRef: be,
928
928
  onValueToggle: he,
929
929
  onSelectAllChange: ge,
@@ -931,9 +931,9 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
931
931
  onRequestClose: X,
932
932
  isServerSide: ye,
933
933
  truncated: G
934
- }) : /* @__PURE__ */ h(ne, {
934
+ }) : /* @__PURE__ */ h(re, {
935
935
  options: $,
936
- setSelection: J,
936
+ setSelection: q,
937
937
  searchInputRef: be,
938
938
  onValueToggle: he,
939
939
  onSelectAllChange: ge,
@@ -943,9 +943,9 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
943
943
  selectAllUsesExplicitScope: !0,
944
944
  truncated: G
945
945
  })
946
- }) : De ? /* @__PURE__ */ h(ne, {
946
+ }) : De ? /* @__PURE__ */ h(re, {
947
947
  options: H,
948
- setSelection: J,
948
+ setSelection: q,
949
949
  searchInputRef: Y,
950
950
  onValueToggle: he,
951
951
  onSelectAllChange: ge,
@@ -953,7 +953,7 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
953
953
  onRequestClose: X,
954
954
  isServerSide: ye,
955
955
  truncated: G
956
- }) : _ === "number" ? /* @__PURE__ */ h(m, { children: /* @__PURE__ */ h(ie, {
956
+ }) : _ === "number" ? /* @__PURE__ */ h(m, { children: /* @__PURE__ */ h(ae, {
957
957
  draft: Pe,
958
958
  valueInputRef: Y,
959
959
  onDraftChange: S,
@@ -979,7 +979,7 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
979
979
  }, `${o}-${e.value}`))]
980
980
  }), /* @__PURE__ */ g("div", {
981
981
  className: "ssg-filter-meta",
982
- children: [p(Q.filterOptionCount, { count: H.length }), G && /* @__PURE__ */ h(le, {})]
982
+ children: [p(Q.filterOptionCount, { count: H.length }), G && /* @__PURE__ */ h(ue, {})]
983
983
  })] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("input", {
984
984
  ref: Y,
985
985
  type: "text",
@@ -1013,7 +1013,7 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
1013
1013
  e.preventDefault(), e.stopPropagation(), _e();
1014
1014
  },
1015
1015
  onKeyDown: (e) => {
1016
- q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), _e());
1016
+ J(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), _e());
1017
1017
  },
1018
1018
  className: "ssg-filter-btn-secondary",
1019
1019
  children: Q.clear
@@ -1023,7 +1023,7 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
1023
1023
  e.preventDefault(), e.stopPropagation(), X();
1024
1024
  },
1025
1025
  onKeyDown: (e) => {
1026
- q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), X());
1026
+ J(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), X());
1027
1027
  },
1028
1028
  className: "ssg-filter-btn-primary",
1029
1029
  children: Q.close
@@ -1033,7 +1033,7 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
1033
1033
  e.preventDefault(), e.stopPropagation(), me();
1034
1034
  },
1035
1035
  onKeyDown: (e) => {
1036
- q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), me());
1036
+ J(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), me());
1037
1037
  },
1038
1038
  className: "ssg-filter-btn-secondary",
1039
1039
  children: Q.clear
@@ -1043,7 +1043,7 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
1043
1043
  e.preventDefault(), e.stopPropagation(), Z();
1044
1044
  },
1045
1045
  onKeyDown: (e) => {
1046
- q(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Z());
1046
+ J(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Z());
1047
1047
  },
1048
1048
  className: "ssg-filter-btn-primary",
1049
1049
  children: Q.apply
@@ -1053,4 +1053,4 @@ function de({ isOpen: n, themeClassName: i, popoverSlot: a, title: o, filterType
1053
1053
  }), Se);
1054
1054
  }
1055
1055
  //#endregion
1056
- export { de as ColumnFilterPopover, de as default };
1056
+ export { fe as ColumnFilterPopover, fe as default };
@@ -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, onServerSideLoadError, onServerSideWriteError, columns: columnsProp, onRowsChange, onColumnsChange, rowKeyGetter, isRowExportable, createRow, createOverflowColumn, onPasteSkipped, 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, 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, fillHandle, enableRowDrag, isRowDraggable, onRowMove, enableContextMenu, getContextMenuItems, onContextMenuOpen, scrollHint, ref, onStateChange, initialState, onFiltersChange, onSortChange, onScroll, }: SpreadsheetGridProps<T>, features: GridShellFeatures): import("react").JSX.Element;
3
+ export declare function useGridShell<T extends object>({ rows: rowsProp, dataSource, serverSideRefreshToken, 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, 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, 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, GridValidationMode, CellValidationContext, CellValidationResult, GridInvalidCell, EditorCommitResult, GridRowKey, GridAggFuncName, GridAggFuncParams, GridAggFunc, GridGroupRow, GridSelectFilterOption, GetFilterOptionsParams, GetFilterOptionsResult, ColumnFilterTypeOption, ColumnFilterUiType, CellRenderContext, HeaderRenderContext, CellStyleContext, CanEditCellContext, GridConditionalFormat, RowStyleContext, DetailRowOptions, GridClassNames, GridSlotProps, GridFrameworkTypes, ReactGridTypes, DetailRowRenderContext, CellDetailContext, LabelRowOptions, LabelRowRenderContext, GridLabelRow, LabelRowSortMode, TotalRowOptions, TotalRowCellContext, TotalRowCellKind, FillHandleOptions, GridFillValueParams, GridFillDirection, GridFillKind, RowDragContext, RowMoveParams, 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, GridValidationMode, CellValidationContext, CellValidationResult, GridInvalidCell, EditorCommitResult, GridRowKey, GridAggFuncName, GridAggFuncParams, GridAggFunc, GridGroupRow, GridSelectFilterOption, GetFilterOptionsParams, GetFilterOptionsResult, ColumnFilterTypeOption, ColumnFilterUiType, CellRenderContext, HeaderRenderContext, 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';
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';
@@ -7,6 +7,8 @@ type DateCellEditorProps = {
7
7
  onCancel: () => void;
8
8
  align?: 'left' | 'center' | 'right';
9
9
  enterMove?: EditorEnterMove;
10
+ cellHeight?: number;
11
+ alignTop?: boolean;
10
12
  };
11
- export declare function DateCellEditor({ ariaLabel, initialValue, initialText, onCommit, onCancel, align, enterMove, }: DateCellEditorProps): import("react").JSX.Element;
13
+ export declare function DateCellEditor({ ariaLabel, initialValue, initialText, onCommit, onCancel, align, enterMove, cellHeight, alignTop, }: DateCellEditorProps): import("react").JSX.Element;
12
14
  export default DateCellEditor;
@@ -9,6 +9,8 @@ type NumberCellEditorProps = {
9
9
  onCancel: () => void;
10
10
  align?: 'left' | 'center' | 'right';
11
11
  enterMove?: EditorEnterMove;
12
+ cellHeight?: number;
13
+ alignTop?: boolean;
12
14
  };
13
- export declare function NumberCellEditor({ ariaLabel, initialValue, min, max, step, onCommit, onCancel, align, enterMove, }: NumberCellEditorProps): import("react").JSX.Element;
15
+ export declare function NumberCellEditor({ ariaLabel, initialValue, min, max, step, onCommit, onCancel, align, enterMove, cellHeight, alignTop, }: NumberCellEditorProps): import("react").JSX.Element;
14
16
  export default NumberCellEditor;