chore: griddy work

This commit is contained in:
Hein committed 2026-02-13 17:09:49 +02:00
1 parent 7ecafc8461
commit b49d008745
24 files changed
+2184 -22

No files matched your search

+1
View File
@@ -58,6 +58,7 @@
"@changesets/cli": "^2.29.8",
"@eslint/js": "^10.0.1",
"@microsoft/api-extractor": "^7.56.3",
"@playwright/test": "^1.58.2",
"@sentry/react": "^10.38.0",
"@storybook/react-vite": "^10.2.8",
"@testing-library/jest-dom": "^6.9.1",
@@ -0,0 +1,500 @@
# Page snapshot
```yaml
- generic [ref=e3]:
- banner "Storybook" [ref=e6]:
- heading "Storybook" [level=1] [ref=e7]
- img
- generic [ref=e11]:
- generic [ref=e12]:
- generic [ref=e13]:
- link "Skip to content" [ref=e14] [cursor=pointer]:
- /url: "#storybook-preview-wrapper"
- link "Storybook" [ref=e16] [cursor=pointer]:
- /url: ./
- img "Storybook" [ref=e17]
- switch "Settings" [ref=e22] [cursor=pointer]:
- img [ref=e23]
- generic [ref=e28]:
- generic [ref=e30] [cursor=pointer]:
- button "Open onboarding guide" [ref=e34]:
- img [ref=e36]
- strong [ref=e38]: Get started
- generic [ref=e39]:
- button "Collapse onboarding checklist" [expanded] [ref=e40]:
- img [ref=e41]
- button "25% completed" [ref=e43]:
- generic [ref=e44]:
- img [ref=e45]
- img [ref=e47]
- generic [ref=e50]: 25%
- list [ref=e52]:
- listitem [ref=e53]:
- button "Open onboarding guide for See what's new" [ref=e54] [cursor=pointer]:
- img [ref=e56]
- generic [ref=e59]: See what's new
- button "Go"
- listitem [ref=e60]:
- button "Open onboarding guide for Change a story with Controls" [ref=e61] [cursor=pointer]:
- img [ref=e63]
- generic [ref=e66]: Change a story with Controls
- listitem [ref=e67]:
- button "Open onboarding guide for Install Vitest addon" [ref=e68] [cursor=pointer]:
- img [ref=e70]
- generic [ref=e73]: Install Vitest addon
- generic [ref=e74]: Search for components
- search [ref=e75]:
- combobox "Search for components" [ref=e76]:
- generic:
- img
- searchbox "Search for components" [ref=e77]
- code: ⌃ K
- button "Tag filters" [ref=e79] [cursor=pointer]:
- img [ref=e80]
- button "Create a new story" [ref=e82] [cursor=pointer]:
- img [ref=e83]
- navigation "Stories" [ref=e86]:
- heading "Stories" [level=2] [ref=e87]
- generic [ref=e89]:
- generic [ref=e90]:
- button "Collapse" [expanded] [ref=e91] [cursor=pointer]:
- img [ref=e93]
- text: Components
- button "Expand all" [ref=e95] [cursor=pointer]:
- img [ref=e96]
- button "Boxer" [ref=e99] [cursor=pointer]:
- generic [ref=e100]:
- img [ref=e102]
- img [ref=e104]
- text: Boxer
- button "Griddy" [expanded] [ref=e107] [cursor=pointer]:
- generic [ref=e108]:
- img [ref=e110]
- img [ref=e112]
- text: Griddy
- link "Basic" [ref=e115] [cursor=pointer]:
- /url: /?path=/story/components-griddy--basic
- img [ref=e117]
- text: Basic
- link "Large Dataset" [ref=e120] [cursor=pointer]:
- /url: /?path=/story/components-griddy--large-dataset
- img [ref=e122]
- text: Large Dataset
- link "Single Selection" [ref=e125] [cursor=pointer]:
- /url: /?path=/story/components-griddy--single-selection
- img [ref=e127]
- text: Single Selection
- link "Multi Selection" [ref=e130] [cursor=pointer]:
- /url: /?path=/story/components-griddy--multi-selection
- img [ref=e132]
- text: Multi Selection
- link "Large Multi Selection" [ref=e135] [cursor=pointer]:
- /url: /?path=/story/components-griddy--large-multi-selection
- img [ref=e137]
- text: Large Multi Selection
- link "With Search" [ref=e140] [cursor=pointer]:
- /url: /?path=/story/components-griddy--with-search
- img [ref=e142]
- text: With Search
- link "Keyboard Navigation" [ref=e145] [cursor=pointer]:
- /url: /?path=/story/components-griddy--keyboard-navigation
- img [ref=e147]
- text: Keyboard Navigation
- generic [ref=e149]:
- link "With Text Filtering" [ref=e150] [cursor=pointer]:
- /url: /?path=/story/components-griddy--with-text-filtering
- img [ref=e152]
- text: With Text Filtering
- link "Skip to content" [ref=e154] [cursor=pointer]:
- /url: "#storybook-preview-wrapper"
- link "With Number Filtering" [ref=e156] [cursor=pointer]:
- /url: /?path=/story/components-griddy--with-number-filtering
- img [ref=e158]
- text: With Number Filtering
- link "With Enum Filtering" [ref=e161] [cursor=pointer]:
- /url: /?path=/story/components-griddy--with-enum-filtering
- img [ref=e163]
- text: With Enum Filtering
- link "With Boolean Filtering" [ref=e166] [cursor=pointer]:
- /url: /?path=/story/components-griddy--with-boolean-filtering
- img [ref=e168]
- text: With Boolean Filtering
- link "With All Filter Types" [ref=e171] [cursor=pointer]:
- /url: /?path=/story/components-griddy--with-all-filter-types
- img [ref=e173]
- text: With All Filter Types
- link "Large Dataset With Filtering" [ref=e176] [cursor=pointer]:
- /url: /?path=/story/components-griddy--large-dataset-with-filtering
- img [ref=e178]
- text: Large Dataset With Filtering
- generic [ref=e180]:
- button "Collapse" [expanded] [ref=e181] [cursor=pointer]:
- img [ref=e183]
- text: Former
- button "Expand all" [ref=e185] [cursor=pointer]:
- img [ref=e186]
- button "Former Basic" [ref=e189] [cursor=pointer]:
- generic [ref=e190]:
- img [ref=e192]
- img [ref=e194]
- text: Former Basic
- button "Controls Basic" [ref=e197] [cursor=pointer]:
- generic [ref=e198]:
- img [ref=e200]
- img [ref=e202]
- text: Controls Basic
- generic [ref=e204]:
- button "Collapse" [expanded] [ref=e205] [cursor=pointer]:
- img [ref=e207]
- text: State
- button "Expand all" [ref=e209] [cursor=pointer]:
- img [ref=e210]
- button "GlobalStateStore" [ref=e213] [cursor=pointer]:
- generic [ref=e214]:
- img [ref=e216]
- img [ref=e218]
- text: GlobalStateStore
- generic [ref=e220]:
- button "Collapse" [expanded] [ref=e221] [cursor=pointer]:
- img [ref=e223]
- text: Grid
- button "Expand all" [ref=e225] [cursor=pointer]:
- img [ref=e226]
- button "Gridler API" [ref=e229] [cursor=pointer]:
- generic [ref=e230]:
- img [ref=e232]
- img [ref=e234]
- text: Gridler API
- button "Gridler Local" [ref=e237] [cursor=pointer]:
- generic [ref=e238]:
- img [ref=e240]
- img [ref=e242]
- text: Gridler Local
- generic [ref=e244]:
- button "Collapse" [expanded] [ref=e245] [cursor=pointer]:
- img [ref=e247]
- text: UI
- button "Expand all" [ref=e249] [cursor=pointer]:
- img [ref=e250]
- button "Mantine Better Menu" [ref=e253] [cursor=pointer]:
- generic [ref=e254]:
- img [ref=e256]
- img [ref=e258]
- text: Mantine Better Menu
- generic [ref=e261]:
- region "Toolbar" [ref=e262]:
- heading "Toolbar" [level=2] [ref=e263]
- toolbar [ref=e264]:
- generic [ref=e265]:
- button "Reload story" [ref=e266] [cursor=pointer]:
- img [ref=e267]
- switch "Grid visibility" [ref=e269] [cursor=pointer]:
- img [ref=e270]
- button "Preview background" [ref=e272] [cursor=pointer]:
- img [ref=e273]
- switch "Measure tool" [ref=e276] [cursor=pointer]:
- img [ref=e277]
- switch "Outline tool" [ref=e280] [cursor=pointer]:
- img [ref=e281]
- button "Viewport size" [ref=e283] [cursor=pointer]:
- img [ref=e284]
- generic [ref=e288]:
- switch "Change zoom level" [ref=e289] [cursor=pointer]: 100%
- button "Enter full screen" [ref=e290] [cursor=pointer]:
- img [ref=e291]
- button "Share" [ref=e293] [cursor=pointer]:
- img [ref=e294]
- button "Open in editor" [ref=e297] [cursor=pointer]:
- img [ref=e298]
- main "Main preview area" [ref=e301]:
- heading "Main preview area" [level=2] [ref=e302]
- generic [ref=e304]:
- link "Skip to sidebar" [ref=e305] [cursor=pointer]:
- /url: "#components-griddy--with-text-filtering"
- iframe [ref=e309]:
- generic [ref=f1e4]:
- grid "Data grid" [ref=f1e5]:
- generic [ref=f1e6]:
- rowgroup [ref=f1e7]:
- row "ID First Name Filter status indicator Last Name Filter status indicator Email Age Department Salary Start Date Active" [ref=f1e8]:
- columnheader "ID" [ref=f1e9] [cursor=pointer]:
- generic [ref=f1e11]: ID
- columnheader "First Name Filter status indicator" [ref=f1e13] [cursor=pointer]:
- generic [ref=f1e15]:
- text: First Name
- button "Filter status indicator" [disabled] [ref=f1e16]:
- img [ref=f1e18]
- columnheader "Last Name Filter status indicator" [ref=f1e21] [cursor=pointer]:
- generic [ref=f1e23]:
- text: Last Name
- button "Filter status indicator" [disabled] [ref=f1e24]:
- img [ref=f1e26]
- columnheader "Email" [ref=f1e29] [cursor=pointer]:
- generic [ref=f1e31]: Email
- columnheader "Age" [ref=f1e33] [cursor=pointer]:
- generic [ref=f1e35]: Age
- columnheader "Department" [ref=f1e37] [cursor=pointer]:
- generic [ref=f1e39]: Department
- columnheader "Salary" [ref=f1e41] [cursor=pointer]:
- generic [ref=f1e43]: Salary
- columnheader "Start Date" [ref=f1e45] [cursor=pointer]:
- generic [ref=f1e47]: Start Date
- columnheader "Active" [ref=f1e49] [cursor=pointer]:
- generic [ref=f1e51]: Active
- rowgroup [ref=f1e53]:
- row "1 Alice Smith alice.smith@example.com 22 Engineering $40,000 2020-01-01 No" [ref=f1e54]:
- gridcell "1" [ref=f1e55]
- gridcell "Alice" [ref=f1e56]
- gridcell "Smith" [ref=f1e57]
- gridcell "alice.smith@example.com" [ref=f1e58]
- gridcell "22" [ref=f1e59]
- gridcell "Engineering" [ref=f1e60]
- gridcell "$40,000" [ref=f1e61]
- gridcell "2020-01-01" [ref=f1e62]
- gridcell "No" [ref=f1e63]
- row "2 Bob Johnson bob.johnson@example.com 23 Marketing $41,234 2021-02-02 Yes" [ref=f1e64]:
- gridcell "2" [ref=f1e65]
- gridcell "Bob" [ref=f1e66]
- gridcell "Johnson" [ref=f1e67]
- gridcell "bob.johnson@example.com" [ref=f1e68]
- gridcell "23" [ref=f1e69]
- gridcell "Marketing" [ref=f1e70]
- gridcell "$41,234" [ref=f1e71]
- gridcell "2021-02-02" [ref=f1e72]
- gridcell "Yes" [ref=f1e73]
- row "3 Charlie Williams charlie.williams@example.com 24 Sales $42,468 2022-03-03 Yes" [ref=f1e74]:
- gridcell "3" [ref=f1e75]
- gridcell "Charlie" [ref=f1e76]
- gridcell "Williams" [ref=f1e77]
- gridcell "charlie.williams@example.com" [ref=f1e78]
- gridcell "24" [ref=f1e79]
- gridcell "Sales" [ref=f1e80]
- gridcell "$42,468" [ref=f1e81]
- gridcell "2022-03-03" [ref=f1e82]
- gridcell "Yes" [ref=f1e83]
- row "4 Diana Brown diana.brown@example.com 25 HR $43,702 2023-04-04 No" [ref=f1e84]:
- gridcell "4" [ref=f1e85]
- gridcell "Diana" [ref=f1e86]
- gridcell "Brown" [ref=f1e87]
- gridcell "diana.brown@example.com" [ref=f1e88]
- gridcell "25" [ref=f1e89]
- gridcell "HR" [ref=f1e90]
- gridcell "$43,702" [ref=f1e91]
- gridcell "2023-04-04" [ref=f1e92]
- gridcell "No" [ref=f1e93]
- row "5 Eve Jones eve.jones@example.com 26 Finance $44,936 2024-05-05 Yes" [ref=f1e94]:
- gridcell "5" [ref=f1e95]
- gridcell "Eve" [ref=f1e96]
- gridcell "Jones" [ref=f1e97]
- gridcell "eve.jones@example.com" [ref=f1e98]
- gridcell "26" [ref=f1e99]
- gridcell "Finance" [ref=f1e100]
- gridcell "$44,936" [ref=f1e101]
- gridcell "2024-05-05" [ref=f1e102]
- gridcell "Yes" [ref=f1e103]
- row "6 Frank Garcia frank.garcia@example.com 27 Design $46,170 2020-06-06 Yes" [ref=f1e104]:
- gridcell "6" [ref=f1e105]
- gridcell "Frank" [ref=f1e106]
- gridcell "Garcia" [ref=f1e107]
- gridcell "frank.garcia@example.com" [ref=f1e108]
- gridcell "27" [ref=f1e109]
- gridcell "Design" [ref=f1e110]
- gridcell "$46,170" [ref=f1e111]
- gridcell "2020-06-06" [ref=f1e112]
- gridcell "Yes" [ref=f1e113]
- row "7 Grace Miller grace.miller@example.com 28 Legal $47,404 2021-07-07 No" [ref=f1e114]:
- gridcell "7" [ref=f1e115]
- gridcell "Grace" [ref=f1e116]
- gridcell "Miller" [ref=f1e117]
- gridcell "grace.miller@example.com" [ref=f1e118]
- gridcell "28" [ref=f1e119]
- gridcell "Legal" [ref=f1e120]
- gridcell "$47,404" [ref=f1e121]
- gridcell "2021-07-07" [ref=f1e122]
- gridcell "No" [ref=f1e123]
- row "8 Henry Davis henry.davis@example.com 29 Support $48,638 2022-08-08 Yes" [ref=f1e124]:
- gridcell "8" [ref=f1e125]
- gridcell "Henry" [ref=f1e126]
- gridcell "Davis" [ref=f1e127]
- gridcell "henry.davis@example.com" [ref=f1e128]
- gridcell "29" [ref=f1e129]
- gridcell "Support" [ref=f1e130]
- gridcell "$48,638" [ref=f1e131]
- gridcell "2022-08-08" [ref=f1e132]
- gridcell "Yes" [ref=f1e133]
- row "9 Ivy Martinez ivy.martinez@example.com 30 Engineering $49,872 2023-09-09 Yes" [ref=f1e134]:
- gridcell "9" [ref=f1e135]
- gridcell "Ivy" [ref=f1e136]
- gridcell "Martinez" [ref=f1e137]
- gridcell "ivy.martinez@example.com" [ref=f1e138]
- gridcell "30" [ref=f1e139]
- gridcell "Engineering" [ref=f1e140]
- gridcell "$49,872" [ref=f1e141]
- gridcell "2023-09-09" [ref=f1e142]
- gridcell "Yes" [ref=f1e143]
- row "10 Jack Anderson jack.anderson@example.com 31 Marketing $51,106 2024-10-10 No" [ref=f1e144]:
- gridcell "10" [ref=f1e145]
- gridcell "Jack" [ref=f1e146]
- gridcell "Anderson" [ref=f1e147]
- gridcell "jack.anderson@example.com" [ref=f1e148]
- gridcell "31" [ref=f1e149]
- gridcell "Marketing" [ref=f1e150]
- gridcell "$51,106" [ref=f1e151]
- gridcell "2024-10-10" [ref=f1e152]
- gridcell "No" [ref=f1e153]
- row "11 Karen Taylor karen.taylor@example.com 32 Sales $52,340 2020-11-11 Yes" [ref=f1e154]:
- gridcell "11" [ref=f1e155]
- gridcell "Karen" [ref=f1e156]
- gridcell "Taylor" [ref=f1e157]
- gridcell "karen.taylor@example.com" [ref=f1e158]
- gridcell "32" [ref=f1e159]
- gridcell "Sales" [ref=f1e160]
- gridcell "$52,340" [ref=f1e161]
- gridcell "2020-11-11" [ref=f1e162]
- gridcell "Yes" [ref=f1e163]
- row "12 Leo Thomas leo.thomas@example.com 33 HR $53,574 2021-12-12 Yes" [ref=f1e164]:
- gridcell "12" [ref=f1e165]
- gridcell "Leo" [ref=f1e166]
- gridcell "Thomas" [ref=f1e167]
- gridcell "leo.thomas@example.com" [ref=f1e168]
- gridcell "33" [ref=f1e169]
- gridcell "HR" [ref=f1e170]
- gridcell "$53,574" [ref=f1e171]
- gridcell "2021-12-12" [ref=f1e172]
- gridcell "Yes" [ref=f1e173]
- row "13 Mia Hernandez mia.hernandez@example.com 34 Finance $54,808 2022-01-13 No" [ref=f1e174]:
- gridcell "13" [ref=f1e175]
- gridcell "Mia" [ref=f1e176]
- gridcell "Hernandez" [ref=f1e177]
- gridcell "mia.hernandez@example.com" [ref=f1e178]
- gridcell "34" [ref=f1e179]
- gridcell "Finance" [ref=f1e180]
- gridcell "$54,808" [ref=f1e181]
- gridcell "2022-01-13" [ref=f1e182]
- gridcell "No" [ref=f1e183]
- row "14 Nick Moore nick.moore@example.com 35 Design $56,042 2023-02-14 Yes" [ref=f1e184]:
- gridcell "14" [ref=f1e185]
- gridcell "Nick" [ref=f1e186]
- gridcell "Moore" [ref=f1e187]
- gridcell "nick.moore@example.com" [ref=f1e188]
- gridcell "35" [ref=f1e189]
- gridcell "Design" [ref=f1e190]
- gridcell "$56,042" [ref=f1e191]
- gridcell "2023-02-14" [ref=f1e192]
- gridcell "Yes" [ref=f1e193]
- row "15 Olivia Martin olivia.martin@example.com 36 Legal $57,276 2024-03-15 Yes" [ref=f1e194]:
- gridcell "15" [ref=f1e195]
- gridcell "Olivia" [ref=f1e196]
- gridcell "Martin" [ref=f1e197]
- gridcell "olivia.martin@example.com" [ref=f1e198]
- gridcell "36" [ref=f1e199]
- gridcell "Legal" [ref=f1e200]
- gridcell "$57,276" [ref=f1e201]
- gridcell "2024-03-15" [ref=f1e202]
- gridcell "Yes" [ref=f1e203]
- row "16 Paul Jackson paul.jackson@example.com 37 Support $58,510 2020-04-16 No" [ref=f1e204]:
- gridcell "16" [ref=f1e205]
- gridcell "Paul" [ref=f1e206]
- gridcell "Jackson" [ref=f1e207]
- gridcell "paul.jackson@example.com" [ref=f1e208]
- gridcell "37" [ref=f1e209]
- gridcell "Support" [ref=f1e210]
- gridcell "$58,510" [ref=f1e211]
- gridcell "2020-04-16" [ref=f1e212]
- gridcell "No" [ref=f1e213]
- row "17 Quinn Thompson quinn.thompson@example.com 38 Engineering $59,744 2021-05-17 Yes" [ref=f1e214]:
- gridcell "17" [ref=f1e215]
- gridcell "Quinn" [ref=f1e216]
- gridcell "Thompson" [ref=f1e217]
- gridcell "quinn.thompson@example.com" [ref=f1e218]
- gridcell "38" [ref=f1e219]
- gridcell "Engineering" [ref=f1e220]
- gridcell "$59,744" [ref=f1e221]
- gridcell "2021-05-17" [ref=f1e222]
- gridcell "Yes" [ref=f1e223]
- row "18 Rose White rose.white@example.com 39 Marketing $60,978 2022-06-18 Yes" [ref=f1e224]:
- gridcell "18" [ref=f1e225]
- gridcell "Rose" [ref=f1e226]
- gridcell "White" [ref=f1e227]
- gridcell "rose.white@example.com" [ref=f1e228]
- gridcell "39" [ref=f1e229]
- gridcell "Marketing" [ref=f1e230]
- gridcell "$60,978" [ref=f1e231]
- gridcell "2022-06-18" [ref=f1e232]
- gridcell "Yes" [ref=f1e233]
- row "19 Sam Lopez sam.lopez@example.com 40 Sales $62,212 2023-07-19 No" [ref=f1e234]:
- gridcell "19" [ref=f1e235]
- gridcell "Sam" [ref=f1e236]
- gridcell "Lopez" [ref=f1e237]
- gridcell "sam.lopez@example.com" [ref=f1e238]
- gridcell "40" [ref=f1e239]
- gridcell "Sales" [ref=f1e240]
- gridcell "$62,212" [ref=f1e241]
- gridcell "2023-07-19" [ref=f1e242]
- gridcell "No" [ref=f1e243]
- row "20 Tina Lee tina.lee@example.com 41 HR $63,446 2024-08-20 Yes" [ref=f1e244]:
- gridcell "20" [ref=f1e245]
- gridcell "Tina" [ref=f1e246]
- gridcell "Lee" [ref=f1e247]
- gridcell "tina.lee@example.com" [ref=f1e248]
- gridcell "41" [ref=f1e249]
- gridcell "HR" [ref=f1e250]
- gridcell "$63,446" [ref=f1e251]
- gridcell "2024-08-20" [ref=f1e252]
- gridcell "Yes" [ref=f1e253]
- generic [ref=f1e254]:
- strong [ref=f1e255]: "Active Filters:"
- generic [ref=f1e256]: "[]"
- region "Addon panel" [ref=e312]:
- heading "Addon panel" [level=2] [ref=e313]
- generic [ref=e314]:
- generic [ref=e315]:
- generic [ref=e316]:
- button "Move addon panel to right" [ref=e317] [cursor=pointer]:
- img [ref=e318]
- button "Hide addon panel" [ref=e321] [cursor=pointer]:
- img [ref=e322]
- tablist "Available addons" [ref=e327]:
- tab "Controls" [selected] [ref=e328] [cursor=pointer]:
- generic [ref=e330]: Controls
- tab "Actions" [ref=e331] [cursor=pointer]:
- generic [ref=e333]: Actions
- tab "Interactions" [ref=e334] [cursor=pointer]:
- generic [ref=e336]: Interactions
- tabpanel "Controls" [ref=e337]:
- generic [ref=e344]:
- button "Reset controls" [ref=e346] [cursor=pointer]:
- img [ref=e347]
- table [ref=e349]:
- rowgroup [ref=e350]:
- row "Name Description Default Control" [ref=e351]:
- columnheader "Name" [ref=e352]
- columnheader "Description" [ref=e353]
- columnheader "Default" [ref=e354]
- columnheader "Control" [ref=e355]
- rowgroup [ref=e356]:
- row "columns array - -" [ref=e357]:
- cell "columns" [ref=e358]
- cell "array" [ref=e359]:
- generic [ref=e362]: array
- cell "-" [ref=e363]
- cell "-" [ref=e364]
- row "data array - -" [ref=e365]:
- cell "data" [ref=e366]
- cell "array" [ref=e367]:
- generic [ref=e370]: array
- cell "-" [ref=e371]
- cell "-" [ref=e372]
- row "getRowId function - -" [ref=e373]:
- cell "getRowId" [ref=e374]
- cell "function" [ref=e375]:
- generic [ref=e378]: function
- cell "-" [ref=e379]
- cell "-" [ref=e380]
- row "height number - -" [ref=e381]:
- cell "height" [ref=e382]
- cell "number" [ref=e383]:
- generic [ref=e386]: number
- cell "-" [ref=e387]
- cell "-" [ref=e388]
```
+85
View File
@@ -0,0 +1,85 @@
<!DOCTYPE html>
<html style='scrollbar-gutter: stable both-edges;'>
<head>
<meta charset='UTF-8'>
<meta name='color-scheme' content='dark light'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>Playwright Test Report</title>
<script type="module">var NA=Object.defineProperty;var BA=(l,u,c)=>u in l?NA(l,u,{enumerable:!0,configurable:!0,writable:!0,value:c}):l[u]=c;var yn=(l,u,c)=>BA(l,typeof u!="symbol"?u+"":u,c);(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))f(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const h of o.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&f(h)}).observe(document,{childList:!0,subtree:!0});function c(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function f(r){if(r.ep)return;r.ep=!0;const o=c(r);fetch(r.href,o)}})();function UA(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Mf={exports:{}},Ei={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var D1;function QA(){if(D1)return Ei;D1=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function c(f,r,o){var h=null;if(o!==void 0&&(h=""+o),r.key!==void 0&&(h=""+r.key),"key"in r){o={};for(var v in r)v!=="key"&&(o[v]=r[v])}else o=r;return r=o.ref,{$$typeof:l,type:f,key:h,ref:r!==void 0?r:null,props:o}}return Ei.Fragment=u,Ei.jsx=c,Ei.jsxs=c,Ei}var M1;function zA(){return M1||(M1=1,Mf.exports=QA()),Mf.exports}var m=zA();const YA=15,xt=0,bn=1,LA=2,ye=-2,Ut=-3,j1=-4,xn=-5,Me=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],L2=1440,GA=0,XA=4,VA=9,ZA=5,qA=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],IA=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],KA=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],kA=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],JA=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,Line truncated
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var T2;function B5(){if(T2)return dt;T2=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),A=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),O=Symbol.iterator;function X(C){return C===null||typeof C!="object"?null:(C=O&&C[O]||C["@@iterator"],typeof C=="function"?C:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,p={};function x(C,L,W){this.props=C,this.context=L,this.refs=p,this.updater=W||B}x.prototype.isReactComponent={},x.prototype.setState=function(C,L){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,L,"setState")},x.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function R(){}R.prototype=x.prototype;function U(C,L,W){this.props=C,this.context=L,this.refs=p,this.updater=W||B}var Z=U.prototype=new R;Z.constructor=U,b(Z,x.prototype),Z.isPureReactComponent=!0;var F=Array.isArray;function j(){}var D={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function K(C,L,W){var et=W.ref;return{$$typeof:l,type:C,key:L,ref:et!==void 0?et:null,props:W}}function J(C,L){return K(C.type,L,C.props)}function k(C){return typeof C=="object"&&C!==null&&C.$$typeof===l}function nt(C){var L={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(W){return L[W]})}var P=/\/+/g;function st(C,L){return typeof C=="object"&&C!==null&&C.key!=null?nt(""+C.key):L.toString(36)}function it(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(j,j):(C.status="pending",C.then(function(L){C.status==="pending"&&(C.status="fulfilled",C.value=L)},function(L){C.status==="pending"&&(C.status="rejected",C.reason=L)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function H(C,L,W,et,rt){var ot=typeof C;(ot==="undefined"||ot==="boolean")&&(C=null);var gt=!1;if(C===null)gt=!0;else switch(ot){case"bigint":case"string":case"number":gt=!0;break;case"object":switch(C.$$typeof){case l:case u:gt=!0;break;case E:return gt=C._init,H(gt(C._payload),L,W,et,rt)}}if(gt)return rt=rt(C),gt=et===""?"."+st(C,0):et,F(rt)?(W="",gt!=null&&(W=gt.replace(P,"$&/")+"/"),H(rt,L,W,"",function(On){return On})):rt!=null&&(k(rt)&&(rt=J(rt,W+(rt.key==null||C&&C.key===rt.key?"":(""+rt.key).replace(P,"$&/")+"/")+gt)),L.push(rt)),1;gt=0;var Ft=et===""?".":et+":";if(F(C))for(var Qt=0;Qt<C.length;Qt++)et=C[Qt],ot=Ft+st(et,Qt),gt+=H(et,L,W,ot,rt);else if(Qt=X(C),typeof Qt=="function")for(C=Qt.call(C),Qt=0;!(et=C.next()).done;)et=et.value,ot=Ft+st(et,Qt++),gt+=H(et,L,W,ot,rt);else if(ot==="object"){if(typeof C.then=="function")return H(it(C),L,W,et,rt);throw L=String(C),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return gt}function _(C,L,W){if(C==null)return C;var et=[],rt=0;return H(C,et,"","",function(ot){return L.call(W,ot,rt++)}),et}function $(C){if(C._status===-1){var L=C._result;L=L(),L.then(function(W){(C._status===0||C._status===-1)&&(C._status=1,C._result=W)},function(W){(C._status===0||C._status===-1)&&(C._status=2,C._result=W)}),C._status===-1&&(C._status=0,C._result=L)}if(C._status===1)return C._result.default;throw C._result}var ht=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},tt={map:_,forEach:function(C,L,W){_(C,function(){L.apply(this,arguments)},W)},count:function(C){var L=0;return _(C,function(){L++}),L},toArray:function(C){return _(C,function(L){return L})||[]},only:function(C){if(!k(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return dt.Activity=S,dt.Children=tt,dt.Component=x,dt.Fragment=c,dt.Profiler=r,dt.PureComponent=U,dt.StrictMode=f,dt.Suspense=y,dt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,dt.__COMPILER_RUNTIME={__proto__:null,c:function(C){return D.H.useMemoCache(C)}},dt.cache=function(C){return function(){return C.apply(null,arguments)}},dt.cacheSignal=function(){return null},dt.cloneElement=function(C,L,W){if(C==nullLine truncated
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var O2;function U5(){return O2||(O2=1,(function(l){function u(H,_){var $=H.length;H.push(_);t:for(;0<$;){var ht=$-1>>>1,tt=H[ht];if(0<r(tt,_))H[ht]=_,H[$]=tt,$=ht;else break t}}function c(H){return H.length===0?null:H[0]}function f(H){if(H.length===0)return null;var _=H[0],$=H.pop();if($!==_){H[0]=$;t:for(var ht=0,tt=H.length,C=tt>>>1;ht<C;){var L=2*(ht+1)-1,W=H[L],et=L+1,rt=H[et];if(0>r(W,$))et<tt&&0>r(rt,W)?(H[ht]=rt,H[et]=$,ht=et):(H[ht]=W,H[L]=$,ht=L);else if(et<tt&&0>r(rt,$))H[ht]=rt,H[et]=$,ht=et;else break t}}return _}function r(H,_){var $=H.sortIndex-_.sortIndex;return $!==0?$:H.id-_.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;l.unstable_now=function(){return o.now()}}else{var h=Date,v=h.now();l.unstable_now=function(){return h.now()-v}}var y=[],A=[],E=1,S=null,O=3,X=!1,B=!1,b=!1,p=!1,x=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function Z(H){for(var _=c(A);_!==null;){if(_.callback===null)f(A);else if(_.startTime<=H)f(A),_.sortIndex=_.expirationTime,u(y,_);else break;_=c(A)}}function F(H){if(b=!1,Z(H),!B)if(c(y)!==null)B=!0,j||(j=!0,nt());else{var _=c(A);_!==null&&it(F,_.startTime-H)}}var j=!1,D=-1,N=5,K=-1;function J(){return p?!0:!(l.unstable_now()-K<N)}function k(){if(p=!1,j){var H=l.unstable_now();K=H;var _=!0;try{t:{B=!1,b&&(b=!1,R(D),D=-1),X=!0;var $=O;try{e:{for(Z(H),S=c(y);S!==null&&!(S.expirationTime>H&&J());){var ht=S.callback;if(typeof ht=="function"){S.callback=null,O=S.priorityLevel;var tt=ht(S.expirationTime<=H);if(H=l.unstable_now(),typeof tt=="function"){S.callback=tt,Z(H),_=!0;break e}S===c(y)&&f(y),Z(H)}else f(y);S=c(y)}if(S!==null)_=!0;else{var C=c(A);C!==null&&it(F,C.startTime-H),_=!1}}break t}finally{S=null,O=$,X=!1}_=void 0}}finally{_?nt():j=!1}}}var nt;if(typeof U=="function")nt=function(){U(k)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,st=P.port2;P.port1.onmessage=k,nt=function(){st.postMessage(null)}}else nt=function(){x(k,0)};function it(H,_){D=x(function(){H(l.unstable_now())},_)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(H){H.callback=null},l.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<H?Math.floor(1e3/H):5},l.unstable_getCurrentPriorityLevel=function(){return O},l.unstable_next=function(H){switch(O){case 1:case 2:case 3:var _=3;break;default:_=O}var $=O;O=_;try{return H()}finally{O=$}},l.unstable_requestPaint=function(){p=!0},l.unstable_runWithPriority=function(H,_){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var $=O;O=H;try{return _()}finally{O=$}},l.unstable_scheduleCallback=function(H,_,$){var ht=l.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?ht+$:ht):$=ht,H){case 1:var tt=-1;break;case 2:tt=250;break;case 5:tt=1073741823;break;case 4:tt=1e4;break;default:tt=5e3}return tt=$+tt,H={id:E++,callback:_,priorityLevel:H,startTime:$,expirationTime:tt,sortIndex:-1},$>ht?(H.sortIndex=$,u(A,H),c(y)===null&&H===c(A)&&(b?(R(D),D=-1):b=!0,it(F,$-ht))):(H.sortIndex=tt,u(y,H),B||X||(B=!0,j||(j=!0,nt()))),H},l.unstable_shouldYield=J,l.unstable_wrapCallback=function(H){var _=O;return function(){var $=O;O=_;try{return H.apply(this,arguments)}finally{O=$}}}})(qf)),qf}var w2;function Q5(){return w2||(w2=1,Zf.exports=U5()),Zf.exports}var If={exports:{}},ce={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var R2;function z5(){if(R2)return ce;R2=1;var l=xr();function u(y){var A="https://react.dev/errors/"+y;if(1<arguments.length){A+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)A+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+y+"; visit "+A+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var f={d:{f:c,r:function(){throw Error(u(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},r=Symbol.for("react.portal");function o(y,A,E){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:S==null?null:""+S,children:y,containerInfo:A,implementation:E}}var h=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(y,A){if(y==="font")return"";if(typeof A=="string")return A==="use-credentials"?A:""}return ce.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f,ce.createPortal=function(y,A){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!A||A.nodeType!==1&&A.nodeType!==9&&A.nodeType!==11)throw Error(u(299));return o(y,A,null,E)},ce.flushSync=function(y){var A=h.T,E=f.p;try{if(h.T=null,f.p=2,y)return y()}finally{h.T=A,f.p=E,f.d.f()}},ce.preconnect=function(y,A){typeof y=="string"&&(A?(A=A.crossOrigin,A=typeof A=="string"?A==="use-credentials"?A:"":void 0):A=null,f.d.C(y,A))},ce.prefetchDNS=function(y){typeof y=="string"&&f.d.D(y)},ce.preinit=function(y,A){if(typeof y=="string"&&A&&typeof A.as=="string"){var E=A.as,S=v(E,A.crossOrigin),O=typeof A.integrity=="string"?A.integrity:void 0,X=typeof A.fetchPriority=="string"?A.fetchPriority:void 0;E==="style"?f.d.S(y,typeof A.precedence=="string"?A.precedence:void 0,{crossOrigin:S,integrity:O,fetchPriority:X}):E==="script"&&f.d.X(y,{crossOrigin:S,integrity:O,fetchPriority:X,nonce:typeof A.nonce=="string"?A.nonce:void 0})}},ce.preinitModule=function(y,A){if(typeof y=="string")if(typeof A=="object"&&A!==null){if(A.as==null||A.as==="script"){var E=v(A.as,A.crossOrigin);f.d.M(y,{crossOrigin:E,integrity:typeof A.integrity=="string"?A.integrity:void 0,nonce:typeof A.nonce=="string"?A.nonce:void 0})}}else A==null&&f.d.M(y)},ce.preload=function(y,A){if(typeof y=="string"&&typeof A=="object"&&A!==null&&typeof A.as=="string"){var E=A.as,S=v(E,A.crossOrigin);f.d.L(y,E,{crossOrigin:S,integrity:typeof A.integrity=="string"?A.integrity:void 0,nonce:typeof A.nonce=="string"?A.nonce:void 0,type:typeof A.type=="string"?A.type:void 0,fetchPriority:typeof A.fetchPriority=="string"?A.fetchPriority:void 0,referrerPolicy:typeof A.referrerPolicy=="string"?A.referrerPolicy:void 0,imageSrcSet:typeof A.imageSrcSet=="string"?A.imageSrcSet:void 0,imageSizes:typeof A.imageSizes=="string"?A.imageSizes:void 0,media:typeof A.media=="string"?A.media:void 0})}},ce.preloadModule=function(y,A){if(typeof y=="string")if(A){var E=v(A.as,A.crossOrigin);f.d.m(y,{as:typeof A.as=="string"&&A.as!=="script"?A.as:void 0,crossOrigin:E,integrity:typeof A.integrity=="string"?A.integrity:void 0})}else f.d.m(y)},ce.requestFormReset=function(y){f.d.r(y)},ce.unstable_batchedUpdates=function(y,A){return y(A)},ce.useFormState=function(y,A,E){return h.H.useFormState(y,A,E)},ce.useFormStatus=function(){return h.H.useHostTransitionStatus()},ce.version="19.2.1",ce}var D2;function Y5(){if(D2)return If.exports;D2=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),If.exports=z5(),If.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var M2;function L5(){if(M2)return xi;M2=1;var l=Q5(),u=xr(),c=Y5();function f(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function h(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function v(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function y(t){if(o(t)!==t)throw Error(f(188))}function A(t){var e=t.alternate;if(!e){if(e=o(t),e===null)throw Error(f(188));return e!==t?null:t}for(var n=t,a=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return y(i),t;if(s===a)return y(i),e;s=s.sibling}throw Error(f(188))}if(n.return!==a.return)n=i,a=s;else{for(var d=!1,g=i.child;g;){if(g===n){d=!0,n=i,a=s;break}if(g===a){d=!0,a=i,n=s;break}g=g.sibling}if(!d){for(g=s.child;g;){if(g===n){d=!0,n=s,a=i;break}if(g===a){d=!0,a=s,n=i;break}g=g.sibling}if(!d)throw Error(f(189))}}if(n.alternate!==a)throw Error(f(190))}if(n.tag!==3)throw Error(f(188));return n.stateNode.current===n?t:e}function E(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=E(t),e!==null)return e;t=t.sibling}return null}var S=Object.assign,O=Symbol.for("react.element"),X=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),U=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),J=Symbol.for("react.memo_cache_sentinel"),k=Symbol.iterator;function nt(t){return t===null||typeof t!="object"?null:(t=k&&t[k]||t["@@iterator"],typeof t=="function"?t:null)}var P=Symbol.for("react.client.reference");function st(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===P?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case b:return"Fragment";case x:return"Profiler";case p:return"StrictMode";case F:return"Suspense";case j:return"SuspenseList";case K:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case B:return"Portal";case U:return t.displayName||"Context";case R:return(t._context.displayName||"Context")+".Consumer";case Z:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case D:return e=t.displayName||null,e!==null?e:st(t.type)||"Memo";case N:e=t._payload,t=t._init;try{return st(t(e))}catch{}}return null}var it=Array.isArray,H=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},ht=[],tt=-1;function C(t){return{current:t}}function L(t){0>tt||(t.current=ht[tt],ht[tt]=null,tt--)}function W(t,e){tt++,ht[tt]=t.current,t.current=e}var et=C(null),rt=C(null),ot=C(null),gt=C(null);function Ft(t,e){switch(W(ot,e),W(rt,t),W(et,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Pd(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Pd(e),t=$d(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}L(et),W(et,t)}function Qt(){L(et),L(rt),L(ot)}function On(t){t.memoizedState!==null&&W(gt,t);var e=et.current,n=$d(e,t.type);e!==n&&(W(rt,t),W(et,n))}function ra(t){rt.current===t&&(L(et),L(rt)),gt.current===t&&(L(gt),gi._currentValue=$)}var wn,Ba;function Ee(t){if(wn===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);wn=e&&e[1]||"",Ba=-1<n.stack.indexOf(`
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+wn+t+Ba}var Ua=!1;function Rn(t,e){if(!t||Ua)return"";Ua=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(e){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(G){var Y=G}Reflect.construct(t,[],I)}else{try{I.call()}catch(G){Y=G}t.call(I.prototype)}}else{try{throw Error()}catch(G){Y=G}(I=t())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(G){if(G&&Y&&typeof G.stack=="string")return[G.stack,Y.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=a.DetermineComponentFrameRoot(),d=s[0],g=s[1];if(d&&g){var T=d.split(`
`),z=g.split(`
`);for(i=a=0;a<T.length&&!T[a].includes("DetermineComponentFrameRoot");)a++;for(;i<z.length&&!z[i].includes("DetermineComponentFrameRoot");)i++;if(a===T.length||i===z.length)for(a=T.length-1,i=z.length-1;1<=a&&0<=i&&T[a]!==z[i];)i--;for(;1<=a&&0<=i;a--,i--)if(T[a]!==z[i]){if(a!==1||i!==1)do if(a--,i--,0>i||T[a]!==z[i]){var V=`
`+T[a].replace(" at new "," at ");return t.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",t.displayName)),V}while(1<=a&&0<=i);break}}}finally{Ua=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Ee(n):""}function Qa(t,e){switch(t.tag){case 26:case 27:case 5:return Ee(t.type);case 16:return Ee("Lazy");case 13:return t.child!==e&&e!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return Rn(t.type,!1);case 11:return Rn(t.type.render,!1);case 1:return Rn(t.type,!0);case 31:return Ee("Activity");default:return""}}function Bi(t){try{var e="",n=null;do e+=Qa(t,n),n=t,t=t.return;while(t);return e}catch(a){return`
Error generating stack: `+a.message+`
`+a.stack}}var mc=Object.prototype.hasOwnProperty,gc=l.unstable_scheduleCallback,Ac=l.unstable_cancelCallback,om=l.unstable_shouldYield,dm=l.unstable_requestPaint,pe=l.unstable_now,hm=l.unstable_getCurrentPriorityLevel,Dr=l.unstable_ImmediatePriority,Mr=l.unstable_UserBlockingPriority,Ui=l.unstable_NormalPriority,mm=l.unstable_LowPriority,jr=l.unstable_IdlePriority,gm=l.log,Am=l.unstable_setDisableYieldValue,wl=null,be=null;function Dn(t){if(typeof gm=="function"&&Am(t),be&&typeof be.setStrictMode=="function")try{be.setStrictMode(wl,t)}catch{}}var xe=Math.clz32?Math.clz32:Em,vm=Math.log,ym=Math.LN2;function Em(t){return t>>>=0,t===0?32:31-(vm(t)/ym|0)|0}var Qi=256,zi=262144,Yi=4194304;function oa(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Li(t,e,n){var a=t.pendingLanes;if(a===0)return 0;var i=0,s=t.suspendedLanes,d=t.pingedLanes;t=t.warmLanes;var g=a&134217727;return g!==0?(a=g&~s,a!==0?i=oa(a):(d&=g,d!==0?i=oa(d):n||(n=g&~t,n!==0&&(i=oa(n))))):(g=a&~s,g!==0?i=oa(g):d!==0?i=oa(d):n||(n=a&~t,n!==0&&(i=oa(n)))),i===0?0:e!==0&&e!==i&&(e&s)===0&&(s=i&-i,n=e&-e,s>=n||s===32&&(n&4194048)!==0)?e:i}function Rl(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function pm(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Hr(){var t=Yi;return Yi<<=1,(Yi&62914560)===0&&(Yi=4194304),t}function vc(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Dl(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function bm(t,e,n,a,i,s){var d=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var g=t.entanglements,T=t.expirationTimes,z=t.hiddenUpdates;for(n=d&~n;0<n;){var V=31-xe(n),I=1<<V;g[V]=0,T[V]=-1;var Y=z[V];if(Y!==null)for(z[V]=null,V=0;V<Y.length;V++){var G=Y[V];G!==null&&(G.lane&=-536870913)}n&=~I}a!==0&&Nr(t,a,0),s!==0&&i===0&&t.tag!==0&&(t.suspendedLanes|=s&~(d&~e))}function Nr(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var a=31-xe(e);t.entangledLanes|=e,t.entanglements[a]=t.entanglements[a]|1073741824|n&261930}function Br(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var a=31-xe(n),i=1<<a;i&e|t[a]&e&&(t[a]|=e),n&=~i}}function Ur(t,e){var n=e&-e;return n=(n&42)!==0?1:yc(n),(n&(t.suspendedLanes|e))!==0?0:n}function yc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Ec(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Qr(){var t=_.p;return t!==0?t:(t=window.event,t===void 0?32:x1(t.type))}function zr(t,e){var n=_.p;try{return _.p=t,e()}finally{_.p=n}}var Mn=Math.random().toString(36).slice(2),te="__reactFiber$"+Mn,oe="__reactProps$"+Mn,za="__reactContainer$"+Mn,pc="__reactEvents$"+Mn,xm="__reactListeners$"+Mn,Sm="__reactHandles$"+Mn,Yr="__reactResources$"+Mn,Ml="__reactMarker$"+Mn;function bc(t){delete t[te],delete t[oe],delete t[pc],delete t[xm],delete t[Sm]}function Ya(t){var e=t[te];if(e)return e;for(var n=t.parentNode;n;){if(e=n[za]||n[te]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=u1(t);t!==null;){if(n=t[te])return n;t=u1(t)}return e}t=n,n=t.parentNode}return null}function La(t){if(t=t[te]||t[za]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function jl(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(f(33))}function Ga(t){var e=t[Yr];return e||(e=t[Yr]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Wt(t){t[Ml]=!0}var Lr=new Set,Gr={};function da(t,e){Xa(t,e),Xa(t+"Capture",e)}function Xa(t,e){for(Gr[t]=e,t=0;t<e.length;t++)Lr.add(e[t])}var Tm=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u21Line truncated
`).replace(eA,"")}function Wd(t,e){return e=Fd(e),Fd(t)===e}function Dt(t,e,n,a,i,s){switch(n){case"children":typeof a=="string"?e==="body"||e==="textarea"&&a===""||Za(t,a):(typeof a=="number"||typeof a=="bigint")&&e!=="body"&&Za(t,""+a);break;case"className":Xi(t,"class",a);break;case"tabIndex":Xi(t,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Xi(t,n,a);break;case"style":Fr(t,a,s);break;case"data":if(e!=="object"){Xi(t,"data",a);break}case"src":case"href":if(a===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(n);break}a=Zi(""+a),t.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){t.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(n==="formAction"?(e!=="input"&&Dt(t,e,"name",i.name,i,null),Dt(t,e,"formEncType",i.formEncType,i,null),Dt(t,e,"formMethod",i.formMethod,i,null),Dt(t,e,"formTarget",i.formTarget,i,null)):(Dt(t,e,"encType",i.encType,i,null),Dt(t,e,"method",i.method,i,null),Dt(t,e,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(n);break}a=Zi(""+a),t.setAttribute(n,a);break;case"onClick":a!=null&&(t.onclick=tn);break;case"onScroll":a!=null&&yt("scroll",t);break;case"onScrollEnd":a!=null&&yt("scrollend",t);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(f(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(f(60));t.innerHTML=n}}break;case"multiple":t.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":t.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){t.removeAttribute("xlink:href");break}n=Zi(""+a),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(n,""+a):t.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":a===!0?t.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(n,a):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?t.setAttribute(n,a):t.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?t.removeAttribute(n):t.setAttribute(n,a);break;case"popover":yt("beforetoggle",t),yt("toggle",t),Gi(t,"popover",a);break;case"xlinkActuate":$e(t,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":$e(t,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":$e(t,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":$e(t,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":$e(t,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":$e(t,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":$e(t,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":$e(t,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":$e(t,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Gi(t,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Dm.get(n)||n,Gi(t,n,a))}}function df(t,e,n,a,i,s){switch(n){case"style":Fr(t,a,s);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(f(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(f(60));t.innerHTML=n}}break;case"children":typeof a=="string"?Za(t,a):(typeof a=="number"||typeof a=="bigint")&&Za(t,""+a);break;case"onScroll":a!=null&&yt("scroll",t);break;case"onScrollEnd":a!=null&&yt("scrollend",t);break;case"onClick":a!=null&&(t.onclick=tn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inneLine truncated
linear-gradient(-45deg, #80808020 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #80808020 75%),
linear-gradient(-45deg, transparent 75%, #80808020 75%)`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px",boxShadow:`rgb(0 0 0 / 10%) 0px 1.8px 1.9px,
rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
rgb(0 0 0 / 10%) 0px -2px 4px,
rgb(0 0 0 / 15%) 0px -6.1px 12px,
rgb(0 0 0 / 25%) 0px 6px 12px`},um=({diff:l,noTargetBlank:u,hideDetails:c})=>{const[f,r]=ct.useState(l.diff?"diff":"actual"),[o,h]=ct.useState(!1),[v,y]=ct.useState(null),[A,E]=ct.useState("Expected"),[S,O]=ct.useState(null),[X,B]=ct.useState(null),[b,p]=Wh();ct.useEffect(()=>{(async()=>{var K,J,k,nt;y(await kf((K=l.expected)==null?void 0:K.attachment.path)),E(((J=l.expected)==null?void 0:J.title)||"Expected"),O(await kf((k=l.actual)==null?void 0:k.attachment.path)),B(await kf((nt=l.diff)==null?void 0:nt.attachment.path))})()},[l]);const x=v&&S&&X,R=x?Math.max(v.naturalWidth,S.naturalWidth,200):500,U=x?Math.max(v.naturalHeight,S.naturalHeight,200):500,Z=Math.min(1,(b.width-30)/R),F=Math.min(1,(b.width-50)/R/2),j=R*Z,D=U*Z,N={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return m.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:p,children:x&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[l.diff&&m.jsx("div",{style:{...N,fontWeight:f==="diff"?600:"initial"},onClick:()=>r("diff"),children:"Diff"}),m.jsx("div",{style:{...N,fontWeight:f==="actual"?600:"initial"},onClick:()=>r("actual"),children:"Actual"}),m.jsx("div",{style:{...N,fontWeight:f==="expected"?600:"initial"},onClick:()=>r("expected"),children:A}),m.jsx("div",{style:{...N,fontWeight:f==="sxs"?600:"initial"},onClick:()=>r("sxs"),children:"Side by side"}),m.jsx("div",{style:{...N,fontWeight:f==="slider"?600:"initial"},onClick:()=>r("slider"),children:"Slider"})]}),m.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:D+60},children:[l.diff&&f==="diff"&&m.jsx(En,{image:X,alt:"Diff",hideSize:c,canvasWidth:j,canvasHeight:D,scale:Z}),l.diff&&f==="actual"&&m.jsx(En,{image:S,alt:"Actual",hideSize:c,canvasWidth:j,canvasHeight:D,scale:Z}),l.diff&&f==="expected"&&m.jsx(En,{image:v,alt:A,hideSize:c,canvasWidth:j,canvasHeight:D,scale:Z}),l.diff&&f==="slider"&&m.jsx(Dv,{expectedImage:v,actualImage:S,hideSize:c,canvasWidth:j,canvasHeight:D,scale:Z,expectedTitle:A}),l.diff&&f==="sxs"&&m.jsxs("div",{style:{display:"flex"},children:[m.jsx(En,{image:v,title:A,hideSize:c,canvasWidth:F*R,canvasHeight:F*U,scale:F}),m.jsx(En,{image:o?X:S,title:o?"Diff":"Actual",onClick:()=>h(!o),hideSize:c,canvasWidth:F*R,canvasHeight:F*U,scale:F})]}),!l.diff&&f==="actual"&&m.jsx(En,{image:S,title:"Actual",hideSize:c,canvasWidth:j,canvasHeight:D,scale:Z}),!l.diff&&f==="expected"&&m.jsx(En,{image:v,title:A,hideSize:c,canvasWidth:j,canvasHeight:D,scale:Z}),!l.diff&&f==="sxs"&&m.jsxs("div",{style:{display:"flex"},children:[m.jsx(En,{image:v,title:A,canvasWidth:F*R,canvasHeight:F*U,scale:F}),m.jsx(En,{image:S,title:"Actual",canvasWidth:F*R,canvasHeight:F*U,scale:F})]})]}),!c&&m.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[m.jsx("div",{children:l.diff&&m.jsx("a",{target:"_blank",href:l.diff.attachment.path,rel:"noreferrer",children:l.diff.attachment.name})}),m.jsx("div",{children:m.jsx("a",{target:u?"":"_blank",href:l.actual.attachment.path,rel:"noreferrer",children:l.actual.attachment.name})}),m.jsx("div",{children:m.jsx("a",{target:u?"":"_blank",href:l.expected.attachment.path,rel:"noreferrer",children:l.expected.attachment.name})})]})]})})},Dv=({expectedImage:l,actualImage:u,canvasWidth:c,canvasHeight:f,scale:r,expectedTitle:o,hideSize:h})=>{const v={position:"absolute",top:0,left:0},[y,A]=ct.useState(c/2),E=l.naturalWidth===u.naturalWidth&&l.naturalHeight===u.naturalHeight;return m.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!h&&m.jsxs("div",{style:{margin:5},children:[!E&&m.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),m.jsx("span",{children:l.naturalWidth}),m.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),m.jsx("span",{children:l.naturalHeight}),!E&&m.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!E&&m.jsx("span",{children:u.naturalWidth}),!E&&m.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!E&&m.jsx("span",{children:u.naturalHeight})]}),m.jsxs("div",{style:{position:"relative",width:c,height:f,margin:15,...fr},children:[m.jsx(Rv,{orientation:"horizontal",offsets:[y],setOffsets:S=>A(S[0]),resizerColor:"#57606a80",resizerWidth:6}),m.jsx("img",{alt:o,style:{width:l.naturalWidth*r,height:l.naturalHeight*r},draggable:"false",src:l.src}),m.jsx("div",{style:{...v,bottom:0,overflow:"hidden",width:y,...fr},children:m.jsx("img",{alt:"Actual",style:{width:u.naturalWidth*r,height:u.naturalHeight*r},draggable:"false",src:u.src})})]})]})},En=({image:l,title:u,alt:c,hideSize:f,canvasWidth:r,canvasHeight:o,scale:h,onClick:v})=>m.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!f&&m.jsxs("div",{style:{margin:5},childrenLine truncated
# Instructions
- Following Playwright test failed.
- Explain why, be concise, respect Playwright best practices.
- Provide a snippet of code with the fix, if possible.
`.trimStart();async function zv({testInfo:l,metadata:u,errorContext:c,errors:f,buildCodeFrame:r,stdout:o,stderr:h}){var S;const v=new Set(f.filter(O=>O.message&&!O.message.includes(`
`)).map(O=>O.message));for(const O of f)for(const X of v.keys())(S=O.message)!=null&&S.includes(X)&&v.delete(X);const y=f.filter(O=>!(!O.message||!O.message.includes(`
`)&&!v.has(O.message)));if(!y.length)return;const A=[Qv,"# Test info","",l];o&&A.push("","# Stdout","","```",Jf(o),"```"),h&&A.push("","# Stderr","","```",Jf(h),"```"),A.push("","# Error details");for(const O of y)A.push("","```",Jf(O.message||""),"```");c&&A.push(c);const E=await r(y[y.length-1]);return E&&A.push("","# Test source","","```ts",E,"```"),u!=null&&u.gitDiff&&A.push("","# Local changes","","```diff",u.gitDiff,"```"),A.join(`
`)}const Yv=new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))","g");function Jf(l){return l.replace(Yv,"")}function Lv(l,u){var f;const c=new Map;for(const r of l){const o=r.name.match(/^(.*)-(expected|actual|diff|previous)(\.[^.]+)?$/);if(!o)continue;const[,h,v,y=""]=o,A=h+y;let E=c.get(A);E||(E={name:A,anchors:[`attachment-${h}`]},c.set(A,E)),E.anchors.push(`attachment-${u.attachments.indexOf(r)}`),v==="actual"&&(E.actual={attachment:r}),v==="expected"&&(E.expected={attachment:r,title:"Expected"}),v==="previous"&&(E.expected={attachment:r,title:"Previous"}),v==="diff"&&(E.diff={attachment:r})}for(const[r,o]of c)!o.actual||!o.expected?c.delete(r):(l.delete(o.actual.attachment),l.delete(o.expected.attachment),l.delete((f=o.diff)==null?void 0:f.attachment));return[...c.values()]}const Gv=({test:l,result:u,testRunMetadata:c,options:f})=>{const{screenshots:r,videos:o,traces:h,otherAttachments:v,diffs:y,errors:A,otherAttachmentAnchors:E,screenshotAnchors:S,errorContext:O}=ct.useMemo(()=>{const B=u.attachments.filter(N=>!N.name.startsWith("_")),b=new Set(B.filter(N=>N.contentType.startsWith("image/"))),p=[...b].map(N=>`attachment-${B.indexOf(N)}`),x=B.filter(N=>N.contentType.startsWith("video/")),R=B.filter(N=>N.name==="trace"),U=B.find(N=>N.name==="error-context"),Z=new Set(B);[...b,...x,...R].forEach(N=>Z.delete(N));const F=[...Z].map(N=>`attachment-${B.indexOf(N)}`),j=Lv(b,u),D=u.errors.map(N=>N.message);return{screenshots:[...b],videos:x,traces:R,otherAttachments:Z,diffs:j,errors:D,otherAttachmentAnchors:F,screenshotAnchors:p,errorContext:U}},[u]),X=P5(async()=>{if(f!=null&&f.noCopyPrompt)return;const B=u.attachments.find(R=>R.name==="stdout"),b=u.attachments.find(R=>R.name==="stderr"),p=B!=null&&B.body&&B.contentType==="text/plain"?B.body:void 0,x=b!=null&&b.body&&b.contentType==="text/plain"?b.body:void 0;return await zv({testInfo:[`- Name: ${l.path.join(" >> ")} >> ${l.title}`,`- Location: ${l.location.file}:${l.location.line}:${l.location.column}`].join(`
`),metadata:c,errorContext:O!=null&&O.path?await fetch(O.path).then(R=>R.text()):O==null?void 0:O.body,errors:u.errors,buildCodeFrame:async R=>R.codeframe,stdout:p,stderr:x})},[l,O,c,u],void 0);return m.jsxs("div",{className:"test-result",children:[!!A.length&&m.jsxs(ke,{header:"Errors",children:[X&&m.jsx("div",{style:{position:"absolute",right:"16px",padding:"10px",zIndex:1},children:m.jsx(Nv,{prompt:X})}),A.map((B,b)=>{const p=Xv(B,y);return m.jsxs(m.Fragment,{children:[m.jsx(wr,{code:B},"test-result-error-message-"+b),p&&m.jsx(Bv,{diff:p})]})})]}),!!u.steps.length&&m.jsx(ke,{header:"Test Steps",children:u.steps.map((B,b)=>m.jsx(cm,{step:B,result:u,test:l,depth:0},`step-${b}`))}),y.map((B,b)=>m.jsx(Si,{id:B.anchors,children:m.jsx(ke,{dataTestId:"test-results-image-diff",header:`Image mismatch: ${B.name}`,revealOnAnchorId:B.anchors,children:m.jsx(um,{diff:B})})},`diff-${b}`)),!!r.length&&m.jsx(ke,{header:"Screenshots",revealOnAnchorId:S,children:r.map((B,b)=>m.jsxs(Si,{id:`attachment-${u.attachments.indexOf(B)}`,children:[m.jsx("a",{href:Ve(B.path),children:m.jsx("img",{className:"screenshot",src:Ve(B.path)})}),m.jsx(nc,{attachment:B,result:u})]},`screenshot-${b}`))}),!!h.length&&m.jsx(Si,{id:"attachment-trace",children:m.jsx(ke,{header:"Traces",revealOnAnchorId:"attachment-trace",children:m.jsxs("div",{children:[m.jsx("a",{href:Ve(nm(h)),children:m.jsx("img",{className:"screenshot",src:Cv,style:{width:192,height:117,marginLeft:20}})}),h.map((B,b)=>m.jsx(nc,{attachment:B,result:u,linkName:h.length===1?"trace":`trace-${b+1}`},`trace-${b}`))]})})}),!!o.length&&m.jsx(Si,{id:"attachment-video",children:m.jsx(ke,{header:"Videos",revealOnAnchorId:"attachment-video",children:o.map(B=>m.jsxs("div",{children:[m.jsx("video",{controls:!0,children:m.jsx("source",{src:Ve(B.path),type:B.contentType})}),m.jsx(nc,{attachment:B,result:u})]},B.path))})}),!!v.size&&m.jsx(ke,{header:"Attachments",revealOnAnchorId:E,dataTestId:"attachments",children:[...v].map((B,b)=>m.jsx(Si,{id:`attachment-${u.attachments.indexOf(B)}`,children:m.jsx(nc,{attachment:B,result:u,openInNewTab:B.contentType.startsWith("text/html")})},`attachment-link-${b}`))})]})};function Xv(l,u){const c=l.split(`
`)[0];if(!(!c.includes("toHaveScreenshot")&&!c.includes("toMatchSnapshot")))return u.find(f=>l.includes(f.name))}const cm=({test:l,step:u,result:c,depth:f})=>{const r=se();return m.jsx(Tv,{title:m.jsxs("div",{"aria-label":u.title,className:"step-title-container",children:[hc(u.error||u.duration===-1?"failed":u.skipped?"skipped":"passed"),m.jsxs("span",{className:"step-title-text",children:[m.jsx("span",{children:u.title}),u.count>1&&m.jsxs(m.Fragment,{children:[" ✕ ",m.jsx("span",{className:"test-result-counter",children:u.count})]}),u.location&&m.jsxs("span",{className:"test-result-path",children:["— ",u.location.file,":",u.location.line]})]}),m.jsx("span",{className:"step-spacer"}),u.attachments.length>0&&m.jsx("a",{className:"step-attachment-link",title:"reveal attachment",href:Ve(Cn({test:l,result:c,anchor:`attachment-${u.attachments[0]}`},r)),onClick:o=>{o.stopPropagation()},children:Ih()}),m.jsx("span",{className:"step-duration",children:Ol(u.duration)})]}),loadChildren:u.steps.length||u.snippet?()=>{const o=u.snippet?[m.jsx(wr,{testId:"test-snippet",code:u.snippet},"line")]:[],h=u.steps.map((v,y)=>m.jsx(cm,{step:v,depth:f+1,result:c,test:l},y));return o.concat(h)}:void 0,depth:f})},Vv=({projectNames:l,test:u,testRunMetadata:c,run:f,next:r,prev:o,options:h})=>{const[v,y]=ct.useState(f),A=se(),E=u.annotations.filter(S=>!S.type.startsWith("_"))??[];return m.jsxs(m.Fragment,{children:[m.jsx(Or,{title:u.title,leftSuperHeader:m.jsx("div",{className:"test-case-path",children:u.path.join(" › ")}),rightSuperHeader:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:Ze(!o&&"hidden"),children:m.jsx(Tn,{href:Cn({test:o},A),children:"« previous"})}),m.jsx("div",{style:{width:10}}),m.jsx("div",{className:Ze(!r&&"hidden"),children:m.jsx(Tn,{href:Cn({test:r},A),children:"next »"})})]})}),m.jsxs("div",{className:"hbox",style:{lineHeight:"24px"},children:[m.jsx("div",{className:"test-case-location",children:m.jsxs(Sr,{value:`${u.location.file}:${u.location.line}`,children:[u.location.file,":",u.location.line]})}),m.jsx("div",{style:{flex:"auto"}}),m.jsx(tm,{test:u,trailingSeparator:!0}),m.jsx("div",{className:"test-case-duration",children:Ol(u.duration)})]}),m.jsx($h,{style:{marginLeft:"6px"},projectNames:l,activeProjectName:u.projectName,otherLabels:u.tags}),u.results.length===0&&E.length!==0&&m.jsx(ke,{header:"Annotations",dataTestId:"test-case-annotations",children:E.map((S,O)=>m.jsx(z2,{annotation:S},O))}),m.jsx(Sv,{tabs:u.results.map((S,O)=>({id:String(O),title:m.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[hc(S.status)," ",Zv(O),u.results.length>1&&m.jsx("span",{className:"test-case-run-duration",children:Ol(S.duration)})]}),render:()=>{const X=S.annotations.filter(B=>!B.type.startsWith("_"));return m.jsxs(m.Fragment,{children:[!!X.length&&m.jsx(ke,{header:"Annotations",dataTestId:"test-case-annotations",children:X.map((B,b)=>m.jsx(z2,{annotation:B},b))}),m.jsx(Gv,{test:u,result:S,testRunMetadata:c,options:h})]})}}))||[],selectedTab:String(v),setSelectedTab:S=>y(+S)})]})};function z2({annotation:{type:l,description:u}}){return m.jsxs("div",{className:"test-case-annotation",children:[m.jsx("span",{style:{fontWeight:"bold"},children:l}),u&&m.jsxs(Sr,{value:u,children:[": ",Di(u)]})]})}function Zv(l){return l?`Retry #${l}`:"Run"}const sm=({file:l,projectNames:u,isFileExpanded:c,setFileExpanded:f,footer:r})=>{const o=se();return m.jsx(im,{expanded:c?c(l.fileId):void 0,noInsets:!0,setExpanded:f?(h=>f(l.fileId,h)):void 0,header:m.jsx("span",{className:"chip-header-allow-selection",children:l.fileName}),footer:r,children:l.tests.map(h=>m.jsxs("div",{className:Ze("test-file-test","test-file-test-outcome-"+h.outcome),children:[m.jsxs("div",{className:"hbox",style:{alignItems:"flex-start"},children:[m.jsxs("div",{className:"hbox",children:[m.jsx("span",{className:"test-file-test-status-icon",children:hc(h.outcome)}),m.jsxs("span",{children:[m.jsx(Tn,{href:Cn({test:h},o),title:[...h.path,h.title].join(" › "),children:m.jsx("span",{className:"test-file-title",children:[...h.path,h.title].join(" › ")})}),m.jsx($h,{style:{marginLeft:"6px"},projectNames:u,activeProjectName:h.projectName,otherLabels:h.tags})]})]}),m.jsx("span",{"data-testid":"test-duration",style:{minWidth:"50px",textAlign:"right"},children:Ol(h.duration)})]}),m.jsx("div",{className:"test-file-details-row",children:m.jsxs("div",{className:"test-file-details-row-items",children:[m.jsx(Tn,{href:Cn({test:h},o),title:[...h.path,h.title].join(" › "),className:"test-file-path-link",children:m.jsxs("span",{className:"test-file-path",children:[h.location.file,":",h.location.line]})}),m.jsx(qv,{test:h}),m.jsx(Iv,{test:h}),m.jsx(tm,{test:h,dim:!0})]})})]},`test-${h.testId}`))})};function qv({test:l}){const u=se();for(const c of l.results)for(const f of c.attachments)if(f.contentType.startsWith("image/")&&f.name.match(/-(expected|actual|diff)/))return m.jsx(Tr,{href:Cn({test:l,result:c,anchor:`attachment-${c.attachments.indexOf(f)}`},u),Line truncated
</script>
<style type='text/css'>:root{--color-canvas-default-transparent: rgba(255,255,255,0);--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #24292f;--color-diff-blob-addition-fg: #24292f;--color-diff-blob-addition-num-bg: #CCFFD8;--color-diff-blob-addition-line-bg: #E6FFEC;--color-diff-blob-addition-word-bg: #ABF2BC;--color-diff-blob-deletion-num-text: #24292f;--color-diff-blob-deletion-fg: #24292f;--color-diff-blob-deletion-num-bg: #FFD7D5;--color-diff-blob-deletion-line-bg: #FFEBE9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #57606a;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(27,31,36,.15);--color-diffstat-addition-border: rgba(27,31,36,.15);--color-diffstat-addition-bg: #2da44e;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #8250df;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #FFEBE9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #24292f;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #57606a;--color-codemirror-cursor: #24292f;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #24292f;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #2da44e;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(27,31,36,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(1Line truncated
</style>
</head>
<body>
<div id='root'></div>
</body>
</html>
<script id="playwrightReportBase64" type="application/zip">data:application/zip;base64,UEsDBBQAAAgIAJiITVxOYY8vBw4AAA4LAQAZAAAAOTFiNTViY2IxMzViNWYxMmViN2UuanNvbu2dbW/jNhKA/wqhL3GAxBapVxrY3rWL9lrgrgXaxRW4dQ/QCx3r1pYMWU42SPPfj6Sk2KZkS7ZlO0knC6wdSxoNZ4bDsfiEfNLG0ZT9FGpDjWLfsvzAx4blW2NMmO8w7UYe/9mbMX4Gf5uxNIrvboMkztjX7HbG4mV/MWdBP1vwczO24K/Dz0/y3VaptxS7lm/gcBy4QUAY00PsicujbCrus5gky2mI+MsDKu6ExJ1QEqM0uptkt8E0Cr6IX4NkupzFaMK8kKVcxDxN/seCrFA4mKTJLFrO+IFpEnhZlMTa8Ek2qU1zplHMz8PGjZbfRhsazzdauEwLSZZhmjeaF8dJJj8RTf+DN8O7K94lyyxIpCbLmH3lcjMWCiW9bMJP0P6RRmH4iH4o9UC36GPR3H9xTTQuIWWL5bSwqXrjReal2adIyic6sW91couNT9ga6ubQJH3Xsf+jCRFZ+qgNdXEBmxfuKSz9HRsnKUM/JskX0eBmiVRIXFeEkDq5vpT7vRdM0ITL7lL0D9HXbMl1Hml+mjwsWDrS2oh37U3xZq3wf3rLmOtcSG4l192Ua9CVXO4/L8u4EXhcZcUHQbKMMx5U/Kwv0XzO42E49qYL9rzXyTd19iiiuJU9KFHNXWeOjynzMlb2wTZiDV0x88WsMffuWDtTGJaiM95hCyG2lVDnwnHxs3cf3QmNs4RbY/A3kXQ+DBZZkj4OeFKaJ7GQd3snc9Dt7UOUTW5lEnxJi+2s55LNhhLc4PPDM7G9SsTYft5uBv57LH7nxzSEkIX+ROJnMEDrRskmDP3OW/2J32+VgqWBRjE/3S4u8x68KJN+798lWdKTB/lPfnTt57/yiPNy4OoQo19p6078Xdyap1K0YFM+evA30npJ2rv6nCZT9mHERxt/ygP9j6vrRm8ZfUzVbq/r+FTuwrriL5amScqvFwryofF78eswt6yw8Q9J+lvRzCEqzkFcQX22QOxrwFjIwv4o/uhNp9wMd8NRPFpy9f3PZIb40ClECA+Od1tJuN5n6D5aROKjQgKZjWKtdUTRVUS9eEiEUzGgy5uJ+0wTL5RBgfVqMClNrtH1Bj2hLLfDUBoCPV83RB/G8sjztVabOA53prnypfueXGlwe4litR+yRZBGPutdNZRl3C29a/ThG/QkLW5Kg0sRq6qn5y0e4wD1nqRJuDtW56/7LvfZ/vmp3rlv1yfrKe/bMW9py4rU7RMdbyY0x9ldNLYsC4RkZWDTDxzAj6zVajRx6guUabJoX6txsY5iOnKOCuVQ0/2epF94XHycMi9ezls1T6nMsd3V1wkhXBlHm4qezownO3nehBlbLEQ1+mp7vPjH85pb5Ld87Npv7Pym+6GzfuR8GTjlLwT9KV+Nl+Teuzr0qQTXZctosGZt3rwMDSbJjA0mLIrz/0J2P/gl9eK7ZbocyGcrA0bYYPeIzcsuHuorN8i0G7Jxmj8SETUCb1TEa9E040bKH0vcyDaiZzROkxm6+vt86j0+yEbJ+15J0xVGOf+QeYoC/tgyvYPIPktViI7LDUjpGS9d49R9Q9zBXBn0100hI563Ux6w4jnfSCuE5ReVwcLV4CeMxWnirB/lKehDboFKOsu1KuSIrNaXV/aKRm+GkiK0L9XiLfCXWZbEQ3Qlm3z1YjKnNJm7atDHCeNNicab5ooyxu3v8ZzvFc2hG3fOe2tvsw3i8g+/8e58dX3dz5Lv2L/zVNxbixOyFidEbynzlzmLiz69UGUXojZig5SxQbbFxkj7lS1YhoS28gkDSuZiAEUPE/YSGtECLfhxFu6MDmKewNHEKltgr7lKRh3vuEIr2aNzIfmJTovQKIS7pXA1U3holojxP/+qn4n8tpyH/CXPt9vTRNFxe1jX83sYuEzSpL7z8GYkc2nrVdjlFxjHxLhhlve1amK86vY8xBf5JXbLeNwQ0jLYDWc9Qo3SBQZtiNA87JUAzdO/CFAvyKJ7tjNATf0EAWqW/jX39a95lH/N0r+mpXaMkbaeJ0ZaflrN4LsruWx0FLNMmKZbM6QWTpgn8+Sev/IGr+VLs22+zO88XNmhZTxZeqGbhVe6/cZEHy4Uu/emy7zjWmQjAsR9f4rnfJxVfR+JTz/zoitgk2TK3cHj4Pv4RVi/35eRkAvd9OOLUB4m02nv6ltuR1aeWjrNqjjt2/l8+lg4Oz9ll8OKoJh4C1kG9UaavH6kXSues0rPWXWeW3NZIL6s5mfSxuxGyuxml8a3cX30e3deFG/vAzY5pg/YRnl3c0eOe0kc6ynOtvZKcbmMlhFp2+sZzi49YLvVDCetUvYfL2bTPK2pPVgkOGmLhiHYpifIcE7pY2eLj7d61znKu07pXcdsleEc64gM59jlzZyaUFIyXBFISHwN4a1OUx47SD6/yEW4J055Di2UdfUaZbkvUnETFKbJPEweYq5BxL+q5lfglrr9UkjhduKfbYubmZ/4yVcZM7XlqFsWoK5Ro6nMsrz1jPeEdR3NZh1bJuhancqS0rVrdMrzsBeH8slWWgTnItcvv8xpVm9Xfq7VqUXIVGVKDbfLpOtpiJa9mOJqGirimxe4XqWu4npHDWmHkhOkHVp2f7rlW+fWtEOtY9IOLTMBdVqlHeoekXZo0ZP514XGwio/r23/PTC3YL180qav9VhRTq0XU/kUtqxscitgffPLXyeVFdY3HbmjssK6Xart1BgyZH6yjAOGeoZ4nlJcUuM4pc4xLL04t/QT1tWgWC/c5DSQ+Lq4XIiJPC+aSryoAiRtPmB+0uL8UaB8lHy7mjCQ7+Ls0+NcHBUfDmZe+kXk9BdoSROddmCbztj0dN1ybNexXMMzqGcYlukRajq64xs+df1xaPRnIddRaJl8WX+mvxMO0ymlFjap6wlELPDZ2DW2wGH7PU44DR5GduBhOrkQHqaTFugSdTvGw6iu0D8WcWun4/bHw6g6z8dFdzafI8Qrk0Vmrd5742EUqzyUdY55ouPxMEvB5fAuJmoPPsxSsCh86KzqOQExW2W5zB3GaAuI2So4eJbp13MDYkZf1w3F5W5DSwEQuyAg5joVQKyhiwIgBoAYAGIAiL1OQKyS0JyGsrE1IIZV9P9igFhFE6e2mt8bELPMC8D85wPE7Eph0iEgVhHunMl4AIgBIAaAGABiAIgBIAaAWNeOBkAMADEAxAAQA0AMADEAxAAQA0AMASAGgBgAYgCIASAGgNhZADHTYdgLXNeihk2oQQLXIg2AWKsva6fhw8TCP9v4MPEn6Rfhw/K/hW/iw3DXy4dRZVKkVKSD5cPaij5w+bDKujndLB9WJeYaVuN5NXzYjumto/gwZcoRX46Xa8+HqQtpGLsWU2vLhznmX4UPU5FAau9uKfBhl+PDiG5X+DAD+DDgw4APAz7sLfJhRFcqO5vuLhvbLyCG8Svhwyqa2EZtgbL3AmKXWOz1vSwgpgo/S6ELfBjwYcCHAR8GfBjwYcCHAR8GfBjwYcCHAR8GfBjwYcCHAR8GfBjwYcCHAR8GfBjwYW+WD/NdnY3HAR2HAWWe4VqW4Vf5sP1LmdPwYba7nQ8jl+LDSBs+LN/5rUs+zDUrEFftTNUBfJhrVUR3ub0kVafCatfL2n97Saps/fNWtpc0dnBcR+0vqbgRN8Anr4IPM5UpZqN+eY79+DBLiTjybjeYVBva5HPgwy65wWSVD4MNJoEPAz4M+LA3yYdhqoA6dlcbTFYkX279sEobu+HD1MVe3xkfZqu1aAM5uN/6Yapw90zGAz4M+DDgw4APAz4M+DDgw7p2NPBhwIcBHwZ8GPBhwIcBHwZ8GPBhCPgw4MOADwM+DPgw4MPOwocRk45907QsY+zrjNqWoVtVPqw5h5yGB6P4ra4Xlk9ZdMmD2SpMYOhd8WDqnn7lnpkd8WCOym3Vbhm4Pw928VWhDuTB1EWearfa2R8HU7fXfAurhWGrDSq4Jw2G1S0q3ysNZilT1URvaCnQYBekwSorxFB6MncBDQY02Kt3JdBgr8AnR9BgakKzawfvQ2gwVfLlaDBVE6t+u+t9aTCs/knAWbb+Ph8OZmCVU+8QBzMI4GCAgwEOBjjY4ZENOBjgYICDAQ4GOBjgYICDAQ4GOBjgYICDAQ4GOBjgYICDAQ4GOBjgYH9BHMw3nLFBTMsLXS+g/CPTo1UcLJDpsoiSoopRCrBTrxSGib0dDRMUyUXQsBxfaaKt3K7RsMoklUFq5R6AhrUVfSgapvA/Ri3SdgAapiJAb2QrSZXh6mqpMKxOmV0OlWsPhxGFeDR37avZFg4jCjNlnhuTOxcc5tjqFOzJ1p4COOxoOMxV99SFpcIADgM4DOCwtwqHqYvA2rWU+0FLhb2WrSQrmnS1VJi6hfb7YsNUar3TpcIsZRxd36cS2DBgw4ANAzYM2DBgw4ANAzYM2DBgw4ANAzYM2DBgw4ANAzYMARsGbBiwYcCGARsGbBiwYSobZofEwHpgmeOx5dvUDh3Dq7JhE+/+5ZlzGSy5KVDEG3IiGsyyttNgYoe5i9Bg+dZ2TXsx6p1vHElUZAvXgjOHbBzZUvSBNJir7pFTuwrZ/jSYCleYZ1ltoYONI1UarH7xif03jlRpsMvRce1pMFNd7c3eYYy2NJip8ofvlQZTd5MlTSuOAA12yY0j1QUZgQYDGgxoMKDB3iwNplRgdgPz05oGI7oCSx1ayhxNg/HP2iyHtj8Nphav74sGsytrmHZIg6nC8VlWggUaDGgwoMGABgMaDGgwoMGABgMaDGgwoMGABgMaDGgwoMGABgMaDGgwoMGABgMaDGiw10qD/fH8f1BLAwQUAAAICACYiE1cM7whfOECAACyDgAACwAAAHJlcG9ydC5qLine truncated
+23
View File
@@ -0,0 +1,23 @@
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
forbidOnly: !!process.env.CI,
fullyParallel: true,
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
reporter: 'html',
retries: process.env.CI ? 2 : 0,
testDir: './tests/e2e',
use: {
baseURL: 'http://localhost:6006',
trace: 'on-first-retry',
},
webServer: undefined,
workers: process.env.CI ? 1 : undefined,
});
+38
View File
@@ -75,6 +75,9 @@ importers:
'@microsoft/api-extractor':
specifier: ^7.56.3
version: 7.56.3(@types/node@25.2.3)
'@playwright/test':
specifier: ^1.58.2
version: 1.58.2
'@sentry/react':
specifier: ^10.38.0
version: 10.38.0(react@19.2.4)
@@ -817,6 +820,11 @@ packages:
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
engines: {node: '>= 8'}
'@playwright/test@1.58.2':
resolution: {integrity: sha512-akea+6bHYBBfA9uQqSYmlJXn61cTa+jbO87xVLCWbTqbWadRVmhxlXATaOjOgcBaWU4ePo0wB41KMFv3o35IXA==}
engines: {node: '>=18'}
hasBin: true
'@rolldown/pluginutils@1.0.0-rc.2':
resolution: {integrity: sha512-izyXV/v+cHiRfozX62W9htOAvwMo4/bXKDrQ+vom1L1qRuexPock/7VZDAhnpHCLNejd3NJ6hiab+tO0D44Rgw==}
@@ -2257,6 +2265,11 @@ packages:
fs.realpath@1.0.0:
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
fsevents@2.3.2:
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
os: [darwin]
fsevents@2.3.3:
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -3033,6 +3046,16 @@ packages:
pkg-types@2.3.0:
resolution: {integrity: sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==}
playwright-core@1.58.2:
resolution: {integrity: sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==}
engines: {node: '>=18'}
hasBin: true
playwright@1.58.2:
resolution: {integrity: sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==}
engines: {node: '>=18'}
hasBin: true
possible-typed-array-names@1.1.0:
resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==}
engines: {node: '>= 0.4'}
@@ -4745,6 +4768,10 @@ snapshots:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.19.1
'@playwright/test@1.58.2':
dependencies:
playwright: 1.58.2
'@rolldown/pluginutils@1.0.0-rc.2': {}
'@rollup/pluginutils@5.3.0(rollup@4.50.2)':
@@ -6425,6 +6452,9 @@ snapshots:
fs.realpath@1.0.0: {}
fsevents@2.3.2:
optional: true
fsevents@2.3.3:
optional: true
@@ -7177,6 +7207,14 @@ snapshots:
exsolve: 1.0.7
pathe: 2.0.3
playwright-core@1.58.2: {}
playwright@1.58.2:
dependencies:
playwright-core: 1.58.2
optionalDependencies:
fsevents: 2.3.2
possible-typed-array-names@1.1.0: {}
postcss-js@4.1.0(postcss@8.5.6):
+134 -5
View File
@@ -80,6 +80,71 @@ Griddy is a new data grid component in the Oranguru package (`@warkypublic/orang
Uses **Mantine** components (not raw HTML):
- `Checkbox` from `@mantine/core` for row/header checkboxes
- `TextInput` from `@mantine/core` for search input
- `Select`, `MultiSelect`, `NumberInput`, `Radio`, `Popover`, `Menu`, `ActionIcon` for filtering (Phase 5)
## Phase 5: Column Filtering UI (COMPLETE)
### User Interaction Pattern
1. **Filter Status Indicator**: Gray filter icon in each column header (disabled, non-clickable)
2. **Right-Click Context Menu**: Shows on header right-click with options:
- `Sort` — Toggle column sorting
- `Reset Sorting` — Clear sort (shown only if column is sorted)
- `Reset Filter` — Clear filters (shown only if column has active filter)
- `Open Filters` — Opens filter popover
3. **Filter Popover**: Opened from "Open Filters" menu item
- Positioned below header
- Contains filter operator dropdown and value input(s)
- Apply and Clear buttons
- Filter type determined by `column.filterConfig.type`
### Filter Types & Operators
| Type | Operators | Input Component |
|------|-----------|-----------------|
| `text` | contains, equals, startsWith, endsWith, notContains, isEmpty, isNotEmpty | TextInput with debounce |
| `number` | equals, notEquals, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, between | NumberInput (single or dual for between) |
| `enum` | includes, excludes, isEmpty | MultiSelect with custom options |
| `boolean` | isTrue, isFalse, isEmpty | Radio.Group (True/False/All) |
### API
```typescript
interface FilterConfig {
type: 'text' | 'number' | 'boolean' | 'enum'
operators?: FilterOperator[] // custom operators (optional)
enumOptions?: Array<{ label: string; value: any }> // for enum type
}
// Usage in column definition:
{
id: 'firstName',
accessor: 'firstName',
header: 'First Name',
filterable: true,
filterConfig: { type: 'text' }
}
```
### Key Implementation Details
- **Default filterFn**: Automatically assigned when `filterable: true` and no custom `filterFn` provided
- **Operator-based filtering**: Uses `createOperatorFilter()` that delegates to type-specific implementations
- **Debouncing**: Text inputs debounced 300ms to reduce re-renders
- **TanStack Integration**: Uses `column.setFilterValue()` and `column.getFilterValue()`
- **AND Logic**: Multiple column filters applied together (AND by default)
- **Controlled State**: Filter state managed by parent via `columnFilters` prop and `onColumnFiltersChange` callback
### Files Structure (Phase 5)
```
src/Griddy/features/filtering/
├── types.ts # FilterOperator, FilterConfig, FilterValue
├── operators.ts # TEXT_OPERATORS, NUMBER_OPERATORS, etc.
├── filterFunctions.ts # TanStack FilterFn implementations
├── FilterInput.tsx # Text/number input with debounce
├── FilterSelect.tsx # Multi-select for enums
├── FilterBoolean.tsx # Radio group for booleans
├── ColumnFilterButton.tsx # Status indicator icon
├── ColumnFilterPopover.tsx # Popover UI container
├── ColumnFilterContextMenu.tsx # Right-click context menu
└── index.ts # Public exports
```
## Implementation Status
- [x] Phase 1: Core foundation + TanStack Table
@@ -87,7 +152,14 @@ Uses **Mantine** components (not raw HTML):
- [x] Phase 3: Row selection (single + multi)
- [x] Phase 4: Search (Ctrl+F overlay)
- [x] Sorting (click header)
- [ ] Phase 5: Column filtering UI
- [x] Phase 5: Column filtering UI (COMPLETE ✅)
- Right-click context menu on headers
- Sort, Reset Sort, Reset Filter, Open Filters menu items
- Text, number, enum, boolean filtering
- Filter popover UI with operators
- 6 Storybook stories with examples
- 8 Playwright E2E test cases
- [ ] Phase 5.5: Date filtering (requires @mantine/dates)
- [ ] Phase 6: In-place editing
- [ ] Phase 7: Pagination + remote data adapters
- [ ] Phase 8: Grouping, pinning, column reorder, export
@@ -96,7 +168,64 @@ Uses **Mantine** components (not raw HTML):
## Dependencies Added
- `@tanstack/react-table` ^8.21.3 (in both dependencies and peerDependencies)
## Build
- `pnpm run typecheck` — clean
- `pnpm run build` — clean
- `pnpm run storybook` — stories render correctly
## Build & Testing Status
- [x] `pnpm run typecheck` — ✅ PASS (0 errors)
- [x] `pnpm run lint` — ✅ PASS (0 errors in Phase 5 code)
- [x] `pnpm run build` — ✅ PASS
- [x] `pnpm run storybook` — ✅ 6 Phase 5 stories working
- [x] Playwright test suite created (8 E2E test cases)
### Commands
```bash
# Run all checks
pnpm run typecheck && pnpm run lint && pnpm run build
# Start Storybook (see filtering stories)
pnpm run storybook
# Install and run Playwright tests
pnpm exec playwright install
pnpm exec playwright test
# Run specific test file
pnpm exec playwright test tests/e2e/filtering-context-menu.spec.ts
# Debug mode
pnpm exec playwright test --debug
# View HTML report
pnpm exec playwright show-report
```
## Next Phase (Phase 5.5 - Date Filtering)
**Planned Tasks**:
1. Install `@mantine/dates` dependency
2. Create `FilterDate.tsx` component with date range picker
3. Add date operators: after, before, between, exactDate
4. Integrate into ColumnFilterPopover
5. Add date filtering Storybook story
6. Add Playwright E2E tests for date filtering
**Estimated Effort**: 1-2 hours
## Resume Instructions (When Returning)
1. **Run full build check**:
```bash
pnpm run typecheck && pnpm run lint && pnpm run build
```
2. **Start Storybook to verify Phase 5**:
```bash
pnpm run storybook
# Open http://localhost:6006
# Check stories: WithTextFiltering, WithNumberFiltering, WithEnumFiltering, WithBooleanFiltering, WithAllFilterTypes, LargeDatasetWithFiltering
```
3. **Run Playwright tests** (requires Storybook running in another terminal):
```bash
pnpm exec playwright test
```
4. **Next task**: Begin Phase 5.5 (Date Filtering) with explicit user approval
+354 -1
View File
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import type { RowSelectionState } from '@tanstack/react-table'
import type { ColumnFiltersState, RowSelectionState } from '@tanstack/react-table'
import { Box } from '@mantine/core'
import { useState } from 'react'
@@ -227,3 +227,356 @@ export const KeyboardNavigation: Story = {
)
},
}
/** Text filtering with operators like contains, equals, starts with, etc. */
export const WithTextFiltering: Story = {
render: () => {
const [filters, setFilters] = useState<ColumnFiltersState>([])
const filterColumns: GriddyColumn<Person>[] = [
{ accessor: 'id', header: 'ID', id: 'id', sortable: true, width: 60 },
{
accessor: 'firstName',
filterable: true,
filterConfig: { type: 'text' },
header: 'First Name',
id: 'firstName',
sortable: true,
width: 120,
},
{
accessor: 'lastName',
filterable: true,
filterConfig: { type: 'text' },
header: 'Last Name',
id: 'lastName',
sortable: true,
width: 120,
},
{ accessor: 'email', header: 'Email', id: 'email', sortable: true, width: 240 },
{ accessor: 'age', header: 'Age', id: 'age', sortable: true, width: 70 },
{ accessor: 'department', header: 'Department', id: 'department', sortable: true, width: 130 },
{ accessor: (row) => `$${row.salary.toLocaleString()}`, header: 'Salary', id: 'salary', sortable: true, width: 110 },
{ accessor: 'startDate', header: 'Start Date', id: 'startDate', sortable: true, width: 120 },
{ accessor: (row) => row.active ? 'Yes' : 'No', header: 'Active', id: 'active', sortable: true, width: 80 },
]
return (
<Box h="100%" mih="500px" w="100%">
<Griddy<Person>
columnFilters={filters}
columns={filterColumns}
data={smallData}
getRowId={(row) => String(row.id)}
height={500}
onColumnFiltersChange={setFilters}
/>
<Box mt="sm" p="xs" style={{ background: '#f8f9fa', border: '1px solid #dee2e6', borderRadius: 4, fontFamily: 'monospace', fontSize: 12 }}>
<strong>Active Filters:</strong>
<pre style={{ margin: '4px 0' }}>{JSON.stringify(filters, null, 2)}</pre>
</Box>
</Box>
)
},
}
/** Number filtering with operators like equals, between, greater than, etc. */
export const WithNumberFiltering: Story = {
render: () => {
const [filters, setFilters] = useState<ColumnFiltersState>([])
const filterColumns: GriddyColumn<Person>[] = [
{ accessor: 'id', header: 'ID', id: 'id', sortable: true, width: 60 },
{ accessor: 'firstName', header: 'First Name', id: 'firstName', sortable: true, width: 120 },
{ accessor: 'lastName', header: 'Last Name', id: 'lastName', sortable: true, width: 120 },
{ accessor: 'email', header: 'Email', id: 'email', sortable: true, width: 240 },
{
accessor: 'age',
filterable: true,
filterConfig: { type: 'number' },
header: 'Age',
id: 'age',
sortable: true,
width: 70,
},
{ accessor: 'department', header: 'Department', id: 'department', sortable: true, width: 130 },
{
accessor: (row) => row.salary,
filterable: true,
filterConfig: { type: 'number' },
header: 'Salary',
id: 'salary',
sortable: true,
width: 110,
},
{ accessor: 'startDate', header: 'Start Date', id: 'startDate', sortable: true, width: 120 },
{ accessor: (row) => row.active ? 'Yes' : 'No', header: 'Active', id: 'active', sortable: true, width: 80 },
]
return (
<Box h="100%" mih="500px" w="100%">
<Griddy<Person>
columnFilters={filters}
columns={filterColumns}
data={smallData}
getRowId={(row) => String(row.id)}
height={500}
onColumnFiltersChange={setFilters}
/>
<Box mt="sm" p="xs" style={{ background: '#f8f9fa', border: '1px solid #dee2e6', borderRadius: 4, fontFamily: 'monospace', fontSize: 12 }}>
<strong>Active Filters:</strong>
<pre style={{ margin: '4px 0' }}>{JSON.stringify(filters, null, 2)}</pre>
</Box>
</Box>
)
},
}
/** Enum (multi-select) filtering with includes/excludes operators */
export const WithEnumFiltering: Story = {
render: () => {
const [filters, setFilters] = useState<ColumnFiltersState>([])
const filterColumns: GriddyColumn<Person>[] = [
{ accessor: 'id', header: 'ID', id: 'id', sortable: true, width: 60 },
{ accessor: 'firstName', header: 'First Name', id: 'firstName', sortable: true, width: 120 },
{ accessor: 'lastName', header: 'Last Name', id: 'lastName', sortable: true, width: 120 },
{ accessor: 'email', header: 'Email', id: 'email', sortable: true, width: 240 },
{ accessor: 'age', header: 'Age', id: 'age', sortable: true, width: 70 },
{
accessor: 'department',
filterable: true,
filterConfig: {
enumOptions: departments.map((dept) => ({ label: dept, value: dept })),
type: 'enum',
},
header: 'Department',
id: 'department',
sortable: true,
width: 130,
},
{ accessor: (row) => `$${row.salary.toLocaleString()}`, header: 'Salary', id: 'salary', sortable: true, width: 110 },
{ accessor: 'startDate', header: 'Start Date', id: 'startDate', sortable: true, width: 120 },
{ accessor: (row) => row.active ? 'Yes' : 'No', header: 'Active', id: 'active', sortable: true, width: 80 },
]
return (
<Box h="100%" mih="500px" w="100%">
<Griddy<Person>
columnFilters={filters}
columns={filterColumns}
data={smallData}
getRowId={(row) => String(row.id)}
height={500}
onColumnFiltersChange={setFilters}
/>
<Box mt="sm" p="xs" style={{ background: '#f8f9fa', border: '1px solid #dee2e6', borderRadius: 4, fontFamily: 'monospace', fontSize: 12 }}>
<strong>Active Filters:</strong>
<pre style={{ margin: '4px 0' }}>{JSON.stringify(filters, null, 2)}</pre>
</Box>
</Box>
)
},
}
/** Boolean filtering with true/false/all operators */
export const WithBooleanFiltering: Story = {
render: () => {
const [filters, setFilters] = useState<ColumnFiltersState>([])
const filterColumns: GriddyColumn<Person>[] = [
{ accessor: 'id', header: 'ID', id: 'id', sortable: true, width: 60 },
{ accessor: 'firstName', header: 'First Name', id: 'firstName', sortable: true, width: 120 },
{ accessor: 'lastName', header: 'Last Name', id: 'lastName', sortable: true, width: 120 },
{ accessor: 'email', header: 'Email', id: 'email', sortable: true, width: 240 },
{ accessor: 'age', header: 'Age', id: 'age', sortable: true, width: 70 },
{ accessor: 'department', header: 'Department', id: 'department', sortable: true, width: 130 },
{ accessor: (row) => `$${row.salary.toLocaleString()}`, header: 'Salary', id: 'salary', sortable: true, width: 110 },
{ accessor: 'startDate', header: 'Start Date', id: 'startDate', sortable: true, width: 120 },
{
accessor: 'active',
filterable: true,
filterConfig: { type: 'boolean' },
header: 'Active',
id: 'active',
sortable: true,
width: 80,
},
]
return (
<Box h="100%" mih="500px" w="100%">
<Griddy<Person>
columnFilters={filters}
columns={filterColumns}
data={smallData}
getRowId={(row) => String(row.id)}
height={500}
onColumnFiltersChange={setFilters}
/>
<Box mt="sm" p="xs" style={{ background: '#f8f9fa', border: '1px solid #dee2e6', borderRadius: 4, fontFamily: 'monospace', fontSize: 12 }}>
<strong>Active Filters:</strong>
<pre style={{ margin: '4px 0' }}>{JSON.stringify(filters, null, 2)}</pre>
</Box>
</Box>
)
},
}
/** Combined filtering - all filter types together */
export const WithAllFilterTypes: Story = {
render: () => {
const [filters, setFilters] = useState<ColumnFiltersState>([])
const filterColumns: GriddyColumn<Person>[] = [
{ accessor: 'id', header: 'ID', id: 'id', sortable: true, width: 60 },
{
accessor: 'firstName',
filterable: true,
filterConfig: { type: 'text' },
header: 'First Name',
id: 'firstName',
sortable: true,
width: 120,
},
{
accessor: 'lastName',
filterable: true,
filterConfig: { type: 'text' },
header: 'Last Name',
id: 'lastName',
sortable: true,
width: 120,
},
{ accessor: 'email', header: 'Email', id: 'email', sortable: true, width: 240 },
{
accessor: 'age',
filterable: true,
filterConfig: { type: 'number' },
header: 'Age',
id: 'age',
sortable: true,
width: 70,
},
{
accessor: 'department',
filterable: true,
filterConfig: {
enumOptions: departments.map((dept) => ({ label: dept, value: dept })),
type: 'enum',
},
header: 'Department',
id: 'department',
sortable: true,
width: 130,
},
{ accessor: (row) => `$${row.salary.toLocaleString()}`, header: 'Salary', id: 'salary', sortable: true, width: 110 },
{ accessor: 'startDate', header: 'Start Date', id: 'startDate', sortable: true, width: 120 },
{
accessor: 'active',
filterable: true,
filterConfig: { type: 'boolean' },
header: 'Active',
id: 'active',
sortable: true,
width: 80,
},
]
return (
<Box h="100%" mih="500px" w="100%">
<Griddy<Person>
columnFilters={filters}
columns={filterColumns}
data={smallData}
getRowId={(row) => String(row.id)}
height={500}
onColumnFiltersChange={setFilters}
/>
<Box mt="sm" p="xs" style={{ background: '#f8f9fa', border: '1px solid #dee2e6', borderRadius: 4, fontFamily: 'monospace', fontSize: 12 }}>
<strong>Active Filters (AND logic - all must match):</strong>
<pre style={{ margin: '4px 0' }}>{JSON.stringify(filters, null, 2)}</pre>
</Box>
</Box>
)
},
}
/** Large dataset with filtering and sorting */
export const LargeDatasetWithFiltering: Story = {
render: () => {
const [filters, setFilters] = useState<ColumnFiltersState>([])
const filterColumns: GriddyColumn<Person>[] = [
{ accessor: 'id', header: 'ID', id: 'id', sortable: true, width: 60 },
{
accessor: 'firstName',
filterable: true,
filterConfig: { type: 'text' },
header: 'First Name',
id: 'firstName',
sortable: true,
width: 120,
},
{
accessor: 'lastName',
filterable: true,
filterConfig: { type: 'text' },
header: 'Last Name',
id: 'lastName',
sortable: true,
width: 120,
},
{ accessor: 'email', header: 'Email', id: 'email', sortable: true, width: 240 },
{
accessor: 'age',
filterable: true,
filterConfig: { type: 'number' },
header: 'Age',
id: 'age',
sortable: true,
width: 70,
},
{
accessor: 'department',
filterable: true,
filterConfig: {
enumOptions: departments.map((dept) => ({ label: dept, value: dept })),
type: 'enum',
},
header: 'Department',
id: 'department',
sortable: true,
width: 130,
},
{ accessor: (row) => `$${row.salary.toLocaleString()}`, header: 'Salary', id: 'salary', sortable: true, width: 110 },
{ accessor: 'startDate', header: 'Start Date', id: 'startDate', sortable: true, width: 120 },
{
accessor: 'active',
filterable: true,
filterConfig: { type: 'boolean' },
header: 'Active',
id: 'active',
sortable: true,
width: 80,
},
]
return (
<Box h="100%" mih="600px" w="100%">
<Griddy<Person>
columnFilters={filters}
columns={filterColumns}
data={largeData}
getRowId={(row) => String(row.id)}
height={600}
onColumnFiltersChange={setFilters}
/>
<Box mt="sm" p="xs" style={{ background: '#f8f9fa', border: '1px solid #dee2e6', borderRadius: 4, fontFamily: 'monospace', fontSize: 12 }}>
<strong>Active Filters:</strong>
<pre style={{ margin: '4px 0' }}>{JSON.stringify(filters, null, 2)}</pre>
</Box>
</Box>
)
},
}
+15 -3
View File
@@ -2,6 +2,7 @@ import type { ColumnDef } from '@tanstack/react-table'
import type { GriddyColumn, SelectionConfig } from './types'
import { createOperatorFilter } from '../features/filtering'
import { DEFAULTS, SELECTION_COLUMN_ID, SELECTION_COLUMN_SIZE } from './constants'
/**
@@ -38,10 +39,21 @@ export function mapColumns<T>(
meta: { griddy: col },
minSize: col.minWidth ?? DEFAULTS.minColumnWidth,
size: col.width,
// For function accessors, TanStack can't auto-detect the sort type, so default to 'auto'
sortingFn: col.sortFn ?? (isStringAccessor ? undefined : 'auto') as any,
}
if (col.filterFn) def.filterFn = col.filterFn
// For function accessors, TanStack can't auto-detect the sort type, so provide a default
if (col.sortFn) {
def.sortingFn = col.sortFn
} else if (!isStringAccessor && col.sortable !== false) {
// Use alphanumeric sorting for function accessors
def.sortingFn = 'alphanumeric'
}
if (col.filterFn) {
def.filterFn = col.filterFn
} else if (col.filterable) {
def.filterFn = createOperatorFilter()
}
return def
})
+4
View File
@@ -5,7 +5,10 @@ export const CSS = {
cellEditing: 'griddy-cell--editing',
checkbox: 'griddy-checkbox',
container: 'griddy-container',
filterButton: 'griddy-filter-button',
filterButtonActive: 'griddy-filter-button--active',
headerCell: 'griddy-header-cell',
headerCellContent: 'griddy-header-cell-content',
headerCellSortable: 'griddy-header-cell--sortable',
headerCellSorted: 'griddy-header-cell--sorted',
headerRow: 'griddy-header-row',
@@ -27,6 +30,7 @@ export const CSS = {
// ─── Defaults ────────────────────────────────────────────────────────────────
export const DEFAULTS = {
filterDebounceMs: 300,
headerHeight: 36,
maxColumnWidth: 800,
minColumnWidth: 50,
+3
View File
@@ -2,6 +2,8 @@ import type { ColumnDef, ColumnFiltersState, ColumnOrderState, ColumnPinningStat
import type { Virtualizer } from '@tanstack/react-virtual'
import type { ReactNode } from 'react'
import type { FilterConfig } from '../features/filtering'
// ─── Column Definition ───────────────────────────────────────────────────────
export type CellRenderer<T> = (props: RendererProps<T>) => ReactNode
@@ -45,6 +47,7 @@ export interface GriddyColumn<T> {
editable?: ((row: T) => boolean) | boolean
editor?: EditorComponent<T>
filterable?: boolean
filterConfig?: FilterConfig
filterFn?: FilterFn<T>
header: ReactNode | string
headerGroup?: string
@@ -0,0 +1,33 @@
import type { Column } from '@tanstack/react-table'
import { ActionIcon } from '@mantine/core'
import { IconFilter } from '@tabler/icons-react'
import { CSS } from '../../core/constants'
import styles from '../../styles/griddy.module.css'
interface ColumnFilterButtonProps {
column: Column<any, any>
}
export function ColumnFilterButton({ column }: ColumnFilterButtonProps) {
const isActive = !!column.getFilterValue()
return (
<ActionIcon
aria-label="Filter status indicator"
className={[
styles[CSS.filterButton],
isActive ? styles[CSS.filterButtonActive] : '',
]
.filter(Boolean)
.join(' ')}
color={isActive ? 'blue' : 'gray'}
disabled
size="xs"
variant="subtle"
>
<IconFilter size={14} />
</ActionIcon>
)
}
@@ -0,0 +1,105 @@
import type { Column } from '@tanstack/react-table'
import { Menu } from '@mantine/core'
import { IconFilter, IconSortAscending, IconTrash } from '@tabler/icons-react'
import { useState } from 'react'
interface HeaderContextMenuProps {
children: React.ReactNode
column: Column<any, any>
onOpenFilter: () => void
}
export function HeaderContextMenu({
children,
column,
onOpenFilter,
}: HeaderContextMenuProps) {
const [contextMenu, setContextMenu] = useState<{ x: number; y: number } | null>(null)
const handleContextMenu = (e: React.MouseEvent) => {
e.preventDefault()
setContextMenu({ x: e.clientX, y: e.clientY })
}
const handleSort = () => {
if (column.getCanSort()) {
const handler = column.getToggleSortingHandler()
if (handler) {
handler({} as any)
}
}
setContextMenu(null)
}
const handleClearSort = () => {
if (column.getCanSort()) {
const handler = column.getToggleSortingHandler()
if (handler) {
handler({} as any)
}
}
setContextMenu(null)
}
const handleResetFilter = () => {
if (column.getCanFilter()) {
column.setFilterValue(undefined)
}
setContextMenu(null)
}
const handleOpenFilter = () => {
if (column.getCanFilter()) {
onOpenFilter()
}
setContextMenu(null)
}
return (
<>
<div onContextMenu={handleContextMenu}>
{children}
</div>
{contextMenu && (
<Menu
closeOnClickOutside
closeOnEscape
onClose={() => setContextMenu(null)}
opened={true}
position="bottom-start"
withinPortal
>
<Menu.Dropdown style={{ left: contextMenu.x, position: 'fixed', top: contextMenu.y }}>
{column.getCanSort() && (
<>
<Menu.Item leftSection={<IconSortAscending size={14} />} onClick={handleSort}>
Sort {column.getIsSorted() === 'asc' ? '↓' : '↑'}
</Menu.Item>
{column.getIsSorted() && (
<Menu.Item leftSection={<IconTrash size={14} />} onClick={handleClearSort}>
Reset Sorting
</Menu.Item>
)}
</>
)}
{column.getCanFilter() && (
<>
{column.getFilterValue() && (
<Menu.Item leftSection={<IconTrash size={14} />} onClick={handleResetFilter}>
Reset Filter
</Menu.Item>
)}
<Menu.Item leftSection={<IconFilter size={14} />} onClick={handleOpenFilter}>
Open Filters
</Menu.Item>
</>
)}
</Menu.Dropdown>
</Menu>
)}
</>
)
}
@@ -0,0 +1,118 @@
import type { Column } from '@tanstack/react-table'
import { Button, Group, Popover, Stack, Text } from '@mantine/core'
import { useState } from 'react'
import type { FilterConfig, FilterValue } from './types'
import { getGriddyColumn } from '../../core/columnMapper'
import { ColumnFilterButton } from './ColumnFilterButton'
import { FilterBoolean } from './FilterBoolean'
import { FilterInput } from './FilterInput'
import { FilterSelect } from './FilterSelect'
import { OPERATORS_BY_TYPE } from './operators'
interface ColumnFilterPopoverProps {
column: Column<any, any>
onOpenedChange?: (opened: boolean) => void
opened?: boolean
}
export function ColumnFilterPopover({ column, onOpenedChange, opened: externalOpened }: ColumnFilterPopoverProps) {
const [internalOpened, setInternalOpened] = useState(false)
// Support both internal and external control
const opened = externalOpened !== undefined ? externalOpened : internalOpened
const setOpened = (value: boolean) => {
if (externalOpened !== undefined) {
onOpenedChange?.(value)
} else {
setInternalOpened(value)
}
}
const [localValue, setLocalValue] = useState<FilterValue | undefined>(
(column.getFilterValue() as FilterValue) || undefined,
)
const griddyColumn = getGriddyColumn(column)
const filterConfig: FilterConfig | undefined = (griddyColumn as any)?.filterConfig
if (!filterConfig) {
return null
}
const handleApply = () => {
column.setFilterValue(localValue)
setOpened(false)
}
const handleClear = () => {
setLocalValue(undefined)
column.setFilterValue(undefined)
setOpened(false)
}
const handleClose = () => {
setOpened(false)
// Reset to previous value if popover is closed without applying
setLocalValue((column.getFilterValue() as FilterValue) || undefined)
}
const operators =
filterConfig.operators || OPERATORS_BY_TYPE[filterConfig.type]
return (
<Popover onChange={setOpened} onClose={handleClose} opened={opened} position="bottom-start" withinPortal>
<Popover.Target>
<ColumnFilterButton column={column} />
</Popover.Target>
<Popover.Dropdown>
<Stack gap="sm" w={280}>
<Text fw={600} size="sm">
Filter: {column.id}
</Text>
{filterConfig.type === 'text' && (
<FilterInput
onChange={setLocalValue}
operators={operators}
type="text"
value={localValue}
/>
)}
{filterConfig.type === 'number' && (
<FilterInput
onChange={setLocalValue}
operators={operators}
type="number"
value={localValue}
/>
)}
{filterConfig.type === 'enum' && filterConfig.enumOptions && (
<FilterSelect
onChange={setLocalValue}
operators={operators}
options={filterConfig.enumOptions}
value={localValue}
/>
)}
{filterConfig.type === 'boolean' && (
<FilterBoolean onChange={setLocalValue} value={localValue} />
)}
<Group justify="flex-end">
<Button onClick={handleClear} size="xs" variant="subtle">
Clear
</Button>
<Button onClick={handleApply} size="xs">
Apply
</Button>
</Group>
</Stack>
</Popover.Dropdown>
</Popover>
)
}
@@ -0,0 +1,32 @@
import { Radio, Stack } from '@mantine/core'
import { useState } from 'react'
import type { FilterValue } from './types'
interface FilterBooleanProps {
onChange: (value: FilterValue) => void
value?: FilterValue
}
export function FilterBoolean({ onChange, value }: FilterBooleanProps) {
const [operator, setOperator] = useState<string>(value?.operator || 'isEmpty')
const handleChange = (op: string) => {
setOperator(op)
onChange({
operator: op,
})
}
return (
<Stack gap="xs" onClick={(e) => e.stopPropagation()}>
<Radio.Group label="Filter by" onChange={handleChange} value={operator}>
<Stack gap="xs">
<Radio label="True" value="isTrue" />
<Radio label="False" value="isFalse" />
<Radio label="All (no filter)" value="isEmpty" />
</Stack>
</Radio.Group>
</Stack>
)
}
@@ -0,0 +1,141 @@
import { ActionIcon, Group, NumberInput, Select, Stack, TextInput } from '@mantine/core'
import { IconX } from '@tabler/icons-react'
import { useEffect, useRef, useState } from 'react'
import type { FilterOperator, FilterValue } from './types'
interface FilterInputProps {
onChange: (value: FilterValue) => void
operators: FilterOperator[]
type: 'number' | 'text'
value?: FilterValue
}
export function FilterInput({ onChange, operators, type, value }: FilterInputProps) {
const [operator, setOperator] = useState<string>(value?.operator || operators[0]?.id || '')
const [inputValue, setInputValue] = useState<number | string | undefined>(
value?.value !== undefined && value?.value !== null ? value.value : undefined,
)
const debounceTimerRef = useRef<NodeJS.Timeout | null>(null)
useEffect(() => {
// Clear previous timer
if (debounceTimerRef.current) {
clearTimeout(debounceTimerRef.current)
}
// For text inputs, debounce the changes
if (type === 'text' && inputValue !== undefined && inputValue !== '') {
debounceTimerRef.current = setTimeout(() => {
onChange({
operator,
value: inputValue,
})
}, 300)
}
return () => {
if (debounceTimerRef.current) {
clearTimeout(debounceTimerRef.current)
}
}
}, [inputValue, operator, onChange, type])
const selectedOperator = operators.find((op) => op.id === operator)
const requiresValue = selectedOperator?.requiresValue !== false
const handleClear = () => {
setInputValue(undefined)
}
const handleOperatorChange = (newOp: null | string) => {
if (newOp) {
setOperator(newOp)
}
}
// Handle "between" operator specially
if (operator === 'between' && type === 'number') {
const min = value?.min !== undefined ? Number(value.min) : undefined
const max = value?.max !== undefined ? Number(value.max) : undefined
return (
<Stack gap="xs" onClick={(e) => e.stopPropagation()}>
<Select
data={operators.map((op) => ({ label: op.label, value: op.id }))}
label="Operator"
onChange={handleOperatorChange}
searchable
size="xs"
value={operator}
/>
<Group grow>
<NumberInput
label="Min"
onChange={(val) => {
onChange({
max: max === undefined ? undefined : Number(max),
min: val === undefined || val === null ? undefined : Number(val),
operator: 'between',
})
}}
placeholder="Minimum"
size="xs"
value={min}
/>
<NumberInput
label="Max"
onChange={(val) => {
onChange({
max: val === undefined || val === null ? undefined : Number(val),
min: min === undefined ? undefined : Number(min),
operator: 'between',
})
}}
placeholder="Maximum"
size="xs"
value={max}
/>
</Group>
</Stack>
)
}
return (
<Stack gap="xs" onClick={(e) => e.stopPropagation()}>
<Select
data={operators.map((op) => ({ label: op.label, value: op.id }))}
label="Operator"
onChange={handleOperatorChange}
searchable
size="xs"
value={operator}
/>
{requiresValue && type === 'text' && (
<TextInput
autoFocus
onChange={(e) => setInputValue(e.currentTarget.value)}
placeholder="Enter value..."
rightSection={
inputValue && (
<ActionIcon color="gray" onClick={handleClear} size="xs" variant="subtle">
<IconX size={14} />
</ActionIcon>
)
}
size="xs"
value={inputValue === undefined ? '' : String(inputValue)}
/>
)}
{requiresValue && type === 'number' && (
<NumberInput
autoFocus
onChange={(val) => setInputValue(val)}
placeholder="Enter number..."
size="xs"
value={inputValue as number | undefined}
/>
)}
</Stack>
)
}
@@ -0,0 +1,69 @@
import { MultiSelect, Select, Stack } from '@mantine/core'
import { useState } from 'react'
import type { FilterEnumOption, FilterOperator, FilterValue } from './types'
interface FilterSelectProps {
onChange: (value: FilterValue) => void
operators: FilterOperator[]
options: FilterEnumOption[]
value?: FilterValue
}
export function FilterSelect({ onChange, operators, options, value }: FilterSelectProps) {
const [operator, setOperator] = useState<string>(value?.operator || operators[0]?.id || 'includes')
const [selectedValues, setSelectedValues] = useState<string[]>(
value?.values?.map(String) || [],
)
const handleOperatorChange = (newOp: null | string) => {
if (newOp) {
setOperator(newOp)
}
}
const handleValuesChange = (vals: string[]) => {
setSelectedValues(vals)
if (operator !== 'isEmpty') {
onChange({
operator,
values: vals.map((v) => {
// Try to convert back to original value type
const option = options.find((opt) => String(opt.value) === v)
return option?.value ?? v
}),
})
}
}
const selectOptions = options.map((opt) => ({
label: opt.label,
value: String(opt.value),
}))
return (
<Stack gap="xs" onClick={(e) => e.stopPropagation()}>
<Select
data={operators.map((op) => ({ label: op.label, value: op.id }))}
label="Operator"
onChange={handleOperatorChange}
searchable
size="xs"
value={operator}
/>
{operator !== 'isEmpty' && (
<MultiSelect
autoFocus
clearable
data={selectOptions}
label="Select values"
onChange={handleValuesChange}
placeholder="Choose values..."
searchable
size="xs"
value={selectedValues}
/>
)}
</Stack>
)
}
@@ -0,0 +1,179 @@
import type { FilterFn } from '@tanstack/react-table'
import type { FilterValue } from './types'
// ─── Text Filter Functions ──────────────────────────────────────────────────
const textContains: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
return String(value).toLowerCase().includes(String(filterValue.value).toLowerCase())
}
const textEquals: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
return String(value).toLowerCase() === String(filterValue.value).toLowerCase()
}
const textStartsWith: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
return String(value).toLowerCase().startsWith(String(filterValue.value).toLowerCase())
}
const textEndsWith: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
return String(value).toLowerCase().endsWith(String(filterValue.value).toLowerCase())
}
const textNotContains: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return true
return !String(value).toLowerCase().includes(String(filterValue.value).toLowerCase())
}
const textIsEmpty: FilterFn<any> = (row: any, columnId: string) => {
const value = row.getValue(columnId)
return value == null || String(value).trim() === ''
}
const textIsNotEmpty: FilterFn<any> = (row: any, columnId: string) => {
const value = row.getValue(columnId)
return value != null && String(value).trim() !== ''
}
// ─── Number Filter Functions ────────────────────────────────────────────────
const numberEquals: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
return Number(value) === Number(filterValue.value)
}
const numberNotEquals: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
return Number(value) !== Number(filterValue.value)
}
const numberGreaterThan: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
return Number(value) > Number(filterValue.value)
}
const numberGreaterThanOrEqual: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
return Number(value) >= Number(filterValue.value)
}
const numberLessThan: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
return Number(value) < Number(filterValue.value)
}
const numberLessThanOrEqual: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
return Number(value) <= Number(filterValue.value)
}
const numberBetween: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
const num = Number(value)
const min = filterValue.min != null ? Number(filterValue.min) : -Infinity
const max = filterValue.max != null ? Number(filterValue.max) : Infinity
return num >= min && num <= max
}
// ─── Enum Filter Functions ──────────────────────────────────────────────────
const enumIncludes: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return false
const values = filterValue.values || []
return values.includes(value)
}
const enumExcludes: FilterFn<any> = (row: any, columnId: string, filterValue: FilterValue) => {
const value = row.getValue(columnId)
if (value == null) return true
const values = filterValue.values || []
return !values.includes(value)
}
// ─── Boolean Filter Functions ───────────────────────────────────────────────
const booleanIsTrue: FilterFn<any> = (row: any, columnId: string) => {
const value = row.getValue(columnId)
return value === true || value === 1 || String(value).toLowerCase() === 'true'
}
const booleanIsFalse: FilterFn<any> = (row: any, columnId: string) => {
const value = row.getValue(columnId)
return value === false || value === 0 || String(value).toLowerCase() === 'false'
}
// ─── Filter Function Map ────────────────────────────────────────────────────
const FILTER_FN_MAP: Record<string, FilterFn<any>> = {
between: numberBetween,
contains: textContains,
endsWith: textEndsWith,
enumExcludes,
enumIncludes,
equals: ((row: any, columnId: string, filterValue: FilterValue, addMeta: any) => {
const value = row.getValue(columnId)
// Detect type and use appropriate equals function
if (typeof value === 'number') {
return numberEquals(row, columnId, filterValue, addMeta)
}
return textEquals(row, columnId, filterValue, addMeta)
}) as FilterFn<any>,
excludes: enumExcludes,
greaterThan: numberGreaterThan,
greaterThanOrEqual: numberGreaterThanOrEqual,
includes: enumIncludes,
isEmpty: (
// eslint-disable-next-line @typescript-eslint/no-unused-vars
(row: any, columnId: string, _filterValue: any, _addMeta: any) => {
const value = row.getValue(columnId)
return value == null || value === '' || (Array.isArray(value) && value.length === 0)
}
) as FilterFn<any>,
isFalse: booleanIsFalse,
isNotEmpty: (
// eslint-disable-next-line @typescript-eslint/no-unused-vars
(row: any, columnId: string, _filterValue: any, _addMeta: any) => {
const value = row.getValue(columnId)
return value != null && value !== '' && (!Array.isArray(value) || value.length > 0)
}
) as FilterFn<any>,
isTrue: booleanIsTrue,
lessThan: numberLessThan,
lessThanOrEqual: numberLessThanOrEqual,
notContains: textNotContains,
notEquals: numberNotEquals,
startsWith: textStartsWith,
textIsEmpty,
textIsNotEmpty,
}
// ─── Universal Filter Function ──────────────────────────────────────────────
export function createOperatorFilter(): FilterFn<any> {
return (row: any, columnId: string, filterValue: FilterValue, addMeta: any) => {
if (!filterValue?.operator) return true
const filterFn = FILTER_FN_MAP[filterValue.operator]
if (!filterFn) {
console.warn(`Unknown filter operator: ${filterValue.operator}`)
return true
}
return filterFn(row, columnId, filterValue, addMeta)
}
}
+9
View File
@@ -0,0 +1,9 @@
export { ColumnFilterButton } from './ColumnFilterButton'
export { HeaderContextMenu } from './ColumnFilterContextMenu'
export { ColumnFilterPopover } from './ColumnFilterPopover'
export { FilterBoolean } from './FilterBoolean'
export { createOperatorFilter } from './filterFunctions'
export { FilterInput } from './FilterInput'
export { FilterSelect } from './FilterSelect'
export { BOOLEAN_OPERATORS, ENUM_OPERATORS, NUMBER_OPERATORS, OPERATORS_BY_TYPE, TEXT_OPERATORS } from './operators'
export type { FilterConfig, FilterEnumOption, FilterOperator, FilterState, FilterValue } from './types'
@@ -0,0 +1,51 @@
import type { FilterOperator } from './types'
// ─── Text Operators ─────────────────────────────────────────────────────────
export const TEXT_OPERATORS: FilterOperator[] = [
{ id: 'contains', label: 'Contains' },
{ id: 'equals', label: 'Equals' },
{ id: 'startsWith', label: 'Starts with' },
{ id: 'endsWith', label: 'Ends with' },
{ id: 'notContains', label: 'Does not contain' },
{ id: 'isEmpty', label: 'Is empty', requiresValue: false },
{ id: 'isNotEmpty', label: 'Is not empty', requiresValue: false },
]
// ─── Number Operators ───────────────────────────────────────────────────────
export const NUMBER_OPERATORS: FilterOperator[] = [
{ id: 'equals', label: 'Equals (=)' },
{ id: 'notEquals', label: 'Not equals (≠)' },
{ id: 'greaterThan', label: 'Greater than (>)' },
{ id: 'greaterThanOrEqual', label: 'Greater or equal (≥)' },
{ id: 'lessThan', label: 'Less than (<)' },
{ id: 'lessThanOrEqual', label: 'Less or equal (≤)' },
{ id: 'between', label: 'Between' },
{ id: 'isEmpty', label: 'Is empty', requiresValue: false },
]
// ─── Enum Operators ─────────────────────────────────────────────────────────
export const ENUM_OPERATORS: FilterOperator[] = [
{ id: 'includes', label: 'Includes' },
{ id: 'excludes', label: 'Excludes' },
{ id: 'isEmpty', label: 'Is empty', requiresValue: false },
]
// ─── Boolean Operators ──────────────────────────────────────────────────────
export const BOOLEAN_OPERATORS: FilterOperator[] = [
{ id: 'isTrue', label: 'True' },
{ id: 'isFalse', label: 'False' },
{ id: 'isEmpty', label: 'All', requiresValue: false },
]
// ─── Operator Maps ──────────────────────────────────────────────────────────
export const OPERATORS_BY_TYPE = {
boolean: BOOLEAN_OPERATORS,
enum: ENUM_OPERATORS,
number: NUMBER_OPERATORS,
text: TEXT_OPERATORS,
} as const
+33
View File
@@ -0,0 +1,33 @@
// ─── Filter Types ───────────────────────────────────────────────────────────
export interface FilterConfig {
enumOptions?: FilterEnumOption[]
operators?: FilterOperator[]
type: 'boolean' | 'enum' | 'number' | 'text'
}
export interface FilterEnumOption {
label: string
value: any
}
export interface FilterOperator {
id: string
label: string
requiresValue?: boolean
}
// ─── Filter Value Structure ─────────────────────────────────────────────────
export interface FilterState {
id: string
value: FilterValue
}
export interface FilterValue {
max?: number
min?: number
operator: string
value?: any
values?: any[]
}
+34 -5
View File
@@ -983,14 +983,43 @@ persist={{
**Deliverable**: Global search with keyboard-activated overlay
### Phase 5: Sorting & Filtering
- [ ] Sorting via TanStack Table (click header, Shift+Click for multi)
- [ ] Sort indicators in headers
- [ ] Column filtering UI (per-column filter dropdowns)
- [ ] Filter operators (contains, exact, between, etc.)
- [x] Sorting via TanStack Table (click header, Shift+Click for multi)
- [x] Sort indicators in headers
- [x] Column filtering UI (right-click context menu for sort/filter options)
- [x] Filter operators (contains, equals, startsWith, endsWith, notContains, isEmpty, isNotEmpty, between, greaterThan, lessThan, includes, excludes, etc.)
- [x] Text, number, enum, and boolean filter types
- [x] Filter UI with operator dropdown and type-specific inputs
- [x] Filter status indicators (blue/gray icons in headers)
- [x] Debounced text input (300ms)
- [x] Apply/Clear buttons for filter controls
- [ ] Date filtering (Phase 5.5 - requires @mantine/dates)
- [ ] Server-side sort/filter support (`manualSorting`, `manualFiltering`)
- [ ] Sort/filter state persistence
**Deliverable**: Data manipulation features powered by TanStack Table
**Deliverable**: Complete data manipulation features powered by TanStack Table
**Files Created** (9 components):
- `src/Griddy/features/filtering/types.ts` — Filter type system
- `src/Griddy/features/filtering/operators.ts` — Operator definitions for all 4 types
- `src/Griddy/features/filtering/filterFunctions.ts` — TanStack FilterFn implementations
- `src/Griddy/features/filtering/FilterInput.tsx` — Text/number input with debouncing
- `src/Griddy/features/filtering/FilterSelect.tsx` — Multi-select for enums
- `src/Griddy/features/filtering/FilterBoolean.tsx` — Radio group for booleans
- `src/Griddy/features/filtering/ColumnFilterButton.tsx` — Filter status icon
- `src/Griddy/features/filtering/ColumnFilterPopover.tsx` — Filter UI popover
- `src/Griddy/features/filtering/ColumnFilterContextMenu.tsx` — Right-click context menu
**Files Modified**:
- `src/Griddy/rendering/TableHeader.tsx` — Integrated context menu + filter popover
- `src/Griddy/core/columnMapper.ts` — Set default filterFn for filterable columns
- `src/Griddy/core/types.ts` — Added FilterConfig to GriddyColumn
- `src/Griddy/core/constants.ts` — Added CSS class names and defaults
- `src/Griddy/styles/griddy.module.css` — Filter UI styling
- `src/Griddy/Griddy.stories.tsx` — Added 6 filtering examples
**Tests**:
- `playwright.config.ts` — Playwright configuration
- `tests/e2e/filtering-context-menu.spec.ts` — 8 comprehensive E2E test cases
### Phase 6: In-Place Editing
- [ ] Implement `EditableCell.tsx` with editor mounting
+27 -8
View File
@@ -1,12 +1,16 @@
import { Checkbox } from '@mantine/core'
import { flexRender } from '@tanstack/react-table'
import { useState } from 'react'
import { CSS, SELECTION_COLUMN_ID } from '../core/constants'
import { useGriddyStore } from '../core/GriddyStore'
import { ColumnFilterPopover, HeaderContextMenu } from '../features/filtering'
import styles from '../styles/griddy.module.css'
export function TableHeader() {
const table = useGriddyStore((s) => s._table)
const [filterPopoverOpen, setFilterPopoverOpen] = useState<null | string>(null)
if (!table) return null
const headerGroups = table.getHeaderGroups()
@@ -19,6 +23,7 @@ export function TableHeader() {
const isSortable = header.column.getCanSort()
const sortDir = header.column.getIsSorted()
const isSelectionCol = header.column.id === SELECTION_COLUMN_ID
const isFilterPopoverOpen = filterPopoverOpen === header.column.id
return (
<div
@@ -36,14 +41,28 @@ export function TableHeader() {
{isSelectionCol ? (
<SelectAllCheckbox />
) : header.isPlaceholder ? null : (
<>
{flexRender(header.column.columnDef.header, header.getContext())}
{sortDir && (
<span className={styles[CSS.sortIndicator]}>
{sortDir === 'asc' ? ' \u2191' : ' \u2193'}
</span>
)}
</>
<HeaderContextMenu
column={header.column}
onOpenFilter={() => setFilterPopoverOpen(header.column.id)}
>
<div className={styles[CSS.headerCellContent]}>
{flexRender(header.column.columnDef.header, header.getContext())}
{sortDir && (
<span className={styles[CSS.sortIndicator]}>
{sortDir === 'asc' ? ' \u2191' : ' \u2193'}
</span>
)}
{header.column.getCanFilter() && (
<ColumnFilterPopover
column={header.column}
onOpenedChange={(opened) =>
setFilterPopoverOpen(opened ? header.column.id : null)
}
opened={isFilterPopoverOpen}
/>
)}
</div>
</HeaderContextMenu>
)}
{header.column.getCanResize() && (
<div
+29
View File
@@ -89,6 +89,35 @@
font-size: 12px;
}
/* ─── Header Cell Content ──────────────────────────────────────────────── */
.griddy-header-cell-content {
display: flex;
align-items: center;
gap: 4px;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ─── Filter Button ────────────────────────────────────────────────────── */
.griddy-filter-button {
flex-shrink: 0;
opacity: 0.65;
transition: opacity 0.2s ease;
}
.griddy-filter-button:hover {
opacity: 0.85;
}
.griddy-filter-button--active {
opacity: 1;
}
/* ─── Resize Handle ────────────────────────────────────────────────────── */
.griddy-resize-handle {
+167
View File
@@ -0,0 +1,167 @@
import { expect, test } from '@playwright/test'
test.describe('Griddy Filtering - Context Menu', () => {
test.beforeEach(async ({ page }) => {
// Navigate to the WithTextFiltering story
await page.goto(
'/?path=/story/components-griddy--with-text-filtering'
)
// Wait for the Griddy table to load
await page.waitForSelector('[role="table"]', { timeout: 5000 })
})
test('should show context menu on right-click on column header', async ({ page }) => {
// Right-click on "First Name" header
const firstNameHeader = page.locator('[role="columnheader"]').first()
await firstNameHeader.click({ button: 'right' })
// Check if context menu items appear
await expect(page.locator('text=Sort')).toBeVisible({ timeout: 2000 })
await expect(page.locator('text=Open Filters')).toBeVisible()
})
test('should show "Reset Sorting" option when column is sorted', async ({ page }) => {
const firstNameHeader = page.locator('[role="columnheader"]').first()
// Click to sort the column
await firstNameHeader.click()
// Wait a moment for state update
await page.waitForTimeout(100)
// Right-click to open context menu
await firstNameHeader.click({ button: 'right' })
// Check if "Reset Sorting" appears
await expect(page.locator('text=Reset Sorting')).toBeVisible({ timeout: 2000 })
})
test('should show "Reset Filter" option when filter is active', async ({ page }) => {
const firstNameHeader = page.locator('[role="columnheader"]').first()
// Right-click to open context menu
await firstNameHeader.click({ button: 'right' })
// Click "Open Filters"
await page.locator('text=Open Filters').click()
// Wait for filter popover to appear
await expect(page.locator('text=Filter: firstName')).toBeVisible({ timeout: 2000 })
// Set a filter value
const textInput = page.locator('input[placeholder="Enter value..."]')
await textInput.fill('Alice')
// Click Apply button
await page.locator('button:has-text("Apply")').click()
// Wait for popover to close
await page.waitForTimeout(200)
// Right-click again to open context menu
await firstNameHeader.click({ button: 'right' })
// Check if "Reset Filter" appears
await expect(page.locator('text=Reset Filter')).toBeVisible({ timeout: 2000 })
})
test('should open filter panel when "Open Filters" is clicked', async ({ page }) => {
const firstNameHeader = page.locator('[role="columnheader"]').first()
// Right-click to open context menu
await firstNameHeader.click({ button: 'right' })
// Click "Open Filters"
await page.locator('text=Open Filters').click()
// Check if filter popover appears with correct title
await expect(page.locator('text=Filter: firstName')).toBeVisible({ timeout: 2000 })
// Check if operator dropdown exists
await expect(page.locator('text=Operator').or(page.locator('[role="combobox"]'))).toBeVisible()
// Check if input field exists
await expect(page.locator('input[placeholder="Enter value..."]')).toBeVisible()
// Check if Apply and Clear buttons exist
await expect(page.locator('button:has-text("Apply")')).toBeVisible()
await expect(page.locator('button:has-text("Clear")')).toBeVisible()
})
test('should filter data when filter is applied', async ({ page }) => {
const firstNameHeader = page.locator('[role="columnheader"]').first()
// Right-click to open context menu
await firstNameHeader.click({ button: 'right' })
// Click "Open Filters"
await page.locator('text=Open Filters').click()
// Wait for filter popover
await expect(page.locator('text=Filter: firstName')).toBeVisible({ timeout: 2000 })
// Set filter value to "Alice"
const textInput = page.locator('input[placeholder="Enter value..."]')
await textInput.fill('Alice')
// Wait for debounce (300ms)
await page.waitForTimeout(350)
// Click Apply button
await page.locator('button:has-text("Apply")').click()
// Wait for filter to be applied
await page.waitForTimeout(200)
// Check that filter icon is now blue (active)
const filterButton = page.locator('[aria-label="Filter status indicator"]').first()
const color = await filterButton.evaluate((el: any) => {
return window.getComputedStyle(el).color
})
// Blue color should be present (filter is active)
expect(color).toContain('rgb')
})
test('should clear filter when "Reset Filter" is clicked', async ({ page }) => {
const firstNameHeader = page.locator('[role="columnheader"]').first()
// Open filter and apply one
await firstNameHeader.click({ button: 'right' })
await page.locator('text=Open Filters').click()
await expect(page.locator('text=Filter: firstName')).toBeVisible({ timeout: 2000 })
const textInput = page.locator('input[placeholder="Enter value..."]')
await textInput.fill('Alice')
await page.waitForTimeout(350)
await page.locator('button:has-text("Apply")').click()
await page.waitForTimeout(200)
// Now clear the filter via context menu
await firstNameHeader.click({ button: 'right' })
await page.locator('text=Reset Filter').click()
// Wait for state update
await page.waitForTimeout(200)
// Right-click again to verify "Reset Filter" is gone
await firstNameHeader.click({ button: 'right' })
// "Reset Filter" should not be visible
const resetFilterItem = page.locator('text=Reset Filter').first()
await expect(resetFilterItem).not.toBeVisible({ timeout: 2000 })
})
test('should have visible filter status icon', async ({ page }) => {
// Check that filter icons are visible in headers
const filterButton = page.locator('[aria-label="Filter status indicator"]').first()
await expect(filterButton).toBeVisible()
// Check that the icon has opacity (should be visible)
const opacity = await filterButton.evaluate((el: any) => {
return window.getComputedStyle(el).opacity
})
expect(parseFloat(opacity)).toBeGreaterThan(0.5)
})
})