From 6609abf21da14f7cb91a295dab570cd4e54d858d Mon Sep 17 00:00:00 2001 From: jassmith Date: Sat, 10 Feb 2024 05:30:40 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20752f8?= =?UTF-8?q?f87356702656b863fac8c44b32d0306b3af=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...=> 01-getting-started.stories-Lwq3bhsG.js} | 2 +- ...js => 02-editing-data.stories-uMNvuR4T.js} | 2 +- ....js => 03-grid-column.stories-ki_rf7c-.js} | 2 +- ... => 04-streaming-data.stories-FjbN6zdk.js} | 2 +- ...KmDgu.js => 06-search.stories-SV1nFg-6.js} | 2 +- ...=> 07-column-grouping.stories-KtsWGblh.js} | 2 +- ...daJ9.js => 08-theming.stories-FgO0Jz0T.js} | 2 +- ...LtaAqR.js => 09-menus.stories-oEedqkBY.js} | 2 +- ...jOqX.js => add-column.stories-coHPOkoR.js} | 2 +- ...=> add-data-to-middle.stories-CfzDpjdK.js} | 2 +- ...js => add-data-to-top.stories-dpZWH635.js} | 2 +- ...dvbjoj.js => add-data.stories-14Dc9SRb.js} | 2 +- ....js => all-cell-kinds.stories-fsQtSzKV.js} | 2 +- ... => append-row-handle.stories-YQyg-27A.js} | 2 +- ...automatic-row-markers.stories-I-TgNR_X.js} | 2 +- ...js => built-in-search.stories-v39F_B-_.js} | 2 +- ... cell-activated-event.stories-QhCktdVw.js} | 2 +- ...s-_lJbBWx1.js => cell.stories-Ar45hIC9.js} | 2 +- ...column-group-collapse.stories-Acy8AFPO.js} | 2 +- ...w.js => column-groups.stories-lpss0-Mz.js} | 2 +- ... => content-alignment.stories--MNNaYaT.js} | 2 +- ... => controlled-search.stories-b-OSRnqX.js} | 2 +- ... controlled-selection.stories-Lx0jlMqX.js} | 2 +- ...op.js => copy-support.stories-1uSBV0aF.js} | 2 +- ...> custom-header-icons.stories-YLibh_hX.js} | 2 +- ...P.js => custom-header.stories-vDuU60kQ.js} | 2 +- docs/assets/data-editor-all-2MtuC67g.js | 124 ---------------- docs/assets/data-editor-all-Jk8In-1B.js | 135 ++++++++++++++++++ docs/assets/data-editor-all-MRDpHEQ_.js | 124 ++++++++++++++++ docs/assets/data-editor-all-T-OiWfdB.js | 135 ------------------ ...=> data-editor-repros.stories-HT3RvUND.js} | 2 +- ...-7S.js => data-editor.stories-18boT4dm.js} | 2 +- ...s => data-grid-overlay-editor-I8cicvj5.js} | 2 +- ...s => data-grid-overlay-editor-LE8GSUsC.js} | 2 +- ...O0wrE.js => data-grid.stories-uU5mN9ME.js} | 2 +- ...S9t.js => drag-source.stories-gUClilXD.js} | 2 +- ...UD1.js => drop-events.stories-OWz9nfw6.js} | 2 +- ...bh-.js => fill-handle.stories-WE6EdeGj.js} | 2 +- ....js => freeze-columns.stories-J-JtQz55.js} | 2 +- ...YD_.js => freeze-rows.stories-jRff6kph.js} | 2 +- ...2n.js => header-menus.stories-UgKhKI_h.js} | 2 +- ...js => highlight-cells.stories-L3aFgQ0D.js} | 2 +- docs/assets/iframe-9FFu--7X.js | 7 - docs/assets/iframe-MICdw5w5.js | 7 + ...rIQ.js => image-window-loader-aCHQvgUN.js} | 4 +- ... => imperative-scroll.stories-buAuN8Mq.js} | 2 +- ....js => input-blending.stories-vMFDLYxv.js} | 2 +- ...WAA.js => keybindings.stories-Mzh-GTTw.js} | 2 +- ...=> layout-integration.stories-5AdmzUNM.js} | 2 +- ... multi-select-columns.stories-ZBi8NFYt.js} | 2 +- ... => new-column-button.stories-hlOEqGf0.js} | 2 +- ...f.js => obscured-grid.stories-BhDuA2Kl.js} | 2 +- ...bserve-visible-region.stories-5YC3GOv6.js} | 2 +- ...dred-thousand-columns.stories-IX8W2-Ky.js} | 2 +- ...s => one-million-rows.stories-goFbk3px.js} | 2 +- ...nic2.js => overscroll.stories-Ioltj5aT.js} | 2 +- ...UoDigf3.js => padding.stories-oLYFy8Nt.js} | 2 +- ...N.js => paste-support.stories-8pSSjnL_.js} | 2 +- ...event-diagonal-scroll.stories-1z_x72JR.js} | 2 +- ...J.js => rapid-updates.stories-_pOVYGc8.js} | 2 +- ... => rearrange-columns.stories-5IgfC-te.js} | 2 +- ...SV.js => reorder-rows.stories-ZSuwtyLT.js} | 2 +- ... => resizable-columns.stories-jIxX01NI.js} | 2 +- ...P.js => right-element.stories-SlBlKhj_.js} | 2 +- ...v.js => right-to-left.stories-SJSb5h18.js} | 2 +- ... row-and-header-sizes.stories-_n_Og1OI.js} | 2 +- ...NB.js => row-grouping.stories-eFOBPiXT.js} | 2 +- ...t7fep.js => row-hover.stories-U0PlxtgK.js} | 2 +- ...o5Y.js => row-markers.stories-gUwzzw83.js} | 2 +- ...-mi.js => scaled-view.stories-ZKXzscAE.js} | 2 +- docs/assets/scroll-offset.stories-51l0E9Lj.js | 10 ++ ....js => scroll-shadows.stories-mMz0ZZOF.js} | 2 +- ...R-o.js => scrolling-data-grid-UJ5_dX2R.js} | 2 +- ...> scrolling-data-grid.stories-G3gtc9yy.js} | 2 +- ...s => search-as-filter.stories-JAMWQTp0.js} | 2 +- ...s => server-side-data.stories-vcsA3gAS.js} | 2 +- ...qB76.js => shadow-dom.stories-V3zAyFKt.js} | 2 +- ...N.js => silly-numbers.stories-D0q20SS3.js} | 2 +- ...> small-editable-grid.stories-ph4hBbrM.js} | 2 +- ...smooth-scrolling-grid.stories-Z9rTXot3.js} | 2 +- ...-BiLg.js => span-cell.stories-9oBMW2Vd.js} | 2 +- ...> stretch-column-size.stories-3Fc7tBvF.js} | 2 +- ... => ten-million-cells.stories-dSX67I4a.js} | 2 +- ...s => theme-per-column.stories-jOaP6A03.js} | 2 +- ...V.js => theme-per-row.stories-LwBWKiYj.js} | 2 +- ...t.js => theme-support.stories-Wf73fqnU.js} | 2 +- ...fllE36.js => tooltips.stories-FLMgvAmF.js} | 2 +- ... trailing-row-options.stories-9o3V2KvJ.js} | 2 +- ...God.js => uneven-rows.stories-5ASaufVP.js} | 2 +- ...js => use-data-source.stories-moFMuBc7.js} | 2 +- .../{utils-J-I08TtD.js => utils-0sbaJdQp.js} | 2 +- ...z.js => validate-data.stories-K9YyRayS.js} | 2 +- ...5.js => wrapping-text.stories-WIxnSyqc.js} | 2 +- docs/iframe.html | 2 +- docs/index.json | 2 +- docs/project.json | 2 +- docs/stories.json | 2 +- 97 files changed, 367 insertions(+), 357 deletions(-) rename docs/assets/{01-getting-started.stories-SKo_ladM.js => 01-getting-started.stories-Lwq3bhsG.js} (98%) rename docs/assets/{02-editing-data.stories-PvpM_AMz.js => 02-editing-data.stories-uMNvuR4T.js} (98%) rename docs/assets/{03-grid-column.stories-DbEHOMDm.js => 03-grid-column.stories-ki_rf7c-.js} (96%) rename docs/assets/{04-streaming-data.stories-j11zorLW.js => 04-streaming-data.stories-FjbN6zdk.js} (98%) rename docs/assets/{06-search.stories-1I9KmDgu.js => 06-search.stories-SV1nFg-6.js} (97%) rename docs/assets/{07-column-grouping.stories-ohXMXwJK.js => 07-column-grouping.stories-KtsWGblh.js} (96%) rename docs/assets/{08-theming.stories-AEh-daJ9.js => 08-theming.stories-FgO0Jz0T.js} (98%) rename docs/assets/{09-menus.stories-AlLtaAqR.js => 09-menus.stories-oEedqkBY.js} (98%) rename docs/assets/{add-column.stories-scy9jOqX.js => add-column.stories-coHPOkoR.js} (76%) rename docs/assets/{add-data-to-middle.stories-ysWJkolO.js => add-data-to-middle.stories-CfzDpjdK.js} (86%) rename docs/assets/{add-data-to-top.stories-yPyeuJec.js => add-data-to-top.stories-dpZWH635.js} (87%) rename docs/assets/{add-data.stories-cLdvbjoj.js => add-data.stories-14Dc9SRb.js} (88%) rename docs/assets/{all-cell-kinds.stories-7gVCFxUQ.js => all-cell-kinds.stories-fsQtSzKV.js} (78%) rename docs/assets/{append-row-handle.stories-07fu_RVb.js => append-row-handle.stories-YQyg-27A.js} (88%) rename docs/assets/{automatic-row-markers.stories-Y6l77uHg.js => automatic-row-markers.stories-I-TgNR_X.js} (83%) rename docs/assets/{built-in-search.stories-fmbphhmC.js => built-in-search.stories-v39F_B-_.js} (88%) rename docs/assets/{cell-activated-event.stories-Q5YF9u9g.js => cell-activated-event.stories-QhCktdVw.js} (89%) rename docs/assets/{cell.stories-_lJbBWx1.js => cell.stories-Ar45hIC9.js} (99%) rename docs/assets/{column-group-collapse.stories-nex3LHlI.js => column-group-collapse.stories-Acy8AFPO.js} (85%) rename docs/assets/{column-groups.stories-aUe7DIMw.js => column-groups.stories-lpss0-Mz.js} (78%) rename docs/assets/{content-alignment.stories-qyF38rSl.js => content-alignment.stories--MNNaYaT.js} (85%) rename docs/assets/{controlled-search.stories-6CGqo4sD.js => controlled-search.stories-b-OSRnqX.js} (89%) rename docs/assets/{controlled-selection.stories-nB36Tesw.js => controlled-selection.stories-Lx0jlMqX.js} (93%) rename docs/assets/{copy-support.stories-gQT8odop.js => copy-support.stories-1uSBV0aF.js} (79%) rename docs/assets/{custom-header-icons.stories-1obFr94u.js => custom-header-icons.stories-YLibh_hX.js} (95%) rename docs/assets/{custom-header.stories-dT08SgHP.js => custom-header.stories-vDuU60kQ.js} (88%) delete mode 100644 docs/assets/data-editor-all-2MtuC67g.js create mode 100644 docs/assets/data-editor-all-Jk8In-1B.js create mode 100644 docs/assets/data-editor-all-MRDpHEQ_.js delete mode 100644 docs/assets/data-editor-all-T-OiWfdB.js rename docs/assets/{data-editor-repros.stories-2Sx4xcGK.js => data-editor-repros.stories-HT3RvUND.js} (92%) rename docs/assets/{data-editor.stories-ge0BK-7S.js => data-editor.stories-18boT4dm.js} (98%) rename docs/assets/{data-grid-overlay-editor-KImiKR0_.js => data-grid-overlay-editor-I8cicvj5.js} (93%) rename docs/assets/{data-grid-overlay-editor-APrLKi4s.js => data-grid-overlay-editor-LE8GSUsC.js} (96%) rename docs/assets/{data-grid.stories-m1tO0wrE.js => data-grid.stories-uU5mN9ME.js} (99%) rename docs/assets/{drag-source.stories-Ky4JqS9t.js => drag-source.stories-gUClilXD.js} (81%) rename docs/assets/{drop-events.stories-k5ZvAUD1.js => drop-events.stories-OWz9nfw6.js} (93%) rename docs/assets/{fill-handle.stories-9STJPbh-.js => fill-handle.stories-WE6EdeGj.js} (88%) rename docs/assets/{freeze-columns.stories-VUOxlg1v.js => freeze-columns.stories-J-JtQz55.js} (77%) rename docs/assets/{freeze-rows.stories-XdchxYD_.js => freeze-rows.stories-jRff6kph.js} (88%) rename docs/assets/{header-menus.stories-Qqydxr2n.js => header-menus.stories-UgKhKI_h.js} (93%) rename docs/assets/{highlight-cells.stories-Dz0ASx6n.js => highlight-cells.stories-L3aFgQ0D.js} (87%) delete mode 100644 docs/assets/iframe-9FFu--7X.js create mode 100644 docs/assets/iframe-MICdw5w5.js rename docs/assets/{image-window-loader-lKUISrIQ.js => image-window-loader-aCHQvgUN.js} (99%) rename docs/assets/{imperative-scroll.stories-CLwyRI6H.js => imperative-scroll.stories-buAuN8Mq.js} (88%) rename docs/assets/{input-blending.stories-2pQxJpu-.js => input-blending.stories-vMFDLYxv.js} (89%) rename docs/assets/{keybindings.stories-HbuiDWAA.js => keybindings.stories-Mzh-GTTw.js} (92%) rename docs/assets/{layout-integration.stories-AGiGwCTK.js => layout-integration.stories-5AdmzUNM.js} (82%) rename docs/assets/{multi-select-columns.stories-TzyZLAaG.js => multi-select-columns.stories-ZBi8NFYt.js} (77%) rename docs/assets/{new-column-button.stories-p9Gyngt9.js => new-column-button.stories-hlOEqGf0.js} (83%) rename docs/assets/{obscured-grid.stories-W_2SPJ8f.js => obscured-grid.stories-BhDuA2Kl.js} (85%) rename docs/assets/{observe-visible-region.stories-4OA01Cgv.js => observe-visible-region.stories-5YC3GOv6.js} (84%) rename docs/assets/{one-hundred-thousand-columns.stories-OOMFzqtX.js => one-hundred-thousand-columns.stories-IX8W2-Ky.js} (77%) rename docs/assets/{one-million-rows.stories-_N8HpAmg.js => one-million-rows.stories-goFbk3px.js} (77%) rename docs/assets/{overscroll.stories-wl5Dnic2.js => overscroll.stories-Ioltj5aT.js} (78%) rename docs/assets/{padding.stories-2UoDigf3.js => padding.stories-oLYFy8Nt.js} (78%) rename docs/assets/{paste-support.stories-lDgwj2aN.js => paste-support.stories-8pSSjnL_.js} (86%) rename docs/assets/{prevent-diagonal-scroll.stories-l2qFKd-I.js => prevent-diagonal-scroll.stories-1z_x72JR.js} (74%) rename docs/assets/{rapid-updates.stories-NR0W4vvJ.js => rapid-updates.stories-_pOVYGc8.js} (92%) rename docs/assets/{rearrange-columns.stories-xC_BDMtK.js => rearrange-columns.stories-5IgfC-te.js} (88%) rename docs/assets/{reorder-rows.stories-QuXMn7SV.js => reorder-rows.stories-ZSuwtyLT.js} (87%) rename docs/assets/{resizable-columns.stories-gzi2qzMf.js => resizable-columns.stories-jIxX01NI.js} (85%) rename docs/assets/{right-element.stories-WEHYhkbP.js => right-element.stories-SlBlKhj_.js} (90%) rename docs/assets/{right-to-left.stories-hSGpRnuv.js => right-to-left.stories-SJSb5h18.js} (88%) rename docs/assets/{row-and-header-sizes.stories-s2x0F9ko.js => row-and-header-sizes.stories-_n_Og1OI.js} (78%) rename docs/assets/{row-grouping.stories-tlVFyJNB.js => row-grouping.stories-eFOBPiXT.js} (93%) rename docs/assets/{row-hover.stories-JzHt7fep.js => row-hover.stories-U0PlxtgK.js} (85%) rename docs/assets/{row-markers.stories-4ulqVo5Y.js => row-markers.stories-gUwzzw83.js} (77%) rename docs/assets/{scaled-view.stories-hV1ZL-mi.js => scaled-view.stories-ZKXzscAE.js} (73%) create mode 100644 docs/assets/scroll-offset.stories-51l0E9Lj.js rename docs/assets/{scroll-shadows.stories-5iBuHYZ-.js => scroll-shadows.stories-mMz0ZZOF.js} (90%) rename docs/assets/{scrolling-data-grid-19OhoR-o.js => scrolling-data-grid-UJ5_dX2R.js} (99%) rename docs/assets/{scrolling-data-grid.stories-TZdKGTtc.js => scrolling-data-grid.stories-G3gtc9yy.js} (96%) rename docs/assets/{search-as-filter.stories-LfFO3nKd.js => search-as-filter.stories-JAMWQTp0.js} (90%) rename docs/assets/{server-side-data.stories-CI1jdhkZ.js => server-side-data.stories-vcsA3gAS.js} (93%) rename docs/assets/{shadow-dom.stories-vyFIqB76.js => shadow-dom.stories-V3zAyFKt.js} (82%) rename docs/assets/{silly-numbers.stories-GnfGtfvN.js => silly-numbers.stories-D0q20SS3.js} (78%) rename docs/assets/{small-editable-grid.stories-2qea8rUB.js => small-editable-grid.stories-ph4hBbrM.js} (78%) rename docs/assets/{smooth-scrolling-grid.stories-ZWoFIk8K.js => smooth-scrolling-grid.stories-Z9rTXot3.js} (77%) rename docs/assets/{span-cell.stories-eP9-BiLg.js => span-cell.stories-9oBMW2Vd.js} (89%) rename docs/assets/{stretch-column-size.stories-hkXq64O3.js => stretch-column-size.stories-3Fc7tBvF.js} (84%) rename docs/assets/{ten-million-cells.stories-aaiU02Kg.js => ten-million-cells.stories-dSX67I4a.js} (76%) rename docs/assets/{theme-per-column.stories-qUNsVCr0.js => theme-per-column.stories-jOaP6A03.js} (90%) rename docs/assets/{theme-per-row.stories-I5xPHUWV.js => theme-per-row.stories-LwBWKiYj.js} (85%) rename docs/assets/{theme-support.stories-u5nvLSwt.js => theme-support.stories-Wf73fqnU.js} (93%) rename docs/assets/{tooltips.stories-IlfllE36.js => tooltips.stories-FLMgvAmF.js} (89%) rename docs/assets/{trailing-row-options.stories-_XbReORf.js => trailing-row-options.stories-9o3V2KvJ.js} (89%) rename docs/assets/{uneven-rows.stories-kSeFYGod.js => uneven-rows.stories-5ASaufVP.js} (73%) rename docs/assets/{use-data-source.stories-_zu2oKfn.js => use-data-source.stories-moFMuBc7.js} (99%) rename docs/assets/{utils-J-I08TtD.js => utils-0sbaJdQp.js} (99%) rename docs/assets/{validate-data.stories--x3VbZTz.js => validate-data.stories-K9YyRayS.js} (81%) rename docs/assets/{wrapping-text.stories-KghQhCY5.js => wrapping-text.stories-WIxnSyqc.js} (88%) diff --git a/docs/assets/01-getting-started.stories-SKo_ladM.js b/docs/assets/01-getting-started.stories-Lwq3bhsG.js similarity index 98% rename from docs/assets/01-getting-started.stories-SKo_ladM.js rename to docs/assets/01-getting-started.stories-Lwq3bhsG.js index b045c2bb7..29ea9a2e3 100644 --- a/docs/assets/01-getting-started.stories-SKo_ladM.js +++ b/docs/assets/01-getting-started.stories-Lwq3bhsG.js @@ -1,4 +1,4 @@ -import{j as e,a as l}from"./marked.esm-dbrxtycE.js";import{r as t}from"./index-BMVQvedj.js";import{G as M}from"./image-window-loader-lKUISrIQ.js";import{D as u}from"./data-editor-all-2MtuC67g.js";import{S as x}from"./story-utils-K2EZnGjM.js";import{D as T,M as a,H as i,W as y}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./toConsumableArray-ppDpjNRJ.js";const F={title:"Glide-Data-Grid/Docs",decorators:[r=>e(x,{children:e(r,{})})]},s=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],o=()=>{const r=t.useCallback(n=>{const[S,R]=n,p=s[R][["name","company","email","phone"][S]];return{kind:M.Text,allowOverlay:!1,displayData:p,data:p}},[]),[m,C]=t.useState(!1),[c,w]=t.useState(!1),[d,f]=t.useState(!0),h=t.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]);return l(T,{children:[e(a,{children:` +import{j as e,a as l}from"./marked.esm-dbrxtycE.js";import{r as t}from"./index-BMVQvedj.js";import{G as M}from"./image-window-loader-aCHQvgUN.js";import{D as u}from"./data-editor-all-MRDpHEQ_.js";import{S as x}from"./story-utils-K2EZnGjM.js";import{D as T,M as a,H as i,W as y}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./toConsumableArray-ppDpjNRJ.js";const F={title:"Glide-Data-Grid/Docs",decorators:[r=>e(x,{children:e(r,{})})]},s=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],o=()=>{const r=t.useCallback(n=>{const[S,R]=n,p=s[R][["name","company","email","phone"][S]];return{kind:M.Text,allowOverlay:!1,displayData:p,data:p}},[]),[m,C]=t.useState(!1),[c,w]=t.useState(!1),[d,f]=t.useState(!0),h=t.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]);return l(T,{children:[e(a,{children:` # Getting Started Glide data grid is a powerful but flexible library requiring very few concepts required to get started. The grid will need data, columns, and a \`getCellContent\` callback to convert our data into cells on demand. Because the callback is used, there is no need to pre-format the data in any particular way, so long as it can be transformed into a cell. This example uses a flat array of objects.`}),e(i,{children:` diff --git a/docs/assets/02-editing-data.stories-PvpM_AMz.js b/docs/assets/02-editing-data.stories-uMNvuR4T.js similarity index 98% rename from docs/assets/02-editing-data.stories-PvpM_AMz.js rename to docs/assets/02-editing-data.stories-uMNvuR4T.js index a52bbd501..b83c98cc9 100644 --- a/docs/assets/02-editing-data.stories-PvpM_AMz.js +++ b/docs/assets/02-editing-data.stories-uMNvuR4T.js @@ -1,4 +1,4 @@ -import{j as e,a as T}from"./marked.esm-dbrxtycE.js";import{r as i}from"./index-BMVQvedj.js";import{G as s}from"./image-window-loader-lKUISrIQ.js";import{D as h}from"./data-editor-all-2MtuC67g.js";import{S as b}from"./story-utils-K2EZnGjM.js";import{D as x,M as d,H as y,W as u}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./toConsumableArray-ppDpjNRJ.js";const W={title:"Glide-Data-Grid/Docs",decorators:[a=>e(b,{children:e(a,{})})]},f=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],m=()=>{const a=i.useRef([{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}]),E=i.useCallback(t=>{const[o,l]=t,n=a.current[l][["name","company","email","phone"][o]];return{kind:s.Text,allowOverlay:!0,displayData:n,data:n}},[]),k=i.useCallback(t=>{const[o,l]=t,n=f[l][["name","company","email","phone"][o]];return{kind:s.Text,allowOverlay:!0,displayData:n,data:n}},[]),R=i.useCallback((t,o)=>{if(o.kind!==s.Text)return;const l=["name","company","email","phone"],[r,c]=t,n=l[r];a.current[c][n]=o.data},[]),p=i.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]);return T(x,{children:[e(d,{children:` +import{j as e,a as T}from"./marked.esm-dbrxtycE.js";import{r as i}from"./index-BMVQvedj.js";import{G as s}from"./image-window-loader-aCHQvgUN.js";import{D as h}from"./data-editor-all-MRDpHEQ_.js";import{S as b}from"./story-utils-K2EZnGjM.js";import{D as x,M as d,H as y,W as u}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./toConsumableArray-ppDpjNRJ.js";const W={title:"Glide-Data-Grid/Docs",decorators:[a=>e(b,{children:e(a,{})})]},f=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],m=()=>{const a=i.useRef([{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}]),E=i.useCallback(t=>{const[o,l]=t,n=a.current[l][["name","company","email","phone"][o]];return{kind:s.Text,allowOverlay:!0,displayData:n,data:n}},[]),k=i.useCallback(t=>{const[o,l]=t,n=f[l][["name","company","email","phone"][o]];return{kind:s.Text,allowOverlay:!0,displayData:n,data:n}},[]),R=i.useCallback((t,o)=>{if(o.kind!==s.Text)return;const l=["name","company","email","phone"],[r,c]=t,n=l[r];a.current[c][n]=o.data},[]),p=i.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]);return T(x,{children:[e(d,{children:` # Editing Data Editing data is handled via callbacks. Taking the getting started example as a starting point, the \`getContent\` callback can be modified to allow editing.`}),e(y,{children:` diff --git a/docs/assets/03-grid-column.stories-DbEHOMDm.js b/docs/assets/03-grid-column.stories-ki_rf7c-.js similarity index 96% rename from docs/assets/03-grid-column.stories-DbEHOMDm.js rename to docs/assets/03-grid-column.stories-ki_rf7c-.js index 63699b6e9..bbdfa501f 100644 --- a/docs/assets/03-grid-column.stories-DbEHOMDm.js +++ b/docs/assets/03-grid-column.stories-ki_rf7c-.js @@ -1,4 +1,4 @@ -import{j as e,a as p}from"./marked.esm-dbrxtycE.js";import{r as c}from"./index-BMVQvedj.js";import{G as g,a as n}from"./image-window-loader-lKUISrIQ.js";import{D as r}from"./data-editor-all-2MtuC67g.js";import{S as w}from"./story-utils-K2EZnGjM.js";import{D as C,M as o,H as a,W as d}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./toConsumableArray-ppDpjNRJ.js";const O={title:"Glide-Data-Grid/Docs",decorators:[t=>e(w,{children:e(t,{})})]},i=()=>{const t=c.useCallback(l=>({kind:g.Text,allowOverlay:!1,displayData:l.toString(),data:l.toString()}),[]),u=c.useMemo(()=>[{title:"First",width:150},{title:"Second",width:150}],[]);return p(C,{children:[e(o,{children:"\n# Basic usage\n\n> The `GridColumn[]` passed to the `DataEditor` in the `columns` property should be memoized to avoid excessive re-rendering. These samples may not do this for the sake of brevity.\n\nThere are only two mandatory properties for each `GridColumn`: `title` and `id`. The id should be a stable id and not the index of the column. Additionally a `width` property can be provided which represents the width of the column in pixels. If a width is provided the id may be omited. This may change in a future version."}),e(a,{children:` +import{j as e,a as p}from"./marked.esm-dbrxtycE.js";import{r as c}from"./index-BMVQvedj.js";import{G as g,a as n}from"./image-window-loader-aCHQvgUN.js";import{D as r}from"./data-editor-all-MRDpHEQ_.js";import{S as w}from"./story-utils-K2EZnGjM.js";import{D as C,M as o,H as a,W as d}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./toConsumableArray-ppDpjNRJ.js";const O={title:"Glide-Data-Grid/Docs",decorators:[t=>e(w,{children:e(t,{})})]},i=()=>{const t=c.useCallback(l=>({kind:g.Text,allowOverlay:!1,displayData:l.toString(),data:l.toString()}),[]),u=c.useMemo(()=>[{title:"First",width:150},{title:"Second",width:150}],[]);return p(C,{children:[e(o,{children:"\n# Basic usage\n\n> The `GridColumn[]` passed to the `DataEditor` in the `columns` property should be memoized to avoid excessive re-rendering. These samples may not do this for the sake of brevity.\n\nThere are only two mandatory properties for each `GridColumn`: `title` and `id`. The id should be a stable id and not the index of the column. Additionally a `width` property can be provided which represents the width of the column in pixels. If a width is provided the id may be omited. This may change in a future version."}),e(a,{children:` const columns: GridColumn[] = [ { title: "First", id: "first", width: 150 }, { title: "Second", id: "second", width: 150 } diff --git a/docs/assets/04-streaming-data.stories-j11zorLW.js b/docs/assets/04-streaming-data.stories-FjbN6zdk.js similarity index 98% rename from docs/assets/04-streaming-data.stories-j11zorLW.js rename to docs/assets/04-streaming-data.stories-FjbN6zdk.js index 580234998..6d9401834 100644 --- a/docs/assets/04-streaming-data.stories-j11zorLW.js +++ b/docs/assets/04-streaming-data.stories-FjbN6zdk.js @@ -1,4 +1,4 @@ -import{j as n,a as T}from"./marked.esm-dbrxtycE.js";import{r as l}from"./index-BMVQvedj.js";import{G as y}from"./image-window-loader-lKUISrIQ.js";import{D as g}from"./data-editor-all-2MtuC67g.js";import{S as b}from"./story-utils-K2EZnGjM.js";import{D as S,M as s,H as h,W as R}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./toConsumableArray-ppDpjNRJ.js";const X={title:"Glide-Data-Grid/Docs",decorators:[t=>n(b,{children:n(t,{})})]},d=()=>{const t=l.useRef([{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332",update:0},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227",update:0},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826",update:0},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320",update:0},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472",update:0},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651",update:0},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331",update:0},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134",update:0},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194",update:0},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271",update:0},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454",update:0},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982",update:0},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444",update:0},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805",update:0},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012",update:0},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442",update:0},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883",update:0}]),o=l.useRef([{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332",update:0},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227",update:0},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826",update:0},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320",update:0},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472",update:0},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651",update:0},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331",update:0},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134",update:0},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194",update:0},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271",update:0},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454",update:0},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982",update:0},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444",update:0},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805",update:0},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012",update:0},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442",update:0},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883",update:0}]),k=l.useCallback(e=>{const[a,m]=e,c=o.current[m][["name","company","email","phone"][a]];return{kind:y.Text,allowOverlay:!0,displayData:c,data:c}},[]),E=l.useCallback(e=>{const[a,m]=e,r=t.current[m],c=r[["name","company","email","phone"][a]];return{kind:y.Text,allowOverlay:!0,displayData:c,data:c,lastUpdated:r.update}},[]),u=l.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]),p=l.useRef(null),M=()=>{var r;const e=Math.floor(Math.random()*o.current.length),a=Math.floor(Math.random()*o.current.length),m=o.current[e].email;o.current[e].email=o.current[a].email,o.current[a].email=m,(r=p.current)==null||r.updateCells([e,a].map(i=>({cell:[2,i]})))},D=()=>{var r;const e=Math.floor(Math.random()*t.current.length),a=Math.floor(Math.random()*t.current.length),m=t.current[e].email;t.current[e].email=t.current[a].email,t.current[a].email=m,t.current[e].update=performance.now(),t.current[a].update=performance.now(),(r=p.current)==null||r.updateCells([e,a].map(i=>({cell:[2,i]})))};return T(S,{children:[n(s,{children:` +import{j as n,a as T}from"./marked.esm-dbrxtycE.js";import{r as l}from"./index-BMVQvedj.js";import{G as y}from"./image-window-loader-aCHQvgUN.js";import{D as g}from"./data-editor-all-MRDpHEQ_.js";import{S as b}from"./story-utils-K2EZnGjM.js";import{D as S,M as s,H as h,W as R}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./toConsumableArray-ppDpjNRJ.js";const X={title:"Glide-Data-Grid/Docs",decorators:[t=>n(b,{children:n(t,{})})]},d=()=>{const t=l.useRef([{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332",update:0},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227",update:0},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826",update:0},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320",update:0},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472",update:0},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651",update:0},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331",update:0},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134",update:0},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194",update:0},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271",update:0},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454",update:0},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982",update:0},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444",update:0},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805",update:0},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012",update:0},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442",update:0},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883",update:0}]),o=l.useRef([{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332",update:0},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227",update:0},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826",update:0},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320",update:0},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472",update:0},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651",update:0},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331",update:0},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134",update:0},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194",update:0},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271",update:0},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454",update:0},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982",update:0},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444",update:0},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805",update:0},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012",update:0},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442",update:0},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883",update:0}]),k=l.useCallback(e=>{const[a,m]=e,c=o.current[m][["name","company","email","phone"][a]];return{kind:y.Text,allowOverlay:!0,displayData:c,data:c}},[]),E=l.useCallback(e=>{const[a,m]=e,r=t.current[m],c=r[["name","company","email","phone"][a]];return{kind:y.Text,allowOverlay:!0,displayData:c,data:c,lastUpdated:r.update}},[]),u=l.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]),p=l.useRef(null),M=()=>{var r;const e=Math.floor(Math.random()*o.current.length),a=Math.floor(Math.random()*o.current.length),m=o.current[e].email;o.current[e].email=o.current[a].email,o.current[a].email=m,(r=p.current)==null||r.updateCells([e,a].map(i=>({cell:[2,i]})))},D=()=>{var r;const e=Math.floor(Math.random()*t.current.length),a=Math.floor(Math.random()*t.current.length),m=t.current[e].email;t.current[e].email=t.current[a].email,t.current[a].email=m,t.current[e].update=performance.now(),t.current[a].update=performance.now(),(r=p.current)==null||r.updateCells([e,a].map(i=>({cell:[2,i]})))};return T(S,{children:[n(s,{children:` # Streaming Data > Glide Data Grid is capable of streaming hundreds of thousands of updates per second. You won't need that, but every millisecond the grid doesn't take is another millisecond your app has to process data and remain responsive. diff --git a/docs/assets/06-search.stories-1I9KmDgu.js b/docs/assets/06-search.stories-SV1nFg-6.js similarity index 97% rename from docs/assets/06-search.stories-1I9KmDgu.js rename to docs/assets/06-search.stories-SV1nFg-6.js index a619e9e92..679b944de 100644 --- a/docs/assets/06-search.stories-1I9KmDgu.js +++ b/docs/assets/06-search.stories-SV1nFg-6.js @@ -1,4 +1,4 @@ -import{j as e,a as b}from"./marked.esm-dbrxtycE.js";import{r as o}from"./index-BMVQvedj.js";import{G as k}from"./image-window-loader-lKUISrIQ.js";import{D as i}from"./data-editor-all-2MtuC67g.js";import{S as E}from"./story-utils-K2EZnGjM.js";import{D as R,M as s,H as h,W as m}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./toConsumableArray-ppDpjNRJ.js";const B={title:"Glide-Data-Grid/Docs",decorators:[n=>e(E,{children:e(n,{})})]},t=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],a=()=>{const n=o.useCallback(g=>{const[C,w]=g,c=t[w][["name","company","email","phone"][C]];return{kind:k.Text,allowOverlay:!0,displayData:c,data:c}},[]),r=o.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]),[u,l]=o.useState(!1),y=o.useCallback(()=>l(!1),[]);return b(R,{children:[e(s,{children:` +import{j as e,a as b}from"./marked.esm-dbrxtycE.js";import{r as o}from"./index-BMVQvedj.js";import{G as k}from"./image-window-loader-aCHQvgUN.js";import{D as i}from"./data-editor-all-MRDpHEQ_.js";import{S as E}from"./story-utils-K2EZnGjM.js";import{D as R,M as s,H as h,W as m}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./toConsumableArray-ppDpjNRJ.js";const B={title:"Glide-Data-Grid/Docs",decorators:[n=>e(E,{children:e(n,{})})]},t=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],a=()=>{const n=o.useCallback(g=>{const[C,w]=g,c=t[w][["name","company","email","phone"][C]];return{kind:k.Text,allowOverlay:!0,displayData:c,data:c}},[]),r=o.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]),[u,l]=o.useState(!1),y=o.useCallback(()=>l(!1),[]);return b(R,{children:[e(s,{children:` # Search Search is a controlled property in Glide Data Grid. Triggering the search interface is up to the application but once triggered search is handled interally on the data grid. Search always depends on a properly implemented \`getCellsForSelection\`.`}),e(h,{children:` diff --git a/docs/assets/07-column-grouping.stories-ohXMXwJK.js b/docs/assets/07-column-grouping.stories-KtsWGblh.js similarity index 96% rename from docs/assets/07-column-grouping.stories-ohXMXwJK.js rename to docs/assets/07-column-grouping.stories-KtsWGblh.js index d0b9da679..11117b902 100644 --- a/docs/assets/07-column-grouping.stories-ohXMXwJK.js +++ b/docs/assets/07-column-grouping.stories-KtsWGblh.js @@ -1,4 +1,4 @@ -import{j as n,a as u}from"./marked.esm-dbrxtycE.js";import{r}from"./index-BMVQvedj.js";import{G as h}from"./image-window-loader-lKUISrIQ.js";import{D as y}from"./data-editor-all-2MtuC67g.js";import{S as g}from"./story-utils-K2EZnGjM.js";import{D as C,M as E,H as x,W as R}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./toConsumableArray-ppDpjNRJ.js";const L={title:"Glide-Data-Grid/Docs",decorators:[o=>n(g,{children:n(o,{})})]},t=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],e=()=>{const o=r.useCallback(c=>{const[s,d]=c,a=t[d][["name","company","email","phone"][s]];return{kind:h.Text,allowOverlay:!0,displayData:a,data:a}},[]),p=r.useMemo(()=>[{title:"Name",id:"name",group:"Core"},{title:"Company",id:"company",group:"Core"},{title:"Email",id:"email",group:"Extra"},{title:"Phone",id:"phone",group:"Extra"}],[]);return u(C,{children:[n(E,{children:` +import{j as n,a as u}from"./marked.esm-dbrxtycE.js";import{r}from"./index-BMVQvedj.js";import{G as h}from"./image-window-loader-aCHQvgUN.js";import{D as y}from"./data-editor-all-MRDpHEQ_.js";import{S as g}from"./story-utils-K2EZnGjM.js";import{D as C,M as E,H as x,W as R}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./toConsumableArray-ppDpjNRJ.js";const L={title:"Glide-Data-Grid/Docs",decorators:[o=>n(g,{children:n(o,{})})]},t=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],e=()=>{const o=r.useCallback(c=>{const[s,d]=c,a=t[d][["name","company","email","phone"][s]];return{kind:h.Text,allowOverlay:!0,displayData:a,data:a}},[]),p=r.useMemo(()=>[{title:"Name",id:"name",group:"Core"},{title:"Company",id:"company",group:"Core"},{title:"Email",id:"email",group:"Extra"},{title:"Phone",id:"phone",group:"Extra"}],[]);return u(C,{children:[n(E,{children:` # Column Grouping Columns can be grouped by assinging them a group. Easy peasy.`}),n(x,{children:` diff --git a/docs/assets/08-theming.stories-AEh-daJ9.js b/docs/assets/08-theming.stories-FgO0Jz0T.js similarity index 98% rename from docs/assets/08-theming.stories-AEh-daJ9.js rename to docs/assets/08-theming.stories-FgO0Jz0T.js index 2ecc00500..a24cf42ce 100644 --- a/docs/assets/08-theming.stories-AEh-daJ9.js +++ b/docs/assets/08-theming.stories-FgO0Jz0T.js @@ -1,4 +1,4 @@ -import{j as e,a as v}from"./marked.esm-dbrxtycE.js";import{r as l}from"./index-BMVQvedj.js";import{G as p}from"./image-window-loader-lKUISrIQ.js";import{D as h}from"./data-editor-all-2MtuC67g.js";import{S as k}from"./story-utils-K2EZnGjM.js";import{D,M as g,H as s,W as c}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./toConsumableArray-ppDpjNRJ.js";const N={title:"Glide-Data-Grid/Docs",decorators:[t=>e(k,{children:e(t,{})})]},n=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],a=()=>{const t=l.useCallback(o=>{const[i,d]=o,r=n[d][["name","company","email","phone"][i]];return{kind:p.Text,allowOverlay:!0,displayData:r,data:r}},[]),T=l.useCallback(o=>{const[i,d]=o,r=n[d][["name","company","email","phone"][i]];let b;return i===1&&d===1&&(b={textDark:"#FF0000"}),{kind:p.Text,allowOverlay:!0,displayData:r,data:r,themeOverride:b}},[]),u=l.useCallback(o=>{if(o%2===0)return{bgCell:"#F9FDFF"}},[]),w=l.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]),m=l.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",themeOverride:{textDark:"#225588",baseFontStyle:"600 13px"},id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]);return v(D,{children:[e(g,{children:` +import{j as e,a as v}from"./marked.esm-dbrxtycE.js";import{r as l}from"./index-BMVQvedj.js";import{G as p}from"./image-window-loader-aCHQvgUN.js";import{D as h}from"./data-editor-all-MRDpHEQ_.js";import{S as k}from"./story-utils-K2EZnGjM.js";import{D,M as g,H as s,W as c}from"./doc-wrapper-m1-LpzDL.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./toConsumableArray-ppDpjNRJ.js";const N={title:"Glide-Data-Grid/Docs",decorators:[t=>e(k,{children:e(t,{})})]},n=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],a=()=>{const t=l.useCallback(o=>{const[i,d]=o,r=n[d][["name","company","email","phone"][i]];return{kind:p.Text,allowOverlay:!0,displayData:r,data:r}},[]),T=l.useCallback(o=>{const[i,d]=o,r=n[d][["name","company","email","phone"][i]];let b;return i===1&&d===1&&(b={textDark:"#FF0000"}),{kind:p.Text,allowOverlay:!0,displayData:r,data:r,themeOverride:b}},[]),u=l.useCallback(o=>{if(o%2===0)return{bgCell:"#F9FDFF"}},[]),w=l.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]),m=l.useMemo(()=>[{title:"Name",id:"name"},{title:"Company",themeOverride:{textDark:"#225588",baseFontStyle:"600 13px"},id:"company"},{title:"Email",id:"email"},{title:"Phone",id:"phone"}],[]);return v(D,{children:[e(g,{children:` # Theming Theming the Glide Data Grid is a cascaded through 5 levels diff --git a/docs/assets/09-menus.stories-AlLtaAqR.js b/docs/assets/09-menus.stories-oEedqkBY.js similarity index 98% rename from docs/assets/09-menus.stories-AlLtaAqR.js rename to docs/assets/09-menus.stories-oEedqkBY.js index ff8546a34..539a70af7 100644 --- a/docs/assets/09-menus.stories-AlLtaAqR.js +++ b/docs/assets/09-menus.stories-oEedqkBY.js @@ -1,4 +1,4 @@ -import{j as n,a as s}from"./marked.esm-dbrxtycE.js";import{r as a}from"./index-BMVQvedj.js";import{G as S}from"./image-window-loader-lKUISrIQ.js";import{D as h}from"./data-editor-all-2MtuC67g.js";import{S as f}from"./story-utils-K2EZnGjM.js";import{D as O,M as p,H as g,W as b}from"./doc-wrapper-m1-LpzDL.js";import{u as E}from"./react-laag.esm-PpDllAFI.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./toConsumableArray-ppDpjNRJ.js";import"./index-wocATsGp.js";const _={title:"Glide-Data-Grid/Docs",decorators:[r=>n(f,{children:n(r,{})})]},l=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],i=()=>{const r=a.useCallback(t=>{const[o,H]=t,m=l[H][["name","company","email","phone"][o]];return{kind:S.Text,allowOverlay:!0,displayData:m,data:m}},[]),d=a.useMemo(()=>[{title:"Name",id:"name",hasMenu:!0},{title:"Company",id:"company",hasMenu:!0},{title:"Email",id:"email",hasMenu:!0},{title:"Phone",id:"phone",hasMenu:!0}],[]),C=a.useCallback((t,o)=>{window.alert("Header menu clicked "+t+JSON.stringify(o))},[]),[e,u]=a.useState(),k=a.useCallback((t,o)=>{u({col:t,bounds:o})},[]),{renderLayer:R,layerProps:c}=E({isOpen:e!==void 0,triggerOffset:4,onOutsideClick:()=>u(void 0),trigger:{getBounds:()=>({bottom:((e==null?void 0:e.bounds.y)??0)+((e==null?void 0:e.bounds.height)??0),height:(e==null?void 0:e.bounds.height)??0,left:(e==null?void 0:e.bounds.x)??0,right:((e==null?void 0:e.bounds.x)??0)+((e==null?void 0:e.bounds.width)??0),top:(e==null?void 0:e.bounds.y)??0,width:(e==null?void 0:e.bounds.width)??0})},placement:"bottom-start",auto:!0,possiblePlacements:["bottom-start","bottom-end"]});return s(O,{children:[n(p,{children:` +import{j as n,a as s}from"./marked.esm-dbrxtycE.js";import{r as a}from"./index-BMVQvedj.js";import{G as S}from"./image-window-loader-aCHQvgUN.js";import{D as h}from"./data-editor-all-MRDpHEQ_.js";import{S as f}from"./story-utils-K2EZnGjM.js";import{D as O,M as p,H as g,W as b}from"./doc-wrapper-m1-LpzDL.js";import{u as E}from"./react-laag.esm-PpDllAFI.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./toConsumableArray-ppDpjNRJ.js";import"./index-wocATsGp.js";const _={title:"Glide-Data-Grid/Docs",decorators:[r=>n(f,{children:n(r,{})})]},l=[{name:"Deidre Morris",company:"GONKLE",email:"deidremorris@gonkle.com",phone:"+1 (867) 507-3332"},{name:"Sheryl Craig",company:"EVENTAGE",email:"sherylcraig@eventage.com",phone:"+1 (869) 520-2227"},{name:"Lidia Bowers",company:"ANOCHA",email:"lidiabowers@anocha.com",phone:"+1 (808) 414-3826"},{name:"Jones Norton",company:"REPETWIRE",email:"jonesnorton@repetwire.com",phone:"+1 (875) 582-3320"},{name:"Lula Bruce",company:"COMDOM",email:"lulabruce@comdom.com",phone:"+1 (873) 452-2472"},{name:"Larsen Montgomery",company:"SQUISH",email:"larsenmontgomery@squish.com",phone:"+1 (893) 482-3651"},{name:"Becky Bright",company:"COMCUR",email:"beckybright@comcur.com",phone:"+1 (879) 494-2331"},{name:"Charlotte Rowland",company:"FROLIX",email:"charlotterowland@frolix.com",phone:"+1 (861) 439-2134"},{name:"Sonya Hensley",company:"GEEKETRON",email:"sonyahensley@geeketron.com",phone:"+1 (802) 553-2194"},{name:"Stephenson Guthrie",company:"EXOSWITCH",email:"stephensonguthrie@exoswitch.com",phone:"+1 (903) 449-3271"},{name:"Mcmillan Cline",company:"TURNLING",email:"mcmillancline@turnling.com",phone:"+1 (982) 496-2454"},{name:"Kemp Davis",company:"TETRATREX",email:"kempdavis@tetratrex.com",phone:"+1 (859) 594-2982"},{name:"Matilda Levy",company:"SLOFAST",email:"matildalevy@slofast.com",phone:"+1 (841) 521-2444"},{name:"Hattie Simpson",company:"COMTRAK",email:"hattiesimpson@comtrak.com",phone:"+1 (962) 587-3805"},{name:"Kinney Munoz",company:"IDETICA",email:"kinneymunoz@idetica.com",phone:"+1 (921) 513-2012"},{name:"Lambert Raymond",company:"TURNABOUT",email:"lambertraymond@turnabout.com",phone:"+1 (919) 519-2442"},{name:"Bryant Dunlap",company:"BYTREX",email:"bryantdunlap@bytrex.com",phone:"+1 (872) 583-2883"}],i=()=>{const r=a.useCallback(t=>{const[o,H]=t,m=l[H][["name","company","email","phone"][o]];return{kind:S.Text,allowOverlay:!0,displayData:m,data:m}},[]),d=a.useMemo(()=>[{title:"Name",id:"name",hasMenu:!0},{title:"Company",id:"company",hasMenu:!0},{title:"Email",id:"email",hasMenu:!0},{title:"Phone",id:"phone",hasMenu:!0}],[]),C=a.useCallback((t,o)=>{window.alert("Header menu clicked "+t+JSON.stringify(o))},[]),[e,u]=a.useState(),k=a.useCallback((t,o)=>{u({col:t,bounds:o})},[]),{renderLayer:R,layerProps:c}=E({isOpen:e!==void 0,triggerOffset:4,onOutsideClick:()=>u(void 0),trigger:{getBounds:()=>({bottom:((e==null?void 0:e.bounds.y)??0)+((e==null?void 0:e.bounds.height)??0),height:(e==null?void 0:e.bounds.height)??0,left:(e==null?void 0:e.bounds.x)??0,right:((e==null?void 0:e.bounds.x)??0)+((e==null?void 0:e.bounds.width)??0),top:(e==null?void 0:e.bounds.y)??0,width:(e==null?void 0:e.bounds.width)??0})},placement:"bottom-start",auto:!0,possiblePlacements:["bottom-start","bottom-end"]});return s(O,{children:[n(p,{children:` # Menus Glide Data Grid doesn't come with built in menus. Instead it is evented and ready to work with whatever menus you want diff --git a/docs/assets/add-column.stories-scy9jOqX.js b/docs/assets/add-column.stories-coHPOkoR.js similarity index 76% rename from docs/assets/add-column.stories-scy9jOqX.js rename to docs/assets/add-column.stories-coHPOkoR.js index 4deaabd85..8229dda21 100644 --- a/docs/assets/add-column.stories-scy9jOqX.js +++ b/docs/assets/add-column.stories-coHPOkoR.js @@ -1,4 +1,4 @@ -import{j as r,a as l,F as i}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as c}from"./data-editor-all-2MtuC67g.js";import{B as p,D as u,M as d,u as C,d as f}from"./utils-J-I08TtD.js";import{S as g}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const B={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>r(g,{children:r(p,{title:"Add and remove columns",description:l(i,{children:[r(u,{children:"You can add and remove columns at your disposal"}),r(d,{children:"Use the story's controls to change the number of columns"})]}),children:r(t,{})})})]},o=t=>{const{cols:a,getCellContent:m}=C(t.columnsCount);return r(c,{...f,rowMarkers:"number",getCellContent:m,experimental:{strict:!0},columns:a,rows:1e4})};o.args={columnsCount:10};o.argTypes={columnsCount:{control:{type:"range",min:2,max:200}}};var e,s,n;o.parameters={...o.parameters,docs:{...(e=o.parameters)==null?void 0:e.docs,source:{originalSource:`p => { +import{j as r,a as l,F as i}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as c}from"./data-editor-all-MRDpHEQ_.js";import{B as p,D as u,M as d,u as C,d as f}from"./utils-0sbaJdQp.js";import{S as g}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const B={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>r(g,{children:r(p,{title:"Add and remove columns",description:l(i,{children:[r(u,{children:"You can add and remove columns at your disposal"}),r(d,{children:"Use the story's controls to change the number of columns"})]}),children:r(t,{})})})]},o=t=>{const{cols:a,getCellContent:m}=C(t.columnsCount);return r(c,{...f,rowMarkers:"number",getCellContent:m,experimental:{strict:!0},columns:a,rows:1e4})};o.args={columnsCount:10};o.argTypes={columnsCount:{control:{type:"range",min:2,max:200}}};var e,s,n;o.parameters={...o.parameters,docs:{...(e=o.parameters)==null?void 0:e.docs,source:{originalSource:`p => { const { cols, getCellContent diff --git a/docs/assets/add-data-to-middle.stories-ysWJkolO.js b/docs/assets/add-data-to-middle.stories-CfzDpjdK.js similarity index 86% rename from docs/assets/add-data-to-middle.stories-ysWJkolO.js rename to docs/assets/add-data-to-middle.stories-CfzDpjdK.js index b19d6c40a..6f854e56d 100644 --- a/docs/assets/add-data-to-middle.stories-ysWJkolO.js +++ b/docs/assets/add-data-to-middle.stories-CfzDpjdK.js @@ -1,4 +1,4 @@ -import{j as n,a as d,F as R}from"./marked.esm-dbrxtycE.js";import{R as c}from"./index-BMVQvedj.js";import{D as h}from"./data-editor-all-2MtuC67g.js";import{B as g,D as y,M as D,K as k,u as M,c as b,d as A}from"./utils-J-I08TtD.js";import{S as V}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const z={title:"Glide-Data-Grid/DataEditor Demos",decorators:[s=>n(V,{children:n(g,{title:"Add data to middle",description:d(R,{children:[n(y,{children:"You can return a different location to have the new row append take place."}),d(D,{children:["Note that ",n(k,{children:"insertIndex"}),' is zero-based while the number column on the left side of the grid is one-based, so inserting at index "4" creates a new row at "5"']})]}),children:n(s,{})})})]},o=s=>{const{cols:w,getCellContent:a,setCellValueRaw:l,setCellValue:C}=M(60,!1),[i,x]=c.useState(50),r=s.insertIndex,f=c.useCallback(async()=>{for(let e=i;e>r;e--)for(let t=0;t<6;t++)l([t,e],a([t,e-1]));for(let e=0;e<6;e++){const t=a([e,r]);l([e,r],b(t))}return x(e=>e+1),r},[a,i,l,r]);return n(h,{...A,getCellContent:a,columns:w,rowMarkers:"both",onCellEdited:C,trailingRowOptions:{hint:"New row...",sticky:!0,tint:!0},rows:i,onRowAppended:f})};o.args={insertIndex:10};o.argTypes={insertIndex:{control:{type:"range",min:1,max:48}}};var p,m,u;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`p => { +import{j as n,a as d,F as R}from"./marked.esm-dbrxtycE.js";import{R as c}from"./index-BMVQvedj.js";import{D as h}from"./data-editor-all-MRDpHEQ_.js";import{B as g,D as y,M as D,K as k,u as M,c as b,d as A}from"./utils-0sbaJdQp.js";import{S as V}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const z={title:"Glide-Data-Grid/DataEditor Demos",decorators:[s=>n(V,{children:n(g,{title:"Add data to middle",description:d(R,{children:[n(y,{children:"You can return a different location to have the new row append take place."}),d(D,{children:["Note that ",n(k,{children:"insertIndex"}),' is zero-based while the number column on the left side of the grid is one-based, so inserting at index "4" creates a new row at "5"']})]}),children:n(s,{})})})]},o=s=>{const{cols:w,getCellContent:a,setCellValueRaw:l,setCellValue:C}=M(60,!1),[i,x]=c.useState(50),r=s.insertIndex,f=c.useCallback(async()=>{for(let e=i;e>r;e--)for(let t=0;t<6;t++)l([t,e],a([t,e-1]));for(let e=0;e<6;e++){const t=a([e,r]);l([e,r],b(t))}return x(e=>e+1),r},[a,i,l,r]);return n(h,{...A,getCellContent:a,columns:w,rowMarkers:"both",onCellEdited:C,trailingRowOptions:{hint:"New row...",sticky:!0,tint:!0},rows:i,onRowAppended:f})};o.args={insertIndex:10};o.argTypes={insertIndex:{control:{type:"range",min:1,max:48}}};var p,m,u;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`p => { const { cols, getCellContent, diff --git a/docs/assets/add-data-to-top.stories-yPyeuJec.js b/docs/assets/add-data-to-top.stories-dpZWH635.js similarity index 87% rename from docs/assets/add-data-to-top.stories-yPyeuJec.js rename to docs/assets/add-data-to-top.stories-dpZWH635.js index b60ca6eb8..b084a523f 100644 --- a/docs/assets/add-data-to-top.stories-yPyeuJec.js +++ b/docs/assets/add-data-to-top.stories-dpZWH635.js @@ -1,4 +1,4 @@ -import{j as o,F as C}from"./marked.esm-dbrxtycE.js";import{R as c}from"./index-BMVQvedj.js";import{D as R}from"./data-editor-all-2MtuC67g.js";import{B as f,D as h,u as D,c as g,d as x}from"./utils-J-I08TtD.js";import{S as y}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[l=>o(y,{children:o(f,{title:"Add data",description:o(C,{children:o(h,{children:"You can return a different location to have the new row append take place."})}),children:o(l,{})})})]},r=()=>{const{cols:l,getCellContent:n,setCellValueRaw:a,setCellValue:u}=D(60,!1),[s,m]=c.useState(50),w=c.useCallback(async()=>{for(let e=s;e>0;e--)for(let t=0;t<6;t++)a([t,e],n([t,e-1]));for(let e=0;e<6;e++){const t=n([e,0]);a([e,0],g(t))}return m(e=>e+1),"top"},[n,s,a]);return o(R,{...x,getCellContent:n,columns:l,rowMarkers:"both",onCellEdited:u,trailingRowOptions:{hint:"New row...",sticky:!0,tint:!0},rows:s,onRowAppended:w})};var i,p,d;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`() => { +import{j as o,F as C}from"./marked.esm-dbrxtycE.js";import{R as c}from"./index-BMVQvedj.js";import{D as R}from"./data-editor-all-MRDpHEQ_.js";import{B as f,D as h,u as D,c as g,d as x}from"./utils-0sbaJdQp.js";import{S as y}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[l=>o(y,{children:o(f,{title:"Add data",description:o(C,{children:o(h,{children:"You can return a different location to have the new row append take place."})}),children:o(l,{})})})]},r=()=>{const{cols:l,getCellContent:n,setCellValueRaw:a,setCellValue:u}=D(60,!1),[s,m]=c.useState(50),w=c.useCallback(async()=>{for(let e=s;e>0;e--)for(let t=0;t<6;t++)a([t,e],n([t,e-1]));for(let e=0;e<6;e++){const t=n([e,0]);a([e,0],g(t))}return m(e=>e+1),"top"},[n,s,a]);return o(R,{...x,getCellContent:n,columns:l,rowMarkers:"both",onCellEdited:u,trailingRowOptions:{hint:"New row...",sticky:!0,tint:!0},rows:s,onRowAppended:w})};var i,p,d;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/add-data.stories-cLdvbjoj.js b/docs/assets/add-data.stories-14Dc9SRb.js similarity index 88% rename from docs/assets/add-data.stories-cLdvbjoj.js rename to docs/assets/add-data.stories-14Dc9SRb.js index d42d80a08..bb297200f 100644 --- a/docs/assets/add-data.stories-cLdvbjoj.js +++ b/docs/assets/add-data.stories-14Dc9SRb.js @@ -1,4 +1,4 @@ -import{j as t,a as c,F as R}from"./marked.esm-dbrxtycE.js";import{R as i}from"./index-BMVQvedj.js";import{D as g}from"./data-editor-all-2MtuC67g.js";import{B as f,D,M as k,K as A,u as E,c as b,d as V}from"./utils-J-I08TtD.js";import{S as j}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const H={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>t(j,{children:t(f,{title:"Add data",description:c(R,{children:[t(D,{children:"Data can be added by clicking on the trailing row."}),c(k,{children:["Keyboard is also supported, just navigate past the last row and press"," ",t(A,{children:"Enter"})]})]}),children:t(o,{})})})]},n=()=>{const{cols:o,getCellContent:a,setCellValueRaw:l,setCellValue:w}=E(60,!1),[s,m]=i.useState(50),h=i.useCallback(()=>{const r=s;for(let e=0;ee+1)},[o.length,a,s,l]);return t(g,{...V,getCellContent:a,columns:o,rowMarkers:"both",onPaste:!0,onCellEdited:w,trailingRowOptions:{sticky:!1,tint:!0,hint:"New row..."},rows:s,onRowAppended:h})};var d,u,p;n.parameters={...n.parameters,docs:{...(d=n.parameters)==null?void 0:d.docs,source:{originalSource:`() => { +import{j as t,a as c,F as R}from"./marked.esm-dbrxtycE.js";import{R as i}from"./index-BMVQvedj.js";import{D as g}from"./data-editor-all-MRDpHEQ_.js";import{B as f,D,M as k,K as A,u as E,c as b,d as V}from"./utils-0sbaJdQp.js";import{S as j}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const H={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>t(j,{children:t(f,{title:"Add data",description:c(R,{children:[t(D,{children:"Data can be added by clicking on the trailing row."}),c(k,{children:["Keyboard is also supported, just navigate past the last row and press"," ",t(A,{children:"Enter"})]})]}),children:t(o,{})})})]},n=()=>{const{cols:o,getCellContent:a,setCellValueRaw:l,setCellValue:w}=E(60,!1),[s,m]=i.useState(50),h=i.useCallback(()=>{const r=s;for(let e=0;ee+1)},[o.length,a,s,l]);return t(g,{...V,getCellContent:a,columns:o,rowMarkers:"both",onPaste:!0,onCellEdited:w,trailingRowOptions:{sticky:!1,tint:!0,hint:"New row..."},rows:s,onRowAppended:h})};var d,u,p;n.parameters={...n.parameters,docs:{...(d=n.parameters)==null?void 0:d.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/all-cell-kinds.stories-7gVCFxUQ.js b/docs/assets/all-cell-kinds.stories-fsQtSzKV.js similarity index 78% rename from docs/assets/all-cell-kinds.stories-7gVCFxUQ.js rename to docs/assets/all-cell-kinds.stories-fsQtSzKV.js index 23fdf7a70..02a6a43cb 100644 --- a/docs/assets/all-cell-kinds.stories-7gVCFxUQ.js +++ b/docs/assets/all-cell-kinds.stories-fsQtSzKV.js @@ -1,4 +1,4 @@ -import{j as e,a as d}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as m}from"./data-editor-all-2MtuC67g.js";import{B as p,D as c,P as u,a as C,d as h}from"./utils-J-I08TtD.js";import{S as g}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const V={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(g,{children:e(p,{title:"Lotsa cell kinds",description:d(c,{children:["Data grid supports plenty cell kinds. Anything under ",e(u,{children:"GridCellKind"}),"."]}),children:e(o,{})})})]},t=()=>{const{cols:o,getCellContent:s,onColumnResize:i,setCellValue:a}=C();return e(m,{...h,getCellContent:s,columns:o,onCellEdited:a,onPaste:!0,onColumnResize:i,highlightRegions:[{color:"#ff00ff33",range:{x:1,y:1,width:3,height:3}}],rows:1e3})};var l,r,n;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`() => { +import{j as e,a as d}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as m}from"./data-editor-all-MRDpHEQ_.js";import{B as p,D as c,P as u,a as C,d as h}from"./utils-0sbaJdQp.js";import{S as g}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const V={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(g,{children:e(p,{title:"Lotsa cell kinds",description:d(c,{children:["Data grid supports plenty cell kinds. Anything under ",e(u,{children:"GridCellKind"}),"."]}),children:e(o,{})})})]},t=()=>{const{cols:o,getCellContent:s,onColumnResize:i,setCellValue:a}=C();return e(m,{...h,getCellContent:s,columns:o,onCellEdited:a,onPaste:!0,onColumnResize:i,highlightRegions:[{color:"#ff00ff33",range:{x:1,y:1,width:3,height:3}}],rows:1e3})};var l,r,n;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/append-row-handle.stories-07fu_RVb.js b/docs/assets/append-row-handle.stories-YQyg-27A.js similarity index 88% rename from docs/assets/append-row-handle.stories-07fu_RVb.js rename to docs/assets/append-row-handle.stories-YQyg-27A.js index 647334605..8f659d695 100644 --- a/docs/assets/append-row-handle.stories-07fu_RVb.js +++ b/docs/assets/append-row-handle.stories-YQyg-27A.js @@ -1,4 +1,4 @@ -import{j as e,a as c,F as k}from"./marked.esm-dbrxtycE.js";import{R as n}from"./index-BMVQvedj.js";import{D}from"./data-editor-all-2MtuC67g.js";import{u as N,c as y,B as A,D as b,P as p,M as P,K as E,d as M}from"./utils-J-I08TtD.js";import{S as V}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const z={title:"Glide-Data-Grid/DataEditor Demos",decorators:[a=>e(V,{children:e(a,{})})]},r=()=>{const{cols:a,getCellContent:l,setCellValueRaw:d,setCellValue:R}=N(60,!1),[s,f]=n.useState(50),i=n.useRef(null),C=n.useCallback(()=>{var t;(t=i.current)==null||t.appendRow(3,!1)},[i]),g=n.useCallback(()=>{const t=s;for(let o=0;o<6;o++){const h=l([o,t]);d([o,t],y(h))}f(o=>o+1)},[l,s,d]);return e(A,{title:"appendRow Ref",description:c(k,{children:[c(b,{children:["Adding data can also be triggered from outside of ",e(p,{children:"DataEditor"})]}),c(P,{children:["By calling ",e(p,{children:"appendRow"})," on a ",e(p,{children:"ref"})," to your grid, you can trigger the append elsewhere, like this ",e(E,{onClick:C,children:"Append"})," button"]})]}),children:e(D,{...M,ref:i,getCellContent:l,columns:a,rowMarkers:"both",onCellEdited:R,trailingRowOptions:{hint:"New row...",sticky:!0,tint:!0},rows:s,onRowAppended:g})})};var u,m,w;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`() => { +import{j as e,a as c,F as k}from"./marked.esm-dbrxtycE.js";import{R as n}from"./index-BMVQvedj.js";import{D}from"./data-editor-all-MRDpHEQ_.js";import{u as N,c as y,B as A,D as b,P as p,M as P,K as E,d as M}from"./utils-0sbaJdQp.js";import{S as V}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const z={title:"Glide-Data-Grid/DataEditor Demos",decorators:[a=>e(V,{children:e(a,{})})]},r=()=>{const{cols:a,getCellContent:l,setCellValueRaw:d,setCellValue:R}=N(60,!1),[s,f]=n.useState(50),i=n.useRef(null),C=n.useCallback(()=>{var t;(t=i.current)==null||t.appendRow(3,!1)},[i]),g=n.useCallback(()=>{const t=s;for(let o=0;o<6;o++){const h=l([o,t]);d([o,t],y(h))}f(o=>o+1)},[l,s,d]);return e(A,{title:"appendRow Ref",description:c(k,{children:[c(b,{children:["Adding data can also be triggered from outside of ",e(p,{children:"DataEditor"})]}),c(P,{children:["By calling ",e(p,{children:"appendRow"})," on a ",e(p,{children:"ref"})," to your grid, you can trigger the append elsewhere, like this ",e(E,{onClick:C,children:"Append"})," button"]})]}),children:e(D,{...M,ref:i,getCellContent:l,columns:a,rowMarkers:"both",onCellEdited:R,trailingRowOptions:{hint:"New row...",sticky:!0,tint:!0},rows:s,onRowAppended:g})})};var u,m,w;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/automatic-row-markers.stories-Y6l77uHg.js b/docs/assets/automatic-row-markers.stories-I-TgNR_X.js similarity index 83% rename from docs/assets/automatic-row-markers.stories-Y6l77uHg.js rename to docs/assets/automatic-row-markers.stories-I-TgNR_X.js index 1934e59ab..9574d4f9e 100644 --- a/docs/assets/automatic-row-markers.stories-Y6l77uHg.js +++ b/docs/assets/automatic-row-markers.stories-I-TgNR_X.js @@ -1,4 +1,4 @@ -import{j as e,a as t,F as m}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as p}from"./data-editor-all-2MtuC67g.js";import{u as d,B as u,D as k,P as h,M as w,K as a,d as M}from"./utils-J-I08TtD.js";import{S as f}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const W={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(f,{children:e(o,{})})]},r=()=>{const{cols:o,getCellContent:c}=d(6),l=e(p,{...M,rowMarkers:"checkbox-visible",getCellContent:c,columns:o,rows:1e3});return e(u,{title:"Automatic Row Markers",description:t(m,{children:[t(k,{children:["You can enable row markers with rich selection behavior using the"," ",e(h,{children:"rowMarkers"})," prop."]}),t(w,{children:["Use ",e(a,{children:"⇧"})," + click to make range selections, and ",e(a,{children:"Ctrl"})," (",e(a,{children:"⌘"})," on Mac) + click to add/remove individual rows."]})]}),children:l})};var i,s,n;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`() => { +import{j as e,a as t,F as m}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as p}from"./data-editor-all-MRDpHEQ_.js";import{u as d,B as u,D as k,P as h,M as w,K as a,d as M}from"./utils-0sbaJdQp.js";import{S as f}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const W={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(f,{children:e(o,{})})]},r=()=>{const{cols:o,getCellContent:c}=d(6),l=e(p,{...M,rowMarkers:"checkbox-visible",getCellContent:c,columns:o,rows:1e3});return e(u,{title:"Automatic Row Markers",description:t(m,{children:[t(k,{children:["You can enable row markers with rich selection behavior using the"," ",e(h,{children:"rowMarkers"})," prop."]}),t(w,{children:["Use ",e(a,{children:"⇧"})," + click to make range selections, and ",e(a,{children:"Ctrl"})," (",e(a,{children:"⌘"})," on Mac) + click to add/remove individual rows."]})]}),children:l})};var i,s,n;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/built-in-search.stories-fmbphhmC.js b/docs/assets/built-in-search.stories-v39F_B-_.js similarity index 88% rename from docs/assets/built-in-search.stories-fmbphhmC.js rename to docs/assets/built-in-search.stories-v39F_B-_.js index 4437bc5cb..2ae59b040 100644 --- a/docs/assets/built-in-search.stories-fmbphhmC.js +++ b/docs/assets/built-in-search.stories-v39F_B-_.js @@ -1,4 +1,4 @@ -import{j as e,a as n,F as y}from"./marked.esm-dbrxtycE.js";import{R as s}from"./index-BMVQvedj.js";import{C as c,u as g}from"./image-window-loader-lKUISrIQ.js";import{D}from"./data-editor-all-2MtuC67g.js";import{B as K,D as R,P as v,M as E,K as a,a as k,d as F}from"./utils-J-I08TtD.js";import{S as G}from"./story-utils-K2EZnGjM.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const T={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(G,{children:e(K,{title:"Search is easy",description:n(y,{children:[n(R,{children:["Search for any data in your grid by setting ",e(v,{children:"showSearch"}),"."]}),n(E,{children:["In this story, ",e(a,{children:"Ctrl"})," (",e(a,{children:"⌘"})," on Mac) +"," ",e(a,{children:"f"})," toggles the search bar. Make sure you're focused on the Data Grid!"]})]}),children:e(r,{})})})]},o=()=>{const{cols:r,getCellContent:u,onColumnResize:p,setCellValue:h}=k(),[S,l]=s.useState(!1),[C,f]=s.useState({rows:c.empty(),columns:c.empty()});return g("keydown",s.useCallback(t=>{(t.ctrlKey||t.metaKey)&&t.code==="KeyF"&&(l(w=>!w),t.stopPropagation(),t.preventDefault())},[]),window,!1,!0),e(D,{...F,getCellContent:u,getCellsForSelection:!0,gridSelection:C,onGridSelectionChange:f,columns:r,onCellEdited:h,onColumnResize:p,showSearch:S,onSearchClose:()=>l(!1),rows:1e4})};var i,m,d;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`() => { +import{j as e,a as n,F as y}from"./marked.esm-dbrxtycE.js";import{R as s}from"./index-BMVQvedj.js";import{C as c,u as g}from"./image-window-loader-aCHQvgUN.js";import{D}from"./data-editor-all-MRDpHEQ_.js";import{B as K,D as R,P as v,M as E,K as a,a as k,d as F}from"./utils-0sbaJdQp.js";import{S as G}from"./story-utils-K2EZnGjM.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const T={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(G,{children:e(K,{title:"Search is easy",description:n(y,{children:[n(R,{children:["Search for any data in your grid by setting ",e(v,{children:"showSearch"}),"."]}),n(E,{children:["In this story, ",e(a,{children:"Ctrl"})," (",e(a,{children:"⌘"})," on Mac) +"," ",e(a,{children:"f"})," toggles the search bar. Make sure you're focused on the Data Grid!"]})]}),children:e(r,{})})})]},o=()=>{const{cols:r,getCellContent:u,onColumnResize:p,setCellValue:h}=k(),[S,l]=s.useState(!1),[C,f]=s.useState({rows:c.empty(),columns:c.empty()});return g("keydown",s.useCallback(t=>{(t.ctrlKey||t.metaKey)&&t.code==="KeyF"&&(l(w=>!w),t.stopPropagation(),t.preventDefault())},[]),window,!1,!0),e(D,{...F,getCellContent:u,getCellsForSelection:!0,gridSelection:C,onGridSelectionChange:f,columns:r,onCellEdited:h,onColumnResize:p,showSearch:S,onSearchClose:()=>l(!1),rows:1e4})};var i,m,d;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/cell-activated-event.stories-Q5YF9u9g.js b/docs/assets/cell-activated-event.stories-QhCktdVw.js similarity index 89% rename from docs/assets/cell-activated-event.stories-Q5YF9u9g.js rename to docs/assets/cell-activated-event.stories-QhCktdVw.js index 7a4e54201..7d922fc6f 100644 --- a/docs/assets/cell-activated-event.stories-Q5YF9u9g.js +++ b/docs/assets/cell-activated-event.stories-QhCktdVw.js @@ -1,4 +1,4 @@ -import{j as e,a as o,F as g}from"./marked.esm-dbrxtycE.js";import{R as i}from"./index-BMVQvedj.js";import{D as k}from"./data-editor-all-2MtuC67g.js";import{a as B,B as E,D as y,K as s,P as D,M as S,d as M}from"./utils-J-I08TtD.js";import{S as R}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const G={title:"Glide-Data-Grid/DataEditor Demos",decorators:[n=>e(R,{children:e(n,{})})]},t=n=>{const{cols:m,getCellContent:c,onColumnResize:p,setCellValue:C}=B(),A=i.useCallback(l=>{const r=c(l);return l[0]===3?{...r,activationBehaviorOverride:"single-click",hoverEffect:!0}:r},[c]),[a,h]=i.useState(void 0),f=i.useCallback(l=>{h(l)},[]);return e(E,{title:"Cell Activated event",description:o(g,{children:[o(y,{children:["When you tap ",e(s,{children:"Enter"}),", ",e(s,{children:"Space"})," or double click a cell, that cell is activated. You can track this with ",e(D,{children:"onCellActivated"}),"."]}),o(S,{children:["Last activated cell:"," ",a===void 0?"none":`(${a[0]}, ${a[1]})`]})]}),children:e(k,{...M,cellActivationBehavior:n.cellActivationBehavior,getCellContent:A,getCellsForSelection:!0,columns:m,onCellEdited:C,onColumnResize:p,onCellActivated:f,rows:1e4})})};t.argTypes={cellActivationBehavior:{control:{type:"select"},options:["double-click","single-click","second-click"]}};t.args={cellActivationBehavior:"second-click"};var d,u,v;t.parameters={...t.parameters,docs:{...(d=t.parameters)==null?void 0:d.docs,source:{originalSource:`p => { +import{j as e,a as o,F as g}from"./marked.esm-dbrxtycE.js";import{R as i}from"./index-BMVQvedj.js";import{D as k}from"./data-editor-all-MRDpHEQ_.js";import{a as B,B as E,D as y,K as s,P as D,M as S,d as M}from"./utils-0sbaJdQp.js";import{S as R}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const G={title:"Glide-Data-Grid/DataEditor Demos",decorators:[n=>e(R,{children:e(n,{})})]},t=n=>{const{cols:m,getCellContent:c,onColumnResize:p,setCellValue:C}=B(),A=i.useCallback(l=>{const r=c(l);return l[0]===3?{...r,activationBehaviorOverride:"single-click",hoverEffect:!0}:r},[c]),[a,h]=i.useState(void 0),f=i.useCallback(l=>{h(l)},[]);return e(E,{title:"Cell Activated event",description:o(g,{children:[o(y,{children:["When you tap ",e(s,{children:"Enter"}),", ",e(s,{children:"Space"})," or double click a cell, that cell is activated. You can track this with ",e(D,{children:"onCellActivated"}),"."]}),o(S,{children:["Last activated cell:"," ",a===void 0?"none":`(${a[0]}, ${a[1]})`]})]}),children:e(k,{...M,cellActivationBehavior:n.cellActivationBehavior,getCellContent:A,getCellsForSelection:!0,columns:m,onCellEdited:C,onColumnResize:p,onCellActivated:f,rows:1e4})})};t.argTypes={cellActivationBehavior:{control:{type:"select"},options:["double-click","single-click","second-click"]}};t.args={cellActivationBehavior:"second-click"};var d,u,v;t.parameters={...t.parameters,docs:{...(d=t.parameters)==null?void 0:d.docs,source:{originalSource:`p => { const { cols, getCellContent, diff --git a/docs/assets/cell.stories-_lJbBWx1.js b/docs/assets/cell.stories-Ar45hIC9.js similarity index 99% rename from docs/assets/cell.stories-_lJbBWx1.js rename to docs/assets/cell.stories-Ar45hIC9.js index b6c6530a7..1a52f7168 100644 --- a/docs/assets/cell.stories-_lJbBWx1.js +++ b/docs/assets/cell.stories-Ar45hIC9.js @@ -1,4 +1,4 @@ -import{j as D,s as te,a as Pe,m as Zr}from"./marked.esm-dbrxtycE.js";import{r as y}from"./index-BMVQvedj.js";import{G as E,p as Jr,m as Ce,g as ue,a as zt,u as jn,d as Qr,b as ea,i as ta,r as na,c as Rt,D as Kn}from"./data-editor-all-T-OiWfdB.js";import{_ as Te,a as ra,b as ce,t as aa,c as Yn,d as V,e as ke}from"./toConsumableArray-ppDpjNRJ.js";import{r as oa}from"./index-wocATsGp.js";import{_ as ia}from"./iframe-9FFu--7X.js";import{r as wt}from"./throttle-7EuXLZa7.js";import{u as la}from"./flatten-qRvRBp6y.js";import{u as sa}from"./index.esm-Ejw8GwRl.js";import"../sb-preview/runtime.js";import"./_baseIteratee-WTHxv43n.js";const ua=[[50,5],[61.23,39.55],[97.55,39.55],[68.16,60.9],[79.39,95.45],[50,74.1],[20.61,95.45],[31.84,60.9],[2.45,39.55],[38.77,39.55]];function ca(t,e,n){let a=!1;for(const r of ua){const o=(r[0]-50)*(n/100)+e[0],l=(r[1]-50)*(n/100)+e[1];a?t.lineTo(o,l):(t.moveTo(o,l),a=!0)}t.closePath()}const da=()=>D("svg",{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D("path",{d:"M47.1468 13.7811C48.0449 11.0172 51.9551 11.0172 52.8532 13.7812L60.5522 37.4762C60.9538 38.7123 62.1056 39.5491 63.4053 39.5491H88.3198C91.226 39.5491 92.4343 43.268 90.0831 44.9762L69.9269 59.6205C68.8755 60.3845 68.4355 61.7386 68.8371 62.9746L76.5361 86.6697C77.4342 89.4336 74.2707 91.732 71.9196 90.0238L51.7634 75.3794C50.7119 74.6155 49.2881 74.6155 48.2366 75.3795L28.0804 90.0238C25.7293 91.732 22.5659 89.4336 23.4639 86.6697L31.1629 62.9746C31.5645 61.7386 31.1245 60.3845 30.0731 59.6205L9.91686 44.9762C7.56572 43.268 8.77405 39.5491 11.6802 39.5491H36.5947C37.8944 39.5491 39.0462 38.7123 39.4478 37.4762L47.1468 13.7811Z",fill:"currentColor"})}),fa=te("div")({name:"EditorWrap",class:"e8nv6xj",propsAsIs:!1}),pa={kind:E.Custom,isMatch:t=>t.data.kind==="star-cell",needsHover:!0,draw:(t,e)=>{const{ctx:n,theme:a,rect:r,hoverAmount:o}=t,{rating:l}=e.data,s=a.cellHorizontalPadding;let i=r.x+s;const u=Math.min(5,Math.ceil(l));i+=8,n.beginPath();for(let c=0;ct=>D(fa,{children:[0,1,2,3,4].map(e=>D("div",{className:t.value.data.rating{t.onChange({...t.value,data:{...t.value.data,rating:e+1}})},children:D(da,{})},e))}),onPaste:(t,e)=>{const n=Number.parseInt(t);return{...e,rating:Number.isNaN(n)?0:n}}},ha=pa,va={kind:E.Custom,isMatch:t=>t.data.kind==="sparkline-cell",needsHover:!0,needsHoverPosition:!0,draw:(t,e)=>{const{ctx:n,theme:a,rect:r,hoverAmount:o,hoverX:l}=t;let{values:s,yAxis:i,color:u,graphKind:c="area",displayValues:d,hideAxis:h}=e.data;const[m,g]=i;if(s.length===0)return!0;s=s.map(x=>Math.min(1,Math.max(0,(x-m)/(g-m))));const f=a.cellHorizontalPadding,p=f+r.x,v=r.y+3,C=r.height-6,S=r.width-f*2,O=g-m,k=g<=0?v:m>=0?v+C:v+C*(g/O);if(!h&&m<=0&&g>=0&&(n.beginPath(),n.moveTo(p,k),n.lineTo(p+S,k),n.globalAlpha=.4,n.lineWidth=1,n.strokeStyle=a.textLight,n.stroke(),n.globalAlpha=1),c==="bar"){n.beginPath();const x=2,b=(s.length-1)*x,w=(S-b)/s.length;let M=p;for(const F of s){const N=v+C-F*C;n.moveTo(M,k),n.lineTo(M+w,k),n.lineTo(M+w,N),n.lineTo(M,N),M+=w+x}n.fillStyle=e.data.color??a.accentColor,n.fill()}else{s.length===1&&(s=[s[0],s[0]],d&&(d=[d[0],d[0]])),n.beginPath();const x=(r.width-16)/(s.length-1),b=s.map((M,F)=>({x:p+x*F,y:v+C-M*C}));n.moveTo(b[0].x,b[0].y);let w=0;if(b.length>2)for(w=1;w{},onPaste:(t,e)=>e},ma=va;function $e(t,e,n,a,r,o){if(!(a<=0||r<=0)){if(typeof o=="number"&&o<=0){t.rect(e,n,a,r);return}typeof o=="number"&&(o={tl:o,tr:o,br:o,bl:o}),o={tl:Math.min(o.tl,r/2,a/2),tr:Math.min(o.tr,r/2,a/2),bl:Math.min(o.bl,r/2,a/2),br:Math.min(o.br,r/2,a/2)},o.tl=Math.max(0,o.tl),o.tr=Math.max(0,o.tr),o.br=Math.max(0,o.br),o.bl=Math.max(0,o.bl),t.moveTo(e+o.tl,n),t.arcTo(e+a,n,e+a,n+o.tr,o.tr),t.arcTo(e+a,n+r,e+a-o.br,n+r,o.br),t.arcTo(e,n+r,e,n+r-o.bl,o.bl),t.arcTo(e,n,e+o.tl,n,o.tl)}}const we=20,Oe=6,ga=()=>t=>t.tagHeight/2,ba=()=>t=>t.tagHeight,ya=()=>t=>t.innerPad,Ca=te("div")({name:"EditorWrap",class:"e14vzbfa",propsAsIs:!1,vars:{"e14vzbfa-0":[ga(),"px"],"e14vzbfa-1":[ba(),"px"],"e14vzbfa-2":[ya(),"px"]}}),wa={kind:E.Custom,isMatch:t=>t.data.kind==="tags-cell",draw:(t,e)=>{var h;const{ctx:n,theme:a,rect:r}=t,{possibleTags:o,tags:l}=e.data,s={x:r.x+a.cellHorizontalPadding,y:r.y+a.cellVerticalPadding,width:r.width-2*a.cellHorizontalPadding,height:r.height-2*a.cellVerticalPadding},i=Math.max(1,Math.floor(s.height/(we+Oe)));let u=s.x,c=1,d=s.y+(s.height-i*we-(i-1)*Oe)/2;for(const m of l){const g=((h=o.find(C=>C.tag===m))==null?void 0:h.color)??a.bgBubble;n.font=`12px ${a.fontFamily}`;const p=Ce(m,n).width+Oe*2,v=we/2;if(u!==s.x&&u+p>s.x+s.width&&cs.x+s.width&&c>=i)break}return!0},provideEditor:()=>t=>{const{onChange:e,value:n}=t,{readonly:a=!1}=n,{possibleTags:r,tags:o}=n.data;return D(Ca,{tagHeight:we,innerPad:Oe,className:a?"gdg-readonly":"",children:r.map(l=>{const s=o.indexOf(l.tag)!==-1;return Pe("label",{children:[!a&&D("input",{className:"gdg-input",type:"checkbox",checked:s,onChange:()=>{const i=s?o.filter(u=>u!==l.tag):[...o,l.tag];e({...t.value,data:{...n.data,tags:i}})}}),D("div",{className:"gdg-pill "+(s?"gdg-selected":"gdg-unselected"),style:{backgroundColor:s?l.color:void 0},children:l.tag})]},l.tag)})})},onPaste:(t,e)=>({...e,tags:e.possibleTags.map(n=>n.tag).filter(n=>t.split(",").map(a=>a.trim()).includes(n))})},Sa=wa,Oa={kind:E.Custom,isMatch:t=>t.data.kind==="user-profile-cell",draw:(t,e)=>{const{ctx:n,rect:a,theme:r,imageLoader:o,col:l,row:s}=t,{image:i,name:u,initial:c,tint:d}=e.data,h=r.cellHorizontalPadding,m=Math.min(12,a.height/2-r.cellVerticalPadding),g=a.x+h,f=o.loadOrGetImage(i,l,s);n.save(),n.beginPath(),n.arc(g+m,a.y+a.height/2,m,0,Math.PI*2),n.globalAlpha=.2,n.fillStyle=d,n.fill(),n.globalAlpha=1,n.font=`600 16px ${r.fontFamily}`;const p=Ce(c[0],n);return n.fillText(c[0],g+m-p.width/2,a.y+a.height/2+ue(n,`600 16px ${r.fontFamily}`)),f!==void 0&&(n.save(),n.beginPath(),n.arc(g+m,a.y+a.height/2,m,0,Math.PI*2),n.clip(),n.drawImage(f,g,a.y+a.height/2-m,m*2,m*2),n.restore()),u!==void 0&&(n.font=r.baseFontFull,n.fillStyle=r.textDark,n.fillText(u,g+m*2+h,a.y+a.height/2+ue(n,r))),n.restore(),!0},provideEditor:()=>t=>{const{isHighlighted:e,onChange:n,value:a}=t;return D(zt,{highlight:e,autoFocus:!0,value:a.data.name??"",disabled:a.readonly??!1,onChange:r=>n({...a,data:{...a.data,name:r.target.value}})})},onPaste:(t,e)=>({...e,name:t})},xa=Oa;function sn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function P(t){for(var e=1;eD("svg",{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D("path",{d:"M47.1468 13.7811C48.0449 11.0172 51.9551 11.0172 52.8532 13.7812L60.5522 37.4762C60.9538 38.7123 62.1056 39.5491 63.4053 39.5491H88.3198C91.226 39.5491 92.4343 43.268 90.0831 44.9762L69.9269 59.6205C68.8755 60.3845 68.4355 61.7386 68.8371 62.9746L76.5361 86.6697C77.4342 89.4336 74.2707 91.732 71.9196 90.0238L51.7634 75.3794C50.7119 74.6155 49.2881 74.6155 48.2366 75.3795L28.0804 90.0238C25.7293 91.732 22.5659 89.4336 23.4639 86.6697L31.1629 62.9746C31.5645 61.7386 31.1245 60.3845 30.0731 59.6205L9.91686 44.9762C7.56572 43.268 8.77405 39.5491 11.6802 39.5491H36.5947C37.8944 39.5491 39.0462 38.7123 39.4478 37.4762L47.1468 13.7811Z",fill:"currentColor"})}),fa=te("div")({name:"EditorWrap",class:"e8nv6xj",propsAsIs:!1}),pa={kind:E.Custom,isMatch:t=>t.data.kind==="star-cell",needsHover:!0,draw:(t,e)=>{const{ctx:n,theme:a,rect:r,hoverAmount:o}=t,{rating:l}=e.data,s=a.cellHorizontalPadding;let i=r.x+s;const u=Math.min(5,Math.ceil(l));i+=8,n.beginPath();for(let c=0;ct=>D(fa,{children:[0,1,2,3,4].map(e=>D("div",{className:t.value.data.rating{t.onChange({...t.value,data:{...t.value.data,rating:e+1}})},children:D(da,{})},e))}),onPaste:(t,e)=>{const n=Number.parseInt(t);return{...e,rating:Number.isNaN(n)?0:n}}},ha=pa,va={kind:E.Custom,isMatch:t=>t.data.kind==="sparkline-cell",needsHover:!0,needsHoverPosition:!0,draw:(t,e)=>{const{ctx:n,theme:a,rect:r,hoverAmount:o,hoverX:l}=t;let{values:s,yAxis:i,color:u,graphKind:c="area",displayValues:d,hideAxis:h}=e.data;const[m,g]=i;if(s.length===0)return!0;s=s.map(x=>Math.min(1,Math.max(0,(x-m)/(g-m))));const f=a.cellHorizontalPadding,p=f+r.x,v=r.y+3,C=r.height-6,S=r.width-f*2,O=g-m,k=g<=0?v:m>=0?v+C:v+C*(g/O);if(!h&&m<=0&&g>=0&&(n.beginPath(),n.moveTo(p,k),n.lineTo(p+S,k),n.globalAlpha=.4,n.lineWidth=1,n.strokeStyle=a.textLight,n.stroke(),n.globalAlpha=1),c==="bar"){n.beginPath();const x=2,b=(s.length-1)*x,w=(S-b)/s.length;let M=p;for(const F of s){const N=v+C-F*C;n.moveTo(M,k),n.lineTo(M+w,k),n.lineTo(M+w,N),n.lineTo(M,N),M+=w+x}n.fillStyle=e.data.color??a.accentColor,n.fill()}else{s.length===1&&(s=[s[0],s[0]],d&&(d=[d[0],d[0]])),n.beginPath();const x=(r.width-16)/(s.length-1),b=s.map((M,F)=>({x:p+x*F,y:v+C-M*C}));n.moveTo(b[0].x,b[0].y);let w=0;if(b.length>2)for(w=1;w{},onPaste:(t,e)=>e},ma=va;function $e(t,e,n,a,r,o){if(!(a<=0||r<=0)){if(typeof o=="number"&&o<=0){t.rect(e,n,a,r);return}typeof o=="number"&&(o={tl:o,tr:o,br:o,bl:o}),o={tl:Math.min(o.tl,r/2,a/2),tr:Math.min(o.tr,r/2,a/2),bl:Math.min(o.bl,r/2,a/2),br:Math.min(o.br,r/2,a/2)},o.tl=Math.max(0,o.tl),o.tr=Math.max(0,o.tr),o.br=Math.max(0,o.br),o.bl=Math.max(0,o.bl),t.moveTo(e+o.tl,n),t.arcTo(e+a,n,e+a,n+o.tr,o.tr),t.arcTo(e+a,n+r,e+a-o.br,n+r,o.br),t.arcTo(e,n+r,e,n+r-o.bl,o.bl),t.arcTo(e,n,e+o.tl,n,o.tl)}}const we=20,Oe=6,ga=()=>t=>t.tagHeight/2,ba=()=>t=>t.tagHeight,ya=()=>t=>t.innerPad,Ca=te("div")({name:"EditorWrap",class:"e14vzbfa",propsAsIs:!1,vars:{"e14vzbfa-0":[ga(),"px"],"e14vzbfa-1":[ba(),"px"],"e14vzbfa-2":[ya(),"px"]}}),wa={kind:E.Custom,isMatch:t=>t.data.kind==="tags-cell",draw:(t,e)=>{var h;const{ctx:n,theme:a,rect:r}=t,{possibleTags:o,tags:l}=e.data,s={x:r.x+a.cellHorizontalPadding,y:r.y+a.cellVerticalPadding,width:r.width-2*a.cellHorizontalPadding,height:r.height-2*a.cellVerticalPadding},i=Math.max(1,Math.floor(s.height/(we+Oe)));let u=s.x,c=1,d=s.y+(s.height-i*we-(i-1)*Oe)/2;for(const m of l){const g=((h=o.find(C=>C.tag===m))==null?void 0:h.color)??a.bgBubble;n.font=`12px ${a.fontFamily}`;const p=Ce(m,n).width+Oe*2,v=we/2;if(u!==s.x&&u+p>s.x+s.width&&cs.x+s.width&&c>=i)break}return!0},provideEditor:()=>t=>{const{onChange:e,value:n}=t,{readonly:a=!1}=n,{possibleTags:r,tags:o}=n.data;return D(Ca,{tagHeight:we,innerPad:Oe,className:a?"gdg-readonly":"",children:r.map(l=>{const s=o.indexOf(l.tag)!==-1;return Pe("label",{children:[!a&&D("input",{className:"gdg-input",type:"checkbox",checked:s,onChange:()=>{const i=s?o.filter(u=>u!==l.tag):[...o,l.tag];e({...t.value,data:{...n.data,tags:i}})}}),D("div",{className:"gdg-pill "+(s?"gdg-selected":"gdg-unselected"),style:{backgroundColor:s?l.color:void 0},children:l.tag})]},l.tag)})})},onPaste:(t,e)=>({...e,tags:e.possibleTags.map(n=>n.tag).filter(n=>t.split(",").map(a=>a.trim()).includes(n))})},Sa=wa,Oa={kind:E.Custom,isMatch:t=>t.data.kind==="user-profile-cell",draw:(t,e)=>{const{ctx:n,rect:a,theme:r,imageLoader:o,col:l,row:s}=t,{image:i,name:u,initial:c,tint:d}=e.data,h=r.cellHorizontalPadding,m=Math.min(12,a.height/2-r.cellVerticalPadding),g=a.x+h,f=o.loadOrGetImage(i,l,s);n.save(),n.beginPath(),n.arc(g+m,a.y+a.height/2,m,0,Math.PI*2),n.globalAlpha=.2,n.fillStyle=d,n.fill(),n.globalAlpha=1,n.font=`600 16px ${r.fontFamily}`;const p=Ce(c[0],n);return n.fillText(c[0],g+m-p.width/2,a.y+a.height/2+ue(n,`600 16px ${r.fontFamily}`)),f!==void 0&&(n.save(),n.beginPath(),n.arc(g+m,a.y+a.height/2,m,0,Math.PI*2),n.clip(),n.drawImage(f,g,a.y+a.height/2-m,m*2,m*2),n.restore()),u!==void 0&&(n.font=r.baseFontFull,n.fillStyle=r.textDark,n.fillText(u,g+m*2+h,a.y+a.height/2+ue(n,r))),n.restore(),!0},provideEditor:()=>t=>{const{isHighlighted:e,onChange:n,value:a}=t;return D(zt,{highlight:e,autoFocus:!0,value:a.data.name??"",disabled:a.readonly??!1,onChange:r=>n({...a,data:{...a.data,name:r.target.value}})})},onPaste:(t,e)=>({...e,name:t})},xa=Oa;function sn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function P(t){for(var e=1;e0?K(De,--Y):0,Ie--,z===10&&(Ie=1,st--),z}function Z(){return z=Y2||He(z)>3?"":" "}function Ka(t,e){for(;--e&&Z()&&!(z<48||z>102||z>57&&z<65||z>70&&z<97););return _e(t,Ke()+(e<6&&se()==32&&Z()==32))}function $t(t){for(;Z();)switch(z){case t:return Y;case 34:case 39:t!==34&&t!==39&&$t(z);break;case 40:t===41&&$t(t);break;case 92:Z();break}return Y}function Ya(t,e){for(;Z()&&t+z!==57;)if(t+z===84&&se()===47)break;return"/*"+_e(e,Y-1)+"*"+lt(t===47?t:Z())}function Xa(t){for(;!He(se());)Z();return _e(t,Y)}function qa(t){return nr(Xe("",null,null,null,[""],t=tr(t),0,[0],t))}function Xe(t,e,n,a,r,o,l,s,i){for(var u=0,c=0,d=l,h=0,m=0,g=0,f=1,p=1,v=1,C=0,S="",O=r,k=o,x=a,b=S;p;)switch(g=C,C=Z()){case 40:if(g!=108&&b.charCodeAt(d-1)==58){Ft(b+=R(Ye(C),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:b+=Ye(C);break;case 9:case 10:case 13:case 32:b+=ja(g);break;case 92:b+=Ka(Ke()-1,7);continue;case 47:switch(se()){case 42:case 47:We(Za(Ya(Z(),Ke()),e,n),i);break;default:b+="/"}break;case 123*f:s[u++]=ie(b)*v;case 125*f:case 59:case 0:switch(C){case 0:case 125:p=0;case 59+c:m>0&&ie(b)-d&&We(m>32?dn(b+";",a,n,d-1):dn(R(b," ","")+";",a,n,d-2),i);break;case 59:b+=";";default:if(We(x=cn(b,e,n,u,c,r,s,S,O=[],k=[],d),o),C===123)if(c===0)Xe(b,e,x,x,O,o,d,s,k);else switch(h){case 100:case 109:case 115:Xe(t,x,x,a&&We(cn(t,x,x,0,0,r,s,S,r,O=[],d),k),r,k,d,s,a?O:k);break;default:Xe(b,x,x,x,[""],k,0,s,k)}}u=c=m=0,f=v=1,S=b="",d=l;break;case 58:d=1+ie(b),m=g;default:if(f<1){if(C==123)--f;else if(C==125&&f++==0&&Ga()==125)continue}switch(b+=lt(C),C*f){case 38:v=c>0?1:(b+="\f",-1);break;case 44:s[u++]=(ie(b)-1)*v,v=1;break;case 64:se()===45&&(b+=Ye(Z())),h=se(),c=d=ie(S=b+=Xa(Ke())),C++;break;case 45:g===45&&ie(b)==2&&(f=0)}}return o}function cn(t,e,n,a,r,o,l,s,i,u,c){for(var d=r-1,h=r===0?o:[""],m=Ut(h),g=0,f=0,p=0;g0?h[v]+" "+C:R(C,/&\f/g,h[v])))&&(i[p++]=S);return ut(t,e,n,r===0?Bt:s,i,u,c)}function Za(t,e,n){return ut(t,e,n,Zn,lt(Ua()),Ae(t,2,-2),0)}function dn(t,e,n,a){return ut(t,e,n,Wt,Ae(t,0,a),Ae(t,a+1,-1),a)}function rr(t,e){switch(za(t,e)){case 5103:return T+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return T+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return T+t+Qe+t+G+t+t;case 6828:case 4268:return T+t+G+t+t;case 6165:return T+t+G+"flex-"+t+t;case 5187:return T+t+R(t,/(\w+).+(:[^]+)/,T+"box-$1$2"+G+"flex-$1$2")+t;case 5443:return T+t+G+"flex-item-"+R(t,/flex-|-self/,"")+t;case 4675:return T+t+G+"flex-line-pack"+R(t,/align-content|flex-|-self/,"")+t;case 5548:return T+t+G+R(t,"shrink","negative")+t;case 5292:return T+t+G+R(t,"basis","preferred-size")+t;case 6060:return T+"box-"+R(t,"-grow","")+T+t+G+R(t,"grow","positive")+t;case 4554:return T+R(t,/([^-])(transform)/g,"$1"+T+"$2")+t;case 6187:return R(R(R(t,/(zoom-|grab)/,T+"$1"),/(image-set)/,T+"$1"),t,"")+t;case 5495:case 3959:return R(t,/(image-set\([^]*)/,T+"$1$`$1");case 4968:return R(R(t,/(.+:)(flex-)?(.*)/,T+"box-pack:$3"+G+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+T+t+t;case 4095:case 3583:case 4068:case 2532:return R(t,/(.+)-inline(.+)/,T+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ie(t)-1-e>6)switch(K(t,e+1)){case 109:if(K(t,e+4)!==45)break;case 102:return R(t,/(.+:)(.+)-([^]+)/,"$1"+T+"$2-$3$1"+Qe+(K(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Ft(t,"stretch")?rr(R(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(K(t,e+1)!==115)break;case 6444:switch(K(t,ie(t)-3-(~Ft(t,"!important")&&10))){case 107:return R(t,":",":"+T)+t;case 101:return R(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+T+(K(t,14)===45?"inline-":"")+"box$3$1"+T+"$2$3$1"+G+"$2box$3")+t}break;case 5936:switch(K(t,e+11)){case 114:return T+t+G+R(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return T+t+G+R(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return T+t+G+R(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return T+t+G+t+t}return t}function Me(t,e){for(var n="",a=Ut(t),r=0;r-1&&!t.return)switch(t.type){case Wt:t.return=rr(t.value,t.length);break;case Jn:return Me([Ve(t,{value:R(t.value,"@","@"+T)})],a);case Bt:if(t.length)return Wa(t.props,function(r){switch(Ba(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Me([Ve(t,{props:[R(r,/:(read-\w+)/,":"+Qe+"$1")]})],a);case"::placeholder":return Me([Ve(t,{props:[R(r,/:(plac\w+)/,":"+T+"input-$1")]}),Ve(t,{props:[R(r,/:(plac\w+)/,":"+Qe+"$1")]}),Ve(t,{props:[R(r,/:(plac\w+)/,G+"input-$1")]})],a)}return""})}}var no=function(e,n,a){for(var r=0,o=0;r=o,o=se(),r===38&&o===12&&(n[a]=1),!He(o);)Z();return _e(e,Y)},ro=function(e,n){var a=-1,r=44;do switch(He(r)){case 0:r===38&&se()===12&&(n[a]=1),e[a]+=no(Y-1,n,a);break;case 2:e[a]+=Ye(r);break;case 4:if(r===44){e[++a]=se()===58?"&\f":"",n[a]=e[a].length;break}default:e[a]+=lt(r)}while(r=Z());return e},ao=function(e,n){return nr(ro(tr(e),n))},fn=new WeakMap,oo=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,a=e.parent,r=e.column===a.column&&e.line===a.line;a.type!=="rule";)if(a=a.parent,!a)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!fn.get(a))&&!r){fn.set(e,!0);for(var o=[],l=ao(n,o),s=a.props,i=0,u=0;io(A,{children:o(M,{title:"Group collapse",description:i(D,{children:[i(b,{children:["Through clever usage of ",o(k,{children:"onGroupHeaderClicked"})," you can implement group collapsing. This is a very basic version however it is possible to go much further."]}),o(S,{children:"Cells under a certain size will not attempt to render to save some frames."})]}),children:o(e,{})})})]};function E(e){const[s,n]=t.useState([]),C=t.useCallback((r,l)=>{const u=e[r].group??"";n(p=>p.includes(u)?p.filter(G=>G!==u):[...p,u]),l.preventDefault()},[e]),[g,h]=t.useState(x.empty()),f=t.useCallback((r,l)=>{l!=="group"&&h(r)},[]);return{columns:t.useMemo(()=>e.map(r=>s.includes(r.group??"")?{...r,width:8,hasMenu:!0}:{...r,hasMenu:!0}),[s,e]),onGroupHeaderClicked:C,selectedColumns:g,onSelectedColumnsChange:f}}const a=()=>{const{cols:e,getCellContent:s}=w(100,!0,!0),n=E(e);return o(H,{...v,...n,getCellContent:s,groupHeaderHeight:24,rows:1e3,rowMarkers:"both"})};var m,c,d;a.parameters={...a.parameters,docs:{...(m=a.parameters)==null?void 0:m.docs,source:{originalSource:`() => { +import{j as o,a as i,F as D}from"./marked.esm-dbrxtycE.js";import{R as t}from"./index-BMVQvedj.js";import{D as H}from"./data-editor-all-MRDpHEQ_.js";import{B as M,D as b,P as k,M as S,u as w,d as v}from"./utils-0sbaJdQp.js";import{C as x}from"./image-window-loader-aCHQvgUN.js";import{S as A}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const L={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>o(A,{children:o(M,{title:"Group collapse",description:i(D,{children:[i(b,{children:["Through clever usage of ",o(k,{children:"onGroupHeaderClicked"})," you can implement group collapsing. This is a very basic version however it is possible to go much further."]}),o(S,{children:"Cells under a certain size will not attempt to render to save some frames."})]}),children:o(e,{})})})]};function E(e){const[s,n]=t.useState([]),C=t.useCallback((r,l)=>{const u=e[r].group??"";n(p=>p.includes(u)?p.filter(G=>G!==u):[...p,u]),l.preventDefault()},[e]),[g,h]=t.useState(x.empty()),f=t.useCallback((r,l)=>{l!=="group"&&h(r)},[]);return{columns:t.useMemo(()=>e.map(r=>s.includes(r.group??"")?{...r,width:8,hasMenu:!0}:{...r,hasMenu:!0}),[s,e]),onGroupHeaderClicked:C,selectedColumns:g,onSelectedColumnsChange:f}}const a=()=>{const{cols:e,getCellContent:s}=w(100,!0,!0),n=E(e);return o(H,{...v,...n,getCellContent:s,groupHeaderHeight:24,rows:1e3,rowMarkers:"both"})};var m,c,d;a.parameters={...a.parameters,docs:{...(m=a.parameters)==null?void 0:m.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/column-groups.stories-aUe7DIMw.js b/docs/assets/column-groups.stories-lpss0-Mz.js similarity index 78% rename from docs/assets/column-groups.stories-aUe7DIMw.js rename to docs/assets/column-groups.stories-lpss0-Mz.js index 841f64b3f..df46d6d48 100644 --- a/docs/assets/column-groups.stories-aUe7DIMw.js +++ b/docs/assets/column-groups.stories-lpss0-Mz.js @@ -1,4 +1,4 @@ -import{j as r,a as p}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as l}from"./data-editor-all-2MtuC67g.js";import{B as u,D as d,P as c,u as g,d as C}from"./utils-J-I08TtD.js";import{a as G}from"./image-window-loader-lKUISrIQ.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const B={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>r(D,{children:r(u,{title:"Column Grouping",description:p(d,{children:["Columns in the data grid may be grouped by setting their ",r(c,{children:"group"})," ","property."]}),children:r(t,{})})})]},o=()=>{const{cols:t,getCellContent:i}=g(20,!0,!0);return r(l,{...C,getCellContent:i,onGroupHeaderRenamed:(e,m)=>window.alert(`Please rename group ${e} to ${m}`),columns:t,rows:1e3,getGroupDetails:e=>({name:e,icon:e===""?void 0:G.HeaderCode}),rowMarkers:"both"})};var a,n,s;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:`() => { +import{j as r,a as p}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as l}from"./data-editor-all-MRDpHEQ_.js";import{B as u,D as d,P as c,u as g,d as C}from"./utils-0sbaJdQp.js";import{a as G}from"./image-window-loader-aCHQvgUN.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const B={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>r(D,{children:r(u,{title:"Column Grouping",description:p(d,{children:["Columns in the data grid may be grouped by setting their ",r(c,{children:"group"})," ","property."]}),children:r(t,{})})})]},o=()=>{const{cols:t,getCellContent:i}=g(20,!0,!0);return r(l,{...C,getCellContent:i,onGroupHeaderRenamed:(e,m)=>window.alert(`Please rename group ${e} to ${m}`),columns:t,rows:1e3,getGroupDetails:e=>({name:e,icon:e===""?void 0:G.HeaderCode}),rowMarkers:"both"})};var a,n,s;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/content-alignment.stories-qyF38rSl.js b/docs/assets/content-alignment.stories--MNNaYaT.js similarity index 85% rename from docs/assets/content-alignment.stories-qyF38rSl.js rename to docs/assets/content-alignment.stories--MNNaYaT.js index dff721a43..d3cd3e7b3 100644 --- a/docs/assets/content-alignment.stories-qyF38rSl.js +++ b/docs/assets/content-alignment.stories--MNNaYaT.js @@ -1,4 +1,4 @@ -import{j as t,a as p}from"./marked.esm-dbrxtycE.js";import{R as C}from"./index-BMVQvedj.js";import{D as d}from"./data-editor-all-2MtuC67g.js";import{B as g,D as u,P as o,a as f,d as A}from"./utils-J-I08TtD.js";import{S as h}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const W={title:"Glide-Data-Grid/DataEditor Demos",decorators:[l=>t(h,{children:t(g,{title:"Content Alignment",description:p(u,{children:["You can customize the content alignment by setting ",t(o,{children:"contentAlign"})," of a cell to ",t(o,{children:"left"}),", ",t(o,{children:"right"})," or ",t(o,{children:"center"}),"."]}),children:t(l,{})})})]},r=()=>{const{cols:l,getCellContent:n}=f(),m=C.useCallback(e=>{const[i,D]=e;return i===3?{...n(e),contentAlign:"center"}:i===4?{...n(e),contentAlign:"right"}:i===5?{...n(e),contentAlign:"left"}:n(e)},[n]);return t(d,{...A,getCellContent:m,columns:l,rows:300})};var c,s,a;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`() => { +import{j as t,a as p}from"./marked.esm-dbrxtycE.js";import{R as C}from"./index-BMVQvedj.js";import{D as d}from"./data-editor-all-MRDpHEQ_.js";import{B as g,D as u,P as o,a as f,d as A}from"./utils-0sbaJdQp.js";import{S as h}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const W={title:"Glide-Data-Grid/DataEditor Demos",decorators:[l=>t(h,{children:t(g,{title:"Content Alignment",description:p(u,{children:["You can customize the content alignment by setting ",t(o,{children:"contentAlign"})," of a cell to ",t(o,{children:"left"}),", ",t(o,{children:"right"})," or ",t(o,{children:"center"}),"."]}),children:t(l,{})})})]},r=()=>{const{cols:l,getCellContent:n}=f(),m=C.useCallback(e=>{const[i,D]=e;return i===3?{...n(e),contentAlign:"center"}:i===4?{...n(e),contentAlign:"right"}:i===5?{...n(e),contentAlign:"left"}:n(e)},[n]);return t(d,{...A,getCellContent:m,columns:l,rows:300})};var c,s,a;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/controlled-search.stories-6CGqo4sD.js b/docs/assets/controlled-search.stories-b-OSRnqX.js similarity index 89% rename from docs/assets/controlled-search.stories-6CGqo4sD.js rename to docs/assets/controlled-search.stories-b-OSRnqX.js index 3096a068d..c771a3707 100644 --- a/docs/assets/controlled-search.stories-6CGqo4sD.js +++ b/docs/assets/controlled-search.stories-b-OSRnqX.js @@ -1,4 +1,4 @@ -import{j as t,F as R,a as y}from"./marked.esm-dbrxtycE.js";import{R as s}from"./index-BMVQvedj.js";import{C as i,u as V}from"./image-window-loader-lKUISrIQ.js";import{D as v}from"./data-editor-all-2MtuC67g.js";import{B as D,D as E,P as K,a as k,d as F}from"./utils-J-I08TtD.js";import{S as P}from"./story-utils-K2EZnGjM.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const Y={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>t(P,{children:t(D,{title:"Controlling search results",description:t(R,{children:y(E,{children:["Search results can be controlled via ",t(K,{children:"searchResults"}),". You can implement any search algorithm you want, even a silly one."]})}),children:t(r,{})})})]},n=()=>{const{cols:r,getCellContent:p,onColumnResize:S,setCellValue:d}=k(),[C,l]=s.useState(!1),[f,g]=s.useState({rows:i.empty(),columns:i.empty()});V("keydown",s.useCallback(e=>{(e.ctrlKey||e.metaKey)&&e.code==="KeyF"&&(l(o=>!o),e.stopPropagation(),e.preventDefault())},[]),window,!1,!0);const[a,c]=s.useState(""),w=s.useMemo(()=>{const e=[];for(let o=0;o{l(!1),c("")},rows:1e4})};var u,h,m;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`() => { +import{j as t,F as R,a as y}from"./marked.esm-dbrxtycE.js";import{R as s}from"./index-BMVQvedj.js";import{C as i,u as V}from"./image-window-loader-aCHQvgUN.js";import{D as v}from"./data-editor-all-MRDpHEQ_.js";import{B as D,D as E,P as K,a as k,d as F}from"./utils-0sbaJdQp.js";import{S as P}from"./story-utils-K2EZnGjM.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const Y={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>t(P,{children:t(D,{title:"Controlling search results",description:t(R,{children:y(E,{children:["Search results can be controlled via ",t(K,{children:"searchResults"}),". You can implement any search algorithm you want, even a silly one."]})}),children:t(r,{})})})]},n=()=>{const{cols:r,getCellContent:p,onColumnResize:S,setCellValue:d}=k(),[C,l]=s.useState(!1),[f,g]=s.useState({rows:i.empty(),columns:i.empty()});V("keydown",s.useCallback(e=>{(e.ctrlKey||e.metaKey)&&e.code==="KeyF"&&(l(o=>!o),e.stopPropagation(),e.preventDefault())},[]),window,!1,!0);const[a,c]=s.useState(""),w=s.useMemo(()=>{const e=[];for(let o=0;o{l(!1),c("")},rows:1e4})};var u,h,m;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/controlled-selection.stories-nB36Tesw.js b/docs/assets/controlled-selection.stories-Lx0jlMqX.js similarity index 93% rename from docs/assets/controlled-selection.stories-nB36Tesw.js rename to docs/assets/controlled-selection.stories-Lx0jlMqX.js index 924aed811..73060fe13 100644 --- a/docs/assets/controlled-selection.stories-nB36Tesw.js +++ b/docs/assets/controlled-selection.stories-Lx0jlMqX.js @@ -1,4 +1,4 @@ -import{j as e,a as w}from"./marked.esm-dbrxtycE.js";import{R as f}from"./index-BMVQvedj.js";import{D as v}from"./data-editor-all-2MtuC67g.js";import{u as x,B as y,D,P as p,d as G}from"./utils-J-I08TtD.js";import{C as d}from"./image-window-loader-lKUISrIQ.js";import{S as N}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[c=>e(N,{children:e(c,{})})]},l=()=>{var u,m;const{cols:c,getCellContent:C}=x(30,!0,!0),[a,i]=f.useState({columns:d.empty(),rows:d.empty()});return e(y,{title:"Controlled Selection",description:w(D,{children:["The selection of the grid can be controlled via ",e(p,{children:"GridSelection"})," and"," ",e(p,{children:"onGridSelectionChange"}),".",e("input",{type:"range",min:0,max:29,value:((u=a.current)==null?void 0:u.cell[0])??0,onChange:s=>{const t=s.target.valueAsNumber;i(n=>{var r,o;return{...n,current:{cell:[t,((r=n.current)==null?void 0:r.cell[1])??0],range:{x:t,y:((o=n.current)==null?void 0:o.cell[1])??0,width:1,height:1},rangeStack:[]}}})}}),e("input",{type:"range",min:0,max:99,value:((m=a.current)==null?void 0:m.cell[1])??0,onChange:s=>{const t=s.target.valueAsNumber;i(n=>{var r,o;return{...n,current:{cell:[((r=n.current)==null?void 0:r.cell[0])??0,t],range:{x:((o=n.current)==null?void 0:o.cell[0])??0,y:t,width:1,height:1},rangeStack:[]}}})}})]}),children:e(v,{...G,getCellContent:C,gridSelection:a,onGridSelectionChange:i,columns:c,rows:100,rowMarkers:"both"})})};var g,h,S;l.parameters={...l.parameters,docs:{...(g=l.parameters)==null?void 0:g.docs,source:{originalSource:`() => { +import{j as e,a as w}from"./marked.esm-dbrxtycE.js";import{R as f}from"./index-BMVQvedj.js";import{D as v}from"./data-editor-all-MRDpHEQ_.js";import{u as x,B as y,D,P as p,d as G}from"./utils-0sbaJdQp.js";import{C as d}from"./image-window-loader-aCHQvgUN.js";import{S as N}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[c=>e(N,{children:e(c,{})})]},l=()=>{var u,m;const{cols:c,getCellContent:C}=x(30,!0,!0),[a,i]=f.useState({columns:d.empty(),rows:d.empty()});return e(y,{title:"Controlled Selection",description:w(D,{children:["The selection of the grid can be controlled via ",e(p,{children:"GridSelection"})," and"," ",e(p,{children:"onGridSelectionChange"}),".",e("input",{type:"range",min:0,max:29,value:((u=a.current)==null?void 0:u.cell[0])??0,onChange:s=>{const t=s.target.valueAsNumber;i(n=>{var r,o;return{...n,current:{cell:[t,((r=n.current)==null?void 0:r.cell[1])??0],range:{x:t,y:((o=n.current)==null?void 0:o.cell[1])??0,width:1,height:1},rangeStack:[]}}})}}),e("input",{type:"range",min:0,max:99,value:((m=a.current)==null?void 0:m.cell[1])??0,onChange:s=>{const t=s.target.valueAsNumber;i(n=>{var r,o;return{...n,current:{cell:[((r=n.current)==null?void 0:r.cell[0])??0,t],range:{x:((o=n.current)==null?void 0:o.cell[0])??0,y:t,width:1,height:1},rangeStack:[]}}})}})]}),children:e(v,{...G,getCellContent:C,gridSelection:a,onGridSelectionChange:i,columns:c,rows:100,rowMarkers:"both"})})};var g,h,S;l.parameters={...l.parameters,docs:{...(g=l.parameters)==null?void 0:g.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/copy-support.stories-gQT8odop.js b/docs/assets/copy-support.stories-1uSBV0aF.js similarity index 79% rename from docs/assets/copy-support.stories-gQT8odop.js rename to docs/assets/copy-support.stories-1uSBV0aF.js index 469af8fae..9585a5432 100644 --- a/docs/assets/copy-support.stories-gQT8odop.js +++ b/docs/assets/copy-support.stories-1uSBV0aF.js @@ -1,4 +1,4 @@ -import{j as e,a as r,F as m}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as d}from"./data-editor-all-2MtuC67g.js";import{B as c,D as u,P as C,M as h,u as g,d as f}from"./utils-J-I08TtD.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const V={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>e(D,{children:e(c,{title:"Copy support",description:r(m,{children:[r(u,{children:["Large amounts of data can be copied and customized using"," ",e(C,{children:"getCellsForSelection"}),"."]}),e(h,{children:"The data is copied into a format ready to be pasted into Excel or Google Sheets"}),e("textarea",{placeholder:"Copy something below and paste it here...",style:{width:"100%",marginBottom:20,borderRadius:9,minHeight:200,padding:10}})]}),children:e(t,{})})})]},o=()=>{const{cols:t,getCellContent:i,onColumnResize:l,setCellValue:p}=g(10,!1);return e(d,{...f,getCellContent:i,rowMarkers:"both",columns:t,onCellEdited:p,onColumnResize:l,rows:400})};var a,s,n;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:`() => { +import{j as e,a as r,F as m}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as d}from"./data-editor-all-MRDpHEQ_.js";import{B as c,D as u,P as C,M as h,u as g,d as f}from"./utils-0sbaJdQp.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const V={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>e(D,{children:e(c,{title:"Copy support",description:r(m,{children:[r(u,{children:["Large amounts of data can be copied and customized using"," ",e(C,{children:"getCellsForSelection"}),"."]}),e(h,{children:"The data is copied into a format ready to be pasted into Excel or Google Sheets"}),e("textarea",{placeholder:"Copy something below and paste it here...",style:{width:"100%",marginBottom:20,borderRadius:9,minHeight:200,padding:10}})]}),children:e(t,{})})})]},o=()=>{const{cols:t,getCellContent:i,onColumnResize:l,setCellValue:p}=g(10,!1);return e(d,{...f,getCellContent:i,rowMarkers:"both",columns:t,onCellEdited:p,onColumnResize:l,rows:400})};var a,s,n;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/custom-header-icons.stories-1obFr94u.js b/docs/assets/custom-header-icons.stories-YLibh_hX.js similarity index 95% rename from docs/assets/custom-header-icons.stories-1obFr94u.js rename to docs/assets/custom-header-icons.stories-YLibh_hX.js index b9308ce9b..b5dbd5fca 100644 --- a/docs/assets/custom-header-icons.stories-1obFr94u.js +++ b/docs/assets/custom-header-icons.stories-YLibh_hX.js @@ -1,4 +1,4 @@ -import{j as l,F as u,a as f}from"./marked.esm-dbrxtycE.js";import{R as t}from"./index-BMVQvedj.js";import{D as m}from"./data-editor-all-2MtuC67g.js";import{B as h,D as g,P as v,a as M,d as H}from"./utils-J-I08TtD.js";import{S as w}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const A={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>l(w,{children:l(h,{title:"Custom header icons",description:l(u,{children:f(g,{children:["You can provide overrides for the default icons by passing the"," ",l(v,{children:"headerIcons"})," prop."]})}),children:l(o,{})})})]},r=()=>{const{cols:o,getCellContent:s,onColumnResize:C,setCellValue:a}=M(),c=t.useMemo(()=>{const e=[...o];return e[3]={...e[3],title:"CUSTOM ICON",icon:"custom",width:200},e},[o]),p=t.useMemo(()=>({custom:e=>` +import{j as l,F as u,a as f}from"./marked.esm-dbrxtycE.js";import{R as t}from"./index-BMVQvedj.js";import{D as m}from"./data-editor-all-MRDpHEQ_.js";import{B as h,D as g,P as v,a as M,d as H}from"./utils-0sbaJdQp.js";import{S as w}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const A={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>l(w,{children:l(h,{title:"Custom header icons",description:l(u,{children:f(g,{children:["You can provide overrides for the default icons by passing the"," ",l(v,{children:"headerIcons"})," prop."]})}),children:l(o,{})})})]},r=()=>{const{cols:o,getCellContent:s,onColumnResize:C,setCellValue:a}=M(),c=t.useMemo(()=>{const e=[...o];return e[3]={...e[3],title:"CUSTOM ICON",icon:"custom",width:200},e},[o]),p=t.useMemo(()=>({custom:e=>` diff --git a/docs/assets/custom-header.stories-dT08SgHP.js b/docs/assets/custom-header.stories-vDuU60kQ.js similarity index 88% rename from docs/assets/custom-header.stories-dT08SgHP.js rename to docs/assets/custom-header.stories-vDuU60kQ.js index 3589cc287..cc454aac3 100644 --- a/docs/assets/custom-header.stories-dT08SgHP.js +++ b/docs/assets/custom-header.stories-vDuU60kQ.js @@ -1,4 +1,4 @@ -import{j as o}from"./marked.esm-dbrxtycE.js";import{R as s}from"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-2MtuC67g.js";import{B as f,D as x,u as g,d as C}from"./utils-J-I08TtD.js";import{S as y}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const B={title:"Glide-Data-Grid/DataEditor Demos",decorators:[n=>o(y,{children:o(f,{title:"Custom Drawing",description:o(x,{children:"You can draw over or under most objects in the grid."}),children:o(n,{})})})]},a=()=>{const{cols:n,getCellContent:p}=g(1e3,!0,!0),w=s.useCallback((c,l)=>{const{ctx:e,rect:t}=c;e.beginPath(),e.rect(t.x,t.y,t.width,t.height);const r=e.createLinearGradient(0,t.y,0,t.y+t.height);r.addColorStop(0,"#ff00d934"),r.addColorStop(1,"#00a2ff34"),e.fillStyle=r,e.fill(),l()},[]),h=s.useCallback((c,l)=>{l();const{ctx:e,rect:t}=c,r=7;e.beginPath(),e.moveTo(t.x+t.width-r,t.y+1),e.lineTo(t.x+t.width,t.y+r+1),e.lineTo(t.x+t.width,t.y+1),e.closePath(),e.save(),e.fillStyle="#ff0000",e.fill(),e.restore()},[]);return o(u,{...C,getCellContent:p,columns:n,drawHeader:w,drawCell:h,rows:3e3,rowMarkers:"both"})};var i,d,m;a.parameters={...a.parameters,docs:{...(i=a.parameters)==null?void 0:i.docs,source:{originalSource:`() => { +import{j as o}from"./marked.esm-dbrxtycE.js";import{R as s}from"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-MRDpHEQ_.js";import{B as f,D as x,u as g,d as C}from"./utils-0sbaJdQp.js";import{S as y}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const B={title:"Glide-Data-Grid/DataEditor Demos",decorators:[n=>o(y,{children:o(f,{title:"Custom Drawing",description:o(x,{children:"You can draw over or under most objects in the grid."}),children:o(n,{})})})]},a=()=>{const{cols:n,getCellContent:p}=g(1e3,!0,!0),w=s.useCallback((c,l)=>{const{ctx:e,rect:t}=c;e.beginPath(),e.rect(t.x,t.y,t.width,t.height);const r=e.createLinearGradient(0,t.y,0,t.y+t.height);r.addColorStop(0,"#ff00d934"),r.addColorStop(1,"#00a2ff34"),e.fillStyle=r,e.fill(),l()},[]),h=s.useCallback((c,l)=>{l();const{ctx:e,rect:t}=c,r=7;e.beginPath(),e.moveTo(t.x+t.width-r,t.y+1),e.lineTo(t.x+t.width,t.y+r+1),e.lineTo(t.x+t.width,t.y+1),e.closePath(),e.save(),e.fillStyle="#ff0000",e.fill(),e.restore()},[]);return o(u,{...C,getCellContent:p,columns:n,drawHeader:w,drawCell:h,rows:3e3,rowMarkers:"both"})};var i,d,m;a.parameters={...a.parameters,docs:{...(i=a.parameters)==null?void 0:i.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/data-editor-all-2MtuC67g.js b/docs/assets/data-editor-all-2MtuC67g.js deleted file mode 100644 index d792e6fdf..000000000 --- a/docs/assets/data-editor-all-2MtuC67g.js +++ /dev/null @@ -1,124 +0,0 @@ -var Kl=Object.defineProperty;var Nl=(t,o,l)=>o in t?Kl(t,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[o]=l;var fn=(t,o,l)=>(Nl(t,typeof o!="symbol"?o+"":o,l),l);import{s as mn,a as to,j as Y,F as or}from"./marked.esm-dbrxtycE.js";import{r as i,R as ye}from"./index-BMVQvedj.js";import{_ as Wl}from"./iframe-9FFu--7X.js";import{G as Z,b as Po,i as Eo,r as nr,c as Ko,C as X,g as hr,d as Ul,w as Rt,e as Bl,m as hn,f as Vl,h as rr,I as Io,p as Xl,j as Yl,t as _l,k as jl,l as At,o as lr,n as ir,q as ql,s as $o,v as Fo,x as Zl,y as Jl,z as Ql,A as ei,B as ti,D as sr,E as eo,F as oi,H as ni,J as cr,K as ri,u as gn,L as li,M as ii,T as si,N as ar,O as ci,P as ai}from"./image-window-loader-lKUISrIQ.js";import{c as Mt,r as Gt,d as ui}from"./throttle-7EuXLZa7.js";import{u as di,f as ur}from"./flatten-qRvRBp6y.js";import{G as fi}from"./scrolling-data-grid-19OhoR-o.js";const _='',hi=t=>{const o=t.fgColor,l=t.bgColor;return` - ${_}`},gi=t=>{const o=t.fgColor,l=t.bgColor;return` - ${_}`},vi=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - - `},mi=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - -`},Ci=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - -`},gr=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - - - - `},wi=t=>{const o=t.bgColor;return`${_} - - - - -`},pi=gr,bi=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - -`},yi=t=>{const o=t.fgColor,l=t.bgColor;return` - ${_} - - - - - - - - `},xi=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - - -`},Mi=t=>{const o=t.fgColor,l=t.bgColor;return` - ${_} - - - `},Ri=t=>{const o=t.fgColor,l=t.bgColor;return` - ${_} - - - `},ki=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - -`},Si=t=>{const o=t.fgColor,l=t.bgColor;return` - ${_} - - - - `},zi=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - - -`},Ti=t=>{const o=t.fgColor,l=t.bgColor;return` - ${_} - - - - `},Li=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - -`},Hi=t=>{const o=t.fgColor,l=t.bgColor;return` - ${_} - - - `},Di=t=>{const o=t.fgColor,l=t.bgColor;return` - ${_} - - - `},Ei=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - -`},Ii=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - - - - -`},$i=t=>{const o=t.fgColor,l=t.bgColor;return` - ${_} - - - `},Fi=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - -`},Ai=t=>{const o=t.fgColor,l=t.bgColor;return` - ${_} - - - `},Gi=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - - -`},Oi=t=>{const o=t.fgColor,l=t.bgColor;return`${_} - - -`},Pi=t=>{const o=t.fgColor;return` - - - `},Ki=t=>{const o=t.fgColor;return` - - - -`},Ni={headerRowID:hi,headerNumber:vi,headerCode:gi,headerString:mi,headerBoolean:Ci,headerAudioUri:pi,headerVideoUri:bi,headerEmoji:yi,headerImage:xi,headerUri:gr,headerPhone:Mi,headerMarkdown:Ri,headerDate:ki,headerTime:Si,headerEmail:zi,headerReference:Ti,headerIfThenElse:Li,headerSingleValue:Hi,headerLookup:Di,headerTextTemplate:Ei,headerMath:Ii,headerRollup:$i,headerJoinStrings:Fi,headerSplitString:Ai,headerGeoDistance:Gi,headerArray:Oi,rowOwnerOverlay:Pi,protectedColumnOverlay:Ki,renameIcon:wi},Wi=mn("div")({name:"SearchWrapper",class:"slyseh9",propsAsIs:!1}),Ui=Y("svg",{className:"button-icon",viewBox:"0 0 512 512",children:Y("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})}),Bi=Y("svg",{className:"button-icon",viewBox:"0 0 512 512",children:Y("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})}),Vi=Y("svg",{className:"button-icon",viewBox:"0 0 512 512",children:Y("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})}),Xi=10,Yi=t=>{const{canvasRef:o,cellYOffset:l,rows:d,columns:w,searchInputRef:M,searchValue:b,searchResults:D,onSearchValueChange:z,getCellsForSelection:p,onSearchResultsChanged:C,showSearch:S=!1,onSearchClose:F}=t,[W]=i.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[K,xe]=i.useState(""),ie=b??K,Ae=i.useCallback(E=>{xe(E),z==null||z(E)},[z]),[k,B]=i.useState(),le=i.useRef(k);le.current=k,i.useEffect(()=>{D!==void 0&&(D.length>0?B(E=>({rowsSearched:d,results:D.length,selectedIndex:(E==null?void 0:E.selectedIndex)??-1})):B(void 0))},[d,D]);const Me=i.useRef();Me.current===void 0&&(Me.current=new AbortController);const Q=i.useRef(),[j,J]=i.useState([]),ee=D??j,V=i.useCallback(()=>{Q.current!==void 0&&(window.cancelAnimationFrame(Q.current),Q.current=void 0,Me.current.abort())},[]),Se=i.useRef(l);Se.current=l;const kt=i.useCallback(E=>{const oe=new RegExp(E.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let se=Se.current,He=Math.min(10,d),Pe=0;B(void 0),J([]);const ft=[],no=async()=>{var Ve;if(p===void 0)return;const Uo=performance.now(),Pt=d-Pe;let ht=p({x:0,y:se,width:w.length,height:Math.min(He,Pt,d-se)},Me.current.signal);typeof ht=="function"&&(ht=await ht());let ro=!1;for(const[ge,De]of ht.entries())for(const[Bo,Ze]of De.entries()){let Je;switch(Ze.kind){case Z.Text:case Z.Number:Je=Ze.displayData;break;case Z.Uri:case Z.Markdown:Je=Ze.data;break;case Z.Boolean:Je=typeof Ze.data=="boolean"?Ze.data.toString():void 0;break;case Z.Image:case Z.Bubble:Je=Ze.data.join("🐳");break;case Z.Custom:Je=Ze.copyData;break}Je!==void 0&&oe.test(Je)&&(ft.push([Bo,ge+se]),ro=!0)}const lo=performance.now();ro&&J([...ft]),Pe+=ht.length,Po(Pe<=d);const nt=((Ve=le.current)==null?void 0:Ve.selectedIndex)??-1;B({results:ft.length,rowsSearched:Pe,selectedIndex:nt}),C==null||C(ft,nt),se+He>=d?se=0:se+=He;const gt=lo-Uo,vt=Math.max(gt,1),mt=Xi/vt;He=Math.ceil(He*mt),Pe{var E;F==null||F(),B(void 0),J([]),C==null||C([],-1),V(),(E=o==null?void 0:o.current)==null||E.focus()},[V,o,F,C]),oo=i.useCallback(E=>{Ae(E.target.value),D===void 0&&(E.target.value===""?(B(void 0),J([]),V()):kt(E.target.value))},[kt,V,Ae,D]);i.useEffect(()=>{S&&M.current!==null&&(Ae(""),M.current.focus({preventScroll:!0}))},[S,M,Ae]);const dt=i.useCallback(E=>{var se;if((se=E==null?void 0:E.stopPropagation)==null||se.call(E),k===void 0)return;const oe=(k.selectedIndex+1)%k.results;B({...k,selectedIndex:oe}),C==null||C(ee,oe)},[k,C,ee]),Le=i.useCallback(E=>{var se;if((se=E==null?void 0:E.stopPropagation)==null||se.call(E),k===void 0)return;let oe=(k.selectedIndex-1)%k.results;oe<0&&(oe+=k.results),B({...k,selectedIndex:oe}),C==null||C(ee,oe)},[C,ee,k]),Ge=i.useCallback(E=>{(E.ctrlKey||E.metaKey)&&E.nativeEvent.code==="KeyF"||E.key==="Escape"?(ue(),E.stopPropagation(),E.preventDefault()):E.key==="Enter"&&(E.shiftKey?Le():dt())},[ue,dt,Le]);i.useEffect(()=>()=>{V()},[V]);const[Ot,Oe]=i.useState(!1);i.useEffect(()=>{if(S)Oe(!0);else{const E=setTimeout(()=>Oe(!1),150);return()=>clearTimeout(E)}},[S]);const Wo=i.useMemo(()=>{if(!S&&!Ot)return null;let E;k!==void 0&&(E=k.results>=1e3?"over 1000":`${k.results} result${k.results!==1?"s":""}`,k.selectedIndex>=0&&(E=`${k.selectedIndex+1} of ${E}`));const oe=Pe=>{Pe.stopPropagation()},He={width:`${Math.floor(((k==null?void 0:k.rowsSearched)??0)/d*100)}%`};return to(Wi,{className:S?"":"out",onMouseDown:oe,onMouseMove:oe,onMouseUp:oe,onClick:oe,children:[to("div",{className:"gdg-search-bar-inner",children:[Y("input",{id:W,"aria-hidden":!S,"data-testid":"search-input",ref:M,onChange:oo,value:ie,tabIndex:S?void 0:-1,onKeyDownCapture:Ge}),Y("button",{"aria-label":"Previous Result","aria-hidden":!S,tabIndex:S?void 0:-1,onClick:Le,disabled:((k==null?void 0:k.results)??0)===0,children:Ui}),Y("button",{"aria-label":"Next Result","aria-hidden":!S,tabIndex:S?void 0:-1,onClick:dt,disabled:((k==null?void 0:k.results)??0)===0,children:Bi}),F!==void 0&&Y("button",{"aria-label":"Close Search","aria-hidden":!S,"data-testid":"search-close-button",tabIndex:S?void 0:-1,onClick:ue,children:Vi})]}),k!==void 0?to(or,{children:[Y("div",{className:"gdg-search-status",children:Y("div",{"data-testid":"search-result-area",children:E})}),Y("div",{className:"gdg-search-progress",style:He})]}):Y("div",{className:"gdg-search-status",children:Y("label",{htmlFor:W,children:"Type to search"})})]})},[S,Ot,k,d,W,M,oo,ie,Ge,Le,dt,F,ue]);return to(or,{children:[Y(fi,{prelightCells:ee,accessibilityHeight:t.accessibilityHeight,canvasRef:t.canvasRef,cellXOffset:t.cellXOffset,cellYOffset:t.cellYOffset,className:t.className,clientSize:t.clientSize,columns:t.columns,disabledRows:t.disabledRows,enableGroups:t.enableGroups,fillHandle:t.fillHandle,firstColAccessible:t.firstColAccessible,nonGrowWidth:t.nonGrowWidth,fixedShadowX:t.fixedShadowX,fixedShadowY:t.fixedShadowY,freezeColumns:t.freezeColumns,getCellContent:t.getCellContent,getCellRenderer:t.getCellRenderer,getGroupDetails:t.getGroupDetails,getRowThemeOverride:t.getRowThemeOverride,groupHeaderHeight:t.groupHeaderHeight,headerHeight:t.headerHeight,highlightRegions:t.highlightRegions,imageWindowLoader:t.imageWindowLoader,initialSize:t.initialSize,isFilling:t.isFilling,isFocused:t.isFocused,lockColumns:t.lockColumns,maxColumnWidth:t.maxColumnWidth,minColumnWidth:t.minColumnWidth,onHeaderMenuClick:t.onHeaderMenuClick,onHeaderIndicatorClick:t.onHeaderIndicatorClick,onMouseMove:t.onMouseMove,onVisibleRegionChanged:t.onVisibleRegionChanged,overscrollX:t.overscrollX,overscrollY:t.overscrollY,preventDiagonalScrolling:t.preventDiagonalScrolling,rightElement:t.rightElement,rightElementProps:t.rightElementProps,rowHeight:t.rowHeight,rows:t.rows,scrollRef:t.scrollRef,selection:t.selection,theme:t.theme,freezeTrailingRows:t.freezeTrailingRows,hasAppendRow:t.hasAppendRow,translateX:t.translateX,translateY:t.translateY,verticalBorder:t.verticalBorder,onColumnProposeMove:t.onColumnProposeMove,drawFocusRing:t.drawFocusRing,drawCell:t.drawCell,drawHeader:t.drawHeader,experimental:t.experimental,gridRef:t.gridRef,headerIcons:t.headerIcons,isDraggable:t.isDraggable,onCanvasBlur:t.onCanvasBlur,onCanvasFocused:t.onCanvasFocused,onCellFocused:t.onCellFocused,onColumnMoved:t.onColumnMoved,onColumnResize:t.onColumnResize,onColumnResizeEnd:t.onColumnResizeEnd,onColumnResizeStart:t.onColumnResizeStart,onContextMenu:t.onContextMenu,onDragEnd:t.onDragEnd,onDragLeave:t.onDragLeave,onDragOverCell:t.onDragOverCell,onDragStart:t.onDragStart,onDrop:t.onDrop,onItemHovered:t.onItemHovered,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onRowMoved:t.onRowMoved,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY,resizeIndicator:t.resizeIndicator}),Wo]})},_i=Yi;class ji extends i.PureComponent{constructor(){super(...arguments);fn(this,"wrapperRef",i.createRef());fn(this,"clickOutside",l=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(l))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(l.target)){let d=l.target;for(;d!==null;){if(d.classList.contains("click-outside-ignore"))return;d=d.parentElement}this.props.onClickOutside()}})}componentDidMount(){document.addEventListener("touchend",this.clickOutside,!0),document.addEventListener("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener("touchend",this.clickOutside,!0),document.removeEventListener("mousedown",this.clickOutside,!0),document.removeEventListener("contextmenu",this.clickOutside,!0)}render(){const{onClickOutside:l,isOutsideClick:d,...w}=this.props;return Y("div",{...w,ref:this.wrapperRef,children:this.props.children})}}const qi=()=>t=>Math.max(16,t.targetHeight-10),Zi=mn("input")({name:"RenameInput",class:"r1fzhvm4",propsAsIs:!1,vars:{"r1fzhvm4-0":[qi(),"px"]}}),Ji=t=>{const{bounds:o,group:l,onClose:d,canvasBounds:w,onFinish:M}=t,[b,D]=ye.useState(l);return Y(ji,{style:{position:"absolute",left:o.x-w.left+1,top:o.y-w.top,width:o.width-2,height:o.height},className:"c181oggi",onClickOutside:d,children:Y(Zi,{targetHeight:o.height,"data-testid":"group-rename-input",value:b,onBlur:d,onFocus:z=>z.target.setSelectionRange(0,b.length),onChange:z=>D(z.target.value),onKeyDown:z=>{z.key==="Enter"?M(b):z.key==="Escape"&&d()},autoFocus:!0})})},vn=150;function Qi(t,o,l,d){var M;const w=d(o);return((M=w==null?void 0:w.measure)==null?void 0:M.call(w,t,o,l))??vn}function vr(t,o,l,d,w,M,b,D,z){let p=0;const C=w===void 0?[]:w.map(F=>{const W=Qi(t,F[d],o,z);return p=Math.max(p,W),W});if(C.length>5&&D){p=0;let F=0;for(const K of C)F+=K;const W=F/C.length;for(let K=0;K=W*2?C[K]=0:p=Math.max(p,C[K])}p=Math.max(p,t.measureText(l.title).width+16+(l.icon===void 0?0:28));const S=Math.max(Math.ceil(M),Math.min(Math.floor(b),Math.ceil(p)));return{...l,width:S}}function es(t,o,l,d,w,M,b,D,z){const p=i.useRef(o),C=i.useRef(l),S=i.useRef(b);p.current=o,C.current=l,S.current=b;const[F,W]=i.useMemo(()=>{if(typeof window>"u")return[null,null];const k=document.createElement("canvas");return k.style.display="none",k.style.opacity="0",k.style.position="fixed",[k,k.getContext("2d",{alpha:!1})]},[]);i.useLayoutEffect(()=>(F&&document.documentElement.append(F),()=>{F==null||F.remove()}),[F]);const K=i.useRef({}),xe=i.useRef(),[ie,Ae]=i.useState();return i.useLayoutEffect(()=>{const k=C.current;if(k===void 0||t.every(Eo))return;let B=Math.max(1,10-Math.floor(t.length/1e4)),le=0;B1&&(B--,le=1);const Me={x:0,y:0,width:t.length,height:Math.min(p.current,B)},Q={x:0,y:p.current-1,width:t.length,height:1};(async()=>{const J=k(Me,z.signal),ee=le>0?k(Q,z.signal):void 0;let V;typeof J=="object"?V=J:V=await nr(J),ee!==void 0&&(typeof ee=="object"?V=[...V,...ee]:V=[...V,...await nr(ee)]),xe.current=t,Ae(V)})()},[z.signal,t]),i.useMemo(()=>{let B=t.every(Eo)?t:W===null?t.map(j=>Eo(j)?j:{...j,width:vn}):(W.font=S.current.baseFontFull,t.map((j,J)=>{if(Eo(j))return j;if(K.current[j.id]!==void 0)return{...j,width:K.current[j.id]};if(ie===void 0||xe.current!==t||j.id===void 0)return{...j,width:vn};const ee=vr(W,b,j,J,ie,w,M,!0,D);return K.current[j.id]=ee.width,ee})),le=0,Me=0;const Q=[];for(const[j,J]of B.entries())le+=J.width,J.grow!==void 0&&J.grow>0&&(Me+=J.grow,Q.push(j));if(le0){const j=[...B],J=d-le;let ee=J;for(let V=0;V1&&t.startsWith("_")?Number.parseInt(t.slice(1))===o.keyCode:t.length===1&&t>="a"&&t<="z"?t.toUpperCase().codePointAt(0)===o.keyCode:t===o.key}function A(t,o,l){const d=mr(t,o);return d&&(l.didMatch=!0),d}function mr(t,o){if(t.length===0)return!1;if(t.includes("|")){const z=t.split("|");for(const p of z)if(mr(p,o))return!0;return!1}let l=!1,d=!1,w=!1,M=!1;const b=t.split("+"),D=b.pop();if(!ts(D,o))return!1;if(b[0]==="any")return!0;for(const z of b)switch(z){case"ctrl":l=!0;break;case"shift":d=!0;break;case"alt":w=!0;break;case"meta":M=!0;break;case"primary":Ko.value?M=!0:l=!0;break}return o.altKey===w&&o.ctrlKey===l&&o.shiftKey===d&&o.metaKey===M}function os(t,o,l,d,w,M){const b=ye.useCallback((p,C,S,F)=>{var k;(M==="cell"||M==="multi-cell")&&p!==void 0&&(p={...p,range:{x:p.cell[0],y:p.cell[1],width:1,height:1}});const W=l==="mixed"&&(S||F==="drag"),K=d==="mixed"&&W,xe=w==="mixed"&&W;let ie={current:p===void 0?void 0:{...p,rangeStack:F==="drag"?((k=t.current)==null?void 0:k.rangeStack)??[]:[]},columns:K?t.columns:X.empty(),rows:xe?t.rows:X.empty()};S&&(M==="multi-rect"||M==="multi-cell")&&ie.current!==void 0&&t.current!==void 0&&(ie={...ie,current:{...ie.current,rangeStack:[...t.current.rangeStack,t.current.range]}}),o(ie,C)},[d,t,l,M,w,o]),D=ye.useCallback((p,C,S)=>{p=p??t.rows,C!==void 0&&(p=p.add(C));let F;if(w==="exclusive"&&p.length>0)F={current:void 0,columns:X.empty(),rows:p};else{const W=S&&l==="mixed",K=S&&d==="mixed";F={current:W?t.current:void 0,columns:K?t.columns:X.empty(),rows:p}}o(F,!1)},[d,t,l,w,o]),z=ye.useCallback((p,C,S)=>{p=p??t.columns,C!==void 0&&(p=p.add(C));let F;if(d==="exclusive"&&p.length>0)F={current:void 0,rows:X.empty(),columns:p};else{const W=S&&l==="mixed",K=S&&w==="mixed";F={current:W?t.current:void 0,rows:K?t.rows:X.empty(),columns:p}}o(F,!1)},[d,t,l,w,o]);return[b,D,z]}function ns(t,o,l,d,w){const M=i.useCallback(p=>{if(t===!0){const C=[];for(let S=p.y;S=w?F.push({kind:Z.Loading,allowOverlay:!1}):F.push(o([W,S]));C.push(F)}return C}return(t==null?void 0:t(p,d.signal))??[]},[d.signal,o,t,w]),b=t!==void 0?M:void 0,D=i.useCallback(p=>{if(b===void 0)return[];const C={...p,x:p.x-l};if(C.x<0){C.x=0,C.width--;const S=b(C,d.signal);return typeof S=="function"?async()=>(await S()).map(F=>[{kind:Z.Loading,allowOverlay:!1},...F]):S.map(F=>[{kind:Z.Loading,allowOverlay:!1},...F])}return b(C,d.signal)},[d.signal,b,l]);return[t!==void 0?D:void 0,b]}function dr(t){return typeof t=="string"?t:`${t}px`}const rs=()=>t=>t.innerWidth,ls=()=>t=>t.innerHeight,is=mn("div")({name:"Wrapper",class:"w2q57ts",propsAsIs:!1,vars:{"w2q57ts-0":[rs()],"w2q57ts-1":[ls()]}}),ss=t=>{const{inWidth:o,inHeight:l,children:d,...w}=t;return Y(is,{innerHeight:dr(l),innerWidth:dr(o),...w,children:d})},cs=2,as=1300;function us(t,o,l){const d=ye.useRef(0),[w,M]=t??[0,0];ye.useEffect(()=>{if(w===0&&M===0){d.current=0;return}let b=!1,D=0;const z=p=>{var C;if(!b){if(D===0)D=p;else{const S=p-D;d.current=Math.min(1,d.current+S/as);const F=d.current**1.618*S*cs;(C=o.current)==null||C.scrollBy(w*F,M*F),D=p,l==null||l()}window.requestAnimationFrame(z)}};return window.requestAnimationFrame(z),()=>{b=!0}},[o,w,M,l])}function ds({rowHeight:t,headerHeight:o,groupHeaderHeight:l,theme:d,overscrollX:w,overscrollY:M,scaleToRem:b,remSize:D}){const[z,p,C,S,F,W]=ye.useMemo(()=>{if(!b||D===16)return[t,o,l,d,w,M];const K=D/16,xe=t,ie=hr();return[typeof xe=="number"?xe*K:Ae=>Math.ceil(xe(Ae)*K),Math.ceil(o*K),Math.ceil(l*K),{...d,headerIconSize:((d==null?void 0:d.headerIconSize)??ie.headerIconSize)*K,cellHorizontalPadding:((d==null?void 0:d.cellHorizontalPadding)??ie.cellHorizontalPadding)*K,cellVerticalPadding:((d==null?void 0:d.cellVerticalPadding)??ie.cellVerticalPadding)*K},Math.ceil((w??0)*K),Math.ceil((M??0)*K)]},[l,o,w,M,D,t,b,d]);return{rowHeight:z,headerHeight:p,groupHeaderHeight:C,theme:S,overscrollX:F,overscrollY:W}}const ut={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function G(t,o){return t===!0?o:t===!1?"":t}function fr(t){const o=Ko.value;return{activateCell:G(t.activateCell," |Enter|shift+Enter"),clear:G(t.clear,"any+Escape"),closeOverlay:G(t.closeOverlay,"any+Escape"),acceptOverlayDown:G(t.acceptOverlayDown,"Enter"),acceptOverlayUp:G(t.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:G(t.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:G(t.acceptOverlayRight,"Tab"),copy:t.copy,cut:t.cut,delete:G(t.delete,o?"Backspace|Delete":"Delete"),downFill:G(t.downFill,"primary+_68"),scrollToSelectedCell:G(t.scrollToSelectedCell,"primary+Enter"),goDownCell:G(t.goDownCell,"ArrowDown"),goDownCellRetainSelection:G(t.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:G(t.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:G(t.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:G(t.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:G(t.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:G(t.goUpCell,"ArrowUp"),goUpCellRetainSelection:G(t.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:G(t.goToFirstCell,"primary+Home"),goToFirstColumn:G(t.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:G(t.goToFirstRow,"primary+ArrowUp"),goToLastCell:G(t.goToLastCell,"primary+End"),goToLastColumn:G(t.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:G(t.goToLastRow,"primary+ArrowDown"),goToNextPage:G(t.goToNextPage,"PageDown"),goToPreviousPage:G(t.goToPreviousPage,"PageUp"),paste:t.paste,rightFill:G(t.rightFill,"primary+_82"),search:G(t.search,"primary+f"),selectAll:G(t.selectAll,"primary+a"),selectColumn:G(t.selectColumn,"ctrl+ "),selectGrowDown:G(t.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:G(t.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:G(t.selectGrowRight,"shift+ArrowRight"),selectGrowUp:G(t.selectGrowUp,"shift+ArrowUp"),selectRow:G(t.selectRow,"shift+ "),selectToFirstCell:G(t.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:G(t.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:G(t.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:G(t.selectToLastCell,"primary+shift+End"),selectToLastColumn:G(t.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:G(t.selectToLastRow,"primary+shift+ArrowDown")}}function fs(t){const o=Ul(t);return ye.useMemo(()=>{if(o===void 0)return fr(ut);const l={...o,goToNextPage:(o==null?void 0:o.goToNextPage)??(o==null?void 0:o.pageDown)??ut.goToNextPage,goToPreviousPage:(o==null?void 0:o.goToPreviousPage)??(o==null?void 0:o.pageUp)??ut.goToPreviousPage,goToFirstCell:(o==null?void 0:o.goToFirstCell)??(o==null?void 0:o.first)??ut.goToFirstCell,goToLastCell:(o==null?void 0:o.goToLastCell)??(o==null?void 0:o.last)??ut.goToLastCell,selectToFirstCell:(o==null?void 0:o.selectToFirstCell)??(o==null?void 0:o.first)??ut.selectToFirstCell,selectToLastCell:(o==null?void 0:o.selectToLastCell)??(o==null?void 0:o.last)??ut.selectToLastCell};return fr({...ut,...l})},[o])}function hs(t){function o(d,w,M){if(typeof d=="number")return{headerIndex:d,isCollapsed:!1,depth:w,path:M};const b={headerIndex:d.headerIndex,isCollapsed:d.isCollapsed,depth:w,path:M};return d.subGroups!==void 0&&(b.subGroups=d.subGroups.map((D,z)=>o(D,w+1,[...M,z])).sort((D,z)=>D.headerIndex-z.headerIndex)),b}return t.map((d,w)=>o(d,0,[w])).sort((d,w)=>d.headerIndex-w.headerIndex)}function Cn(t,o){const l=[];function d(b,D,z=!1){let p=D!==null?D-b.headerIndex:o-b.headerIndex;if(b.subGroups!==void 0&&(p=b.subGroups[0].headerIndex-b.headerIndex),p--,l.push({headerIndex:b.headerIndex,contentIndex:-1,skip:z,isCollapsed:b.isCollapsed,depth:b.depth,path:b.path,rows:p}),b.subGroups)for(let C=0;Cb.skip===!1).map(b=>{const{skip:D,...z}=b;return z})}function No(t,o){if(o===void 0||Cn.length===0)return{path:[t],originalIndex:t,isGroupHeader:!1,groupIndex:t,contentIndex:t,groupRows:-1};let l=t;for(const d of o){if(l===0)return{path:[...d.path,-1],originalIndex:d.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:d.rows};if(l--,!d.isCollapsed){if(lt===void 0?void 0:Cn(t,o),[t,o]),M=ye.useMemo(()=>w===void 0?o:w.reduce((p,C)=>p+(C.isCollapsed?1:C.rows+1),0),[w,o]),b=ye.useMemo(()=>t===void 0||typeof l=="number"&&t.height===l?l:p=>{const{isGroupHeader:C}=No(p,w);return C?t.height:typeof l=="number"?l:l(p)},[w,t,l]),D=ye.useCallback(p=>{if(w===void 0)return p;let C=p;for(const S of w){if(C===0)return;if(C--,!S.isCollapsed){if(C{if(t===void 0)return d==null?void 0:d(p,p,p);if(d===void 0&&(t==null?void 0:t.themeOverride)===void 0)return;const{isGroupHeader:C,contentIndex:S,groupIndex:F}=No(p,w);return C?t.themeOverride:d==null?void 0:d(p,F,S)},[w,d,t]));return t===void 0?{rowHeight:b,rows:o,rowNumberMapper:D,getRowThemeOverride:z}:{rowHeight:b,rows:M,rowNumberMapper:D,getRowThemeOverride:z}}function vs(t,o){const l=ye.useMemo(()=>t===void 0?void 0:Cn(t,o),[t,o]);return{getRowGroupingForPath:wr,updateRowGroupingByPath:Cr,mapper:ye.useCallback(d=>{if(typeof d=="number")return No(d,l);const w=No(d[1],l);return{...w,originalIndex:[d[0],w.originalIndex]}},[l])}}function Cr(t,o,l){const[d,...w]=o;return w[0]===-1?t.map((M,b)=>b===d?{...M,...l}:M):t.map((M,b)=>b===d?{...M,subGroups:Cr(M.subGroups??[],w,l)}:M)}function wr(t,o){const[l,...d]=o;return d[0]===-1?t[l]:wr(t[l].subGroups??[],d)}const ms=i.lazy(async()=>await Wl(()=>import("./data-grid-overlay-editor-KImiKR0_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url));let Cs=0;function ws(t){return di(ur(ur(t).filter(o=>o.span!==void 0).map(o=>{var l,d;return Gt((((l=o.span)==null?void 0:l[0])??0)+1,(((d=o.span)==null?void 0:d[1])??0)+1)})))}function Ao(t,o){return t===void 0||o===0||t.columns.length===0&&t.current===void 0?t:{current:t.current===void 0?void 0:{cell:[t.current.cell[0]+o,t.current.cell[1]],range:{...t.current.range,x:t.current.range.x+o},rangeStack:t.current.rangeStack.map(l=>({...l,x:l.x+o}))},rows:t.rows,columns:t.columns.offset(o)}}const Go={kind:Z.Loading,allowOverlay:!1},Oo={columns:X.empty(),rows:X.empty(),current:void 0},ps=(t,o)=>{var Qn,er,tr;const[l,d]=i.useState(Oo),[w,M]=i.useState(),b=i.useRef(null),D=i.useRef(null),[z,p]=i.useState(),C=i.useRef(null),S=i.useRef(),F=typeof window>"u"?null:window,{imageEditorOverride:W,getRowThemeOverride:K,markdownDivCreateNode:xe,width:ie,height:Ae,columns:k,rows:B,getCellContent:le,onCellClicked:Me,onCellActivated:Q,onFillPattern:j,onFinishedEditing:J,coercePasteValue:ee,drawHeader:V,drawCell:Se,editorBloom:kt,onHeaderClicked:ue,onColumnProposeMove:oo,spanRangeBehavior:dt="default",onGroupHeaderClicked:Le,onCellContextMenu:Ge,className:Ot,onHeaderContextMenu:Oe,getCellsForSelection:Wo,onGroupHeaderContextMenu:E,onGroupHeaderRenamed:oe,onCellEdited:se,onCellsEdited:He,onSearchResultsChanged:Pe,searchResults:ft,onSearchValueChange:no,searchValue:Uo,onKeyDown:Pt,onKeyUp:ht,keybindings:ro,editOnType:lo=!0,onRowAppended:nt,onColumnMoved:gt,validateCell:vt,highlightRegions:mt,rangeSelect:Ve="rect",columnSelect:ge="multi",rowSelect:De="multi",rangeSelectionBlending:Bo="exclusive",columnSelectionBlending:Ze="exclusive",rowSelectionBlending:Je="exclusive",onDelete:Vo,onDragStart:io,onMouseMove:so,onPaste:Ct,copyHeaders:wn=!1,freezeColumns:Qe=0,cellActivationBehavior:Xo="second-click",rowSelectionMode:Yo="auto",onHeaderMenuClick:co,onHeaderIndicatorClick:ao,getGroupDetails:uo,rowGrouping:rt,onSearchClose:_o,onItemHovered:fo,onSelectionCleared:lt,showSearch:pr,onVisibleRegionChanged:ho,gridSelection:wt,onGridSelectionChange:jo,minColumnWidth:br=50,maxColumnWidth:yr=500,maxColumnAutoWidth:xr,provideEditor:Mr,trailingRowOptions:N,freezeTrailingRows:et=0,allowedFillDirections:pn="orthogonal",scrollOffsetX:Kt,scrollOffsetY:Xe,verticalBorder:St,onDragOverCell:Rr,onDrop:kr,onColumnResize:Nt,onColumnResizeEnd:Wt,onColumnResizeStart:Ut,customRenderers:go,fillHandle:Sr,drawFocusRing:bn=!0,experimental:de,fixedShadowX:zr,fixedShadowY:Tr,headerIcons:Lr,imageWindowLoader:Hr,initialSize:Dr,isDraggable:Er,onDragLeave:Ir,onRowMoved:Bt,overscrollX:$r,overscrollY:Fr,preventDiagonalScrolling:Ar,rightElement:Gr,rightElementProps:Or,trapFocus:yn=!1,smoothScrollX:Pr,smoothScrollY:Kr,scaleToRem:Nr=!1,rowHeight:Wr=34,headerHeight:xn=36,groupHeaderHeight:Ur=xn,theme:Br,isOutsideClick:Vr,renderers:qo,resizeIndicator:Xr}=t,ve=typeof t.rowMarkers=="string"?void 0:t.rowMarkers,Ke=(ve==null?void 0:ve.kind)??t.rowMarkers??"none",Yr=(ve==null?void 0:ve.width)??t.rowMarkerWidth,Mn=(ve==null?void 0:ve.startIndex)??t.rowMarkerStartIndex??1,Rn=(ve==null?void 0:ve.theme)??t.rowMarkerTheme,vo=(ve==null?void 0:ve.checkboxStyle)??"square",zt=Math.max(br,20),mo=Math.max(yr,zt),_r=Math.max(xr??mo,zt),kn=i.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:$,rowNumberMapper:Sn,rowHeight:jr,getRowThemeOverride:tt}=gs(rt,B,Wr,K),qr=i.useMemo(()=>Number.parseFloat(kn.fontSize),[kn]),{rowHeight:Ee,headerHeight:Zo,groupHeaderHeight:zn,theme:Tn,overscrollX:Zr,overscrollY:Jr}=ds({groupHeaderHeight:Ur,headerHeight:xn,overscrollX:$r,overscrollY:Fr,remSize:qr,rowHeight:jr,scaleToRem:Nr,theme:Br}),it=fs(ro),Tt=Yr??(B>1e4?48:B>1e3?44:B>100?36:32),Ye=Ke!=="none",u=Ye?1:0,te=nt!==void 0,Vt=(N==null?void 0:N.sticky)===!0,[Qr,Ln]=i.useState(!1),el=pr??Qr,tl=i.useCallback(()=>{_o!==void 0?_o():Ln(!1)},[_o]),h=i.useMemo(()=>wt===void 0?void 0:Ao(wt,u),[wt,u])??l,Re=i.useRef();Re.current===void 0&&(Re.current=new AbortController),i.useEffect(()=>()=>Re==null?void 0:Re.current.abort(),[]);const[ae,ol]=ns(Wo,le,u,Re.current,$),nl=i.useCallback((e,r,n)=>{if(vt===void 0)return!0;const c=[e[0]-u,e[1]];return vt==null?void 0:vt(c,r,n)},[u,vt]),Co=i.useRef(wt),Ie=i.useCallback((e,r)=>{r&&(e=Bl(e,ae,u,dt,Re.current)),jo!==void 0?(Co.current=Ao(e,-u),jo(Co.current)):d(e)},[jo,ae,u,dt]),Lt=Rt(Nt,i.useCallback((e,r,n,c)=>{Nt==null||Nt(k[n-u],r,n-u,c)},[Nt,u,k])),rl=Rt(Wt,i.useCallback((e,r,n,c)=>{Wt==null||Wt(k[n-u],r,n-u,c)},[Wt,u,k])),ll=Rt(Ut,i.useCallback((e,r,n,c)=>{Ut==null||Ut(k[n-u],r,n-u,c)},[Ut,u,k])),il=Rt(V,i.useCallback((e,r)=>(V==null?void 0:V({...e,columnIndex:e.columnIndex-u},r))??!1,[V,u])),sl=Rt(Se,i.useCallback((e,r)=>(Se==null?void 0:Se({...e,col:e.col-u},r))??!1,[Se,u])),st=i.useCallback(e=>{if(Vo!==void 0){const r=Vo(Ao(e,-u));return typeof r=="boolean"?r:Ao(r,u)}return!0},[Vo,u]),[me,Ce,ce]=os(h,Ie,Bo,Ze,Je,Ve),fe=i.useMemo(()=>hn(hr(),Tn),[Tn]),[Jo,cl]=i.useState([0,0,0]),Hn=i.useMemo(()=>{if(qo===void 0)return{};const e={};for(const r of qo)e[r.kind]=r;return e},[qo]),we=i.useCallback(e=>e.kind!==Z.Custom?Hn[e.kind]:go==null?void 0:go.find(r=>r.isMatch(e)),[go,Hn]);let{sizedColumns:ze,nonGrowWidth:Dn}=es(k,$,ol,Jo[0]-(u===0?0:Tt)-Jo[2],zt,_r,fe,we,Re.current);Ke!=="none"&&(Dn+=Tt);const Qo=i.useMemo(()=>ze.some(e=>e.group!==void 0),[ze]),Xt=Qo?Zo+zn:Zo,En=h.rows.length,In=Ke==="none"?void 0:En===0?!1:En===$?!0:void 0,U=i.useMemo(()=>Ke==="none"?ze:[{title:"",width:Tt,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Rn,rowMarker:vo,rowMarkerChecked:In},...ze],[Ke,ze,Tt,Rn,vo,In]),[$n,Fn]=i.useMemo(()=>[Xe!==void 0&&typeof Ee=="number"?Math.floor(Xe/Ee):0,Xe!==void 0&&typeof Ee=="number"?-(Xe%Ee):0],[Xe,Ee]),pe=i.useRef({height:1,width:1,x:0,y:0}),al=i.useMemo(()=>({x:pe.current.x,y:$n,width:pe.current.width??1,height:pe.current.height??1,ty:Fn}),[Fn,$n]),Yt=i.useRef(!1),[ot,An,wo]=Vl(al);pe.current=ot;const Gn=(ot.height??1)>1;i.useLayoutEffect(()=>{if(Xe!==void 0&&C.current!==null&&Gn){if(C.current.scrollTop===Xe)return;C.current.scrollTop=Xe,C.current.scrollTop!==Xe&&wo(),Yt.current=!0}},[Xe,Gn,wo]);const On=(ot.width??1)>1;i.useLayoutEffect(()=>{if(Kt!==void 0&&C.current!==null&&On){if(C.current.scrollLeft===Kt)return;C.current.scrollLeft=Kt,C.current.scrollLeft!==Kt&&wo(),Yt.current=!0}},[Kt,On,wo]);const ul=ot.x+u,po=ot.y,ke=i.useRef(null),be=i.useCallback(e=>{var r;e===!0?(r=ke.current)==null||r.focus():window.requestAnimationFrame(()=>{var n;(n=ke.current)==null||n.focus()})},[]),he=te?$+1:$,$e=i.useCallback(e=>{const r=u===0?e:e.map(c=>({...c,location:[c.location[0]-u,c.location[1]]})),n=He==null?void 0:He(r);if(n!==!0)for(const c of r)se==null||se(c.location,c.value);return n},[se,He,u]),[pt,en]=i.useState(),bo=h.current!==void 0&&h.current.range.width*h.current.range.height>1?h.current.range:void 0,Ht=bn?(Qn=h.current)==null?void 0:Qn.cell:void 0,yo=Ht==null?void 0:Ht[0],xo=Ht==null?void 0:Ht[1],dl=i.useMemo(()=>{if((mt===void 0||mt.length===0)&&(bo??yo??xo??pt)===void 0)return;const e=[];if(mt!==void 0)for(const r of mt){const n=U.length-r.range.x-u;n>0&&e.push({color:r.color,range:{...r.range,x:r.range.x+u,width:Math.min(n,r.range.width)},style:r.style})}return pt!==void 0&&e.push({color:rr(fe.accentColor,0),range:pt,style:"dashed"}),bo!==void 0&&e.push({color:rr(fe.accentColor,.5),range:bo,style:"solid-outline"}),yo!==void 0&&xo!==void 0&&e.push({color:fe.accentColor,range:{x:yo,y:xo,width:1,height:1},style:"solid-outline"}),e.length>0?e:void 0},[pt,bo,yo,xo,mt,U.length,fe.accentColor,u]),Pn=i.useRef(U);Pn.current=U;const Te=i.useCallback(([e,r],n=!1)=>{var g,a,f,v,m,y,T;const c=te&&r===he-1;if(e===0&&Ye){if(c)return Go;const x=Sn(r);return x===void 0?Go:{kind:Io.Marker,allowOverlay:!1,checkboxStyle:vo,checked:(h==null?void 0:h.rows.hasIndex(r))===!0,markerKind:Ke==="clickable-number"?"number":Ke,row:Mn+x,drawHandle:Bt!==void 0,cursor:Ke==="clickable-number"?"pointer":void 0}}else if(c){const H=e===u?(N==null?void 0:N.hint)??"":"",R=Pn.current[e];if(((g=R==null?void 0:R.trailingRowOptions)==null?void 0:g.disabled)===!0)return Go;{const O=((a=R==null?void 0:R.trailingRowOptions)==null?void 0:a.hint)??H,I=((f=R==null?void 0:R.trailingRowOptions)==null?void 0:f.addIcon)??(N==null?void 0:N.addIcon);return{kind:Io.NewRow,hint:O,allowOverlay:!1,icon:I}}}else{const x=e-u;if(n||(de==null?void 0:de.strict)===!0){const R=pe.current,O=R.x>x||x>R.x+R.width||R.y>r||r>R.y+R.height||r>=on.current,I=x===((m=(v=R.extras)==null?void 0:v.selected)==null?void 0:m[0])&&r===((y=R.extras)==null?void 0:y.selected[1]);let L=!1;if(((T=R.extras)==null?void 0:T.freezeRegions)!==void 0){for(const P of R.extras.freezeRegions)if(Xl(P,x,r)){L=!0;break}}if(O&&!I&&!L)return Go}let H=le([x,r]);return u!==0&&H.span!==void 0&&(H={...H,span:[H.span[0]+u,H.span[1]+u]}),H}},[te,he,Ye,Sn,vo,h==null?void 0:h.rows,Ke,Mn,Bt,u,N==null?void 0:N.hint,N==null?void 0:N.addIcon,de==null?void 0:de.strict,le]),tn=i.useCallback(e=>{let r=(uo==null?void 0:uo(e))??{name:e};return oe!==void 0&&e!==""&&(r={icon:r.icon,name:r.name,overrideTheme:r.overrideTheme,actions:[...r.actions??[],{title:"Rename",icon:"renameIcon",onClick:n=>rn({group:r.name,bounds:n.bounds})}]}),r},[uo,oe]),Mo=i.useCallback(e=>{var f;const[r,n]=e.cell,c=U[r],s=(c==null?void 0:c.group)!==void 0?(f=tn(c.group))==null?void 0:f.overrideTheme:void 0,g=c==null?void 0:c.themeOverride,a=tt==null?void 0:tt(n);M({...e,theme:hn(fe,s,g,a,e.content.themeOverride)})},[tt,U,tn,fe]),Dt=i.useCallback((e,r,n)=>{var a;if(h.current===void 0)return;const[c,s]=h.current.cell,g=Te([c,s]);if(g.kind!==Z.Boolean&&g.allowOverlay){let f=g;if(n!==void 0)switch(f.kind){case Z.Number:{const v=Yl(()=>n==="-"?-0:Number.parseFloat(n),0);f={...f,data:Number.isNaN(v)?0:v};break}case Z.Text:case Z.Markdown:case Z.Uri:f={...f,data:n};break}Mo({target:e,content:f,initialValue:n,cell:[c,s],highlight:n===void 0,forceEditMode:n!==void 0})}else g.kind===Z.Boolean&&r&&g.readonly!==!0&&($e([{location:h.current.cell,value:{...g,data:_l(g.data)}}]),(a=ke.current)==null||a.damage([{cell:h.current.cell}]))},[Te,h,$e,Mo]),Kn=i.useCallback((e,r)=>{var s;const n=(s=ke.current)==null?void 0:s.getBounds(e,r);if(n===void 0||C.current===null)return;const c=Te([e,r]);c.allowOverlay&&Mo({target:n,content:c,initialValue:void 0,highlight:!0,cell:[e,r],forceEditMode:!0})},[Te,Mo]),ne=i.useCallback((e,r,n="both",c=0,s=0,g=void 0)=>{if(C.current!==null){const a=ke.current,f=D.current,v=typeof e!="number"?e.unit==="cell"?e.amount:void 0:e,m=typeof r!="number"?r.unit==="cell"?r.amount:void 0:r,y=typeof e!="number"&&e.unit==="px"?e.amount:void 0,T=typeof r!="number"&&r.unit==="px"?r.amount:void 0;if(a!==null&&f!==null){let x={x:0,y:0,width:0,height:0},H=0,R=0;if((v!==void 0||m!==void 0)&&(x=a.getBounds((v??0)+u,m??0)??x,x.width===0||x.height===0))return;const O=f.getBoundingClientRect(),I=O.width/f.offsetWidth;if(y!==void 0&&(x={...x,x:y-O.left-C.current.scrollLeft,width:1}),T!==void 0&&(x={...x,y:T+O.top-C.current.scrollTop,height:1}),x!==void 0){const L={x:x.x-c,y:x.y-s,width:x.width+2*c,height:x.height+2*s};let P=0;for(let dn=0;dn0&&(q=jl(he,re,Ee));let Ue=P*I+O.left+u*Tt*I,je=O.right,Be=O.top+Xt*I,qe=O.bottom-q*I;const Ho=x.width+c*2;switch(g==null?void 0:g.hAlign){case"start":je=Ue+Ho;break;case"end":Ue=je-Ho;break;case"center":Ue=Math.floor((Ue+je)/2)-Ho/2,je=Ue+Ho;break}const Do=x.height+s*2;switch(g==null?void 0:g.vAlign){case"start":qe=Be+Do;break;case"end":Be=qe-Do;break;case"center":Be=Math.floor((Be+qe)/2)-Do/2,qe=Be+Do;break}Ue>L.x?H=L.x-Ue:jeL.y?R=L.y-Be:qe=he-re)&&(R=0),(H!==0||R!==0)&&(I!==1&&(H/=I,R/=I),C.current.scrollTo(H+C.current.scrollLeft,R+C.current.scrollTop))}}}},[u,et,Tt,Xt,Qe,ze,he,Vt,Ee]),Nn=i.useRef(Kn),Wn=i.useRef(le),on=i.useRef($);Nn.current=Kn,Wn.current=le,on.current=$;const Et=i.useCallback(async(e,r=!0)=>{var v;const n=U[e];if(((v=n==null?void 0:n.trailingRowOptions)==null?void 0:v.disabled)===!0)return;const c=nt==null?void 0:nt();let s,g=!0;c!==void 0&&(s=await c,s==="top"&&(g=!1),typeof s=="number"&&(g=!1));let a=0;const f=()=>{if(on.current<=$){a<500&&window.setTimeout(f,a),a=50+a*2;return}const m=typeof s=="number"?s:g?$:0;Lo.current(e-u,m),me({cell:[e,m],range:{x:e,y:m,width:1,height:1}},!1,!1,"edit");const y=Wn.current([e-u,m]);y.allowOverlay&&Fo(y)&&y.readonly!==!0&&r&&window.setTimeout(()=>{Nn.current(e,m)},0)};f()},[U,nt,u,$,me]),Ro=i.useCallback(e=>{var n,c;const r=((c=(n=ze[e])==null?void 0:n.trailingRowOptions)==null?void 0:c.targetColumn)??(N==null?void 0:N.targetColumn);if(typeof r=="number")return r+(Ye?1:0);if(typeof r=="object"){const s=k.indexOf(r);if(s>=0)return s+(Ye?1:0)}},[ze,k,Ye,N==null?void 0:N.targetColumn]),ct=i.useRef(),It=i.useRef(),_t=i.useCallback((e,r)=>{var s;const[n,c]=r;return hn(fe,(s=U[n])==null?void 0:s.themeOverride,tt==null?void 0:tt(c),e.themeOverride)},[tt,U,fe]),{mapper:bt}=vs(rt,B),Ne=rt==null?void 0:rt.navigationBehavior,jt=i.useCallback(e=>{var y,T,x;const r=Ko.value?e.metaKey:e.ctrlKey,n=r&&De==="multi",c=r&&ge==="multi",[s,g]=e.location,a=h.columns,f=h.rows,[v,m]=((y=h.current)==null?void 0:y.cell)??[];if(e.kind==="cell"){if(It.current=void 0,yt.current=[s,g],s===0&&Ye){if(te===!0&&g===$||Ke==="number"||De==="none")return;const H=Te(e.location);if(H.kind!==Io.Marker)return;if(Bt!==void 0){const I=we(H);Po((I==null?void 0:I.kind)===Io.Marker);const L=(T=I==null?void 0:I.onClick)==null?void 0:T.call(I,{...e,cell:H,posX:e.localEventX,posY:e.localEventY,bounds:e.bounds,theme:_t(H,e.location),preventDefault:()=>{}});if(L===void 0||L.checked===H.checked)return}M(void 0),be();const R=f.hasIndex(g),O=ct.current;if(De==="multi"&&(e.shiftKey||e.isLongTouch===!0)&&O!==void 0&&f.hasIndex(O)){const I=[Math.min(O,g),Math.max(O,g)+1];n||Yo==="multi"?Ce(void 0,I,!0):Ce(X.fromSingleSelection(I),void 0,n)}else n||e.isTouch||Yo==="multi"?R?Ce(f.remove(g),void 0,!0):(Ce(void 0,g,!0),ct.current=g):R&&f.length===1?Ce(X.empty(),void 0,r):(Ce(X.fromSingleSelection(g),void 0,r),ct.current=g)}else if(s>=u&&te&&g===$){const H=Ro(s);Et(H??s)}else if(v!==s||m!==g){const H=Te(e.location),R=we(H);if((R==null?void 0:R.onSelect)!==void 0){let L=!1;if(R.onSelect({...e,cell:H,posX:e.localEventX,posY:e.localEventY,bounds:e.bounds,preventDefault:()=>L=!0,theme:_t(H,e.location)}),L)return}if(Ne==="block"&&bt(g).isGroupHeader)return;const O=Vt&&g===$,I=Vt&&h!==void 0&&((x=h.current)==null?void 0:x.cell[1])===$;if((e.shiftKey||e.isLongTouch===!0)&&v!==void 0&&m!==void 0&&h.current!==void 0&&!I){if(O)return;const L=Math.min(s,v),P=Math.max(s,v),q=Math.min(g,m),re=Math.max(g,m);me({...h.current,range:{x:L,y:q,width:P-L+1,height:re-q+1}},!0,r,"click"),ct.current=void 0,be()}else me({cell:[s,g],range:{x:s,y:g,width:1,height:1}},!0,r,"click"),ct.current=void 0,M(void 0),be()}}else if(e.kind==="header")if(yt.current=[s,g],M(void 0),Ye&&s===0)ct.current=void 0,It.current=void 0,De==="multi"&&(f.length!==$?Ce(X.fromSingleSelection([0,$]),void 0,r):Ce(X.empty(),void 0,r),be());else{const H=It.current;if(ge==="multi"&&(e.shiftKey||e.isLongTouch===!0)&&H!==void 0&&a.hasIndex(H)){const R=[Math.min(H,s),Math.max(H,s)+1];c?ce(void 0,R,r):ce(X.fromSingleSelection(R),void 0,r)}else c?(a.hasIndex(s)?ce(a.remove(s),void 0,r):ce(void 0,s,r),It.current=s):ge!=="none"&&(ce(X.fromSingleSelection(s),void 0,r),It.current=s);ct.current=void 0,be()}else e.kind===At?yt.current=[s,g]:e.kind===lr&&!e.isMaybeScrollbar&&(Ie(Oo,!1),M(void 0),be(),lt==null||lt(),ct.current=void 0,It.current=void 0)},[De,ge,h,Ye,u,te,$,Ke,Te,Bt,be,Yo,we,_t,Ce,Ro,Et,Ne,bt,Vt,me,ce,Ie,lt]),qt=i.useRef(!1),yt=i.useRef(),Un=i.useRef(ot),Fe=i.useRef(),fl=i.useCallback(e=>{if($t.current=!1,Un.current=pe.current,e.button!==0&&e.button!==1){Fe.current=void 0;return}const r=performance.now();Fe.current={button:e.button,time:r,location:e.location},(e==null?void 0:e.kind)==="header"&&(qt.current=!0);const n=e.kind==="cell"&&e.isFillHandle;!n&&e.kind!=="cell"&&e.isEdge||(p({previousSelection:h,fillHandle:n}),yt.current=void 0,!e.isTouch&&e.button===0&&!n?jt(e):!e.isTouch&&e.button===1&&(yt.current=e.location))},[h,jt]),[nn,rn]=i.useState(),Bn=i.useCallback(e=>{if(e.kind!==At||ge!=="multi")return;const r=Ko.value?e.metaKey:e.ctrlKey,[n]=e.location,c=h.columns;if(n=u&&ir(s.group,U[f].group);f--)g--;for(let f=n+1;f{if(ae!==void 0&&Lt!==void 0){const r=pe.current.y,n=pe.current.height;let c=ae({x:e,y:r,width:1,height:Math.min(n,$-r)},Re.current.signal);typeof c!="object"&&(c=await c());const s=ze[e-u],a=document.createElement("canvas").getContext("2d",{alpha:!1});if(a!==null){a.font=fe.baseFontFull;const f=vr(a,fe,s,0,c,zt,mo,!1,we);Lt==null||Lt(s,f.width,e,f.width)}}},[ze,ae,mo,fe,zt,Lt,u,$,we]),[hl,ln]=i.useState(),Ft=i.useCallback(async(e,r)=>{var f,v;const n=(f=e.current)==null?void 0:f.range;if(n===void 0||ae===void 0||r.current===void 0)return;const c=r.current.range;if(j!==void 0){let m=!1;if(j({fillDestination:{...c,x:c.x-u},patternSource:{...n,x:n.x-u},preventDefault:()=>m=!0}),m)return}let s=ae(n,Re.current.signal);typeof s!="object"&&(s=await s());const g=s,a=[];for(let m=0;m({cell:m.location})))},[ae,$e,j,u]),Vn=i.useCallback(()=>{if(h.current===void 0||h.current.range.width<=1)return;const e={...h,current:{...h.current,range:{...h.current.range,width:1}}};Ft(e,h)},[Ft,h]),Xn=i.useCallback(()=>{if(h.current===void 0||h.current.range.height<=1)return;const e={...h,current:{...h.current,range:{...h.current.range,height:1}}};Ft(e,h)},[Ft,h]),gl=i.useCallback((e,r)=>{var y,T;const n=z;if(p(void 0),en(void 0),ln(void 0),qt.current=!1,r)return;if((n==null?void 0:n.fillHandle)===!0&&h.current!==void 0&&((y=n.previousSelection)==null?void 0:y.current)!==void 0){if(pt===void 0)return;const x={...h,current:{...h.current,range:Zl(n.previousSelection.current.range,pt)}};Ft(n.previousSelection,x),Ie(x,!0);return}const[c,s]=e.location,[g,a]=yt.current??[],f=()=>{$t.current=!0},v=x=>{var R,O,I;const H=x.isTouch||g===c&&a===s;if(H&&(Me==null||Me([c-u,s],{...x,preventDefault:f})),x.button===1)return!$t.current;if(!$t.current){const L=Te(e.location),P=we(L);if(P!==void 0&&P.onClick!==void 0&&H){const re=P.onClick({...x,cell:L,posX:x.localEventX,posY:x.localEventY,bounds:x.bounds,theme:_t(L,e.location),preventDefault:f});re!==void 0&&!$o(re)&&eo(re)&&($e([{location:x.location,value:re}]),(R=ke.current)==null||R.damage([{cell:x.location}]))}if($t.current||h.current===void 0)return!1;let q=!1;switch(L.activationBehaviorOverride??Xo){case"double-click":case"second-click":{if(((I=(O=n==null?void 0:n.previousSelection)==null?void 0:O.current)==null?void 0:I.cell)===void 0)break;const[re,Ue]=h.current.cell,[je,Be]=n.previousSelection.current.cell;q=c===re&&c===je&&s===Ue&&s===Be&&(x.isDoubleClick===!0||Xo==="second-click");break}case"single-click":{q=!0;break}}if(q)return Q==null||Q([c-u,s]),Dt(x.bounds,!1),!0}return!1},m=e.location[0]-u;if(e.isTouch){const x=pe.current,H=Un.current;if(x.x!==H.x||x.y!==H.y)return;if(e.isLongTouch===!0){if(e.kind==="cell"&&Jl((T=h.current)==null?void 0:T.cell,e.location)){Ge==null||Ge([m,e.location[1]],{...e,preventDefault:f});return}else if(e.kind==="header"&&h.columns.hasIndex(c)){Oe==null||Oe(m,{...e,preventDefault:f});return}else if(e.kind===At){if(m<0)return;E==null||E(m,{...e,preventDefault:f});return}}e.kind==="cell"?v(e)||jt(e):e.kind===At?Le==null||Le(m,{...e,preventDefault:f}):(e.kind===Ql&&(ue==null||ue(m,{...e,preventDefault:f})),jt(e));return}if(e.kind==="header"){if(m<0)return;e.isEdge?e.isDoubleClick===!0&&ko(c):e.button===0&&c===g&&s===a&&(ue==null||ue(m,{...e,preventDefault:f}))}if(e.kind===At){if(m<0)return;e.button===0&&c===g&&s===a&&(Le==null||Le(m,{...e,preventDefault:f}),$t.current||Bn(e))}e.kind==="cell"&&(e.button===0||e.button===1)&&v(e),yt.current=void 0},[z,h,u,pt,Ft,Ie,Me,Te,we,Xo,_t,$e,Q,Dt,Ge,Oe,E,jt,Le,ue,ko,Bn]),vl=i.useCallback(e=>{const r={...e,location:[e.location[0]-u,e.location[1]]};so==null||so(r),z!==void 0&&e.buttons===0&&(p(void 0),en(void 0),ln(void 0),qt.current=!1),ln(n=>{var c;return qt.current?[e.scrollEdge[0],0]:e.scrollEdge[0]===(n==null?void 0:n[0])&&e.scrollEdge[1]===n[1]?n:z===void 0||(((c=Fe.current)==null?void 0:c.location[0])??0){co==null||co(e-u,r)},[co,u]),Cl=i.useCallback((e,r)=>{ao==null||ao(e-u,r)},[ao,u]),_e=(er=h==null?void 0:h.current)==null?void 0:er.cell,wl=i.useCallback((e,r,n,c,s,g)=>{Yt.current=!1;let a=_e;a!==void 0&&(a=[a[0]-u,a[1]]);const f=Qe===0?void 0:{x:0,y:e.y,width:Qe,height:e.height},v=[];f!==void 0&&v.push(f),et>0&&(v.push({x:e.x-u,y:$-et,width:e.width,height:et}),Qe>0&&v.push({x:0,y:$-et,width:Qe,height:et}));const m={x:e.x-u,y:e.y,width:e.width,height:te&&e.y+e.height>=$?e.height-1:e.height,tx:s,ty:g,extras:{selected:a,freezeRegion:f,freezeRegions:v}};pe.current=m,An(m),cl([r,n,c]),ho==null||ho(m,m.tx,m.ty,m.extras)},[_e,u,te,$,Qe,et,An,ho]),pl=Rt(gt,i.useCallback((e,r)=>{gt==null||gt(e-u,r-u),ge!=="none"&&ce(X.fromSingleSelection(r),void 0,!0)},[ge,gt,u,ce])),sn=i.useRef(!1),bl=i.useCallback(e=>{if(e.location[0]===0&&u>0){e.preventDefault();return}io==null||io({...e,location:[e.location[0]-u,e.location[1]]}),e.defaultPrevented()||(sn.current=!0),p(void 0)},[io,u]),yl=i.useCallback(()=>{sn.current=!1},[]),Yn=rt==null?void 0:rt.selectionBehavior,So=i.useCallback(e=>{if(Yn!=="block-spanning")return;const{isGroupHeader:r,path:n,groupRows:c}=bt(e);if(r)return[e,e];const s=n[n.length-1],g=e-s,a=e+c-s-1;return[g,a]},[bt,Yn]),cn=i.useRef(),an=i.useCallback(e=>{var r,n,c;if(!ei(e,cn.current)&&(cn.current=e,!(((r=Fe==null?void 0:Fe.current)==null?void 0:r.button)!==void 0&&Fe.current.button>=1))){if(e.buttons!==0&&z!==void 0&&((n=Fe.current)==null?void 0:n.location[0])===0&&e.location[0]===0&&u===1&&De==="multi"&&z.previousSelection&&!z.previousSelection.rows.hasIndex(Fe.current.location[1])&&h.rows.hasIndex(Fe.current.location[1])){const s=Math.min(Fe.current.location[1],e.location[1]),g=Math.max(Fe.current.location[1],e.location[1])+1;Ce(X.fromSingleSelection([s,g]),void 0,!1)}if(e.buttons!==0&&z!==void 0&&h.current!==void 0&&!sn.current&&!qt.current&&(Ve==="rect"||Ve==="multi-rect")){const[s,g]=h.current.cell;let[a,f]=e.location;if(f<0&&(f=pe.current.y),z.fillHandle===!0&&((c=z.previousSelection)==null?void 0:c.current)!==void 0){const v=z.previousSelection.current.range;f=Math.min(f,te?$-1:$);const m=ti(v,a,f,pn);en(m)}else{if(te&&g===$)return;if(te&&f===$)if(e.kind===lr)f--;else return;a=Math.max(a,u);const y=So(g);f=y===void 0?f:Mt(f,y[0],y[1]);const T=a-s,x=f-g,H={x:T>=0?s:a,y:x>=0?g:f,width:Math.abs(T)+1,height:Math.abs(x)+1};me({...h.current,range:H},!0,!1,"drag")}}fo==null||fo({...e,location:[e.location[0]-u,e.location[1]]})}},[z,u,De,h,Ve,fo,Ce,te,$,pn,So,me]),xl=i.useCallback(()=>{var a,f;const e=cn.current;if(e===void 0)return;const[r,n]=e.scrollEdge;let[c,s]=e.location;const g=pe.current;r===-1?c=((f=(a=g.extras)==null?void 0:a.freezeRegion)==null?void 0:f.x)??g.x:r===1&&(c=g.x+g.width),n===-1?s=Math.max(0,g.y):n===1&&(s=Math.min($-1,g.y+g.height)),c=Mt(c,0,U.length-1),s=Mt(s,0,$-1),an({...e,location:[c,s]})},[U.length,an,$]);us(hl,C,xl);const We=i.useCallback(e=>{if(h.current===void 0)return;const[r,n]=e,[c,s]=h.current.cell,g=h.current.range;let a=g.x,f=g.x+g.width,v=g.y,m=g.y+g.height;const[y,T]=So(s)??[0,$-1],x=T+1;if(n!==0)switch(n){case 2:{m=x,v=s,ne(0,m,"vertical");break}case-2:{v=y,m=s+1,ne(0,v,"vertical");break}case 1:{vs+1?(m--,ne(0,m,"vertical")):(v=Math.max(y,v-1),ne(0,v,"vertical"));break}default:sr()}if(r!==0)if(r===2)f=U.length,a=c,ne(f-1-u,0,"horizontal");else if(r===-2)a=u,f=c+1,ne(a-u,0,"horizontal");else{let H=[];if(ae!==void 0){const R=ae({x:a,y:v,width:f-a-u,height:m-v},Re.current.signal);typeof R=="object"&&(H=ws(R))}if(r===1){let R=!1;if(a0){const O=Gt(a+1,c+1).find(I=>!H.includes(I-u));O!==void 0&&(a=O,R=!0)}else a++,R=!0;R&&ne(a,0,"horizontal")}R||(f=Math.min(U.length,f+1),ne(f-1-u,0,"horizontal"))}else if(r===-1){let R=!1;if(f>c+1){if(H.length>0){const O=Gt(f-1,c,-1).find(I=>!H.includes(I-u));O!==void 0&&(f=O,R=!0)}else f--,R=!0;R&&ne(f-u,0,"horizontal")}R||(a=Math.max(u,a-1),ne(a-u,0,"horizontal"))}else sr()}me({cell:h.current.cell,range:{x:a,y:v,width:f-a,height:m-v}},!0,!1,"keyboard-select")},[ae,So,h,U.length,u,$,ne,me]),at=i.useCallback((e,r,n,c)=>{const s=he-(n?0:1);e=Mt(e,u,ze.length-1+u),r=Mt(r,0,s);const g=_e==null?void 0:_e[0],a=_e==null?void 0:_e[1];if(e===g&&r===a)return!1;if(c&&h.current!==void 0){const f=[...h.current.rangeStack];(h.current.range.width>1||h.current.range.height>1)&&f.push(h.current.range),Ie({...h,current:{cell:[e,r],range:{x:e,y:r,width:1,height:1},rangeStack:f}},!0)}else me({cell:[e,r],range:{x:e,y:r,width:1,height:1}},!0,!1,"keyboard-nav");return S.current!==void 0&&S.current[0]===e&&S.current[1]===r&&(S.current=void 0),ne(e-u,r),!0},[he,u,ze.length,_e,h,ne,Ie,me]),Ml=i.useCallback((e,r)=>{(w==null?void 0:w.cell)!==void 0&&e!==void 0&&eo(e)&&($e([{location:w.cell,value:e}]),window.requestAnimationFrame(()=>{var s;(s=ke.current)==null||s.damage([{cell:w.cell}])})),be(!0),M(void 0);const[n,c]=r;if(h.current!==void 0&&(n!==0||c!==0)){const s=h.current.cell[1]===he-1&&e!==void 0;at(Mt(h.current.cell[0]+n,0,U.length-1),Mt(h.current.cell[1]+c,0,he-1),s,!1)}J==null||J(e,r)},[w==null?void 0:w.cell,be,h,J,$e,he,at,U.length]),Rl=i.useMemo(()=>`gdg-overlay-${Cs++}`,[]),xt=i.useCallback(e=>{var n,c,s,g;be();const r=[];for(let a=e.x;a({cell:a.location})))},[be,le,we,$e,u]),Zt=w!==void 0,_n=i.useCallback(e=>{var O,I;const r=()=>{e.stopPropagation(),e.preventDefault()},n={didMatch:!1},{bounds:c}=e,s=h.columns,g=h.rows,a=it;if(!Zt&&A(a.clear,e,n))Ie(Oo,!1),lt==null||lt();else if(!Zt&&A(a.selectAll,e,n))Ie({columns:X.empty(),rows:X.empty(),current:{cell:((O=h.current)==null?void 0:O.cell)??[u,0],range:{x:u,y:0,width:k.length,height:$},rangeStack:[]}},!1);else if(A(a.search,e,n))(I=b==null?void 0:b.current)==null||I.focus({preventScroll:!0}),Ln(!0);else if(A(a.delete,e,n)){const L=(st==null?void 0:st(h))??!0;if(L!==!1){const P=L===!0?h:L;if(P.current!==void 0){xt(P.current.range);for(const q of P.current.rangeStack)xt(q)}for(const q of P.rows)xt({x:u,y:q,width:k.length,height:1});for(const q of P.columns)xt({x:q,y:0,width:1,height:$})}}if(n.didMatch)return r(),!0;if(h.current===void 0)return!1;let[f,v]=h.current.cell;const[,m]=h.current.cell;let y=!1,T=!1;if(A(a.scrollToSelectedCell,e,n)?Lo.current(f-u,v):ge!=="none"&&A(a.selectColumn,e,n)?s.hasIndex(f)?ce(s.remove(f),void 0,!0):ge==="single"?ce(X.fromSingleSelection(f),void 0,!0):ce(void 0,f,!0):De!=="none"&&A(a.selectRow,e,n)?g.hasIndex(v)?Ce(g.remove(v),void 0,!0):De==="single"?Ce(X.fromSingleSelection(v),void 0,!0):Ce(void 0,v,!0):!Zt&&c!==void 0&&A(a.activateCell,e,n)?v===$&&te?window.setTimeout(()=>{const L=Ro(f);Et(L??f)},0):(Q==null||Q([f-u,v]),Dt(c,!0)):h.current.range.height>1&&A(a.downFill,e,n)?Xn():h.current.range.width>1&&A(a.rightFill,e,n)?Vn():A(a.goToNextPage,e,n)?v+=Math.max(1,pe.current.height-4):A(a.goToPreviousPage,e,n)?v-=Math.max(1,pe.current.height-4):A(a.goToFirstCell,e,n)?(M(void 0),v=0,f=0):A(a.goToLastCell,e,n)?(M(void 0),v=Number.MAX_SAFE_INTEGER,f=Number.MAX_SAFE_INTEGER):A(a.selectToFirstCell,e,n)?(M(void 0),We([-2,-2])):A(a.selectToLastCell,e,n)?(M(void 0),We([2,2])):Zt?(A(a.closeOverlay,e,n)&&M(void 0),A(a.acceptOverlayDown,e,n)&&(M(void 0),v++),A(a.acceptOverlayUp,e,n)&&(M(void 0),v--),A(a.acceptOverlayLeft,e,n)&&(M(void 0),f--),A(a.acceptOverlayRight,e,n)&&(M(void 0),f++)):(A(a.goDownCell,e,n)?v+=1:A(a.goUpCell,e,n)?v-=1:A(a.goRightCell,e,n)?f+=1:A(a.goLeftCell,e,n)?f-=1:A(a.goDownCellRetainSelection,e,n)?(v+=1,y=!0):A(a.goUpCellRetainSelection,e,n)?(v-=1,y=!0):A(a.goRightCellRetainSelection,e,n)?(f+=1,y=!0):A(a.goLeftCellRetainSelection,e,n)?(f-=1,y=!0):A(a.goToLastRow,e,n)?v=$-1:A(a.goToFirstRow,e,n)?v=Number.MIN_SAFE_INTEGER:A(a.goToLastColumn,e,n)?f=Number.MAX_SAFE_INTEGER:A(a.goToFirstColumn,e,n)?f=Number.MIN_SAFE_INTEGER:(Ve==="rect"||Ve==="multi-rect")&&(A(a.selectGrowDown,e,n)?We([0,1]):A(a.selectGrowUp,e,n)?We([0,-1]):A(a.selectGrowRight,e,n)?We([1,0]):A(a.selectGrowLeft,e,n)?We([-1,0]):A(a.selectToLastRow,e,n)?We([0,2]):A(a.selectToFirstRow,e,n)?We([0,-2]):A(a.selectToLastColumn,e,n)?We([2,0]):A(a.selectToFirstColumn,e,n)&&We([-2,0])),T=n.didMatch),Ne!==void 0&&Ne!=="normal"&&v!==m){const L=Ne==="skip-up"||Ne==="skip"||Ne==="block",P=Ne==="skip-down"||Ne==="skip"||Ne==="block",q=v=0&&bt(v).isGroupHeader;)v--;v<0&&(v=m)}else if(!q&&P){for(;v<$&&bt(v).isGroupHeader;)v++;v>=$&&(v=m)}}const H=at(f,v,!1,y),R=n.didMatch;return R&&(H||!T||yn)&&r(),R},[Ne,Zt,h,it,ge,De,Ve,u,bt,$,at,Ie,lt,k.length,st,yn,xt,ce,Ce,te,Ro,Et,Q,Dt,Xn,Vn,We]),Jt=i.useCallback(e=>{let r=!1;if(Pt!==void 0&&Pt({...e,cancel:()=>{r=!0}}),r||_n(e)||h.current===void 0)return;const[n,c]=h.current.cell,s=pe.current;if(lo&&!e.metaKey&&!e.ctrlKey&&h.current!==void 0&&e.key.length===1&&/[ -~]/g.test(e.key)&&e.bounds!==void 0&&Fo(le([n-u,Math.max(0,Math.min(c,$-1))]))){if((!te||c!==$)&&(s.y>c||c>s.y+s.height||s.x>n||n>s.x+s.width))return;Dt(e.bounds,!0,e.key),e.stopPropagation(),e.preventDefault()}},[lo,Pt,_n,h,le,u,$,te,Dt]),kl=i.useCallback((e,r)=>{const n=e.location[0]-u;if(e.kind==="header"&&(Oe==null||Oe(n,{...e,preventDefault:r})),e.kind===At){if(n<0)return;E==null||E(n,{...e,preventDefault:r})}if(e.kind==="cell"){const[c,s]=e.location;Ge==null||Ge([n,s],{...e,preventDefault:r}),ni(h,e.location)||at(c,s,!1,!1)}},[h,Ge,E,Oe,u,at]),un=i.useCallback(async e=>{var a,f,v;if(!it.paste)return;function r(m,y,T,x){var R,O;const H=typeof T=="object"?(T==null?void 0:T.join(` -`))??"":(T==null?void 0:T.toString())??"";if(!$o(m)&&Fo(m)&&m.readonly!==!0){const I=ee==null?void 0:ee(H,m);if(I!==void 0&&eo(I))return{location:y,value:I};const L=we(m);if(L===void 0)return;if(L.kind===Z.Custom){Po(m.kind===Z.Custom);const P=(R=L.onPaste)==null?void 0:R.call(L,H,m.data);return P===void 0?void 0:{location:y,value:{...m,data:P}}}else{const P=(O=L.onPaste)==null?void 0:O.call(L,H,m,{formatted:x,formattedString:typeof x=="string"?x:x==null?void 0:x.join(` -`),rawValue:T});return P===void 0?void 0:(Po(P.kind===m.kind),{location:y,value:P})}}}const n=h.columns,c=h.rows,s=((a=C.current)==null?void 0:a.contains(document.activeElement))===!0||((f=D.current)==null?void 0:f.contains(document.activeElement))===!0;let g;if(h.current!==void 0?g=[h.current.range.x,h.current.range.y]:n.length===1?g=[n.first()??0,0]:c.length===1&&(g=[u,c.first()??0]),s&&g!==void 0){let m,y;const T="text/plain",x="text/html";if(navigator.clipboard.read!==void 0){const I=await navigator.clipboard.read();for(const L of I){if(L.types.includes(x)){const q=await(await L.getType(x)).text(),re=cr(q);if(re!==void 0){m=re;break}}L.types.includes(T)&&(y=await(await L.getType(T)).text())}}else if(navigator.clipboard.readText!==void 0)y=await navigator.clipboard.readText();else if(e!==void 0&&(e==null?void 0:e.clipboardData)!==null){if(e.clipboardData.types.includes(x)){const I=e.clipboardData.getData(x);m=cr(I)}m===void 0&&e.clipboardData.types.includes(T)&&(y=e.clipboardData.getData(T))}else return;const[H,R]=g,O=[];do{if(Ct===void 0){const I=Te(g),L=y??(m==null?void 0:m.map(q=>q.map(re=>re.rawValue).join(" ")).join(" "))??"",P=r(I,g,L,void 0);P!==void 0&&O.push(P);break}if(m===void 0){if(y===void 0)return;m=ri(y)}if(Ct===!1||typeof Ct=="function"&&(Ct==null?void 0:Ct([g[0]-u,g[1]],m.map(I=>I.map(L=>{var P;return((P=L.rawValue)==null?void 0:P.toString())??""}))))!==!0)return;for(const[I,L]of m.entries()){if(I+R>=$)break;for(const[P,q]of L.entries()){const re=[P+H,I+R],[Ue,je]=re;if(Ue>=U.length||je>=he)continue;const Be=Te(re),qe=r(Be,re,q.rawValue,q.formatted);qe!==void 0&&O.push(qe)}}}while(!1);$e(O),(v=ke.current)==null||v.damage(O.map(I=>({cell:I.location})))}},[ee,we,Te,h,it.paste,U.length,$e,he,Ct,u,$]);gn("paste",un,F,!1,!0);const Qt=i.useCallback(async(e,r)=>{var a,f;if(!it.copy)return;const n=r===!0||((a=C.current)==null?void 0:a.contains(document.activeElement))===!0||((f=D.current)==null?void 0:f.contains(document.activeElement))===!0,c=h.columns,s=h.rows,g=(v,m)=>{if(!wn)ar(v,m,e);else{const y=m.map(T=>({kind:Z.Text,data:k[T].title,displayData:k[T].title,allowOverlay:!1}));ar([y,...v],m,e)}};if(n&&ae!==void 0){if(h.current!==void 0){let v=ae(h.current.range,Re.current.signal);typeof v!="object"&&(v=await v()),g(v,Gt(h.current.range.x-u,h.current.range.x+h.current.range.width-u))}else if(s!==void 0&&s.length>0){const m=[...s].map(y=>{const T=ae({x:u,y,width:k.length,height:1},Re.current.signal);return typeof T=="object"?T[0]:T().then(x=>x[0])});if(m.some(y=>y instanceof Promise)){const y=await Promise.all(m);g(y,Gt(k.length))}else g(m,Gt(k.length))}else if(c.length>0){const v=[],m=[];for(const y of c){let T=ae({x:y,y:0,width:1,height:$},Re.current.signal);typeof T!="object"&&(T=await T()),v.push(T),m.push(y-u)}if(v.length===1)g(v[0],m);else{const y=v.reduce((T,x)=>T.map((H,R)=>[...H,...x[R]]));g(y,m)}}}},[k,ae,h,it.copy,u,$,wn]);gn("copy",Qt,F,!1,!1);const Sl=i.useCallback(async e=>{var n,c;if(!(!it.cut||!(((n=C.current)==null?void 0:n.contains(document.activeElement))===!0||((c=D.current)==null?void 0:c.contains(document.activeElement))===!0))&&(await Qt(e),h.current!==void 0)){let s={current:{cell:h.current.cell,range:h.current.range,rangeStack:[]},rows:X.empty(),columns:X.empty()};const g=st==null?void 0:st(s);if(g===!1||(s=g===!0?s:g,s.current===void 0))return;xt(s.current.range)}},[xt,h,it.cut,Qt,st]);gn("cut",Sl,F,!1,!1);const zl=i.useCallback((e,r)=>{if(Pe!==void 0){u!==0&&(e=e.map(s=>[s[0]-u,s[1]])),Pe(e,r);return}if(e.length===0||r===-1)return;const[n,c]=e[r];S.current!==void 0&&S.current[0]===n&&S.current[1]===c||(S.current=[n,c],at(n,c,!1,!1))},[Pe,u,at]),[zo,To]=((tr=wt==null?void 0:wt.current)==null?void 0:tr.cell)??[],Lo=i.useRef(ne);Lo.current=ne,i.useLayoutEffect(()=>{var e,r,n,c;!Yt.current&&zo!==void 0&&To!==void 0&&(zo!==((r=(e=Co.current)==null?void 0:e.current)==null?void 0:r.cell[0])||To!==((c=(n=Co.current)==null?void 0:n.current)==null?void 0:c.cell[1]))&&Lo.current(zo,To),Yt.current=!1},[zo,To]);const jn=h.current!==void 0&&(h.current.cell[0]>=U.length||h.current.cell[1]>=he);i.useLayoutEffect(()=>{jn&&Ie(Oo,!1)},[jn,Ie]);const Tl=i.useMemo(()=>te===!0&&(N==null?void 0:N.tint)===!0?X.fromSingleSelection(he-1):X.empty(),[he,te,N==null?void 0:N.tint]),Ll=i.useCallback(e=>typeof St=="boolean"?St:(St==null?void 0:St(e-u))??!0,[u,St]),Hl=i.useMemo(()=>{if(nn===void 0||D.current===null)return null;const{bounds:e,group:r}=nn,n=D.current.getBoundingClientRect();return Y(Ji,{bounds:e,group:r,canvasBounds:n,onClose:()=>rn(void 0),onFinish:c=>{rn(void 0),oe==null||oe(r,c)}})},[oe,nn]),Dl=Math.min(U.length,Qe+(Ye?1:0));i.useImperativeHandle(o,()=>({appendRow:(e,r)=>Et(e+u,r),updateCells:e=>{var r;return u!==0&&(e=e.map(n=>({cell:[n.cell[0]+u,n.cell[1]]}))),(r=ke.current)==null?void 0:r.damage(e)},getBounds:(e,r)=>{var n;if(!((D==null?void 0:D.current)===null||(C==null?void 0:C.current)===null)){if(e===void 0&&r===void 0){const c=D.current.getBoundingClientRect(),s=c.width/C.current.clientWidth;return{x:c.x-C.current.scrollLeft*s,y:c.y-C.current.scrollTop*s,width:C.current.scrollWidth*s,height:C.current.scrollHeight*s}}return(n=ke.current)==null?void 0:n.getBounds((e??0)+u,r)}},focus:()=>{var e;return(e=ke.current)==null?void 0:e.focus()},emit:async e=>{switch(e){case"delete":Jt({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":Jt({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":Jt({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await Qt(void 0,!0);break;case"paste":await un();break}},scrollTo:ne,remeasureColumns:e=>{for(const r of e)ko(r+u)}}),[Et,ko,Qt,Jt,un,u,ne]);const[qn,Zn]=_e??[],El=i.useCallback(e=>{const[r,n]=e;if(n===-1){ge!=="none"&&(ce(X.fromSingleSelection(r),void 0,!1),be());return}qn===r&&Zn===n||(me({cell:e,range:{x:r,y:n,width:1,height:1}},!0,!1,"keyboard-nav"),ne(r,n))},[ge,be,ne,qn,Zn,me,ce]),[Il,$l]=i.useState(!1),Jn=i.useRef(ui(e=>{$l(e)},5)),Fl=i.useCallback(()=>{Jn.current(!0),h.current===void 0&&h.columns.length===0&&h.rows.length===0&&z===void 0&&me({cell:[u,po],range:{x:u,y:po,width:1,height:1}},!0,!1,"keyboard-select")},[po,h,z,u,me]),Al=i.useCallback(()=>{Jn.current(!1)},[]),[Gl,Ol]=i.useMemo(()=>{let e;const r=(de==null?void 0:de.scrollbarWidthOverride)??li(),n=$+(te?1:0);if(typeof Ee=="number")e=Xt+n*Ee;else{let s=0;const g=Math.min(n,10);for(let a=0;ag.width+s,0)+r;return[`${Math.min(1e5,c)}px`,`${Math.min(1e5,e)}px`]},[U,de==null?void 0:de.scrollbarWidthOverride,Ee,$,te,Xt]),Pl=i.useMemo(()=>ii(fe),[fe]);return Y(si.Provider,{value:fe,children:to(ss,{style:Pl,className:Ot,inWidth:ie??Gl,inHeight:Ae??Ol,children:[Y(_i,{fillHandle:Sr,drawFocusRing:bn,experimental:de,fixedShadowX:zr,fixedShadowY:Tr,getRowThemeOverride:tt,headerIcons:Lr,imageWindowLoader:Hr,initialSize:Dr,isDraggable:Er,onDragLeave:Ir,onRowMoved:Bt,overscrollX:Zr,overscrollY:Jr,preventDiagonalScrolling:Ar,rightElement:Gr,rightElementProps:Or,smoothScrollX:Pr,smoothScrollY:Kr,className:Ot,enableGroups:Qo,onCanvasFocused:Fl,onCanvasBlur:Al,canvasRef:D,onContextMenu:kl,theme:fe,cellXOffset:ul,cellYOffset:po,accessibilityHeight:ot.height,onDragEnd:yl,columns:U,nonGrowWidth:Dn,drawHeader:il,onColumnProposeMove:oo,drawCell:sl,disabledRows:Tl,freezeColumns:Dl,lockColumns:u,firstColAccessible:u===0,getCellContent:Te,minColumnWidth:zt,maxColumnWidth:mo,searchInputRef:b,showSearch:el,onSearchClose:tl,highlightRegions:dl,getCellsForSelection:ae,getGroupDetails:tn,headerHeight:Zo,isFocused:Il,groupHeaderHeight:Qo?zn:0,freezeTrailingRows:et+(te&&(N==null?void 0:N.sticky)===!0?1:0),hasAppendRow:te,onColumnResize:Lt,onColumnResizeEnd:rl,onColumnResizeStart:ll,onCellFocused:El,onColumnMoved:pl,onDragStart:bl,onHeaderMenuClick:ml,onHeaderIndicatorClick:Cl,onItemHovered:an,isFilling:(z==null?void 0:z.fillHandle)===!0,onMouseMove:vl,onKeyDown:Jt,onKeyUp:ht,onMouseDown:fl,onMouseUp:gl,onDragOverCell:Rr,onDrop:kr,onSearchResultsChanged:zl,onVisibleRegionChanged:wl,clientSize:Jo,rowHeight:Ee,searchResults:ft,searchValue:Uo,onSearchValueChange:no,rows:he,scrollRef:C,selection:h,translateX:ot.tx,translateY:ot.ty,verticalBorder:Ll,gridRef:ke,getCellRenderer:we,resizeIndicator:Xr}),Hl,w!==void 0&&Y(i.Suspense,{fallback:null,children:Y(ms,{...w,validateCell:nl,bloom:kt,id:Rl,getCellRenderer:we,className:(de==null?void 0:de.isSubGrid)===!0?"click-outside-ignore":void 0,provideEditor:Mr,imageEditorOverride:W,onFinishEditing:Ml,markdownDivCreateNode:xe,isOutsideClick:Vr})})]})})},bs=i.forwardRef(ps),ys=(t,o)=>{const l=i.useMemo(()=>({...Ni,...t.headerIcons}),[t.headerIcons]),d=i.useMemo(()=>t.imageWindowLoader??new ci,[t.imageWindowLoader]);return Y(bs,{...t,renderers:ai,headerIcons:l,ref:o,imageWindowLoader:d})},Ds=i.forwardRef(ys);export{ji as C,Ds as D,ut as k,vs as u}; -function __vite__mapDeps(indexes) { - if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./data-grid-overlay-editor-KImiKR0_.js","./marked.esm-dbrxtycE.js","./index-BMVQvedj.js","./index-wocATsGp.js","./image-window-loader-lKUISrIQ.js","./throttle-7EuXLZa7.js","./_baseIteratee-WTHxv43n.js","./iframe-9FFu--7X.js","./image-window-loader-1jHxuE_X.css","./flatten-qRvRBp6y.js","./scrolling-data-grid-19OhoR-o.js","./scrolling-data-grid-dE2iz8sf.css","./data-grid-overlay-editor-EbzU9_4i.css"] - } - return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -} \ No newline at end of file diff --git a/docs/assets/data-editor-all-Jk8In-1B.js b/docs/assets/data-editor-all-Jk8In-1B.js new file mode 100644 index 000000000..2eaa9ae25 --- /dev/null +++ b/docs/assets/data-editor-all-Jk8In-1B.js @@ -0,0 +1,135 @@ +var Hs=Object.defineProperty;var Ts=(e,t,n)=>t in e?Hs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Oe=(e,t,n)=>(Ts(e,typeof t!="symbol"?t+"":t,n),n);import{r as a,R as yt}from"./index-BMVQvedj.js";import{_ as vl}from"./iframe-MICdw5w5.js";import{h as As,d as Cl,j as zs,v as Bs,_ as Ls,g as Ps,c as an,r as so,t as Ws}from"./throttle-7EuXLZa7.js";import{u as $s,f as Ki}from"./flatten-qRvRBp6y.js";import{s as tn,b as Os}from"./marked.esm-dbrxtycE.js";function xl(e="This should not happen"){throw new Error(e)}function Qt(e,t="Assertion failed"){if(!e)return xl(t)}function Qo(e,t){return xl(t??"Hell froze over")}function Ns(e,t){try{return e()}catch{return t}}const Ui=Object.prototype.hasOwnProperty;function Eo(e,t){let n,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((o=e.length)===t.length)for(;o--&&Eo(e[o],t[o]););return o===-1}if(!n||typeof e=="object"){o=0;for(n in e)if(Ui.call(e,n)&&++o&&!Ui.call(t,n)||!(n in t)||!Eo(e[n],t[n]))return!1;return Object.keys(t).length===o}}return e!==e&&t!==t}const Hr=null,bi=void 0;var J;(function(e){e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom"})(J||(J={}));var _i;(function(e){e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay"})(_i||(_i={}));var Tr;(function(e){e.Triangle="triangle",e.Dots="dots"})(Tr||(Tr={}));function Mr(e){return"width"in e&&typeof e.width=="number"}async function Vi(e){return typeof e=="object"?e:await e()}function ko(e){return!(e.kind===J.Loading||e.kind===J.Bubble||e.kind===J.RowID||e.kind===J.Protected||e.kind===J.Drilldown)}function pu(e){return!(e.kind===J.Loading||e.kind===J.Bubble||e.kind===J.RowID||e.kind===J.Protected||e.kind===J.Drilldown||e.kind===J.Boolean||e.kind===J.Image||e.kind===J.Custom)}function So(e){return e.kind===cn.Marker||e.kind===cn.NewRow}function qo(e){if(!ko(e)||e.kind===J.Image)return!1;if(e.kind===J.Text||e.kind===J.Number||e.kind===J.Markdown||e.kind===J.Uri||e.kind===J.Custom||e.kind===J.Boolean)return e.readonly!==!0;Qo(e,"A cell was passed with an invalid kind")}function Xs(e){return As(e,"editor")}function fi(e){return!(e.readonly??!1)}var cn;(function(e){e.NewRow="new-row",e.Marker="marker"})(cn||(cn={}));function Ys(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(o,r){return o[0]-r[0]}),n.push([...t[0]]);for(const o of t.slice(1)){const r=n[n.length-1];r[1][o[0]+t,o[1]+t]);return new Tn(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,o=Ys([...this.items,n]);return new Tn(o)}remove(t){const n=[...this.items],o=typeof t=="number"?t:t[0],r=typeof t=="number"?t+1:t[1];for(const[i,l]of n.entries()){const[s,c]=l;if(s<=r&&o<=c){const u=[];s=o&&tqi??(qi=new Tn([]))),Oe(Tn,"fromSingleSelection",t=>Tn.empty().add(t));let lt=Tn;const Gs=tn("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});function Nt(e,t,n,o,r=!1){const i=a.useRef();i.current=t,a.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const l=n,s=c=>{var u;(u=i.current)==null||u.call(l,c)};return l.addEventListener(e,s,{passive:o,capture:r}),()=>{l.removeEventListener(e,s,{capture:r})}},[e,n,o,r])}function lo(e,t){return e===void 0?void 0:t}const Ks=Math.PI;function ji(e){return e*Ks/180}const kl=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),Sl=(e,t,n,o,r)=>{switch(e){case"left":return Math.floor(t)+o+r/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-o-r/2}},Ml=(e,t,n)=>Math.min(e,t-n*2),Rl=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,pi=e=>{const t=e.fgColor??"currentColor";return a.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),a.createElement("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},Us=e=>{const t=e.fgColor??"currentColor";return a.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function _s(e,t,n){const[o,r]=a.useState(e),i=a.useRef(!0);a.useEffect(()=>()=>{i.current=!1},[]);const l=a.useRef(Cl(s=>{i.current&&r(s)},n));return a.useLayoutEffect(()=>{i.current&&l.current(()=>e())},t),o}const Vs="֑-߿יִ-﷽ﹰ-ﻼ",qs="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",js=new RegExp("^[^"+qs+"]*["+Vs+"]");function vi(e){return js.test(e)?"rtl":"not-rtl"}let Rr;function hi(){if(typeof document>"u")return 0;if(Rr!==void 0)return Rr;const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.id="testScrollbar",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.append(e),document.body.append(t);const n=e.offsetWidth;t.style.overflow="scroll";let o=e.offsetWidth;return n===o&&(o=t.clientWidth),t.remove(),Rr=n-o,Rr}const io=Symbol();function Zs(e){const t=a.useRef([io,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,o]=a.useState(e),[,r]=a.useState(),i=a.useCallback(s=>{const c=t.current[0];c!==io&&(s=typeof s=="function"?s(c):s,s===c)||(c!==io&&r({}),o(u=>typeof s=="function"?s(c===io?u:c):s),t.current[0]=io)},[]),l=a.useCallback(()=>{t.current[0]=io,r({})},[]);return[t.current[0]===io?n:t.current[0],i,l]}function El(e){if(e.length===0)return"";let t=0,n=0;for(const o of e){if(n+=o.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function Js(e){const t=a.useRef(e);return Eo(e,t.current)||(t.current=e),t.current}const Qs=e=>{const{urls:t,canWrite:n,onEditClick:o,renderImage:r}=e,i=t.filter(s=>s!=="");if(i.length===0)return null;const l=i.length>1;return a.createElement(Gs,{"data-testid":"GDG-default-image-overlay-editor"},a.createElement(zs.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},i.map(s=>{const c=(r==null?void 0:r(s))??a.createElement("img",{draggable:!1,src:s});return a.createElement("div",{className:"gdg-centering-container",key:s},c)})),n&&o&&a.createElement("button",{className:"gdg-edit-icon",onClick:o},a.createElement(pi,null)))},ea=tn("div")({name:"MarkdownContainer",class:"gdg-mnuv029",propsAsIs:!1});class ta extends yt.PureComponent{constructor(){super(...arguments);Oe(this,"targetElement",null);Oe(this,"containerRefHook",n=>{this.targetElement=n,this.renderMarkdownIntoDiv()})}renderMarkdownIntoDiv(){const{targetElement:n,props:o}=this;if(n===null)return;const{contents:r,createNode:i}=o,l=Os(r),s=document.createRange();s.selectNodeContents(n),s.deleteContents();let c=i==null?void 0:i(l);if(c===void 0){const f=document.createElement("template");f.innerHTML=l,c=f.content}n.append(c);const u=n.getElementsByTagName("a");for(const f of u)f.target="_blank",f.rel="noreferrer noopener"}render(){return this.renderMarkdownIntoDiv(),yt.createElement(ea,{ref:this.containerRefHook})}}const na=tn("textarea")({name:"InputBox",class:"gdg-izpuzkl",propsAsIs:!1}),oa=tn("div")({name:"ShadowBox",class:"gdg-s69h75o",propsAsIs:!1}),ra=tn("div")({name:"GrowingEntryStyle",class:"gdg-g1y0xocz",propsAsIs:!1});let Zi=0;const Pr=e=>{const{placeholder:t,value:n,onKeyDown:o,highlight:r,altNewline:i,validatedSelection:l,...s}=e,{onChange:c,className:u}=s,f=a.useRef(null),w=n??"";Qt(c!==void 0,"GrowingEntry must be a controlled input area");const[m]=a.useState(()=>"input-box-"+(Zi=(Zi+1)%1e7));a.useEffect(()=>{const h=f.current;if(h===null||h.disabled)return;const y=w.toString().length;h.focus(),h.setSelectionRange(r?0:y,y)},[]),a.useLayoutEffect(()=>{var h;if(l!==void 0){const y=typeof l=="number"?[l,null]:l;(h=f.current)==null||h.setSelectionRange(y[0],y[1])}},[l]);const g=a.useCallback(h=>{h.key==="Enter"&&h.shiftKey&&i===!0||o==null||o(h)},[i,o]);return a.createElement(ra,{className:"gdg-growing-entry"},a.createElement(oa,{className:u},w+` +`),a.createElement(na,{...s,className:(u??"")+" gdg-input",id:m,ref:f,onKeyDown:g,value:w,placeholder:t,dir:"auto"}))},ii={};let Kn=null;function ia(){const e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}function Io(e){const t=e.toLowerCase().trim();if(ii[t]!==void 0)return ii[t];Kn=Kn||ia(),Kn.style.color="#000",Kn.style.color=t;const n=getComputedStyle(Kn).color;Kn.style.color="#fff",Kn.style.color=t;const o=getComputedStyle(Kn).color;if(o!==n)return[0,0,0,1];let r=o.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return r.length<4&&r.push(1),r=r.map(i=>Number.isNaN(i)?0:i),ii[t]=r,r}function ao(e,t){const[n,o,r]=Io(e);return`rgba(${n}, ${o}, ${r}, ${t})`}const Ji=new Map;function Qi(e,t){const n=`${e}-${t}`,o=Ji.get(n);if(o!==void 0)return o;const r=en(e,t);return Ji.set(n,r),r}function en(e,t){if(t===void 0)return e;const[n,o,r,i]=Io(e);if(i===1)return e;const[l,s,c,u]=Io(t),f=i+u*(1-i),w=(i*n+u*l*(1-i))/f,m=(i*o+u*s*(1-i))/f,g=(i*r+u*c*(1-i))/f;return`rgba(${w}, ${m}, ${g}, ${f})`}function vu(e,t,n){if(n<=0)return e;if(n>=1)return t;const o=[...Io(e)];o[0]=o[0]*o[3],o[1]=o[1]*o[3],o[2]=o[2]*o[3];const r=[...Io(t)];r[0]=r[0]*r[3],r[1]=r[1]*r[3],r[2]=r[2]*r[3];const i=n,l=1-n,s=o[3]*l+r[3]*i,c=Math.floor((o[0]*l+r[0]*i)/s),u=Math.floor((o[1]*l+r[1]*i)/s),f=Math.floor((o[2]*l+r[2]*i)/s);return`rgba(${c}, ${u}, ${f}, ${s})`}function Cu(e){if(e==="transparent")return 0;function t(i){const l=i/255;return l<=.04045?l/12.92:Math.pow((l+.055)/1.055,2.4)}const[n,o,r]=Io(e);return .2126*t(n)+.7152*t(o)+.0722*t(r)}function la(e,t){return yt.useMemo(()=>e.map((n,o)=>({group:n.group,grow:n.grow,hasMenu:n.hasMenu,icon:n.icon,id:n.id,menuIcon:n.menuIcon,overlayIcon:n.overlayIcon,sourceIndex:o,sticky:o=i.x&&n=i.y&&o=t.span[0]&&n.current.cell[0]<=t.span[1]}function Il(e,t){const[n,o]=e;return n>=t.x&&n=t.y&&ol)return!1;if(t.span===void 0)return s>=o&&s<=r;const[u,f]=t.span;return u>=o&&u<=r||f>=o&&u<=r||ur}function ca(e,t,n,o){let r=0;if(n.current===void 0)return r;const i=n.current.range;(o||i.height*i.width>1)&&el(e,t,i)&&r++;for(const l of n.current.rangeStack)el(e,t,l)&&r++;return r}function Fl(e,t){let n=e;if(t!==void 0){let o=[...e];const r=n[t.src];t.src>t.dest?(o.splice(t.src,1),o.splice(t.dest,0,r)):(o.splice(t.dest+1,0,r),o.splice(t.src,1)),o=o.map((i,l)=>({...i,sticky:e[l].sticky})),n=o}return n}function Do(e,t){let n=0;const o=Fl(e,t);for(let r=0;r0)for(const u of l)n-=u.width;let s=t,c=r??0;for(;c<=n&&s=w)return y}const m=i-u,g=e-(c??0);if(typeof l=="number"){const h=Math.floor((g-f)/l)+s;return h>=m?void 0:h}else{let h=f;for(let y=s;y"u";async function ha(){var e;fa||((e=document==null?void 0:document.fonts)==null?void 0:e.ready)===void 0||(await document.fonts.ready,Fr=0,Zo={},Bs())}ha();function Hl(e,t,n,o){return`${e}_${o??(t==null?void 0:t.font)}_${n}`}function Fo(e,t,n,o="middle"){const r=Hl(e,t,o,n);let i=Zo[r];return i===void 0&&(i=t.measureText(e),Zo[r]=i,Fr++),Fr>1e4&&(Zo={},Fr=0),i}function Tl(e,t){const n=Hl(e,void 0,"middle",t);return Zo[n]}function qn(e,t){return typeof t!="string"&&(t=t.baseFontFull),ga(e,t)}function tl(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ";e.save(),e.textBaseline=t;const o=e.measureText(n);return e.restore(),o}const nl=[];function ga(e,t){for(const i of nl)if(i.key===t)return i.val;const n=tl(e,"alphabetic"),r=-(tl(e,"middle").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return nl.push({key:t,val:r}),r}function ma(e,t,n,o,r,i){const{ctx:l,rect:s,theme:c}=e;let u=Number.MAX_SAFE_INTEGER;const f=500;if(t!==void 0&&(u=n-t,un&&(e=e.slice(0,n)),e}function ya(e,t,n,o,r,i,l,s,c,u){const f=s.baseFontFull,w=Ls(e,t,f,r-s.cellHorizontalPadding*2,u??!1),m=zl(e,f),g=s.lineHeight*m,h=m+g*(w.length-1),y=h+s.cellVerticalPadding>i;y&&(e.save(),e.rect(n,o,r,i),e.clip());const b=o+i/2-h/2;let C=Math.max(o+s.cellVerticalPadding,b);for(const x of w)if(Al(e,x,n,C,r,m,l,s,c),C+=g,C>o+i)break;y&&e.restore()}function xn(e,t,n,o,r){const{ctx:i,rect:l,theme:s}=e,{x:c,y:u,width:f,height:w}=l;o=o??!1,o||(t=wa(t,f));const m=qn(i,s),g=vi(t)==="rtl";if(n===void 0&&g&&(n="right"),g&&(i.direction="rtl"),t.length>0){let h=!1;n==="right"?(i.textAlign="right",h=!0):n!==void 0&&n!=="left"&&(i.textAlign=n,h=!0),o?ya(i,t,c,u,f,w,m,s,n,r):Al(i,t,c,u,f,w,m,s,n),h&&(i.textAlign="start"),g&&(i.direction="inherit")}}function kn(e,t,n,o,r,i){typeof i=="number"&&(i={tl:i,tr:i,br:i,bl:i}),i={tl:Math.max(0,Math.min(i.tl,r/2,o/2)),tr:Math.max(0,Math.min(i.tr,r/2,o/2)),bl:Math.max(0,Math.min(i.bl,r/2,o/2)),br:Math.max(0,Math.min(i.br,r/2,o/2))},e.moveTo(t+i.tl,n),e.arcTo(t+o,n,t+o,n+i.tr,i.tr),e.arcTo(t+o,n+r,t+o-i.br,n+r,i.br),e.arcTo(t,n+r,t,n+r-i.bl,i.bl),e.arcTo(t,n,t+i.tl,n,i.tl)}function ba(e,t,n){e.arc(t,n-1.25*3.5,1.25,0,2*Math.PI,!1),e.arc(t,n,1.25,0,2*Math.PI,!1),e.arc(t,n+1.25*3.5,1.25,0,2*Math.PI,!1)}function pa(e,t,n){const o=function(s,c){const u=c.x-s.x,f=c.y-s.y,w=Math.sqrt(u*u+f*f),m=u/w,g=f/w;return{x:u,y:c.y-s.y,len:w,nx:m,ny:g,ang:Math.atan2(g,m)}};let r;const i=t.length;let l=t[i-1];for(let s=0;s1?1:m),y=1,b=!1;g<0?h<0?h=Math.PI+h:(h=Math.PI-h,y=-1,b=!0):h>0&&(y=-1,b=!0),r=c.radius!==void 0?c.radius:n;const C=h/2;let x=Math.abs(Math.cos(C)*r/Math.sin(C)),F;x>Math.min(f.len/2,w.len/2)?(x=Math.min(f.len/2,w.len/2),F=Math.abs(x*Math.sin(C)/Math.cos(C))):F=r;let Y=c.x+w.nx*x,N=c.y+w.ny*x;Y+=-w.ny*F*y,N+=w.nx*F*y,e.arc(Y,N,F,f.ang+Math.PI/2*y,w.ang-Math.PI/2*y,b),l=c,c=u}e.closePath()}function mi(e,t,n,o,r,i,l,s,c,u,f,w,m,g,h){const y={x:0,y:i+u,width:0,height:0};if(e>=g.length||t>=f||t<-2||e<0)return y;const b=i-r;if(e>=w){const C=l>e?-1:1,x=Do(g);y.x+=x+c;for(let F=l;F!==e;F+=C)y.x+=g[C===1?F:F-1].width*C}else for(let C=0;C0&&er(g[C-1].group,x)&&g[C-1].sticky===F;){const N=g[C-1];y.x-=N.width,y.width+=N.width,C--}let Y=e;for(;Y+1n&&(y.width=n-y.x)}}else if(t>=f-m){let C=f-t;for(y.y=o;C>0;){const x=t+C-1;y.height=typeof h=="number"?h:h(x),y.y-=y.height,C--}y.height+=1}else{const C=s>t?-1:1;if(typeof h=="number"){const x=t-s;y.y+=x*h}else for(let x=s;x!==t;x+=C)y.y+=h(x)*C;y.height=(typeof h=="number"?h:h(t))+1}return y}const Ci=1<<21;function yn(e,t){return(t+2)*Ci+e}function Bl(e){return e%Ci}function xi(e){return Math.floor(e/Ci)-2}function ki(e){const t=Bl(e),n=xi(e);return[t,n]}class Ll{constructor(){Oe(this,"visibleWindow",{x:0,y:0,width:0,height:0});Oe(this,"freezeCols",0);Oe(this,"freezeRows",[]);Oe(this,"isInWindow",t=>{const n=Bl(t),o=xi(t),r=this.visibleWindow,i=n>=r.x&&n<=r.x+r.width||n=r.y&&o<=r.y+r.height||this.freezeRows.includes(o);return i&&l})}setWindow(t,n,o){this.visibleWindow.x===t.x&&this.visibleWindow.y===t.y&&this.visibleWindow.width===t.width&&this.visibleWindow.height===t.height&&this.freezeCols===n&&Eo(this.freezeRows,o)||(this.visibleWindow=t,this.freezeCols=n,this.freezeRows=o,this.clearOutOfWindow())}}class va extends Ll{constructor(){super(...arguments);Oe(this,"cache",new Map);Oe(this,"setValue",(n,o)=>{this.cache.set(yn(n[0],n[1]),o)});Oe(this,"getValue",n=>this.cache.get(yn(n[0],n[1])));Oe(this,"clearOutOfWindow",()=>{for(const[n]of this.cache.entries())this.isInWindow(n)||this.cache.delete(n)})}}class Jo{constructor(t=[]){Oe(this,"cells");this.cells=new Set(t.map(n=>yn(n[0],n[1])))}add(t){this.cells.add(yn(t[0],t[1]))}has(t){return t===void 0?!1:this.cells.has(yn(t[0],t[1]))}remove(t){this.cells.delete(yn(t[0],t[1]))}clear(){this.cells.clear()}get size(){return this.cells.size}hasHeader(){for(const t of this.cells)if(xi(t)<0)return!0;return!1}hasItemInRectangle(t){for(let n=t.y;n{const g=xa(e,m[o],t,c);return u=Math.max(u,g),g});if(f.length>5&&s){u=0;let m=0;for(const h of f)m+=h;const g=m/f.length;for(let h=0;h=g*2?f[h]=0:u=Math.max(u,f[h])}u=Math.max(u,e.measureText(n.title).width+16+(n.icon===void 0?0:28));const w=Math.max(Math.ceil(i),Math.min(Math.floor(l),Math.ceil(u)));return{...n,width:w}}function ka(e,t,n,o,r,i,l,s,c){const u=a.useRef(t),f=a.useRef(n),w=a.useRef(l);u.current=t,f.current=n,w.current=l;const[m,g]=a.useMemo(()=>{if(typeof window>"u")return[null,null];const x=document.createElement("canvas");return x.style.display="none",x.style.opacity="0",x.style.position="fixed",[x,x.getContext("2d",{alpha:!1})]},[]);a.useLayoutEffect(()=>(m&&document.documentElement.append(m),()=>{m==null||m.remove()}),[m]);const h=a.useRef({}),y=a.useRef(),[b,C]=a.useState();return a.useLayoutEffect(()=>{const x=f.current;if(x===void 0||e.every(Mr))return;let F=Math.max(1,10-Math.floor(e.length/1e4)),Y=0;F1&&(F--,Y=1);const N={x:0,y:0,width:e.length,height:Math.min(u.current,F)},z={x:0,y:u.current-1,width:e.length,height:1};(async()=>{const G=x(N,c.signal),S=Y>0?x(z,c.signal):void 0;let $;typeof G=="object"?$=G:$=await Vi(G),S!==void 0&&(typeof S=="object"?$=[...$,...S]:$=[...$,...await Vi(S)]),y.current=e,C($)})()},[c.signal,e]),a.useMemo(()=>{let F=e.every(Mr)?e:g===null?e.map(H=>Mr(H)?H:{...H,width:wi}):(g.font=w.current.baseFontFull,e.map((H,G)=>{if(Mr(H))return H;if(h.current[H.id]!==void 0)return{...H,width:h.current[H.id]};if(b===void 0||y.current!==e||H.id===void 0)return{...H,width:wi};const S=Ol(g,l,H,G,b,r,i,!0,s);return h.current[H.id]=S.width,S})),Y=0,N=0;const z=[];for(const[H,G]of F.entries())Y+=G.width,G.grow!==void 0&&G.grow>0&&(N+=G.grow,z.push(H));if(Y0){const H=[...F],G=o-Y;let S=G;for(let $=0;${const t=e.fgColor,n=e.bgColor;return` + ${ct}`},Ma=e=>{const t=e.fgColor,n=e.bgColor;return` + ${ct}`},Ra=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + + `},Ea=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + +`},Ia=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + +`},Nl=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + + + + `},Da=e=>{const t=e.bgColor;return`${ct} + + + + +`},Fa=Nl,Ha=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + +`},Ta=e=>{const t=e.fgColor,n=e.bgColor;return` + ${ct} + + + + + + + + `},Aa=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + + +`},za=e=>{const t=e.fgColor,n=e.bgColor;return` + ${ct} + + + `},Ba=e=>{const t=e.fgColor,n=e.bgColor;return` + ${ct} + + + `},La=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + +`},Pa=e=>{const t=e.fgColor,n=e.bgColor;return` + ${ct} + + + + `},Wa=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + + +`},$a=e=>{const t=e.fgColor,n=e.bgColor;return` + ${ct} + + + + `},Oa=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + +`},Na=e=>{const t=e.fgColor,n=e.bgColor;return` + ${ct} + + + `},Xa=e=>{const t=e.fgColor,n=e.bgColor;return` + ${ct} + + + `},Ya=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + +`},Ga=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + + + + +`},Ka=e=>{const t=e.fgColor,n=e.bgColor;return` + ${ct} + + + `},Ua=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + +`},_a=e=>{const t=e.fgColor,n=e.bgColor;return` + ${ct} + + + `},Va=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + + +`},qa=e=>{const t=e.fgColor,n=e.bgColor;return`${ct} + + +`},ja=e=>{const t=e.fgColor;return` + + + `},Za=e=>{const t=e.fgColor;return` + + + +`},Ja={headerRowID:Sa,headerNumber:Ra,headerCode:Ma,headerString:Ea,headerBoolean:Ia,headerAudioUri:Fa,headerVideoUri:Ha,headerEmoji:Ta,headerImage:Aa,headerUri:Nl,headerPhone:za,headerMarkdown:Ba,headerDate:La,headerTime:Pa,headerEmail:Wa,headerReference:$a,headerIfThenElse:Oa,headerSingleValue:Na,headerLookup:Xa,headerTextTemplate:Ya,headerMath:Ga,headerRollup:Ka,headerJoinStrings:Ua,headerSplitString:_a,headerGeoDistance:Va,headerArray:qa,rowOwnerOverlay:ja,protectedColumnOverlay:Za,renameIcon:Da};function Qa(e,t){return e==="normal"?[t.bgIconHeader,t.fgIconHeader]:e==="selected"?["white",t.accentColor]:[t.accentColor,t.bgHeader]}class ec{constructor(t,n){Oe(this,"onSettled");Oe(this,"spriteMap",new Map);Oe(this,"headerIcons");Oe(this,"inFlight",0);this.onSettled=n,this.headerIcons=t??{}}drawSprite(t,n,o,r,i,l,s,c=1){const[u,f]=Qa(n,s),w=l*Math.ceil(window.devicePixelRatio),m=`${u}_${f}_${w}_${t}`;let g=this.spriteMap.get(m);if(g===void 0){const h=this.headerIcons[t];if(h===void 0)return;g=document.createElement("canvas");const y=g.getContext("2d");if(y===null)return;const b=new Image;b.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(h({fgColor:f,bgColor:u}))}`,this.spriteMap.set(m,g);const C=b.decode();if(C===void 0)return;this.inFlight++,C.then(()=>{y.drawImage(b,0,0,w,w)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else c<1&&(o.globalAlpha=c),o.drawImage(g,0,0,w,w,r,i,l,l),c<1&&(o.globalAlpha=1)}}function Xl(e){if(e.length===0)return;let t;for(const n of e)t=Math.min(t??n.y,n.y)}function Wr(e,t,n,o,r,i,l,s,c){s=s??t;let u=t,f=e;const w=o-i;let m=!1;for(;us&&c(u,f,g,!1,l&&f===o-1)===!0){m=!0;break}u+=g,f++}if(!m){u=n;for(let g=0;g!g.sticky))==null?void 0:m.sourceIndex)??0;if(c>w){const g=Math.max(s,w);let h=t,y=o;for(let b=i.sourceIndex-1;b>=g;b--)h-=l[b].width,y+=l[b].width;for(let b=i.sourceIndex+1;b<=c;b++)y+=l[b].width;f={x:h,y:n,width:y,height:r}}if(w>s){const g=Math.min(c,w-1);let h=t,y=o;for(let b=i.sourceIndex-1;b>=s;b--)h-=l[b].width,y+=l[b].width;for(let b=i.sourceIndex+1;b<=g;b++)y+=l[b].width;u={x:h,y:n,width:y,height:r}}return[u,f]}function tc(e,t,n,o){if(o==="any")return Kl(e,{x:t,y:n,width:1,height:1});if(o==="vertical"&&(t=e.x),o==="horizontal"&&(n=e.y),Il([t,n],e))return;const r=t-e.x,i=e.x+e.width-t,l=n-e.y+1,s=e.y+e.height-n,c=Math.min(o==="vertical"?Number.MAX_SAFE_INTEGER:r,o==="vertical"?Number.MAX_SAFE_INTEGER:i,o==="horizontal"?Number.MAX_SAFE_INTEGER:l,o==="horizontal"?Number.MAX_SAFE_INTEGER:s);return c===s?{x:e.x,y:e.y+e.height,width:e.width,height:n-e.y-e.height+1}:c===l?{x:e.x,y:n,width:e.width,height:e.y-n}:c===i?{x:e.x+e.width,y:e.y,width:t-e.x-e.width+1,height:e.height}:{x:t,y:e.y,width:e.x-t,height:e.height}}function tr(e,t,n,o,r,i,l,s){return e<=r+l&&r<=e+n&&t<=i+s&&i<=t+o}function Ro(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Kl(e,t){const n=Math.min(e.x,t.x),o=Math.min(e.y,t.y),r=Math.max(e.x+e.width,t.x+t.width)-n,i=Math.max(e.y+e.height,t.y+t.height)-o;return{x:n,y:o,width:r,height:i}}function nc(e,t){return e.x<=t.x&&e.y<=t.y&&e.x+e.width>=t.x+t.width&&e.y+e.height>=t.y+t.height}function oc(e,t,n,o){if(e.x>t||e.y>n||e.x<0&&e.y<0&&e.x+e.width>t&&e.y+e.height>n)return;if(e.x>=0&&e.y>=0&&e.x+e.width<=t&&e.y+e.height<=n)return e;const r=-4,i=-4,l=t+4,s=n+4,c=r-e.x,u=e.x+e.width-l,f=i-e.y,w=e.y+e.height-s,m=c>0?e.x+Math.floor(c/o)*o:e.x,g=u>0?e.x+e.width-Math.floor(u/o)*o:e.x+e.width,h=f>0?e.y+Math.floor(f/o)*o:e.y,y=w>0?e.y+e.height-Math.floor(w/o)*o:e.y+e.height;return{x:m,y:h,width:g-m,height:y-h}}function rc(e,t,n,o,r){const[i,l,s,c]=t,[u,f,w,m]=r,{x:g,y:h,width:y,height:b}=e,C=[];if(y<=0||b<=0)return C;const x=g+y,F=h+b,Y=gs,H=h+b>c,G=g>=i&&gi&&x<=s||gs,S=h>=l&&hl&&F<=c||hc;if(G&&S){const W=Math.max(g,i),I=Math.max(h,l),R=Math.min(x,s),M=Math.min(F,c);C.push({rect:{x:W,y:I,width:R-W,height:M-I},clip:{x:u,y:f,width:w-u+1,height:m-f+1}})}if(Y&&N){const W=g,I=h,R=Math.min(x,i),M=Math.min(F,l);C.push({rect:{x:W,y:I,width:R-W,height:M-I},clip:{x:0,y:0,width:u+1,height:f+1}})}if(N&&G){const W=Math.max(g,i),I=h,R=Math.min(x,s),M=Math.min(F,l);C.push({rect:{x:W,y:I,width:R-W,height:M-I},clip:{x:u,y:0,width:w-u+1,height:f+1}})}if(N&&z){const W=Math.max(g,s),I=h,R=x,M=Math.min(F,l);C.push({rect:{x:W,y:I,width:R-W,height:M-I},clip:{x:w,y:0,width:n-w+1,height:f+1}})}if(Y&&S){const W=g,I=Math.max(h,l),R=Math.min(x,i),M=Math.min(F,c);C.push({rect:{x:W,y:I,width:R-W,height:M-I},clip:{x:0,y:f,width:u+1,height:m-f+1}})}if(z&&S){const W=Math.max(g,s),I=Math.max(h,l),R=x,M=Math.min(F,c);C.push({rect:{x:W,y:I,width:R-W,height:M-I},clip:{x:w,y:f,width:n-w+1,height:m-f+1}})}if(Y&&H){const W=g,I=Math.max(h,c),R=Math.min(x,i),M=F;C.push({rect:{x:W,y:I,width:R-W,height:M-I},clip:{x:0,y:m,width:u+1,height:o-m+1}})}if(H&&G){const W=Math.max(g,i),I=Math.max(h,c),R=Math.min(x,s),M=F;C.push({rect:{x:W,y:I,width:R-W,height:M-I},clip:{x:u,y:m,width:w-u+1,height:o-m+1}})}if(z&&H){const W=Math.max(g,s),I=Math.max(h,c),R=x,M=F;C.push({rect:{x:W,y:I,width:R-W,height:M-I},clip:{x:w,y:m,width:n-w+1,height:o-m+1}})}return C}const ic={kind:J.Loading,allowOverlay:!1};function ol(e,t,n,o,r,i,l,s,c,u,f,w,m,g,h,y,b,C,x,F,Y,N,z,H,G,S,$,W,I,R,M,te,ne,ce,me){let Ke=(F==null?void 0:F.size)??Number.MAX_SAFE_INTEGER;const j=performance.now();let U=R.baseFontFull;e.font=U;const ye={ctx:e},le=[0,0],ke=b>0?co(c,b,u):0;let be,V;const Ee=Xl(x);return jn(t,s,i,l,r,(ve,nt,tt,ht,Qe)=>{const He=Math.max(0,ht-nt),qe=nt+He,xe=r+1,dt=ve.width-He,ot=o-r-1;if(x.length>0){let Ne=!1;for(let Fe=0;Fe{e.save(),e.beginPath(),e.rect(qe,xe,dt,ot),e.clip()},re=Y.columns.hasIndex(ve.sourceIndex),Le=w(ve.group??"").overrideTheme,Me=ve.themeOverride===void 0&&Le===void 0?R:Vn(R,Le,ve.themeOverride),Se=Me.baseFontFull;Se!==U&&(U=Se,e.font=Se),rt();let ue;return Wr(Qe,tt,o,c,u,b,C,Ee,(Ne,Fe,je,oe,Ie)=>{var Mn,nn,Ot;if(Fe<0||(le[0]=ve.sourceIndex,le[1]=Fe,F!==void 0&&!F.has(le)))return;if(x.length>0){let Ve=!1;for(let kt=0;ktUe.span!==void 0&&Ve>=Ue.span[0]&&Ve<=Ue.span[1]);Dt&&!h&&y?Ft=0:Dt&&y&&(Ft=Math.max(Ft,1)),An&&Ft++,Dt||(et&&Ft++,re&&!Ie&&Ft++);const zn=Ue.kind===J.Protected?gt.bgCellMedium:gt.bgCell;let at;if((oe||zn!==R.bgCell)&&(at=en(zn,at)),Ft>0||Pe){Pe&&(at=en(gt.bgHeader,at));for(let Ve=0;Veme&&!bt){const Ve=gt.baseFontFull;Ve!==U&&(e.font=Ve,U=Ve),ue=Ul(e,Ue,ve.sourceIndex,Fe,Be,Ze,ut,Ne,Xe,je,Ft>0,gt,at??gt.bgCell,H,G,($t==null?void 0:$t.hoverAmount)??0,$,I,j,W,ue,M,te,ne,ce)}return Sn&&e.restore(),Ue.style==="faded"&&(e.globalAlpha=1),Ke--,Te&&(e.restore(),(Ot=ue==null?void 0:ue.deprep)==null||Ot.call(ue,ye),ue=void 0,rt(),U=Se,e.font=Se),Ke<=0}),e.restore(),Ke<=0}),be}const Ko=[0,0],Uo={x:0,y:0,width:0,height:0},li=[void 0,()=>{}];let yi=!1;function lc(){yi=!0}function Ul(e,t,n,o,r,i,l,s,c,u,f,w,m,g,h,y,b,C,x,F,Y,N,z,H,G){var te,ne;let S,$;b!==void 0&&b[0][0]===n&&b[0][1]===o&&(S=b[1][0],$=b[1][1]);let W;Ko[0]=n,Ko[1]=o,Uo.x=l,Uo.y=s,Uo.width=c,Uo.height=u,li[0]=z.getValue(Ko),li[1]=ce=>z.setValue(Ko,ce),yi=!1;const I={ctx:e,theme:w,col:n,row:o,cell:t,rect:Uo,highlighted:f,cellFillColor:m,hoverAmount:y,frameTime:x,hoverX:S,drawState:li,hoverY:$,imageLoader:g,spriteManager:h,hyperWrapping:C,overrideCursor:S!==void 0?G:void 0,requestAnimationFrame:lc},R=ma(I,t.lastUpdated,x,Y,r,i),M=H(t);if(M!==void 0){(Y==null?void 0:Y.renderer)!==M&&((te=Y==null?void 0:Y.deprep)==null||te.call(Y,I),Y=void 0);const ce=(ne=M.drawPrep)==null?void 0:ne.call(M,I,Y);F!==void 0&&!So(I.cell)?F(I,()=>M.draw(I,t)):M.draw(I,t),W=ce===void 0?void 0:{deprep:ce==null?void 0:ce.deprep,fillStyle:ce==null?void 0:ce.fillStyle,font:ce==null?void 0:ce.font,renderer:M}}return(R||yi)&&(N==null||N(Ko)),W}function Si(e,t,n,o,r,i,l,s,c=-20,u=-20,f=32,w="center",m="square"){const g=Math.floor(r+l/2),h=m==="circle"?1e4:t.roundingRadius??4;let y=Ml(f,l,t.cellVerticalPadding),b=y/2;const C=Sl(w,o,i,t.cellHorizontalPadding,y),x=kl(C,g,y),F=Rl(o+c,r+u,x);switch(n){case!0:{e.beginPath(),kn(e,C-y/2,g-y/2,y,y,h),m==="circle"&&(b*=.8,y*=.8),e.fillStyle=s?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(C-b+y/4.23,g-b+y/1.97),e.lineTo(C-b+y/2.42,g-b+y/1.44),e.lineTo(C-b+y/1.29,g-b+y/3.25),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break}case Hr:case!1:{e.beginPath(),kn(e,C-y/2+.5,g-y/2+.5,y-1,y-1,h),e.lineWidth=1,e.strokeStyle=F?t.textDark:t.textMedium,e.stroke();break}case bi:{e.beginPath(),kn(e,C-y/2,g-y/2,y,y,h),e.fillStyle=F?t.textMedium:t.textLight,e.fill(),m==="circle"&&(b*=.8,y*=.8),e.beginPath(),e.moveTo(C-y/3,g),e.lineTo(C+y/3,g),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break}default:Qo()}}function sc(e,t,n,o,r,i,l,s,c,u,f,w,m,g,h,y,b,C,x){const F=l+s;if(F<=0)return;e.fillStyle=w.bgHeader,e.fillRect(0,0,r,F);const[Y,N]=(o==null?void 0:o[0])??[],z=w.headerFontFull;e.font=z,jn(t,0,i,0,F,(H,G,S,$)=>{var ye;if(b!==void 0&&!b.has([H.sourceIndex,-1]))return;const W=Math.max(0,$-G);e.save(),e.beginPath(),e.rect(G+W,s,H.width-W,l),e.clip();const I=y(H.group??"").overrideTheme,R=H.themeOverride===void 0&&I===void 0?w:Vn(w,I,H.themeOverride);R.bgHeader!==w.bgHeader&&(e.fillStyle=R.bgHeader,e.fill()),R!==w&&(e.font=R.baseFontFull);const M=f.columns.hasIndex(H.sourceIndex),te=c!==void 0||u,ne=!te&&N===-1&&Y===H.sourceIndex,ce=te?0:((ye=g.find(le=>le.item[0]===H.sourceIndex&&le.item[1]===-1))==null?void 0:ye.hoverAmount)??0,me=(f==null?void 0:f.current)!==void 0&&f.current.cell[0]===H.sourceIndex,Ke=M?R.accentColor:me?R.bgHeaderHasFocus:R.bgHeader,j=n?s:0,U=H.sourceIndex===0?0:1;M?(e.fillStyle=Ke,e.fillRect(G+U,j,H.width-U,l)):(me||ce>0)&&(e.beginPath(),e.rect(G+U,j,H.width-U,l),me&&(e.fillStyle=R.bgHeaderHasFocus,e.fill()),ce>0&&(e.globalAlpha=ce,e.fillStyle=R.bgHeaderHovered,e.fill(),e.globalAlpha=1)),ql(e,G,j,H.width,l,H,M,R,ne,me,ce,m,C,x),e.restore()}),n&&ac(e,t,r,i,s,o,w,m,g,h,y,b)}function ac(e,t,n,o,r,i,l,s,c,u,f,w){const[g,h]=(i==null?void 0:i[0])??[];let y=0;Yl(t,n,o,r,(b,C,x,F,Y,N)=>{if(w!==void 0&&!w.hasItemInRectangle({x:b[0],y:-2,width:b[1]-b[0]+1,height:1}))return;e.save(),e.beginPath(),e.rect(x,F,Y,N),e.clip();const z=f(C),H=(z==null?void 0:z.overrideTheme)===void 0?l:Vn(l,z.overrideTheme),G=h===-2&&g!==void 0&&g>=b[0]&&g<=b[1],S=G?H.bgHeaderHovered:H.bgHeader;if(S!==l.bgHeader&&(e.fillStyle=S,e.fill()),e.fillStyle=H.textGroupHeader??H.textHeader,z!==void 0){let $=x;if(z.icon!==void 0&&(s.drawSprite(z.icon,"normal",e,$+8,(r-20)/2,20,H),$+=26),e.fillText(z.name,$+8,r/2+qn(e,l.headerFontFull)),z.actions!==void 0&&G){const W=_l({x,y:F,width:Y,height:N},z.actions);e.beginPath();const I=W[0].x-10,R=x+Y-I;e.rect(I,0,R,r);const M=e.createLinearGradient(I,0,I+R,0),te=ao(S,0);M.addColorStop(0,te),M.addColorStop(10/R,S),M.addColorStop(1,S),e.fillStyle=M,e.fill(),e.globalAlpha=.6;const[ne,ce]=(i==null?void 0:i[1])??[-1,-1];for(let me=0;me35){const C=m?35:o-35,x=m?35*.7:o-35*.7,F=C/o,Y=x/o,N=e.createLinearGradient(t,0,t+o,0),z=ao(h,0);N.addColorStop(m?1:0,h),N.addColorStop(F,h),N.addColorStop(Y,z),N.addColorStop(m?0:1,z),e.fillStyle=N}else e.fillStyle=h;if(m&&(e.textAlign="right"),g.textBounds!==void 0&&e.fillText(i.title,m?g.textBounds.x+g.textBounds.width:g.textBounds.x,n+r/2+qn(e,s.headerFontFull)),m&&(e.textAlign="left"),i.indicatorIcon!==void 0&&g.indicatorIconBounds!==void 0&&(!y||!tr(g.menuBounds.x,g.menuBounds.y,g.menuBounds.width,g.menuBounds.height,g.indicatorIconBounds.x,g.indicatorIconBounds.y,g.indicatorIconBounds.width,g.indicatorIconBounds.height))){let b=l?"selected":"normal";i.style==="highlight"&&(b=l?"selected":"special"),f.drawSprite(i.indicatorIcon,b,e,g.indicatorIconBounds.x,g.indicatorIconBounds.y,g.indicatorIconBounds.width,s)}if(y&&g.menuBounds!==void 0){const b=g.menuBounds;if(i.menuIcon===void 0||i.menuIcon===Tr.Triangle){e.beginPath();const C=b.x+b.width/2-5.5,x=b.y+b.height/2-3;pa(e,[{x:C,y:x},{x:C+11,y:x},{x:C+5.5,y:x+6}],1),e.fillStyle=h,e.fill()}else if(i.menuIcon===Tr.Dots){e.beginPath();const C=b.x+b.width/2,x=b.y+b.height/2;ba(e,C,x),e.fillStyle=h,e.fill()}else{const C=b.x+(b.width-s.headerIconSize)/2,x=b.y+(b.height-s.headerIconSize)/2;f.drawSprite(i.menuIcon,"normal",e,C,x,s.headerIconSize,s)}}}function ql(e,t,n,o,r,i,l,s,c,u,f,w,m,g){const h=vi(i.title)==="rtl",y=Vl(e,i,t,n,o,r,s,h);m!==void 0?m({ctx:e,theme:s,rect:{x:t,y:n,width:o,height:r},column:i,columnIndex:i.sourceIndex,isSelected:l,hoverAmount:f,isHovered:c,hasSelectedCell:u,spriteManager:w,menuBounds:(y==null?void 0:y.menuBounds)??{x:0,y:0,height:0,width:0}},()=>rl(e,t,n,o,r,i,l,s,c,f,w,g,h,y)):rl(e,t,n,o,r,i,l,s,c,f,w,g,h,y)}function dc(e,t,n,o,r,i,l,s,c,u,f,w,m,g,h,y,b,C,x){if(C!==void 0||t[t.length-1]!==n[t.length-1])return;const F=Xl(b);jn(t,c,l,s,i,(Y,N,z,H,G)=>{if(Y!==t[t.length-1])return;N+=Y.width;const S=Math.max(N,H);S>o||(e.save(),e.beginPath(),e.rect(S,i+1,1e4,r-i-1),e.clip(),Wr(G,z,r,u,f,h,y,F,($,W,I,R)=>{if(!R&&b.length>0&&!b.some(me=>tr(N,$,1e4,I,me.x,me.y,me.width,me.height)))return;const M=m.hasIndex(W),te=g.hasIndex(W);e.beginPath();const ne=w==null?void 0:w(W),ce=ne===void 0?x:Vn(x,ne);ce.bgCell!==x.bgCell&&(e.fillStyle=ce.bgCell,e.fillRect(N,$,1e4,I)),te&&(e.fillStyle=ce.bgHeader,e.fillRect(N,$,1e4,I)),M&&(e.fillStyle=ce.accentLight,e.fillRect(N,$,1e4,I))}),e.restore())})}function uc(e,t,n,o,r,i,l,s,c){let u=!1;for(const h of t)if(!h.sticky){u=l(h.sourceIndex);break}const f=c.horizontalBorderColor??c.borderColor,w=c.borderColor,m=u?Do(t):0;let g;if(m!==0&&(g=Qi(w,c.bgCell),e.beginPath(),e.moveTo(m+.5,0),e.lineTo(m+.5,o),e.strokeStyle=g,e.stroke()),r>0){const h=w===f&&g!==void 0?g:Qi(f,c.bgCell),y=co(i,r,s);e.beginPath(),e.moveTo(0,o-y+.5),e.lineTo(n,o-y+.5),e.strokeStyle=h,e.stroke()}}const jl=(e,t,n)=>{let o=0,r=t,i=0,l=n;if(e!==void 0&&e.length>0){o=Number.MAX_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER;for(const s of e)o=Math.min(o,s.x-1),r=Math.max(r,s.x+s.width+1),i=Math.min(i,s.y-1),l=Math.max(l,s.y+s.height+1)}return{minX:o,maxX:r,minY:i,maxY:l}};function fc(e,t,n,o,r,i,l,s,c,u,f,w,m,g,h){var I;const y=h.bgCell,{minX:b,maxX:C,minY:x,maxY:F}=jl(s,i,l),Y=[],N=l-co(g,m,u);let z=c,H=n,G=0;for(;z+r=x&&R<=F-1){const te=f==null?void 0:f(H),ne=te==null?void 0:te.bgCell;ne!==void 0&&ne!==y&&H>=g-m&&Y.push({x:b,y:R,w:C-b,h:M,color:ne})}z+=M,H0)for(let R=0;R=b&&te<=C&&w(R+1)&&Y.push({x:te,y:G,w:M.width,h:$,color:ne}),S+=M.width}if(Y.length===0)return;let W;e.beginPath();for(let R=Y.length-1;R>=0;R--){const M=Y[R];W===void 0?W=M.color:M.color!==W&&(e.fillStyle=W,e.fill(),e.beginPath(),W=M.color),e.rect(M.x,M.y,M.w,M.h)}W!==void 0&&(e.fillStyle=W,e.fill()),e.beginPath()}function il(e,t,n,o,r,i,l,s,c,u,f,w,m,g,h,y,b,C=!1){if(c!==void 0){e.beginPath(),e.save(),e.rect(0,0,i,l);for(const I of c)e.rect(I.x+1,I.y+1,I.width-1,I.height-1);e.clip("evenodd")}const x=b.horizontalBorderColor??b.borderColor,F=b.borderColor,{minX:Y,maxX:N,minY:z,maxY:H}=jl(s,i,l),G=[];e.beginPath();let S=.5;for(let I=0;I=Y&&M<=N&&g(I+1)&&G.push({x1:M,y1:Math.max(u,z),x2:M,y2:Math.min(l,H),color:F})}let $=l+.5;for(let I=y-h;I=z&&te<=H-1){const ne=m==null?void 0:m(R);G.push({x1:Y,y1:te,x2:N,y2:te,color:(ne==null?void 0:ne.horizontalBorderColor)??(ne==null?void 0:ne.borderColor)??x})}I+=w(R),R++}}const W=Ps(G,I=>I.color);for(const I of Object.keys(W)){e.strokeStyle=I;for(const R of W[I])e.moveTo(R.x1,R.y1),e.lineTo(R.x2,R.y2);e.stroke(),e.beginPath()}c!==void 0&&e.restore()}function hc(e,t,n,o,r,i,l,s,c,u,f,w,m,g,h,y,b,C,x){const F=[];e.imageSmoothingEnabled=!1;const Y=Math.min(r.cellYOffset,l),N=Math.max(r.cellYOffset,l);let z=0;if(typeof C=="number")z+=(N-Y)*C;else for(let M=Y;Mr.cellYOffset&&(z=-z),z+=c-r.translateY;const H=Math.min(r.cellXOffset,i),G=Math.max(r.cellXOffset,i);let S=0;for(let M=H;Mr.cellXOffset&&(S=-S),S+=s-r.translateX;const $=Do(b);if(S!==0&&z!==0)return{regions:[]};const W=u>0?co(m,u,C):0,I=f-$-Math.abs(S),R=w-g-W-Math.abs(z)-1;if(I>150&&R>150){const M={sx:0,sy:0,sw:f*h,sh:w*h,dx:0,dy:0,dw:f*h,dh:w*h};if(z>0?(M.sy=(g+1)*h,M.sh=R*h,M.dy=(z+g+1)*h,M.dh=R*h,F.push({x:0,y:g,width:f,height:z+1})):z<0&&(M.sy=(-z+g+1)*h,M.sh=R*h,M.dy=(g+1)*h,M.dh=R*h,F.push({x:0,y:w+z-W,width:f,height:-z+W})),S>0?(M.sx=$*h,M.sw=I*h,M.dx=(S+$)*h,M.dw=I*h,F.push({x:$-1,y:0,width:S+2,height:w})):S<0&&(M.sx=($-S)*h,M.sw=I*h,M.dx=$*h,M.dw=I*h,F.push({x:f+S,y:0,width:-S,height:w})),e.setTransform(1,0,0,1,0,0),x){if($>0&&S!==0&&z===0&&(o===void 0||(n==null?void 0:n[1])!==!1)){const te=$*h,ne=w*h;e.drawImage(t,0,0,te,ne,0,0,te,ne)}if(W>0&&S===0&&z!==0&&(o===void 0||(n==null?void 0:n[0])!==!1)){const te=(w-W)*h,ne=f*h,ce=W*h;e.drawImage(t,0,te,ne,ce,0,te,ne,ce)}}e.drawImage(t,M.sx,M.sy,M.sw,M.sh,M.dx,M.dy,M.dw,M.dh),e.scale(h,h)}return e.imageSmoothingEnabled=!0,{regions:F}}function gc(e,t,n,o,r,i,l,s,c,u){const f=[];return t!==e.cellXOffset||n!==e.cellYOffset||o!==e.translateX||r!==e.translateY||jn(c,n,o,r,s,(w,m,g,h)=>{if(w.sourceIndex===u){const y=Math.max(m,h)+1;return f.push({x:y,y:0,width:i-y,height:l}),!0}}),f}function mc(e,t){if(t===void 0||e.width!==t.width||e.height!==t.height||e.theme!==t.theme||e.headerHeight!==t.headerHeight||e.rowHeight!==t.rowHeight||e.rows!==t.rows||e.freezeColumns!==t.freezeColumns||e.getRowThemeOverride!==t.getRowThemeOverride||e.isFocused!==t.isFocused||e.isResizing!==t.isResizing||e.verticalBorder!==t.verticalBorder||e.getCellContent!==t.getCellContent||e.highlightRegions!==t.highlightRegions||e.selection!==t.selection||e.dragAndDropState!==t.dragAndDropState||e.prelightCells!==t.prelightCells||e.touchMode!==t.touchMode||e.maxScaleFactor!==t.maxScaleFactor)return!1;if(e.mappedColumns!==t.mappedColumns){if(e.mappedColumns.length>100||e.mappedColumns.length!==t.mappedColumns.length)return!1;let n;for(let o=0;oH.style!=="no-outline");if(b===void 0||b.length===0)return;const C=Do(s),x=co(g,m,w),F=[c,0,s.length,g-m],Y=[C,0,t,n-x],N=b.map(H=>{const G=H.range,S=H.style??"dashed";return rc(G,F,t,n,Y).map($=>{const W=$.rect,I=mi(W.x,W.y,t,n,f,u+f,o,r,i,l,g,c,m,s,w),R=W.width===1&&W.height===1?I:mi(W.x+W.width-1,W.y+W.height-1,t,n,f,u+f,o,r,i,l,g,c,m,s,w);return W.x+W.width>=s.length&&(R.width-=1),W.y+W.height>=g&&(R.height-=1),{color:H.color,style:S,clip:$.clip,rect:oc({x:I.x,y:I.y,width:R.x+R.width-I.x,height:R.y+R.height-I.y},t,n,8)}})}),z=()=>{e.lineWidth=1;let H=!1;for(const G of N)for(const S of G)if((S==null?void 0:S.rect)!==void 0&&tr(0,0,t,n,S.rect.x,S.rect.y,S.rect.width,S.rect.height)){const $=H,W=!nc(S.clip,S.rect);W&&(e.save(),e.rect(S.clip.x,S.clip.y,S.clip.width,S.clip.height),e.clip()),S.style==="dashed"&&!H?(e.setLineDash([5,3]),H=!0):(S.style==="solid"||S.style==="solid-outline")&&H&&(e.setLineDash([]),H=!1),e.strokeStyle=S.style==="solid-outline"?en(en(S.color,y.borderColor),y.bgCell):ao(S.color,1),e.strokeRect(S.rect.x+.5,S.rect.y+.5,S.rect.width-1,S.rect.height-1),W&&(e.restore(),H=$)}H&&e.setLineDash([])};return z(),z}function sl(e,t,n,o,r){e.beginPath(),e.moveTo(t,n),e.lineTo(t,o),e.lineWidth=2,e.strokeStyle=r,e.stroke(),e.globalAlpha=1}function si(e,t,n,o,r,i,l,s,c,u,f,w,m,g,h,y,b){if(f.current===void 0)return;const C=f.current.range,x=f.current.cell,F=[C.x+C.width-1,C.y+C.height-1];if(x[1]>=b&&F[1]>=b||!l.some(M=>M.sourceIndex===x[0]||M.sourceIndex===F[0]))return;const[N,z]=f.current.cell,H=m(f.current.cell),G=H.span??[N,N],S=z>=b-g,$=g>0&&!S?co(b,g,w)-1:0,W=F[1];let I;if(jn(l,o,r,i,u,(M,te,ne,ce,me)=>{if(M.sticky&&N>M.sourceIndex)return;const Ke=M.sourceIndexG[1],U=M.sourceIndex===F[0];if(!(!U&&(Ke||j)))return Wr(me,ne,n,b,w,g,h,void 0,(ye,le,ke)=>{if(le!==z&&le!==W)return;let be=te,V=M.width;if(H.span!==void 0){const ve=Gl(H.span,te,ye,M.width,ke,M,s),nt=M.sticky?ve[0]:ve[1];nt!==void 0&&(be=nt.x,V=nt.width)}return le===W&&U&&y&&(I=()=>{var ve;ce>be&&!M.sticky&&(e.beginPath(),e.rect(ce,0,t-ce,n),e.clip()),e.beginPath(),e.rect(be+V-4,ye+ke-4,4,4),e.fillStyle=((ve=M.themeOverride)==null?void 0:ve.accentColor)??c.accentColor,e.fill()}),I!==void 0}),I!==void 0}),I===void 0)return;const R=()=>{e.save(),e.beginPath(),e.rect(0,u,t,n-u-$),e.clip(),I==null||I(),e.restore()};return R(),R}function wc(e,t,n,o,r,i,l,s,c){c===void 0||c.size===0||(e.beginPath(),Yl(t,n,i,o,(u,f,w,m,g,h)=>{c.hasItemInRectangle({x:u[0],y:-2,width:u[1]-u[0]+1,height:1})&&e.rect(w,m,g,h)}),jn(t,s,i,l,r,(u,f,w,m)=>{const g=Math.max(0,m-f),h=f+g+1,y=u.width-g-1;c.has([u.sourceIndex,-1])&&e.rect(h,o,y,r-o)}),e.clip())}function yc(e,t,n,o,r,i,l,s,c,u){let f=0;return jn(e,i,o,r,n,(w,m,g,h,y)=>(Wr(y,g,t,l,s,c,u,void 0,(b,C,x,F)=>{F||(f=Math.max(C,f))}),!0)),f}function al(e,t){var Be;const{canvasCtx:n,headerCanvasCtx:o,width:r,height:i,cellXOffset:l,cellYOffset:s,translateX:c,translateY:u,mappedColumns:f,enableGroups:w,freezeColumns:m,dragAndDropState:g,theme:h,drawFocus:y,headerHeight:b,groupHeaderHeight:C,disabledRows:x,rowHeight:F,verticalBorder:Y,overrideCursor:N,isResizing:z,selection:H,fillHandle:G,freezeTrailingRows:S,rows:$,getCellContent:W,getGroupDetails:I,getRowThemeOverride:R,isFocused:M,drawHeaderCallback:te,prelightCells:ne,drawCellCallback:ce,highlightRegions:me,resizeCol:Ke,imageLoader:j,lastBlitData:U,hoverValues:ye,hyperWrapping:le,hoverInfo:ke,spriteManager:be,maxScaleFactor:V,hasAppendRow:Ee,touchMode:ve,enqueue:nt,renderStateProvider:tt,getCellRenderer:ht,renderStrategy:Qe,bufferACtx:He,bufferBCtx:qe,damage:xe,minimumCellWidth:dt,resizeIndicator:ot}=e;if(r===0||i===0)return;const rt=Qe==="double-buffer",re=Math.min(V,Math.ceil(window.devicePixelRatio??1)),Le=Qe!=="direct"&&mc(e,t),Me=n.canvas;(Me.width!==r*re||Me.height!==i*re)&&(Me.width=r*re,Me.height=i*re,Me.style.width=r+"px",Me.style.height=i+"px");const Se=o.canvas,ue=w?C+b:b,Ne=ue+1;(Se.width!==r*re||Se.height!==Ne*re)&&(Se.width=r*re,Se.height=Ne*re,Se.style.width=r+"px",Se.style.height=Ne+"px");const Fe=He.canvas,je=qe.canvas;rt&&(Fe.width!==r*re||Fe.height!==i*re)&&(Fe.width=r*re,Fe.height=i*re,U.current!==void 0&&(U.current.aBufferScroll=void 0)),rt&&(je.width!==r*re||je.height!==i*re)&&(je.width=r*re,je.height=i*re,U.current!==void 0&&(U.current.bBufferScroll=void 0));const oe=U.current;if(Le===!0&&l===(oe==null?void 0:oe.cellXOffset)&&s===(oe==null?void 0:oe.cellYOffset)&&c===(oe==null?void 0:oe.translateX)&&u===(oe==null?void 0:oe.translateY))return;let Ie=null;rt&&(Ie=n);const et=o;let Pe;rt?xe!==void 0?Pe=(oe==null?void 0:oe.lastBuffer)==="b"?qe:He:Pe=(oe==null?void 0:oe.lastBuffer)==="b"?He:qe:Pe=n;const Ue=Pe.canvas,ut=rt?Ue===Fe?je:Fe:Me,Xe=typeof F=="number"?()=>F:F;et.save(),Pe.save(),et.beginPath(),Pe.beginPath(),et.textBaseline="middle",Pe.textBaseline="middle",re!==1&&(et.scale(re,re),Pe.scale(re,re));const Te=gi(f,l,r,g,c);let bt=[];const pt=y&&((Be=H.current)==null?void 0:Be.cell[1])===s&&u===0;let Kt=!1;if(me!==void 0){for(const Ze of me)if(Ze.style!=="no-outline"&&Ze.range.y===s&&u===0){Kt=!0;break}}const gt=()=>{sc(et,Te,w,ke,r,c,b,C,g,z,H,h,be,ye,Y,I,xe,te,ve),il(et,Te,s,c,u,r,i,void 0,void 0,C,ue,Xe,R,Y,S,$,h,!0),et.beginPath(),et.moveTo(0,Ne-.5),et.lineTo(r,Ne-.5),et.strokeStyle=en(h.headerBottomBorderColor??h.horizontalBorderColor??h.borderColor,h.bgHeader),et.stroke(),Kt&&ll(et,r,i,l,s,c,u,f,m,b,C,F,S,$,me,h),pt&&si(et,r,i,s,c,u,Te,f,h,ue,H,Xe,W,S,Ee,G,$)};if(xe!==void 0){const Ze=Te[Te.length-1].sourceIndex+1,$t=xe.hasItemInRegion([{x:l,y:-2,width:Ze,height:2},{x:l,y:s,width:Ze,height:300},{x:0,y:s,width:m,height:300},{x:0,y:-2,width:m,height:2},{x:l,y:$-S,width:Ze,height:S,when:S>0}]),Mn=nn=>{ol(nn,Te,f,i,ue,c,u,s,$,Xe,W,I,R,x,M,y,S,Ee,bt,xe,H,ne,me,j,be,ye,ke,ce,le,h,nt,tt,ht,N,dt);const Ot=H.current;G&&y&&Ot!==void 0&&xe.has(Dl(Ot.range))&&si(nn,r,i,s,c,u,Te,f,h,ue,H,Xe,W,S,Ee,G,$)};$t&&(Mn(Pe),Ie!==null&&(Ie.save(),Ie.scale(re,re),Ie.textBaseline="middle",Mn(Ie),Ie.restore()),xe.hasHeader()&&(wc(et,Te,r,C,ue,c,u,s,xe),gt())),Pe.restore(),et.restore();return}if((Le!==!0||l!==(oe==null?void 0:oe.cellXOffset)||c!==(oe==null?void 0:oe.translateX)||pt!==(oe==null?void 0:oe.mustDrawFocusOnHeader)||Kt!==(oe==null?void 0:oe.mustDrawHighlightRingsOnHeader))&>(),Le===!0){Qt(ut!==void 0&&oe!==void 0);const{regions:Ze}=hc(Pe,ut,ut===Fe?oe.aBufferScroll:oe.bBufferScroll,ut===Fe?oe.bBufferScroll:oe.aBufferScroll,oe,l,s,c,u,S,r,i,$,ue,re,f,Te,F,rt);bt=Ze}else Le!==!1&&(Qt(oe!==void 0),bt=gc(oe,l,s,c,u,r,i,ue,Te,Le));uc(Pe,Te,r,i,S,$,Y,Xe,h);const Dt=ll(Pe,r,i,l,s,c,u,f,m,b,C,F,S,$,me,h),Ft=y?si(Pe,r,i,s,c,u,Te,f,h,ue,H,Xe,W,S,Ee,G,$):void 0;if(Pe.fillStyle=h.bgCell,bt.length>0){Pe.beginPath();for(const Ze of bt)Pe.rect(Ze.x,Ze.y,Ze.width,Ze.height);Pe.clip(),Pe.fill(),Pe.beginPath()}else Pe.fillRect(0,0,r,i);const An=ol(Pe,Te,f,i,ue,c,u,s,$,Xe,W,I,R,x,M,y,S,Ee,bt,xe,H,ne,me,j,be,ye,ke,ce,le,h,nt,tt,ht,N,dt);dc(Pe,Te,f,r,i,ue,c,u,s,$,Xe,R,H.rows,x,S,Ee,bt,xe,h),fc(Pe,Te,s,c,u,r,i,bt,ue,Xe,R,Y,S,$,h),il(Pe,Te,s,c,u,r,i,bt,An,C,ue,Xe,R,Y,S,$,h),Dt==null||Dt(),Ft==null||Ft(),z&&ot!=="none"&&jn(Te,0,c,0,ue,(Ze,$t)=>Ze.sourceIndex===Ke?(sl(et,$t+Ze.width,0,ue+1,en(h.resizeIndicatorColor??h.accentLight,h.bgHeader)),ot==="full"&&sl(Pe,$t+Ze.width,ue,i,en(h.resizeIndicatorColor??h.accentLight,h.bgCell)),!0):!1),Ie!==null&&(Ie.fillStyle=h.bgCell,Ie.fillRect(0,0,r,i),Ie.drawImage(Pe.canvas,0,0));const zn=yc(Te,i,ue,c,u,s,$,Xe,S,Ee);j==null||j.setWindow({x:l,y:s,width:Te.length,height:zn-s},m,Array.from({length:S},(Ze,$t)=>$-1-$t));const at=oe!==void 0&&(l!==oe.cellXOffset||c!==oe.translateX),Sn=oe!==void 0&&(s!==oe.cellYOffset||u!==oe.translateY);U.current={cellXOffset:l,cellYOffset:s,translateX:c,translateY:u,mustDrawFocusOnHeader:pt,mustDrawHighlightRingsOnHeader:Kt,lastBuffer:rt?Ue===Fe?"a":"b":void 0,aBufferScroll:Ue===Fe?[at,Sn]:oe==null?void 0:oe.aBufferScroll,bBufferScroll:Ue===je?[at,Sn]:oe==null?void 0:oe.bBufferScroll},Pe.restore(),et.restore()}const bc=80;function pc(e){const t=e-1;return t*t*t+1}class vc{constructor(t){Oe(this,"callback");Oe(this,"currentHoveredItem");Oe(this,"leavingItems",[]);Oe(this,"lastAnimationTime");Oe(this,"addToLeavingItems",t=>{this.leavingItems.some(o=>jo(o.item,t.item))||this.leavingItems.push(t)});Oe(this,"removeFromLeavingItems",t=>{const n=this.leavingItems.find(o=>jo(o.item,t));return this.leavingItems=this.leavingItems.filter(o=>o!==n),(n==null?void 0:n.hoverAmount)??0});Oe(this,"cleanUpLeavingElements",()=>{this.leavingItems=this.leavingItems.filter(t=>t.hoverAmount>0)});Oe(this,"shouldStep",()=>{const t=this.leavingItems.length>0,n=this.currentHoveredItem!==void 0&&this.currentHoveredItem.hoverAmount<1;return t||n});Oe(this,"getAnimatingItems",()=>this.currentHoveredItem!==void 0?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map(t=>({...t,hoverAmount:pc(t.hoverAmount)})));Oe(this,"step",t=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=t;else{const o=(t-this.lastAnimationTime)/bc;for(const i of this.leavingItems)i.hoverAmount=an(i.hoverAmount-o,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=an(this.currentHoveredItem.hoverAmount+o,0,1));const r=this.getAnimatingItems();this.callback(r),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=t,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0});Oe(this,"setHovered",t=>{var n;if(!jo((n=this.currentHoveredItem)==null?void 0:n.item,t)){if(this.currentHoveredItem!==void 0&&this.addToLeavingItems(this.currentHoveredItem),t!==void 0){const o=this.removeFromLeavingItems(t);this.currentHoveredItem={item:t,hoverAmount:o}}else this.currentHoveredItem=void 0;this.lastAnimationTime===void 0&&window.requestAnimationFrame(this.step)}});this.callback=t}}class Cc{constructor(t){Oe(this,"fn");Oe(this,"val");this.fn=t}get value(){return this.val??(this.val=this.fn())}}function Mi(e){return new Cc(e)}const xc=Mi(()=>window.navigator.userAgent.includes("Firefox")),Ar=Mi(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")),zr=Mi(()=>window.navigator.platform.toLowerCase().startsWith("mac"));function kc(e){const t=a.useRef([]),n=a.useRef(0),o=a.useRef(e);o.current=e;const r=a.useCallback(()=>{const i=()=>window.requestAnimationFrame(l),l=()=>{const s=t.current.map(ki);t.current=[],o.current(new Jo(s)),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?i:l)},[]);return a.useCallback(i=>{t.current.length===0&&r();const l=yn(i[0],i[1]);t.current.includes(l)||t.current.push(l)},[r])}const _n="header",Jt="group-header",Br="out-of-bounds";var Mo;(function(e){e[e.Start=-2]="Start",e[e.StartPadding=-1]="StartPadding",e[e.Center=0]="Center",e[e.EndPadding=1]="EndPadding",e[e.End=2]="End"})(Mo||(Mo={}));function Zl(e,t){return e===t?!0:(e==null?void 0:e.kind)==="out-of-bounds"?(e==null?void 0:e.kind)===(t==null?void 0:t.kind)&&(e==null?void 0:e.location[0])===(t==null?void 0:t.location[0])&&(e==null?void 0:e.location[1])===(t==null?void 0:t.location[1])&&(e==null?void 0:e.region[0])===(t==null?void 0:t.region[0])&&(e==null?void 0:e.region[1])===(t==null?void 0:t.region[1]):(e==null?void 0:e.kind)===(t==null?void 0:t.kind)&&(e==null?void 0:e.location[0])===(t==null?void 0:t.location[0])&&(e==null?void 0:e.location[1])===(t==null?void 0:t.location[1])}const cl=6,Sc=(e,t)=>{if(e.kind===J.Custom)return e.copyData;const n=t==null?void 0:t(e);return(n==null?void 0:n.getAccessibilityString(e))??""},Mc=(e,t)=>{const{width:n,height:o,accessibilityHeight:r,columns:i,cellXOffset:l,cellYOffset:s,headerHeight:c,fillHandle:u=!1,groupHeaderHeight:f,rowHeight:w,rows:m,getCellContent:g,getRowThemeOverride:h,onHeaderMenuClick:y,onHeaderIndicatorClick:b,enableGroups:C,isFilling:x,onCanvasFocused:F,onCanvasBlur:Y,isFocused:N,selection:z,freezeColumns:H,onContextMenu:G,freezeTrailingRows:S,fixedShadowX:$=!0,fixedShadowY:W=!0,drawFocusRing:I,onMouseDown:R,onMouseUp:M,onMouseMoveRaw:te,onMouseMove:ne,onItemHovered:ce,dragAndDropState:me,firstColAccessible:Ke,onKeyDown:j,onKeyUp:U,highlightRegions:ye,canvasRef:le,onDragStart:ke,onDragEnd:be,eventTargetRef:V,isResizing:Ee,resizeColumn:ve,isDragging:nt,isDraggable:tt=!1,allowResize:ht,disabledRows:Qe,hasAppendRow:He,getGroupDetails:qe,theme:xe,prelightCells:dt,headerIcons:ot,verticalBorder:rt,drawCell:re,drawHeader:Le,onCellFocused:Me,onDragOverCell:Se,onDrop:ue,onDragLeave:Ne,imageWindowLoader:Fe,smoothScrollX:je=!1,smoothScrollY:oe=!1,experimental:Ie,getCellRenderer:et,resizeIndicator:Pe="full"}=e,Ue=e.translateX??0,ut=e.translateY??0,Xe=Math.max(H,Math.min(i.length-1,l)),Te=a.useRef(null),bt=a.useRef(window),pt=bt.current,Kt=Fe,gt=a.useRef(),[Dt,Ft]=a.useState(!1),An=a.useRef([]),zn=a.useRef(),[at,Sn]=a.useState(),[Be,Ze]=a.useState(),$t=a.useRef(null),[Mn,nn]=a.useState(),[Ot,Ve]=a.useState(!1),kt=a.useRef(Ot);kt.current=Ot;const st=a.useMemo(()=>new ec(ot,()=>{uo.current=void 0,Jn.current()}),[ot]),Xt=C?f+c:c,At=a.useRef(-1),qt=((Ie==null?void 0:Ie.enableFirefoxRescaling)??!1)&&xc.value,Ho=((Ie==null?void 0:Ie.enableSafariRescaling)??!1)&&Ar.value;a.useLayoutEffect(()=>{window.devicePixelRatio===1||!qt&&!Ho||(At.current!==-1&&Ft(!0),window.clearTimeout(At.current),At.current=window.setTimeout(()=>{Ft(!1),At.current=-1},200))},[s,Xe,Ue,ut,qt,Ho]);const vt=la(i,H),Ht=$?Do(vt,me):0,Tt=a.useCallback((k,K,se)=>{const Z=k.getBoundingClientRect();if(K>=vt.length||se>=m)return;const _=Z.width/n,q=mi(K,se,n,o,f,Xt,Xe,s,Ue,ut,m,H,S,vt,w);return _!==1&&(q.x*=_,q.y*=_,q.width*=_,q.height*=_),q.x+=Z.x,q.y+=Z.y,q},[n,o,f,Xt,Xe,s,Ue,ut,m,H,S,vt,w]),Lt=a.useCallback((k,K,se,Z)=>{const _=k.getBoundingClientRect(),q=_.width/n,de=(K-_.left)/q,Re=(se-_.top)/q,fe=5,Mt=gi(vt,Xe,n,void 0,Ue);let ie=0,De=0;Z instanceof MouseEvent&&(ie=Z.button,De=Z.buttons);const Ye=da(de,Mt,Ue),We=ua(Re,o,C,c,f,m,w,s,ut,S),wt=(Z==null?void 0:Z.shiftKey)===!0,Vt=(Z==null?void 0:Z.ctrlKey)===!0,Ct=(Z==null?void 0:Z.metaKey)===!0,$e=Z!==void 0&&!(Z instanceof MouseEvent)||(Z==null?void 0:Z.pointerType)==="touch",xt=[de<0?-1:nn||Re>o){const it=de>n?1:de<0?-1:0,Bt=Re>o?1:Re<0?-1:0;let _e=it*2,eo=Bt*2;it===0&&(_e=Ye===-1?Mo.EndPadding:Mo.Center),Bt===0&&(eo=We===void 0?Mo.EndPadding:Mo.Center);let jt=!1;if(Ye===-1&&We===-1){const Rt=Tt(k,vt.length-1,-1);Qt(Rt!==void 0),jt=Kn&&deo&&Re=0?(Bt=!0,it=Tt(k,_e,We),Qt(it!==void 0),Yt={kind:C&&We===-2?Jt:_n,location:[_e,We],bounds:it,group:vt[_e].group??"",isEdge:Bt,shiftKey:wt,ctrlKey:Vt,metaKey:Ct,isTouch:$e,localEventX:K-it.x,localEventY:se-it.y,button:ie,buttons:De,scrollEdge:xt}):Yt={kind:C&&We===-2?Jt:_n,group:vt[Ye].group??"",location:[Ye,We],bounds:it,isEdge:Bt,shiftKey:wt,ctrlKey:Vt,metaKey:Ct,isTouch:$e,localEventX:K-it.x,localEventY:se-it.y,button:ie,buttons:De,scrollEdge:xt}}else{const it=Tt(k,Ye,We);Qt(it!==void 0);const Bt=it!==void 0&&it.x+it.width-K{}),Bn=a.useRef(at);Bn.current=at;const[En,In]=a.useMemo(()=>{const k=document.createElement("canvas"),K=document.createElement("canvas");return k.style.display="none",k.style.opacity="0",k.style.position="fixed",K.style.display="none",K.style.opacity="0",K.style.position="fixed",[k.getContext("2d",{alpha:!1}),K.getContext("2d",{alpha:!1})]},[]);a.useLayoutEffect(()=>{if(!(En===null||In===null))return document.documentElement.append(En.canvas),document.documentElement.append(In.canvas),()=>{En.canvas.remove(),In.canvas.remove()}},[En,In]);const bn=a.useMemo(()=>new va,[]),rr=qt&&Dt?1:Ho&&Dt?2:5,ir=(Ie==null?void 0:Ie.disableMinimumCellWidth)===!0?1:10,uo=a.useRef(),fo=a.useRef(null),ho=a.useRef(null),Zn=a.useCallback(()=>{var de;const k=Te.current,K=$t.current;if(k===null||K===null||(fo.current===null&&(fo.current=k.getContext("2d",{alpha:!1}),k.width=0,k.height=0),ho.current===null&&(ho.current=K.getContext("2d",{alpha:!1}),K.width=0,K.height=0),fo.current===null||ho.current===null||En===null||In===null))return;let se=!1;const Z=Re=>{se=!0,nn(Re)},_=uo.current,q={headerCanvasCtx:ho.current,canvasCtx:fo.current,bufferACtx:En,bufferBCtx:In,width:n,height:o,cellXOffset:Xe,cellYOffset:s,translateX:Math.round(Ue),translateY:Math.round(ut),mappedColumns:vt,enableGroups:C,freezeColumns:H,dragAndDropState:me,theme:xe,headerHeight:c,groupHeaderHeight:f,disabledRows:Qe??lt.empty(),rowHeight:w,verticalBorder:rt,isResizing:Ee,resizeCol:ve,isFocused:N,selection:z,fillHandle:u,drawCellCallback:re,hasAppendRow:He,overrideCursor:Z,maxScaleFactor:rr,freezeTrailingRows:S,rows:m,drawFocus:I,getCellContent:g,getGroupDetails:qe??(Re=>({name:Re})),getRowThemeOverride:h,drawHeaderCallback:Le,prelightCells:dt,highlightRegions:ye,imageLoader:Kt,lastBlitData:zn,damage:gt.current,hoverValues:An.current,hoverInfo:Bn.current,spriteManager:st,scrolling:Dt,hyperWrapping:(Ie==null?void 0:Ie.hyperWrapping)??!1,touchMode:Ot,enqueue:or.current,renderStateProvider:bn,renderStrategy:(Ie==null?void 0:Ie.renderStrategy)??(Ar.value?"double-buffer":"single-buffer"),getCellRenderer:et,minimumCellWidth:ir,resizeIndicator:Pe};q.damage===void 0?(uo.current=q,al(q,_)):al(q,void 0),!se&&(q.damage===void 0||q.damage.has((de=Bn==null?void 0:Bn.current)==null?void 0:de[0]))&&nn(void 0)},[En,In,n,o,Xe,s,Ue,ut,vt,C,H,me,xe,c,f,Qe,w,rt,Ee,He,ve,N,z,u,S,m,I,rr,g,qe,h,re,Le,dt,ye,Kt,st,Dt,Ie==null?void 0:Ie.hyperWrapping,Ie==null?void 0:Ie.renderStrategy,Ot,bn,et,ir,Pe]),Jn=a.useRef(Zn);a.useLayoutEffect(()=>{Zn(),Jn.current=Zn},[Zn]),a.useLayoutEffect(()=>{(async()=>{var K;((K=document==null?void 0:document.fonts)==null?void 0:K.ready)!==void 0&&(await document.fonts.ready,uo.current=void 0,Jn.current())})()},[]);const Ln=a.useCallback(k=>{gt.current=k,Jn.current(),gt.current=void 0},[]),$r=kc(Ln);or.current=$r;const lr=a.useCallback(k=>{Ln(new Jo(k.map(K=>K.cell)))},[Ln]);Kt.setCallback(Ln);const[sr,Or]=a.useState(!1),[go,Pn]=Rn??[],To=go!==void 0&&Pn===-1,Nr=go!==void 0&&Pn===-2;let Pt=!1,Ut=!1,mo=Mn;if(mo===void 0&&go!==void 0&&Pn!==void 0&&Pn>-1&&Pn({contain:"strict",display:"block",cursor:Ao}),[Ao]),Dn=a.useRef("default"),$n=V==null?void 0:V.current;$n!=null&&Dn.current!==Wn.cursor&&($n.style.cursor=Dn.current=Wn.cursor);const On=a.useCallback((k,K,se,Z)=>{if(qe===void 0)return;const _=qe(k);if(_.actions!==void 0){const q=_l(K,_.actions);for(const[de,Re]of q.entries())if(Ro(Re,se+K.x,Z+Re.y))return _.actions[de]}},[qe]),Fn=a.useCallback((k,K,se,Z)=>{const _=vt[K];if(!nt&&!Ee&&!(Be??!1)){const q=Tt(k,K,-1);Qt(q!==void 0);const de=Vl(void 0,_,q.x,q.y,q.width,q.height,xe,vi(_.title)==="rtl");if(_.hasMenu===!0&&de.menuBounds!==void 0&&Ro(de.menuBounds,se,Z))return{area:"menu",bounds:de.menuBounds};if(_.indicatorIcon!==void 0&&de.indicatorIconBounds!==void 0&&Ro(de.indicatorIconBounds,se,Z))return{area:"indicator",bounds:de.indicatorIconBounds}}},[vt,Tt,Be,nt,Ee,xe]),pe=a.useRef(0),Nn=a.useRef(),zo=a.useRef(!1),on=a.useCallback(k=>{const K=Te.current,se=V==null?void 0:V.current;if(K===null||k.target!==K&&k.target!==se)return;zo.current=!0;let Z,_;if(k instanceof MouseEvent?(Z=k.clientX,_=k.clientY):(Z=k.touches[0].clientX,_=k.touches[0].clientY),k.target===se&&se!==null){const de=se.getBoundingClientRect();if(Z>de.right||_>de.bottom)return}const q=Lt(K,Z,_,k);Nn.current=q.location,q.isTouch&&(pe.current=Date.now()),kt.current!==q.isTouch&&Ve(q.isTouch),!(q.kind===_n&&Fn(K,q.location[0],Z,_)!==void 0)&&(q.kind===Jt&&On(q.group,q.bounds,q.localEventX,q.localEventY)!==void 0||(R==null||R(q),!q.isTouch&&tt!==!0&&tt!==q.kind&&q.button<3&&q.button!==1&&k.preventDefault()))},[V,tt,Lt,On,Fn,R]);Nt("touchstart",on,pt,!1),Nt("mousedown",on,pt,!1);const ar=a.useRef(0),dn=a.useCallback(k=>{var De,Ye;const K=ar.current;ar.current=Date.now();const se=Te.current;if(zo.current=!1,M===void 0||se===null)return;const Z=V==null?void 0:V.current,_=k.target!==se&&k.target!==Z;let q,de,Re=!0;if(k instanceof MouseEvent){if(q=k.clientX,de=k.clientY,Re=k.button<3,k.pointerType==="touch")return}else q=k.changedTouches[0].clientX,de=k.changedTouches[0].clientY;let fe=Lt(se,q,de,k);fe.isTouch&&pe.current!==0&&Date.now()-pe.current>500&&(fe={...fe,isLongTouch:!0}),K!==0&&Date.now()-K<(fe.isTouch?1e3:500)&&(fe={...fe,isDoubleClick:!0}),kt.current!==fe.isTouch&&Ve(fe.isTouch),!_&&k.cancelable&&Re&&k.preventDefault();const[Mt]=fe.location,ie=Fn(se,Mt,q,de);if(fe.kind===_n&&ie!==void 0){(fe.button!==0||((De=Nn.current)==null?void 0:De[0])!==Mt||((Ye=Nn.current)==null?void 0:Ye[1])!==-1)&&M(fe,!0);return}else if(fe.kind===Jt){const We=On(fe.group,fe.bounds,fe.localEventX,fe.localEventY);if(We!==void 0){fe.button===0&&We.onClick(fe);return}}M(fe,_)},[M,V,Lt,Fn,On]);Nt("mouseup",dn,pt,!1),Nt("touchend",dn,pt,!1);const Bo=a.useCallback(k=>{var Mt,ie;const K=Te.current;if(K===null)return;const se=V==null?void 0:V.current,Z=k.target!==K&&k.target!==se;let _,q,de=!0;k instanceof MouseEvent?(_=k.clientX,q=k.clientY,de=k.button<3):(_=k.changedTouches[0].clientX,q=k.changedTouches[0].clientY);const Re=Lt(K,_,q,k);kt.current!==Re.isTouch&&Ve(Re.isTouch),!Z&&k.cancelable&&de&&k.preventDefault();const[fe]=Re.location;if(Re.kind===_n){const De=Fn(K,fe,_,q);De!==void 0&&Re.button===0&&((Mt=Nn.current)==null?void 0:Mt[0])===fe&&((ie=Nn.current)==null?void 0:ie[1])===-1&&(De.area==="menu"?y==null||y(fe,De.bounds):De.area==="indicator"&&(b==null||b(fe,De.bounds)))}else if(Re.kind===Jt){const De=On(Re.group,Re.bounds,Re.localEventX,Re.localEventY);De!==void 0&&Re.button===0&&De.onClick(Re)}},[V,Lt,Fn,y,b,On]);Nt("click",Bo,pt,!1);const cr=a.useCallback(k=>{const K=Te.current,se=V==null?void 0:V.current;if(K===null||k.target!==K&&k.target!==se||G===void 0)return;const Z=Lt(K,k.clientX,k.clientY,k);G(Z,()=>{k.cancelable&&k.preventDefault()})},[V,Lt,G]);Nt("contextmenu",cr,(V==null?void 0:V.current)??null,!1);const Lo=a.useCallback(k=>{gt.current=new Jo(k.map(K=>K.item)),An.current=k,Jn.current(),gt.current=void 0},[]),dr=a.useMemo(()=>new vc(Lo),[Lo]),ur=a.useRef(dr);ur.current=dr,a.useLayoutEffect(()=>{const k=ur.current;if(Rn===void 0||Rn[1]<0){k.setHovered(Rn);return}const K=g(Rn,!0),se=et(K),Z=se===void 0&&K.kind===J.Custom||(se==null?void 0:se.needsHover)!==void 0&&(typeof se.needsHover=="boolean"?se.needsHover:se.needsHover(K));k.setHovered(Z?Rn:void 0)},[g,et,Rn]);const un=a.useRef(),Xn=a.useCallback(k=>{var Re;const K=Te.current;if(K===null)return;const se=V==null?void 0:V.current,Z=k.target!==K&&k.target!==se,_=Lt(K,k.clientX,k.clientY,k);if(_.kind!=="out-of-bounds"&&Z&&!zo.current&&!_.isTouch)return;const q=(fe,Mt)=>{Sn(ie=>ie===fe||(ie==null?void 0:ie[0][0])===(fe==null?void 0:fe[0][0])&&(ie==null?void 0:ie[0][1])===(fe==null?void 0:fe[0][1])&&((ie==null?void 0:ie[1][0])===(fe==null?void 0:fe[1][0])&&(ie==null?void 0:ie[1][1])===(fe==null?void 0:fe[1][1])||!Mt)?ie:fe)};if(!Zl(_,un.current))nn(void 0),ce==null||ce(_),q(_.kind===Br?void 0:[_.location,[_.localEventX,_.localEventY]],!0),un.current=_;else if(_.kind==="cell"||_.kind===_n||_.kind===Jt){let fe=!1,Mt=!0;if(_.kind==="cell"){const De=g(_.location);Mt=((Re=et(De))==null?void 0:Re.needsHoverPosition)??De.kind===J.Custom,fe=Mt}else _.kind===Jt&&(fe=!0);const ie=[_.location,[_.localEventX,_.localEventY]];q(ie,Mt),Bn.current=ie,fe&&Ln(new Jo([_.location]))}const de=_.location[0]>=(Ke?0:1);Ze(_.kind===_n&&_.isEdge&&de&&ht===!0),Or(_.kind==="cell"&&_.isFillHandle),te==null||te(k),ne(_)},[V,Lt,Ke,ht,te,ne,ce,g,et,Ln]);Nt("mousemove",Xn,pt,!0);const rn=a.useCallback(k=>{const K=Te.current;if(K===null)return;let se,Z;z.current!==void 0&&(se=Tt(K,z.current.cell[0],z.current.cell[1]),Z=z.current.cell),j==null||j({bounds:se,stopPropagation:()=>k.stopPropagation(),preventDefault:()=>k.preventDefault(),cancel:()=>{},ctrlKey:k.ctrlKey,metaKey:k.metaKey,shiftKey:k.shiftKey,altKey:k.altKey,key:k.key,keyCode:k.keyCode,rawEvent:k,location:Z})},[j,z,Tt]),T=a.useCallback(k=>{const K=Te.current;if(K===null)return;let se,Z;z.current!==void 0&&(se=Tt(K,z.current.cell[0],z.current.cell[1]),Z=z.current.cell),U==null||U({bounds:se,stopPropagation:()=>k.stopPropagation(),preventDefault:()=>k.preventDefault(),cancel:()=>{},ctrlKey:k.ctrlKey,metaKey:k.metaKey,shiftKey:k.shiftKey,altKey:k.altKey,key:k.key,keyCode:k.keyCode,rawEvent:k,location:Z})},[U,z,Tt]),mt=a.useCallback(k=>{if(Te.current=k,le!==void 0&&(le.current=k),k===null)bt.current=window;else{const K=k.getRootNode();K===document&&(bt.current=window),bt.current=K}},[le]),Qn=a.useCallback(k=>{const K=Te.current;if(K===null||tt===!1||Ee){k.preventDefault();return}let se,Z;const _=Lt(K,k.clientX,k.clientY);if(tt!==!0&&_.kind!==tt){k.preventDefault();return}const q=(De,Ye)=>{se=De,Z=Ye};let de,Re,fe;const Mt=(De,Ye,We)=>{de=De,Re=Ye,fe=We};let ie=!1;if(ke==null||ke({..._,setData:q,setDragImage:Mt,preventDefault:()=>ie=!0,defaultPrevented:()=>ie}),!ie&&se!==void 0&&Z!==void 0&&k.dataTransfer!==null)if(k.dataTransfer.setData(se,Z),k.dataTransfer.effectAllowed="copyLink",de!==void 0&&Re!==void 0&&fe!==void 0)k.dataTransfer.setDragImage(de,Re,fe);else{const[De,Ye]=_.location;if(Ye!==void 0){const We=document.createElement("canvas"),wt=Tt(K,De,Ye);Qt(wt!==void 0);const Vt=Math.ceil(window.devicePixelRatio??1);We.width=wt.width*Vt,We.height=wt.height*Vt;const Ct=We.getContext("2d");Ct!==null&&(Ct.scale(Vt,Vt),Ct.textBaseline="middle",Ye===-1?(Ct.font=xe.headerFontFull,Ct.fillStyle=xe.bgHeader,Ct.fillRect(0,0,We.width,We.height),ql(Ct,0,0,wt.width,wt.height,vt[De],!1,xe,!1,!1,0,st,Le,!1)):(Ct.font=xe.baseFontFull,Ct.fillStyle=xe.bgCell,Ct.fillRect(0,0,We.width,We.height),Ul(Ct,g([De,Ye]),0,Ye,!1,!1,0,0,wt.width,wt.height,!1,xe,xe.bgCell,Kt,st,1,void 0,!1,0,void 0,void 0,void 0,bn,et,()=>{}))),We.style.left="-100%",We.style.position="absolute",We.style.width=`${wt.width}px`,We.style.height=`${wt.height}px`,document.body.append(We),k.dataTransfer.setDragImage(We,wt.width/2,wt.height/2),window.setTimeout(()=>{We.remove()},0)}}else k.preventDefault()},[tt,Ee,Lt,ke,Tt,xe,vt,st,Le,g,Kt,bn,et]);Nt("dragstart",Qn,(V==null?void 0:V.current)??null,!1,!1);const Po=a.useRef(),fr=a.useCallback(k=>{const K=Te.current;if(ue!==void 0&&k.preventDefault(),K===null||Se===void 0)return;const se=Lt(K,k.clientX,k.clientY),[Z,_]=se.location,q=Z-(Ke?0:1),[de,Re]=Po.current??[];(de!==q||Re!==_)&&(Po.current=[q,_],Se([q,_],k.dataTransfer))},[Ke,Lt,Se,ue]);Nt("dragover",fr,(V==null?void 0:V.current)??null,!1,!1);const Yr=a.useCallback(()=>{Po.current=void 0,be==null||be()},[be]);Nt("dragend",Yr,(V==null?void 0:V.current)??null,!1,!1);const Gr=a.useCallback(k=>{const K=Te.current;if(K===null||ue===void 0)return;k.preventDefault();const se=Lt(K,k.clientX,k.clientY),[Z,_]=se.location,q=Z-(Ke?0:1);ue([q,_],k.dataTransfer)},[Ke,Lt,ue]);Nt("drop",Gr,(V==null?void 0:V.current)??null,!1,!1);const Ei=a.useCallback(()=>{Ne==null||Ne()},[Ne]);Nt("dragleave",Ei,(V==null?void 0:V.current)??null,!1,!1);const B=a.useRef(z);B.current=z;const zt=a.useRef(null),St=a.useCallback(k=>{var K;Te.current===null||!Te.current.contains(document.activeElement)||(k===null&&B.current.current!==void 0?(K=le==null?void 0:le.current)==null||K.focus({preventScroll:!0}):k!==null&&k.focus({preventScroll:!0}),zt.current=k)},[le]);a.useImperativeHandle(t,()=>({focus:()=>{var K;const k=zt.current;k===null||!document.contains(k)?(K=le==null?void 0:le.current)==null||K.focus({preventScroll:!0}):k.focus({preventScroll:!0})},getBounds:(k,K)=>{if(!(le===void 0||le.current===null))return Tt(le.current,k??0,K??-1)},damage:lr}),[le,lr,Tt]);const Wo=a.useRef(),Kr=_s(()=>{var Re,fe,Mt;if(n<50||(Ie==null?void 0:Ie.disableAccessibilityTree)===!0)return null;let k=gi(vt,Xe,n,me,Ue);const K=Ke?0:-1;!Ke&&((Re=k[0])==null?void 0:Re.sourceIndex)===0&&(k=k.slice(1));const[se,Z]=((fe=z.current)==null?void 0:fe.cell)??[],_=(Mt=z.current)==null?void 0:Mt.range,q=k.map(ie=>ie.sourceIndex),de=so(s,Math.min(m,s+r));return se!==void 0&&Z!==void 0&&!(q.includes(se)&&de.includes(Z))&&St(null),a.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":m+1,"aria-multiselectable":"true","aria-colcount":vt.length+K},a.createElement("thead",{role:"rowgroup"},a.createElement("tr",{role:"row","aria-rowindex":1},k.map(ie=>a.createElement("th",{role:"columnheader","aria-selected":z.columns.hasIndex(ie.sourceIndex),"aria-colindex":ie.sourceIndex+1+K,tabIndex:-1,onFocus:De=>{if(De.target!==zt.current)return Me==null?void 0:Me([ie.sourceIndex,-1])},key:ie.sourceIndex},ie.title)))),a.createElement("tbody",{role:"rowgroup"},de.map(ie=>a.createElement("tr",{role:"row","aria-selected":z.rows.hasIndex(ie),key:ie,"aria-rowindex":ie+2},k.map(De=>{const Ye=De.sourceIndex,We=yn(Ye,ie),wt=se===Ye&&Z===ie,Vt=_!==void 0&&Ye>=_.x&&Ye<_.x+_.width&&ie>=_.y&&ie<_.y+_.height,Ct=`glide-cell-${Ye}-${ie}`,$e=[Ye,ie],xt=g($e,!0);return a.createElement("td",{key:We,role:"gridcell","aria-colindex":Ye+1+K,"aria-selected":Vt,"aria-readonly":So(xt)||!qo(xt),id:Ct,"data-testid":Ct,onClick:()=>{const Yt=le==null?void 0:le.current;if(Yt!=null)return j==null?void 0:j({bounds:Tt(Yt,Ye,ie),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:$e})},onFocusCapture:Yt=>{var it,Bt;if(!(Yt.target===zt.current||((it=Wo.current)==null?void 0:it[0])===Ye&&((Bt=Wo.current)==null?void 0:Bt[1])===ie))return Wo.current=$e,Me==null?void 0:Me($e)},ref:wt?St:void 0,tabIndex:-1},Sc(xt,et))})))))},[n,vt,Xe,me,Ue,m,s,r,z,St,g,le,j,Tt,Me],200),Hn=H===0||!$?0:Xe>H?1:an(-Ue/100,0,1),_t=-s*32+ut,fn=W?an(-_t/100,0,1):0,Ur=a.useMemo(()=>{if(!Hn&&!fn)return null;const k={position:"absolute",top:0,left:Ht,width:n-Ht,height:o,opacity:Hn,pointerEvents:"none",transition:je?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},K={position:"absolute",top:Xt,left:0,width:n,height:o,opacity:fn,pointerEvents:"none",transition:oe?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return a.createElement(a.Fragment,null,Hn>0&&a.createElement("div",{id:"shadow-x",style:k}),fn>0&&a.createElement("div",{id:"shadow-y",style:K}))},[Hn,fn,Ht,n,je,Xt,o,oe]),_r=a.useMemo(()=>({position:"absolute",top:0,left:0}),[]);return a.createElement(a.Fragment,null,a.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:rn,onKeyUp:T,onFocus:F,onBlur:Y,ref:mt,style:Wn},Kr),a.createElement("canvas",{ref:$t,style:_r}),Ur)},Rc=a.memo(a.forwardRef(Mc));function Vo(e,t,n,o){return an(Math.round(t-(e.growOffset??0)),Math.ceil(n),Math.floor(o))}const Ec=e=>{const[t,n]=a.useState(),[o,r]=a.useState(),[i,l]=a.useState(),[s,c]=a.useState(),[u,f]=a.useState(!1),[w,m]=a.useState(),[g,h]=a.useState(),[y,b]=a.useState(),[C,x]=a.useState(!1),[F,Y]=a.useState(),{onHeaderMenuClick:N,onHeaderIndicatorClick:z,getCellContent:H,onColumnMoved:G,onColumnResize:S,onColumnResizeStart:$,onColumnResizeEnd:W,gridRef:I,maxColumnWidth:R,minColumnWidth:M,onRowMoved:te,lockColumns:ne,onColumnProposeMove:ce,onMouseDown:me,onMouseUp:Ke,onItemHovered:j,onDragStart:U,canvasRef:ye}=e,le=(S??W??$)!==void 0,{columns:ke,selection:be}=e,V=be.columns,Ee=a.useCallback(re=>{const[Le,Me]=re.location;i!==void 0&&s!==Le&&Le>=ne?(f(!0),c(Le)):g!==void 0&&Me!==void 0?(x(!0),b(Math.max(0,Me))):o===void 0&&!u&&!C&&(j==null||j(re))},[i,g,s,j,ne,o,u,C]),ve=G!==void 0,nt=a.useCallback(re=>{var Le;if(re.button===0){const[Me,Se]=re.location;if(re.kind==="out-of-bounds"&&re.isEdge&&le){const ue=(Le=I==null?void 0:I.current)==null?void 0:Le.getBounds(ke.length-1,-1);ue!==void 0&&(n(ue.x),r(ke.length-1))}else if(re.kind==="header"&&Me>=ne){const ue=ye==null?void 0:ye.current;if(re.isEdge&&le&&ue){n(re.bounds.x),r(Me);const Fe=ue.getBoundingClientRect().width/ue.offsetWidth,je=re.bounds.width/Fe;$==null||$(ke[Me],je,Me,je+(ke[Me].growOffset??0))}else re.kind==="header"&&ve&&(m(re.bounds.x),l(Me))}else re.kind==="cell"&&ne>0&&Me===0&&Se!==void 0&&te!==void 0&&(Y(re.bounds.y),h(Se))}me==null||me(re)},[me,le,ne,te,I,ke,ve,$,ye]),tt=a.useCallback((re,Le)=>{u||C||N==null||N(re,Le)},[u,C,N]),ht=a.useCallback((re,Le)=>{u||C||z==null||z(re,Le)},[u,C,z]),Qe=a.useRef(-1),He=a.useCallback(()=>{Qe.current=-1,h(void 0),b(void 0),Y(void 0),x(!1),l(void 0),c(void 0),m(void 0),f(!1),r(void 0),n(void 0)},[]),qe=a.useCallback((re,Le)=>{if(re.button===0){if(o!==void 0){if((V==null?void 0:V.hasIndex(o))===!0)for(const Se of V){if(Se===o)continue;const ue=ke[Se],Ne=Vo(ue,Qe.current,M,R);S==null||S(ue,Ne,Se,Ne+(ue.growOffset??0))}const Me=Vo(ke[o],Qe.current,M,R);if(W==null||W(ke[o],Me,o,Me+(ke[o].growOffset??0)),V.hasIndex(o))for(const Se of V){if(Se===o)continue;const ue=ke[Se],Ne=Vo(ue,Qe.current,M,R);W==null||W(ue,Ne,Se,Ne+(ue.growOffset??0))}}He(),i!==void 0&&s!==void 0&&(G==null||G(i,s)),g!==void 0&&y!==void 0&&(te==null||te(g,y))}Ke==null||Ke(re,Le)},[Ke,o,i,s,g,y,V,W,ke,M,R,S,G,te,He]),xe=a.useMemo(()=>{if(!(i===void 0||s===void 0)&&i!==s&&(ce==null?void 0:ce(i,s))!==!1)return{src:i,dest:s}},[i,s,ce]),dt=a.useCallback(re=>{const Le=ye==null?void 0:ye.current;if(i!==void 0&&w!==void 0)Math.abs(re.clientX-w)>20&&f(!0);else if(g!==void 0&&F!==void 0)Math.abs(re.clientY-F)>20&&x(!0);else if(o!==void 0&&t!==void 0&&Le){const Se=Le.getBoundingClientRect().width/Le.offsetWidth,ue=(re.clientX-t)/Se,Ne=ke[o],Fe=Vo(Ne,ue,M,R);if(S==null||S(Ne,Fe,o,Fe+(Ne.growOffset??0)),Qe.current=ue,(V==null?void 0:V.first())===o)for(const je of V){if(je===o)continue;const oe=ke[je],Ie=Vo(oe,Qe.current,M,R);S==null||S(oe,Ie,je,Ie+(oe.growOffset??0))}}},[i,w,g,F,o,t,ke,M,R,S,V,ye]),ot=a.useCallback((re,Le)=>{if(g===void 0||y===void 0)return H(re,Le);let[Me,Se]=re;return Se===y?Se=g:(Se>y&&(Se-=1),Se>=g&&(Se+=1)),H([Me,Se],Le)},[g,y,H]),rt=a.useCallback(re=>{U==null||U(re),re.defaultPrevented()||He()},[He,U]);return a.createElement(Rc,{accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,enableGroups:e.enableGroups,eventTargetRef:e.eventTargetRef,experimental:e.experimental,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,headerIcons:e.headerIcons,height:e.height,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,resizeColumn:o,isDraggable:e.isDraggable,isFilling:e.isFilling,isFocused:e.isFocused,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDrop:e.onDrop,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,resizeIndicator:e.resizeIndicator,verticalBorder:e.verticalBorder,width:e.width,getCellContent:ot,isResizing:o!==void 0,onHeaderMenuClick:tt,onHeaderIndicatorClick:ht,isDragging:u,onItemHovered:Ee,onDragStart:rt,onMouseDown:nt,allowResize:le,onMouseUp:qe,dragAndDropState:xe,onMouseMoveRaw:dt,ref:I})},Ic=Ec;function Dc(e){const t=a.useRef(null),[n,o]=a.useState({width:e==null?void 0:e[0],height:e==null?void 0:e[1]});return a.useLayoutEffect(()=>{const r=l=>{for(const s of l){const{width:c,height:u}=s&&s.contentRect||{};o(f=>f.width===c&&f.height===u?f:{width:c,height:u})}},i=new window.ResizeObserver(r);return t.current&&i.observe(t.current,void 0),()=>{i.disconnect()}},[t.current]),{ref:t,...n}}const Fc=(e,t,n)=>{const o=a.useRef(null),r=a.useRef(null),i=a.useRef(null),l=a.useRef(0),s=a.useRef(t);s.current=t;const c=n.current;a.useEffect(()=>{const u=()=>{var m,g;if(r.current===!1&&c!==null){const h=[c.scrollLeft,c.scrollTop];if(((m=i.current)==null?void 0:m[0])===h[0]&&((g=i.current)==null?void 0:g[1])===h[1])if(l.current>10){i.current=null,r.current=null;return}else l.current++;else l.current=0,s.current(h[0],h[1]),i.current=h;o.current=window.setTimeout(u,8.333333333333334)}},f=()=>{r.current=!0,i.current=null,o.current!==null&&(window.clearTimeout(o.current),o.current=null)},w=m=>{m.touches.length===0&&(r.current=!1,l.current=0,o.current=window.setTimeout(u,8.333333333333334))};if(e&&c!==null){const m=c;return m.addEventListener("touchstart",f),m.addEventListener("touchend",w),()=>{m.removeEventListener("touchstart",f),m.removeEventListener("touchend",w),o.current!==null&&window.clearTimeout(o.current)}}},[e,c])},Hc=Fc,Tc=()=>e=>e.isSafari?"scroll":"auto",Ac=tn("div")({name:"ScrollRegionStyle",class:"gdg-s1dgczr6",propsAsIs:!1,vars:{"s1dgczr6-0":[Tc()]}});function zc(e){const[t,n]=a.useState(!1),o=typeof window>"u"?null:window,r=a.useRef(0);return Nt("touchstart",a.useCallback(()=>{window.clearTimeout(r.current),n(!0)},[]),o,!0,!1),Nt("touchend",a.useCallback(i=>{i.touches.length===0&&(r.current=window.setTimeout(()=>n(!1),e))},[e]),o,!0,!1),t}const Bc=e=>{var le,ke;const{children:t,clientHeight:n,scrollHeight:o,scrollWidth:r,update:i,draggable:l,className:s,preventDiagonalScrolling:c=!1,paddingBottom:u=0,paddingRight:f=0,rightElement:w,rightElementProps:m,kineticScrollPerfHack:g=!1,scrollRef:h,initialSize:y}=e,b=[],C=(m==null?void 0:m.sticky)??!1,x=(m==null?void 0:m.fill)??!1,F=a.useRef(0),Y=a.useRef(0),N=a.useRef(null),z=typeof window>"u"?1:window.devicePixelRatio,H=a.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),G=a.useRef(null),S=zc(200),[$,W]=a.useState(!0),I=a.useRef(0);a.useLayoutEffect(()=>{if(!$||S||H.current.lockDirection===void 0)return;const be=N.current;if(be===null)return;const[V,Ee]=H.current.lockDirection;V!==void 0?be.scrollLeft=V:Ee!==void 0&&(be.scrollTop=Ee),H.current.lockDirection=void 0},[S,$]);const R=a.useCallback((be,V)=>{var rt;const Ee=N.current;if(Ee===null)return;V=V??Ee.scrollTop,be=be??Ee.scrollLeft;const ve=H.current.scrollTop,nt=H.current.scrollLeft,tt=be-nt,ht=V-ve;S&&tt!==0&&ht!==0&&(Math.abs(tt)>3||Math.abs(ht)>3)&&c&&H.current.lockDirection===void 0&&(H.current.lockDirection=Math.abs(tt)0&&(Math.abs(dt)>2e3||xe===0||xe===ot)&&o>Ee.scrollHeight+5){const re=xe/ot,Le=(o-qe)*re;F.current=Le-xe}Qe!==void 0&&(window.clearTimeout(I.current),W(!1),I.current=window.setTimeout(()=>W(!0),200)),i({x:be,y:xe+F.current,width:He-f,height:qe-u,paddingRight:((rt=G.current)==null?void 0:rt.clientWidth)??0})},[u,f,o,i,c,S]);Hc(g&&Ar.value,R,N);const M=a.useRef(R);M.current=R;const te=a.useRef(),ne=a.useRef(!1);a.useLayoutEffect(()=>{ne.current?R():ne.current=!0},[R,u,f]);const ce=a.useCallback(be=>{N.current=be,h!==void 0&&(h.current=be)},[h]);let me=0,Ke=0;for(b.push(a.createElement("div",{key:me++,style:{width:r,height:0}}));KeM.current(),0),te.current={width:U,height:ye}),(U??0)===0||(ye??0)===0?a.createElement("div",{ref:j}):a.createElement("div",{ref:j},a.createElement(Ac,{isSafari:Ar.value},a.createElement("div",{className:"dvn-underlay"},t),a.createElement("div",{ref:ce,style:te.current,draggable:l,onDragStart:be=>{l||(be.stopPropagation(),be.preventDefault())},className:"dvn-scroller "+(s??""),onScroll:()=>R()},a.createElement("div",{className:"dvn-scroll-inner"+(w===void 0?" dvn-hidden":"")},a.createElement("div",{className:"dvn-stack"},b),w!==void 0&&a.createElement(a.Fragment,null,!x&&a.createElement("div",{className:"dvn-spacer"}),a.createElement("div",{ref:G,style:{height:ye,maxHeight:n-Math.ceil(z%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:f,flexGrow:x?1:void 0,right:C?f??0:void 0,pointerEvents:"auto"}},w))))))},Lc=e=>{const{columns:t,rows:n,rowHeight:o,headerHeight:r,groupHeaderHeight:i,enableGroups:l,freezeColumns:s,experimental:c,nonGrowWidth:u,clientSize:f,className:w,onVisibleRegionChanged:m,scrollRef:g,preventDiagonalScrolling:h,rightElement:y,rightElementProps:b,overscrollX:C,overscrollY:x,initialSize:F,smoothScrollX:Y=!1,smoothScrollY:N=!1,isDraggable:z}=e,{paddingRight:H,paddingBottom:G}=c??{},[S,$]=f,W=a.useRef(),I=a.useRef(),R=a.useRef(),M=a.useRef(),te=u+Math.max(0,C??0);let ne=l?r+i:r;if(typeof o=="number")ne+=n*o;else for(let j=0;j{var ht,Qe;if(ce.current===void 0)return;const j={...ce.current};let U=0,ye=j.x<0?-j.x:0,le=0,ke=0;j.x=j.x<0?0:j.x;let be=0;for(let He=0;He=qe+He.width)U+=He.width,ke++,le++;else if(j.x>qe)U+=He.width,Y?ye+=qe-j.x:ke++,le++;else if(j.x+j.width>qe)U+=He.width,le++;else break}let V=0,Ee=0,ve=0;if(typeof o=="number")N?(Ee=Math.floor(j.y/o),V=Ee*o-j.y):Ee=Math.ceil(j.y/o),ve=Math.ceil(j.height/o)+Ee,V<0&&ve++;else{let He=0;for(let qe=0;qe=He+xe)He+=xe,Ee++,ve++;else if(j.y>dt)He+=xe,N?V+=dt-j.y:Ee++,ve++;else if(j.y+j.height>xe/2+He)He+=xe,ve++;else break}}const nt={x:ke,y:Ee,width:le-ke,height:ve-Ee},tt=W.current;(tt===void 0||tt.y!==nt.y||tt.x!==nt.x||tt.height!==nt.height||tt.width!==nt.width||I.current!==ye||R.current!==V||j.width!==((ht=M.current)==null?void 0:ht[0])||j.height!==((Qe=M.current)==null?void 0:Qe[1]))&&(m==null||m({x:ke,y:Ee,width:le-ke,height:ve-Ee},j.width,j.height,j.paddingRight??0,ye,V),W.current=nt,I.current=ye,R.current=V,M.current=[j.width,j.height])},[t,o,n,m,s,Y,N]),Ke=a.useCallback(j=>{ce.current=j,me()},[me]);return a.useEffect(()=>{me()},[me]),a.createElement(Bc,{scrollRef:g,className:w,kineticScrollPerfHack:c==null?void 0:c.kineticScrollPerfHack,preventDiagonalScrolling:h,draggable:z===!0||typeof z=="string",scrollWidth:te+(H??0),scrollHeight:ne+(G??0),clientHeight:$,rightElement:y,paddingBottom:G,paddingRight:H,rightElementProps:b,update:Ke,initialSize:F},a.createElement(Ic,{eventTargetRef:g,width:S,height:$,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,onColumnProposeMove:e.onColumnProposeMove,verticalBorder:e.verticalBorder,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator}))},Pc=Lc,Wc=tn("div")({name:"SearchWrapper",class:"gdg-seveqep",propsAsIs:!1}),$c=a.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},a.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),Oc=a.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},a.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),Nc=a.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},a.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),Xc=10,Yc=e=>{const{canvasRef:t,cellYOffset:n,rows:o,columns:r,searchInputRef:i,searchValue:l,searchResults:s,onSearchValueChange:c,getCellsForSelection:u,onSearchResultsChanged:f,showSearch:w=!1,onSearchClose:m}=e,[g]=a.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[h,y]=a.useState(""),b=l??h,C=a.useCallback(U=>{y(U),c==null||c(U)},[c]),[x,F]=a.useState(),Y=a.useRef(x);Y.current=x,a.useEffect(()=>{s!==void 0&&(s.length>0?F(U=>({rowsSearched:o,results:s.length,selectedIndex:(U==null?void 0:U.selectedIndex)??-1})):F(void 0))},[o,s]);const N=a.useRef();N.current===void 0&&(N.current=new AbortController);const z=a.useRef(),[H,G]=a.useState([]),S=s??H,$=a.useCallback(()=>{z.current!==void 0&&(window.cancelAnimationFrame(z.current),z.current=void 0,N.current.abort())},[]),W=a.useRef(n);W.current=n;const I=a.useCallback(U=>{const ye=new RegExp(U.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let le=W.current,ke=Math.min(10,o),be=0;F(void 0),G([]);const V=[],Ee=async()=>{var ot;if(u===void 0)return;const ve=performance.now(),nt=o-be;let tt=u({x:0,y:le,width:r.length,height:Math.min(ke,nt,o-le)},N.current.signal);typeof tt=="function"&&(tt=await tt());let ht=!1;for(const[rt,re]of tt.entries())for(const[Le,Me]of re.entries()){let Se;switch(Me.kind){case J.Text:case J.Number:Se=Me.displayData;break;case J.Uri:case J.Markdown:Se=Me.data;break;case J.Boolean:Se=typeof Me.data=="boolean"?Me.data.toString():void 0;break;case J.Image:case J.Bubble:Se=Me.data.join("🐳");break;case J.Custom:Se=Me.copyData;break}Se!==void 0&&ye.test(Se)&&(V.push([Le,rt+le]),ht=!0)}const Qe=performance.now();ht&&G([...V]),be+=tt.length,Qt(be<=o);const He=((ot=Y.current)==null?void 0:ot.selectedIndex)??-1;F({results:V.length,rowsSearched:be,selectedIndex:He}),f==null||f(V,He),le+ke>=o?le=0:le+=ke;const qe=Qe-ve,xe=Math.max(qe,1),dt=Xc/xe;ke=Math.ceil(ke*dt),be{var U;m==null||m(),F(void 0),G([]),f==null||f([],-1),$(),(U=t==null?void 0:t.current)==null||U.focus()},[$,t,m,f]),M=a.useCallback(U=>{C(U.target.value),s===void 0&&(U.target.value===""?(F(void 0),G([]),$()):I(U.target.value))},[I,$,C,s]);a.useEffect(()=>{w&&i.current!==null&&(C(""),i.current.focus({preventScroll:!0}))},[w,i,C]);const te=a.useCallback(U=>{var le;if((le=U==null?void 0:U.stopPropagation)==null||le.call(U),x===void 0)return;const ye=(x.selectedIndex+1)%x.results;F({...x,selectedIndex:ye}),f==null||f(S,ye)},[x,f,S]),ne=a.useCallback(U=>{var le;if((le=U==null?void 0:U.stopPropagation)==null||le.call(U),x===void 0)return;let ye=(x.selectedIndex-1)%x.results;ye<0&&(ye+=x.results),F({...x,selectedIndex:ye}),f==null||f(S,ye)},[f,S,x]),ce=a.useCallback(U=>{(U.ctrlKey||U.metaKey)&&U.nativeEvent.code==="KeyF"||U.key==="Escape"?(R(),U.stopPropagation(),U.preventDefault()):U.key==="Enter"&&(U.shiftKey?ne():te())},[R,te,ne]);a.useEffect(()=>()=>{$()},[$]);const[me,Ke]=a.useState(!1);a.useEffect(()=>{if(w)Ke(!0);else{const U=setTimeout(()=>Ke(!1),150);return()=>clearTimeout(U)}},[w]);const j=a.useMemo(()=>{if(!w&&!me)return null;let U;x!==void 0&&(U=x.results>=1e3?"over 1000":`${x.results} result${x.results!==1?"s":""}`,x.selectedIndex>=0&&(U=`${x.selectedIndex+1} of ${U}`));const ye=be=>{be.stopPropagation()},ke={width:`${Math.floor(((x==null?void 0:x.rowsSearched)??0)/o*100)}%`};return a.createElement(Wc,{className:w?"":"out",onMouseDown:ye,onMouseMove:ye,onMouseUp:ye,onClick:ye},a.createElement("div",{className:"gdg-search-bar-inner"},a.createElement("input",{id:g,"aria-hidden":!w,"data-testid":"search-input",ref:i,onChange:M,value:b,tabIndex:w?void 0:-1,onKeyDownCapture:ce}),a.createElement("button",{"aria-label":"Previous Result","aria-hidden":!w,tabIndex:w?void 0:-1,onClick:ne,disabled:((x==null?void 0:x.results)??0)===0},$c),a.createElement("button",{"aria-label":"Next Result","aria-hidden":!w,tabIndex:w?void 0:-1,onClick:te,disabled:((x==null?void 0:x.results)??0)===0},Oc),m!==void 0&&a.createElement("button",{"aria-label":"Close Search","aria-hidden":!w,"data-testid":"search-close-button",tabIndex:w?void 0:-1,onClick:R},Nc)),x!==void 0?a.createElement(a.Fragment,null,a.createElement("div",{className:"gdg-search-status"},a.createElement("div",{"data-testid":"search-result-area"},U)),a.createElement("div",{className:"gdg-search-progress",style:ke})):a.createElement("div",{className:"gdg-search-status"},a.createElement("label",{htmlFor:g},"Type to search")))},[w,me,x,o,g,i,M,b,ce,ne,te,m,R]);return a.createElement(a.Fragment,null,a.createElement(Pc,{prelightCells:S,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,className:e.className,clientSize:e.clientSize,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,nonGrowWidth:e.nonGrowWidth,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,initialSize:e.initialSize,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,onVisibleRegionChanged:e.onVisibleRegionChanged,overscrollX:e.overscrollX,overscrollY:e.overscrollY,preventDiagonalScrolling:e.preventDiagonalScrolling,rightElement:e.rightElement,rightElementProps:e.rightElementProps,rowHeight:e.rowHeight,rows:e.rows,scrollRef:e.scrollRef,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,onColumnProposeMove:e.onColumnProposeMove,drawFocusRing:e.drawFocusRing,drawCell:e.drawCell,drawHeader:e.drawHeader,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator}),j)},Gc=Yc;class Kc extends a.PureComponent{constructor(){super(...arguments);Oe(this,"wrapperRef",a.createRef());Oe(this,"clickOutside",n=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(n))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(n.target)){let o=n.target;for(;o!==null;){if(o.classList.contains("click-outside-ignore"))return;o=o.parentElement}this.props.onClickOutside()}})}componentDidMount(){document.addEventListener("touchend",this.clickOutside,!0),document.addEventListener("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener("touchend",this.clickOutside,!0),document.removeEventListener("mousedown",this.clickOutside,!0),document.removeEventListener("contextmenu",this.clickOutside,!0)}render(){const{onClickOutside:n,isOutsideClick:o,...r}=this.props;return a.createElement("div",{...r,ref:this.wrapperRef},this.props.children)}}const Uc=()=>e=>Math.max(16,e.targetHeight-10),_c=tn("input")({name:"RenameInput",class:"gdg-r17m35ur",propsAsIs:!1,vars:{"r17m35ur-0":[Uc(),"px"]}}),Vc=e=>{const{bounds:t,group:n,onClose:o,canvasBounds:r,onFinish:i}=e,[l,s]=yt.useState(n);return yt.createElement(Kc,{style:{position:"absolute",left:t.x-r.left+1,top:t.y-r.top,width:t.width-2,height:t.height},className:"gdg-c1tqibwd",onClickOutside:o},yt.createElement(_c,{targetHeight:t.height,"data-testid":"group-rename-input",value:l,onBlur:o,onFocus:c=>c.target.setSelectionRange(0,l.length),onChange:c=>s(c.target.value),onKeyDown:c=>{c.key==="Enter"?i(l):c.key==="Escape"&&o()},autoFocus:!0}))};function qc(e,t){return e===void 0?!1:e.length>1&&e.startsWith("_")?Number.parseInt(e.slice(1))===t.keyCode:e.length===1&&e>="a"&&e<="z"?e.toUpperCase().codePointAt(0)===t.keyCode:e===t.key}function Ae(e,t,n){const o=Jl(e,t);return o&&(n.didMatch=!0),o}function Jl(e,t){if(e.length===0)return!1;if(e.includes("|")){const c=e.split("|");for(const u of c)if(Jl(u,t))return!0;return!1}let n=!1,o=!1,r=!1,i=!1;const l=e.split("+"),s=l.pop();if(!qc(s,t))return!1;if(l[0]==="any")return!0;for(const c of l)switch(c){case"ctrl":n=!0;break;case"shift":o=!0;break;case"alt":r=!0;break;case"meta":i=!0;break;case"primary":zr.value?i=!0:n=!0;break}return t.altKey===r&&t.ctrlKey===n&&t.shiftKey===o&&t.metaKey===i}function jc(e,t,n,o,r,i){const l=yt.useCallback((u,f,w,m)=>{var x;(i==="cell"||i==="multi-cell")&&u!==void 0&&(u={...u,range:{x:u.cell[0],y:u.cell[1],width:1,height:1}});const g=n==="mixed"&&(w||m==="drag"),h=o==="mixed"&&g,y=r==="mixed"&&g;let b={current:u===void 0?void 0:{...u,rangeStack:m==="drag"?((x=e.current)==null?void 0:x.rangeStack)??[]:[]},columns:h?e.columns:lt.empty(),rows:y?e.rows:lt.empty()};w&&(i==="multi-rect"||i==="multi-cell")&&b.current!==void 0&&e.current!==void 0&&(b={...b,current:{...b.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),t(b,f)},[o,e,n,i,r,t]),s=yt.useCallback((u,f,w)=>{u=u??e.rows,f!==void 0&&(u=u.add(f));let m;if(r==="exclusive"&&u.length>0)m={current:void 0,columns:lt.empty(),rows:u};else{const g=w&&n==="mixed",h=w&&o==="mixed";m={current:g?e.current:void 0,columns:h?e.columns:lt.empty(),rows:u}}t(m,!1)},[o,e,n,r,t]),c=yt.useCallback((u,f,w)=>{u=u??e.columns,f!==void 0&&(u=u.add(f));let m;if(o==="exclusive"&&u.length>0)m={current:void 0,rows:lt.empty(),columns:u};else{const g=w&&n==="mixed",h=w&&r==="mixed";m={current:g?e.current:void 0,rows:h?e.rows:lt.empty(),columns:u}}t(m,!1)},[o,e,n,r,t]);return[l,s,c]}function Zc(e,t,n,o,r){const i=a.useCallback(u=>{if(e===!0){const f=[];for(let w=u.y;w=r?m.push({kind:J.Loading,allowOverlay:!1}):m.push(t([g,w]));f.push(m)}return f}return(e==null?void 0:e(u,o.signal))??[]},[o.signal,t,e,r]),l=e!==void 0?i:void 0,s=a.useCallback(u=>{if(l===void 0)return[];const f={...u,x:u.x-n};if(f.x<0){f.x=0,f.width--;const w=l(f,o.signal);return typeof w=="function"?async()=>(await w()).map(m=>[{kind:J.Loading,allowOverlay:!1},...m]):w.map(m=>[{kind:J.Loading,allowOverlay:!1},...m])}return l(f,o.signal)},[o.signal,l,n]);return[e!==void 0?s:void 0,l]}function Jc(e){if(e.copyData!==void 0)return{formatted:e.copyData,rawValue:e.copyData,format:"string"};switch(e.kind){case J.Boolean:return{formatted:e.data===!0?"TRUE":e.data===!1?"FALSE":e.data===bi?"INDETERMINATE":"",rawValue:e.data,format:"boolean"};case J.Custom:return{formatted:e.copyData,rawValue:e.copyData,format:"string"};case J.Image:case J.Bubble:return{formatted:e.data,rawValue:e.data,format:"string-array"};case J.Drilldown:return{formatted:e.data.map(t=>t.text),rawValue:e.data.map(t=>t.text),format:"string-array"};case J.Text:return{formatted:e.displayData??e.data,rawValue:e.data,format:"string"};case J.Uri:return{formatted:e.displayData??e.data,rawValue:e.data,format:"url"};case J.Markdown:case J.RowID:return{formatted:e.data,rawValue:e.data,format:"string"};case J.Number:return{formatted:e.displayData,rawValue:e.data,format:"number"};case J.Loading:return{formatted:"#LOADING",rawValue:"",format:"string"};case J.Protected:return{formatted:"************",rawValue:"",format:"string"};default:Qo()}}function Qc(e,t){return e.map((o,r)=>{const i=t[r];return o.map(l=>l.span!==void 0&&l.span[0]!==i?{formatted:"",rawValue:"",format:"string"}:Jc(l))})}function dl(e,t){return(t?/[\t\n",]/:/[\t\n"]/).test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}function ed(e){var n;const t=[];for(const o of e){const r=[];for(const i of o)i.format==="url"?r.push(((n=i.rawValue)==null?void 0:n.toString())??""):i.format==="string-array"?r.push(i.formatted.map(l=>dl(l,!0)).join(",")):r.push(dl(i.formatted,!1));t.push(r.join(" "))}return t.join(` +`)}function ai(e){return e.replace(/\t/g," ").replace(/ {2,}/g,t=>" ".repeat(t.length))}function ul(e){return'"'+e.replace(/&/g,"&").replace(/"/g,""").replace(//g,">")+'"'}function td(e){return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function nd(e){var n;const t=[];t.push('',"");for(const o of e){t.push("");for(const r of o){const i=`gdg-format="${r.format}"`;r.format==="url"?t.push(``):r.format==="string-array"?t.push(``):t.push(``)}t.push("")}return t.push("
${ai(r.formatted)}
    ${r.formatted.map((l,s)=>`
  1. `+ai(l)+"
  2. ").join("")}
${ai(r.formatted)}
"),t.join("")}function od(e,t){const n=Qc(e,t),o=ed(n),r=nd(n);return{textPlain:o,textHtml:r}}function fl(e){var l;const t=document.createElement("html");t.innerHTML=e.replace(/ /g," ");const n=t.querySelector("table");if(n===null)return;const o=[n],r=[];let i;for(;o.length>0;){const s=o.pop();if(s===void 0)break;if(s instanceof HTMLTableElement||s.nodeName==="TBODY")o.push(...[...s.children].reverse());else if(s instanceof HTMLTableRowElement)i!==void 0&&r.push(i),i=[],o.push(...[...s.children].reverse());else if(s instanceof HTMLTableCellElement){const c=s.cloneNode(!0),f=c.children.length===1&&c.children[0].nodeName==="P"?c.children[0]:null,w=(f==null?void 0:f.children.length)===1&&f.children[0].nodeName==="FONT",m=c.querySelectorAll("br");for(const y of m)y.replaceWith(` +`);const g=c.getAttribute("gdg-raw-value"),h=c.getAttribute("gdg-format")??"string";if(c.querySelector("a")!==null)i==null||i.push({rawValue:((l=c.querySelector("a"))==null?void 0:l.getAttribute("href"))??"",formatted:c.textContent??"",format:h});else if(c.querySelector("ol")!==null){const y=c.querySelectorAll("li");i==null||i.push({rawValue:[...y].map(b=>b.getAttribute("gdg-raw-value")??""),formatted:[...y].map(b=>b.textContent??""),format:"string-array"})}else if(g!==null)i==null||i.push({rawValue:td(g),formatted:c.textContent??"",format:h});else{let y=c.textContent??"";w&&(y=y.replace(/\n(?!\n)/g,"")),i==null||i.push({rawValue:y??"",formatted:y??"",format:h})}}}return i!==void 0&&r.push(i),r}function rd(e,t,n,o,r){var s;const i=e;if(o==="allowPartial"||e.current===void 0||t===void 0)return e;let l=!1;do{if((e==null?void 0:e.current)===void 0)break;const c=(s=e.current)==null?void 0:s.range,u=[];if(c.width>2){const m=t({x:c.x,y:c.y,width:1,height:c.height},r.signal);if(typeof m=="function")return i;u.push(...m);const g=t({x:c.x+c.width-1,y:c.y,width:1,height:c.height},r.signal);if(typeof g=="function")return i;u.push(...g)}else{const m=t({x:c.x,y:c.y,width:c.width,height:c.height},r.signal);if(typeof m=="function")return i;u.push(...m)}let f=c.x-n,w=c.x+c.width-1-n;for(const m of u)for(const g of m)g.span!==void 0&&(f=Math.min(g.span[0],f),w=Math.max(g.span[1],w));f===c.x-n&&w===c.x+c.width-1-n?l=!0:e={current:{cell:e.current.cell??[0,0],range:{x:f+n,y:c.y,width:w-f+1,height:c.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!l);return e}function hl(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function id(e){let t;(function(s){s[s.None=0]="None",s[s.inString=1]="inString",s[s.inStringPostQuote=2]="inStringPostQuote"})(t||(t={}));const n=[];let o=[],r=0,i=t.None;e=e.replace(/\r\n/g,` +`);let l=0;for(const s of e){switch(i){case t.None:s===" "||s===` +`?(o.push(e.slice(r,l)),r=l+1,s===` +`&&(n.push(o),o=[])):s==='"'&&(i=t.inString);break;case t.inString:s==='"'&&(i=t.inStringPostQuote);break;case t.inStringPostQuote:s==='"'?i=t.inString:((s===" "||s===` +`)&&(o.push(hl(e.slice(r,l))),r=l+1,s===` +`&&(n.push(o),o=[])),i=t.None);break}l++}return rs.map(c=>({rawValue:c,formatted:c,format:"string"})))}function gl(e,t,n){var s;const o=od(e,t),r=c=>{var u;(u=window.navigator.clipboard)==null||u.writeText(c)},i=(c,u)=>{var f;return((f=window.navigator.clipboard)==null?void 0:f.write)===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([c],{type:"text/plain"}),"text/html":new Blob([u],{type:"text/html"})})]),!0)},l=(c,u)=>{var f,w;try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");(f=n==null?void 0:n.clipboardData)==null||f.setData("text/plain",c),(w=n==null?void 0:n.clipboardData)==null||w.setData("text/html",u)}catch{i(c,u)||r(c)}};((s=window.navigator.clipboard)==null?void 0:s.write)!==void 0||(n==null?void 0:n.clipboardData)!==void 0?l(o.textPlain,o.textHtml):r(o.textPlain),n==null||n.preventDefault()}function Ql(e){return e!==!0}function ml(e){return typeof e=="string"?e:`${e}px`}const ld=()=>e=>e.innerWidth,sd=()=>e=>e.innerHeight,ad=tn("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[ld()],"wmyidgi-1":[sd()]}}),cd=e=>{const{inWidth:t,inHeight:n,children:o,...r}=e;return a.createElement(ad,{innerHeight:ml(n),innerWidth:ml(t),...r},o)},dd=2,ud=1300;function fd(e,t,n){const o=yt.useRef(0),[r,i]=e??[0,0];yt.useEffect(()=>{if(r===0&&i===0){o.current=0;return}let l=!1,s=0;const c=u=>{var f;if(!l){if(s===0)s=u;else{const w=u-s;o.current=Math.min(1,o.current+w/ud);const m=o.current**1.618*w*dd;(f=t.current)==null||f.scrollBy(r*m,i*m),s=u,n==null||n()}window.requestAnimationFrame(c)}};return window.requestAnimationFrame(c),()=>{l=!0}},[t,r,i,n])}function hd({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:o,overscrollX:r,overscrollY:i,scaleToRem:l,remSize:s}){const[c,u,f,w,m,g]=yt.useMemo(()=>{if(!l||s===16)return[e,t,n,o,r,i];const h=s/16,y=e,b=Wl();return[typeof y=="number"?y*h:C=>Math.ceil(y(C)*h),Math.ceil(t*h),Math.ceil(n*h),{...o,headerIconSize:((o==null?void 0:o.headerIconSize)??b.headerIconSize)*h,cellHorizontalPadding:((o==null?void 0:o.cellHorizontalPadding)??b.cellHorizontalPadding)*h,cellVerticalPadding:((o==null?void 0:o.cellVerticalPadding)??b.cellVerticalPadding)*h},Math.ceil((r??0)*h),Math.ceil((i??0)*h)]},[n,t,r,i,s,e,l,o]);return{rowHeight:c,headerHeight:u,groupHeaderHeight:f,theme:w,overscrollX:m,overscrollY:g}}const Un={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function ze(e,t){return e===!0?t:e===!1?"":e}function wl(e){const t=zr.value;return{activateCell:ze(e.activateCell," |Enter|shift+Enter"),clear:ze(e.clear,"any+Escape"),closeOverlay:ze(e.closeOverlay,"any+Escape"),acceptOverlayDown:ze(e.acceptOverlayDown,"Enter"),acceptOverlayUp:ze(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:ze(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:ze(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:ze(e.delete,t?"Backspace|Delete":"Delete"),downFill:ze(e.downFill,"primary+_68"),scrollToSelectedCell:ze(e.scrollToSelectedCell,"primary+Enter"),goDownCell:ze(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:ze(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:ze(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:ze(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:ze(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:ze(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:ze(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:ze(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:ze(e.goToFirstCell,"primary+Home"),goToFirstColumn:ze(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:ze(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:ze(e.goToLastCell,"primary+End"),goToLastColumn:ze(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:ze(e.goToLastRow,"primary+ArrowDown"),goToNextPage:ze(e.goToNextPage,"PageDown"),goToPreviousPage:ze(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:ze(e.rightFill,"primary+_82"),search:ze(e.search,"primary+f"),selectAll:ze(e.selectAll,"primary+a"),selectColumn:ze(e.selectColumn,"ctrl+ "),selectGrowDown:ze(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:ze(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:ze(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:ze(e.selectGrowUp,"shift+ArrowUp"),selectRow:ze(e.selectRow,"shift+ "),selectToFirstCell:ze(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:ze(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:ze(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:ze(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:ze(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:ze(e.selectToLastRow,"primary+shift+ArrowDown")}}function gd(e){const t=Js(e);return yt.useMemo(()=>{if(t===void 0)return wl(Un);const n={...t,goToNextPage:(t==null?void 0:t.goToNextPage)??(t==null?void 0:t.pageDown)??Un.goToNextPage,goToPreviousPage:(t==null?void 0:t.goToPreviousPage)??(t==null?void 0:t.pageUp)??Un.goToPreviousPage,goToFirstCell:(t==null?void 0:t.goToFirstCell)??(t==null?void 0:t.first)??Un.goToFirstCell,goToLastCell:(t==null?void 0:t.goToLastCell)??(t==null?void 0:t.last)??Un.goToLastCell,selectToFirstCell:(t==null?void 0:t.selectToFirstCell)??(t==null?void 0:t.first)??Un.selectToFirstCell,selectToLastCell:(t==null?void 0:t.selectToLastCell)??(t==null?void 0:t.last)??Un.selectToLastCell};return wl({...Un,...n})},[t])}function md(e){function t(o,r,i){if(typeof o=="number")return{headerIndex:o,isCollapsed:!1,depth:r,path:i};const l={headerIndex:o.headerIndex,isCollapsed:o.isCollapsed,depth:r,path:i};return o.subGroups!==void 0&&(l.subGroups=o.subGroups.map((s,c)=>t(s,r+1,[...i,c])).sort((s,c)=>s.headerIndex-c.headerIndex)),l}return e.map((o,r)=>t(o,0,[r])).sort((o,r)=>o.headerIndex-r.headerIndex)}function Ri(e,t){const n=[];function o(l,s,c=!1){let u=s!==null?s-l.headerIndex:t-l.headerIndex;if(l.subGroups!==void 0&&(u=l.subGroups[0].headerIndex-l.headerIndex),u--,n.push({headerIndex:l.headerIndex,contentIndex:-1,skip:c,isCollapsed:l.isCollapsed,depth:l.depth,path:l.path,rows:u}),l.subGroups)for(let f=0;fl.skip===!1).map(l=>{const{skip:s,...c}=l;return c})}function Lr(e,t){if(t===void 0||Ri.length===0)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let n=e;for(const o of t){if(n===0)return{path:[...o.path,-1],originalIndex:o.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:o.rows};if(n--,!o.isCollapsed){if(ne===void 0?void 0:Ri(e,t),[e,t]),i=yt.useMemo(()=>r===void 0?t:r.reduce((u,f)=>u+(f.isCollapsed?1:f.rows+1),0),[r,t]),l=yt.useMemo(()=>e===void 0||typeof n=="number"&&e.height===n?n:u=>{const{isGroupHeader:f}=Lr(u,r);return f?e.height:typeof n=="number"?n:n(u)},[r,e,n]),s=yt.useCallback(u=>{if(r===void 0)return u;let f=u;for(const w of r){if(f===0)return;if(f--,!w.isCollapsed){if(f{if(e===void 0)return o==null?void 0:o(u,u,u);if(o===void 0&&(e==null?void 0:e.themeOverride)===void 0)return;const{isGroupHeader:f,contentIndex:w,groupIndex:m}=Lr(u,r);return f?e.themeOverride:o==null?void 0:o(u,m,w)},[r,o,e]));return e===void 0?{rowHeight:l,rows:t,rowNumberMapper:s,getRowThemeOverride:c}:{rowHeight:l,rows:i,rowNumberMapper:s,getRowThemeOverride:c}}function yd(e,t){const n=yt.useMemo(()=>e===void 0?void 0:Ri(e,t),[e,t]);return{getRowGroupingForPath:ts,updateRowGroupingByPath:es,mapper:yt.useCallback(o=>{if(typeof o=="number")return Lr(o,n);const r=Lr(o[1],n);return{...r,originalIndex:[o[0],r.originalIndex]}},[n])}}function es(e,t,n){const[o,...r]=t;return r[0]===-1?e.map((i,l)=>l===o?{...i,...n}:i):e.map((i,l)=>l===o?{...i,subGroups:es(i.subGroups??[],r,n)}:i)}function ts(e,t){const[n,...o]=t;return o[0]===-1?e[n]:ts(e[n].subGroups??[],o)}function bd(e,t){const n=a.useRef(e),o=a.useRef(t);return o.current=t,a.useMemo(()=>({get current(){return n.current},set current(r){n.current!==r&&(n.current=r,o.current(r))}}),[])}function pd(e,t,n,o,r){const[i,l]=a.useMemo(()=>[t!==void 0&&typeof n=="number"?Math.floor(t/n):0,t!==void 0&&typeof n=="number"?-(t%n):0],[t,n]),s=a.useMemo(()=>({x:o.current.x,y:i,width:o.current.width??1,height:o.current.height??1,ty:l}),[o,l,i]),[c,u,f]=Zs(s),w=a.useRef(r);w.current=r;const m=bd(null,y=>{y!==null&&t!==void 0?y.scrollTop=t:y!==null&&e!==void 0&&(y.scrollLeft=e)}),g=(c.height??1)>1;a.useLayoutEffect(()=>{if(t!==void 0&&m.current!==null&&g){if(m.current.scrollTop===t)return;m.current.scrollTop=t,m.current.scrollTop!==t&&f(),w.current()}},[t,g,f,m]);const h=(c.width??1)>1;return a.useLayoutEffect(()=>{if(e!==void 0&&m.current!==null&&h){if(m.current.scrollLeft===e)return;m.current.scrollLeft=e,m.current.scrollLeft!==e&&f(),w.current()}},[e,h,f,m]),{visibleRegion:c,setVisibleRegion:u,scrollRef:m}}const vd=a.lazy(async()=>await vl(()=>import("./data-grid-overlay-editor-LE8GSUsC.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url));let Cd=0;function xd(e){return $s(Ki(Ki(e).filter(t=>t.span!==void 0).map(t=>{var n,o;return so((((n=t.span)==null?void 0:n[0])??0)+1,(((o=t.span)==null?void 0:o[1])??0)+1)})))}function Er(e,t){return e===void 0||t===0||e.columns.length===0&&e.current===void 0?e:{current:e.current===void 0?void 0:{cell:[e.current.cell[0]+t,e.current.cell[1]],range:{...e.current.range,x:e.current.range.x+t},rangeStack:e.current.rangeStack.map(n=>({...n,x:n.x+t}))},rows:e.rows,columns:e.columns.offset(t)}}const Ir={kind:J.Loading,allowOverlay:!1},Dr={columns:lt.empty(),rows:lt.empty(),current:void 0},kd=(e,t)=>{var Xi,Yi,Gi;const[n,o]=a.useState(Dr),[r,i]=a.useState(),l=a.useRef(null),s=a.useRef(null),[c,u]=a.useState(),f=a.useRef(),w=typeof window>"u"?null:window,{imageEditorOverride:m,getRowThemeOverride:g,markdownDivCreateNode:h,width:y,height:b,columns:C,rows:x,getCellContent:F,onCellClicked:Y,onCellActivated:N,onFillPattern:z,onFinishedEditing:H,coercePasteValue:G,drawHeader:S,drawCell:$,editorBloom:W,onHeaderClicked:I,onColumnProposeMove:R,spanRangeBehavior:M="default",onGroupHeaderClicked:te,onCellContextMenu:ne,className:ce,onHeaderContextMenu:me,getCellsForSelection:Ke,onGroupHeaderContextMenu:j,onGroupHeaderRenamed:U,onCellEdited:ye,onCellsEdited:le,onSearchResultsChanged:ke,searchResults:be,onSearchValueChange:V,searchValue:Ee,onKeyDown:ve,onKeyUp:nt,keybindings:tt,editOnType:ht=!0,onRowAppended:Qe,onColumnMoved:He,validateCell:qe,highlightRegions:xe,rangeSelect:dt="rect",columnSelect:ot="multi",rowSelect:rt="multi",rangeSelectionBlending:re="exclusive",columnSelectionBlending:Le="exclusive",rowSelectionBlending:Me="exclusive",onDelete:Se,onDragStart:ue,onMouseMove:Ne,onPaste:Fe,copyHeaders:je=!1,freezeColumns:oe=0,cellActivationBehavior:Ie="second-click",rowSelectionMode:et="auto",onHeaderMenuClick:Pe,onHeaderIndicatorClick:Ue,getGroupDetails:ut,rowGrouping:Xe,onSearchClose:Te,onItemHovered:bt,onSelectionCleared:pt,showSearch:Kt,onVisibleRegionChanged:gt,gridSelection:Dt,onGridSelectionChange:Ft,minColumnWidth:An=50,maxColumnWidth:zn=500,maxColumnAutoWidth:at,provideEditor:Sn,trailingRowOptions:Be,freezeTrailingRows:Ze=0,allowedFillDirections:$t="orthogonal",scrollOffsetX:Mn,scrollOffsetY:nn,verticalBorder:Ot,onDragOverCell:Ve,onDrop:kt,onColumnResize:st,onColumnResizeEnd:Xt,onColumnResizeStart:At,customRenderers:qt,fillHandle:Ho,drawFocusRing:vt=!0,experimental:Ht,fixedShadowX:Tt,fixedShadowY:Lt,headerIcons:Rn,imageWindowLoader:or,initialSize:Bn,isDraggable:En,onDragLeave:In,onRowMoved:bn,overscrollX:rr,overscrollY:ir,preventDiagonalScrolling:uo,rightElement:fo,rightElementProps:ho,trapFocus:Zn=!1,smoothScrollX:Jn,smoothScrollY:Ln,scaleToRem:$r=!1,rowHeight:lr=34,headerHeight:sr=36,groupHeaderHeight:Or=sr,theme:go,isOutsideClick:Pn,renderers:To,resizeIndicator:Nr}=e,Pt=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,Ut=(Pt==null?void 0:Pt.kind)??e.rowMarkers??"none",mo=(Pt==null?void 0:Pt.width)??e.rowMarkerWidth,Xr=(Pt==null?void 0:Pt.startIndex)??e.rowMarkerStartIndex??1,Ao=(Pt==null?void 0:Pt.theme)??e.rowMarkerTheme,Wn=(Pt==null?void 0:Pt.checkboxStyle)??"square",Dn=Math.max(An,20),$n=Math.max(zn,Dn),On=Math.max(at??$n,Dn),Fn=a.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:pe,rowNumberMapper:Nn,rowHeight:zo,getRowThemeOverride:on}=wd(Xe,x,lr,g),ar=a.useMemo(()=>Number.parseFloat(Fn.fontSize),[Fn]),{rowHeight:dn,headerHeight:Bo,groupHeaderHeight:cr,theme:Lo,overscrollX:dr,overscrollY:ur}=hd({groupHeaderHeight:Or,headerHeight:sr,overscrollX:rr,overscrollY:ir,remSize:ar,rowHeight:zo,scaleToRem:$r,theme:go}),un=gd(tt),Xn=mo??(x>1e4?48:x>1e3?44:x>100?36:32),rn=Ut!=="none",T=rn?1:0,mt=Qe!==void 0,Qn=(Be==null?void 0:Be.sticky)===!0,[Po,fr]=a.useState(!1),Yr=Kt??Po,Gr=a.useCallback(()=>{Te!==void 0?Te():fr(!1)},[Te]),B=a.useMemo(()=>Dt===void 0?void 0:Er(Dt,T),[Dt,T])??n,zt=a.useRef();zt.current===void 0&&(zt.current=new AbortController),a.useEffect(()=>()=>zt==null?void 0:zt.current.abort(),[]);const[St,Wo]=Zc(Ke,F,T,zt.current,pe),Kr=a.useCallback((d,v,p)=>{if(qe===void 0)return!0;const D=[d[0]-T,d[1]];return qe==null?void 0:qe(D,v,p)},[T,qe]),Hn=a.useRef(Dt),_t=a.useCallback((d,v)=>{v&&(d=rd(d,St,T,M,zt.current)),Ft!==void 0?(Hn.current=Er(d,-T),Ft(Hn.current)):o(d)},[Ft,St,T,M]),fn=lo(st,a.useCallback((d,v,p,D)=>{st==null||st(C[p-T],v,p-T,D)},[st,T,C])),Ur=lo(Xt,a.useCallback((d,v,p,D)=>{Xt==null||Xt(C[p-T],v,p-T,D)},[Xt,T,C])),_r=lo(At,a.useCallback((d,v,p,D)=>{At==null||At(C[p-T],v,p-T,D)},[At,T,C])),k=lo(S,a.useCallback((d,v)=>(S==null?void 0:S({...d,columnIndex:d.columnIndex-T},v))??!1,[S,T])),K=lo($,a.useCallback((d,v)=>($==null?void 0:$({...d,col:d.col-T},v))??!1,[$,T])),se=a.useCallback(d=>{if(Se!==void 0){const v=Se(Er(d,-T));return typeof v=="boolean"?v:Er(v,T)}return!0},[Se,T]),[Z,_,q]=jc(B,_t,re,Le,Me,dt),de=a.useMemo(()=>Vn(Wl(),Lo),[Lo]),[Re,fe]=a.useState([0,0,0]),Mt=a.useMemo(()=>{if(To===void 0)return{};const d={};for(const v of To)d[v.kind]=v;return d},[To]),ie=a.useCallback(d=>d.kind!==J.Custom?Mt[d.kind]:qt==null?void 0:qt.find(v=>v.isMatch(d)),[qt,Mt]);let{sizedColumns:De,nonGrowWidth:Ye}=ka(C,pe,Wo,Re[0]-(T===0?0:Xn)-Re[2],Dn,On,de,ie,zt.current);Ut!=="none"&&(Ye+=Xn);const We=a.useMemo(()=>De.some(d=>d.group!==void 0),[De]),wt=We?Bo+cr:Bo,Vt=B.rows.length,Ct=Ut==="none"?void 0:Vt===0?!1:Vt===pe?!0:void 0,$e=a.useMemo(()=>Ut==="none"?De:[{title:"",width:Xn,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Ao,rowMarker:Wn,rowMarkerChecked:Ct},...De],[Ut,De,Xn,Ao,Wn,Ct]),xt=a.useRef({height:1,width:1,x:0,y:0}),Yt=a.useRef(!1),{setVisibleRegion:it,visibleRegion:Bt,scrollRef:_e}=pd(Mn,nn,dn,xt,()=>Yt.current=!0);xt.current=Bt;const eo=Bt.x+T,jt=Bt.y,Wt=a.useRef(null),Rt=a.useCallback(d=>{var v;d===!0?(v=Wt.current)==null||v.focus():window.requestAnimationFrame(()=>{var p;(p=Wt.current)==null||p.focus()})},[]),Gt=mt?pe+1:pe,ln=a.useCallback(d=>{const v=T===0?d:d.map(D=>({...D,location:[D.location[0]-T,D.location[1]]})),p=le==null?void 0:le(v);if(p!==!0)for(const D of v)ye==null||ye(D.location,D.value);return p},[ye,le,T]),[to,Vr]=a.useState(),hr=B.current!==void 0&&B.current.range.width*B.current.range.height>1?B.current.range:void 0,wo=vt?(Xi=B.current)==null?void 0:Xi.cell:void 0,gr=wo==null?void 0:wo[0],mr=wo==null?void 0:wo[1],ns=a.useMemo(()=>{if((xe===void 0||xe.length===0)&&(hr??gr??mr??to)===void 0)return;const d=[];if(xe!==void 0)for(const v of xe){const p=$e.length-v.range.x-T;p>0&&d.push({color:v.color,range:{...v.range,x:v.range.x+T,width:Math.min(p,v.range.width)},style:v.style})}return to!==void 0&&d.push({color:ao(de.accentColor,0),range:to,style:"dashed"}),hr!==void 0&&d.push({color:ao(de.accentColor,.5),range:hr,style:"solid-outline"}),gr!==void 0&&mr!==void 0&&d.push({color:de.accentColor,range:{x:gr,y:mr,width:1,height:1},style:"solid-outline"}),d.length>0?d:void 0},[to,hr,gr,mr,xe,$e.length,de.accentColor,T]),Ii=a.useRef($e);Ii.current=$e;const Zt=a.useCallback(([d,v],p=!1)=>{var P,A,L,O,X,Q,he;const D=mt&&v===Gt-1;if(d===0&&rn){if(D)return Ir;const ee=Nn(v);return ee===void 0?Ir:{kind:cn.Marker,allowOverlay:!1,checkboxStyle:Wn,checked:(B==null?void 0:B.rows.hasIndex(v))===!0,markerKind:Ut==="clickable-number"?"number":Ut,row:Xr+ee,drawHandle:bn!==void 0,cursor:Ut==="clickable-number"?"pointer":void 0}}else if(D){const we=d===T?(Be==null?void 0:Be.hint)??"":"",ae=Ii.current[d];if(((P=ae==null?void 0:ae.trailingRowOptions)==null?void 0:P.disabled)===!0)return Ir;{const Ge=((A=ae==null?void 0:ae.trailingRowOptions)==null?void 0:A.hint)??we,Ce=((L=ae==null?void 0:ae.trailingRowOptions)==null?void 0:L.addIcon)??(Be==null?void 0:Be.addIcon);return{kind:cn.NewRow,hint:Ge,allowOverlay:!1,icon:Ce}}}else{const ee=d-T;if(p||(Ht==null?void 0:Ht.strict)===!0){const ae=xt.current,Ge=ae.x>ee||ee>ae.x+ae.width||ae.y>v||v>ae.y+ae.height||v>=jr.current,Ce=ee===((X=(O=ae.extras)==null?void 0:O.selected)==null?void 0:X[0])&&v===((Q=ae.extras)==null?void 0:Q.selected[1]);let ge=!1;if(((he=ae.extras)==null?void 0:he.freezeRegions)!==void 0){for(const Je of ae.extras.freezeRegions)if(Ro(Je,ee,v)){ge=!0;break}}if(Ge&&!Ce&&!ge)return Ir}let we=F([ee,v]);return T!==0&&we.span!==void 0&&(we={...we,span:[we.span[0]+T,we.span[1]+T]}),we}},[mt,Gt,rn,Nn,Wn,B==null?void 0:B.rows,Ut,Xr,bn,T,Be==null?void 0:Be.hint,Be==null?void 0:Be.addIcon,Ht==null?void 0:Ht.strict,F]),qr=a.useCallback(d=>{let v=(ut==null?void 0:ut(d))??{name:d};return U!==void 0&&d!==""&&(v={icon:v.icon,name:v.name,overrideTheme:v.overrideTheme,actions:[...v.actions??[],{title:"Rename",icon:"renameIcon",onClick:p=>Jr({group:v.name,bounds:p.bounds})}]}),v},[ut,U]),wr=a.useCallback(d=>{var L;const[v,p]=d.cell,D=$e[v],E=(D==null?void 0:D.group)!==void 0?(L=qr(D.group))==null?void 0:L.overrideTheme:void 0,P=D==null?void 0:D.themeOverride,A=on==null?void 0:on(p);i({...d,theme:Vn(de,E,P,A,d.content.themeOverride)})},[on,$e,qr,de]),yo=a.useCallback((d,v,p)=>{var A;if(B.current===void 0)return;const[D,E]=B.current.cell,P=Zt([D,E]);if(P.kind!==J.Boolean&&P.allowOverlay){let L=P;if(p!==void 0)switch(L.kind){case J.Number:{const O=Ns(()=>p==="-"?-0:Number.parseFloat(p),0);L={...L,data:Number.isNaN(O)?0:O};break}case J.Text:case J.Markdown:case J.Uri:L={...L,data:p};break}wr({target:d,content:L,initialValue:p,cell:[D,E],highlight:p===void 0,forceEditMode:p!==void 0})}else P.kind===J.Boolean&&v&&P.readonly!==!0&&(ln([{location:B.current.cell,value:{...P,data:Ql(P.data)}}]),(A=Wt.current)==null||A.damage([{cell:B.current.cell}]))},[Zt,B,ln,wr]),Di=a.useCallback((d,v)=>{var E;const p=(E=Wt.current)==null?void 0:E.getBounds(d,v);if(p===void 0||_e.current===null)return;const D=Zt([d,v]);D.allowOverlay&&wr({target:p,content:D,initialValue:void 0,highlight:!0,cell:[d,v],forceEditMode:!0})},[Zt,_e,wr]),Et=a.useCallback((d,v,p="both",D=0,E=0,P=void 0)=>{if(_e.current!==null){const A=Wt.current,L=s.current,O=typeof d!="number"?d.unit==="cell"?d.amount:void 0:d,X=typeof v!="number"?v.unit==="cell"?v.amount:void 0:v,Q=typeof d!="number"&&d.unit==="px"?d.amount:void 0,he=typeof v!="number"&&v.unit==="px"?v.amount:void 0;if(A!==null&&L!==null){let ee={x:0,y:0,width:0,height:0},we=0,ae=0;if((O!==void 0||X!==void 0)&&(ee=A.getBounds((O??0)+T,X??0)??ee,ee.width===0||ee.height===0))return;const Ge=L.getBoundingClientRect(),Ce=Ge.width/L.offsetWidth;if(Q!==void 0&&(ee={...ee,x:Q-Ge.left-_e.current.scrollLeft,width:1}),he!==void 0&&(ee={...ee,y:he+Ge.top-_e.current.scrollTop,height:1}),ee!==void 0){const ge={x:ee.x-D,y:ee.y-E,width:ee.width+2*D,height:ee.height+2*E};let Je=0;for(let ri=0;ri0&&(ft=co(Gt,It,dn));let mn=Je*Ce+Ge.left+T*Xn*Ce,vn=Ge.right,wn=Ge.top+wt*Ce,Cn=Ge.bottom-ft*Ce;const kr=ee.width+D*2;switch(P==null?void 0:P.hAlign){case"start":vn=mn+kr;break;case"end":mn=vn-kr;break;case"center":mn=Math.floor((mn+vn)/2)-kr/2,vn=mn+kr;break}const Sr=ee.height+E*2;switch(P==null?void 0:P.vAlign){case"start":Cn=wn+Sr;break;case"end":wn=Cn-Sr;break;case"center":wn=Math.floor((wn+Cn)/2)-Sr/2,Cn=wn+Sr;break}mn>ge.x?we=ge.x-mn:vnge.y?ae=ge.y-wn:Cn=Gt-It)&&(ae=0),(we!==0||ae!==0)&&(Ce!==1&&(we/=Ce,ae/=Ce),_e.current.scrollTo(we+_e.current.scrollLeft,ae+_e.current.scrollTop))}}}},[T,Ze,Xn,_e,wt,oe,De,Gt,Qn,dn]),Fi=a.useRef(Di),Hi=a.useRef(F),jr=a.useRef(pe);Fi.current=Di,Hi.current=F,jr.current=pe;const bo=a.useCallback(async(d,v=!0)=>{var O;const p=$e[d];if(((O=p==null?void 0:p.trailingRowOptions)==null?void 0:O.disabled)===!0)return;const D=Qe==null?void 0:Qe();let E,P=!0;D!==void 0&&(E=await D,E==="top"&&(P=!1),typeof E=="number"&&(P=!1));let A=0;const L=()=>{if(jr.current<=pe){A<500&&window.setTimeout(L,A),A=50+A*2;return}const X=typeof E=="number"?E:P?pe:0;xr.current(d-T,X),Z({cell:[d,X],range:{x:d,y:X,width:1,height:1}},!1,!1,"edit");const Q=Hi.current([d-T,X]);Q.allowOverlay&&qo(Q)&&Q.readonly!==!0&&v&&window.setTimeout(()=>{Fi.current(d,X)},0)};L()},[$e,Qe,T,pe,Z]),yr=a.useCallback(d=>{var p,D;const v=((D=(p=De[d])==null?void 0:p.trailingRowOptions)==null?void 0:D.targetColumn)??(Be==null?void 0:Be.targetColumn);if(typeof v=="number")return v+(rn?1:0);if(typeof v=="object"){const E=C.indexOf(v);if(E>=0)return E+(rn?1:0)}},[De,C,rn,Be==null?void 0:Be.targetColumn]),Yn=a.useRef(),po=a.useRef(),$o=a.useCallback((d,v)=>{var E;const[p,D]=v;return Vn(de,(E=$e[p])==null?void 0:E.themeOverride,on==null?void 0:on(D),d.themeOverride)},[on,$e,de]),{mapper:no}=yd(Xe,x),hn=Xe==null?void 0:Xe.navigationBehavior,Oo=a.useCallback(d=>{var Q,he,ee;const v=zr.value?d.metaKey:d.ctrlKey,p=v&&rt==="multi",D=v&&ot==="multi",[E,P]=d.location,A=B.columns,L=B.rows,[O,X]=((Q=B.current)==null?void 0:Q.cell)??[];if(d.kind==="cell"){if(po.current=void 0,oo.current=[E,P],E===0&&rn){if(mt===!0&&P===pe||Ut==="number"||rt==="none")return;const we=Zt(d.location);if(we.kind!==cn.Marker)return;if(bn!==void 0){const Ce=ie(we);Qt((Ce==null?void 0:Ce.kind)===cn.Marker);const ge=(he=Ce==null?void 0:Ce.onClick)==null?void 0:he.call(Ce,{...d,cell:we,posX:d.localEventX,posY:d.localEventY,bounds:d.bounds,theme:$o(we,d.location),preventDefault:()=>{}});if(ge===void 0||ge.checked===we.checked)return}i(void 0),Rt();const ae=L.hasIndex(P),Ge=Yn.current;if(rt==="multi"&&(d.shiftKey||d.isLongTouch===!0)&&Ge!==void 0&&L.hasIndex(Ge)){const Ce=[Math.min(Ge,P),Math.max(Ge,P)+1];p||et==="multi"?_(void 0,Ce,!0):_(lt.fromSingleSelection(Ce),void 0,p)}else p||d.isTouch||et==="multi"?ae?_(L.remove(P),void 0,!0):(_(void 0,P,!0),Yn.current=P):ae&&L.length===1?_(lt.empty(),void 0,v):(_(lt.fromSingleSelection(P),void 0,v),Yn.current=P)}else if(E>=T&&mt&&P===pe){const we=yr(E);bo(we??E)}else if(O!==E||X!==P){const we=Zt(d.location),ae=ie(we);if((ae==null?void 0:ae.onSelect)!==void 0){let ge=!1;if(ae.onSelect({...d,cell:we,posX:d.localEventX,posY:d.localEventY,bounds:d.bounds,preventDefault:()=>ge=!0,theme:$o(we,d.location)}),ge)return}if(hn==="block"&&no(P).isGroupHeader)return;const Ge=Qn&&P===pe,Ce=Qn&&B!==void 0&&((ee=B.current)==null?void 0:ee.cell[1])===pe;if((d.shiftKey||d.isLongTouch===!0)&&O!==void 0&&X!==void 0&&B.current!==void 0&&!Ce){if(Ge)return;const ge=Math.min(E,O),Je=Math.max(E,O),ft=Math.min(P,X),It=Math.max(P,X);Z({...B.current,range:{x:ge,y:ft,width:Je-ge+1,height:It-ft+1}},!0,v,"click"),Yn.current=void 0,Rt()}else Z({cell:[E,P],range:{x:E,y:P,width:1,height:1}},!0,v,"click"),Yn.current=void 0,i(void 0),Rt()}}else if(d.kind==="header")if(oo.current=[E,P],i(void 0),rn&&E===0)Yn.current=void 0,po.current=void 0,rt==="multi"&&(L.length!==pe?_(lt.fromSingleSelection([0,pe]),void 0,v):_(lt.empty(),void 0,v),Rt());else{const we=po.current;if(ot==="multi"&&(d.shiftKey||d.isLongTouch===!0)&&we!==void 0&&A.hasIndex(we)){const ae=[Math.min(we,E),Math.max(we,E)+1];D?q(void 0,ae,v):q(lt.fromSingleSelection(ae),void 0,v)}else D?(A.hasIndex(E)?q(A.remove(E),void 0,v):q(void 0,E,v),po.current=E):ot!=="none"&&(q(lt.fromSingleSelection(E),void 0,v),po.current=E);Yn.current=void 0,Rt()}else d.kind===Jt?oo.current=[E,P]:d.kind===Br&&!d.isMaybeScrollbar&&(_t(Dr,!1),i(void 0),Rt(),pt==null||pt(),Yn.current=void 0,po.current=void 0)},[rt,ot,B,rn,T,mt,pe,Ut,Zt,bn,Rt,et,ie,$o,_,yr,bo,hn,no,Qn,Z,q,_t,pt]),No=a.useRef(!1),oo=a.useRef(),Ti=a.useRef(Bt),sn=a.useRef(),os=a.useCallback(d=>{if(vo.current=!1,Ti.current=xt.current,d.button!==0&&d.button!==1){sn.current=void 0;return}const v=performance.now();sn.current={button:d.button,time:v,location:d.location},(d==null?void 0:d.kind)==="header"&&(No.current=!0);const p=d.kind==="cell"&&d.isFillHandle;!p&&d.kind!=="cell"&&d.isEdge||(u({previousSelection:B,fillHandle:p}),oo.current=void 0,!d.isTouch&&d.button===0&&!p?Oo(d):!d.isTouch&&d.button===1&&(oo.current=d.location))},[B,Oo]),[Zr,Jr]=a.useState(),Ai=a.useCallback(d=>{if(d.kind!==Jt||ot!=="multi")return;const v=zr.value?d.metaKey:d.ctrlKey,[p]=d.location,D=B.columns;if(p=T&&er(E.group,$e[L].group);L--)P--;for(let L=p+1;L<$e.length&&er(E.group,$e[L].group);L++)A++;if(Rt(),v)if(D.hasAll([P,A+1])){let L=D;for(let O=P;O<=A;O++)L=L.remove(O);q(L,void 0,v)}else q(void 0,[P,A+1],v);else q(lt.fromSingleSelection([P,A+1]),void 0,v)},[ot,Rt,B.columns,$e,T,q]),vo=a.useRef(!1),br=a.useCallback(async d=>{if(St!==void 0&&fn!==void 0){const v=xt.current.y,p=xt.current.height;let D=St({x:d,y:v,width:1,height:Math.min(p,pe-v)},zt.current.signal);typeof D!="object"&&(D=await D());const E=De[d-T],A=document.createElement("canvas").getContext("2d",{alpha:!1});if(A!==null){A.font=de.baseFontFull;const L=Ol(A,de,E,0,D,Dn,$n,!1,ie);fn==null||fn(E,L.width,d,L.width)}}},[De,St,$n,de,Dn,fn,T,pe,ie]),[rs,Qr]=a.useState(),Co=a.useCallback(async(d,v)=>{var L,O;const p=(L=d.current)==null?void 0:L.range;if(p===void 0||St===void 0||v.current===void 0)return;const D=v.current.range;if(z!==void 0){let X=!1;if(z({fillDestination:{...D,x:D.x-T},patternSource:{...p,x:p.x-T},preventDefault:()=>X=!0}),X)return}let E=St(p,zt.current.signal);typeof E!="object"&&(E=await E());const P=E,A=[];for(let X=0;X({cell:X.location})))},[St,ln,z,T]),zi=a.useCallback(()=>{if(B.current===void 0||B.current.range.width<=1)return;const d={...B,current:{...B.current,range:{...B.current.range,width:1}}};Co(d,B)},[Co,B]),Bi=a.useCallback(()=>{if(B.current===void 0||B.current.range.height<=1)return;const d={...B,current:{...B.current,range:{...B.current.range,height:1}}};Co(d,B)},[Co,B]),is=a.useCallback((d,v)=>{var Q,he;const p=c;if(u(void 0),Vr(void 0),Qr(void 0),No.current=!1,v)return;if((p==null?void 0:p.fillHandle)===!0&&B.current!==void 0&&((Q=p.previousSelection)==null?void 0:Q.current)!==void 0){if(to===void 0)return;const ee={...B,current:{...B.current,range:Kl(p.previousSelection.current.range,to)}};Co(p.previousSelection,ee),_t(ee,!0);return}const[D,E]=d.location,[P,A]=oo.current??[],L=()=>{vo.current=!0},O=ee=>{var ae,Ge,Ce;const we=ee.isTouch||P===D&&A===E;if(we&&(Y==null||Y([D-T,E],{...ee,preventDefault:L})),ee.button===1)return!vo.current;if(!vo.current){const ge=Zt(d.location),Je=ie(ge);if(Je!==void 0&&Je.onClick!==void 0&&we){const It=Je.onClick({...ee,cell:ge,posX:ee.localEventX,posY:ee.localEventY,bounds:ee.bounds,theme:$o(ge,d.location),preventDefault:L});It!==void 0&&!So(It)&&ko(It)&&(ln([{location:ee.location,value:It}]),(ae=Wt.current)==null||ae.damage([{cell:ee.location}]))}if(vo.current||B.current===void 0)return!1;let ft=!1;switch(ge.activationBehaviorOverride??Ie){case"double-click":case"second-click":{if(((Ce=(Ge=p==null?void 0:p.previousSelection)==null?void 0:Ge.current)==null?void 0:Ce.cell)===void 0)break;const[It,mn]=B.current.cell,[vn,wn]=p.previousSelection.current.cell;ft=D===It&&D===vn&&E===mn&&E===wn&&(ee.isDoubleClick===!0||Ie==="second-click");break}case"single-click":{ft=!0;break}}if(ft)return N==null||N([D-T,E]),yo(ee.bounds,!1),!0}return!1},X=d.location[0]-T;if(d.isTouch){const ee=xt.current,we=Ti.current;if(ee.x!==we.x||ee.y!==we.y)return;if(d.isLongTouch===!0){if(d.kind==="cell"&&jo((he=B.current)==null?void 0:he.cell,d.location)){ne==null||ne([X,d.location[1]],{...d,preventDefault:L});return}else if(d.kind==="header"&&B.columns.hasIndex(D)){me==null||me(X,{...d,preventDefault:L});return}else if(d.kind===Jt){if(X<0)return;j==null||j(X,{...d,preventDefault:L});return}}d.kind==="cell"?O(d)||Oo(d):d.kind===Jt?te==null||te(X,{...d,preventDefault:L}):(d.kind===_n&&(I==null||I(X,{...d,preventDefault:L})),Oo(d));return}if(d.kind==="header"){if(X<0)return;d.isEdge?d.isDoubleClick===!0&&br(D):d.button===0&&D===P&&E===A&&(I==null||I(X,{...d,preventDefault:L}))}if(d.kind===Jt){if(X<0)return;d.button===0&&D===P&&E===A&&(te==null||te(X,{...d,preventDefault:L}),vo.current||Ai(d))}d.kind==="cell"&&(d.button===0||d.button===1)&&O(d),oo.current=void 0},[c,B,T,to,Co,_t,Y,Zt,ie,Ie,$o,ln,N,yo,ne,me,j,Oo,te,I,br,Ai]),ls=a.useCallback(d=>{const v={...d,location:[d.location[0]-T,d.location[1]]};Ne==null||Ne(v),c!==void 0&&d.buttons===0&&(u(void 0),Vr(void 0),Qr(void 0),No.current=!1),Qr(p=>{var D;return No.current?[d.scrollEdge[0],0]:d.scrollEdge[0]===(p==null?void 0:p[0])&&d.scrollEdge[1]===p[1]?p:c===void 0||(((D=sn.current)==null?void 0:D.location[0])??0){Pe==null||Pe(d-T,v)},[Pe,T]),as=a.useCallback((d,v)=>{Ue==null||Ue(d-T,v)},[Ue,T]),pn=(Yi=B==null?void 0:B.current)==null?void 0:Yi.cell,cs=a.useCallback((d,v,p,D,E,P)=>{Yt.current=!1;let A=pn;A!==void 0&&(A=[A[0]-T,A[1]]);const L=oe===0?void 0:{x:0,y:d.y,width:oe,height:d.height},O=[];L!==void 0&&O.push(L),Ze>0&&(O.push({x:d.x-T,y:pe-Ze,width:d.width,height:Ze}),oe>0&&O.push({x:0,y:pe-Ze,width:oe,height:Ze}));const X={x:d.x-T,y:d.y,width:d.width,height:mt&&d.y+d.height>=pe?d.height-1:d.height,tx:E,ty:P,extras:{selected:A,freezeRegion:L,freezeRegions:O}};xt.current=X,it(X),fe([v,p,D]),gt==null||gt(X,X.tx,X.ty,X.extras)},[pn,T,mt,pe,oe,Ze,it,gt]),ds=lo(He,a.useCallback((d,v)=>{He==null||He(d-T,v-T),ot!=="none"&&q(lt.fromSingleSelection(v),void 0,!0)},[ot,He,T,q])),ei=a.useRef(!1),us=a.useCallback(d=>{if(d.location[0]===0&&T>0){d.preventDefault();return}ue==null||ue({...d,location:[d.location[0]-T,d.location[1]]}),d.defaultPrevented()||(ei.current=!0),u(void 0)},[ue,T]),fs=a.useCallback(()=>{ei.current=!1},[]),Li=Xe==null?void 0:Xe.selectionBehavior,pr=a.useCallback(d=>{if(Li!=="block-spanning")return;const{isGroupHeader:v,path:p,groupRows:D}=no(d);if(v)return[d,d];const E=p[p.length-1],P=d-E,A=d+D-E-1;return[P,A]},[no,Li]),ti=a.useRef(),ni=a.useCallback(d=>{var v,p,D;if(!Zl(d,ti.current)&&(ti.current=d,!(((v=sn==null?void 0:sn.current)==null?void 0:v.button)!==void 0&&sn.current.button>=1))){if(d.buttons!==0&&c!==void 0&&((p=sn.current)==null?void 0:p.location[0])===0&&d.location[0]===0&&T===1&&rt==="multi"&&c.previousSelection&&!c.previousSelection.rows.hasIndex(sn.current.location[1])&&B.rows.hasIndex(sn.current.location[1])){const E=Math.min(sn.current.location[1],d.location[1]),P=Math.max(sn.current.location[1],d.location[1])+1;_(lt.fromSingleSelection([E,P]),void 0,!1)}if(d.buttons!==0&&c!==void 0&&B.current!==void 0&&!ei.current&&!No.current&&(dt==="rect"||dt==="multi-rect")){const[E,P]=B.current.cell;let[A,L]=d.location;if(L<0&&(L=xt.current.y),c.fillHandle===!0&&((D=c.previousSelection)==null?void 0:D.current)!==void 0){const O=c.previousSelection.current.range;L=Math.min(L,mt?pe-1:pe);const X=tc(O,A,L,$t);Vr(X)}else{if(mt&&P===pe)return;if(mt&&L===pe)if(d.kind===Br)L--;else return;A=Math.max(A,T);const Q=pr(P);L=Q===void 0?L:an(L,Q[0],Q[1]);const he=A-E,ee=L-P,we={x:he>=0?E:A,y:ee>=0?P:L,width:Math.abs(he)+1,height:Math.abs(ee)+1};Z({...B.current,range:we},!0,!1,"drag")}}bt==null||bt({...d,location:[d.location[0]-T,d.location[1]]})}},[c,T,rt,B,dt,bt,_,mt,pe,$t,pr,Z]),hs=a.useCallback(()=>{var A,L;const d=ti.current;if(d===void 0)return;const[v,p]=d.scrollEdge;let[D,E]=d.location;const P=xt.current;v===-1?D=((L=(A=P.extras)==null?void 0:A.freezeRegion)==null?void 0:L.x)??P.x:v===1&&(D=P.x+P.width),p===-1?E=Math.max(0,P.y):p===1&&(E=Math.min(pe-1,P.y+P.height)),D=an(D,0,$e.length-1),E=an(E,0,pe-1),ni({...d,location:[D,E]})},[$e.length,ni,pe]);fd(rs,_e,hs);const gn=a.useCallback(d=>{if(B.current===void 0)return;const[v,p]=d,[D,E]=B.current.cell,P=B.current.range;let A=P.x,L=P.x+P.width,O=P.y,X=P.y+P.height;const[Q,he]=pr(E)??[0,pe-1],ee=he+1;if(p!==0)switch(p){case 2:{X=ee,O=E,Et(0,X,"vertical");break}case-2:{O=Q,X=E+1,Et(0,O,"vertical");break}case 1:{OE+1?(X--,Et(0,X,"vertical")):(O=Math.max(Q,O-1),Et(0,O,"vertical"));break}default:Qo()}if(v!==0)if(v===2)L=$e.length,A=D,Et(L-1-T,0,"horizontal");else if(v===-2)A=T,L=D+1,Et(A-T,0,"horizontal");else{let we=[];if(St!==void 0){const ae=St({x:A,y:O,width:L-A-T,height:X-O},zt.current.signal);typeof ae=="object"&&(we=xd(ae))}if(v===1){let ae=!1;if(A0){const Ge=so(A+1,D+1).find(Ce=>!we.includes(Ce-T));Ge!==void 0&&(A=Ge,ae=!0)}else A++,ae=!0;ae&&Et(A,0,"horizontal")}ae||(L=Math.min($e.length,L+1),Et(L-1-T,0,"horizontal"))}else if(v===-1){let ae=!1;if(L>D+1){if(we.length>0){const Ge=so(L-1,D,-1).find(Ce=>!we.includes(Ce-T));Ge!==void 0&&(L=Ge,ae=!0)}else L--,ae=!0;ae&&Et(L-T,0,"horizontal")}ae||(A=Math.max(T,A-1),Et(A-T,0,"horizontal"))}else Qo()}Z({cell:B.current.cell,range:{x:A,y:O,width:L-A,height:X-O}},!0,!1,"keyboard-select")},[St,pr,B,$e.length,T,pe,Et,Z]),Gn=a.useCallback((d,v,p,D)=>{const E=Gt-(p?0:1);d=an(d,T,De.length-1+T),v=an(v,0,E);const P=pn==null?void 0:pn[0],A=pn==null?void 0:pn[1];if(d===P&&v===A)return!1;if(D&&B.current!==void 0){const L=[...B.current.rangeStack];(B.current.range.width>1||B.current.range.height>1)&&L.push(B.current.range),_t({...B,current:{cell:[d,v],range:{x:d,y:v,width:1,height:1},rangeStack:L}},!0)}else Z({cell:[d,v],range:{x:d,y:v,width:1,height:1}},!0,!1,"keyboard-nav");return f.current!==void 0&&f.current[0]===d&&f.current[1]===v&&(f.current=void 0),Et(d-T,v),!0},[Gt,T,De.length,pn,B,Et,_t,Z]),gs=a.useCallback((d,v)=>{(r==null?void 0:r.cell)!==void 0&&d!==void 0&&ko(d)&&(ln([{location:r.cell,value:d}]),window.requestAnimationFrame(()=>{var E;(E=Wt.current)==null||E.damage([{cell:r.cell}])})),Rt(!0),i(void 0);const[p,D]=v;if(B.current!==void 0&&(p!==0||D!==0)){const E=B.current.cell[1]===Gt-1&&d!==void 0;Gn(an(B.current.cell[0]+p,0,$e.length-1),an(B.current.cell[1]+D,0,Gt-1),E,!1)}H==null||H(d,v)},[r==null?void 0:r.cell,Rt,B,H,ln,Gt,Gn,$e.length]),ms=a.useMemo(()=>`gdg-overlay-${Cd++}`,[]),ro=a.useCallback(d=>{var p,D,E,P;Rt();const v=[];for(let A=d.x;A({cell:A.location})))},[Rt,F,ie,ln,T]),Xo=r!==void 0,Pi=a.useCallback(d=>{var Ge,Ce;const v=()=>{d.stopPropagation(),d.preventDefault()},p={didMatch:!1},{bounds:D}=d,E=B.columns,P=B.rows,A=un;if(!Xo&&Ae(A.clear,d,p))_t(Dr,!1),pt==null||pt();else if(!Xo&&Ae(A.selectAll,d,p))_t({columns:lt.empty(),rows:lt.empty(),current:{cell:((Ge=B.current)==null?void 0:Ge.cell)??[T,0],range:{x:T,y:0,width:C.length,height:pe},rangeStack:[]}},!1);else if(Ae(A.search,d,p))(Ce=l==null?void 0:l.current)==null||Ce.focus({preventScroll:!0}),fr(!0);else if(Ae(A.delete,d,p)){const ge=(se==null?void 0:se(B))??!0;if(ge!==!1){const Je=ge===!0?B:ge;if(Je.current!==void 0){ro(Je.current.range);for(const ft of Je.current.rangeStack)ro(ft)}for(const ft of Je.rows)ro({x:T,y:ft,width:C.length,height:1});for(const ft of Je.columns)ro({x:ft,y:0,width:1,height:pe})}}if(p.didMatch)return v(),!0;if(B.current===void 0)return!1;let[L,O]=B.current.cell;const[,X]=B.current.cell;let Q=!1,he=!1;if(Ae(A.scrollToSelectedCell,d,p)?xr.current(L-T,O):ot!=="none"&&Ae(A.selectColumn,d,p)?E.hasIndex(L)?q(E.remove(L),void 0,!0):ot==="single"?q(lt.fromSingleSelection(L),void 0,!0):q(void 0,L,!0):rt!=="none"&&Ae(A.selectRow,d,p)?P.hasIndex(O)?_(P.remove(O),void 0,!0):rt==="single"?_(lt.fromSingleSelection(O),void 0,!0):_(void 0,O,!0):!Xo&&D!==void 0&&Ae(A.activateCell,d,p)?O===pe&&mt?window.setTimeout(()=>{const ge=yr(L);bo(ge??L)},0):(N==null||N([L-T,O]),yo(D,!0)):B.current.range.height>1&&Ae(A.downFill,d,p)?Bi():B.current.range.width>1&&Ae(A.rightFill,d,p)?zi():Ae(A.goToNextPage,d,p)?O+=Math.max(1,xt.current.height-4):Ae(A.goToPreviousPage,d,p)?O-=Math.max(1,xt.current.height-4):Ae(A.goToFirstCell,d,p)?(i(void 0),O=0,L=0):Ae(A.goToLastCell,d,p)?(i(void 0),O=Number.MAX_SAFE_INTEGER,L=Number.MAX_SAFE_INTEGER):Ae(A.selectToFirstCell,d,p)?(i(void 0),gn([-2,-2])):Ae(A.selectToLastCell,d,p)?(i(void 0),gn([2,2])):Xo?(Ae(A.closeOverlay,d,p)&&i(void 0),Ae(A.acceptOverlayDown,d,p)&&(i(void 0),O++),Ae(A.acceptOverlayUp,d,p)&&(i(void 0),O--),Ae(A.acceptOverlayLeft,d,p)&&(i(void 0),L--),Ae(A.acceptOverlayRight,d,p)&&(i(void 0),L++)):(Ae(A.goDownCell,d,p)?O+=1:Ae(A.goUpCell,d,p)?O-=1:Ae(A.goRightCell,d,p)?L+=1:Ae(A.goLeftCell,d,p)?L-=1:Ae(A.goDownCellRetainSelection,d,p)?(O+=1,Q=!0):Ae(A.goUpCellRetainSelection,d,p)?(O-=1,Q=!0):Ae(A.goRightCellRetainSelection,d,p)?(L+=1,Q=!0):Ae(A.goLeftCellRetainSelection,d,p)?(L-=1,Q=!0):Ae(A.goToLastRow,d,p)?O=pe-1:Ae(A.goToFirstRow,d,p)?O=Number.MIN_SAFE_INTEGER:Ae(A.goToLastColumn,d,p)?L=Number.MAX_SAFE_INTEGER:Ae(A.goToFirstColumn,d,p)?L=Number.MIN_SAFE_INTEGER:(dt==="rect"||dt==="multi-rect")&&(Ae(A.selectGrowDown,d,p)?gn([0,1]):Ae(A.selectGrowUp,d,p)?gn([0,-1]):Ae(A.selectGrowRight,d,p)?gn([1,0]):Ae(A.selectGrowLeft,d,p)?gn([-1,0]):Ae(A.selectToLastRow,d,p)?gn([0,2]):Ae(A.selectToFirstRow,d,p)?gn([0,-2]):Ae(A.selectToLastColumn,d,p)?gn([2,0]):Ae(A.selectToFirstColumn,d,p)&&gn([-2,0])),he=p.didMatch),hn!==void 0&&hn!=="normal"&&O!==X){const ge=hn==="skip-up"||hn==="skip"||hn==="block",Je=hn==="skip-down"||hn==="skip"||hn==="block",ft=O=0&&no(O).isGroupHeader;)O--;O<0&&(O=X)}else if(!ft&&Je){for(;O=pe&&(O=X)}}const we=Gn(L,O,!1,Q),ae=p.didMatch;return ae&&(we||!he||Zn)&&v(),ae},[hn,Xo,B,un,ot,rt,dt,T,no,pe,Gn,_t,pt,C.length,se,Zn,ro,q,_,mt,yr,bo,N,yo,Bi,zi,gn]),Yo=a.useCallback(d=>{let v=!1;if(ve!==void 0&&ve({...d,cancel:()=>{v=!0}}),v||Pi(d)||B.current===void 0)return;const[p,D]=B.current.cell,E=xt.current;if(ht&&!d.metaKey&&!d.ctrlKey&&B.current!==void 0&&d.key.length===1&&/[ -~]/g.test(d.key)&&d.bounds!==void 0&&qo(F([p-T,Math.max(0,Math.min(D,pe-1))]))){if((!mt||D!==pe)&&(E.y>D||D>E.y+E.height||E.x>p||p>E.x+E.width))return;yo(d.bounds,!0,d.key),d.stopPropagation(),d.preventDefault()}},[ht,ve,Pi,B,F,T,pe,mt,yo]),ws=a.useCallback((d,v)=>{const p=d.location[0]-T;if(d.kind==="header"&&(me==null||me(p,{...d,preventDefault:v})),d.kind===Jt){if(p<0)return;j==null||j(p,{...d,preventDefault:v})}if(d.kind==="cell"){const[D,E]=d.location;ne==null||ne([p,E],{...d,preventDefault:v}),sa(B,d.location)||Gn(D,E,!1,!1)}},[B,ne,j,me,T,Gn]),oi=a.useCallback(async d=>{var A,L,O;if(!un.paste)return;function v(X,Q,he,ee){var ae,Ge;const we=typeof he=="object"?(he==null?void 0:he.join(` +`))??"":(he==null?void 0:he.toString())??"";if(!So(X)&&qo(X)&&X.readonly!==!0){const Ce=G==null?void 0:G(we,X);if(Ce!==void 0&&ko(Ce))return{location:Q,value:Ce};const ge=ie(X);if(ge===void 0)return;if(ge.kind===J.Custom){Qt(X.kind===J.Custom);const Je=(ae=ge.onPaste)==null?void 0:ae.call(ge,we,X.data);return Je===void 0?void 0:{location:Q,value:{...X,data:Je}}}else{const Je=(Ge=ge.onPaste)==null?void 0:Ge.call(ge,we,X,{formatted:ee,formattedString:typeof ee=="string"?ee:ee==null?void 0:ee.join(` +`),rawValue:he});return Je===void 0?void 0:(Qt(Je.kind===X.kind),{location:Q,value:Je})}}}const p=B.columns,D=B.rows,E=((A=_e.current)==null?void 0:A.contains(document.activeElement))===!0||((L=s.current)==null?void 0:L.contains(document.activeElement))===!0;let P;if(B.current!==void 0?P=[B.current.range.x,B.current.range.y]:p.length===1?P=[p.first()??0,0]:D.length===1&&(P=[T,D.first()??0]),E&&P!==void 0){let X,Q;const he="text/plain",ee="text/html";if(navigator.clipboard.read!==void 0){const Ce=await navigator.clipboard.read();for(const ge of Ce){if(ge.types.includes(ee)){const ft=await(await ge.getType(ee)).text(),It=fl(ft);if(It!==void 0){X=It;break}}ge.types.includes(he)&&(Q=await(await ge.getType(he)).text())}}else if(navigator.clipboard.readText!==void 0)Q=await navigator.clipboard.readText();else if(d!==void 0&&(d==null?void 0:d.clipboardData)!==null){if(d.clipboardData.types.includes(ee)){const Ce=d.clipboardData.getData(ee);X=fl(Ce)}X===void 0&&d.clipboardData.types.includes(he)&&(Q=d.clipboardData.getData(he))}else return;const[we,ae]=P,Ge=[];do{if(Fe===void 0){const Ce=Zt(P),ge=Q??(X==null?void 0:X.map(ft=>ft.map(It=>It.rawValue).join(" ")).join(" "))??"",Je=v(Ce,P,ge,void 0);Je!==void 0&&Ge.push(Je);break}if(X===void 0){if(Q===void 0)return;X=id(Q)}if(Fe===!1||typeof Fe=="function"&&(Fe==null?void 0:Fe([P[0]-T,P[1]],X.map(Ce=>Ce.map(ge=>{var Je;return((Je=ge.rawValue)==null?void 0:Je.toString())??""}))))!==!0)return;for(const[Ce,ge]of X.entries()){if(Ce+ae>=pe)break;for(const[Je,ft]of ge.entries()){const It=[Je+we,Ce+ae],[mn,vn]=It;if(mn>=$e.length||vn>=Gt)continue;const wn=Zt(It),Cn=v(wn,It,ft.rawValue,ft.formatted);Cn!==void 0&&Ge.push(Cn)}}}while(!1);ln(Ge),(O=Wt.current)==null||O.damage(Ge.map(Ce=>({cell:Ce.location})))}},[G,ie,Zt,B,un.paste,_e,$e.length,ln,Gt,Fe,T,pe]);Nt("paste",oi,w,!1,!0);const Go=a.useCallback(async(d,v)=>{var A,L;if(!un.copy)return;const p=v===!0||((A=_e.current)==null?void 0:A.contains(document.activeElement))===!0||((L=s.current)==null?void 0:L.contains(document.activeElement))===!0,D=B.columns,E=B.rows,P=(O,X)=>{if(!je)gl(O,X,d);else{const Q=X.map(he=>({kind:J.Text,data:C[he].title,displayData:C[he].title,allowOverlay:!1}));gl([Q,...O],X,d)}};if(p&&St!==void 0){if(B.current!==void 0){let O=St(B.current.range,zt.current.signal);typeof O!="object"&&(O=await O()),P(O,so(B.current.range.x-T,B.current.range.x+B.current.range.width-T))}else if(E!==void 0&&E.length>0){const X=[...E].map(Q=>{const he=St({x:T,y:Q,width:C.length,height:1},zt.current.signal);return typeof he=="object"?he[0]:he().then(ee=>ee[0])});if(X.some(Q=>Q instanceof Promise)){const Q=await Promise.all(X);P(Q,so(C.length))}else P(X,so(C.length))}else if(D.length>0){const O=[],X=[];for(const Q of D){let he=St({x:Q,y:0,width:1,height:pe},zt.current.signal);typeof he!="object"&&(he=await he()),O.push(he),X.push(Q-T)}if(O.length===1)P(O[0],X);else{const Q=O.reduce((he,ee)=>he.map((we,ae)=>[...we,...ee[ae]]));P(Q,X)}}}},[C,St,B,un.copy,T,_e,pe,je]);Nt("copy",Go,w,!1,!1);const ys=a.useCallback(async d=>{var p,D;if(!(!un.cut||!(((p=_e.current)==null?void 0:p.contains(document.activeElement))===!0||((D=s.current)==null?void 0:D.contains(document.activeElement))===!0))&&(await Go(d),B.current!==void 0)){let E={current:{cell:B.current.cell,range:B.current.range,rangeStack:[]},rows:lt.empty(),columns:lt.empty()};const P=se==null?void 0:se(E);if(P===!1||(E=P===!0?E:P,E.current===void 0))return;ro(E.current.range)}},[ro,B,un.cut,Go,_e,se]);Nt("cut",ys,w,!1,!1);const bs=a.useCallback((d,v)=>{if(ke!==void 0){T!==0&&(d=d.map(E=>[E[0]-T,E[1]])),ke(d,v);return}if(d.length===0||v===-1)return;const[p,D]=d[v];f.current!==void 0&&f.current[0]===p&&f.current[1]===D||(f.current=[p,D],Gn(p,D,!1,!1))},[ke,T,Gn]),[vr,Cr]=((Gi=Dt==null?void 0:Dt.current)==null?void 0:Gi.cell)??[],xr=a.useRef(Et);xr.current=Et,a.useLayoutEffect(()=>{var d,v,p,D;!Yt.current&&vr!==void 0&&Cr!==void 0&&(vr!==((v=(d=Hn.current)==null?void 0:d.current)==null?void 0:v.cell[0])||Cr!==((D=(p=Hn.current)==null?void 0:p.current)==null?void 0:D.cell[1]))&&xr.current(vr,Cr),Yt.current=!1},[vr,Cr]);const Wi=B.current!==void 0&&(B.current.cell[0]>=$e.length||B.current.cell[1]>=Gt);a.useLayoutEffect(()=>{Wi&&_t(Dr,!1)},[Wi,_t]);const ps=a.useMemo(()=>mt===!0&&(Be==null?void 0:Be.tint)===!0?lt.fromSingleSelection(Gt-1):lt.empty(),[Gt,mt,Be==null?void 0:Be.tint]),vs=a.useCallback(d=>typeof Ot=="boolean"?Ot:(Ot==null?void 0:Ot(d-T))??!0,[T,Ot]),Cs=a.useMemo(()=>{if(Zr===void 0||s.current===null)return null;const{bounds:d,group:v}=Zr,p=s.current.getBoundingClientRect();return a.createElement(Vc,{bounds:d,group:v,canvasBounds:p,onClose:()=>Jr(void 0),onFinish:D=>{Jr(void 0),U==null||U(v,D)}})},[U,Zr]),xs=Math.min($e.length,oe+(rn?1:0));a.useImperativeHandle(t,()=>({appendRow:(d,v)=>bo(d+T,v),updateCells:d=>{var v;return T!==0&&(d=d.map(p=>({cell:[p.cell[0]+T,p.cell[1]]}))),(v=Wt.current)==null?void 0:v.damage(d)},getBounds:(d,v)=>{var p;if(!((s==null?void 0:s.current)===null||(_e==null?void 0:_e.current)===null)){if(d===void 0&&v===void 0){const D=s.current.getBoundingClientRect(),E=D.width/_e.current.clientWidth;return{x:D.x-_e.current.scrollLeft*E,y:D.y-_e.current.scrollTop*E,width:_e.current.scrollWidth*E,height:_e.current.scrollHeight*E}}return(p=Wt.current)==null?void 0:p.getBounds((d??0)+T,v)}},focus:()=>{var d;return(d=Wt.current)==null?void 0:d.focus()},emit:async d=>{switch(d){case"delete":Yo({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":Yo({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":Yo({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await Go(void 0,!0);break;case"paste":await oi();break}},scrollTo:Et,remeasureColumns:d=>{for(const v of d)br(v+T)}}),[bo,br,_e,Go,Yo,oi,T,Et]);const[$i,Oi]=pn??[],ks=a.useCallback(d=>{const[v,p]=d;if(p===-1){ot!=="none"&&(q(lt.fromSingleSelection(v),void 0,!1),Rt());return}$i===v&&Oi===p||(Z({cell:d,range:{x:v,y:p,width:1,height:1}},!0,!1,"keyboard-nav"),Et(v,p))},[ot,Rt,Et,$i,Oi,Z,q]),[Ss,Ms]=a.useState(!1),Ni=a.useRef(Cl(d=>{Ms(d)},5)),Rs=a.useCallback(()=>{Ni.current(!0),B.current===void 0&&B.columns.length===0&&B.rows.length===0&&c===void 0&&Z({cell:[T,jt],range:{x:T,y:jt,width:1,height:1}},!0,!1,"keyboard-select")},[jt,B,c,T,Z]),Es=a.useCallback(()=>{Ni.current(!1)},[]),[Is,Ds]=a.useMemo(()=>{let d;const v=(Ht==null?void 0:Ht.scrollbarWidthOverride)??hi(),p=pe+(mt?1:0);if(typeof dn=="number")d=wt+p*dn;else{let E=0;const P=Math.min(p,10);for(let A=0;AP.width+E,0)+v;return[`${Math.min(1e5,D)}px`,`${Math.min(1e5,d)}px`]},[$e,Ht==null?void 0:Ht.scrollbarWidthOverride,dn,pe,mt,wt]),Fs=a.useMemo(()=>Ca(de),[de]);return a.createElement($l.Provider,{value:de},a.createElement(cd,{style:Fs,className:ce,inWidth:y??Is,inHeight:b??Ds},a.createElement(Gc,{fillHandle:Ho,drawFocusRing:vt,experimental:Ht,fixedShadowX:Tt,fixedShadowY:Lt,getRowThemeOverride:on,headerIcons:Rn,imageWindowLoader:or,initialSize:Bn,isDraggable:En,onDragLeave:In,onRowMoved:bn,overscrollX:dr,overscrollY:ur,preventDiagonalScrolling:uo,rightElement:fo,rightElementProps:ho,smoothScrollX:Jn,smoothScrollY:Ln,className:ce,enableGroups:We,onCanvasFocused:Rs,onCanvasBlur:Es,canvasRef:s,onContextMenu:ws,theme:de,cellXOffset:eo,cellYOffset:jt,accessibilityHeight:Bt.height,onDragEnd:fs,columns:$e,nonGrowWidth:Ye,drawHeader:k,onColumnProposeMove:R,drawCell:K,disabledRows:ps,freezeColumns:xs,lockColumns:T,firstColAccessible:T===0,getCellContent:Zt,minColumnWidth:Dn,maxColumnWidth:$n,searchInputRef:l,showSearch:Yr,onSearchClose:Gr,highlightRegions:ns,getCellsForSelection:St,getGroupDetails:qr,headerHeight:Bo,isFocused:Ss,groupHeaderHeight:We?cr:0,freezeTrailingRows:Ze+(mt&&(Be==null?void 0:Be.sticky)===!0?1:0),hasAppendRow:mt,onColumnResize:fn,onColumnResizeEnd:Ur,onColumnResizeStart:_r,onCellFocused:ks,onColumnMoved:ds,onDragStart:us,onHeaderMenuClick:ss,onHeaderIndicatorClick:as,onItemHovered:ni,isFilling:(c==null?void 0:c.fillHandle)===!0,onMouseMove:ls,onKeyDown:Yo,onKeyUp:nt,onMouseDown:os,onMouseUp:is,onDragOverCell:Ve,onDrop:kt,onSearchResultsChanged:bs,onVisibleRegionChanged:cs,clientSize:Re,rowHeight:dn,searchResults:be,searchValue:Ee,onSearchValueChange:V,rows:Gt,scrollRef:_e,selection:B,translateX:Bt.tx,translateY:Bt.ty,verticalBorder:vs,gridRef:Wt,getCellRenderer:ie,resizeIndicator:Nr}),Cs,r!==void 0&&a.createElement(a.Suspense,{fallback:null},a.createElement(vd,{...r,validateCell:Kr,bloom:W,id:ms,getCellRenderer:ie,className:(Ht==null?void 0:Ht.isSubGrid)===!0?"click-outside-ignore":void 0,provideEditor:Sn,imageEditorOverride:m,onFinishEditing:gs,markdownDivCreateNode:h,isOutsideClick:Pn}))))},Sd=a.forwardRef(kd),yl=20,Md={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??"false"},kind:J.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>Rd(e,e.cell.data,fi(e.cell),e.cell.maxSize??yl),onDelete:e=>({...e,data:!1}),onClick:e=>{const{cell:t,posX:n,posY:o,bounds:r,theme:i}=e,{width:l,height:s,x:c,y:u}=r,f=t.maxSize??yl,w=Math.floor(r.y+s/2),m=Ml(f,s,i.cellVerticalPadding),g=Sl(t.contentAlign??"center",c,l,i.cellHorizontalPadding,m),h=kl(g,w,m),y=Rl(c+n,u+o,h);if(fi(t)&&y)return{...t,data:Ql(t.data)}},onPaste:(e,t)=>{let n=Hr;return e.toLowerCase()==="true"?n=!0:e.toLowerCase()==="false"?n=!1:e.toLowerCase()==="indeterminate"&&(n=bi),n===t.data?void 0:{...t,data:n}}};function Rd(e,t,n,o){if(!n&&t===Hr)return;const{ctx:r,hoverAmount:i,theme:l,rect:s,highlighted:c,hoverX:u,hoverY:f,cell:{contentAlign:w}}=e,{x:m,y:g,width:h,height:y}=s,b=.35;let C=n?1-b+b*i:.4;t===Hr&&(C*=i),C!==0&&(r.globalAlpha=C,Si(r,l,t,m,g,h,y,c,u,f,o,w),r.globalAlpha=1)}const Ed=tn("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),Id=e=>{const{bubbles:t}=e;return a.createElement(Ed,null,t.map((n,o)=>a.createElement("div",{key:o,className:"boe-bubble"},n)),a.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},Dd=Id,Fd={getAccessibilityString:e=>El(e.data),kind:J.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((o,r)=>e.measureText(r).width+o+20,0)+2*n.cellHorizontalPadding-4,draw:e=>Td(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return a.createElement(Dd,{bubbles:t.data})},onPaste:()=>{}},Hd=4;function Td(e,t){const{rect:n,theme:o,ctx:r,highlighted:i}=e,{x:l,y:s,width:c,height:u}=n,f=20,w=8,m=Hd;let g=l+o.cellHorizontalPadding;const h=[];for(const y of t){if(g>l+c)break;const b=Fo(y,r,o.baseFontFull).width;h.push({x:g,width:b}),g+=b+w*2+m}r.beginPath();for(const y of h)kn(r,y.x,s+(u-f)/2,y.width+w*2,f,o.roundingRadius??f/2);r.fillStyle=i?o.bgBubbleSelected:o.bgBubble,r.fill();for(const[y,b]of h.entries())r.beginPath(),r.fillStyle=o.textBubble,r.fillText(t[y],b.x+w,s+u/2+qn(r,o))}const Ad=tn("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),zd=e=>{const{drilldowns:t}=e;return a.createElement(Ad,null,t.map((n,o)=>a.createElement("div",{key:o,className:"doe-bubble"},n.img!==void 0&&a.createElement("img",{src:n.img}),a.createElement("div",null,n.text))))},Bd=zd,Ld={getAccessibilityString:e=>El(e.data.map(t=>t.text)),kind:J.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((o,r)=>e.measureText(r.text).width+o+20+(r.img!==void 0?18:0),0)+2*n.cellHorizontalPadding-4,draw:e=>$d(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return a.createElement(Bd,{drilldowns:t.data})},onPaste:()=>{}},Pd=4,ci={};function Wd(e,t,n,o){const r=Math.ceil(window.devicePixelRatio),i=5,l=n-i*2,s=4,c=n*r,u=o+i,f=o*3,w=(f+i*2)*r,m=`${e},${t},${r},${n}`;if(ci[m]!==void 0)return{el:ci[m],height:c,width:w,middleWidth:s*r,sideWidth:u*r,padding:i*r,dpr:r};const g=document.createElement("canvas"),h=g.getContext("2d");return h===null?null:(g.width=w,g.height=c,h.scale(r,r),ci[m]=g,h.beginPath(),kn(h,i,i,f,l,o),h.shadowColor="rgba(24, 25, 34, 0.4)",h.shadowBlur=1,h.fillStyle=e,h.fill(),h.shadowColor="rgba(24, 25, 34, 0.3)",h.shadowOffsetY=1,h.shadowBlur=5,h.fillStyle=e,h.fill(),h.shadowOffsetY=0,h.shadowBlur=0,h.shadowBlur=0,h.beginPath(),kn(h,i+.5,i+.5,f,l,o),h.strokeStyle=t,h.lineWidth=1,h.stroke(),{el:g,height:c,width:w,sideWidth:u*r,middleWidth:o*r,padding:i*r,dpr:r})}function $d(e,t){const{rect:n,theme:o,ctx:r,imageLoader:i,col:l,row:s}=e,{x:c,width:u}=n,f=o.baseFontFull,w=zl(r,f),m=Math.min(n.height,Math.max(16,Math.ceil(w*o.lineHeight)*2)),g=Math.floor(n.y+(n.height-m)/2),h=m-10,y=8,b=Pd;let C=c+o.cellHorizontalPadding;const x=o.roundingRadius??6,F=Wd(o.bgCell,o.drilldownBorder,m,x),Y=[];for(const N of t){if(C>c+u)break;const H=Fo(N.text,r,f).width;let G=0;N.img!==void 0&&i.loadOrGetImage(N.img,l,s)!==void 0&&(G=h-8+4);const S=H+G+y*2;Y.push({x:C,width:S}),C+=S+b}if(F!==null){const{el:N,height:z,middleWidth:H,sideWidth:G,width:S,dpr:$,padding:W}=F,I=G/$,R=W/$;for(const M of Y){const te=Math.floor(M.x),ne=Math.floor(M.width),ce=ne-(I-R)*2;r.imageSmoothingEnabled=!1,r.drawImage(N,0,0,G,z,te-R,g,I,m),ce>0&&r.drawImage(N,G,0,H,z,te+(I-R),g,ce,m),r.drawImage(N,S-G,0,G,z,te+ne-(I-R),g,I,m),r.imageSmoothingEnabled=!0}}r.beginPath();for(const[N,z]of Y.entries()){const H=t[N];let G=z.x+y;if(H.img!==void 0){const S=i.loadOrGetImage(H.img,l,s);if(S!==void 0){const $=h-8;let W=0,I=0,R=S.width,M=S.height;R>M?(W+=(R-M)/2,R=M):M>R&&(I+=(M-R)/2,M=R),r.beginPath(),kn(r,G,g+m/2-$/2,$,$,o.roundingRadius??3),r.save(),r.clip(),r.drawImage(S,W,I,R,M,G,g+m/2-$/2,$,$),r.restore(),G+=$+4}}r.beginPath(),r.fillStyle=o.textBubble,r.fillText(H.text,G,g+m/2+qn(r,o))}}const Od={getAccessibilityString:e=>e.data.join(", "),kind:J.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>Nd(e,e.cell.displayData??e.cell.data,e.cell.rounding??e.theme.roundingRadius??4,e.cell.contentAlign),measure:(e,t)=>t.data.length*50,onDelete:e=>({...e,data:[]}),provideEditor:()=>e=>{const{value:t,onFinishedEditing:n,imageEditorOverride:o}=e,r=o??Qs;return a.createElement(r,{urls:t.data,canWrite:t.readonly!==!1,onCancel:n,onChange:i=>{n({...t,data:[i]})}})},onPaste:(e,t)=>{e=e.trim();const o=e.split(",").map(r=>{try{return new URL(r),r}catch{return}}).filter(r=>r!==void 0);if(!(o.length===t.data.length&&o.every((r,i)=>r===t.data[i])))return{...t,data:o}}},di=4;function Nd(e,t,n,o){const{rect:r,col:i,row:l,theme:s,ctx:c,imageLoader:u}=e,{x:f,y:w,height:m,width:g}=r,h=m-s.cellVerticalPadding*2,y=[];let b=0;for(let x=0;x0&&(c.beginPath(),kn(c,C,w+s.cellVerticalPadding,F,h,n),c.save(),c.clip()),c.drawImage(x,C,w+s.cellVerticalPadding,F,h),n>0&&c.restore(),C+=F+di}}function Xd(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const Yd={getAccessibilityString:()=>"",kind:J.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:e=>{const{cell:t,col:n,row:o,ctx:r,rect:i,theme:l}=e;if(t.skeletonWidth===void 0||t.skeletonWidth===0)return;let s=t.skeletonWidth;t.skeletonWidthVariability!==void 0&&t.skeletonWidthVariability>0&&(s+=Math.round(Xd(n,o)*t.skeletonWidthVariability));const c=l.cellHorizontalPadding,u=t.skeletonHeight??Math.min(18,i.height-2*l.cellVerticalPadding);kn(r,i.x+c,i.y+(i.height-u)/2,s,u,l.roundingRadius??3),r.fillStyle=ao(l.textDark,.1),r.fill()},onPaste:()=>{}},Gd=()=>e=>e.targetWidth,bl=tn("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[Gd(),"px"]}}),Kd=e=>{const{value:t,onChange:n,forceEditMode:o,createNode:r,targetRect:i,onFinish:l,validatedSelection:s}=e,c=t.data,u=t.readonly===!0,[f,w]=a.useState(c===""||o),m=a.useCallback(()=>{w(h=>!h)},[]),g=c?"gdg-ml-6":"";return f?a.createElement(bl,{targetWidth:i.width-20},a.createElement(Pr,{autoFocus:!0,highlight:!1,validatedSelection:s,value:c,onKeyDown:h=>{h.key==="Enter"&&h.stopPropagation()},onChange:n}),a.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${g}`,onClick:()=>l(t)},a.createElement(Us,null))):a.createElement(bl,{targetWidth:i.width},a.createElement(ta,{contents:c,createNode:r}),!u&&a.createElement(a.Fragment,null,a.createElement("div",{className:"spacer"}),a.createElement("div",{className:`gdg-edit-icon gdg-edit-hover ${g}`,onClick:m},a.createElement(pi,null))),a.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},Ud={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:J.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:nr,measure:(e,t,n)=>{const o=t.data.split(` +`)[0];return e.measureText(o).width+2*n.cellHorizontalPadding},draw:e=>xn(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:o,onFinishedEditing:r,markdownDivCreateNode:i,forceEditMode:l,validatedSelection:s}=e;return a.createElement(Kd,{onFinish:r,targetRect:o,value:n,validatedSelection:s,onChange:c=>t({...n,data:c.target.value}),forceEditMode:l,createNode:i})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},_d={getAccessibilityString:e=>e.row.toString(),kind:cn.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:Vd,measure:()=>44,draw:e=>jd(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:o,posY:r}=e,{width:i,height:l}=t,s=n.drawHandle?7+(i-7)/2:i/2,c=l/2;if(Math.abs(o-s)<=10&&Math.abs(r-c)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function Vd(e,t){const{ctx:n,theme:o}=e,r=o.markerFontFull,i=t??{};return(i==null?void 0:i.font)!==r&&(n.font=r,i.font=r),i.deprep=qd,n.textAlign="center",i}function qd(e){const{ctx:t}=e;t.textAlign="start"}function jd(e,t,n,o,r,i){const{ctx:l,rect:s,hoverAmount:c,theme:u}=e,{x:f,y:w,width:m,height:g}=s,h=n?1:o==="checkbox-visible"?.6+.4*c:c;if(o!=="number"&&h>0){l.globalAlpha=h;const y=7*(n?c:1);if(Si(l,u,n,r?f+y:f,w,r?m-y:m,g,!0,void 0,void 0,18,"center",i),r){l.globalAlpha=c,l.beginPath();for(const b of[3,6])for(const C of[-5,-1,3])l.rect(f+b,w+g/2+C,2,2);l.fillStyle=u.textLight,l.fill(),l.beginPath()}l.globalAlpha=1}if(o==="number"||o==="both"&&!n){const y=t.toString(),b=u.markerFontFull,C=f+m/2;o==="both"&&c!==0&&(l.globalAlpha=1-c),l.fillStyle=u.textLight,l.font=b,l.fillText(y,C,w+g/2+qn(l,b)),c!==0&&(l.globalAlpha=1)}}const Zd={getAccessibilityString:()=>"",kind:cn.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>Jd(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function Jd(e,t,n){const{ctx:o,rect:r,hoverAmount:i,theme:l,spriteManager:s}=e,{x:c,y:u,width:f,height:w}=r;o.beginPath(),o.globalAlpha=i,o.rect(c+1,u+1,f,w-2),o.fillStyle=l.bgHeaderHovered,o.fill(),o.globalAlpha=1,o.beginPath();const m=t!=="";let g=0;if(n!==void 0){const y=w-8,b=c+8/2,C=u+8/2;s.drawSprite(n,"normal",o,b,C,y,l,m?1:i),g=y}else{g=24;const h=12,y=m?h:i*h,b=m?0:(1-i)*h*.5,C=l.cellHorizontalPadding+4;y>0&&(o.moveTo(c+C+b,u+w/2),o.lineTo(c+C+b+y,u+w/2),o.moveTo(c+C+b+y*.5,u+w/2-y*.5),o.lineTo(c+C+b+y*.5,u+w/2+y*.5),o.lineWidth=2,o.strokeStyle=l.bgIconHeader,o.lineCap="round",o.stroke())}o.fillStyle=l.textMedium,o.fillText(t,g+c+l.cellHorizontalPadding+.5,u+w/2+qn(o,l)),o.beginPath()}const Qd=a.lazy(async()=>await vl(()=>import("./number-overlay-editor-3ljU3NGx.js"),__vite__mapDeps([8,1,3,9]),import.meta.url)),eu={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:J.Number,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:nr,draw:e=>xn(e,e.cell.displayData,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.displayData).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:r}=e;return a.createElement(a.Suspense,{fallback:null},a.createElement(Qd,{highlight:t,disabled:o.readonly===!0,value:o.data,fixedDecimals:o.fixedDecimals,allowNegative:o.allowNegative,thousandSeparator:o.thousandSeparator,decimalSeparator:o.decimalSeparator,validatedSelection:r,onChange:i=>n({...o,data:Number.isNaN(i.floatValue??0)?0:i.floatValue})}))},onPaste:(e,t,n)=>{const o=typeof n.rawValue=="number"?n.rawValue:Number.parseFloat(typeof n.rawValue=="string"?n.rawValue:e);if(!(Number.isNaN(o)||t.data===o))return{...t,data:o,displayData:n.formattedString??t.displayData}}},tu={getAccessibilityString:()=>"",measure:()=>108,kind:J.Protected,needsHover:!1,needsHoverPosition:!1,draw:nu,onPaste:()=>{}};function nu(e){const{ctx:t,theme:n,rect:o}=e,{x:r,y:i,height:l}=o;t.beginPath();const s=2.5;let c=r+n.cellHorizontalPadding+s;const u=i+l/2,f=Math.cos(ji(30))*s,w=Math.sin(ji(30))*s;for(let m=0;m<12;m++)t.moveTo(c,u-s),t.lineTo(c,u+s),t.moveTo(c+f,u-w),t.lineTo(c-f,u+w),t.moveTo(c-f,u-w),t.lineTo(c+f,u+w),c+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const ou={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:J.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>nr(e,t,e.theme.textLight),draw:e=>xn(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+n.cellHorizontalPadding*2,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:r}=e;return yt.createElement(Pr,{highlight:t,autoFocus:o.readonly!==!0,disabled:o.readonly!==!1,value:o.data,validatedSelection:r,onChange:i=>n({...o,data:i.target.value})})},onPaste:()=>{}},ru={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:J.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:nr,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:o,ctx:r,rect:i,theme:l,overrideCursor:s}=e,{displayData:c,contentAlign:u,hoverEffect:f,allowWrapping:w}=t;if(f===!0&&n>0){r.textBaseline="alphabetic";const m=l.cellHorizontalPadding,g=l.cellVerticalPadding,h=Fo(c,r,l.baseFontFull,"alphabetic"),y=i.height-g,b=Math.min(y,h.actualBoundingBoxAscent*2.5);r.beginPath(),kn(r,i.x+m/2,i.y+(i.height-b)/2+1,h.width+m*3,b-1,l.roundingRadius??4),r.globalAlpha=n,r.fillStyle=ao(l.textDark,.1),r.fill(),r.globalAlpha=1,r.fillStyle=l.textDark,r.textBaseline="middle",s==null||s("text")}xn(e,c,u,w,o)},measure:(e,t,n)=>{const o=t.displayData.split(` +`,t.allowWrapping===!0?void 0:1);let r=0;for(const i of o)r=Math.max(r,e.measureText(i).width);return r+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:e.allowWrapping===!0,editor:t=>{const{isHighlighted:n,onChange:o,value:r,validatedSelection:i}=t;return a.createElement(Pr,{style:e.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:r.readonly!==!0,disabled:r.readonly===!0,altNewline:!0,value:r.data,validatedSelection:i,onChange:l=>o({...r,data:l.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},iu=tn("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),lu=e=>{const{uri:t,onChange:n,forceEditMode:o,readonly:r,validatedSelection:i,preview:l}=e,[s,c]=a.useState(!r&&(t===""||o)),u=a.useCallback(()=>{c(!0)},[]);return s?a.createElement(Pr,{validatedSelection:i,highlight:!0,autoFocus:!0,value:t,onChange:n}):a.createElement(iu,null,a.createElement("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer"},l),!r&&a.createElement("div",{className:"gdg-edit-icon",onClick:u},a.createElement(pi,null)),a.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},su=lu;function pl(e,t,n,o){let r=n.cellHorizontalPadding;const i=t.height/2-e.actualBoundingBoxAscent/2,l=e.width,s=e.actualBoundingBoxAscent;return o==="right"?r=t.width-l-n.cellHorizontalPadding:o==="center"&&(r=t.width/2-l/2),{x:r,y:i,width:l,height:s}}const au={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:J.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:nr,draw:e=>{const{cell:t,theme:n,overrideCursor:o,hoverX:r,hoverY:i,rect:l,ctx:s}=e,c=t.displayData??t.data,u=t.hoverEffect===!0;if(o!==void 0&&u&&r!==void 0&&i!==void 0){const f=Fo(c,s,n.baseFontFull),w=pl(f,l,n,t.contentAlign),{x:m,y:g,width:h,height:y}=w;if(r>=m-4&&r<=m-4+h+8&&i>=g-4&&i<=g-4+y+8){const b=qn(s,n.baseFontFull);o("pointer");const C=5,x=g-b;s.beginPath(),s.moveTo(l.x+m,Math.floor(l.y+x+y+C)+.5),s.lineTo(l.x+m+h,Math.floor(l.y+x+y+C)+.5),s.strokeStyle=n.linkColor,s.stroke(),s.save(),s.fillStyle=e.cellFillColor,xn({...e,rect:{...l,x:l.x-1}},c,t.contentAlign),xn({...e,rect:{...l,x:l.x-2}},c,t.contentAlign),xn({...e,rect:{...l,x:l.x+1}},c,t.contentAlign),xn({...e,rect:{...l,x:l.x+2}},c,t.contentAlign),s.restore()}}s.fillStyle=u?n.linkColor:n.textDark,xn(e,c,t.contentAlign)},onClick:e=>{const{cell:t,bounds:n,posX:o,posY:r,theme:i}=e,l=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return;const s=Tl(l,i.baseFontFull);if(s===void 0)return;const c=pl(s,n,i,t.contentAlign);Ro({x:c.x-4,y:c.y-4,width:c.width+8,height:c.height+8},o,r)&&t.onClickUri(e)},measure:(e,t,n)=>e.measureText(t.displayData??t.data).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:""}),provideEditor:e=>t=>{const{onChange:n,value:o,forceEditMode:r,validatedSelection:i}=t;return a.createElement(su,{forceEditMode:o.readonly!==!0&&(r||e.hoverEffect===!0&&e.onClickUri!==void 0),uri:o.data,preview:o.displayData??o.data,validatedSelection:i,readonly:o.readonly===!0,onChange:l=>n({...o,data:l.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},cu=[_d,Zd,Md,Fd,Ld,Od,Yd,Ud,eu,tu,ou,ru,au],ui=[];class du extends Ll{constructor(){super(...arguments);Oe(this,"imageLoaded",()=>{});Oe(this,"loadedLocations",[]);Oe(this,"cache",{});Oe(this,"sendLoaded",Ws(()=>{this.imageLoaded(new Jo(this.loadedLocations)),this.loadedLocations=[]},20));Oe(this,"clearOutOfWindow",()=>{const n=Object.keys(this.cache);for(const o of n){const r=this.cache[o];let i=!1;for(let l=0;l{c||(c=!0,ui.length<12?ui.unshift(s):l||(s.src=""))}},f=new Promise(w=>s.addEventListener("load",()=>w(null)));requestAnimationFrame(async()=>{try{s.src=n,await f,await s.decode();const w=this.cache[i];if(w!==void 0&&!c){w.img=s;for(const m of w.cells)this.loadedLocations.push(ki(m));l=!0,this.sendLoaded()}}catch{u.cancel()}}),this.cache[i]=u}loadOrGetImage(n,o,r){const i=n,l=this.cache[i];if(l!==void 0){const s=yn(o,r);return l.cells.includes(s)||l.cells.push(s),l.img}else this.loadImage(n,o,r,i)}}const uu=du,fu=(e,t)=>{const n=a.useMemo(()=>({...Ja,...e.headerIcons}),[e.headerIcons]),o=a.useMemo(()=>e.imageWindowLoader??new uu,[e.imageWindowLoader]);return a.createElement(Sd,{...e,renderers:cu,headerIcons:n,ref:t,imageWindowLoader:o})},Su=a.forwardRef(fu);export{Kc as C,Su as D,J as G,$l as T,Pr as a,en as b,Cu as c,xu as d,pu as e,ko as f,qn as g,_i as h,vu as i,So as j,Xs as k,Ca as l,Fo as m,Io as p,kn as r,ku as u}; +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = ["./data-grid-overlay-editor-LE8GSUsC.js","./index-BMVQvedj.js","./index-wocATsGp.js","./marked.esm-dbrxtycE.js","./iframe-MICdw5w5.js","./throttle-7EuXLZa7.js","./_baseIteratee-WTHxv43n.js","./flatten-qRvRBp6y.js","./number-overlay-editor-3ljU3NGx.js","./react-number-format.es-2Vaki8Uh.js"] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} \ No newline at end of file diff --git a/docs/assets/data-editor-all-MRDpHEQ_.js b/docs/assets/data-editor-all-MRDpHEQ_.js new file mode 100644 index 000000000..494fa301d --- /dev/null +++ b/docs/assets/data-editor-all-MRDpHEQ_.js @@ -0,0 +1,124 @@ +var $l=Object.defineProperty;var Fl=(e,o,l)=>o in e?$l(e,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[o]=l;var an=(e,o,l)=>(Fl(e,typeof o!="symbol"?o+"":o,l),l);import{s as hn,a as to,j as q,F as jn}from"./marked.esm-dbrxtycE.js";import{r as i,R as Me}from"./index-BMVQvedj.js";import{_ as Al}from"./iframe-MICdw5w5.js";import{G as Q,b as Go,i as Ho,r as qn,c as Po,C as X,g as ir,d as Gl,w as kt,e as Pl,f as Ol,m as un,h as Zn,I as Do,p as Kl,j as Nl,t as Wl,k as Ul,l as At,o as Jn,n as Qn,q as Bl,s as Eo,v as Io,x as Vl,y as _l,z as Xl,A as Yl,B as jl,D as er,E as eo,F as ql,H as Zl,J as tr,K as Jl,u as dn,L as Ql,M as ei,T as ti,N as or,O as oi,P as ni}from"./image-window-loader-aCHQvgUN.js";import{c as Rt,r as Gt,d as ri}from"./throttle-7EuXLZa7.js";import{u as li,f as nr}from"./flatten-qRvRBp6y.js";import{G as ii}from"./scrolling-data-grid-UJ5_dX2R.js";const Z='',ci=e=>{const o=e.fgColor,l=e.bgColor;return` + ${Z}`},si=e=>{const o=e.fgColor,l=e.bgColor;return` + ${Z}`},ai=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + + `},ui=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + +`},di=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + +`},cr=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + + + + `},fi=e=>{const o=e.bgColor;return`${Z} + + + + +`},hi=cr,gi=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + +`},mi=e=>{const o=e.fgColor,l=e.bgColor;return` + ${Z} + + + + + + + + `},vi=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + + +`},Ci=e=>{const o=e.fgColor,l=e.bgColor;return` + ${Z} + + + `},wi=e=>{const o=e.fgColor,l=e.bgColor;return` + ${Z} + + + `},pi=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + +`},bi=e=>{const o=e.fgColor,l=e.bgColor;return` + ${Z} + + + + `},yi=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + + +`},xi=e=>{const o=e.fgColor,l=e.bgColor;return` + ${Z} + + + + `},Mi=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + +`},Ri=e=>{const o=e.fgColor,l=e.bgColor;return` + ${Z} + + + `},ki=e=>{const o=e.fgColor,l=e.bgColor;return` + ${Z} + + + `},Si=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + +`},zi=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + + + + +`},Ti=e=>{const o=e.fgColor,l=e.bgColor;return` + ${Z} + + + `},Li=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + +`},Hi=e=>{const o=e.fgColor,l=e.bgColor;return` + ${Z} + + + `},Di=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + + +`},Ei=e=>{const o=e.fgColor,l=e.bgColor;return`${Z} + + +`},Ii=e=>{const o=e.fgColor;return` + + + `},$i=e=>{const o=e.fgColor;return` + + + +`},Fi={headerRowID:ci,headerNumber:ai,headerCode:si,headerString:ui,headerBoolean:di,headerAudioUri:hi,headerVideoUri:gi,headerEmoji:mi,headerImage:vi,headerUri:cr,headerPhone:Ci,headerMarkdown:wi,headerDate:pi,headerTime:bi,headerEmail:yi,headerReference:xi,headerIfThenElse:Mi,headerSingleValue:Ri,headerLookup:ki,headerTextTemplate:Si,headerMath:zi,headerRollup:Ti,headerJoinStrings:Li,headerSplitString:Hi,headerGeoDistance:Di,headerArray:Ei,rowOwnerOverlay:Ii,protectedColumnOverlay:$i,renameIcon:fi},Ai=hn("div")({name:"SearchWrapper",class:"slyseh9",propsAsIs:!1}),Gi=q("svg",{className:"button-icon",viewBox:"0 0 512 512",children:q("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})}),Pi=q("svg",{className:"button-icon",viewBox:"0 0 512 512",children:q("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})}),Oi=q("svg",{className:"button-icon",viewBox:"0 0 512 512",children:q("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})}),Ki=10,Ni=e=>{const{canvasRef:o,cellYOffset:l,rows:d,columns:C,searchInputRef:M,searchValue:b,searchResults:T,onSearchValueChange:k,getCellsForSelection:w,onSearchResultsChanged:p,showSearch:S=!1,onSearchClose:z}=e,[N]=i.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[O,le]=i.useState(""),ce=b??O,V=i.useCallback($=>{le($),k==null||k($)},[k]),[I,W]=i.useState(),Ce=i.useRef(I);Ce.current=I,i.useEffect(()=>{T!==void 0&&(T.length>0?W($=>({rowsSearched:d,results:T.length,selectedIndex:($==null?void 0:$.selectedIndex)??-1})):W(void 0))},[d,T]);const se=i.useRef();se.current===void 0&&(se.current=new AbortController);const de=i.useRef(),[Y,ee]=i.useState([]),te=T??Y,_=i.useCallback(()=>{de.current!==void 0&&(window.cancelAnimationFrame(de.current),de.current=void 0,se.current.abort())},[]),qe=i.useRef(l);qe.current=l;const He=i.useCallback($=>{const ie=new RegExp($.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let ae=qe.current,Ge=Math.min(10,d),Ze=0;W(void 0),ee([]);const ft=[],no=async()=>{var he;if(w===void 0)return;const Kt=performance.now(),Ko=d-Ze;let ht=w({x:0,y:ae,width:C.length,height:Math.min(Ge,Ko,d-ae)},se.current.signal);typeof ht=="function"&&(ht=await ht());let Nt=!1;for(const[Ee,No]of ht.entries())for(const[Wo,Qe]of No.entries()){let Pe;switch(Qe.kind){case Q.Text:case Q.Number:Pe=Qe.displayData;break;case Q.Uri:case Q.Markdown:Pe=Qe.data;break;case Q.Boolean:Pe=typeof Qe.data=="boolean"?Qe.data.toString():void 0;break;case Q.Image:case Q.Bubble:Pe=Qe.data.join("🐳");break;case Q.Custom:Pe=Qe.copyData;break}Pe!==void 0&&ie.test(Pe)&&(ft.push([Wo,Ee+ae]),Nt=!0)}const gt=performance.now();Nt&&ee([...ft]),Ze+=ht.length,Go(Ze<=d);const nt=((he=Ce.current)==null?void 0:he.selectedIndex)??-1;W({results:ft.length,rowsSearched:Ze,selectedIndex:nt}),p==null||p(ft,nt),ae+Ge>=d?ae=0:ae+=Ge;const mt=gt-Kt,vt=Math.max(mt,1),Je=Ki/vt;Ge=Math.ceil(Ge*Je),Ze{var $;z==null||z(),W(void 0),ee([]),p==null||p([],-1),_(),($=o==null?void 0:o.current)==null||$.focus()},[_,o,z,p]),Pt=i.useCallback($=>{V($.target.value),T===void 0&&($.target.value===""?(W(void 0),ee([]),_()):He($.target.value))},[He,_,V,T]);i.useEffect(()=>{S&&M.current!==null&&(V(""),M.current.focus({preventScroll:!0}))},[S,M,V]);const De=i.useCallback($=>{var ae;if((ae=$==null?void 0:$.stopPropagation)==null||ae.call($),I===void 0)return;const ie=(I.selectedIndex+1)%I.results;W({...I,selectedIndex:ie}),p==null||p(te,ie)},[I,p,te]),Se=i.useCallback($=>{var ae;if((ae=$==null?void 0:$.stopPropagation)==null||ae.call($),I===void 0)return;let ie=(I.selectedIndex-1)%I.results;ie<0&&(ie+=I.results),W({...I,selectedIndex:ie}),p==null||p(te,ie)},[p,te,I]),Ot=i.useCallback($=>{($.ctrlKey||$.metaKey)&&$.nativeEvent.code==="KeyF"||$.key==="Escape"?(Be(),$.stopPropagation(),$.preventDefault()):$.key==="Enter"&&($.shiftKey?Se():De())},[Be,De,Se]);i.useEffect(()=>()=>{_()},[_]);const[Ae,oo]=i.useState(!1);i.useEffect(()=>{if(S)oo(!0);else{const $=setTimeout(()=>oo(!1),150);return()=>clearTimeout($)}},[S]);const Ve=i.useMemo(()=>{if(!S&&!Ae)return null;let $;I!==void 0&&($=I.results>=1e3?"over 1000":`${I.results} result${I.results!==1?"s":""}`,I.selectedIndex>=0&&($=`${I.selectedIndex+1} of ${$}`));const ie=Ze=>{Ze.stopPropagation()},Ge={width:`${Math.floor(((I==null?void 0:I.rowsSearched)??0)/d*100)}%`};return to(Ai,{className:S?"":"out",onMouseDown:ie,onMouseMove:ie,onMouseUp:ie,onClick:ie,children:[to("div",{className:"gdg-search-bar-inner",children:[q("input",{id:N,"aria-hidden":!S,"data-testid":"search-input",ref:M,onChange:Pt,value:ce,tabIndex:S?void 0:-1,onKeyDownCapture:Ot}),q("button",{"aria-label":"Previous Result","aria-hidden":!S,tabIndex:S?void 0:-1,onClick:Se,disabled:((I==null?void 0:I.results)??0)===0,children:Gi}),q("button",{"aria-label":"Next Result","aria-hidden":!S,tabIndex:S?void 0:-1,onClick:De,disabled:((I==null?void 0:I.results)??0)===0,children:Pi}),z!==void 0&&q("button",{"aria-label":"Close Search","aria-hidden":!S,"data-testid":"search-close-button",tabIndex:S?void 0:-1,onClick:Be,children:Oi})]}),I!==void 0?to(jn,{children:[q("div",{className:"gdg-search-status",children:q("div",{"data-testid":"search-result-area",children:$})}),q("div",{className:"gdg-search-progress",style:Ge})]}):q("div",{className:"gdg-search-status",children:q("label",{htmlFor:N,children:"Type to search"})})]})},[S,Ae,I,d,N,M,Pt,ce,Ot,Se,De,z,Be]);return to(jn,{children:[q(ii,{prelightCells:te,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,className:e.className,clientSize:e.clientSize,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,nonGrowWidth:e.nonGrowWidth,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,initialSize:e.initialSize,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,onVisibleRegionChanged:e.onVisibleRegionChanged,overscrollX:e.overscrollX,overscrollY:e.overscrollY,preventDiagonalScrolling:e.preventDiagonalScrolling,rightElement:e.rightElement,rightElementProps:e.rightElementProps,rowHeight:e.rowHeight,rows:e.rows,scrollRef:e.scrollRef,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,onColumnProposeMove:e.onColumnProposeMove,drawFocusRing:e.drawFocusRing,drawCell:e.drawCell,drawHeader:e.drawHeader,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator}),Ve]})},Wi=Ni;class Ui extends i.PureComponent{constructor(){super(...arguments);an(this,"wrapperRef",i.createRef());an(this,"clickOutside",l=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(l))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(l.target)){let d=l.target;for(;d!==null;){if(d.classList.contains("click-outside-ignore"))return;d=d.parentElement}this.props.onClickOutside()}})}componentDidMount(){document.addEventListener("touchend",this.clickOutside,!0),document.addEventListener("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener("touchend",this.clickOutside,!0),document.removeEventListener("mousedown",this.clickOutside,!0),document.removeEventListener("contextmenu",this.clickOutside,!0)}render(){const{onClickOutside:l,isOutsideClick:d,...C}=this.props;return q("div",{...C,ref:this.wrapperRef,children:this.props.children})}}const Bi=()=>e=>Math.max(16,e.targetHeight-10),Vi=hn("input")({name:"RenameInput",class:"r1fzhvm4",propsAsIs:!1,vars:{"r1fzhvm4-0":[Bi(),"px"]}}),_i=e=>{const{bounds:o,group:l,onClose:d,canvasBounds:C,onFinish:M}=e,[b,T]=Me.useState(l);return q(Ui,{style:{position:"absolute",left:o.x-C.left+1,top:o.y-C.top,width:o.width-2,height:o.height},className:"c181oggi",onClickOutside:d,children:q(Vi,{targetHeight:o.height,"data-testid":"group-rename-input",value:b,onBlur:d,onFocus:k=>k.target.setSelectionRange(0,b.length),onChange:k=>T(k.target.value),onKeyDown:k=>{k.key==="Enter"?M(b):k.key==="Escape"&&d()},autoFocus:!0})})},fn=150;function Xi(e,o,l,d){var M;const C=d(o);return((M=C==null?void 0:C.measure)==null?void 0:M.call(C,e,o,l))??fn}function sr(e,o,l,d,C,M,b,T,k){let w=0;const p=C===void 0?[]:C.map(z=>{const N=Xi(e,z[d],o,k);return w=Math.max(w,N),N});if(p.length>5&&T){w=0;let z=0;for(const O of p)z+=O;const N=z/p.length;for(let O=0;O=N*2?p[O]=0:w=Math.max(w,p[O])}w=Math.max(w,e.measureText(l.title).width+16+(l.icon===void 0?0:28));const S=Math.max(Math.ceil(M),Math.min(Math.floor(b),Math.ceil(w)));return{...l,width:S}}function Yi(e,o,l,d,C,M,b,T,k){const w=i.useRef(o),p=i.useRef(l),S=i.useRef(b);w.current=o,p.current=l,S.current=b;const[z,N]=i.useMemo(()=>{if(typeof window>"u")return[null,null];const I=document.createElement("canvas");return I.style.display="none",I.style.opacity="0",I.style.position="fixed",[I,I.getContext("2d",{alpha:!1})]},[]);i.useLayoutEffect(()=>(z&&document.documentElement.append(z),()=>{z==null||z.remove()}),[z]);const O=i.useRef({}),le=i.useRef(),[ce,V]=i.useState();return i.useLayoutEffect(()=>{const I=p.current;if(I===void 0||e.every(Ho))return;let W=Math.max(1,10-Math.floor(e.length/1e4)),Ce=0;W1&&(W--,Ce=1);const se={x:0,y:0,width:e.length,height:Math.min(w.current,W)},de={x:0,y:w.current-1,width:e.length,height:1};(async()=>{const ee=I(se,k.signal),te=Ce>0?I(de,k.signal):void 0;let _;typeof ee=="object"?_=ee:_=await qn(ee),te!==void 0&&(typeof te=="object"?_=[..._,...te]:_=[..._,...await qn(te)]),le.current=e,V(_)})()},[k.signal,e]),i.useMemo(()=>{let W=e.every(Ho)?e:N===null?e.map(Y=>Ho(Y)?Y:{...Y,width:fn}):(N.font=S.current.baseFontFull,e.map((Y,ee)=>{if(Ho(Y))return Y;if(O.current[Y.id]!==void 0)return{...Y,width:O.current[Y.id]};if(ce===void 0||le.current!==e||Y.id===void 0)return{...Y,width:fn};const te=sr(N,b,Y,ee,ce,C,M,!0,T);return O.current[Y.id]=te.width,te})),Ce=0,se=0;const de=[];for(const[Y,ee]of W.entries())Ce+=ee.width,ee.grow!==void 0&&ee.grow>0&&(se+=ee.grow,de.push(Y));if(Ce0){const Y=[...W],ee=d-Ce;let te=ee;for(let _=0;_1&&e.startsWith("_")?Number.parseInt(e.slice(1))===o.keyCode:e.length===1&&e>="a"&&e<="z"?e.toUpperCase().codePointAt(0)===o.keyCode:e===o.key}function A(e,o,l){const d=ar(e,o);return d&&(l.didMatch=!0),d}function ar(e,o){if(e.length===0)return!1;if(e.includes("|")){const k=e.split("|");for(const w of k)if(ar(w,o))return!0;return!1}let l=!1,d=!1,C=!1,M=!1;const b=e.split("+"),T=b.pop();if(!ji(T,o))return!1;if(b[0]==="any")return!0;for(const k of b)switch(k){case"ctrl":l=!0;break;case"shift":d=!0;break;case"alt":C=!0;break;case"meta":M=!0;break;case"primary":Po.value?M=!0:l=!0;break}return o.altKey===C&&o.ctrlKey===l&&o.shiftKey===d&&o.metaKey===M}function qi(e,o,l,d,C,M){const b=Me.useCallback((w,p,S,z)=>{var I;(M==="cell"||M==="multi-cell")&&w!==void 0&&(w={...w,range:{x:w.cell[0],y:w.cell[1],width:1,height:1}});const N=l==="mixed"&&(S||z==="drag"),O=d==="mixed"&&N,le=C==="mixed"&&N;let ce={current:w===void 0?void 0:{...w,rangeStack:z==="drag"?((I=e.current)==null?void 0:I.rangeStack)??[]:[]},columns:O?e.columns:X.empty(),rows:le?e.rows:X.empty()};S&&(M==="multi-rect"||M==="multi-cell")&&ce.current!==void 0&&e.current!==void 0&&(ce={...ce,current:{...ce.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),o(ce,p)},[d,e,l,M,C,o]),T=Me.useCallback((w,p,S)=>{w=w??e.rows,p!==void 0&&(w=w.add(p));let z;if(C==="exclusive"&&w.length>0)z={current:void 0,columns:X.empty(),rows:w};else{const N=S&&l==="mixed",O=S&&d==="mixed";z={current:N?e.current:void 0,columns:O?e.columns:X.empty(),rows:w}}o(z,!1)},[d,e,l,C,o]),k=Me.useCallback((w,p,S)=>{w=w??e.columns,p!==void 0&&(w=w.add(p));let z;if(d==="exclusive"&&w.length>0)z={current:void 0,rows:X.empty(),columns:w};else{const N=S&&l==="mixed",O=S&&C==="mixed";z={current:N?e.current:void 0,rows:O?e.rows:X.empty(),columns:w}}o(z,!1)},[d,e,l,C,o]);return[b,T,k]}function Zi(e,o,l,d,C){const M=i.useCallback(w=>{if(e===!0){const p=[];for(let S=w.y;S=C?z.push({kind:Q.Loading,allowOverlay:!1}):z.push(o([N,S]));p.push(z)}return p}return(e==null?void 0:e(w,d.signal))??[]},[d.signal,o,e,C]),b=e!==void 0?M:void 0,T=i.useCallback(w=>{if(b===void 0)return[];const p={...w,x:w.x-l};if(p.x<0){p.x=0,p.width--;const S=b(p,d.signal);return typeof S=="function"?async()=>(await S()).map(z=>[{kind:Q.Loading,allowOverlay:!1},...z]):S.map(z=>[{kind:Q.Loading,allowOverlay:!1},...z])}return b(p,d.signal)},[d.signal,b,l]);return[e!==void 0?T:void 0,b]}function rr(e){return typeof e=="string"?e:`${e}px`}const Ji=()=>e=>e.innerWidth,Qi=()=>e=>e.innerHeight,ec=hn("div")({name:"Wrapper",class:"w2q57ts",propsAsIs:!1,vars:{"w2q57ts-0":[Ji()],"w2q57ts-1":[Qi()]}}),tc=e=>{const{inWidth:o,inHeight:l,children:d,...C}=e;return q(ec,{innerHeight:rr(l),innerWidth:rr(o),...C,children:d})},oc=2,nc=1300;function rc(e,o,l){const d=Me.useRef(0),[C,M]=e??[0,0];Me.useEffect(()=>{if(C===0&&M===0){d.current=0;return}let b=!1,T=0;const k=w=>{var p;if(!b){if(T===0)T=w;else{const S=w-T;d.current=Math.min(1,d.current+S/nc);const z=d.current**1.618*S*oc;(p=o.current)==null||p.scrollBy(C*z,M*z),T=w,l==null||l()}window.requestAnimationFrame(k)}};return window.requestAnimationFrame(k),()=>{b=!0}},[o,C,M,l])}function lc({rowHeight:e,headerHeight:o,groupHeaderHeight:l,theme:d,overscrollX:C,overscrollY:M,scaleToRem:b,remSize:T}){const[k,w,p,S,z,N]=Me.useMemo(()=>{if(!b||T===16)return[e,o,l,d,C,M];const O=T/16,le=e,ce=ir();return[typeof le=="number"?le*O:V=>Math.ceil(le(V)*O),Math.ceil(o*O),Math.ceil(l*O),{...d,headerIconSize:((d==null?void 0:d.headerIconSize)??ce.headerIconSize)*O,cellHorizontalPadding:((d==null?void 0:d.cellHorizontalPadding)??ce.cellHorizontalPadding)*O,cellVerticalPadding:((d==null?void 0:d.cellVerticalPadding)??ce.cellVerticalPadding)*O},Math.ceil((C??0)*O),Math.ceil((M??0)*O)]},[l,o,C,M,T,e,b,d]);return{rowHeight:k,headerHeight:w,groupHeaderHeight:p,theme:S,overscrollX:z,overscrollY:N}}const dt={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function G(e,o){return e===!0?o:e===!1?"":e}function lr(e){const o=Po.value;return{activateCell:G(e.activateCell," |Enter|shift+Enter"),clear:G(e.clear,"any+Escape"),closeOverlay:G(e.closeOverlay,"any+Escape"),acceptOverlayDown:G(e.acceptOverlayDown,"Enter"),acceptOverlayUp:G(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:G(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:G(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:G(e.delete,o?"Backspace|Delete":"Delete"),downFill:G(e.downFill,"primary+_68"),scrollToSelectedCell:G(e.scrollToSelectedCell,"primary+Enter"),goDownCell:G(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:G(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:G(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:G(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:G(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:G(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:G(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:G(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:G(e.goToFirstCell,"primary+Home"),goToFirstColumn:G(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:G(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:G(e.goToLastCell,"primary+End"),goToLastColumn:G(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:G(e.goToLastRow,"primary+ArrowDown"),goToNextPage:G(e.goToNextPage,"PageDown"),goToPreviousPage:G(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:G(e.rightFill,"primary+_82"),search:G(e.search,"primary+f"),selectAll:G(e.selectAll,"primary+a"),selectColumn:G(e.selectColumn,"ctrl+ "),selectGrowDown:G(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:G(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:G(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:G(e.selectGrowUp,"shift+ArrowUp"),selectRow:G(e.selectRow,"shift+ "),selectToFirstCell:G(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:G(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:G(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:G(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:G(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:G(e.selectToLastRow,"primary+shift+ArrowDown")}}function ic(e){const o=Gl(e);return Me.useMemo(()=>{if(o===void 0)return lr(dt);const l={...o,goToNextPage:(o==null?void 0:o.goToNextPage)??(o==null?void 0:o.pageDown)??dt.goToNextPage,goToPreviousPage:(o==null?void 0:o.goToPreviousPage)??(o==null?void 0:o.pageUp)??dt.goToPreviousPage,goToFirstCell:(o==null?void 0:o.goToFirstCell)??(o==null?void 0:o.first)??dt.goToFirstCell,goToLastCell:(o==null?void 0:o.goToLastCell)??(o==null?void 0:o.last)??dt.goToLastCell,selectToFirstCell:(o==null?void 0:o.selectToFirstCell)??(o==null?void 0:o.first)??dt.selectToFirstCell,selectToLastCell:(o==null?void 0:o.selectToLastCell)??(o==null?void 0:o.last)??dt.selectToLastCell};return lr({...dt,...l})},[o])}function cc(e){function o(d,C,M){if(typeof d=="number")return{headerIndex:d,isCollapsed:!1,depth:C,path:M};const b={headerIndex:d.headerIndex,isCollapsed:d.isCollapsed,depth:C,path:M};return d.subGroups!==void 0&&(b.subGroups=d.subGroups.map((T,k)=>o(T,C+1,[...M,k])).sort((T,k)=>T.headerIndex-k.headerIndex)),b}return e.map((d,C)=>o(d,0,[C])).sort((d,C)=>d.headerIndex-C.headerIndex)}function gn(e,o){const l=[];function d(b,T,k=!1){let w=T!==null?T-b.headerIndex:o-b.headerIndex;if(b.subGroups!==void 0&&(w=b.subGroups[0].headerIndex-b.headerIndex),w--,l.push({headerIndex:b.headerIndex,contentIndex:-1,skip:k,isCollapsed:b.isCollapsed,depth:b.depth,path:b.path,rows:w}),b.subGroups)for(let p=0;pb.skip===!1).map(b=>{const{skip:T,...k}=b;return k})}function Oo(e,o){if(o===void 0||gn.length===0)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let l=e;for(const d of o){if(l===0)return{path:[...d.path,-1],originalIndex:d.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:d.rows};if(l--,!d.isCollapsed){if(le===void 0?void 0:gn(e,o),[e,o]),M=Me.useMemo(()=>C===void 0?o:C.reduce((w,p)=>w+(p.isCollapsed?1:p.rows+1),0),[C,o]),b=Me.useMemo(()=>e===void 0||typeof l=="number"&&e.height===l?l:w=>{const{isGroupHeader:p}=Oo(w,C);return p?e.height:typeof l=="number"?l:l(w)},[C,e,l]),T=Me.useCallback(w=>{if(C===void 0)return w;let p=w;for(const S of C){if(p===0)return;if(p--,!S.isCollapsed){if(p{if(e===void 0)return d==null?void 0:d(w,w,w);if(d===void 0&&(e==null?void 0:e.themeOverride)===void 0)return;const{isGroupHeader:p,contentIndex:S,groupIndex:z}=Oo(w,C);return p?e.themeOverride:d==null?void 0:d(w,z,S)},[C,d,e]));return e===void 0?{rowHeight:b,rows:o,rowNumberMapper:T,getRowThemeOverride:k}:{rowHeight:b,rows:M,rowNumberMapper:T,getRowThemeOverride:k}}function ac(e,o){const l=Me.useMemo(()=>e===void 0?void 0:gn(e,o),[e,o]);return{getRowGroupingForPath:dr,updateRowGroupingByPath:ur,mapper:Me.useCallback(d=>{if(typeof d=="number")return Oo(d,l);const C=Oo(d[1],l);return{...C,originalIndex:[d[0],C.originalIndex]}},[l])}}function ur(e,o,l){const[d,...C]=o;return C[0]===-1?e.map((M,b)=>b===d?{...M,...l}:M):e.map((M,b)=>b===d?{...M,subGroups:ur(M.subGroups??[],C,l)}:M)}function dr(e,o){const[l,...d]=o;return d[0]===-1?e[l]:dr(e[l].subGroups??[],d)}function uc(e,o){const l=i.useRef(e),d=i.useRef(o);return d.current=o,i.useMemo(()=>({get current(){return l.current},set current(C){l.current!==C&&(l.current=C,d.current(C))}}),[])}function dc(e,o,l,d,C){const[M,b]=i.useMemo(()=>[o!==void 0&&typeof l=="number"?Math.floor(o/l):0,o!==void 0&&typeof l=="number"?-(o%l):0],[o,l]),T=i.useMemo(()=>({x:d.current.x,y:M,width:d.current.width??1,height:d.current.height??1,ty:b}),[d,b,M]),[k,w,p]=Pl(T),S=i.useRef(C);S.current=C;const z=uc(null,le=>{le!==null&&o!==void 0?le.scrollTop=o:le!==null&&e!==void 0&&(le.scrollLeft=e)}),N=(k.height??1)>1;i.useLayoutEffect(()=>{if(o!==void 0&&z.current!==null&&N){if(z.current.scrollTop===o)return;z.current.scrollTop=o,z.current.scrollTop!==o&&p(),S.current()}},[o,N,p,z]);const O=(k.width??1)>1;return i.useLayoutEffect(()=>{if(e!==void 0&&z.current!==null&&O){if(z.current.scrollLeft===e)return;z.current.scrollLeft=e,z.current.scrollLeft!==e&&p(),S.current()}},[e,O,p,z]),{visibleRegion:k,setVisibleRegion:w,scrollRef:z}}const fc=i.lazy(async()=>await Al(()=>import("./data-grid-overlay-editor-I8cicvj5.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url));let hc=0;function gc(e){return li(nr(nr(e).filter(o=>o.span!==void 0).map(o=>{var l,d;return Gt((((l=o.span)==null?void 0:l[0])??0)+1,(((d=o.span)==null?void 0:d[1])??0)+1)})))}function $o(e,o){return e===void 0||o===0||e.columns.length===0&&e.current===void 0?e:{current:e.current===void 0?void 0:{cell:[e.current.cell[0]+o,e.current.cell[1]],range:{...e.current.range,x:e.current.range.x+o},rangeStack:e.current.rangeStack.map(l=>({...l,x:l.x+o}))},rows:e.rows,columns:e.columns.offset(o)}}const Fo={kind:Q.Loading,allowOverlay:!1},Ao={columns:X.empty(),rows:X.empty(),current:void 0},mc=(e,o)=>{var _n,Xn,Yn;const[l,d]=i.useState(Ao),[C,M]=i.useState(),b=i.useRef(null),T=i.useRef(null),[k,w]=i.useState(),p=i.useRef(),S=typeof window>"u"?null:window,{imageEditorOverride:z,getRowThemeOverride:N,markdownDivCreateNode:O,width:le,height:ce,columns:V,rows:I,getCellContent:W,onCellClicked:Ce,onCellActivated:se,onFillPattern:de,onFinishedEditing:Y,coercePasteValue:ee,drawHeader:te,drawCell:_,editorBloom:qe,onHeaderClicked:He,onColumnProposeMove:Be,spanRangeBehavior:Pt="default",onGroupHeaderClicked:De,onCellContextMenu:Se,className:Ot,onHeaderContextMenu:Ae,getCellsForSelection:oo,onGroupHeaderContextMenu:Ve,onGroupHeaderRenamed:$,onCellEdited:ie,onCellsEdited:ae,onSearchResultsChanged:Ge,searchResults:Ze,onSearchValueChange:ft,searchValue:no,onKeyDown:Kt,onKeyUp:Ko,keybindings:ht,editOnType:Nt=!0,onRowAppended:gt,onColumnMoved:nt,validateCell:mt,highlightRegions:vt,rangeSelect:Je="rect",columnSelect:he="multi",rowSelect:Ee="multi",rangeSelectionBlending:No="exclusive",columnSelectionBlending:Wo="exclusive",rowSelectionBlending:Qe="exclusive",onDelete:Pe,onDragStart:ro,onMouseMove:lo,onPaste:Ct,copyHeaders:mn=!1,freezeColumns:et=0,cellActivationBehavior:Uo="second-click",rowSelectionMode:Bo="auto",onHeaderMenuClick:io,onHeaderIndicatorClick:co,getGroupDetails:so,rowGrouping:rt,onSearchClose:Vo,onItemHovered:ao,onSelectionCleared:lt,showSearch:fr,onVisibleRegionChanged:uo,gridSelection:wt,onGridSelectionChange:_o,minColumnWidth:hr=50,maxColumnWidth:gr=500,maxColumnAutoWidth:mr,provideEditor:vr,trailingRowOptions:U,freezeTrailingRows:tt=0,allowedFillDirections:vn="orthogonal",scrollOffsetX:Cr,scrollOffsetY:wr,verticalBorder:St,onDragOverCell:pr,onDrop:br,onColumnResize:Wt,onColumnResizeEnd:Ut,onColumnResizeStart:Bt,customRenderers:fo,fillHandle:yr,drawFocusRing:Cn=!0,experimental:ge,fixedShadowX:xr,fixedShadowY:Mr,headerIcons:Rr,imageWindowLoader:kr,initialSize:Sr,isDraggable:zr,onDragLeave:Tr,onRowMoved:Vt,overscrollX:Lr,overscrollY:Hr,preventDiagonalScrolling:Dr,rightElement:Er,rightElementProps:Ir,trapFocus:wn=!1,smoothScrollX:$r,smoothScrollY:Fr,scaleToRem:Ar=!1,rowHeight:Gr=34,headerHeight:pn=36,groupHeaderHeight:Pr=pn,theme:Or,isOutsideClick:Kr,renderers:Xo,resizeIndicator:Nr}=e,we=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,Oe=(we==null?void 0:we.kind)??e.rowMarkers??"none",Wr=(we==null?void 0:we.width)??e.rowMarkerWidth,bn=(we==null?void 0:we.startIndex)??e.rowMarkerStartIndex??1,yn=(we==null?void 0:we.theme)??e.rowMarkerTheme,ho=(we==null?void 0:we.checkboxStyle)??"square",zt=Math.max(hr,20),go=Math.max(gr,zt),Ur=Math.max(mr??go,zt),xn=i.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:F,rowNumberMapper:Mn,rowHeight:Br,getRowThemeOverride:ot}=sc(rt,I,Gr,N),Vr=i.useMemo(()=>Number.parseFloat(xn.fontSize),[xn]),{rowHeight:it,headerHeight:Yo,groupHeaderHeight:Rn,theme:kn,overscrollX:_r,overscrollY:Xr}=lc({groupHeaderHeight:Pr,headerHeight:pn,overscrollX:Lr,overscrollY:Hr,remSize:Vr,rowHeight:Br,scaleToRem:Ar,theme:Or}),ct=ic(ht),Tt=Wr??(I>1e4?48:I>1e3?44:I>100?36:32),_e=Oe!=="none",u=_e?1:0,oe=gt!==void 0,_t=(U==null?void 0:U.sticky)===!0,[Yr,Sn]=i.useState(!1),jr=fr??Yr,qr=i.useCallback(()=>{Vo!==void 0?Vo():Sn(!1)},[Vo]),h=i.useMemo(()=>wt===void 0?void 0:$o(wt,u),[wt,u])??l,Re=i.useRef();Re.current===void 0&&(Re.current=new AbortController),i.useEffect(()=>()=>Re==null?void 0:Re.current.abort(),[]);const[fe,Zr]=Zi(oo,W,u,Re.current,F),Jr=i.useCallback((t,r,n)=>{if(mt===void 0)return!0;const s=[t[0]-u,t[1]];return mt==null?void 0:mt(s,r,n)},[u,mt]),mo=i.useRef(wt),Ie=i.useCallback((t,r)=>{r&&(t=Ol(t,fe,u,Pt,Re.current)),_o!==void 0?(mo.current=$o(t,-u),_o(mo.current)):d(t)},[_o,fe,u,Pt]),Lt=kt(Wt,i.useCallback((t,r,n,s)=>{Wt==null||Wt(V[n-u],r,n-u,s)},[Wt,u,V])),Qr=kt(Ut,i.useCallback((t,r,n,s)=>{Ut==null||Ut(V[n-u],r,n-u,s)},[Ut,u,V])),el=kt(Bt,i.useCallback((t,r,n,s)=>{Bt==null||Bt(V[n-u],r,n-u,s)},[Bt,u,V])),tl=kt(te,i.useCallback((t,r)=>(te==null?void 0:te({...t,columnIndex:t.columnIndex-u},r))??!1,[te,u])),ol=kt(_,i.useCallback((t,r)=>(_==null?void 0:_({...t,col:t.col-u},r))??!1,[_,u])),st=i.useCallback(t=>{if(Pe!==void 0){const r=Pe($o(t,-u));return typeof r=="boolean"?r:$o(r,u)}return!0},[Pe,u]),[pe,be,ue]=qi(h,Ie,No,Wo,Qe,Je),me=i.useMemo(()=>un(ir(),kn),[kn]),[jo,nl]=i.useState([0,0,0]),zn=i.useMemo(()=>{if(Xo===void 0)return{};const t={};for(const r of Xo)t[r.kind]=r;return t},[Xo]),ye=i.useCallback(t=>t.kind!==Q.Custom?zn[t.kind]:fo==null?void 0:fo.find(r=>r.isMatch(t)),[fo,zn]);let{sizedColumns:ze,nonGrowWidth:Tn}=Yi(V,F,Zr,jo[0]-(u===0?0:Tt)-jo[2],zt,Ur,me,ye,Re.current);Oe!=="none"&&(Tn+=Tt);const qo=i.useMemo(()=>ze.some(t=>t.group!==void 0),[ze]),Xt=qo?Yo+Rn:Yo,Ln=h.rows.length,Hn=Oe==="none"?void 0:Ln===0?!1:Ln===F?!0:void 0,B=i.useMemo(()=>Oe==="none"?ze:[{title:"",width:Tt,icon:void 0,hasMenu:!1,style:"normal",themeOverride:yn,rowMarker:ho,rowMarkerChecked:Hn},...ze],[Oe,ze,Tt,yn,ho,Hn]),Te=i.useRef({height:1,width:1,x:0,y:0}),vo=i.useRef(!1),{setVisibleRegion:Dn,visibleRegion:pt,scrollRef:j}=dc(Cr,wr,it,Te,()=>vo.current=!0);Te.current=pt;const rl=pt.x+u,Co=pt.y,ke=i.useRef(null),xe=i.useCallback(t=>{var r;t===!0?(r=ke.current)==null||r.focus():window.requestAnimationFrame(()=>{var n;(n=ke.current)==null||n.focus()})},[]),ve=oe?F+1:F,$e=i.useCallback(t=>{const r=u===0?t:t.map(s=>({...s,location:[s.location[0]-u,s.location[1]]})),n=ae==null?void 0:ae(r);if(n!==!0)for(const s of r)ie==null||ie(s.location,s.value);return n},[ie,ae,u]),[bt,Zo]=i.useState(),wo=h.current!==void 0&&h.current.range.width*h.current.range.height>1?h.current.range:void 0,Ht=Cn?(_n=h.current)==null?void 0:_n.cell:void 0,po=Ht==null?void 0:Ht[0],bo=Ht==null?void 0:Ht[1],ll=i.useMemo(()=>{if((vt===void 0||vt.length===0)&&(wo??po??bo??bt)===void 0)return;const t=[];if(vt!==void 0)for(const r of vt){const n=B.length-r.range.x-u;n>0&&t.push({color:r.color,range:{...r.range,x:r.range.x+u,width:Math.min(n,r.range.width)},style:r.style})}return bt!==void 0&&t.push({color:Zn(me.accentColor,0),range:bt,style:"dashed"}),wo!==void 0&&t.push({color:Zn(me.accentColor,.5),range:wo,style:"solid-outline"}),po!==void 0&&bo!==void 0&&t.push({color:me.accentColor,range:{x:po,y:bo,width:1,height:1},style:"solid-outline"}),t.length>0?t:void 0},[bt,wo,po,bo,vt,B.length,me.accentColor,u]),En=i.useRef(B);En.current=B;const Le=i.useCallback(([t,r],n=!1)=>{var g,a,f,m,v,y,L;const s=oe&&r===ve-1;if(t===0&&_e){if(s)return Fo;const x=Mn(r);return x===void 0?Fo:{kind:Do.Marker,allowOverlay:!1,checkboxStyle:ho,checked:(h==null?void 0:h.rows.hasIndex(r))===!0,markerKind:Oe==="clickable-number"?"number":Oe,row:bn+x,drawHandle:Vt!==void 0,cursor:Oe==="clickable-number"?"pointer":void 0}}else if(s){const D=t===u?(U==null?void 0:U.hint)??"":"",R=En.current[t];if(((g=R==null?void 0:R.trailingRowOptions)==null?void 0:g.disabled)===!0)return Fo;{const P=((a=R==null?void 0:R.trailingRowOptions)==null?void 0:a.hint)??D,E=((f=R==null?void 0:R.trailingRowOptions)==null?void 0:f.addIcon)??(U==null?void 0:U.addIcon);return{kind:Do.NewRow,hint:P,allowOverlay:!1,icon:E}}}else{const x=t-u;if(n||(ge==null?void 0:ge.strict)===!0){const R=Te.current,P=R.x>x||x>R.x+R.width||R.y>r||r>R.y+R.height||r>=Qo.current,E=x===((v=(m=R.extras)==null?void 0:m.selected)==null?void 0:v[0])&&r===((y=R.extras)==null?void 0:y.selected[1]);let H=!1;if(((L=R.extras)==null?void 0:L.freezeRegions)!==void 0){for(const K of R.extras.freezeRegions)if(Kl(K,x,r)){H=!0;break}}if(P&&!E&&!H)return Fo}let D=W([x,r]);return u!==0&&D.span!==void 0&&(D={...D,span:[D.span[0]+u,D.span[1]+u]}),D}},[oe,ve,_e,Mn,ho,h==null?void 0:h.rows,Oe,bn,Vt,u,U==null?void 0:U.hint,U==null?void 0:U.addIcon,ge==null?void 0:ge.strict,W]),Jo=i.useCallback(t=>{let r=(so==null?void 0:so(t))??{name:t};return $!==void 0&&t!==""&&(r={icon:r.icon,name:r.name,overrideTheme:r.overrideTheme,actions:[...r.actions??[],{title:"Rename",icon:"renameIcon",onClick:n=>tn({group:r.name,bounds:n.bounds})}]}),r},[so,$]),yo=i.useCallback(t=>{var f;const[r,n]=t.cell,s=B[r],c=(s==null?void 0:s.group)!==void 0?(f=Jo(s.group))==null?void 0:f.overrideTheme:void 0,g=s==null?void 0:s.themeOverride,a=ot==null?void 0:ot(n);M({...t,theme:un(me,c,g,a,t.content.themeOverride)})},[ot,B,Jo,me]),Dt=i.useCallback((t,r,n)=>{var a;if(h.current===void 0)return;const[s,c]=h.current.cell,g=Le([s,c]);if(g.kind!==Q.Boolean&&g.allowOverlay){let f=g;if(n!==void 0)switch(f.kind){case Q.Number:{const m=Nl(()=>n==="-"?-0:Number.parseFloat(n),0);f={...f,data:Number.isNaN(m)?0:m};break}case Q.Text:case Q.Markdown:case Q.Uri:f={...f,data:n};break}yo({target:t,content:f,initialValue:n,cell:[s,c],highlight:n===void 0,forceEditMode:n!==void 0})}else g.kind===Q.Boolean&&r&&g.readonly!==!0&&($e([{location:h.current.cell,value:{...g,data:Wl(g.data)}}]),(a=ke.current)==null||a.damage([{cell:h.current.cell}]))},[Le,h,$e,yo]),In=i.useCallback((t,r)=>{var c;const n=(c=ke.current)==null?void 0:c.getBounds(t,r);if(n===void 0||j.current===null)return;const s=Le([t,r]);s.allowOverlay&&yo({target:n,content:s,initialValue:void 0,highlight:!0,cell:[t,r],forceEditMode:!0})},[Le,j,yo]),ne=i.useCallback((t,r,n="both",s=0,c=0,g=void 0)=>{if(j.current!==null){const a=ke.current,f=T.current,m=typeof t!="number"?t.unit==="cell"?t.amount:void 0:t,v=typeof r!="number"?r.unit==="cell"?r.amount:void 0:r,y=typeof t!="number"&&t.unit==="px"?t.amount:void 0,L=typeof r!="number"&&r.unit==="px"?r.amount:void 0;if(a!==null&&f!==null){let x={x:0,y:0,width:0,height:0},D=0,R=0;if((m!==void 0||v!==void 0)&&(x=a.getBounds((m??0)+u,v??0)??x,x.width===0||x.height===0))return;const P=f.getBoundingClientRect(),E=P.width/f.offsetWidth;if(y!==void 0&&(x={...x,x:y-P.left-j.current.scrollLeft,width:1}),L!==void 0&&(x={...x,y:L+P.top-j.current.scrollTop,height:1}),x!==void 0){const H={x:x.x-s,y:x.y-c,width:x.width+2*s,height:x.height+2*c};let K=0;for(let sn=0;sn0&&(J=Ul(ve,re,it));let We=K*E+P.left+u*Tt*E,Ye=P.right,Ue=P.top+Xt*E,je=P.bottom-J*E;const To=x.width+s*2;switch(g==null?void 0:g.hAlign){case"start":Ye=We+To;break;case"end":We=Ye-To;break;case"center":We=Math.floor((We+Ye)/2)-To/2,Ye=We+To;break}const Lo=x.height+c*2;switch(g==null?void 0:g.vAlign){case"start":je=Ue+Lo;break;case"end":Ue=je-Lo;break;case"center":Ue=Math.floor((Ue+je)/2)-Lo/2,je=Ue+Lo;break}We>H.x?D=H.x-We:YeH.y?R=H.y-Ue:je=ve-re)&&(R=0),(D!==0||R!==0)&&(E!==1&&(D/=E,R/=E),j.current.scrollTo(D+j.current.scrollLeft,R+j.current.scrollTop))}}}},[u,tt,Tt,j,Xt,et,ze,ve,_t,it]),$n=i.useRef(In),Fn=i.useRef(W),Qo=i.useRef(F);$n.current=In,Fn.current=W,Qo.current=F;const Et=i.useCallback(async(t,r=!0)=>{var m;const n=B[t];if(((m=n==null?void 0:n.trailingRowOptions)==null?void 0:m.disabled)===!0)return;const s=gt==null?void 0:gt();let c,g=!0;s!==void 0&&(c=await s,c==="top"&&(g=!1),typeof c=="number"&&(g=!1));let a=0;const f=()=>{if(Qo.current<=F){a<500&&window.setTimeout(f,a),a=50+a*2;return}const v=typeof c=="number"?c:g?F:0;zo.current(t-u,v),pe({cell:[t,v],range:{x:t,y:v,width:1,height:1}},!1,!1,"edit");const y=Fn.current([t-u,v]);y.allowOverlay&&Io(y)&&y.readonly!==!0&&r&&window.setTimeout(()=>{$n.current(t,v)},0)};f()},[B,gt,u,F,pe]),xo=i.useCallback(t=>{var n,s;const r=((s=(n=ze[t])==null?void 0:n.trailingRowOptions)==null?void 0:s.targetColumn)??(U==null?void 0:U.targetColumn);if(typeof r=="number")return r+(_e?1:0);if(typeof r=="object"){const c=V.indexOf(r);if(c>=0)return c+(_e?1:0)}},[ze,V,_e,U==null?void 0:U.targetColumn]),at=i.useRef(),It=i.useRef(),Yt=i.useCallback((t,r)=>{var c;const[n,s]=r;return un(me,(c=B[n])==null?void 0:c.themeOverride,ot==null?void 0:ot(s),t.themeOverride)},[ot,B,me]),{mapper:yt}=ac(rt,I),Ke=rt==null?void 0:rt.navigationBehavior,jt=i.useCallback(t=>{var y,L,x;const r=Po.value?t.metaKey:t.ctrlKey,n=r&&Ee==="multi",s=r&&he==="multi",[c,g]=t.location,a=h.columns,f=h.rows,[m,v]=((y=h.current)==null?void 0:y.cell)??[];if(t.kind==="cell"){if(It.current=void 0,xt.current=[c,g],c===0&&_e){if(oe===!0&&g===F||Oe==="number"||Ee==="none")return;const D=Le(t.location);if(D.kind!==Do.Marker)return;if(Vt!==void 0){const E=ye(D);Go((E==null?void 0:E.kind)===Do.Marker);const H=(L=E==null?void 0:E.onClick)==null?void 0:L.call(E,{...t,cell:D,posX:t.localEventX,posY:t.localEventY,bounds:t.bounds,theme:Yt(D,t.location),preventDefault:()=>{}});if(H===void 0||H.checked===D.checked)return}M(void 0),xe();const R=f.hasIndex(g),P=at.current;if(Ee==="multi"&&(t.shiftKey||t.isLongTouch===!0)&&P!==void 0&&f.hasIndex(P)){const E=[Math.min(P,g),Math.max(P,g)+1];n||Bo==="multi"?be(void 0,E,!0):be(X.fromSingleSelection(E),void 0,n)}else n||t.isTouch||Bo==="multi"?R?be(f.remove(g),void 0,!0):(be(void 0,g,!0),at.current=g):R&&f.length===1?be(X.empty(),void 0,r):(be(X.fromSingleSelection(g),void 0,r),at.current=g)}else if(c>=u&&oe&&g===F){const D=xo(c);Et(D??c)}else if(m!==c||v!==g){const D=Le(t.location),R=ye(D);if((R==null?void 0:R.onSelect)!==void 0){let H=!1;if(R.onSelect({...t,cell:D,posX:t.localEventX,posY:t.localEventY,bounds:t.bounds,preventDefault:()=>H=!0,theme:Yt(D,t.location)}),H)return}if(Ke==="block"&&yt(g).isGroupHeader)return;const P=_t&&g===F,E=_t&&h!==void 0&&((x=h.current)==null?void 0:x.cell[1])===F;if((t.shiftKey||t.isLongTouch===!0)&&m!==void 0&&v!==void 0&&h.current!==void 0&&!E){if(P)return;const H=Math.min(c,m),K=Math.max(c,m),J=Math.min(g,v),re=Math.max(g,v);pe({...h.current,range:{x:H,y:J,width:K-H+1,height:re-J+1}},!0,r,"click"),at.current=void 0,xe()}else pe({cell:[c,g],range:{x:c,y:g,width:1,height:1}},!0,r,"click"),at.current=void 0,M(void 0),xe()}}else if(t.kind==="header")if(xt.current=[c,g],M(void 0),_e&&c===0)at.current=void 0,It.current=void 0,Ee==="multi"&&(f.length!==F?be(X.fromSingleSelection([0,F]),void 0,r):be(X.empty(),void 0,r),xe());else{const D=It.current;if(he==="multi"&&(t.shiftKey||t.isLongTouch===!0)&&D!==void 0&&a.hasIndex(D)){const R=[Math.min(D,c),Math.max(D,c)+1];s?ue(void 0,R,r):ue(X.fromSingleSelection(R),void 0,r)}else s?(a.hasIndex(c)?ue(a.remove(c),void 0,r):ue(void 0,c,r),It.current=c):he!=="none"&&(ue(X.fromSingleSelection(c),void 0,r),It.current=c);at.current=void 0,xe()}else t.kind===At?xt.current=[c,g]:t.kind===Jn&&!t.isMaybeScrollbar&&(Ie(Ao,!1),M(void 0),xe(),lt==null||lt(),at.current=void 0,It.current=void 0)},[Ee,he,h,_e,u,oe,F,Oe,Le,Vt,xe,Bo,ye,Yt,be,xo,Et,Ke,yt,_t,pe,ue,Ie,lt]),qt=i.useRef(!1),xt=i.useRef(),An=i.useRef(pt),Fe=i.useRef(),il=i.useCallback(t=>{if($t.current=!1,An.current=Te.current,t.button!==0&&t.button!==1){Fe.current=void 0;return}const r=performance.now();Fe.current={button:t.button,time:r,location:t.location},(t==null?void 0:t.kind)==="header"&&(qt.current=!0);const n=t.kind==="cell"&&t.isFillHandle;!n&&t.kind!=="cell"&&t.isEdge||(w({previousSelection:h,fillHandle:n}),xt.current=void 0,!t.isTouch&&t.button===0&&!n?jt(t):!t.isTouch&&t.button===1&&(xt.current=t.location))},[h,jt]),[en,tn]=i.useState(),Gn=i.useCallback(t=>{if(t.kind!==At||he!=="multi")return;const r=Po.value?t.metaKey:t.ctrlKey,[n]=t.location,s=h.columns;if(n=u&&Qn(c.group,B[f].group);f--)g--;for(let f=n+1;f{if(fe!==void 0&&Lt!==void 0){const r=Te.current.y,n=Te.current.height;let s=fe({x:t,y:r,width:1,height:Math.min(n,F-r)},Re.current.signal);typeof s!="object"&&(s=await s());const c=ze[t-u],a=document.createElement("canvas").getContext("2d",{alpha:!1});if(a!==null){a.font=me.baseFontFull;const f=sr(a,me,c,0,s,zt,go,!1,ye);Lt==null||Lt(c,f.width,t,f.width)}}},[ze,fe,go,me,zt,Lt,u,F,ye]),[cl,on]=i.useState(),Ft=i.useCallback(async(t,r)=>{var f,m;const n=(f=t.current)==null?void 0:f.range;if(n===void 0||fe===void 0||r.current===void 0)return;const s=r.current.range;if(de!==void 0){let v=!1;if(de({fillDestination:{...s,x:s.x-u},patternSource:{...n,x:n.x-u},preventDefault:()=>v=!0}),v)return}let c=fe(n,Re.current.signal);typeof c!="object"&&(c=await c());const g=c,a=[];for(let v=0;v({cell:v.location})))},[fe,$e,de,u]),Pn=i.useCallback(()=>{if(h.current===void 0||h.current.range.width<=1)return;const t={...h,current:{...h.current,range:{...h.current.range,width:1}}};Ft(t,h)},[Ft,h]),On=i.useCallback(()=>{if(h.current===void 0||h.current.range.height<=1)return;const t={...h,current:{...h.current,range:{...h.current.range,height:1}}};Ft(t,h)},[Ft,h]),sl=i.useCallback((t,r)=>{var y,L;const n=k;if(w(void 0),Zo(void 0),on(void 0),qt.current=!1,r)return;if((n==null?void 0:n.fillHandle)===!0&&h.current!==void 0&&((y=n.previousSelection)==null?void 0:y.current)!==void 0){if(bt===void 0)return;const x={...h,current:{...h.current,range:Vl(n.previousSelection.current.range,bt)}};Ft(n.previousSelection,x),Ie(x,!0);return}const[s,c]=t.location,[g,a]=xt.current??[],f=()=>{$t.current=!0},m=x=>{var R,P,E;const D=x.isTouch||g===s&&a===c;if(D&&(Ce==null||Ce([s-u,c],{...x,preventDefault:f})),x.button===1)return!$t.current;if(!$t.current){const H=Le(t.location),K=ye(H);if(K!==void 0&&K.onClick!==void 0&&D){const re=K.onClick({...x,cell:H,posX:x.localEventX,posY:x.localEventY,bounds:x.bounds,theme:Yt(H,t.location),preventDefault:f});re!==void 0&&!Eo(re)&&eo(re)&&($e([{location:x.location,value:re}]),(R=ke.current)==null||R.damage([{cell:x.location}]))}if($t.current||h.current===void 0)return!1;let J=!1;switch(H.activationBehaviorOverride??Uo){case"double-click":case"second-click":{if(((E=(P=n==null?void 0:n.previousSelection)==null?void 0:P.current)==null?void 0:E.cell)===void 0)break;const[re,We]=h.current.cell,[Ye,Ue]=n.previousSelection.current.cell;J=s===re&&s===Ye&&c===We&&c===Ue&&(x.isDoubleClick===!0||Uo==="second-click");break}case"single-click":{J=!0;break}}if(J)return se==null||se([s-u,c]),Dt(x.bounds,!1),!0}return!1},v=t.location[0]-u;if(t.isTouch){const x=Te.current,D=An.current;if(x.x!==D.x||x.y!==D.y)return;if(t.isLongTouch===!0){if(t.kind==="cell"&&_l((L=h.current)==null?void 0:L.cell,t.location)){Se==null||Se([v,t.location[1]],{...t,preventDefault:f});return}else if(t.kind==="header"&&h.columns.hasIndex(s)){Ae==null||Ae(v,{...t,preventDefault:f});return}else if(t.kind===At){if(v<0)return;Ve==null||Ve(v,{...t,preventDefault:f});return}}t.kind==="cell"?m(t)||jt(t):t.kind===At?De==null||De(v,{...t,preventDefault:f}):(t.kind===Xl&&(He==null||He(v,{...t,preventDefault:f})),jt(t));return}if(t.kind==="header"){if(v<0)return;t.isEdge?t.isDoubleClick===!0&&Mo(s):t.button===0&&s===g&&c===a&&(He==null||He(v,{...t,preventDefault:f}))}if(t.kind===At){if(v<0)return;t.button===0&&s===g&&c===a&&(De==null||De(v,{...t,preventDefault:f}),$t.current||Gn(t))}t.kind==="cell"&&(t.button===0||t.button===1)&&m(t),xt.current=void 0},[k,h,u,bt,Ft,Ie,Ce,Le,ye,Uo,Yt,$e,se,Dt,Se,Ae,Ve,jt,De,He,Mo,Gn]),al=i.useCallback(t=>{const r={...t,location:[t.location[0]-u,t.location[1]]};lo==null||lo(r),k!==void 0&&t.buttons===0&&(w(void 0),Zo(void 0),on(void 0),qt.current=!1),on(n=>{var s;return qt.current?[t.scrollEdge[0],0]:t.scrollEdge[0]===(n==null?void 0:n[0])&&t.scrollEdge[1]===n[1]?n:k===void 0||(((s=Fe.current)==null?void 0:s.location[0])??0){io==null||io(t-u,r)},[io,u]),dl=i.useCallback((t,r)=>{co==null||co(t-u,r)},[co,u]),Xe=(Xn=h==null?void 0:h.current)==null?void 0:Xn.cell,fl=i.useCallback((t,r,n,s,c,g)=>{vo.current=!1;let a=Xe;a!==void 0&&(a=[a[0]-u,a[1]]);const f=et===0?void 0:{x:0,y:t.y,width:et,height:t.height},m=[];f!==void 0&&m.push(f),tt>0&&(m.push({x:t.x-u,y:F-tt,width:t.width,height:tt}),et>0&&m.push({x:0,y:F-tt,width:et,height:tt}));const v={x:t.x-u,y:t.y,width:t.width,height:oe&&t.y+t.height>=F?t.height-1:t.height,tx:c,ty:g,extras:{selected:a,freezeRegion:f,freezeRegions:m}};Te.current=v,Dn(v),nl([r,n,s]),uo==null||uo(v,v.tx,v.ty,v.extras)},[Xe,u,oe,F,et,tt,Dn,uo]),hl=kt(nt,i.useCallback((t,r)=>{nt==null||nt(t-u,r-u),he!=="none"&&ue(X.fromSingleSelection(r),void 0,!0)},[he,nt,u,ue])),nn=i.useRef(!1),gl=i.useCallback(t=>{if(t.location[0]===0&&u>0){t.preventDefault();return}ro==null||ro({...t,location:[t.location[0]-u,t.location[1]]}),t.defaultPrevented()||(nn.current=!0),w(void 0)},[ro,u]),ml=i.useCallback(()=>{nn.current=!1},[]),Kn=rt==null?void 0:rt.selectionBehavior,Ro=i.useCallback(t=>{if(Kn!=="block-spanning")return;const{isGroupHeader:r,path:n,groupRows:s}=yt(t);if(r)return[t,t];const c=n[n.length-1],g=t-c,a=t+s-c-1;return[g,a]},[yt,Kn]),rn=i.useRef(),ln=i.useCallback(t=>{var r,n,s;if(!Yl(t,rn.current)&&(rn.current=t,!(((r=Fe==null?void 0:Fe.current)==null?void 0:r.button)!==void 0&&Fe.current.button>=1))){if(t.buttons!==0&&k!==void 0&&((n=Fe.current)==null?void 0:n.location[0])===0&&t.location[0]===0&&u===1&&Ee==="multi"&&k.previousSelection&&!k.previousSelection.rows.hasIndex(Fe.current.location[1])&&h.rows.hasIndex(Fe.current.location[1])){const c=Math.min(Fe.current.location[1],t.location[1]),g=Math.max(Fe.current.location[1],t.location[1])+1;be(X.fromSingleSelection([c,g]),void 0,!1)}if(t.buttons!==0&&k!==void 0&&h.current!==void 0&&!nn.current&&!qt.current&&(Je==="rect"||Je==="multi-rect")){const[c,g]=h.current.cell;let[a,f]=t.location;if(f<0&&(f=Te.current.y),k.fillHandle===!0&&((s=k.previousSelection)==null?void 0:s.current)!==void 0){const m=k.previousSelection.current.range;f=Math.min(f,oe?F-1:F);const v=jl(m,a,f,vn);Zo(v)}else{if(oe&&g===F)return;if(oe&&f===F)if(t.kind===Jn)f--;else return;a=Math.max(a,u);const y=Ro(g);f=y===void 0?f:Rt(f,y[0],y[1]);const L=a-c,x=f-g,D={x:L>=0?c:a,y:x>=0?g:f,width:Math.abs(L)+1,height:Math.abs(x)+1};pe({...h.current,range:D},!0,!1,"drag")}}ao==null||ao({...t,location:[t.location[0]-u,t.location[1]]})}},[k,u,Ee,h,Je,ao,be,oe,F,vn,Ro,pe]),vl=i.useCallback(()=>{var a,f;const t=rn.current;if(t===void 0)return;const[r,n]=t.scrollEdge;let[s,c]=t.location;const g=Te.current;r===-1?s=((f=(a=g.extras)==null?void 0:a.freezeRegion)==null?void 0:f.x)??g.x:r===1&&(s=g.x+g.width),n===-1?c=Math.max(0,g.y):n===1&&(c=Math.min(F-1,g.y+g.height)),s=Rt(s,0,B.length-1),c=Rt(c,0,F-1),ln({...t,location:[s,c]})},[B.length,ln,F]);rc(cl,j,vl);const Ne=i.useCallback(t=>{if(h.current===void 0)return;const[r,n]=t,[s,c]=h.current.cell,g=h.current.range;let a=g.x,f=g.x+g.width,m=g.y,v=g.y+g.height;const[y,L]=Ro(c)??[0,F-1],x=L+1;if(n!==0)switch(n){case 2:{v=x,m=c,ne(0,v,"vertical");break}case-2:{m=y,v=c+1,ne(0,m,"vertical");break}case 1:{mc+1?(v--,ne(0,v,"vertical")):(m=Math.max(y,m-1),ne(0,m,"vertical"));break}default:er()}if(r!==0)if(r===2)f=B.length,a=s,ne(f-1-u,0,"horizontal");else if(r===-2)a=u,f=s+1,ne(a-u,0,"horizontal");else{let D=[];if(fe!==void 0){const R=fe({x:a,y:m,width:f-a-u,height:v-m},Re.current.signal);typeof R=="object"&&(D=gc(R))}if(r===1){let R=!1;if(a0){const P=Gt(a+1,s+1).find(E=>!D.includes(E-u));P!==void 0&&(a=P,R=!0)}else a++,R=!0;R&&ne(a,0,"horizontal")}R||(f=Math.min(B.length,f+1),ne(f-1-u,0,"horizontal"))}else if(r===-1){let R=!1;if(f>s+1){if(D.length>0){const P=Gt(f-1,s,-1).find(E=>!D.includes(E-u));P!==void 0&&(f=P,R=!0)}else f--,R=!0;R&&ne(f-u,0,"horizontal")}R||(a=Math.max(u,a-1),ne(a-u,0,"horizontal"))}else er()}pe({cell:h.current.cell,range:{x:a,y:m,width:f-a,height:v-m}},!0,!1,"keyboard-select")},[fe,Ro,h,B.length,u,F,ne,pe]),ut=i.useCallback((t,r,n,s)=>{const c=ve-(n?0:1);t=Rt(t,u,ze.length-1+u),r=Rt(r,0,c);const g=Xe==null?void 0:Xe[0],a=Xe==null?void 0:Xe[1];if(t===g&&r===a)return!1;if(s&&h.current!==void 0){const f=[...h.current.rangeStack];(h.current.range.width>1||h.current.range.height>1)&&f.push(h.current.range),Ie({...h,current:{cell:[t,r],range:{x:t,y:r,width:1,height:1},rangeStack:f}},!0)}else pe({cell:[t,r],range:{x:t,y:r,width:1,height:1}},!0,!1,"keyboard-nav");return p.current!==void 0&&p.current[0]===t&&p.current[1]===r&&(p.current=void 0),ne(t-u,r),!0},[ve,u,ze.length,Xe,h,ne,Ie,pe]),Cl=i.useCallback((t,r)=>{(C==null?void 0:C.cell)!==void 0&&t!==void 0&&eo(t)&&($e([{location:C.cell,value:t}]),window.requestAnimationFrame(()=>{var c;(c=ke.current)==null||c.damage([{cell:C.cell}])})),xe(!0),M(void 0);const[n,s]=r;if(h.current!==void 0&&(n!==0||s!==0)){const c=h.current.cell[1]===ve-1&&t!==void 0;ut(Rt(h.current.cell[0]+n,0,B.length-1),Rt(h.current.cell[1]+s,0,ve-1),c,!1)}Y==null||Y(t,r)},[C==null?void 0:C.cell,xe,h,Y,$e,ve,ut,B.length]),wl=i.useMemo(()=>`gdg-overlay-${hc++}`,[]),Mt=i.useCallback(t=>{var n,s,c,g;xe();const r=[];for(let a=t.x;a({cell:a.location})))},[xe,W,ye,$e,u]),Zt=C!==void 0,Nn=i.useCallback(t=>{var P,E;const r=()=>{t.stopPropagation(),t.preventDefault()},n={didMatch:!1},{bounds:s}=t,c=h.columns,g=h.rows,a=ct;if(!Zt&&A(a.clear,t,n))Ie(Ao,!1),lt==null||lt();else if(!Zt&&A(a.selectAll,t,n))Ie({columns:X.empty(),rows:X.empty(),current:{cell:((P=h.current)==null?void 0:P.cell)??[u,0],range:{x:u,y:0,width:V.length,height:F},rangeStack:[]}},!1);else if(A(a.search,t,n))(E=b==null?void 0:b.current)==null||E.focus({preventScroll:!0}),Sn(!0);else if(A(a.delete,t,n)){const H=(st==null?void 0:st(h))??!0;if(H!==!1){const K=H===!0?h:H;if(K.current!==void 0){Mt(K.current.range);for(const J of K.current.rangeStack)Mt(J)}for(const J of K.rows)Mt({x:u,y:J,width:V.length,height:1});for(const J of K.columns)Mt({x:J,y:0,width:1,height:F})}}if(n.didMatch)return r(),!0;if(h.current===void 0)return!1;let[f,m]=h.current.cell;const[,v]=h.current.cell;let y=!1,L=!1;if(A(a.scrollToSelectedCell,t,n)?zo.current(f-u,m):he!=="none"&&A(a.selectColumn,t,n)?c.hasIndex(f)?ue(c.remove(f),void 0,!0):he==="single"?ue(X.fromSingleSelection(f),void 0,!0):ue(void 0,f,!0):Ee!=="none"&&A(a.selectRow,t,n)?g.hasIndex(m)?be(g.remove(m),void 0,!0):Ee==="single"?be(X.fromSingleSelection(m),void 0,!0):be(void 0,m,!0):!Zt&&s!==void 0&&A(a.activateCell,t,n)?m===F&&oe?window.setTimeout(()=>{const H=xo(f);Et(H??f)},0):(se==null||se([f-u,m]),Dt(s,!0)):h.current.range.height>1&&A(a.downFill,t,n)?On():h.current.range.width>1&&A(a.rightFill,t,n)?Pn():A(a.goToNextPage,t,n)?m+=Math.max(1,Te.current.height-4):A(a.goToPreviousPage,t,n)?m-=Math.max(1,Te.current.height-4):A(a.goToFirstCell,t,n)?(M(void 0),m=0,f=0):A(a.goToLastCell,t,n)?(M(void 0),m=Number.MAX_SAFE_INTEGER,f=Number.MAX_SAFE_INTEGER):A(a.selectToFirstCell,t,n)?(M(void 0),Ne([-2,-2])):A(a.selectToLastCell,t,n)?(M(void 0),Ne([2,2])):Zt?(A(a.closeOverlay,t,n)&&M(void 0),A(a.acceptOverlayDown,t,n)&&(M(void 0),m++),A(a.acceptOverlayUp,t,n)&&(M(void 0),m--),A(a.acceptOverlayLeft,t,n)&&(M(void 0),f--),A(a.acceptOverlayRight,t,n)&&(M(void 0),f++)):(A(a.goDownCell,t,n)?m+=1:A(a.goUpCell,t,n)?m-=1:A(a.goRightCell,t,n)?f+=1:A(a.goLeftCell,t,n)?f-=1:A(a.goDownCellRetainSelection,t,n)?(m+=1,y=!0):A(a.goUpCellRetainSelection,t,n)?(m-=1,y=!0):A(a.goRightCellRetainSelection,t,n)?(f+=1,y=!0):A(a.goLeftCellRetainSelection,t,n)?(f-=1,y=!0):A(a.goToLastRow,t,n)?m=F-1:A(a.goToFirstRow,t,n)?m=Number.MIN_SAFE_INTEGER:A(a.goToLastColumn,t,n)?f=Number.MAX_SAFE_INTEGER:A(a.goToFirstColumn,t,n)?f=Number.MIN_SAFE_INTEGER:(Je==="rect"||Je==="multi-rect")&&(A(a.selectGrowDown,t,n)?Ne([0,1]):A(a.selectGrowUp,t,n)?Ne([0,-1]):A(a.selectGrowRight,t,n)?Ne([1,0]):A(a.selectGrowLeft,t,n)?Ne([-1,0]):A(a.selectToLastRow,t,n)?Ne([0,2]):A(a.selectToFirstRow,t,n)?Ne([0,-2]):A(a.selectToLastColumn,t,n)?Ne([2,0]):A(a.selectToFirstColumn,t,n)&&Ne([-2,0])),L=n.didMatch),Ke!==void 0&&Ke!=="normal"&&m!==v){const H=Ke==="skip-up"||Ke==="skip"||Ke==="block",K=Ke==="skip-down"||Ke==="skip"||Ke==="block",J=m=0&&yt(m).isGroupHeader;)m--;m<0&&(m=v)}else if(!J&&K){for(;m=F&&(m=v)}}const D=ut(f,m,!1,y),R=n.didMatch;return R&&(D||!L||wn)&&r(),R},[Ke,Zt,h,ct,he,Ee,Je,u,yt,F,ut,Ie,lt,V.length,st,wn,Mt,ue,be,oe,xo,Et,se,Dt,On,Pn,Ne]),Jt=i.useCallback(t=>{let r=!1;if(Kt!==void 0&&Kt({...t,cancel:()=>{r=!0}}),r||Nn(t)||h.current===void 0)return;const[n,s]=h.current.cell,c=Te.current;if(Nt&&!t.metaKey&&!t.ctrlKey&&h.current!==void 0&&t.key.length===1&&/[ -~]/g.test(t.key)&&t.bounds!==void 0&&Io(W([n-u,Math.max(0,Math.min(s,F-1))]))){if((!oe||s!==F)&&(c.y>s||s>c.y+c.height||c.x>n||n>c.x+c.width))return;Dt(t.bounds,!0,t.key),t.stopPropagation(),t.preventDefault()}},[Nt,Kt,Nn,h,W,u,F,oe,Dt]),pl=i.useCallback((t,r)=>{const n=t.location[0]-u;if(t.kind==="header"&&(Ae==null||Ae(n,{...t,preventDefault:r})),t.kind===At){if(n<0)return;Ve==null||Ve(n,{...t,preventDefault:r})}if(t.kind==="cell"){const[s,c]=t.location;Se==null||Se([n,c],{...t,preventDefault:r}),Zl(h,t.location)||ut(s,c,!1,!1)}},[h,Se,Ve,Ae,u,ut]),cn=i.useCallback(async t=>{var a,f,m;if(!ct.paste)return;function r(v,y,L,x){var R,P;const D=typeof L=="object"?(L==null?void 0:L.join(` +`))??"":(L==null?void 0:L.toString())??"";if(!Eo(v)&&Io(v)&&v.readonly!==!0){const E=ee==null?void 0:ee(D,v);if(E!==void 0&&eo(E))return{location:y,value:E};const H=ye(v);if(H===void 0)return;if(H.kind===Q.Custom){Go(v.kind===Q.Custom);const K=(R=H.onPaste)==null?void 0:R.call(H,D,v.data);return K===void 0?void 0:{location:y,value:{...v,data:K}}}else{const K=(P=H.onPaste)==null?void 0:P.call(H,D,v,{formatted:x,formattedString:typeof x=="string"?x:x==null?void 0:x.join(` +`),rawValue:L});return K===void 0?void 0:(Go(K.kind===v.kind),{location:y,value:K})}}}const n=h.columns,s=h.rows,c=((a=j.current)==null?void 0:a.contains(document.activeElement))===!0||((f=T.current)==null?void 0:f.contains(document.activeElement))===!0;let g;if(h.current!==void 0?g=[h.current.range.x,h.current.range.y]:n.length===1?g=[n.first()??0,0]:s.length===1&&(g=[u,s.first()??0]),c&&g!==void 0){let v,y;const L="text/plain",x="text/html";if(navigator.clipboard.read!==void 0){const E=await navigator.clipboard.read();for(const H of E){if(H.types.includes(x)){const J=await(await H.getType(x)).text(),re=tr(J);if(re!==void 0){v=re;break}}H.types.includes(L)&&(y=await(await H.getType(L)).text())}}else if(navigator.clipboard.readText!==void 0)y=await navigator.clipboard.readText();else if(t!==void 0&&(t==null?void 0:t.clipboardData)!==null){if(t.clipboardData.types.includes(x)){const E=t.clipboardData.getData(x);v=tr(E)}v===void 0&&t.clipboardData.types.includes(L)&&(y=t.clipboardData.getData(L))}else return;const[D,R]=g,P=[];do{if(Ct===void 0){const E=Le(g),H=y??(v==null?void 0:v.map(J=>J.map(re=>re.rawValue).join(" ")).join(" "))??"",K=r(E,g,H,void 0);K!==void 0&&P.push(K);break}if(v===void 0){if(y===void 0)return;v=Jl(y)}if(Ct===!1||typeof Ct=="function"&&(Ct==null?void 0:Ct([g[0]-u,g[1]],v.map(E=>E.map(H=>{var K;return((K=H.rawValue)==null?void 0:K.toString())??""}))))!==!0)return;for(const[E,H]of v.entries()){if(E+R>=F)break;for(const[K,J]of H.entries()){const re=[K+D,E+R],[We,Ye]=re;if(We>=B.length||Ye>=ve)continue;const Ue=Le(re),je=r(Ue,re,J.rawValue,J.formatted);je!==void 0&&P.push(je)}}}while(!1);$e(P),(m=ke.current)==null||m.damage(P.map(E=>({cell:E.location})))}},[ee,ye,Le,h,ct.paste,j,B.length,$e,ve,Ct,u,F]);dn("paste",cn,S,!1,!0);const Qt=i.useCallback(async(t,r)=>{var a,f;if(!ct.copy)return;const n=r===!0||((a=j.current)==null?void 0:a.contains(document.activeElement))===!0||((f=T.current)==null?void 0:f.contains(document.activeElement))===!0,s=h.columns,c=h.rows,g=(m,v)=>{if(!mn)or(m,v,t);else{const y=v.map(L=>({kind:Q.Text,data:V[L].title,displayData:V[L].title,allowOverlay:!1}));or([y,...m],v,t)}};if(n&&fe!==void 0){if(h.current!==void 0){let m=fe(h.current.range,Re.current.signal);typeof m!="object"&&(m=await m()),g(m,Gt(h.current.range.x-u,h.current.range.x+h.current.range.width-u))}else if(c!==void 0&&c.length>0){const v=[...c].map(y=>{const L=fe({x:u,y,width:V.length,height:1},Re.current.signal);return typeof L=="object"?L[0]:L().then(x=>x[0])});if(v.some(y=>y instanceof Promise)){const y=await Promise.all(v);g(y,Gt(V.length))}else g(v,Gt(V.length))}else if(s.length>0){const m=[],v=[];for(const y of s){let L=fe({x:y,y:0,width:1,height:F},Re.current.signal);typeof L!="object"&&(L=await L()),m.push(L),v.push(y-u)}if(m.length===1)g(m[0],v);else{const y=m.reduce((L,x)=>L.map((D,R)=>[...D,...x[R]]));g(y,v)}}}},[V,fe,h,ct.copy,u,j,F,mn]);dn("copy",Qt,S,!1,!1);const bl=i.useCallback(async t=>{var n,s;if(!(!ct.cut||!(((n=j.current)==null?void 0:n.contains(document.activeElement))===!0||((s=T.current)==null?void 0:s.contains(document.activeElement))===!0))&&(await Qt(t),h.current!==void 0)){let c={current:{cell:h.current.cell,range:h.current.range,rangeStack:[]},rows:X.empty(),columns:X.empty()};const g=st==null?void 0:st(c);if(g===!1||(c=g===!0?c:g,c.current===void 0))return;Mt(c.current.range)}},[Mt,h,ct.cut,Qt,j,st]);dn("cut",bl,S,!1,!1);const yl=i.useCallback((t,r)=>{if(Ge!==void 0){u!==0&&(t=t.map(c=>[c[0]-u,c[1]])),Ge(t,r);return}if(t.length===0||r===-1)return;const[n,s]=t[r];p.current!==void 0&&p.current[0]===n&&p.current[1]===s||(p.current=[n,s],ut(n,s,!1,!1))},[Ge,u,ut]),[ko,So]=((Yn=wt==null?void 0:wt.current)==null?void 0:Yn.cell)??[],zo=i.useRef(ne);zo.current=ne,i.useLayoutEffect(()=>{var t,r,n,s;!vo.current&&ko!==void 0&&So!==void 0&&(ko!==((r=(t=mo.current)==null?void 0:t.current)==null?void 0:r.cell[0])||So!==((s=(n=mo.current)==null?void 0:n.current)==null?void 0:s.cell[1]))&&zo.current(ko,So),vo.current=!1},[ko,So]);const Wn=h.current!==void 0&&(h.current.cell[0]>=B.length||h.current.cell[1]>=ve);i.useLayoutEffect(()=>{Wn&&Ie(Ao,!1)},[Wn,Ie]);const xl=i.useMemo(()=>oe===!0&&(U==null?void 0:U.tint)===!0?X.fromSingleSelection(ve-1):X.empty(),[ve,oe,U==null?void 0:U.tint]),Ml=i.useCallback(t=>typeof St=="boolean"?St:(St==null?void 0:St(t-u))??!0,[u,St]),Rl=i.useMemo(()=>{if(en===void 0||T.current===null)return null;const{bounds:t,group:r}=en,n=T.current.getBoundingClientRect();return q(_i,{bounds:t,group:r,canvasBounds:n,onClose:()=>tn(void 0),onFinish:s=>{tn(void 0),$==null||$(r,s)}})},[$,en]),kl=Math.min(B.length,et+(_e?1:0));i.useImperativeHandle(o,()=>({appendRow:(t,r)=>Et(t+u,r),updateCells:t=>{var r;return u!==0&&(t=t.map(n=>({cell:[n.cell[0]+u,n.cell[1]]}))),(r=ke.current)==null?void 0:r.damage(t)},getBounds:(t,r)=>{var n;if(!((T==null?void 0:T.current)===null||(j==null?void 0:j.current)===null)){if(t===void 0&&r===void 0){const s=T.current.getBoundingClientRect(),c=s.width/j.current.clientWidth;return{x:s.x-j.current.scrollLeft*c,y:s.y-j.current.scrollTop*c,width:j.current.scrollWidth*c,height:j.current.scrollHeight*c}}return(n=ke.current)==null?void 0:n.getBounds((t??0)+u,r)}},focus:()=>{var t;return(t=ke.current)==null?void 0:t.focus()},emit:async t=>{switch(t){case"delete":Jt({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":Jt({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":Jt({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await Qt(void 0,!0);break;case"paste":await cn();break}},scrollTo:ne,remeasureColumns:t=>{for(const r of t)Mo(r+u)}}),[Et,Mo,j,Qt,Jt,cn,u,ne]);const[Un,Bn]=Xe??[],Sl=i.useCallback(t=>{const[r,n]=t;if(n===-1){he!=="none"&&(ue(X.fromSingleSelection(r),void 0,!1),xe());return}Un===r&&Bn===n||(pe({cell:t,range:{x:r,y:n,width:1,height:1}},!0,!1,"keyboard-nav"),ne(r,n))},[he,xe,ne,Un,Bn,pe,ue]),[zl,Tl]=i.useState(!1),Vn=i.useRef(ri(t=>{Tl(t)},5)),Ll=i.useCallback(()=>{Vn.current(!0),h.current===void 0&&h.columns.length===0&&h.rows.length===0&&k===void 0&&pe({cell:[u,Co],range:{x:u,y:Co,width:1,height:1}},!0,!1,"keyboard-select")},[Co,h,k,u,pe]),Hl=i.useCallback(()=>{Vn.current(!1)},[]),[Dl,El]=i.useMemo(()=>{let t;const r=(ge==null?void 0:ge.scrollbarWidthOverride)??Ql(),n=F+(oe?1:0);if(typeof it=="number")t=Xt+n*it;else{let c=0;const g=Math.min(n,10);for(let a=0;ag.width+c,0)+r;return[`${Math.min(1e5,s)}px`,`${Math.min(1e5,t)}px`]},[B,ge==null?void 0:ge.scrollbarWidthOverride,it,F,oe,Xt]),Il=i.useMemo(()=>ei(me),[me]);return q(ti.Provider,{value:me,children:to(tc,{style:Il,className:Ot,inWidth:le??Dl,inHeight:ce??El,children:[q(Wi,{fillHandle:yr,drawFocusRing:Cn,experimental:ge,fixedShadowX:xr,fixedShadowY:Mr,getRowThemeOverride:ot,headerIcons:Rr,imageWindowLoader:kr,initialSize:Sr,isDraggable:zr,onDragLeave:Tr,onRowMoved:Vt,overscrollX:_r,overscrollY:Xr,preventDiagonalScrolling:Dr,rightElement:Er,rightElementProps:Ir,smoothScrollX:$r,smoothScrollY:Fr,className:Ot,enableGroups:qo,onCanvasFocused:Ll,onCanvasBlur:Hl,canvasRef:T,onContextMenu:pl,theme:me,cellXOffset:rl,cellYOffset:Co,accessibilityHeight:pt.height,onDragEnd:ml,columns:B,nonGrowWidth:Tn,drawHeader:tl,onColumnProposeMove:Be,drawCell:ol,disabledRows:xl,freezeColumns:kl,lockColumns:u,firstColAccessible:u===0,getCellContent:Le,minColumnWidth:zt,maxColumnWidth:go,searchInputRef:b,showSearch:jr,onSearchClose:qr,highlightRegions:ll,getCellsForSelection:fe,getGroupDetails:Jo,headerHeight:Yo,isFocused:zl,groupHeaderHeight:qo?Rn:0,freezeTrailingRows:tt+(oe&&(U==null?void 0:U.sticky)===!0?1:0),hasAppendRow:oe,onColumnResize:Lt,onColumnResizeEnd:Qr,onColumnResizeStart:el,onCellFocused:Sl,onColumnMoved:hl,onDragStart:gl,onHeaderMenuClick:ul,onHeaderIndicatorClick:dl,onItemHovered:ln,isFilling:(k==null?void 0:k.fillHandle)===!0,onMouseMove:al,onKeyDown:Jt,onKeyUp:Ko,onMouseDown:il,onMouseUp:sl,onDragOverCell:pr,onDrop:br,onSearchResultsChanged:yl,onVisibleRegionChanged:fl,clientSize:jo,rowHeight:it,searchResults:Ze,searchValue:no,onSearchValueChange:ft,rows:ve,scrollRef:j,selection:h,translateX:pt.tx,translateY:pt.ty,verticalBorder:Ml,gridRef:ke,getCellRenderer:ye,resizeIndicator:Nr}),Rl,C!==void 0&&q(i.Suspense,{fallback:null,children:q(fc,{...C,validateCell:Jr,bloom:qe,id:wl,getCellRenderer:ye,className:(ge==null?void 0:ge.isSubGrid)===!0?"click-outside-ignore":void 0,provideEditor:vr,imageEditorOverride:z,onFinishEditing:Cl,markdownDivCreateNode:O,isOutsideClick:Kr})})]})})},vc=i.forwardRef(mc),Cc=(e,o)=>{const l=i.useMemo(()=>({...Fi,...e.headerIcons}),[e.headerIcons]),d=i.useMemo(()=>e.imageWindowLoader??new oi,[e.imageWindowLoader]);return q(vc,{...e,renderers:ni,headerIcons:l,ref:o,imageWindowLoader:d})},zc=i.forwardRef(Cc);export{Ui as C,zc as D,dt as k,ac as u}; +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = ["./data-grid-overlay-editor-I8cicvj5.js","./marked.esm-dbrxtycE.js","./index-BMVQvedj.js","./index-wocATsGp.js","./image-window-loader-aCHQvgUN.js","./throttle-7EuXLZa7.js","./_baseIteratee-WTHxv43n.js","./iframe-MICdw5w5.js","./image-window-loader-1jHxuE_X.css","./flatten-qRvRBp6y.js","./scrolling-data-grid-UJ5_dX2R.js","./scrolling-data-grid-dE2iz8sf.css","./data-grid-overlay-editor-EbzU9_4i.css"] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} \ No newline at end of file diff --git a/docs/assets/data-editor-all-T-OiWfdB.js b/docs/assets/data-editor-all-T-OiWfdB.js deleted file mode 100644 index 439daabf7..000000000 --- a/docs/assets/data-editor-all-T-OiWfdB.js +++ /dev/null @@ -1,135 +0,0 @@ -var Ps=Object.defineProperty;var Ws=(e,t,n)=>t in e?Ps(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ne=(e,t,n)=>(Ws(e,typeof t!="symbol"?t+"":t,n),n);import{r as a,R as yt}from"./index-BMVQvedj.js";import{_ as Ml}from"./iframe-9FFu--7X.js";import{h as Os,d as Rl,j as $s,v as Ns,_ as Xs,g as Ys,c as sn,r as ro,t as Gs}from"./throttle-7EuXLZa7.js";import{u as Ks,f as ji}from"./flatten-qRvRBp6y.js";import{s as Qt,b as Us}from"./marked.esm-dbrxtycE.js";function El(e="This should not happen"){throw new Error(e)}function Zt(e,t="Assertion failed"){if(!e)return El(t)}function tr(e,t){return El(t??"Hell froze over")}function _s(e,t){try{return e()}catch{return t}}const Zi=Object.prototype.hasOwnProperty;function To(e,t){let n,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((o=e.length)===t.length)for(;o--&&To(e[o],t[o]););return o===-1}if(!n||typeof e=="object"){o=0;for(n in e)if(Zi.call(e,n)&&++o&&!Zi.call(t,n)||!(n in t)||!To(e[n],t[n]))return!1;return Object.keys(t).length===o}}return e!==e&&t!==t}const zr=null,Ci=void 0;var Z;(function(e){e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom"})(Z||(Z={}));var Ji;(function(e){e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay"})(Ji||(Ji={}));var Br;(function(e){e.Triangle="triangle",e.Dots="dots"})(Br||(Br={}));function Ir(e){return"width"in e&&typeof e.width=="number"}async function Qi(e){return typeof e=="object"?e:await e()}function Io(e){return!(e.kind===Z.Loading||e.kind===Z.Bubble||e.kind===Z.RowID||e.kind===Z.Protected||e.kind===Z.Drilldown)}function ku(e){return!(e.kind===Z.Loading||e.kind===Z.Bubble||e.kind===Z.RowID||e.kind===Z.Protected||e.kind===Z.Drilldown||e.kind===Z.Boolean||e.kind===Z.Image||e.kind===Z.Custom)}function Do(e){return e.kind===an.Marker||e.kind===an.NewRow}function Zo(e){if(!Io(e)||e.kind===Z.Image)return!1;if(e.kind===Z.Text||e.kind===Z.Number||e.kind===Z.Markdown||e.kind===Z.Uri||e.kind===Z.Custom||e.kind===Z.Boolean)return e.readonly!==!0;tr(e,"A cell was passed with an invalid kind")}function Vs(e){return Os(e,"editor")}function mi(e){return!(e.readonly??!1)}var an;(function(e){e.NewRow="new-row",e.Marker="marker"})(an||(an={}));function qs(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(o,r){return o[0]-r[0]}),n.push([...t[0]]);for(const o of t.slice(1)){const r=n[n.length-1];r[1][o[0]+t,o[1]+t]);return new Tn(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,o=qs([...this.items,n]);return new Tn(o)}remove(t){const n=[...this.items],o=typeof t=="number"?t:t[0],r=typeof t=="number"?t+1:t[1];for(const[i,l]of n.entries()){const[s,c]=l;if(s<=r&&o<=c){const u=[];s=o&&tel??(el=new Tn([]))),Ne(Tn,"fromSingleSelection",t=>Tn.empty().add(t));let rt=Tn;const js=Qt("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});function Ot(e,t,n,o,r=!1){const i=a.useRef();i.current=t,a.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const l=n,s=c=>{var u;(u=i.current)==null||u.call(l,c)};return l.addEventListener(e,s,{passive:o,capture:r}),()=>{l.removeEventListener(e,s,{capture:r})}},[e,n,o,r])}function oo(e,t){return e===void 0?void 0:t}const Zs=Math.PI;function tl(e){return e*Zs/180}const Il=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),Dl=(e,t,n,o,r)=>{switch(e){case"left":return Math.floor(t)+o+r/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-o-r/2}},Fl=(e,t,n)=>Math.min(e,t-n*2),Hl=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,xi=e=>{const t=e.fgColor??"currentColor";return a.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),a.createElement("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},Js=e=>{const t=e.fgColor??"currentColor";return a.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function Qs(e,t,n){const[o,r]=a.useState(e),i=a.useRef(!0);a.useEffect(()=>()=>{i.current=!1},[]);const l=a.useRef(Rl(s=>{i.current&&r(s)},n));return a.useLayoutEffect(()=>{i.current&&l.current(()=>e())},t),o}const ea="֑-߿יִ-﷽ﹰ-ﻼ",ta="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",na=new RegExp("^[^"+ta+"]*["+ea+"]");function ki(e){return na.test(e)?"rtl":"not-rtl"}let Dr;function wi(){if(typeof document>"u")return 0;if(Dr!==void 0)return Dr;const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.id="testScrollbar",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.append(e),document.body.append(t);const n=e.offsetWidth;t.style.overflow="scroll";let o=e.offsetWidth;return n===o&&(o=t.clientWidth),t.remove(),Dr=n-o,Dr}const no=Symbol();function oa(e){const t=a.useRef([no,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,o]=a.useState(e),[,r]=a.useState(),i=a.useCallback(s=>{const c=t.current[0];c!==no&&(s=typeof s=="function"?s(c):s,s===c)||(c!==no&&r({}),o(u=>typeof s=="function"?s(c===no?u:c):s),t.current[0]=no)},[]),l=a.useCallback(()=>{t.current[0]=no,r({})},[]);return[t.current[0]===no?n:t.current[0],i,l]}function Tl(e){if(e.length===0)return"";let t=0,n=0;for(const o of e){if(n+=o.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function ra(e){const t=a.useRef(e);return To(e,t.current)||(t.current=e),t.current}const ia=e=>{const{urls:t,canWrite:n,onEditClick:o,renderImage:r}=e,i=t.filter(s=>s!=="");if(i.length===0)return null;const l=i.length>1;return a.createElement(js,{"data-testid":"GDG-default-image-overlay-editor"},a.createElement($s.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},i.map(s=>{const c=(r==null?void 0:r(s))??a.createElement("img",{draggable:!1,src:s});return a.createElement("div",{className:"gdg-centering-container",key:s},c)})),n&&o&&a.createElement("button",{className:"gdg-edit-icon",onClick:o},a.createElement(xi,null)))},la=Qt("div")({name:"MarkdownContainer",class:"gdg-mnuv029",propsAsIs:!1});class sa extends yt.PureComponent{constructor(){super(...arguments);Ne(this,"targetElement",null);Ne(this,"containerRefHook",n=>{this.targetElement=n,this.renderMarkdownIntoDiv()})}renderMarkdownIntoDiv(){const{targetElement:n,props:o}=this;if(n===null)return;const{contents:r,createNode:i}=o,l=Us(r),s=document.createRange();s.selectNodeContents(n),s.deleteContents();let c=i==null?void 0:i(l);if(c===void 0){const f=document.createElement("template");f.innerHTML=l,c=f.content}n.append(c);const u=n.getElementsByTagName("a");for(const f of u)f.target="_blank",f.rel="noreferrer noopener"}render(){return this.renderMarkdownIntoDiv(),yt.createElement(la,{ref:this.containerRefHook})}}const aa=Qt("textarea")({name:"InputBox",class:"gdg-izpuzkl",propsAsIs:!1}),ca=Qt("div")({name:"ShadowBox",class:"gdg-s69h75o",propsAsIs:!1}),da=Qt("div")({name:"GrowingEntryStyle",class:"gdg-g1y0xocz",propsAsIs:!1});let nl=0;const $r=e=>{const{placeholder:t,value:n,onKeyDown:o,highlight:r,altNewline:i,validatedSelection:l,...s}=e,{onChange:c,className:u}=s,f=a.useRef(null),m=n??"";Zt(c!==void 0,"GrowingEntry must be a controlled input area");const[w]=a.useState(()=>"input-box-"+(nl=(nl+1)%1e7));a.useEffect(()=>{const h=f.current;if(h===null||h.disabled)return;const y=m.toString().length;h.focus(),h.setSelectionRange(r?0:y,y)},[]),a.useLayoutEffect(()=>{var h;if(l!==void 0){const y=typeof l=="number"?[l,null]:l;(h=f.current)==null||h.setSelectionRange(y[0],y[1])}},[l]);const g=a.useCallback(h=>{h.key==="Enter"&&h.shiftKey&&i===!0||o==null||o(h)},[i,o]);return a.createElement(da,{className:"gdg-growing-entry"},a.createElement(ca,{className:u},m+` -`),a.createElement(aa,{...s,className:(u??"")+" gdg-input",id:w,ref:f,onKeyDown:g,value:m,placeholder:t,dir:"auto"}))},ai={};let Kn=null;function ua(){const e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}function Ao(e){const t=e.toLowerCase().trim();if(ai[t]!==void 0)return ai[t];Kn=Kn||ua(),Kn.style.color="#000",Kn.style.color=t;const n=getComputedStyle(Kn).color;Kn.style.color="#fff",Kn.style.color=t;const o=getComputedStyle(Kn).color;if(o!==n)return[0,0,0,1];let r=o.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return r.length<4&&r.push(1),r=r.map(i=>Number.isNaN(i)?0:i),ai[t]=r,r}function io(e,t){const[n,o,r]=Ao(e);return`rgba(${n}, ${o}, ${r}, ${t})`}const ol=new Map;function rl(e,t){const n=`${e}-${t}`,o=ol.get(n);if(o!==void 0)return o;const r=Jt(e,t);return ol.set(n,r),r}function Jt(e,t){if(t===void 0)return e;const[n,o,r,i]=Ao(e);if(i===1)return e;const[l,s,c,u]=Ao(t),f=i+u*(1-i),m=(i*n+u*l*(1-i))/f,w=(i*o+u*s*(1-i))/f,g=(i*r+u*c*(1-i))/f;return`rgba(${m}, ${w}, ${g}, ${f})`}function Su(e,t,n){if(n<=0)return e;if(n>=1)return t;const o=[...Ao(e)];o[0]=o[0]*o[3],o[1]=o[1]*o[3],o[2]=o[2]*o[3];const r=[...Ao(t)];r[0]=r[0]*r[3],r[1]=r[1]*r[3],r[2]=r[2]*r[3];const i=n,l=1-n,s=o[3]*l+r[3]*i,c=Math.floor((o[0]*l+r[0]*i)/s),u=Math.floor((o[1]*l+r[1]*i)/s),f=Math.floor((o[2]*l+r[2]*i)/s);return`rgba(${c}, ${u}, ${f}, ${s})`}function Mu(e){if(e==="transparent")return 0;function t(i){const l=i/255;return l<=.04045?l/12.92:Math.pow((l+.055)/1.055,2.4)}const[n,o,r]=Ao(e);return .2126*t(n)+.7152*t(o)+.0722*t(r)}function fa(e,t){return yt.useMemo(()=>e.map((n,o)=>({group:n.group,grow:n.grow,hasMenu:n.hasMenu,icon:n.icon,id:n.id,menuIcon:n.menuIcon,overlayIcon:n.overlayIcon,sourceIndex:o,sticky:o=i.x&&n=i.y&&o=t.span[0]&&n.current.cell[0]<=t.span[1]}function Al(e,t){const[n,o]=e;return n>=t.x&&n=t.y&&ol)return!1;if(t.span===void 0)return s>=o&&s<=r;const[u,f]=t.span;return u>=o&&u<=r||f>=o&&u<=r||ur}function ma(e,t,n,o){let r=0;if(n.current===void 0)return r;const i=n.current.range;(o||i.height*i.width>1)&&il(e,t,i)&&r++;for(const l of n.current.rangeStack)il(e,t,l)&&r++;return r}function Bl(e,t){let n=e;if(t!==void 0){let o=[...e];const r=n[t.src];t.src>t.dest?(o.splice(t.src,1),o.splice(t.dest,0,r)):(o.splice(t.dest+1,0,r),o.splice(t.src,1)),o=o.map((i,l)=>({...i,sticky:e[l].sticky})),n=o}return n}function zo(e,t){let n=0;const o=Bl(e,t);for(let r=0;r0)for(const u of l)n-=u.width;let s=t,c=r??0;for(;c<=n&&s=m)return y}const w=i-u,g=e-(c??0);if(typeof l=="number"){const h=Math.floor((g-f)/l)+s;return h>=w?void 0:h}else{let h=f;for(let y=s;y"u";async function pa(){var e;ba||((e=document==null?void 0:document.fonts)==null?void 0:e.ready)===void 0||(await document.fonts.ready,Ar=0,Qo={},Ns())}pa();function Ll(e,t,n,o){return`${e}_${o??(t==null?void 0:t.font)}_${n}`}function Bo(e,t,n,o="middle"){const r=Ll(e,t,o,n);let i=Qo[r];return i===void 0&&(i=t.measureText(e),Qo[r]=i,Ar++),Ar>1e4&&(Qo={},Ar=0),i}function Pl(e,t){const n=Ll(e,void 0,"middle",t);return Qo[n]}function qn(e,t){return typeof t!="string"&&(t=t.baseFontFull),va(e,t)}function ll(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ";e.save(),e.textBaseline=t;const o=e.measureText(n);return e.restore(),o}const sl=[];function va(e,t){for(const i of sl)if(i.key===t)return i.val;const n=ll(e,"alphabetic"),r=-(ll(e,"middle").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return sl.push({key:t,val:r}),r}function Ca(e,t,n,o,r,i){const{ctx:l,rect:s,theme:c}=e;let u=Number.MAX_SAFE_INTEGER;const f=500;if(t!==void 0&&(u=n-t,un&&(e=e.slice(0,n)),e}function ka(e,t,n,o,r,i,l,s,c,u){const f=s.baseFontFull,m=Xs(e,t,f,r-s.cellHorizontalPadding*2,u??!1),w=Ol(e,f),g=s.lineHeight*w,h=w+g*(m.length-1),y=h+s.cellVerticalPadding>i;y&&(e.save(),e.rect(n,o,r,i),e.clip());const b=o+i/2-h/2;let x=Math.max(o+s.cellVerticalPadding,b);for(const C of m)if(Wl(e,C,n,x,r,w,l,s,c),x+=g,x>o+i)break;y&&e.restore()}function Mn(e,t,n,o,r){const{ctx:i,rect:l,theme:s}=e,{x:c,y:u,width:f,height:m}=l;o=o??!1,o||(t=xa(t,f));const w=qn(i,s),g=ki(t)==="rtl";if(n===void 0&&g&&(n="right"),g&&(i.direction="rtl"),t.length>0){let h=!1;n==="right"?(i.textAlign="right",h=!0):n!==void 0&&n!=="left"&&(i.textAlign=n,h=!0),o?ka(i,t,c,u,f,m,w,s,n,r):Wl(i,t,c,u,f,m,w,s,n),h&&(i.textAlign="start"),g&&(i.direction="inherit")}}function Rn(e,t,n,o,r,i){typeof i=="number"&&(i={tl:i,tr:i,br:i,bl:i}),i={tl:Math.max(0,Math.min(i.tl,r/2,o/2)),tr:Math.max(0,Math.min(i.tr,r/2,o/2)),bl:Math.max(0,Math.min(i.bl,r/2,o/2)),br:Math.max(0,Math.min(i.br,r/2,o/2))},e.moveTo(t+i.tl,n),e.arcTo(t+o,n,t+o,n+i.tr,i.tr),e.arcTo(t+o,n+r,t+o-i.br,n+r,i.br),e.arcTo(t,n+r,t,n+r-i.bl,i.bl),e.arcTo(t,n,t+i.tl,n,i.tl)}function Sa(e,t,n){e.arc(t,n-1.25*3.5,1.25,0,2*Math.PI,!1),e.arc(t,n,1.25,0,2*Math.PI,!1),e.arc(t,n+1.25*3.5,1.25,0,2*Math.PI,!1)}function Ma(e,t,n){const o=function(s,c){const u=c.x-s.x,f=c.y-s.y,m=Math.sqrt(u*u+f*f),w=u/m,g=f/m;return{x:u,y:c.y-s.y,len:m,nx:w,ny:g,ang:Math.atan2(g,w)}};let r;const i=t.length;let l=t[i-1];for(let s=0;s1?1:w),y=1,b=!1;g<0?h<0?h=Math.PI+h:(h=Math.PI-h,y=-1,b=!0):h>0&&(y=-1,b=!0),r=c.radius!==void 0?c.radius:n;const x=h/2;let C=Math.abs(Math.cos(x)*r/Math.sin(x)),z;C>Math.min(f.len/2,m.len/2)?(C=Math.min(f.len/2,m.len/2),z=Math.abs(C*Math.sin(x)/Math.cos(x))):z=r;let X=c.x+m.nx*C,Y=c.y+m.ny*C;X+=-m.ny*z*y,Y+=m.nx*z*y,e.arc(X,Y,z,f.ang+Math.PI/2*y,m.ang-Math.PI/2*y,b),l=c,c=u}e.closePath()}function bi(e,t,n,o,r,i,l,s,c,u,f,m,w,g,h){const y={x:0,y:i+u,width:0,height:0};if(e>=g.length||t>=f||t<-2||e<0)return y;const b=i-r;if(e>=m){const x=l>e?-1:1,C=zo(g);y.x+=C+c;for(let z=l;z!==e;z+=x)y.x+=g[x===1?z:z-1].width*x}else for(let x=0;x0&&nr(g[x-1].group,C)&&g[x-1].sticky===z;){const Y=g[x-1];y.x-=Y.width,y.width+=Y.width,x--}let X=e;for(;X+1n&&(y.width=n-y.x)}}else if(t>=f-w){let x=f-t;for(y.y=o;x>0;){const C=t+x-1;y.height=typeof h=="number"?h:h(C),y.y-=y.height,x--}y.height+=1}else{const x=s>t?-1:1;if(typeof h=="number"){const C=t-s;y.y+=C*h}else for(let C=s;C!==t;C+=x)y.y+=h(C)*x;y.height=(typeof h=="number"?h:h(t))+1}return y}const Si=1<<21;function wn(e,t){return(t+2)*Si+e}function $l(e){return e%Si}function Mi(e){return Math.floor(e/Si)-2}function Ri(e){const t=$l(e),n=Mi(e);return[t,n]}class Nl{constructor(){Ne(this,"visibleWindow",{x:0,y:0,width:0,height:0});Ne(this,"freezeCols",0);Ne(this,"freezeRows",[]);Ne(this,"isInWindow",t=>{const n=$l(t),o=Mi(t),r=this.visibleWindow,i=n>=r.x&&n<=r.x+r.width||n=r.y&&o<=r.y+r.height||this.freezeRows.includes(o);return i&&l})}setWindow(t,n,o){this.visibleWindow.x===t.x&&this.visibleWindow.y===t.y&&this.visibleWindow.width===t.width&&this.visibleWindow.height===t.height&&this.freezeCols===n&&To(this.freezeRows,o)||(this.visibleWindow=t,this.freezeCols=n,this.freezeRows=o,this.clearOutOfWindow())}}class Ra extends Nl{constructor(){super(...arguments);Ne(this,"cache",new Map);Ne(this,"setValue",(n,o)=>{this.cache.set(wn(n[0],n[1]),o)});Ne(this,"getValue",n=>this.cache.get(wn(n[0],n[1])));Ne(this,"clearOutOfWindow",()=>{for(const[n]of this.cache.entries())this.isInWindow(n)||this.cache.delete(n)})}}class er{constructor(t=[]){Ne(this,"cells");this.cells=new Set(t.map(n=>wn(n[0],n[1])))}add(t){this.cells.add(wn(t[0],t[1]))}has(t){return t===void 0?!1:this.cells.has(wn(t[0],t[1]))}remove(t){this.cells.delete(wn(t[0],t[1]))}clear(){this.cells.clear()}get size(){return this.cells.size}hasHeader(){for(const t of this.cells)if(Mi(t)<0)return!0;return!1}hasItemInRectangle(t){for(let n=t.y;n{const g=Ia(e,w[o],t,c);return u=Math.max(u,g),g});if(f.length>5&&s){u=0;let w=0;for(const h of f)w+=h;const g=w/f.length;for(let h=0;h=g*2?f[h]=0:u=Math.max(u,f[h])}u=Math.max(u,e.measureText(n.title).width+16+(n.icon===void 0?0:28));const m=Math.max(Math.ceil(i),Math.min(Math.floor(l),Math.ceil(u)));return{...n,width:m}}function Da(e,t,n,o,r,i,l,s,c){const u=a.useRef(t),f=a.useRef(n),m=a.useRef(l);u.current=t,f.current=n,m.current=l;const[w,g]=a.useMemo(()=>{if(typeof window>"u")return[null,null];const C=document.createElement("canvas");return C.style.display="none",C.style.opacity="0",C.style.position="fixed",[C,C.getContext("2d",{alpha:!1})]},[]);a.useLayoutEffect(()=>(w&&document.documentElement.append(w),()=>{w==null||w.remove()}),[w]);const h=a.useRef({}),y=a.useRef(),[b,x]=a.useState();return a.useLayoutEffect(()=>{const C=f.current;if(C===void 0||e.every(Ir))return;let z=Math.max(1,10-Math.floor(e.length/1e4)),X=0;z1&&(z--,X=1);const Y={x:0,y:0,width:e.length,height:Math.min(u.current,z)},F={x:0,y:u.current-1,width:e.length,height:1};(async()=>{const K=C(Y,c.signal),S=X>0?C(F,c.signal):void 0;let O;typeof K=="object"?O=K:O=await Qi(K),S!==void 0&&(typeof S=="object"?O=[...O,...S]:O=[...O,...await Qi(S)]),y.current=e,x(O)})()},[c.signal,e]),a.useMemo(()=>{let z=e.every(Ir)?e:g===null?e.map(H=>Ir(H)?H:{...H,width:pi}):(g.font=m.current.baseFontFull,e.map((H,K)=>{if(Ir(H))return H;if(h.current[H.id]!==void 0)return{...H,width:h.current[H.id]};if(b===void 0||y.current!==e||H.id===void 0)return{...H,width:pi};const S=Kl(g,l,H,K,b,r,i,!0,s);return h.current[H.id]=S.width,S})),X=0,Y=0;const F=[];for(const[H,K]of z.entries())X+=K.width,K.grow!==void 0&&K.grow>0&&(Y+=K.grow,F.push(H));if(X0){const H=[...z],K=o-X;let S=K;for(let O=0;O{const t=e.fgColor,n=e.bgColor;return` - ${st}`},Ha=e=>{const t=e.fgColor,n=e.bgColor;return` - ${st}`},Ta=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - - `},Aa=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - -`},za=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - -`},Ul=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - - - - `},Ba=e=>{const t=e.bgColor;return`${st} - - - - -`},La=Ul,Pa=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - -`},Wa=e=>{const t=e.fgColor,n=e.bgColor;return` - ${st} - - - - - - - - `},Oa=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - - -`},$a=e=>{const t=e.fgColor,n=e.bgColor;return` - ${st} - - - `},Na=e=>{const t=e.fgColor,n=e.bgColor;return` - ${st} - - - `},Xa=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - -`},Ya=e=>{const t=e.fgColor,n=e.bgColor;return` - ${st} - - - - `},Ga=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - - -`},Ka=e=>{const t=e.fgColor,n=e.bgColor;return` - ${st} - - - - `},Ua=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - -`},_a=e=>{const t=e.fgColor,n=e.bgColor;return` - ${st} - - - `},Va=e=>{const t=e.fgColor,n=e.bgColor;return` - ${st} - - - `},qa=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - -`},ja=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - - - - -`},Za=e=>{const t=e.fgColor,n=e.bgColor;return` - ${st} - - - `},Ja=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - -`},Qa=e=>{const t=e.fgColor,n=e.bgColor;return` - ${st} - - - `},ec=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - - -`},tc=e=>{const t=e.fgColor,n=e.bgColor;return`${st} - - -`},nc=e=>{const t=e.fgColor;return` - - - `},oc=e=>{const t=e.fgColor;return` - - - -`},rc={headerRowID:Fa,headerNumber:Ta,headerCode:Ha,headerString:Aa,headerBoolean:za,headerAudioUri:La,headerVideoUri:Pa,headerEmoji:Wa,headerImage:Oa,headerUri:Ul,headerPhone:$a,headerMarkdown:Na,headerDate:Xa,headerTime:Ya,headerEmail:Ga,headerReference:Ka,headerIfThenElse:Ua,headerSingleValue:_a,headerLookup:Va,headerTextTemplate:qa,headerMath:ja,headerRollup:Za,headerJoinStrings:Ja,headerSplitString:Qa,headerGeoDistance:ec,headerArray:tc,rowOwnerOverlay:nc,protectedColumnOverlay:oc,renameIcon:Ba};function ic(e,t){return e==="normal"?[t.bgIconHeader,t.fgIconHeader]:e==="selected"?["white",t.accentColor]:[t.accentColor,t.bgHeader]}class lc{constructor(t,n){Ne(this,"onSettled");Ne(this,"spriteMap",new Map);Ne(this,"headerIcons");Ne(this,"inFlight",0);this.onSettled=n,this.headerIcons=t??{}}drawSprite(t,n,o,r,i,l,s,c=1){const[u,f]=ic(n,s),m=l*Math.ceil(window.devicePixelRatio),w=`${u}_${f}_${m}_${t}`;let g=this.spriteMap.get(w);if(g===void 0){const h=this.headerIcons[t];if(h===void 0)return;g=document.createElement("canvas");const y=g.getContext("2d");if(y===null)return;const b=new Image;b.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(h({fgColor:f,bgColor:u}))}`,this.spriteMap.set(w,g);const x=b.decode();if(x===void 0)return;this.inFlight++,x.then(()=>{y.drawImage(b,0,0,m,m)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else c<1&&(o.globalAlpha=c),o.drawImage(g,0,0,m,m,r,i,l,l),c<1&&(o.globalAlpha=1)}}function _l(e){if(e.length===0)return;let t;for(const n of e)t=Math.min(t??n.y,n.y)}function Nr(e,t,n,o,r,i,l,s,c){s=s??t;let u=t,f=e;const m=o-i;let w=!1;for(;us&&c(u,f,g,!1,l&&f===o-1)===!0){w=!0;break}u+=g,f++}if(!w){u=n;for(let g=0;g!g.sticky))==null?void 0:w.sourceIndex)??0;if(c>m){const g=Math.max(s,m);let h=t,y=o;for(let b=i.sourceIndex-1;b>=g;b--)h-=l[b].width,y+=l[b].width;for(let b=i.sourceIndex+1;b<=c;b++)y+=l[b].width;f={x:h,y:n,width:y,height:r}}if(m>s){const g=Math.min(c,m-1);let h=t,y=o;for(let b=i.sourceIndex-1;b>=s;b--)h-=l[b].width,y+=l[b].width;for(let b=i.sourceIndex+1;b<=g;b++)y+=l[b].width;u={x:h,y:n,width:y,height:r}}return[u,f]}function sc(e,t,n,o){if(o==="any")return jl(e,{x:t,y:n,width:1,height:1});if(o==="vertical"&&(t=e.x),o==="horizontal"&&(n=e.y),Al([t,n],e))return;const r=t-e.x,i=e.x+e.width-t,l=n-e.y+1,s=e.y+e.height-n,c=Math.min(o==="vertical"?Number.MAX_SAFE_INTEGER:r,o==="vertical"?Number.MAX_SAFE_INTEGER:i,o==="horizontal"?Number.MAX_SAFE_INTEGER:l,o==="horizontal"?Number.MAX_SAFE_INTEGER:s);return c===s?{x:e.x,y:e.y+e.height,width:e.width,height:n-e.y-e.height+1}:c===l?{x:e.x,y:n,width:e.width,height:e.y-n}:c===i?{x:e.x+e.width,y:e.y,width:t-e.x-e.width+1,height:e.height}:{x:t,y:e.y,width:e.x-t,height:e.height}}function or(e,t,n,o,r,i,l,s){return e<=r+l&&r<=e+n&&t<=i+s&&i<=t+o}function Ho(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function jl(e,t){const n=Math.min(e.x,t.x),o=Math.min(e.y,t.y),r=Math.max(e.x+e.width,t.x+t.width)-n,i=Math.max(e.y+e.height,t.y+t.height)-o;return{x:n,y:o,width:r,height:i}}function ac(e,t){return e.x<=t.x&&e.y<=t.y&&e.x+e.width>=t.x+t.width&&e.y+e.height>=t.y+t.height}function cc(e,t,n,o){if(e.x>t||e.y>n||e.x<0&&e.y<0&&e.x+e.width>t&&e.y+e.height>n)return;if(e.x>=0&&e.y>=0&&e.x+e.width<=t&&e.y+e.height<=n)return e;const r=-4,i=-4,l=t+4,s=n+4,c=r-e.x,u=e.x+e.width-l,f=i-e.y,m=e.y+e.height-s,w=c>0?e.x+Math.floor(c/o)*o:e.x,g=u>0?e.x+e.width-Math.floor(u/o)*o:e.x+e.width,h=f>0?e.y+Math.floor(f/o)*o:e.y,y=m>0?e.y+e.height-Math.floor(m/o)*o:e.y+e.height;return{x:w,y:h,width:g-w,height:y-h}}function dc(e,t,n,o,r){const[i,l,s,c]=t,[u,f,m,w]=r,{x:g,y:h,width:y,height:b}=e,x=[];if(y<=0||b<=0)return x;const C=g+y,z=h+b,X=gs,H=h+b>c,K=g>=i&&gi&&C<=s||gs,S=h>=l&&hl&&z<=c||hc;if(K&&S){const P=Math.max(g,i),A=Math.max(h,l),R=Math.min(C,s),M=Math.min(z,c);x.push({rect:{x:P,y:A,width:R-P,height:M-A},clip:{x:u,y:f,width:m-u+1,height:w-f+1}})}if(X&&Y){const P=g,A=h,R=Math.min(C,i),M=Math.min(z,l);x.push({rect:{x:P,y:A,width:R-P,height:M-A},clip:{x:0,y:0,width:u+1,height:f+1}})}if(Y&&K){const P=Math.max(g,i),A=h,R=Math.min(C,s),M=Math.min(z,l);x.push({rect:{x:P,y:A,width:R-P,height:M-A},clip:{x:u,y:0,width:m-u+1,height:f+1}})}if(Y&&F){const P=Math.max(g,s),A=h,R=C,M=Math.min(z,l);x.push({rect:{x:P,y:A,width:R-P,height:M-A},clip:{x:m,y:0,width:n-m+1,height:f+1}})}if(X&&S){const P=g,A=Math.max(h,l),R=Math.min(C,i),M=Math.min(z,c);x.push({rect:{x:P,y:A,width:R-P,height:M-A},clip:{x:0,y:f,width:u+1,height:w-f+1}})}if(F&&S){const P=Math.max(g,s),A=Math.max(h,l),R=C,M=Math.min(z,c);x.push({rect:{x:P,y:A,width:R-P,height:M-A},clip:{x:m,y:f,width:n-m+1,height:w-f+1}})}if(X&&H){const P=g,A=Math.max(h,c),R=Math.min(C,i),M=z;x.push({rect:{x:P,y:A,width:R-P,height:M-A},clip:{x:0,y:w,width:u+1,height:o-w+1}})}if(H&&K){const P=Math.max(g,i),A=Math.max(h,c),R=Math.min(C,s),M=z;x.push({rect:{x:P,y:A,width:R-P,height:M-A},clip:{x:u,y:w,width:m-u+1,height:o-w+1}})}if(F&&H){const P=Math.max(g,s),A=Math.max(h,c),R=C,M=z;x.push({rect:{x:P,y:A,width:R-P,height:M-A},clip:{x:m,y:w,width:n-m+1,height:o-w+1}})}return x}const uc={kind:Z.Loading,allowOverlay:!1};function al(e,t,n,o,r,i,l,s,c,u,f,m,w,g,h,y,b,x,C,z,X,Y,F,H,K,S,O,P,A,R,M,ie,ne,oe,Me){let Ae=(z==null?void 0:z.size)??Number.MAX_SAFE_INTEGER;const J=performance.now();let G=R.baseFontFull;e.font=G;const ye={ctx:e},re=[0,0],ke=b>0?lo(c,b,u):0;let be,V;const Fe=_l(C);return jn(t,s,i,l,r,(Re,Qe,tt,mt,nt)=>{const ze=Math.max(0,mt-Qe),Ve=Qe+ze,Se=r+1,wt=Re.width-ze,at=o-r-1;if(C.length>0){let Xe=!1;for(let We=0;We{e.save(),e.beginPath(),e.rect(Ve,Se,wt,at),e.clip()},j=X.columns.hasIndex(Re.sourceIndex),$e=m(Re.group??"").overrideTheme,Ie=Re.themeOverride===void 0&&$e===void 0?R:Vn(R,$e,Re.themeOverride),He=Ie.baseFontFull;He!==G&&(G=He,e.font=He),je();let fe;return Nr(nt,tt,o,c,u,b,x,Fe,(Xe,We,Oe,ae,Ce)=>{var bn,$t,kt;if(We<0||(re[0]=Re.sourceIndex,re[1]=We,z!==void 0&&!z.has(re)))return;if(C.length>0){let Be=!1;for(let St=0;St_e.span!==void 0&&Be>=_e.span[0]&&Be<=_e.span[1]);Lt&&!h&&y?ft=0:Lt&&y&&(ft=Math.max(ft,1)),yn&&ft++,Lt||(et&&ft++,j&&!Ce&&ft++);const An=_e.kind===Z.Protected?xt.bgCellMedium:xt.bgCell;let lt;if((ae||An!==R.bgCell)&&(lt=Jt(An,lt)),ft>0||Ye){Ye&&(lt=Jt(xt.bgHeader,lt));for(let Be=0;BeMe&&!Ct){const Be=xt.baseFontFull;Be!==G&&(e.font=Be,G=Be),fe=Zl(e,_e,Re.sourceIndex,We,cn,pe,ct,Xe,Ze,Oe,ft>0,xt,lt??xt.bgCell,H,K,(ht==null?void 0:ht.hoverAmount)??0,O,A,J,P,fe,M,ie,ne,oe)}return En&&e.restore(),_e.style==="faded"&&(e.globalAlpha=1),Ae--,Te&&(e.restore(),(kt=fe==null?void 0:fe.deprep)==null||kt.call(fe,ye),fe=void 0,je(),G=He,e.font=He),Ae<=0}),e.restore(),Ae<=0}),be}const _o=[0,0],Vo={x:0,y:0,width:0,height:0},ci=[void 0,()=>{}];let vi=!1;function fc(){vi=!0}function Zl(e,t,n,o,r,i,l,s,c,u,f,m,w,g,h,y,b,x,C,z,X,Y,F,H,K){var ie,ne;let S,O;b!==void 0&&b[0][0]===n&&b[0][1]===o&&(S=b[1][0],O=b[1][1]);let P;_o[0]=n,_o[1]=o,Vo.x=l,Vo.y=s,Vo.width=c,Vo.height=u,ci[0]=F.getValue(_o),ci[1]=oe=>F.setValue(_o,oe),vi=!1;const A={ctx:e,theme:m,col:n,row:o,cell:t,rect:Vo,highlighted:f,cellFillColor:w,hoverAmount:y,frameTime:C,hoverX:S,drawState:ci,hoverY:O,imageLoader:g,spriteManager:h,hyperWrapping:x,overrideCursor:S!==void 0?K:void 0,requestAnimationFrame:fc},R=Ca(A,t.lastUpdated,C,X,r,i),M=H(t);if(M!==void 0){(X==null?void 0:X.renderer)!==M&&((ie=X==null?void 0:X.deprep)==null||ie.call(X,A),X=void 0);const oe=(ne=M.drawPrep)==null?void 0:ne.call(M,A,X);z!==void 0&&!Do(A.cell)?z(A,()=>M.draw(A,t)):M.draw(A,t),P=oe===void 0?void 0:{deprep:oe==null?void 0:oe.deprep,fillStyle:oe==null?void 0:oe.fillStyle,font:oe==null?void 0:oe.font,renderer:M}}return(R||vi)&&(Y==null||Y(_o)),P}function Ei(e,t,n,o,r,i,l,s,c=-20,u=-20,f=32,m="center",w="square"){const g=Math.floor(r+l/2),h=w==="circle"?1e4:t.roundingRadius??4;let y=Fl(f,l,t.cellVerticalPadding),b=y/2;const x=Dl(m,o,i,t.cellHorizontalPadding,y),C=Il(x,g,y),z=Hl(o+c,r+u,C);switch(n){case!0:{e.beginPath(),Rn(e,x-y/2,g-y/2,y,y,h),w==="circle"&&(b*=.8,y*=.8),e.fillStyle=s?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(x-b+y/4.23,g-b+y/1.97),e.lineTo(x-b+y/2.42,g-b+y/1.44),e.lineTo(x-b+y/1.29,g-b+y/3.25),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break}case zr:case!1:{e.beginPath(),Rn(e,x-y/2+.5,g-y/2+.5,y-1,y-1,h),e.lineWidth=1,e.strokeStyle=z?t.textDark:t.textMedium,e.stroke();break}case Ci:{e.beginPath(),Rn(e,x-y/2,g-y/2,y,y,h),e.fillStyle=z?t.textMedium:t.textLight,e.fill(),w==="circle"&&(b*=.8,y*=.8),e.beginPath(),e.moveTo(x-y/3,g),e.lineTo(x+y/3,g),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break}default:tr()}}function hc(e,t,n,o,r,i,l,s,c,u,f,m,w,g,h,y,b,x,C){const z=l+s;if(z<=0)return;e.fillStyle=m.bgHeader,e.fillRect(0,0,r,z);const[X,Y]=(o==null?void 0:o[0])??[],F=m.headerFontFull;e.font=F,jn(t,0,i,0,z,(H,K,S,O)=>{var ye;if(b!==void 0&&!b.has([H.sourceIndex,-1]))return;const P=Math.max(0,O-K);e.save(),e.beginPath(),e.rect(K+P,s,H.width-P,l),e.clip();const A=y(H.group??"").overrideTheme,R=H.themeOverride===void 0&&A===void 0?m:Vn(m,A,H.themeOverride);R.bgHeader!==m.bgHeader&&(e.fillStyle=R.bgHeader,e.fill()),R!==m&&(e.font=R.baseFontFull);const M=f.columns.hasIndex(H.sourceIndex),ie=c!==void 0||u,ne=!ie&&Y===-1&&X===H.sourceIndex,oe=ie?0:((ye=g.find(re=>re.item[0]===H.sourceIndex&&re.item[1]===-1))==null?void 0:ye.hoverAmount)??0,Me=(f==null?void 0:f.current)!==void 0&&f.current.cell[0]===H.sourceIndex,Ae=M?R.accentColor:Me?R.bgHeaderHasFocus:R.bgHeader,J=n?s:0,G=H.sourceIndex===0?0:1;M?(e.fillStyle=Ae,e.fillRect(K+G,J,H.width-G,l)):(Me||oe>0)&&(e.beginPath(),e.rect(K+G,J,H.width-G,l),Me&&(e.fillStyle=R.bgHeaderHasFocus,e.fill()),oe>0&&(e.globalAlpha=oe,e.fillStyle=R.bgHeaderHovered,e.fill(),e.globalAlpha=1)),es(e,K,J,H.width,l,H,M,R,ne,Me,oe,w,x,C),e.restore()}),n&&gc(e,t,r,i,s,o,m,w,g,h,y,b)}function gc(e,t,n,o,r,i,l,s,c,u,f,m){const[g,h]=(i==null?void 0:i[0])??[];let y=0;Vl(t,n,o,r,(b,x,C,z,X,Y)=>{if(m!==void 0&&!m.hasItemInRectangle({x:b[0],y:-2,width:b[1]-b[0]+1,height:1}))return;e.save(),e.beginPath(),e.rect(C,z,X,Y),e.clip();const F=f(x),H=(F==null?void 0:F.overrideTheme)===void 0?l:Vn(l,F.overrideTheme),K=h===-2&&g!==void 0&&g>=b[0]&&g<=b[1],S=K?H.bgHeaderHovered:H.bgHeader;if(S!==l.bgHeader&&(e.fillStyle=S,e.fill()),e.fillStyle=H.textGroupHeader??H.textHeader,F!==void 0){let O=C;if(F.icon!==void 0&&(s.drawSprite(F.icon,"normal",e,O+8,(r-20)/2,20,H),O+=26),e.fillText(F.name,O+8,r/2+qn(e,l.headerFontFull)),F.actions!==void 0&&K){const P=Jl({x:C,y:z,width:X,height:Y},F.actions);e.beginPath();const A=P[0].x-10,R=C+X-A;e.rect(A,0,R,r);const M=e.createLinearGradient(A,0,A+R,0),ie=io(S,0);M.addColorStop(0,ie),M.addColorStop(10/R,S),M.addColorStop(1,S),e.fillStyle=M,e.fill(),e.globalAlpha=.6;const[ne,oe]=(i==null?void 0:i[1])??[-1,-1];for(let Me=0;Me35){const x=w?35:o-35,C=w?35*.7:o-35*.7,z=x/o,X=C/o,Y=e.createLinearGradient(t,0,t+o,0),F=io(h,0);Y.addColorStop(w?1:0,h),Y.addColorStop(z,h),Y.addColorStop(X,F),Y.addColorStop(w?0:1,F),e.fillStyle=Y}else e.fillStyle=h;if(w&&(e.textAlign="right"),g.textBounds!==void 0&&e.fillText(i.title,w?g.textBounds.x+g.textBounds.width:g.textBounds.x,n+r/2+qn(e,s.headerFontFull)),w&&(e.textAlign="left"),i.indicatorIcon!==void 0&&g.indicatorIconBounds!==void 0&&(!y||!or(g.menuBounds.x,g.menuBounds.y,g.menuBounds.width,g.menuBounds.height,g.indicatorIconBounds.x,g.indicatorIconBounds.y,g.indicatorIconBounds.width,g.indicatorIconBounds.height))){let b=l?"selected":"normal";i.style==="highlight"&&(b=l?"selected":"special"),f.drawSprite(i.indicatorIcon,b,e,g.indicatorIconBounds.x,g.indicatorIconBounds.y,g.indicatorIconBounds.width,s)}if(y&&g.menuBounds!==void 0){const b=g.menuBounds;if(i.menuIcon===void 0||i.menuIcon===Br.Triangle){e.beginPath();const x=b.x+b.width/2-5.5,C=b.y+b.height/2-3;Ma(e,[{x,y:C},{x:x+11,y:C},{x:x+5.5,y:C+6}],1),e.fillStyle=h,e.fill()}else if(i.menuIcon===Br.Dots){e.beginPath();const x=b.x+b.width/2,C=b.y+b.height/2;Sa(e,x,C),e.fillStyle=h,e.fill()}else{const x=b.x+(b.width-s.headerIconSize)/2,C=b.y+(b.height-s.headerIconSize)/2;f.drawSprite(i.menuIcon,"normal",e,x,C,s.headerIconSize,s)}}}function es(e,t,n,o,r,i,l,s,c,u,f,m,w,g){const h=ki(i.title)==="rtl",y=Ql(e,i,t,n,o,r,s,h);w!==void 0?w({ctx:e,theme:s,rect:{x:t,y:n,width:o,height:r},column:i,columnIndex:i.sourceIndex,isSelected:l,hoverAmount:f,isHovered:c,hasSelectedCell:u,spriteManager:m,menuBounds:(y==null?void 0:y.menuBounds)??{x:0,y:0,height:0,width:0}},()=>cl(e,t,n,o,r,i,l,s,c,f,m,g,h,y)):cl(e,t,n,o,r,i,l,s,c,f,m,g,h,y)}function wc(e,t,n,o,r,i,l,s,c,u,f,m,w,g,h,y,b,x,C){if(x!==void 0||t[t.length-1]!==n[t.length-1])return;const z=_l(b);jn(t,c,l,s,i,(X,Y,F,H,K)=>{if(X!==t[t.length-1])return;Y+=X.width;const S=Math.max(Y,H);S>o||(e.save(),e.beginPath(),e.rect(S,i+1,1e4,r-i-1),e.clip(),Nr(K,F,r,u,f,h,y,z,(O,P,A,R)=>{if(!R&&b.length>0&&!b.some(Me=>or(Y,O,1e4,A,Me.x,Me.y,Me.width,Me.height)))return;const M=w.hasIndex(P),ie=g.hasIndex(P);e.beginPath();const ne=m==null?void 0:m(P),oe=ne===void 0?C:Vn(C,ne);oe.bgCell!==C.bgCell&&(e.fillStyle=oe.bgCell,e.fillRect(Y,O,1e4,A)),ie&&(e.fillStyle=oe.bgHeader,e.fillRect(Y,O,1e4,A)),M&&(e.fillStyle=oe.accentLight,e.fillRect(Y,O,1e4,A))}),e.restore())})}function yc(e,t,n,o,r,i,l,s,c){let u=!1;for(const h of t)if(!h.sticky){u=l(h.sourceIndex);break}const f=c.horizontalBorderColor??c.borderColor,m=c.borderColor,w=u?zo(t):0;let g;if(w!==0&&(g=rl(m,c.bgCell),e.beginPath(),e.moveTo(w+.5,0),e.lineTo(w+.5,o),e.strokeStyle=g,e.stroke()),r>0){const h=m===f&&g!==void 0?g:rl(f,c.bgCell),y=lo(i,r,s);e.beginPath(),e.moveTo(0,o-y+.5),e.lineTo(n,o-y+.5),e.strokeStyle=h,e.stroke()}}const ts=(e,t,n)=>{let o=0,r=t,i=0,l=n;if(e!==void 0&&e.length>0){o=Number.MAX_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER;for(const s of e)o=Math.min(o,s.x-1),r=Math.max(r,s.x+s.width+1),i=Math.min(i,s.y-1),l=Math.max(l,s.y+s.height+1)}return{minX:o,maxX:r,minY:i,maxY:l}};function bc(e,t,n,o,r,i,l,s,c,u,f,m,w,g,h){var A;const y=h.bgCell,{minX:b,maxX:x,minY:C,maxY:z}=ts(s,i,l),X=[],Y=l-lo(g,w,u);let F=c,H=n,K=0;for(;F+r=C&&R<=z-1){const ie=f==null?void 0:f(H),ne=ie==null?void 0:ie.bgCell;ne!==void 0&&ne!==y&&H>=g-w&&X.push({x:b,y:R,w:x-b,h:M,color:ne})}F+=M,H0)for(let R=0;R=b&&ie<=x&&m(R+1)&&X.push({x:ie,y:K,w:M.width,h:O,color:ne}),S+=M.width}if(X.length===0)return;let P;e.beginPath();for(let R=X.length-1;R>=0;R--){const M=X[R];P===void 0?P=M.color:M.color!==P&&(e.fillStyle=P,e.fill(),e.beginPath(),P=M.color),e.rect(M.x,M.y,M.w,M.h)}P!==void 0&&(e.fillStyle=P,e.fill()),e.beginPath()}function dl(e,t,n,o,r,i,l,s,c,u,f,m,w,g,h,y,b,x=!1){if(c!==void 0){e.beginPath(),e.save(),e.rect(0,0,i,l);for(const A of c)e.rect(A.x+1,A.y+1,A.width-1,A.height-1);e.clip("evenodd")}const C=b.horizontalBorderColor??b.borderColor,z=b.borderColor,{minX:X,maxX:Y,minY:F,maxY:H}=ts(s,i,l),K=[];e.beginPath();let S=.5;for(let A=0;A=X&&M<=Y&&g(A+1)&&K.push({x1:M,y1:Math.max(u,F),x2:M,y2:Math.min(l,H),color:z})}let O=l+.5;for(let A=y-h;A=F&&ie<=H-1){const ne=w==null?void 0:w(R);K.push({x1:X,y1:ie,x2:Y,y2:ie,color:(ne==null?void 0:ne.horizontalBorderColor)??(ne==null?void 0:ne.borderColor)??C})}A+=m(R),R++}}const P=Ys(K,A=>A.color);for(const A of Object.keys(P)){e.strokeStyle=A;for(const R of P[A])e.moveTo(R.x1,R.y1),e.lineTo(R.x2,R.y2);e.stroke(),e.beginPath()}c!==void 0&&e.restore()}function pc(e,t,n,o,r,i,l,s,c,u,f,m,w,g,h,y,b,x,C){const z=[];e.imageSmoothingEnabled=!1;const X=Math.min(r.cellYOffset,l),Y=Math.max(r.cellYOffset,l);let F=0;if(typeof x=="number")F+=(Y-X)*x;else for(let M=X;Mr.cellYOffset&&(F=-F),F+=c-r.translateY;const H=Math.min(r.cellXOffset,i),K=Math.max(r.cellXOffset,i);let S=0;for(let M=H;Mr.cellXOffset&&(S=-S),S+=s-r.translateX;const O=zo(b);if(S!==0&&F!==0)return{regions:[]};const P=u>0?lo(w,u,x):0,A=f-O-Math.abs(S),R=m-g-P-Math.abs(F)-1;if(A>150&&R>150){const M={sx:0,sy:0,sw:f*h,sh:m*h,dx:0,dy:0,dw:f*h,dh:m*h};if(F>0?(M.sy=(g+1)*h,M.sh=R*h,M.dy=(F+g+1)*h,M.dh=R*h,z.push({x:0,y:g,width:f,height:F+1})):F<0&&(M.sy=(-F+g+1)*h,M.sh=R*h,M.dy=(g+1)*h,M.dh=R*h,z.push({x:0,y:m+F-P,width:f,height:-F+P})),S>0?(M.sx=O*h,M.sw=A*h,M.dx=(S+O)*h,M.dw=A*h,z.push({x:O-1,y:0,width:S+2,height:m})):S<0&&(M.sx=(O-S)*h,M.sw=A*h,M.dx=O*h,M.dw=A*h,z.push({x:f+S,y:0,width:-S,height:m})),e.setTransform(1,0,0,1,0,0),C){if(O>0&&S!==0&&F===0&&(o===void 0||(n==null?void 0:n[1])!==!1)){const ie=O*h,ne=m*h;e.drawImage(t,0,0,ie,ne,0,0,ie,ne)}if(P>0&&S===0&&F!==0&&(o===void 0||(n==null?void 0:n[0])!==!1)){const ie=(m-P)*h,ne=f*h,oe=P*h;e.drawImage(t,0,ie,ne,oe,0,ie,ne,oe)}}e.drawImage(t,M.sx,M.sy,M.sw,M.sh,M.dx,M.dy,M.dw,M.dh),e.scale(h,h)}return e.imageSmoothingEnabled=!0,{regions:z}}function vc(e,t,n,o,r,i,l,s,c,u){const f=[];return t!==e.cellXOffset||n!==e.cellYOffset||o!==e.translateX||r!==e.translateY||jn(c,n,o,r,s,(m,w,g,h)=>{if(m.sourceIndex===u){const y=Math.max(w,h)+1;return f.push({x:y,y:0,width:i-y,height:l}),!0}}),f}function Cc(e,t){if(t===void 0||e.width!==t.width||e.height!==t.height||e.theme!==t.theme||e.headerHeight!==t.headerHeight||e.rowHeight!==t.rowHeight||e.rows!==t.rows||e.freezeColumns!==t.freezeColumns||e.getRowThemeOverride!==t.getRowThemeOverride||e.isFocused!==t.isFocused||e.isResizing!==t.isResizing||e.verticalBorder!==t.verticalBorder||e.getCellContent!==t.getCellContent||e.highlightRegions!==t.highlightRegions||e.selection!==t.selection||e.dragAndDropState!==t.dragAndDropState||e.prelightCells!==t.prelightCells||e.touchMode!==t.touchMode||e.maxScaleFactor!==t.maxScaleFactor)return!1;if(e.mappedColumns!==t.mappedColumns){if(e.mappedColumns.length>100||e.mappedColumns.length!==t.mappedColumns.length)return!1;let n;for(let o=0;oH.style!=="no-outline");if(b===void 0||b.length===0)return;const x=zo(s),C=lo(g,w,m),z=[c,0,s.length,g-w],X=[x,0,t,n-C],Y=b.map(H=>{const K=H.range,S=H.style??"dashed";return dc(K,z,t,n,X).map(O=>{const P=O.rect,A=bi(P.x,P.y,t,n,f,u+f,o,r,i,l,g,c,w,s,m),R=P.width===1&&P.height===1?A:bi(P.x+P.width-1,P.y+P.height-1,t,n,f,u+f,o,r,i,l,g,c,w,s,m);return P.x+P.width>=s.length&&(R.width-=1),P.y+P.height>=g&&(R.height-=1),{color:H.color,style:S,clip:O.clip,rect:cc({x:A.x,y:A.y,width:R.x+R.width-A.x,height:R.y+R.height-A.y},t,n,8)}})}),F=()=>{e.lineWidth=1;let H=!1;for(const K of Y)for(const S of K)if((S==null?void 0:S.rect)!==void 0&&or(0,0,t,n,S.rect.x,S.rect.y,S.rect.width,S.rect.height)){const O=H,P=!ac(S.clip,S.rect);P&&(e.save(),e.rect(S.clip.x,S.clip.y,S.clip.width,S.clip.height),e.clip()),S.style==="dashed"&&!H?(e.setLineDash([5,3]),H=!0):(S.style==="solid"||S.style==="solid-outline")&&H&&(e.setLineDash([]),H=!1),e.strokeStyle=S.style==="solid-outline"?Jt(Jt(S.color,y.borderColor),y.bgCell):io(S.color,1),e.strokeRect(S.rect.x+.5,S.rect.y+.5,S.rect.width-1,S.rect.height-1),P&&(e.restore(),H=O)}H&&e.setLineDash([])};return F(),F}function fl(e,t,n,o,r){e.beginPath(),e.moveTo(t,n),e.lineTo(t,o),e.lineWidth=2,e.strokeStyle=r,e.stroke(),e.globalAlpha=1}function di(e,t,n,o,r,i,l,s,c,u,f,m,w,g,h,y,b){if(f.current===void 0)return;const x=f.current.range,C=f.current.cell,z=[x.x+x.width-1,x.y+x.height-1];if(C[1]>=b&&z[1]>=b||!l.some(M=>M.sourceIndex===C[0]||M.sourceIndex===z[0]))return;const[Y,F]=f.current.cell,H=w(f.current.cell),K=H.span??[Y,Y],S=F>=b-g,O=g>0&&!S?lo(b,g,m)-1:0,P=z[1];let A;if(jn(l,o,r,i,u,(M,ie,ne,oe,Me)=>{if(M.sticky&&Y>M.sourceIndex)return;const Ae=M.sourceIndexK[1],G=M.sourceIndex===z[0];if(!(!G&&(Ae||J)))return Nr(Me,ne,n,b,m,g,h,void 0,(ye,re,ke)=>{if(re!==F&&re!==P)return;let be=ie,V=M.width;if(H.span!==void 0){const Re=ql(H.span,ie,ye,M.width,ke,M,s),Qe=M.sticky?Re[0]:Re[1];Qe!==void 0&&(be=Qe.x,V=Qe.width)}return re===P&&G&&y&&(A=()=>{var Re;oe>be&&!M.sticky&&(e.beginPath(),e.rect(oe,0,t-oe,n),e.clip()),e.beginPath(),e.rect(be+V-4,ye+ke-4,4,4),e.fillStyle=((Re=M.themeOverride)==null?void 0:Re.accentColor)??c.accentColor,e.fill()}),A!==void 0}),A!==void 0}),A===void 0)return;const R=()=>{e.save(),e.beginPath(),e.rect(0,u,t,n-u-O),e.clip(),A==null||A(),e.restore()};return R(),R}function xc(e,t,n,o,r,i,l,s,c){c===void 0||c.size===0||(e.beginPath(),Vl(t,n,i,o,(u,f,m,w,g,h)=>{c.hasItemInRectangle({x:u[0],y:-2,width:u[1]-u[0]+1,height:1})&&e.rect(m,w,g,h)}),jn(t,s,i,l,r,(u,f,m,w)=>{const g=Math.max(0,w-f),h=f+g+1,y=u.width-g-1;c.has([u.sourceIndex,-1])&&e.rect(h,o,y,r-o)}),e.clip())}function kc(e,t,n,o,r,i,l,s,c,u){let f=0;return jn(e,i,o,r,n,(m,w,g,h,y)=>(Nr(y,g,t,l,s,c,u,void 0,(b,x,C,z)=>{z||(f=Math.max(x,f))}),!0)),f}function hl(e,t){var cn;const{canvasCtx:n,headerCanvasCtx:o,width:r,height:i,cellXOffset:l,cellYOffset:s,translateX:c,translateY:u,mappedColumns:f,enableGroups:m,freezeColumns:w,dragAndDropState:g,theme:h,drawFocus:y,headerHeight:b,groupHeaderHeight:x,disabledRows:C,rowHeight:z,verticalBorder:X,overrideCursor:Y,isResizing:F,selection:H,fillHandle:K,freezeTrailingRows:S,rows:O,getCellContent:P,getGroupDetails:A,getRowThemeOverride:R,isFocused:M,drawHeaderCallback:ie,prelightCells:ne,drawCellCallback:oe,highlightRegions:Me,resizeCol:Ae,imageLoader:J,lastBlitData:G,hoverValues:ye,hyperWrapping:re,hoverInfo:ke,spriteManager:be,maxScaleFactor:V,hasAppendRow:Fe,touchMode:Re,enqueue:Qe,renderStateProvider:tt,getCellRenderer:mt,renderStrategy:nt,bufferACtx:ze,bufferBCtx:Ve,damage:Se,minimumCellWidth:wt,resizeIndicator:at}=e;if(r===0||i===0)return;const je=nt==="double-buffer",j=Math.min(V,Math.ceil(window.devicePixelRatio??1)),$e=nt!=="direct"&&Cc(e,t),Ie=n.canvas;(Ie.width!==r*j||Ie.height!==i*j)&&(Ie.width=r*j,Ie.height=i*j,Ie.style.width=r+"px",Ie.style.height=i+"px");const He=o.canvas,fe=m?x+b:b,Xe=fe+1;(He.width!==r*j||He.height!==Xe*j)&&(He.width=r*j,He.height=Xe*j,He.style.width=r+"px",He.style.height=Xe+"px");const We=ze.canvas,Oe=Ve.canvas;je&&(We.width!==r*j||We.height!==i*j)&&(We.width=r*j,We.height=i*j,G.current!==void 0&&(G.current.aBufferScroll=void 0)),je&&(Oe.width!==r*j||Oe.height!==i*j)&&(Oe.width=r*j,Oe.height=i*j,G.current!==void 0&&(G.current.bBufferScroll=void 0));const ae=G.current;if($e===!0&&l===(ae==null?void 0:ae.cellXOffset)&&s===(ae==null?void 0:ae.cellYOffset)&&c===(ae==null?void 0:ae.translateX)&&u===(ae==null?void 0:ae.translateY))return;let Ce=null;je&&(Ce=n);const et=o;let Ye;je?Se!==void 0?Ye=(ae==null?void 0:ae.lastBuffer)==="b"?Ve:ze:Ye=(ae==null?void 0:ae.lastBuffer)==="b"?ze:Ve:Ye=n;const _e=Ye.canvas,ct=je?_e===We?Oe:We:Ie,Ze=typeof z=="number"?()=>z:z;et.save(),Ye.save(),et.beginPath(),Ye.beginPath(),et.textBaseline="middle",Ye.textBaseline="middle",j!==1&&(et.scale(j,j),Ye.scale(j,j));const Te=yi(f,l,r,g,c);let Ct=[];const Ht=y&&((cn=H.current)==null?void 0:cn.cell[1])===s&&u===0;let bt=!1;if(Me!==void 0){for(const pe of Me)if(pe.style!=="no-outline"&&pe.range.y===s&&u===0){bt=!0;break}}const xt=()=>{hc(et,Te,m,ke,r,c,b,x,g,F,H,h,be,ye,X,A,Se,ie,Re),dl(et,Te,s,c,u,r,i,void 0,void 0,x,fe,Ze,R,X,S,O,h,!0),et.beginPath(),et.moveTo(0,Xe-.5),et.lineTo(r,Xe-.5),et.strokeStyle=Jt(h.headerBottomBorderColor??h.horizontalBorderColor??h.borderColor,h.bgHeader),et.stroke(),bt&&ul(et,r,i,l,s,c,u,f,w,b,x,z,S,O,Me,h),Ht&&di(et,r,i,s,c,u,Te,f,h,fe,H,Ze,P,S,Fe,K,O)};if(Se!==void 0){const pe=Te[Te.length-1].sourceIndex+1,ht=Se.hasItemInRegion([{x:l,y:-2,width:pe,height:2},{x:l,y:s,width:pe,height:300},{x:0,y:s,width:w,height:300},{x:0,y:-2,width:w,height:2},{x:l,y:O-S,width:pe,height:S,when:S>0}]),bn=$t=>{al($t,Te,f,i,fe,c,u,s,O,Ze,P,A,R,C,M,y,S,Fe,Ct,Se,H,ne,Me,J,be,ye,ke,oe,re,h,Qe,tt,mt,Y,wt);const kt=H.current;K&&y&&kt!==void 0&&Se.has(zl(kt.range))&&di($t,r,i,s,c,u,Te,f,h,fe,H,Ze,P,S,Fe,K,O)};ht&&(bn(Ye),Ce!==null&&(Ce.save(),Ce.scale(j,j),Ce.textBaseline="middle",bn(Ce),Ce.restore()),Se.hasHeader()&&(xc(et,Te,r,x,fe,c,u,s,Se),xt())),Ye.restore(),et.restore();return}if(($e!==!0||l!==(ae==null?void 0:ae.cellXOffset)||c!==(ae==null?void 0:ae.translateX)||Ht!==(ae==null?void 0:ae.mustDrawFocusOnHeader)||bt!==(ae==null?void 0:ae.mustDrawHighlightRingsOnHeader))&&xt(),$e===!0){Zt(ct!==void 0&&ae!==void 0);const{regions:pe}=pc(Ye,ct,ct===We?ae.aBufferScroll:ae.bBufferScroll,ct===We?ae.bBufferScroll:ae.aBufferScroll,ae,l,s,c,u,S,r,i,O,fe,j,f,Te,z,je);Ct=pe}else $e!==!1&&(Zt(ae!==void 0),Ct=vc(ae,l,s,c,u,r,i,fe,Te,$e));yc(Ye,Te,r,i,S,O,X,Ze,h);const Lt=ul(Ye,r,i,l,s,c,u,f,w,b,x,z,S,O,Me,h),ft=y?di(Ye,r,i,s,c,u,Te,f,h,fe,H,Ze,P,S,Fe,K,O):void 0;if(Ye.fillStyle=h.bgCell,Ct.length>0){Ye.beginPath();for(const pe of Ct)Ye.rect(pe.x,pe.y,pe.width,pe.height);Ye.clip(),Ye.fill(),Ye.beginPath()}else Ye.fillRect(0,0,r,i);const yn=al(Ye,Te,f,i,fe,c,u,s,O,Ze,P,A,R,C,M,y,S,Fe,Ct,Se,H,ne,Me,J,be,ye,ke,oe,re,h,Qe,tt,mt,Y,wt);wc(Ye,Te,f,r,i,fe,c,u,s,O,Ze,R,H.rows,C,S,Fe,Ct,Se,h),bc(Ye,Te,s,c,u,r,i,Ct,fe,Ze,R,X,S,O,h),dl(Ye,Te,s,c,u,r,i,Ct,yn,x,fe,Ze,R,X,S,O,h),Lt==null||Lt(),ft==null||ft(),F&&at!=="none"&&jn(Te,0,c,0,fe,(pe,ht)=>pe.sourceIndex===Ae?(fl(et,ht+pe.width,0,fe+1,Jt(h.resizeIndicatorColor??h.accentLight,h.bgHeader)),at==="full"&&fl(Ye,ht+pe.width,fe,i,Jt(h.resizeIndicatorColor??h.accentLight,h.bgCell)),!0):!1),Ce!==null&&(Ce.fillStyle=h.bgCell,Ce.fillRect(0,0,r,i),Ce.drawImage(Ye.canvas,0,0));const An=kc(Te,i,fe,c,u,s,O,Ze,S,Fe);J==null||J.setWindow({x:l,y:s,width:Te.length,height:An-s},w,Array.from({length:S},(pe,ht)=>O-1-ht));const lt=ae!==void 0&&(l!==ae.cellXOffset||c!==ae.translateX),En=ae!==void 0&&(s!==ae.cellYOffset||u!==ae.translateY);G.current={cellXOffset:l,cellYOffset:s,translateX:c,translateY:u,mustDrawFocusOnHeader:Ht,mustDrawHighlightRingsOnHeader:bt,lastBuffer:je?_e===We?"a":"b":void 0,aBufferScroll:_e===We?[lt,En]:ae==null?void 0:ae.aBufferScroll,bBufferScroll:_e===Oe?[lt,En]:ae==null?void 0:ae.bBufferScroll},Ye.restore(),et.restore()}const Sc=80;function Mc(e){const t=e-1;return t*t*t+1}class Rc{constructor(t){Ne(this,"callback");Ne(this,"currentHoveredItem");Ne(this,"leavingItems",[]);Ne(this,"lastAnimationTime");Ne(this,"addToLeavingItems",t=>{this.leavingItems.some(o=>Jo(o.item,t.item))||this.leavingItems.push(t)});Ne(this,"removeFromLeavingItems",t=>{const n=this.leavingItems.find(o=>Jo(o.item,t));return this.leavingItems=this.leavingItems.filter(o=>o!==n),(n==null?void 0:n.hoverAmount)??0});Ne(this,"cleanUpLeavingElements",()=>{this.leavingItems=this.leavingItems.filter(t=>t.hoverAmount>0)});Ne(this,"shouldStep",()=>{const t=this.leavingItems.length>0,n=this.currentHoveredItem!==void 0&&this.currentHoveredItem.hoverAmount<1;return t||n});Ne(this,"getAnimatingItems",()=>this.currentHoveredItem!==void 0?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map(t=>({...t,hoverAmount:Mc(t.hoverAmount)})));Ne(this,"step",t=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=t;else{const o=(t-this.lastAnimationTime)/Sc;for(const i of this.leavingItems)i.hoverAmount=sn(i.hoverAmount-o,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=sn(this.currentHoveredItem.hoverAmount+o,0,1));const r=this.getAnimatingItems();this.callback(r),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=t,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0});Ne(this,"setHovered",t=>{var n;if(!Jo((n=this.currentHoveredItem)==null?void 0:n.item,t)){if(this.currentHoveredItem!==void 0&&this.addToLeavingItems(this.currentHoveredItem),t!==void 0){const o=this.removeFromLeavingItems(t);this.currentHoveredItem={item:t,hoverAmount:o}}else this.currentHoveredItem=void 0;this.lastAnimationTime===void 0&&window.requestAnimationFrame(this.step)}});this.callback=t}}class Ec{constructor(t){Ne(this,"fn");Ne(this,"val");this.fn=t}get value(){return this.val??(this.val=this.fn())}}function Ii(e){return new Ec(e)}const Ic=Ii(()=>window.navigator.userAgent.includes("Firefox")),Lr=Ii(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")),Pr=Ii(()=>window.navigator.platform.toLowerCase().startsWith("mac"));function Dc(e){const t=a.useRef([]),n=a.useRef(0),o=a.useRef(e);o.current=e;const r=a.useCallback(()=>{const i=()=>window.requestAnimationFrame(l),l=()=>{const s=t.current.map(Ri);t.current=[],o.current(new er(s)),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?i:l)},[]);return a.useCallback(i=>{t.current.length===0&&r();const l=wn(i[0],i[1]);t.current.includes(l)||t.current.push(l)},[r])}const _n="header",jt="group-header",Wr="out-of-bounds";var Fo;(function(e){e[e.Start=-2]="Start",e[e.StartPadding=-1]="StartPadding",e[e.Center=0]="Center",e[e.EndPadding=1]="EndPadding",e[e.End=2]="End"})(Fo||(Fo={}));function ns(e,t){return e===t?!0:(e==null?void 0:e.kind)==="out-of-bounds"?(e==null?void 0:e.kind)===(t==null?void 0:t.kind)&&(e==null?void 0:e.location[0])===(t==null?void 0:t.location[0])&&(e==null?void 0:e.location[1])===(t==null?void 0:t.location[1])&&(e==null?void 0:e.region[0])===(t==null?void 0:t.region[0])&&(e==null?void 0:e.region[1])===(t==null?void 0:t.region[1]):(e==null?void 0:e.kind)===(t==null?void 0:t.kind)&&(e==null?void 0:e.location[0])===(t==null?void 0:t.location[0])&&(e==null?void 0:e.location[1])===(t==null?void 0:t.location[1])}const gl=6,Fc=(e,t)=>{if(e.kind===Z.Custom)return e.copyData;const n=t==null?void 0:t(e);return(n==null?void 0:n.getAccessibilityString(e))??""},Hc=(e,t)=>{const{width:n,height:o,accessibilityHeight:r,columns:i,cellXOffset:l,cellYOffset:s,headerHeight:c,fillHandle:u=!1,groupHeaderHeight:f,rowHeight:m,rows:w,getCellContent:g,getRowThemeOverride:h,onHeaderMenuClick:y,onHeaderIndicatorClick:b,enableGroups:x,isFilling:C,onCanvasFocused:z,onCanvasBlur:X,isFocused:Y,selection:F,freezeColumns:H,onContextMenu:K,freezeTrailingRows:S,fixedShadowX:O=!0,fixedShadowY:P=!0,drawFocusRing:A,onMouseDown:R,onMouseUp:M,onMouseMoveRaw:ie,onMouseMove:ne,onItemHovered:oe,dragAndDropState:Me,firstColAccessible:Ae,onKeyDown:J,onKeyUp:G,highlightRegions:ye,canvasRef:re,onDragStart:ke,onDragEnd:be,eventTargetRef:V,isResizing:Fe,resizeColumn:Re,isDragging:Qe,isDraggable:tt=!1,allowResize:mt,disabledRows:nt,hasAppendRow:ze,getGroupDetails:Ve,theme:Se,prelightCells:wt,headerIcons:at,verticalBorder:je,drawCell:j,drawHeader:$e,onCellFocused:Ie,onDragOverCell:He,onDrop:fe,onDragLeave:Xe,imageWindowLoader:We,smoothScrollX:Oe=!1,smoothScrollY:ae=!1,experimental:Ce,getCellRenderer:et,resizeIndicator:Ye="full"}=e,_e=e.translateX??0,ct=e.translateY??0,Ze=Math.max(H,Math.min(i.length-1,l)),Te=a.useRef(null),Ct=a.useRef(window),Ht=Ct.current,bt=We,xt=a.useRef(),[Lt,ft]=a.useState(!1),yn=a.useRef([]),An=a.useRef(),[lt,En]=a.useState(),[cn,pe]=a.useState(),ht=a.useRef(null),[bn,$t]=a.useState(),[kt,Be]=a.useState(!1),St=a.useRef(kt);St.current=kt;const dt=a.useMemo(()=>new lc(at,()=>{co.current=void 0,Pn.current()}),[at]),Nt=x?f+c:c,Ft=a.useRef(-1),Kt=((Ce==null?void 0:Ce.enableFirefoxRescaling)??!1)&&Ic.value,zn=((Ce==null?void 0:Ce.enableSafariRescaling)??!1)&&Lr.value;a.useLayoutEffect(()=>{window.devicePixelRatio===1||!Kt&&!zn||(Ft.current!==-1&&ft(!0),window.clearTimeout(Ft.current),Ft.current=window.setTimeout(()=>{ft(!1),Ft.current=-1},200))},[s,Ze,_e,ct,Kt,zn]);const Mt=fa(i,H),so=O?zo(Mt,Me):0,qe=a.useCallback((k,U,de)=>{const te=k.getBoundingClientRect();if(U>=Mt.length||de>=w)return;const _=te.width/n,q=bi(U,de,n,o,f,Nt,Ze,s,_e,ct,w,H,S,Mt,m);return _!==1&&(q.x*=_,q.y*=_,q.width*=_,q.height*=_),q.x+=te.x,q.y+=te.y,q},[n,o,f,Nt,Ze,s,_e,ct,w,H,S,Mt,m]),Tt=a.useCallback((k,U,de,te)=>{const _=k.getBoundingClientRect(),q=_.width/n,se=(U-_.left)/q,ce=(de-_.top)/q,ue=5,Dt=yi(Mt,Ze,n,void 0,_e);let me=0,De=0;te instanceof MouseEvent&&(me=te.button,De=te.buttons);const Ee=wa(se,Dt,_e),Ge=ya(ce,o,x,c,f,w,m,s,ct,S),pt=(te==null?void 0:te.shiftKey)===!0,Wt=(te==null?void 0:te.ctrlKey)===!0,vt=(te==null?void 0:te.metaKey)===!0,nn=te!==void 0&&!(te instanceof MouseEvent)||(te==null?void 0:te.pointerType)==="touch",Ke=[se<0?-1:nn||ce>o){const ot=se>n?1:se<0?-1:0,it=ce>o?1:ce<0?-1:0;let on=ot*2,un=it*2;ot===0&&(on=Ee===-1?Fo.EndPadding:Fo.Center),it===0&&(un=Ge===void 0?Fo.EndPadding:Fo.Center);let Bt=!1;if(Ee===-1&&Ge===-1){const Cn=qe(k,Mt.length-1,-1);Zt(Cn!==void 0),Bt=Un&&seo&&ce=0?(it=!0,ot=qe(k,on,Ge),Zt(ot!==void 0),_t={kind:x&&Ge===-2?jt:_n,location:[on,Ge],bounds:ot,group:Mt[on].group??"",isEdge:it,shiftKey:pt,ctrlKey:Wt,metaKey:vt,isTouch:nn,localEventX:U-ot.x,localEventY:de-ot.y,button:me,buttons:De,scrollEdge:Ke}):_t={kind:x&&Ge===-2?jt:_n,group:Mt[Ee].group??"",location:[Ee,Ge],bounds:ot,isEdge:it,shiftKey:pt,ctrlKey:Wt,metaKey:vt,isTouch:nn,localEventX:U-ot.x,localEventY:de-ot.y,button:me,buttons:De,scrollEdge:Ke}}else{const ot=qe(k,Ee,Ge);Zt(ot!==void 0);const it=ot!==void 0&&ot.x+ot.width-U{}),Bn=a.useRef(lt);Bn.current=lt;const[Dn,Fn]=a.useMemo(()=>{const k=document.createElement("canvas"),U=document.createElement("canvas");return k.style.display="none",k.style.opacity="0",k.style.position="fixed",U.style.display="none",U.style.opacity="0",U.style.position="fixed",[k.getContext("2d",{alpha:!1}),U.getContext("2d",{alpha:!1})]},[]);a.useLayoutEffect(()=>{if(!(Dn===null||Fn===null))return document.documentElement.append(Dn.canvas),document.documentElement.append(Fn.canvas),()=>{Dn.canvas.remove(),Fn.canvas.remove()}},[Dn,Fn]);const ao=a.useMemo(()=>new Ra,[]),Ln=Kt&&Lt?1:zn&&Lt?2:5,lr=(Ce==null?void 0:Ce.disableMinimumCellWidth)===!0?1:10,co=a.useRef(),uo=a.useRef(null),fo=a.useRef(null),ho=a.useCallback(()=>{var se;const k=Te.current,U=ht.current;if(k===null||U===null||(uo.current===null&&(uo.current=k.getContext("2d",{alpha:!1}),k.width=0,k.height=0),fo.current===null&&(fo.current=U.getContext("2d",{alpha:!1}),U.width=0,U.height=0),uo.current===null||fo.current===null||Dn===null||Fn===null))return;let de=!1;const te=ce=>{de=!0,$t(ce)},_=co.current,q={headerCanvasCtx:fo.current,canvasCtx:uo.current,bufferACtx:Dn,bufferBCtx:Fn,width:n,height:o,cellXOffset:Ze,cellYOffset:s,translateX:Math.round(_e),translateY:Math.round(ct),mappedColumns:Mt,enableGroups:x,freezeColumns:H,dragAndDropState:Me,theme:Se,headerHeight:c,groupHeaderHeight:f,disabledRows:nt??rt.empty(),rowHeight:m,verticalBorder:je,isResizing:Fe,resizeCol:Re,isFocused:Y,selection:F,fillHandle:u,drawCellCallback:j,hasAppendRow:ze,overrideCursor:te,maxScaleFactor:Ln,freezeTrailingRows:S,rows:w,drawFocus:A,getCellContent:g,getGroupDetails:Ve??(ce=>({name:ce})),getRowThemeOverride:h,drawHeaderCallback:$e,prelightCells:wt,highlightRegions:ye,imageLoader:bt,lastBlitData:An,damage:xt.current,hoverValues:yn.current,hoverInfo:Bn.current,spriteManager:dt,scrolling:Lt,hyperWrapping:(Ce==null?void 0:Ce.hyperWrapping)??!1,touchMode:kt,enqueue:ir.current,renderStateProvider:ao,renderStrategy:(Ce==null?void 0:Ce.renderStrategy)??(Lr.value?"double-buffer":"single-buffer"),getCellRenderer:et,minimumCellWidth:lr,resizeIndicator:Ye};q.damage===void 0?(co.current=q,hl(q,_)):hl(q,void 0),!de&&(q.damage===void 0||q.damage.has((se=Bn==null?void 0:Bn.current)==null?void 0:se[0]))&&$t(void 0)},[Dn,Fn,n,o,Ze,s,_e,ct,Mt,x,H,Me,Se,c,f,nt,m,je,Fe,ze,Re,Y,F,u,S,w,A,Ln,g,Ve,h,j,$e,wt,ye,bt,dt,Lt,Ce==null?void 0:Ce.hyperWrapping,Ce==null?void 0:Ce.renderStrategy,kt,ao,et,lr,Ye]),Pn=a.useRef(ho);a.useLayoutEffect(()=>{ho(),Pn.current=ho},[ho]),a.useLayoutEffect(()=>{(async()=>{var U;((U=document==null?void 0:document.fonts)==null?void 0:U.ready)!==void 0&&(await document.fonts.ready,co.current=void 0,Pn.current())})()},[]);const Wn=a.useCallback(k=>{xt.current=k,Pn.current(),xt.current=void 0},[]),Xr=Dc(Wn);ir.current=Xr;const sr=a.useCallback(k=>{Wn(new er(k.map(U=>U.cell)))},[Wn]);bt.setCallback(Wn);const[Yr,ar]=a.useState(!1),[go,On]=In??[],Gr=go!==void 0&&On===-1,Lo=go!==void 0&&On===-2;let cr=!1,At=!1,Xt=bn;if(Xt===void 0&&go!==void 0&&On!==void 0&&On>-1&&On({contain:"strict",display:"block",cursor:Po}),[Po]),Zn=a.useRef("default"),pn=V==null?void 0:V.current;pn!=null&&Zn.current!==mo.cursor&&(pn.style.cursor=Zn.current=mo.cursor);const dn=a.useCallback((k,U,de,te)=>{if(Ve===void 0)return;const _=Ve(k);if(_.actions!==void 0){const q=Jl(U,_.actions);for(const[se,ce]of q.entries())if(Ho(ce,de+U.x,te+ce.y))return _.actions[se]}},[Ve]),$n=a.useCallback((k,U,de,te)=>{const _=Mt[U];if(!Qe&&!Fe&&!(cn??!1)){const q=qe(k,U,-1);Zt(q!==void 0);const se=Ql(void 0,_,q.x,q.y,q.width,q.height,Se,ki(_.title)==="rtl");if(_.hasMenu===!0&&se.menuBounds!==void 0&&Ho(se.menuBounds,de,te))return{area:"menu",bounds:se.menuBounds};if(_.indicatorIcon!==void 0&&se.indicatorIconBounds!==void 0&&Ho(se.indicatorIconBounds,de,te))return{area:"indicator",bounds:se.indicatorIconBounds}}},[Mt,qe,cn,Qe,Fe,Se]),wo=a.useRef(0),ve=a.useRef(),yo=a.useRef(!1),dr=a.useCallback(k=>{const U=Te.current,de=V==null?void 0:V.current;if(U===null||k.target!==U&&k.target!==de)return;yo.current=!0;let te,_;if(k instanceof MouseEvent?(te=k.clientX,_=k.clientY):(te=k.touches[0].clientX,_=k.touches[0].clientY),k.target===de&&de!==null){const se=de.getBoundingClientRect();if(te>se.right||_>se.bottom)return}const q=Tt(U,te,_,k);ve.current=q.location,q.isTouch&&(wo.current=Date.now()),St.current!==q.isTouch&&Be(q.isTouch),!(q.kind===_n&&$n(U,q.location[0],te,_)!==void 0)&&(q.kind===jt&&dn(q.group,q.bounds,q.localEventX,q.localEventY)!==void 0||(R==null||R(q),!q.isTouch&&tt!==!0&&tt!==q.kind&&q.button<3&&q.button!==1&&k.preventDefault()))},[V,tt,Tt,dn,$n,R]);Ot("touchstart",dr,Ht,!1),Ot("mousedown",dr,Ht,!1);const en=a.useRef(0),ur=a.useCallback(k=>{var De,Ee;const U=en.current;en.current=Date.now();const de=Te.current;if(yo.current=!1,M===void 0||de===null)return;const te=V==null?void 0:V.current,_=k.target!==de&&k.target!==te;let q,se,ce=!0;if(k instanceof MouseEvent){if(q=k.clientX,se=k.clientY,ce=k.button<3,k.pointerType==="touch")return}else q=k.changedTouches[0].clientX,se=k.changedTouches[0].clientY;let ue=Tt(de,q,se,k);ue.isTouch&&wo.current!==0&&Date.now()-wo.current>500&&(ue={...ue,isLongTouch:!0}),U!==0&&Date.now()-U<(ue.isTouch?1e3:500)&&(ue={...ue,isDoubleClick:!0}),St.current!==ue.isTouch&&Be(ue.isTouch),!_&&k.cancelable&&ce&&k.preventDefault();const[Dt]=ue.location,me=$n(de,Dt,q,se);if(ue.kind===_n&&me!==void 0){(ue.button!==0||((De=ve.current)==null?void 0:De[0])!==Dt||((Ee=ve.current)==null?void 0:Ee[1])!==-1)&&M(ue,!0);return}else if(ue.kind===jt){const Ge=dn(ue.group,ue.bounds,ue.localEventX,ue.localEventY);if(Ge!==void 0){ue.button===0&&Ge.onClick(ue);return}}M(ue,_)},[M,V,Tt,$n,dn]);Ot("mouseup",ur,Ht,!1),Ot("touchend",ur,Ht,!1);const Ut=a.useCallback(k=>{var Dt,me;const U=Te.current;if(U===null)return;const de=V==null?void 0:V.current,te=k.target!==U&&k.target!==de;let _,q,se=!0;k instanceof MouseEvent?(_=k.clientX,q=k.clientY,se=k.button<3):(_=k.changedTouches[0].clientX,q=k.changedTouches[0].clientY);const ce=Tt(U,_,q,k);St.current!==ce.isTouch&&Be(ce.isTouch),!te&&k.cancelable&&se&&k.preventDefault();const[ue]=ce.location;if(ce.kind===_n){const De=$n(U,ue,_,q);De!==void 0&&ce.button===0&&((Dt=ve.current)==null?void 0:Dt[0])===ue&&((me=ve.current)==null?void 0:me[1])===-1&&(De.area==="menu"?y==null||y(ue,De.bounds):De.area==="indicator"&&(b==null||b(ue,De.bounds)))}else if(ce.kind===jt){const De=dn(ce.group,ce.bounds,ce.localEventX,ce.localEventY);De!==void 0&&ce.button===0&&De.onClick(ce)}},[V,Tt,$n,y,b,dn]);Ot("click",Ut,Ht,!1);const Wo=a.useCallback(k=>{const U=Te.current,de=V==null?void 0:V.current;if(U===null||k.target!==U&&k.target!==de||K===void 0)return;const te=Tt(U,k.clientX,k.clientY,k);K(te,()=>{k.cancelable&&k.preventDefault()})},[V,Tt,K]);Ot("contextmenu",Wo,(V==null?void 0:V.current)??null,!1);const Oo=a.useCallback(k=>{xt.current=new er(k.map(U=>U.item)),yn.current=k,Pn.current(),xt.current=void 0},[]),$o=a.useMemo(()=>new Rc(Oo),[Oo]),fr=a.useRef($o);fr.current=$o,a.useLayoutEffect(()=>{const k=fr.current;if(In===void 0||In[1]<0){k.setHovered(In);return}const U=g(In,!0),de=et(U),te=de===void 0&&U.kind===Z.Custom||(de==null?void 0:de.needsHover)!==void 0&&(typeof de.needsHover=="boolean"?de.needsHover:de.needsHover(U));k.setHovered(te?In:void 0)},[g,et,In]);const hr=a.useRef(),vn=a.useCallback(k=>{var ce;const U=Te.current;if(U===null)return;const de=V==null?void 0:V.current,te=k.target!==U&&k.target!==de,_=Tt(U,k.clientX,k.clientY,k);if(_.kind!=="out-of-bounds"&&te&&!yo.current&&!_.isTouch)return;const q=(ue,Dt)=>{En(me=>me===ue||(me==null?void 0:me[0][0])===(ue==null?void 0:ue[0][0])&&(me==null?void 0:me[0][1])===(ue==null?void 0:ue[0][1])&&((me==null?void 0:me[1][0])===(ue==null?void 0:ue[1][0])&&(me==null?void 0:me[1][1])===(ue==null?void 0:ue[1][1])||!Dt)?me:ue)};if(!ns(_,hr.current))$t(void 0),oe==null||oe(_),q(_.kind===Wr?void 0:[_.location,[_.localEventX,_.localEventY]],!0),hr.current=_;else if(_.kind==="cell"||_.kind===_n||_.kind===jt){let ue=!1,Dt=!0;if(_.kind==="cell"){const De=g(_.location);Dt=((ce=et(De))==null?void 0:ce.needsHoverPosition)??De.kind===Z.Custom,ue=Dt}else _.kind===jt&&(ue=!0);const me=[_.location,[_.localEventX,_.localEventY]];q(me,Dt),Bn.current=me,ue&&Wn(new er([_.location]))}const se=_.location[0]>=(Ae?0:1);pe(_.kind===_n&&_.isEdge&&se&&mt===!0),ar(_.kind==="cell"&&_.isFillHandle),ie==null||ie(k),ne(_)},[V,Tt,Ae,mt,ie,ne,oe,g,et,Wn]);Ot("mousemove",vn,Ht,!0);const Nn=a.useCallback(k=>{const U=Te.current;if(U===null)return;let de,te;F.current!==void 0&&(de=qe(U,F.current.cell[0],F.current.cell[1]),te=F.current.cell),J==null||J({bounds:de,stopPropagation:()=>k.stopPropagation(),preventDefault:()=>k.preventDefault(),cancel:()=>{},ctrlKey:k.ctrlKey,metaKey:k.metaKey,shiftKey:k.shiftKey,altKey:k.altKey,key:k.key,keyCode:k.keyCode,rawEvent:k,location:te})},[J,F,qe]),tn=a.useCallback(k=>{const U=Te.current;if(U===null)return;let de,te;F.current!==void 0&&(de=qe(U,F.current.cell[0],F.current.cell[1]),te=F.current.cell),G==null||G({bounds:de,stopPropagation:()=>k.stopPropagation(),preventDefault:()=>k.preventDefault(),cancel:()=>{},ctrlKey:k.ctrlKey,metaKey:k.metaKey,shiftKey:k.shiftKey,altKey:k.altKey,key:k.key,keyCode:k.keyCode,rawEvent:k,location:te})},[G,F,qe]),D=a.useCallback(k=>{if(Te.current=k,re!==void 0&&(re.current=k),k===null)Ct.current=window;else{const U=k.getRootNode();U===document&&(Ct.current=window),Ct.current=U}},[re]),gt=a.useCallback(k=>{const U=Te.current;if(U===null||tt===!1||Fe){k.preventDefault();return}let de,te;const _=Tt(U,k.clientX,k.clientY);if(tt!==!0&&_.kind!==tt){k.preventDefault();return}const q=(De,Ee)=>{de=De,te=Ee};let se,ce,ue;const Dt=(De,Ee,Ge)=>{se=De,ce=Ee,ue=Ge};let me=!1;if(ke==null||ke({..._,setData:q,setDragImage:Dt,preventDefault:()=>me=!0,defaultPrevented:()=>me}),!me&&de!==void 0&&te!==void 0&&k.dataTransfer!==null)if(k.dataTransfer.setData(de,te),k.dataTransfer.effectAllowed="copyLink",se!==void 0&&ce!==void 0&&ue!==void 0)k.dataTransfer.setDragImage(se,ce,ue);else{const[De,Ee]=_.location;if(Ee!==void 0){const Ge=document.createElement("canvas"),pt=qe(U,De,Ee);Zt(pt!==void 0);const Wt=Math.ceil(window.devicePixelRatio??1);Ge.width=pt.width*Wt,Ge.height=pt.height*Wt;const vt=Ge.getContext("2d");vt!==null&&(vt.scale(Wt,Wt),vt.textBaseline="middle",Ee===-1?(vt.font=Se.headerFontFull,vt.fillStyle=Se.bgHeader,vt.fillRect(0,0,Ge.width,Ge.height),es(vt,0,0,pt.width,pt.height,Mt[De],!1,Se,!1,!1,0,dt,$e,!1)):(vt.font=Se.baseFontFull,vt.fillStyle=Se.bgCell,vt.fillRect(0,0,Ge.width,Ge.height),Zl(vt,g([De,Ee]),0,Ee,!1,!1,0,0,pt.width,pt.height,!1,Se,Se.bgCell,bt,dt,1,void 0,!1,0,void 0,void 0,void 0,ao,et,()=>{}))),Ge.style.left="-100%",Ge.style.position="absolute",Ge.style.width=`${pt.width}px`,Ge.style.height=`${pt.height}px`,document.body.append(Ge),k.dataTransfer.setDragImage(Ge,pt.width/2,pt.height/2),window.setTimeout(()=>{Ge.remove()},0)}}else k.preventDefault()},[tt,Fe,Tt,ke,qe,Se,Mt,dt,$e,g,bt,ao,et]);Ot("dragstart",gt,(V==null?void 0:V.current)??null,!1,!1);const Hn=a.useRef(),Kr=a.useCallback(k=>{const U=Te.current;if(fe!==void 0&&k.preventDefault(),U===null||He===void 0)return;const de=Tt(U,k.clientX,k.clientY),[te,_]=de.location,q=te-(Ae?0:1),[se,ce]=Hn.current??[];(se!==q||ce!==_)&&(Hn.current=[q,_],He([q,_],k.dataTransfer))},[Ae,Tt,He,fe]);Ot("dragover",Kr,(V==null?void 0:V.current)??null,!1,!1);const gr=a.useCallback(()=>{Hn.current=void 0,be==null||be()},[be]);Ot("dragend",gr,(V==null?void 0:V.current)??null,!1,!1);const Ur=a.useCallback(k=>{const U=Te.current;if(U===null||fe===void 0)return;k.preventDefault();const de=Tt(U,k.clientX,k.clientY),[te,_]=de.location,q=te-(Ae?0:1);fe([q,_],k.dataTransfer)},[Ae,Tt,fe]);Ot("drop",Ur,(V==null?void 0:V.current)??null,!1,!1);const _r=a.useCallback(()=>{Xe==null||Xe()},[Xe]);Ot("dragleave",_r,(V==null?void 0:V.current)??null,!1,!1);const Vr=a.useRef(F);Vr.current=F;const B=a.useRef(null),zt=a.useCallback(k=>{var U;Te.current===null||!Te.current.contains(document.activeElement)||(k===null&&Vr.current.current!==void 0?(U=re==null?void 0:re.current)==null||U.focus({preventScroll:!0}):k!==null&&k.focus({preventScroll:!0}),B.current=k)},[re]);a.useImperativeHandle(t,()=>({focus:()=>{var U;const k=B.current;k===null||!document.contains(k)?(U=re==null?void 0:re.current)==null||U.focus({preventScroll:!0}):k.focus({preventScroll:!0})},getBounds:(k,U)=>{if(!(re===void 0||re.current===null))return qe(re.current,k??0,U??-1)},damage:sr}),[re,sr,qe]);const Rt=a.useRef(),qr=Qs(()=>{var ce,ue,Dt;if(n<50||(Ce==null?void 0:Ce.disableAccessibilityTree)===!0)return null;let k=yi(Mt,Ze,n,Me,_e);const U=Ae?0:-1;!Ae&&((ce=k[0])==null?void 0:ce.sourceIndex)===0&&(k=k.slice(1));const[de,te]=((ue=F.current)==null?void 0:ue.cell)??[],_=(Dt=F.current)==null?void 0:Dt.range,q=k.map(me=>me.sourceIndex),se=ro(s,Math.min(w,s+r));return de!==void 0&&te!==void 0&&!(q.includes(de)&&se.includes(te))&&zt(null),a.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":w+1,"aria-multiselectable":"true","aria-colcount":Mt.length+U},a.createElement("thead",{role:"rowgroup"},a.createElement("tr",{role:"row","aria-rowindex":1},k.map(me=>a.createElement("th",{role:"columnheader","aria-selected":F.columns.hasIndex(me.sourceIndex),"aria-colindex":me.sourceIndex+1+U,tabIndex:-1,onFocus:De=>{if(De.target!==B.current)return Ie==null?void 0:Ie([me.sourceIndex,-1])},key:me.sourceIndex},me.title)))),a.createElement("tbody",{role:"rowgroup"},se.map(me=>a.createElement("tr",{role:"row","aria-selected":F.rows.hasIndex(me),key:me,"aria-rowindex":me+2},k.map(De=>{const Ee=De.sourceIndex,Ge=wn(Ee,me),pt=de===Ee&&te===me,Wt=_!==void 0&&Ee>=_.x&&Ee<_.x+_.width&&me>=_.y&&me<_.y+_.height,vt=`glide-cell-${Ee}-${me}`,nn=[Ee,me],Ke=g(nn,!0);return a.createElement("td",{key:Ge,role:"gridcell","aria-colindex":Ee+1+U,"aria-selected":Wt,"aria-readonly":Do(Ke)||!Zo(Ke),id:vt,"data-testid":vt,onClick:()=>{const _t=re==null?void 0:re.current;if(_t!=null)return J==null?void 0:J({bounds:qe(_t,Ee,me),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:nn})},onFocusCapture:_t=>{var ot,it;if(!(_t.target===B.current||((ot=Rt.current)==null?void 0:ot[0])===Ee&&((it=Rt.current)==null?void 0:it[1])===me))return Rt.current=nn,Ie==null?void 0:Ie(nn)},ref:pt?zt:void 0,tabIndex:-1},Fc(Ke,et))})))))},[n,Mt,Ze,Me,_e,w,s,r,F,zt,g,re,J,qe,Ie],200),bo=H===0||!O?0:Ze>H?1:sn(-_e/100,0,1),po=-s*32+ct,Pt=P?sn(-po/100,0,1):0,Xn=a.useMemo(()=>{if(!bo&&!Pt)return null;const k={position:"absolute",top:0,left:so,width:n-so,height:o,opacity:bo,pointerEvents:"none",transition:Oe?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},U={position:"absolute",top:Nt,left:0,width:n,height:o,opacity:Pt,pointerEvents:"none",transition:ae?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return a.createElement(a.Fragment,null,bo>0&&a.createElement("div",{id:"shadow-x",style:k}),Pt>0&&a.createElement("div",{id:"shadow-y",style:U}))},[bo,Pt,so,n,Oe,Nt,o,ae]),jr=a.useMemo(()=>({position:"absolute",top:0,left:0}),[]);return a.createElement(a.Fragment,null,a.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:Nn,onKeyUp:tn,onFocus:z,onBlur:X,ref:D,style:mo},qr),a.createElement("canvas",{ref:ht,style:jr}),Xn)},Tc=a.memo(a.forwardRef(Hc));function jo(e,t,n,o){return sn(Math.round(t-(e.growOffset??0)),Math.ceil(n),Math.floor(o))}const Ac=e=>{const[t,n]=a.useState(),[o,r]=a.useState(),[i,l]=a.useState(),[s,c]=a.useState(),[u,f]=a.useState(!1),[m,w]=a.useState(),[g,h]=a.useState(),[y,b]=a.useState(),[x,C]=a.useState(!1),[z,X]=a.useState(),{onHeaderMenuClick:Y,onHeaderIndicatorClick:F,getCellContent:H,onColumnMoved:K,onColumnResize:S,onColumnResizeStart:O,onColumnResizeEnd:P,gridRef:A,maxColumnWidth:R,minColumnWidth:M,onRowMoved:ie,lockColumns:ne,onColumnProposeMove:oe,onMouseDown:Me,onMouseUp:Ae,onItemHovered:J,onDragStart:G,canvasRef:ye}=e,re=(S??P??O)!==void 0,{columns:ke,selection:be}=e,V=be.columns,Fe=a.useCallback(j=>{const[$e,Ie]=j.location;i!==void 0&&s!==$e&&$e>=ne?(f(!0),c($e)):g!==void 0&&Ie!==void 0?(C(!0),b(Math.max(0,Ie))):o===void 0&&!u&&!x&&(J==null||J(j))},[i,g,s,J,ne,o,u,x]),Re=K!==void 0,Qe=a.useCallback(j=>{var $e;if(j.button===0){const[Ie,He]=j.location;if(j.kind==="out-of-bounds"&&j.isEdge&&re){const fe=($e=A==null?void 0:A.current)==null?void 0:$e.getBounds(ke.length-1,-1);fe!==void 0&&(n(fe.x),r(ke.length-1))}else if(j.kind==="header"&&Ie>=ne){const fe=ye==null?void 0:ye.current;if(j.isEdge&&re&&fe){n(j.bounds.x),r(Ie);const We=fe.getBoundingClientRect().width/fe.offsetWidth,Oe=j.bounds.width/We;O==null||O(ke[Ie],Oe,Ie,Oe+(ke[Ie].growOffset??0))}else j.kind==="header"&&Re&&(w(j.bounds.x),l(Ie))}else j.kind==="cell"&&ne>0&&Ie===0&&He!==void 0&&ie!==void 0&&(X(j.bounds.y),h(He))}Me==null||Me(j)},[Me,re,ne,ie,A,ke,Re,O,ye]),tt=a.useCallback((j,$e)=>{u||x||Y==null||Y(j,$e)},[u,x,Y]),mt=a.useCallback((j,$e)=>{u||x||F==null||F(j,$e)},[u,x,F]),nt=a.useRef(-1),ze=a.useCallback(()=>{nt.current=-1,h(void 0),b(void 0),X(void 0),C(!1),l(void 0),c(void 0),w(void 0),f(!1),r(void 0),n(void 0)},[]),Ve=a.useCallback((j,$e)=>{if(j.button===0){if(o!==void 0){if((V==null?void 0:V.hasIndex(o))===!0)for(const He of V){if(He===o)continue;const fe=ke[He],Xe=jo(fe,nt.current,M,R);S==null||S(fe,Xe,He,Xe+(fe.growOffset??0))}const Ie=jo(ke[o],nt.current,M,R);if(P==null||P(ke[o],Ie,o,Ie+(ke[o].growOffset??0)),V.hasIndex(o))for(const He of V){if(He===o)continue;const fe=ke[He],Xe=jo(fe,nt.current,M,R);P==null||P(fe,Xe,He,Xe+(fe.growOffset??0))}}ze(),i!==void 0&&s!==void 0&&(K==null||K(i,s)),g!==void 0&&y!==void 0&&(ie==null||ie(g,y))}Ae==null||Ae(j,$e)},[Ae,o,i,s,g,y,V,P,ke,M,R,S,K,ie,ze]),Se=a.useMemo(()=>{if(!(i===void 0||s===void 0)&&i!==s&&(oe==null?void 0:oe(i,s))!==!1)return{src:i,dest:s}},[i,s,oe]),wt=a.useCallback(j=>{const $e=ye==null?void 0:ye.current;if(i!==void 0&&m!==void 0)Math.abs(j.clientX-m)>20&&f(!0);else if(g!==void 0&&z!==void 0)Math.abs(j.clientY-z)>20&&C(!0);else if(o!==void 0&&t!==void 0&&$e){const He=$e.getBoundingClientRect().width/$e.offsetWidth,fe=(j.clientX-t)/He,Xe=ke[o],We=jo(Xe,fe,M,R);if(S==null||S(Xe,We,o,We+(Xe.growOffset??0)),nt.current=fe,(V==null?void 0:V.first())===o)for(const Oe of V){if(Oe===o)continue;const ae=ke[Oe],Ce=jo(ae,nt.current,M,R);S==null||S(ae,Ce,Oe,Ce+(ae.growOffset??0))}}},[i,m,g,z,o,t,ke,M,R,S,V,ye]),at=a.useCallback((j,$e)=>{if(g===void 0||y===void 0)return H(j,$e);let[Ie,He]=j;return He===y?He=g:(He>y&&(He-=1),He>=g&&(He+=1)),H([Ie,He],$e)},[g,y,H]),je=a.useCallback(j=>{G==null||G(j),j.defaultPrevented()||ze()},[ze,G]);return a.createElement(Tc,{accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,enableGroups:e.enableGroups,eventTargetRef:e.eventTargetRef,experimental:e.experimental,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,headerIcons:e.headerIcons,height:e.height,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,resizeColumn:o,isDraggable:e.isDraggable,isFilling:e.isFilling,isFocused:e.isFocused,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDrop:e.onDrop,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,resizeIndicator:e.resizeIndicator,verticalBorder:e.verticalBorder,width:e.width,getCellContent:at,isResizing:o!==void 0,onHeaderMenuClick:tt,onHeaderIndicatorClick:mt,isDragging:u,onItemHovered:Fe,onDragStart:je,onMouseDown:Qe,allowResize:re,onMouseUp:Ve,dragAndDropState:Se,onMouseMoveRaw:wt,ref:A})},zc=Ac;function Bc(e){const t=a.useRef(null),[n,o]=a.useState({width:e==null?void 0:e[0],height:e==null?void 0:e[1]});return a.useLayoutEffect(()=>{const r=l=>{for(const s of l){const{width:c,height:u}=s&&s.contentRect||{};o(f=>f.width===c&&f.height===u?f:{width:c,height:u})}},i=new window.ResizeObserver(r);return t.current&&i.observe(t.current,void 0),()=>{i.disconnect()}},[t.current]),{ref:t,...n}}const Lc=(e,t,n)=>{const o=a.useRef(null),r=a.useRef(null),i=a.useRef(null),l=a.useRef(0),s=a.useRef(t);s.current=t;const c=n.current;a.useEffect(()=>{const u=()=>{var w,g;if(r.current===!1&&c!==null){const h=[c.scrollLeft,c.scrollTop];if(((w=i.current)==null?void 0:w[0])===h[0]&&((g=i.current)==null?void 0:g[1])===h[1])if(l.current>10){i.current=null,r.current=null;return}else l.current++;else l.current=0,s.current(h[0],h[1]),i.current=h;o.current=window.setTimeout(u,8.333333333333334)}},f=()=>{r.current=!0,i.current=null,o.current!==null&&(window.clearTimeout(o.current),o.current=null)},m=w=>{w.touches.length===0&&(r.current=!1,l.current=0,o.current=window.setTimeout(u,8.333333333333334))};if(e&&c!==null){const w=c;return w.addEventListener("touchstart",f),w.addEventListener("touchend",m),()=>{w.removeEventListener("touchstart",f),w.removeEventListener("touchend",m),o.current!==null&&window.clearTimeout(o.current)}}},[e,c])},Pc=Lc,Wc=()=>e=>e.isSafari?"scroll":"auto",Oc=Qt("div")({name:"ScrollRegionStyle",class:"gdg-s1dgczr6",propsAsIs:!1,vars:{"s1dgczr6-0":[Wc()]}});function $c(e){const[t,n]=a.useState(!1),o=typeof window>"u"?null:window,r=a.useRef(0);return Ot("touchstart",a.useCallback(()=>{window.clearTimeout(r.current),n(!0)},[]),o,!0,!1),Ot("touchend",a.useCallback(i=>{i.touches.length===0&&(r.current=window.setTimeout(()=>n(!1),e))},[e]),o,!0,!1),t}const Nc=e=>{var re,ke;const{children:t,clientHeight:n,scrollHeight:o,scrollWidth:r,update:i,draggable:l,className:s,preventDiagonalScrolling:c=!1,paddingBottom:u=0,paddingRight:f=0,rightElement:m,rightElementProps:w,kineticScrollPerfHack:g=!1,scrollRef:h,initialSize:y}=e,b=[],x=(w==null?void 0:w.sticky)??!1,C=(w==null?void 0:w.fill)??!1,z=a.useRef(0),X=a.useRef(0),Y=a.useRef(null),F=typeof window>"u"?1:window.devicePixelRatio,H=a.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),K=a.useRef(null),S=$c(200),[O,P]=a.useState(!0),A=a.useRef(0);a.useLayoutEffect(()=>{if(!O||S||H.current.lockDirection===void 0)return;const be=Y.current;if(be===null)return;const[V,Fe]=H.current.lockDirection;V!==void 0?be.scrollLeft=V:Fe!==void 0&&(be.scrollTop=Fe),H.current.lockDirection=void 0},[S,O]);const R=a.useCallback((be,V)=>{var je;const Fe=Y.current;if(Fe===null)return;V=V??Fe.scrollTop,be=be??Fe.scrollLeft;const Re=H.current.scrollTop,Qe=H.current.scrollLeft,tt=be-Qe,mt=V-Re;S&&tt!==0&&mt!==0&&(Math.abs(tt)>3||Math.abs(mt)>3)&&c&&H.current.lockDirection===void 0&&(H.current.lockDirection=Math.abs(tt)0&&(Math.abs(wt)>2e3||Se===0||Se===at)&&o>Fe.scrollHeight+5){const j=Se/at,$e=(o-Ve)*j;z.current=$e-Se}nt!==void 0&&(window.clearTimeout(A.current),P(!1),A.current=window.setTimeout(()=>P(!0),200)),i({x:be,y:Se+z.current,width:ze-f,height:Ve-u,paddingRight:((je=K.current)==null?void 0:je.clientWidth)??0})},[u,f,o,i,c,S]);Pc(g&&Lr.value,R,Y);const M=a.useRef(R);M.current=R;const ie=a.useRef(),ne=a.useRef(!1);a.useLayoutEffect(()=>{ne.current?R():ne.current=!0},[R,u,f]);const oe=a.useCallback(be=>{Y.current=be,h!==void 0&&(h.current=be)},[h]);let Me=0,Ae=0;for(b.push(a.createElement("div",{key:Me++,style:{width:r,height:0}}));AeM.current(),0),ie.current={width:G,height:ye}),(G??0)===0||(ye??0)===0?a.createElement("div",{ref:J}):a.createElement("div",{ref:J},a.createElement(Oc,{isSafari:Lr.value},a.createElement("div",{className:"dvn-underlay"},t),a.createElement("div",{ref:oe,style:ie.current,draggable:l,onDragStart:be=>{l||(be.stopPropagation(),be.preventDefault())},className:"dvn-scroller "+(s??""),onScroll:()=>R()},a.createElement("div",{className:"dvn-scroll-inner"+(m===void 0?" dvn-hidden":"")},a.createElement("div",{className:"dvn-stack"},b),m!==void 0&&a.createElement(a.Fragment,null,!C&&a.createElement("div",{className:"dvn-spacer"}),a.createElement("div",{ref:K,style:{height:ye,maxHeight:n-Math.ceil(F%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:f,flexGrow:C?1:void 0,right:x?f??0:void 0,pointerEvents:"auto"}},m))))))},Xc=e=>{const{columns:t,rows:n,rowHeight:o,headerHeight:r,groupHeaderHeight:i,enableGroups:l,freezeColumns:s,experimental:c,nonGrowWidth:u,clientSize:f,className:m,onVisibleRegionChanged:w,scrollRef:g,preventDiagonalScrolling:h,rightElement:y,rightElementProps:b,overscrollX:x,overscrollY:C,initialSize:z,smoothScrollX:X=!1,smoothScrollY:Y=!1,isDraggable:F}=e,{paddingRight:H,paddingBottom:K}=c??{},[S,O]=f,P=a.useRef(),A=a.useRef(),R=a.useRef(),M=a.useRef(),ie=u+Math.max(0,x??0);let ne=l?r+i:r;if(typeof o=="number")ne+=n*o;else for(let J=0;J{var mt,nt;if(oe.current===void 0)return;const J={...oe.current};let G=0,ye=J.x<0?-J.x:0,re=0,ke=0;J.x=J.x<0?0:J.x;let be=0;for(let ze=0;ze=Ve+ze.width)G+=ze.width,ke++,re++;else if(J.x>Ve)G+=ze.width,X?ye+=Ve-J.x:ke++,re++;else if(J.x+J.width>Ve)G+=ze.width,re++;else break}let V=0,Fe=0,Re=0;if(typeof o=="number")Y?(Fe=Math.floor(J.y/o),V=Fe*o-J.y):Fe=Math.ceil(J.y/o),Re=Math.ceil(J.height/o)+Fe,V<0&&Re++;else{let ze=0;for(let Ve=0;Ve=ze+Se)ze+=Se,Fe++,Re++;else if(J.y>wt)ze+=Se,Y?V+=wt-J.y:Fe++,Re++;else if(J.y+J.height>Se/2+ze)ze+=Se,Re++;else break}}const Qe={x:ke,y:Fe,width:re-ke,height:Re-Fe},tt=P.current;(tt===void 0||tt.y!==Qe.y||tt.x!==Qe.x||tt.height!==Qe.height||tt.width!==Qe.width||A.current!==ye||R.current!==V||J.width!==((mt=M.current)==null?void 0:mt[0])||J.height!==((nt=M.current)==null?void 0:nt[1]))&&(w==null||w({x:ke,y:Fe,width:re-ke,height:Re-Fe},J.width,J.height,J.paddingRight??0,ye,V),P.current=Qe,A.current=ye,R.current=V,M.current=[J.width,J.height])},[t,o,n,w,s,X,Y]),Ae=a.useCallback(J=>{oe.current=J,Me()},[Me]);return a.useEffect(()=>{Me()},[Me]),a.createElement(Nc,{scrollRef:g,className:m,kineticScrollPerfHack:c==null?void 0:c.kineticScrollPerfHack,preventDiagonalScrolling:h,draggable:F===!0||typeof F=="string",scrollWidth:ie+(H??0),scrollHeight:ne+(K??0),clientHeight:O,rightElement:y,paddingBottom:K,paddingRight:H,rightElementProps:b,update:Ae,initialSize:z},a.createElement(zc,{eventTargetRef:g,width:S,height:O,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,onColumnProposeMove:e.onColumnProposeMove,verticalBorder:e.verticalBorder,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator}))},Yc=Xc,Gc=Qt("div")({name:"SearchWrapper",class:"gdg-seveqep",propsAsIs:!1}),Kc=a.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},a.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),Uc=a.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},a.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),_c=a.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},a.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),Vc=10,qc=e=>{const{canvasRef:t,cellYOffset:n,rows:o,columns:r,searchInputRef:i,searchValue:l,searchResults:s,onSearchValueChange:c,getCellsForSelection:u,onSearchResultsChanged:f,showSearch:m=!1,onSearchClose:w}=e,[g]=a.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[h,y]=a.useState(""),b=l??h,x=a.useCallback(G=>{y(G),c==null||c(G)},[c]),[C,z]=a.useState(),X=a.useRef(C);X.current=C,a.useEffect(()=>{s!==void 0&&(s.length>0?z(G=>({rowsSearched:o,results:s.length,selectedIndex:(G==null?void 0:G.selectedIndex)??-1})):z(void 0))},[o,s]);const Y=a.useRef();Y.current===void 0&&(Y.current=new AbortController);const F=a.useRef(),[H,K]=a.useState([]),S=s??H,O=a.useCallback(()=>{F.current!==void 0&&(window.cancelAnimationFrame(F.current),F.current=void 0,Y.current.abort())},[]),P=a.useRef(n);P.current=n;const A=a.useCallback(G=>{const ye=new RegExp(G.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let re=P.current,ke=Math.min(10,o),be=0;z(void 0),K([]);const V=[],Fe=async()=>{var at;if(u===void 0)return;const Re=performance.now(),Qe=o-be;let tt=u({x:0,y:re,width:r.length,height:Math.min(ke,Qe,o-re)},Y.current.signal);typeof tt=="function"&&(tt=await tt());let mt=!1;for(const[je,j]of tt.entries())for(const[$e,Ie]of j.entries()){let He;switch(Ie.kind){case Z.Text:case Z.Number:He=Ie.displayData;break;case Z.Uri:case Z.Markdown:He=Ie.data;break;case Z.Boolean:He=typeof Ie.data=="boolean"?Ie.data.toString():void 0;break;case Z.Image:case Z.Bubble:He=Ie.data.join("🐳");break;case Z.Custom:He=Ie.copyData;break}He!==void 0&&ye.test(He)&&(V.push([$e,je+re]),mt=!0)}const nt=performance.now();mt&&K([...V]),be+=tt.length,Zt(be<=o);const ze=((at=X.current)==null?void 0:at.selectedIndex)??-1;z({results:V.length,rowsSearched:be,selectedIndex:ze}),f==null||f(V,ze),re+ke>=o?re=0:re+=ke;const Ve=nt-Re,Se=Math.max(Ve,1),wt=Vc/Se;ke=Math.ceil(ke*wt),be{var G;w==null||w(),z(void 0),K([]),f==null||f([],-1),O(),(G=t==null?void 0:t.current)==null||G.focus()},[O,t,w,f]),M=a.useCallback(G=>{x(G.target.value),s===void 0&&(G.target.value===""?(z(void 0),K([]),O()):A(G.target.value))},[A,O,x,s]);a.useEffect(()=>{m&&i.current!==null&&(x(""),i.current.focus({preventScroll:!0}))},[m,i,x]);const ie=a.useCallback(G=>{var re;if((re=G==null?void 0:G.stopPropagation)==null||re.call(G),C===void 0)return;const ye=(C.selectedIndex+1)%C.results;z({...C,selectedIndex:ye}),f==null||f(S,ye)},[C,f,S]),ne=a.useCallback(G=>{var re;if((re=G==null?void 0:G.stopPropagation)==null||re.call(G),C===void 0)return;let ye=(C.selectedIndex-1)%C.results;ye<0&&(ye+=C.results),z({...C,selectedIndex:ye}),f==null||f(S,ye)},[f,S,C]),oe=a.useCallback(G=>{(G.ctrlKey||G.metaKey)&&G.nativeEvent.code==="KeyF"||G.key==="Escape"?(R(),G.stopPropagation(),G.preventDefault()):G.key==="Enter"&&(G.shiftKey?ne():ie())},[R,ie,ne]);a.useEffect(()=>()=>{O()},[O]);const[Me,Ae]=a.useState(!1);a.useEffect(()=>{if(m)Ae(!0);else{const G=setTimeout(()=>Ae(!1),150);return()=>clearTimeout(G)}},[m]);const J=a.useMemo(()=>{if(!m&&!Me)return null;let G;C!==void 0&&(G=C.results>=1e3?"over 1000":`${C.results} result${C.results!==1?"s":""}`,C.selectedIndex>=0&&(G=`${C.selectedIndex+1} of ${G}`));const ye=be=>{be.stopPropagation()},ke={width:`${Math.floor(((C==null?void 0:C.rowsSearched)??0)/o*100)}%`};return a.createElement(Gc,{className:m?"":"out",onMouseDown:ye,onMouseMove:ye,onMouseUp:ye,onClick:ye},a.createElement("div",{className:"gdg-search-bar-inner"},a.createElement("input",{id:g,"aria-hidden":!m,"data-testid":"search-input",ref:i,onChange:M,value:b,tabIndex:m?void 0:-1,onKeyDownCapture:oe}),a.createElement("button",{"aria-label":"Previous Result","aria-hidden":!m,tabIndex:m?void 0:-1,onClick:ne,disabled:((C==null?void 0:C.results)??0)===0},Kc),a.createElement("button",{"aria-label":"Next Result","aria-hidden":!m,tabIndex:m?void 0:-1,onClick:ie,disabled:((C==null?void 0:C.results)??0)===0},Uc),w!==void 0&&a.createElement("button",{"aria-label":"Close Search","aria-hidden":!m,"data-testid":"search-close-button",tabIndex:m?void 0:-1,onClick:R},_c)),C!==void 0?a.createElement(a.Fragment,null,a.createElement("div",{className:"gdg-search-status"},a.createElement("div",{"data-testid":"search-result-area"},G)),a.createElement("div",{className:"gdg-search-progress",style:ke})):a.createElement("div",{className:"gdg-search-status"},a.createElement("label",{htmlFor:g},"Type to search")))},[m,Me,C,o,g,i,M,b,oe,ne,ie,w,R]);return a.createElement(a.Fragment,null,a.createElement(Yc,{prelightCells:S,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,className:e.className,clientSize:e.clientSize,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,nonGrowWidth:e.nonGrowWidth,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,initialSize:e.initialSize,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,onVisibleRegionChanged:e.onVisibleRegionChanged,overscrollX:e.overscrollX,overscrollY:e.overscrollY,preventDiagonalScrolling:e.preventDiagonalScrolling,rightElement:e.rightElement,rightElementProps:e.rightElementProps,rowHeight:e.rowHeight,rows:e.rows,scrollRef:e.scrollRef,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,onColumnProposeMove:e.onColumnProposeMove,drawFocusRing:e.drawFocusRing,drawCell:e.drawCell,drawHeader:e.drawHeader,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator}),J)},jc=qc;class Zc extends a.PureComponent{constructor(){super(...arguments);Ne(this,"wrapperRef",a.createRef());Ne(this,"clickOutside",n=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(n))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(n.target)){let o=n.target;for(;o!==null;){if(o.classList.contains("click-outside-ignore"))return;o=o.parentElement}this.props.onClickOutside()}})}componentDidMount(){document.addEventListener("touchend",this.clickOutside,!0),document.addEventListener("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener("touchend",this.clickOutside,!0),document.removeEventListener("mousedown",this.clickOutside,!0),document.removeEventListener("contextmenu",this.clickOutside,!0)}render(){const{onClickOutside:n,isOutsideClick:o,...r}=this.props;return a.createElement("div",{...r,ref:this.wrapperRef},this.props.children)}}const Jc=()=>e=>Math.max(16,e.targetHeight-10),Qc=Qt("input")({name:"RenameInput",class:"gdg-r17m35ur",propsAsIs:!1,vars:{"r17m35ur-0":[Jc(),"px"]}}),ed=e=>{const{bounds:t,group:n,onClose:o,canvasBounds:r,onFinish:i}=e,[l,s]=yt.useState(n);return yt.createElement(Zc,{style:{position:"absolute",left:t.x-r.left+1,top:t.y-r.top,width:t.width-2,height:t.height},className:"gdg-c1tqibwd",onClickOutside:o},yt.createElement(Qc,{targetHeight:t.height,"data-testid":"group-rename-input",value:l,onBlur:o,onFocus:c=>c.target.setSelectionRange(0,l.length),onChange:c=>s(c.target.value),onKeyDown:c=>{c.key==="Enter"?i(l):c.key==="Escape"&&o()},autoFocus:!0}))};function td(e,t){return e===void 0?!1:e.length>1&&e.startsWith("_")?Number.parseInt(e.slice(1))===t.keyCode:e.length===1&&e>="a"&&e<="z"?e.toUpperCase().codePointAt(0)===t.keyCode:e===t.key}function Le(e,t,n){const o=os(e,t);return o&&(n.didMatch=!0),o}function os(e,t){if(e.length===0)return!1;if(e.includes("|")){const c=e.split("|");for(const u of c)if(os(u,t))return!0;return!1}let n=!1,o=!1,r=!1,i=!1;const l=e.split("+"),s=l.pop();if(!td(s,t))return!1;if(l[0]==="any")return!0;for(const c of l)switch(c){case"ctrl":n=!0;break;case"shift":o=!0;break;case"alt":r=!0;break;case"meta":i=!0;break;case"primary":Pr.value?i=!0:n=!0;break}return t.altKey===r&&t.ctrlKey===n&&t.shiftKey===o&&t.metaKey===i}function nd(e,t,n,o,r,i){const l=yt.useCallback((u,f,m,w)=>{var C;(i==="cell"||i==="multi-cell")&&u!==void 0&&(u={...u,range:{x:u.cell[0],y:u.cell[1],width:1,height:1}});const g=n==="mixed"&&(m||w==="drag"),h=o==="mixed"&&g,y=r==="mixed"&&g;let b={current:u===void 0?void 0:{...u,rangeStack:w==="drag"?((C=e.current)==null?void 0:C.rangeStack)??[]:[]},columns:h?e.columns:rt.empty(),rows:y?e.rows:rt.empty()};m&&(i==="multi-rect"||i==="multi-cell")&&b.current!==void 0&&e.current!==void 0&&(b={...b,current:{...b.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),t(b,f)},[o,e,n,i,r,t]),s=yt.useCallback((u,f,m)=>{u=u??e.rows,f!==void 0&&(u=u.add(f));let w;if(r==="exclusive"&&u.length>0)w={current:void 0,columns:rt.empty(),rows:u};else{const g=m&&n==="mixed",h=m&&o==="mixed";w={current:g?e.current:void 0,columns:h?e.columns:rt.empty(),rows:u}}t(w,!1)},[o,e,n,r,t]),c=yt.useCallback((u,f,m)=>{u=u??e.columns,f!==void 0&&(u=u.add(f));let w;if(o==="exclusive"&&u.length>0)w={current:void 0,rows:rt.empty(),columns:u};else{const g=m&&n==="mixed",h=m&&r==="mixed";w={current:g?e.current:void 0,rows:h?e.rows:rt.empty(),columns:u}}t(w,!1)},[o,e,n,r,t]);return[l,s,c]}function od(e,t,n,o,r){const i=a.useCallback(u=>{if(e===!0){const f=[];for(let m=u.y;m=r?w.push({kind:Z.Loading,allowOverlay:!1}):w.push(t([g,m]));f.push(w)}return f}return(e==null?void 0:e(u,o.signal))??[]},[o.signal,t,e,r]),l=e!==void 0?i:void 0,s=a.useCallback(u=>{if(l===void 0)return[];const f={...u,x:u.x-n};if(f.x<0){f.x=0,f.width--;const m=l(f,o.signal);return typeof m=="function"?async()=>(await m()).map(w=>[{kind:Z.Loading,allowOverlay:!1},...w]):m.map(w=>[{kind:Z.Loading,allowOverlay:!1},...w])}return l(f,o.signal)},[o.signal,l,n]);return[e!==void 0?s:void 0,l]}function rd(e){if(e.copyData!==void 0)return{formatted:e.copyData,rawValue:e.copyData,format:"string"};switch(e.kind){case Z.Boolean:return{formatted:e.data===!0?"TRUE":e.data===!1?"FALSE":e.data===Ci?"INDETERMINATE":"",rawValue:e.data,format:"boolean"};case Z.Custom:return{formatted:e.copyData,rawValue:e.copyData,format:"string"};case Z.Image:case Z.Bubble:return{formatted:e.data,rawValue:e.data,format:"string-array"};case Z.Drilldown:return{formatted:e.data.map(t=>t.text),rawValue:e.data.map(t=>t.text),format:"string-array"};case Z.Text:return{formatted:e.displayData??e.data,rawValue:e.data,format:"string"};case Z.Uri:return{formatted:e.displayData??e.data,rawValue:e.data,format:"url"};case Z.Markdown:case Z.RowID:return{formatted:e.data,rawValue:e.data,format:"string"};case Z.Number:return{formatted:e.displayData,rawValue:e.data,format:"number"};case Z.Loading:return{formatted:"#LOADING",rawValue:"",format:"string"};case Z.Protected:return{formatted:"************",rawValue:"",format:"string"};default:tr()}}function id(e,t){return e.map((o,r)=>{const i=t[r];return o.map(l=>l.span!==void 0&&l.span[0]!==i?{formatted:"",rawValue:"",format:"string"}:rd(l))})}function ml(e,t){return(t?/[\t\n",]/:/[\t\n"]/).test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}function ld(e){var n;const t=[];for(const o of e){const r=[];for(const i of o)i.format==="url"?r.push(((n=i.rawValue)==null?void 0:n.toString())??""):i.format==="string-array"?r.push(i.formatted.map(l=>ml(l,!0)).join(",")):r.push(ml(i.formatted,!1));t.push(r.join(" "))}return t.join(` -`)}function ui(e){return e.replace(/\t/g," ").replace(/ {2,}/g,t=>" ".repeat(t.length))}function wl(e){return'"'+e.replace(/&/g,"&").replace(/"/g,""").replace(//g,">")+'"'}function sd(e){return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function ad(e){var n;const t=[];t.push('',"");for(const o of e){t.push("");for(const r of o){const i=`gdg-format="${r.format}"`;r.format==="url"?t.push(``):r.format==="string-array"?t.push(``):t.push(``)}t.push("")}return t.push("
${ui(r.formatted)}
    ${r.formatted.map((l,s)=>`
  1. `+ui(l)+"
  2. ").join("")}
${ui(r.formatted)}
"),t.join("")}function cd(e,t){const n=id(e,t),o=ld(n),r=ad(n);return{textPlain:o,textHtml:r}}function yl(e){var l;const t=document.createElement("html");t.innerHTML=e.replace(/ /g," ");const n=t.querySelector("table");if(n===null)return;const o=[n],r=[];let i;for(;o.length>0;){const s=o.pop();if(s===void 0)break;if(s instanceof HTMLTableElement||s.nodeName==="TBODY")o.push(...[...s.children].reverse());else if(s instanceof HTMLTableRowElement)i!==void 0&&r.push(i),i=[],o.push(...[...s.children].reverse());else if(s instanceof HTMLTableCellElement){const c=s.cloneNode(!0),f=c.children.length===1&&c.children[0].nodeName==="P"?c.children[0]:null,m=(f==null?void 0:f.children.length)===1&&f.children[0].nodeName==="FONT",w=c.querySelectorAll("br");for(const y of w)y.replaceWith(` -`);const g=c.getAttribute("gdg-raw-value"),h=c.getAttribute("gdg-format")??"string";if(c.querySelector("a")!==null)i==null||i.push({rawValue:((l=c.querySelector("a"))==null?void 0:l.getAttribute("href"))??"",formatted:c.textContent??"",format:h});else if(c.querySelector("ol")!==null){const y=c.querySelectorAll("li");i==null||i.push({rawValue:[...y].map(b=>b.getAttribute("gdg-raw-value")??""),formatted:[...y].map(b=>b.textContent??""),format:"string-array"})}else if(g!==null)i==null||i.push({rawValue:sd(g),formatted:c.textContent??"",format:h});else{let y=c.textContent??"";m&&(y=y.replace(/\n(?!\n)/g,"")),i==null||i.push({rawValue:y??"",formatted:y??"",format:h})}}}return i!==void 0&&r.push(i),r}function dd(e,t,n,o,r){var s;const i=e;if(o==="allowPartial"||e.current===void 0||t===void 0)return e;let l=!1;do{if((e==null?void 0:e.current)===void 0)break;const c=(s=e.current)==null?void 0:s.range,u=[];if(c.width>2){const w=t({x:c.x,y:c.y,width:1,height:c.height},r.signal);if(typeof w=="function")return i;u.push(...w);const g=t({x:c.x+c.width-1,y:c.y,width:1,height:c.height},r.signal);if(typeof g=="function")return i;u.push(...g)}else{const w=t({x:c.x,y:c.y,width:c.width,height:c.height},r.signal);if(typeof w=="function")return i;u.push(...w)}let f=c.x-n,m=c.x+c.width-1-n;for(const w of u)for(const g of w)g.span!==void 0&&(f=Math.min(g.span[0],f),m=Math.max(g.span[1],m));f===c.x-n&&m===c.x+c.width-1-n?l=!0:e={current:{cell:e.current.cell??[0,0],range:{x:f+n,y:c.y,width:m-f+1,height:c.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!l);return e}function bl(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function ud(e){let t;(function(s){s[s.None=0]="None",s[s.inString=1]="inString",s[s.inStringPostQuote=2]="inStringPostQuote"})(t||(t={}));const n=[];let o=[],r=0,i=t.None;e=e.replace(/\r\n/g,` -`);let l=0;for(const s of e){switch(i){case t.None:s===" "||s===` -`?(o.push(e.slice(r,l)),r=l+1,s===` -`&&(n.push(o),o=[])):s==='"'&&(i=t.inString);break;case t.inString:s==='"'&&(i=t.inStringPostQuote);break;case t.inStringPostQuote:s==='"'?i=t.inString:((s===" "||s===` -`)&&(o.push(bl(e.slice(r,l))),r=l+1,s===` -`&&(n.push(o),o=[])),i=t.None);break}l++}return rs.map(c=>({rawValue:c,formatted:c,format:"string"})))}function pl(e,t,n){var s;const o=cd(e,t),r=c=>{var u;(u=window.navigator.clipboard)==null||u.writeText(c)},i=(c,u)=>{var f;return((f=window.navigator.clipboard)==null?void 0:f.write)===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([c],{type:"text/plain"}),"text/html":new Blob([u],{type:"text/html"})})]),!0)},l=(c,u)=>{var f,m;try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");(f=n==null?void 0:n.clipboardData)==null||f.setData("text/plain",c),(m=n==null?void 0:n.clipboardData)==null||m.setData("text/html",u)}catch{i(c,u)||r(c)}};((s=window.navigator.clipboard)==null?void 0:s.write)!==void 0||(n==null?void 0:n.clipboardData)!==void 0?l(o.textPlain,o.textHtml):r(o.textPlain),n==null||n.preventDefault()}function rs(e){return e!==!0}function vl(e){return typeof e=="string"?e:`${e}px`}const fd=()=>e=>e.innerWidth,hd=()=>e=>e.innerHeight,gd=Qt("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[fd()],"wmyidgi-1":[hd()]}}),md=e=>{const{inWidth:t,inHeight:n,children:o,...r}=e;return a.createElement(gd,{innerHeight:vl(n),innerWidth:vl(t),...r},o)},wd=2,yd=1300;function bd(e,t,n){const o=yt.useRef(0),[r,i]=e??[0,0];yt.useEffect(()=>{if(r===0&&i===0){o.current=0;return}let l=!1,s=0;const c=u=>{var f;if(!l){if(s===0)s=u;else{const m=u-s;o.current=Math.min(1,o.current+m/yd);const w=o.current**1.618*m*wd;(f=t.current)==null||f.scrollBy(r*w,i*w),s=u,n==null||n()}window.requestAnimationFrame(c)}};return window.requestAnimationFrame(c),()=>{l=!0}},[t,r,i,n])}function pd({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:o,overscrollX:r,overscrollY:i,scaleToRem:l,remSize:s}){const[c,u,f,m,w,g]=yt.useMemo(()=>{if(!l||s===16)return[e,t,n,o,r,i];const h=s/16,y=e,b=Yl();return[typeof y=="number"?y*h:x=>Math.ceil(y(x)*h),Math.ceil(t*h),Math.ceil(n*h),{...o,headerIconSize:((o==null?void 0:o.headerIconSize)??b.headerIconSize)*h,cellHorizontalPadding:((o==null?void 0:o.cellHorizontalPadding)??b.cellHorizontalPadding)*h,cellVerticalPadding:((o==null?void 0:o.cellVerticalPadding)??b.cellVerticalPadding)*h},Math.ceil((r??0)*h),Math.ceil((i??0)*h)]},[n,t,r,i,s,e,l,o]);return{rowHeight:c,headerHeight:u,groupHeaderHeight:f,theme:m,overscrollX:w,overscrollY:g}}const Un={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function Pe(e,t){return e===!0?t:e===!1?"":e}function Cl(e){const t=Pr.value;return{activateCell:Pe(e.activateCell," |Enter|shift+Enter"),clear:Pe(e.clear,"any+Escape"),closeOverlay:Pe(e.closeOverlay,"any+Escape"),acceptOverlayDown:Pe(e.acceptOverlayDown,"Enter"),acceptOverlayUp:Pe(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:Pe(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:Pe(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:Pe(e.delete,t?"Backspace|Delete":"Delete"),downFill:Pe(e.downFill,"primary+_68"),scrollToSelectedCell:Pe(e.scrollToSelectedCell,"primary+Enter"),goDownCell:Pe(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:Pe(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:Pe(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:Pe(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:Pe(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:Pe(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:Pe(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:Pe(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:Pe(e.goToFirstCell,"primary+Home"),goToFirstColumn:Pe(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:Pe(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:Pe(e.goToLastCell,"primary+End"),goToLastColumn:Pe(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:Pe(e.goToLastRow,"primary+ArrowDown"),goToNextPage:Pe(e.goToNextPage,"PageDown"),goToPreviousPage:Pe(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:Pe(e.rightFill,"primary+_82"),search:Pe(e.search,"primary+f"),selectAll:Pe(e.selectAll,"primary+a"),selectColumn:Pe(e.selectColumn,"ctrl+ "),selectGrowDown:Pe(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:Pe(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:Pe(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:Pe(e.selectGrowUp,"shift+ArrowUp"),selectRow:Pe(e.selectRow,"shift+ "),selectToFirstCell:Pe(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:Pe(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:Pe(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:Pe(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:Pe(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:Pe(e.selectToLastRow,"primary+shift+ArrowDown")}}function vd(e){const t=ra(e);return yt.useMemo(()=>{if(t===void 0)return Cl(Un);const n={...t,goToNextPage:(t==null?void 0:t.goToNextPage)??(t==null?void 0:t.pageDown)??Un.goToNextPage,goToPreviousPage:(t==null?void 0:t.goToPreviousPage)??(t==null?void 0:t.pageUp)??Un.goToPreviousPage,goToFirstCell:(t==null?void 0:t.goToFirstCell)??(t==null?void 0:t.first)??Un.goToFirstCell,goToLastCell:(t==null?void 0:t.goToLastCell)??(t==null?void 0:t.last)??Un.goToLastCell,selectToFirstCell:(t==null?void 0:t.selectToFirstCell)??(t==null?void 0:t.first)??Un.selectToFirstCell,selectToLastCell:(t==null?void 0:t.selectToLastCell)??(t==null?void 0:t.last)??Un.selectToLastCell};return Cl({...Un,...n})},[t])}function Cd(e){function t(o,r,i){if(typeof o=="number")return{headerIndex:o,isCollapsed:!1,depth:r,path:i};const l={headerIndex:o.headerIndex,isCollapsed:o.isCollapsed,depth:r,path:i};return o.subGroups!==void 0&&(l.subGroups=o.subGroups.map((s,c)=>t(s,r+1,[...i,c])).sort((s,c)=>s.headerIndex-c.headerIndex)),l}return e.map((o,r)=>t(o,0,[r])).sort((o,r)=>o.headerIndex-r.headerIndex)}function Di(e,t){const n=[];function o(l,s,c=!1){let u=s!==null?s-l.headerIndex:t-l.headerIndex;if(l.subGroups!==void 0&&(u=l.subGroups[0].headerIndex-l.headerIndex),u--,n.push({headerIndex:l.headerIndex,contentIndex:-1,skip:c,isCollapsed:l.isCollapsed,depth:l.depth,path:l.path,rows:u}),l.subGroups)for(let f=0;fl.skip===!1).map(l=>{const{skip:s,...c}=l;return c})}function Or(e,t){if(t===void 0||Di.length===0)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let n=e;for(const o of t){if(n===0)return{path:[...o.path,-1],originalIndex:o.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:o.rows};if(n--,!o.isCollapsed){if(ne===void 0?void 0:Di(e,t),[e,t]),i=yt.useMemo(()=>r===void 0?t:r.reduce((u,f)=>u+(f.isCollapsed?1:f.rows+1),0),[r,t]),l=yt.useMemo(()=>e===void 0||typeof n=="number"&&e.height===n?n:u=>{const{isGroupHeader:f}=Or(u,r);return f?e.height:typeof n=="number"?n:n(u)},[r,e,n]),s=yt.useCallback(u=>{if(r===void 0)return u;let f=u;for(const m of r){if(f===0)return;if(f--,!m.isCollapsed){if(f{if(e===void 0)return o==null?void 0:o(u,u,u);if(o===void 0&&(e==null?void 0:e.themeOverride)===void 0)return;const{isGroupHeader:f,contentIndex:m,groupIndex:w}=Or(u,r);return f?e.themeOverride:o==null?void 0:o(u,w,m)},[r,o,e]));return e===void 0?{rowHeight:l,rows:t,rowNumberMapper:s,getRowThemeOverride:c}:{rowHeight:l,rows:i,rowNumberMapper:s,getRowThemeOverride:c}}function kd(e,t){const n=yt.useMemo(()=>e===void 0?void 0:Di(e,t),[e,t]);return{getRowGroupingForPath:ls,updateRowGroupingByPath:is,mapper:yt.useCallback(o=>{if(typeof o=="number")return Or(o,n);const r=Or(o[1],n);return{...r,originalIndex:[o[0],r.originalIndex]}},[n])}}function is(e,t,n){const[o,...r]=t;return r[0]===-1?e.map((i,l)=>l===o?{...i,...n}:i):e.map((i,l)=>l===o?{...i,subGroups:is(i.subGroups??[],r,n)}:i)}function ls(e,t){const[n,...o]=t;return o[0]===-1?e[n]:ls(e[n].subGroups??[],o)}const Sd=a.lazy(async()=>await Ml(()=>import("./data-grid-overlay-editor-APrLKi4s.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url));let Md=0;function Rd(e){return Ks(ji(ji(e).filter(t=>t.span!==void 0).map(t=>{var n,o;return ro((((n=t.span)==null?void 0:n[0])??0)+1,(((o=t.span)==null?void 0:o[1])??0)+1)})))}function Fr(e,t){return e===void 0||t===0||e.columns.length===0&&e.current===void 0?e:{current:e.current===void 0?void 0:{cell:[e.current.cell[0]+t,e.current.cell[1]],range:{...e.current.range,x:e.current.range.x+t},rangeStack:e.current.rangeStack.map(n=>({...n,x:n.x+t}))},rows:e.rows,columns:e.columns.offset(t)}}const Hr={kind:Z.Loading,allowOverlay:!1},Tr={columns:rt.empty(),rows:rt.empty(),current:void 0},Ed=(e,t)=>{var _i,Vi,qi;const[n,o]=a.useState(Tr),[r,i]=a.useState(),l=a.useRef(null),s=a.useRef(null),[c,u]=a.useState(),f=a.useRef(null),m=a.useRef(),w=typeof window>"u"?null:window,{imageEditorOverride:g,getRowThemeOverride:h,markdownDivCreateNode:y,width:b,height:x,columns:C,rows:z,getCellContent:X,onCellClicked:Y,onCellActivated:F,onFillPattern:H,onFinishedEditing:K,coercePasteValue:S,drawHeader:O,drawCell:P,editorBloom:A,onHeaderClicked:R,onColumnProposeMove:M,spanRangeBehavior:ie="default",onGroupHeaderClicked:ne,onCellContextMenu:oe,className:Me,onHeaderContextMenu:Ae,getCellsForSelection:J,onGroupHeaderContextMenu:G,onGroupHeaderRenamed:ye,onCellEdited:re,onCellsEdited:ke,onSearchResultsChanged:be,searchResults:V,onSearchValueChange:Fe,searchValue:Re,onKeyDown:Qe,onKeyUp:tt,keybindings:mt,editOnType:nt=!0,onRowAppended:ze,onColumnMoved:Ve,validateCell:Se,highlightRegions:wt,rangeSelect:at="rect",columnSelect:je="multi",rowSelect:j="multi",rangeSelectionBlending:$e="exclusive",columnSelectionBlending:Ie="exclusive",rowSelectionBlending:He="exclusive",onDelete:fe,onDragStart:Xe,onMouseMove:We,onPaste:Oe,copyHeaders:ae=!1,freezeColumns:Ce=0,cellActivationBehavior:et="second-click",rowSelectionMode:Ye="auto",onHeaderMenuClick:_e,onHeaderIndicatorClick:ct,getGroupDetails:Ze,rowGrouping:Te,onSearchClose:Ct,onItemHovered:Ht,onSelectionCleared:bt,showSearch:xt,onVisibleRegionChanged:Lt,gridSelection:ft,onGridSelectionChange:yn,minColumnWidth:An=50,maxColumnWidth:lt=500,maxColumnAutoWidth:En,provideEditor:cn,trailingRowOptions:pe,freezeTrailingRows:ht=0,allowedFillDirections:bn="orthogonal",scrollOffsetX:$t,scrollOffsetY:kt,verticalBorder:Be,onDragOverCell:St,onDrop:dt,onColumnResize:Nt,onColumnResizeEnd:Ft,onColumnResizeStart:Kt,customRenderers:zn,fillHandle:Mt,drawFocusRing:so=!0,experimental:qe,fixedShadowX:Tt,fixedShadowY:In,headerIcons:ir,imageWindowLoader:Bn,initialSize:Dn,isDraggable:Fn,onDragLeave:ao,onRowMoved:Ln,overscrollX:lr,overscrollY:co,preventDiagonalScrolling:uo,rightElement:fo,rightElementProps:ho,trapFocus:Pn=!1,smoothScrollX:Wn,smoothScrollY:Xr,scaleToRem:sr=!1,rowHeight:Yr=34,headerHeight:ar=36,groupHeaderHeight:go=ar,theme:On,isOutsideClick:Gr,renderers:Lo,resizeIndicator:cr}=e,At=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,Xt=(At==null?void 0:At.kind)??e.rowMarkers??"none",Fi=(At==null?void 0:At.width)??e.rowMarkerWidth,Po=(At==null?void 0:At.startIndex)??e.rowMarkerStartIndex??1,mo=(At==null?void 0:At.theme)??e.rowMarkerTheme,Zn=(At==null?void 0:At.checkboxStyle)??"square",pn=Math.max(An,20),dn=Math.max(lt,pn),$n=Math.max(En??dn,pn),wo=a.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:ve,rowNumberMapper:yo,rowHeight:dr,getRowThemeOverride:en}=xd(Te,z,Yr,h),ur=a.useMemo(()=>Number.parseFloat(wo.fontSize),[wo]),{rowHeight:Ut,headerHeight:Wo,groupHeaderHeight:Oo,theme:$o,overscrollX:fr,overscrollY:hr}=pd({groupHeaderHeight:go,headerHeight:ar,overscrollX:lr,overscrollY:co,remSize:ur,rowHeight:dr,scaleToRem:sr,theme:On}),vn=vd(mt),Nn=Fi??(z>1e4?48:z>1e3?44:z>100?36:32),tn=Xt!=="none",D=tn?1:0,gt=ze!==void 0,Hn=(pe==null?void 0:pe.sticky)===!0,[Kr,gr]=a.useState(!1),Ur=xt??Kr,_r=a.useCallback(()=>{Ct!==void 0?Ct():gr(!1)},[Ct]),B=a.useMemo(()=>ft===void 0?void 0:Fr(ft,D),[ft,D])??n,zt=a.useRef();zt.current===void 0&&(zt.current=new AbortController),a.useEffect(()=>()=>zt==null?void 0:zt.current.abort(),[]);const[Rt,qr]=od(J,X,D,zt.current,ve),bo=a.useCallback((d,v,p)=>{if(Se===void 0)return!0;const I=[d[0]-D,d[1]];return Se==null?void 0:Se(I,v,p)},[D,Se]),po=a.useRef(ft),Pt=a.useCallback((d,v)=>{v&&(d=dd(d,Rt,D,ie,zt.current)),yn!==void 0?(po.current=Fr(d,-D),yn(po.current)):o(d)},[yn,Rt,D,ie]),Xn=oo(Nt,a.useCallback((d,v,p,I)=>{Nt==null||Nt(C[p-D],v,p-D,I)},[Nt,D,C])),jr=oo(Ft,a.useCallback((d,v,p,I)=>{Ft==null||Ft(C[p-D],v,p-D,I)},[Ft,D,C])),k=oo(Kt,a.useCallback((d,v,p,I)=>{Kt==null||Kt(C[p-D],v,p-D,I)},[Kt,D,C])),U=oo(O,a.useCallback((d,v)=>(O==null?void 0:O({...d,columnIndex:d.columnIndex-D},v))??!1,[O,D])),de=oo(P,a.useCallback((d,v)=>(P==null?void 0:P({...d,col:d.col-D},v))??!1,[P,D])),te=a.useCallback(d=>{if(fe!==void 0){const v=fe(Fr(d,-D));return typeof v=="boolean"?v:Fr(v,D)}return!0},[fe,D]),[_,q,se]=nd(B,Pt,$e,Ie,He,at),ce=a.useMemo(()=>Vn(Yl(),$o),[$o]),[ue,Dt]=a.useState([0,0,0]),me=a.useMemo(()=>{if(Lo===void 0)return{};const d={};for(const v of Lo)d[v.kind]=v;return d},[Lo]),De=a.useCallback(d=>d.kind!==Z.Custom?me[d.kind]:zn==null?void 0:zn.find(v=>v.isMatch(d)),[zn,me]);let{sizedColumns:Ee,nonGrowWidth:Ge}=Da(C,ve,qr,ue[0]-(D===0?0:Nn)-ue[2],pn,$n,ce,De,zt.current);Xt!=="none"&&(Ge+=Nn);const pt=a.useMemo(()=>Ee.some(d=>d.group!==void 0),[Ee]),Wt=pt?Wo+Oo:Wo,vt=B.rows.length,nn=Xt==="none"?void 0:vt===0?!1:vt===ve?!0:void 0,Ke=a.useMemo(()=>Xt==="none"?Ee:[{title:"",width:Nn,icon:void 0,hasMenu:!1,style:"normal",themeOverride:mo,rowMarker:Zn,rowMarkerChecked:nn},...Ee],[Xt,Ee,Nn,mo,Zn,nn]),[_t,ot]=a.useMemo(()=>[kt!==void 0&&typeof Ut=="number"?Math.floor(kt/Ut):0,kt!==void 0&&typeof Ut=="number"?-(kt%Ut):0],[kt,Ut]),it=a.useRef({height:1,width:1,x:0,y:0}),on=a.useMemo(()=>({x:it.current.x,y:_t,width:it.current.width??1,height:it.current.height??1,ty:ot}),[ot,_t]),un=a.useRef(!1),[Bt,vo,Cn]=oa(on);it.current=Bt;const Hi=(Bt.height??1)>1;a.useLayoutEffect(()=>{if(kt!==void 0&&f.current!==null&&Hi){if(f.current.scrollTop===kt)return;f.current.scrollTop=kt,f.current.scrollTop!==kt&&Cn(),un.current=!0}},[kt,Hi,Cn]);const Ti=(Bt.width??1)>1;a.useLayoutEffect(()=>{if($t!==void 0&&f.current!==null&&Ti){if(f.current.scrollLeft===$t)return;f.current.scrollLeft=$t,f.current.scrollLeft!==$t&&Cn(),un.current=!0}},[$t,Ti,Cn]);const ss=Bt.x+D,mr=Bt.y,Vt=a.useRef(null),Gt=a.useCallback(d=>{var v;d===!0?(v=Vt.current)==null||v.focus():window.requestAnimationFrame(()=>{var p;(p=Vt.current)==null||p.focus()})},[]),Yt=gt?ve+1:ve,rn=a.useCallback(d=>{const v=D===0?d:d.map(I=>({...I,location:[I.location[0]-D,I.location[1]]})),p=ke==null?void 0:ke(v);if(p!==!0)for(const I of v)re==null||re(I.location,I.value);return p},[re,ke,D]),[Jn,Zr]=a.useState(),wr=B.current!==void 0&&B.current.range.width*B.current.range.height>1?B.current.range:void 0,Co=so?(_i=B.current)==null?void 0:_i.cell:void 0,yr=Co==null?void 0:Co[0],br=Co==null?void 0:Co[1],as=a.useMemo(()=>{if((wt===void 0||wt.length===0)&&(wr??yr??br??Jn)===void 0)return;const d=[];if(wt!==void 0)for(const v of wt){const p=Ke.length-v.range.x-D;p>0&&d.push({color:v.color,range:{...v.range,x:v.range.x+D,width:Math.min(p,v.range.width)},style:v.style})}return Jn!==void 0&&d.push({color:io(ce.accentColor,0),range:Jn,style:"dashed"}),wr!==void 0&&d.push({color:io(ce.accentColor,.5),range:wr,style:"solid-outline"}),yr!==void 0&&br!==void 0&&d.push({color:ce.accentColor,range:{x:yr,y:br,width:1,height:1},style:"solid-outline"}),d.length>0?d:void 0},[Jn,wr,yr,br,wt,Ke.length,ce.accentColor,D]),Ai=a.useRef(Ke);Ai.current=Ke;const qt=a.useCallback(([d,v],p=!1)=>{var W,T,L,$,N,Q,he;const I=gt&&v===Yt-1;if(d===0&&tn){if(I)return Hr;const ee=yo(v);return ee===void 0?Hr:{kind:an.Marker,allowOverlay:!1,checkboxStyle:Zn,checked:(B==null?void 0:B.rows.hasIndex(v))===!0,markerKind:Xt==="clickable-number"?"number":Xt,row:Po+ee,drawHandle:Ln!==void 0,cursor:Xt==="clickable-number"?"pointer":void 0}}else if(I){const we=d===D?(pe==null?void 0:pe.hint)??"":"",le=Ai.current[d];if(((W=le==null?void 0:le.trailingRowOptions)==null?void 0:W.disabled)===!0)return Hr;{const Ue=((T=le==null?void 0:le.trailingRowOptions)==null?void 0:T.hint)??we,xe=((L=le==null?void 0:le.trailingRowOptions)==null?void 0:L.addIcon)??(pe==null?void 0:pe.addIcon);return{kind:an.NewRow,hint:Ue,allowOverlay:!1,icon:xe}}}else{const ee=d-D;if(p||(qe==null?void 0:qe.strict)===!0){const le=it.current,Ue=le.x>ee||ee>le.x+le.width||le.y>v||v>le.y+le.height||v>=Qr.current,xe=ee===((N=($=le.extras)==null?void 0:$.selected)==null?void 0:N[0])&&v===((Q=le.extras)==null?void 0:Q.selected[1]);let ge=!1;if(((he=le.extras)==null?void 0:he.freezeRegions)!==void 0){for(const Je of le.extras.freezeRegions)if(Ho(Je,ee,v)){ge=!0;break}}if(Ue&&!xe&&!ge)return Hr}let we=X([ee,v]);return D!==0&&we.span!==void 0&&(we={...we,span:[we.span[0]+D,we.span[1]+D]}),we}},[gt,Yt,tn,yo,Zn,B==null?void 0:B.rows,Xt,Po,Ln,D,pe==null?void 0:pe.hint,pe==null?void 0:pe.addIcon,qe==null?void 0:qe.strict,X]),Jr=a.useCallback(d=>{let v=(Ze==null?void 0:Ze(d))??{name:d};return ye!==void 0&&d!==""&&(v={icon:v.icon,name:v.name,overrideTheme:v.overrideTheme,actions:[...v.actions??[],{title:"Rename",icon:"renameIcon",onClick:p=>ti({group:v.name,bounds:p.bounds})}]}),v},[Ze,ye]),pr=a.useCallback(d=>{var L;const[v,p]=d.cell,I=Ke[v],E=(I==null?void 0:I.group)!==void 0?(L=Jr(I.group))==null?void 0:L.overrideTheme:void 0,W=I==null?void 0:I.themeOverride,T=en==null?void 0:en(p);i({...d,theme:Vn(ce,E,W,T,d.content.themeOverride)})},[en,Ke,Jr,ce]),xo=a.useCallback((d,v,p)=>{var T;if(B.current===void 0)return;const[I,E]=B.current.cell,W=qt([I,E]);if(W.kind!==Z.Boolean&&W.allowOverlay){let L=W;if(p!==void 0)switch(L.kind){case Z.Number:{const $=_s(()=>p==="-"?-0:Number.parseFloat(p),0);L={...L,data:Number.isNaN($)?0:$};break}case Z.Text:case Z.Markdown:case Z.Uri:L={...L,data:p};break}pr({target:d,content:L,initialValue:p,cell:[I,E],highlight:p===void 0,forceEditMode:p!==void 0})}else W.kind===Z.Boolean&&v&&W.readonly!==!0&&(rn([{location:B.current.cell,value:{...W,data:rs(W.data)}}]),(T=Vt.current)==null||T.damage([{cell:B.current.cell}]))},[qt,B,rn,pr]),zi=a.useCallback((d,v)=>{var E;const p=(E=Vt.current)==null?void 0:E.getBounds(d,v);if(p===void 0||f.current===null)return;const I=qt([d,v]);I.allowOverlay&&pr({target:p,content:I,initialValue:void 0,highlight:!0,cell:[d,v],forceEditMode:!0})},[qt,pr]),Et=a.useCallback((d,v,p="both",I=0,E=0,W=void 0)=>{if(f.current!==null){const T=Vt.current,L=s.current,$=typeof d!="number"?d.unit==="cell"?d.amount:void 0:d,N=typeof v!="number"?v.unit==="cell"?v.amount:void 0:v,Q=typeof d!="number"&&d.unit==="px"?d.amount:void 0,he=typeof v!="number"&&v.unit==="px"?v.amount:void 0;if(T!==null&&L!==null){let ee={x:0,y:0,width:0,height:0},we=0,le=0;if(($!==void 0||N!==void 0)&&(ee=T.getBounds(($??0)+D,N??0)??ee,ee.width===0||ee.height===0))return;const Ue=L.getBoundingClientRect(),xe=Ue.width/L.offsetWidth;if(Q!==void 0&&(ee={...ee,x:Q-Ue.left-f.current.scrollLeft,width:1}),he!==void 0&&(ee={...ee,y:he+Ue.top-f.current.scrollTop,height:1}),ee!==void 0){const ge={x:ee.x-I,y:ee.y-E,width:ee.width+2*I,height:ee.height+2*E};let Je=0;for(let si=0;si0&&(ut=lo(Yt,It,Ut));let gn=Je*xe+Ue.left+D*Nn*xe,kn=Ue.right,mn=Ue.top+Wt*xe,Sn=Ue.bottom-ut*xe;const Rr=ee.width+I*2;switch(W==null?void 0:W.hAlign){case"start":kn=gn+Rr;break;case"end":gn=kn-Rr;break;case"center":gn=Math.floor((gn+kn)/2)-Rr/2,kn=gn+Rr;break}const Er=ee.height+E*2;switch(W==null?void 0:W.vAlign){case"start":Sn=mn+Er;break;case"end":mn=Sn-Er;break;case"center":mn=Math.floor((mn+Sn)/2)-Er/2,Sn=mn+Er;break}gn>ge.x?we=ge.x-gn:knge.y?le=ge.y-mn:Sn=Yt-It)&&(le=0),(we!==0||le!==0)&&(xe!==1&&(we/=xe,le/=xe),f.current.scrollTo(we+f.current.scrollLeft,le+f.current.scrollTop))}}}},[D,ht,Nn,Wt,Ce,Ee,Yt,Hn,Ut]),Bi=a.useRef(zi),Li=a.useRef(X),Qr=a.useRef(ve);Bi.current=zi,Li.current=X,Qr.current=ve;const ko=a.useCallback(async(d,v=!0)=>{var $;const p=Ke[d];if((($=p==null?void 0:p.trailingRowOptions)==null?void 0:$.disabled)===!0)return;const I=ze==null?void 0:ze();let E,W=!0;I!==void 0&&(E=await I,E==="top"&&(W=!1),typeof E=="number"&&(W=!1));let T=0;const L=()=>{if(Qr.current<=ve){T<500&&window.setTimeout(L,T),T=50+T*2;return}const N=typeof E=="number"?E:W?ve:0;Mr.current(d-D,N),_({cell:[d,N],range:{x:d,y:N,width:1,height:1}},!1,!1,"edit");const Q=Li.current([d-D,N]);Q.allowOverlay&&Zo(Q)&&Q.readonly!==!0&&v&&window.setTimeout(()=>{Bi.current(d,N)},0)};L()},[Ke,ze,D,ve,_]),vr=a.useCallback(d=>{var p,I;const v=((I=(p=Ee[d])==null?void 0:p.trailingRowOptions)==null?void 0:I.targetColumn)??(pe==null?void 0:pe.targetColumn);if(typeof v=="number")return v+(tn?1:0);if(typeof v=="object"){const E=C.indexOf(v);if(E>=0)return E+(tn?1:0)}},[Ee,C,tn,pe==null?void 0:pe.targetColumn]),Yn=a.useRef(),So=a.useRef(),No=a.useCallback((d,v)=>{var E;const[p,I]=v;return Vn(ce,(E=Ke[p])==null?void 0:E.themeOverride,en==null?void 0:en(I),d.themeOverride)},[en,Ke,ce]),{mapper:Qn}=kd(Te,z),fn=Te==null?void 0:Te.navigationBehavior,Xo=a.useCallback(d=>{var Q,he,ee;const v=Pr.value?d.metaKey:d.ctrlKey,p=v&&j==="multi",I=v&&je==="multi",[E,W]=d.location,T=B.columns,L=B.rows,[$,N]=((Q=B.current)==null?void 0:Q.cell)??[];if(d.kind==="cell"){if(So.current=void 0,eo.current=[E,W],E===0&&tn){if(gt===!0&&W===ve||Xt==="number"||j==="none")return;const we=qt(d.location);if(we.kind!==an.Marker)return;if(Ln!==void 0){const xe=De(we);Zt((xe==null?void 0:xe.kind)===an.Marker);const ge=(he=xe==null?void 0:xe.onClick)==null?void 0:he.call(xe,{...d,cell:we,posX:d.localEventX,posY:d.localEventY,bounds:d.bounds,theme:No(we,d.location),preventDefault:()=>{}});if(ge===void 0||ge.checked===we.checked)return}i(void 0),Gt();const le=L.hasIndex(W),Ue=Yn.current;if(j==="multi"&&(d.shiftKey||d.isLongTouch===!0)&&Ue!==void 0&&L.hasIndex(Ue)){const xe=[Math.min(Ue,W),Math.max(Ue,W)+1];p||Ye==="multi"?q(void 0,xe,!0):q(rt.fromSingleSelection(xe),void 0,p)}else p||d.isTouch||Ye==="multi"?le?q(L.remove(W),void 0,!0):(q(void 0,W,!0),Yn.current=W):le&&L.length===1?q(rt.empty(),void 0,v):(q(rt.fromSingleSelection(W),void 0,v),Yn.current=W)}else if(E>=D&>&&W===ve){const we=vr(E);ko(we??E)}else if($!==E||N!==W){const we=qt(d.location),le=De(we);if((le==null?void 0:le.onSelect)!==void 0){let ge=!1;if(le.onSelect({...d,cell:we,posX:d.localEventX,posY:d.localEventY,bounds:d.bounds,preventDefault:()=>ge=!0,theme:No(we,d.location)}),ge)return}if(fn==="block"&&Qn(W).isGroupHeader)return;const Ue=Hn&&W===ve,xe=Hn&&B!==void 0&&((ee=B.current)==null?void 0:ee.cell[1])===ve;if((d.shiftKey||d.isLongTouch===!0)&&$!==void 0&&N!==void 0&&B.current!==void 0&&!xe){if(Ue)return;const ge=Math.min(E,$),Je=Math.max(E,$),ut=Math.min(W,N),It=Math.max(W,N);_({...B.current,range:{x:ge,y:ut,width:Je-ge+1,height:It-ut+1}},!0,v,"click"),Yn.current=void 0,Gt()}else _({cell:[E,W],range:{x:E,y:W,width:1,height:1}},!0,v,"click"),Yn.current=void 0,i(void 0),Gt()}}else if(d.kind==="header")if(eo.current=[E,W],i(void 0),tn&&E===0)Yn.current=void 0,So.current=void 0,j==="multi"&&(L.length!==ve?q(rt.fromSingleSelection([0,ve]),void 0,v):q(rt.empty(),void 0,v),Gt());else{const we=So.current;if(je==="multi"&&(d.shiftKey||d.isLongTouch===!0)&&we!==void 0&&T.hasIndex(we)){const le=[Math.min(we,E),Math.max(we,E)+1];I?se(void 0,le,v):se(rt.fromSingleSelection(le),void 0,v)}else I?(T.hasIndex(E)?se(T.remove(E),void 0,v):se(void 0,E,v),So.current=E):je!=="none"&&(se(rt.fromSingleSelection(E),void 0,v),So.current=E);Yn.current=void 0,Gt()}else d.kind===jt?eo.current=[E,W]:d.kind===Wr&&!d.isMaybeScrollbar&&(Pt(Tr,!1),i(void 0),Gt(),bt==null||bt(),Yn.current=void 0,So.current=void 0)},[j,je,B,tn,D,gt,ve,Xt,qt,Ln,Gt,Ye,De,No,q,vr,ko,fn,Qn,Hn,_,se,Pt,bt]),Yo=a.useRef(!1),eo=a.useRef(),Pi=a.useRef(Bt),ln=a.useRef(),cs=a.useCallback(d=>{if(Mo.current=!1,Pi.current=it.current,d.button!==0&&d.button!==1){ln.current=void 0;return}const v=performance.now();ln.current={button:d.button,time:v,location:d.location},(d==null?void 0:d.kind)==="header"&&(Yo.current=!0);const p=d.kind==="cell"&&d.isFillHandle;!p&&d.kind!=="cell"&&d.isEdge||(u({previousSelection:B,fillHandle:p}),eo.current=void 0,!d.isTouch&&d.button===0&&!p?Xo(d):!d.isTouch&&d.button===1&&(eo.current=d.location))},[B,Xo]),[ei,ti]=a.useState(),Wi=a.useCallback(d=>{if(d.kind!==jt||je!=="multi")return;const v=Pr.value?d.metaKey:d.ctrlKey,[p]=d.location,I=B.columns;if(p=D&&nr(E.group,Ke[L].group);L--)W--;for(let L=p+1;L{if(Rt!==void 0&&Xn!==void 0){const v=it.current.y,p=it.current.height;let I=Rt({x:d,y:v,width:1,height:Math.min(p,ve-v)},zt.current.signal);typeof I!="object"&&(I=await I());const E=Ee[d-D],T=document.createElement("canvas").getContext("2d",{alpha:!1});if(T!==null){T.font=ce.baseFontFull;const L=Kl(T,ce,E,0,I,pn,dn,!1,De);Xn==null||Xn(E,L.width,d,L.width)}}},[Ee,Rt,dn,ce,pn,Xn,D,ve,De]),[ds,ni]=a.useState(),Ro=a.useCallback(async(d,v)=>{var L,$;const p=(L=d.current)==null?void 0:L.range;if(p===void 0||Rt===void 0||v.current===void 0)return;const I=v.current.range;if(H!==void 0){let N=!1;if(H({fillDestination:{...I,x:I.x-D},patternSource:{...p,x:p.x-D},preventDefault:()=>N=!0}),N)return}let E=Rt(p,zt.current.signal);typeof E!="object"&&(E=await E());const W=E,T=[];for(let N=0;N({cell:N.location})))},[Rt,rn,H,D]),Oi=a.useCallback(()=>{if(B.current===void 0||B.current.range.width<=1)return;const d={...B,current:{...B.current,range:{...B.current.range,width:1}}};Ro(d,B)},[Ro,B]),$i=a.useCallback(()=>{if(B.current===void 0||B.current.range.height<=1)return;const d={...B,current:{...B.current,range:{...B.current.range,height:1}}};Ro(d,B)},[Ro,B]),us=a.useCallback((d,v)=>{var Q,he;const p=c;if(u(void 0),Zr(void 0),ni(void 0),Yo.current=!1,v)return;if((p==null?void 0:p.fillHandle)===!0&&B.current!==void 0&&((Q=p.previousSelection)==null?void 0:Q.current)!==void 0){if(Jn===void 0)return;const ee={...B,current:{...B.current,range:jl(p.previousSelection.current.range,Jn)}};Ro(p.previousSelection,ee),Pt(ee,!0);return}const[I,E]=d.location,[W,T]=eo.current??[],L=()=>{Mo.current=!0},$=ee=>{var le,Ue,xe;const we=ee.isTouch||W===I&&T===E;if(we&&(Y==null||Y([I-D,E],{...ee,preventDefault:L})),ee.button===1)return!Mo.current;if(!Mo.current){const ge=qt(d.location),Je=De(ge);if(Je!==void 0&&Je.onClick!==void 0&&we){const It=Je.onClick({...ee,cell:ge,posX:ee.localEventX,posY:ee.localEventY,bounds:ee.bounds,theme:No(ge,d.location),preventDefault:L});It!==void 0&&!Do(It)&&Io(It)&&(rn([{location:ee.location,value:It}]),(le=Vt.current)==null||le.damage([{cell:ee.location}]))}if(Mo.current||B.current===void 0)return!1;let ut=!1;switch(ge.activationBehaviorOverride??et){case"double-click":case"second-click":{if(((xe=(Ue=p==null?void 0:p.previousSelection)==null?void 0:Ue.current)==null?void 0:xe.cell)===void 0)break;const[It,gn]=B.current.cell,[kn,mn]=p.previousSelection.current.cell;ut=I===It&&I===kn&&E===gn&&E===mn&&(ee.isDoubleClick===!0||et==="second-click");break}case"single-click":{ut=!0;break}}if(ut)return F==null||F([I-D,E]),xo(ee.bounds,!1),!0}return!1},N=d.location[0]-D;if(d.isTouch){const ee=it.current,we=Pi.current;if(ee.x!==we.x||ee.y!==we.y)return;if(d.isLongTouch===!0){if(d.kind==="cell"&&Jo((he=B.current)==null?void 0:he.cell,d.location)){oe==null||oe([N,d.location[1]],{...d,preventDefault:L});return}else if(d.kind==="header"&&B.columns.hasIndex(I)){Ae==null||Ae(N,{...d,preventDefault:L});return}else if(d.kind===jt){if(N<0)return;G==null||G(N,{...d,preventDefault:L});return}}d.kind==="cell"?$(d)||Xo(d):d.kind===jt?ne==null||ne(N,{...d,preventDefault:L}):(d.kind===_n&&(R==null||R(N,{...d,preventDefault:L})),Xo(d));return}if(d.kind==="header"){if(N<0)return;d.isEdge?d.isDoubleClick===!0&&Cr(I):d.button===0&&I===W&&E===T&&(R==null||R(N,{...d,preventDefault:L}))}if(d.kind===jt){if(N<0)return;d.button===0&&I===W&&E===T&&(ne==null||ne(N,{...d,preventDefault:L}),Mo.current||Wi(d))}d.kind==="cell"&&(d.button===0||d.button===1)&&$(d),eo.current=void 0},[c,B,D,Jn,Ro,Pt,Y,qt,De,et,No,rn,F,xo,oe,Ae,G,Xo,ne,R,Cr,Wi]),fs=a.useCallback(d=>{const v={...d,location:[d.location[0]-D,d.location[1]]};We==null||We(v),c!==void 0&&d.buttons===0&&(u(void 0),Zr(void 0),ni(void 0),Yo.current=!1),ni(p=>{var I;return Yo.current?[d.scrollEdge[0],0]:d.scrollEdge[0]===(p==null?void 0:p[0])&&d.scrollEdge[1]===p[1]?p:c===void 0||(((I=ln.current)==null?void 0:I.location[0])??0){_e==null||_e(d-D,v)},[_e,D]),gs=a.useCallback((d,v)=>{ct==null||ct(d-D,v)},[ct,D]),xn=(Vi=B==null?void 0:B.current)==null?void 0:Vi.cell,ms=a.useCallback((d,v,p,I,E,W)=>{un.current=!1;let T=xn;T!==void 0&&(T=[T[0]-D,T[1]]);const L=Ce===0?void 0:{x:0,y:d.y,width:Ce,height:d.height},$=[];L!==void 0&&$.push(L),ht>0&&($.push({x:d.x-D,y:ve-ht,width:d.width,height:ht}),Ce>0&&$.push({x:0,y:ve-ht,width:Ce,height:ht}));const N={x:d.x-D,y:d.y,width:d.width,height:gt&&d.y+d.height>=ve?d.height-1:d.height,tx:E,ty:W,extras:{selected:T,freezeRegion:L,freezeRegions:$}};it.current=N,vo(N),Dt([v,p,I]),Lt==null||Lt(N,N.tx,N.ty,N.extras)},[xn,D,gt,ve,Ce,ht,vo,Lt]),ws=oo(Ve,a.useCallback((d,v)=>{Ve==null||Ve(d-D,v-D),je!=="none"&&se(rt.fromSingleSelection(v),void 0,!0)},[je,Ve,D,se])),oi=a.useRef(!1),ys=a.useCallback(d=>{if(d.location[0]===0&&D>0){d.preventDefault();return}Xe==null||Xe({...d,location:[d.location[0]-D,d.location[1]]}),d.defaultPrevented()||(oi.current=!0),u(void 0)},[Xe,D]),bs=a.useCallback(()=>{oi.current=!1},[]),Ni=Te==null?void 0:Te.selectionBehavior,xr=a.useCallback(d=>{if(Ni!=="block-spanning")return;const{isGroupHeader:v,path:p,groupRows:I}=Qn(d);if(v)return[d,d];const E=p[p.length-1],W=d-E,T=d+I-E-1;return[W,T]},[Qn,Ni]),ri=a.useRef(),ii=a.useCallback(d=>{var v,p,I;if(!ns(d,ri.current)&&(ri.current=d,!(((v=ln==null?void 0:ln.current)==null?void 0:v.button)!==void 0&&ln.current.button>=1))){if(d.buttons!==0&&c!==void 0&&((p=ln.current)==null?void 0:p.location[0])===0&&d.location[0]===0&&D===1&&j==="multi"&&c.previousSelection&&!c.previousSelection.rows.hasIndex(ln.current.location[1])&&B.rows.hasIndex(ln.current.location[1])){const E=Math.min(ln.current.location[1],d.location[1]),W=Math.max(ln.current.location[1],d.location[1])+1;q(rt.fromSingleSelection([E,W]),void 0,!1)}if(d.buttons!==0&&c!==void 0&&B.current!==void 0&&!oi.current&&!Yo.current&&(at==="rect"||at==="multi-rect")){const[E,W]=B.current.cell;let[T,L]=d.location;if(L<0&&(L=it.current.y),c.fillHandle===!0&&((I=c.previousSelection)==null?void 0:I.current)!==void 0){const $=c.previousSelection.current.range;L=Math.min(L,gt?ve-1:ve);const N=sc($,T,L,bn);Zr(N)}else{if(gt&&W===ve)return;if(gt&&L===ve)if(d.kind===Wr)L--;else return;T=Math.max(T,D);const Q=xr(W);L=Q===void 0?L:sn(L,Q[0],Q[1]);const he=T-E,ee=L-W,we={x:he>=0?E:T,y:ee>=0?W:L,width:Math.abs(he)+1,height:Math.abs(ee)+1};_({...B.current,range:we},!0,!1,"drag")}}Ht==null||Ht({...d,location:[d.location[0]-D,d.location[1]]})}},[c,D,j,B,at,Ht,q,gt,ve,bn,xr,_]),ps=a.useCallback(()=>{var T,L;const d=ri.current;if(d===void 0)return;const[v,p]=d.scrollEdge;let[I,E]=d.location;const W=it.current;v===-1?I=((L=(T=W.extras)==null?void 0:T.freezeRegion)==null?void 0:L.x)??W.x:v===1&&(I=W.x+W.width),p===-1?E=Math.max(0,W.y):p===1&&(E=Math.min(ve-1,W.y+W.height)),I=sn(I,0,Ke.length-1),E=sn(E,0,ve-1),ii({...d,location:[I,E]})},[Ke.length,ii,ve]);bd(ds,f,ps);const hn=a.useCallback(d=>{if(B.current===void 0)return;const[v,p]=d,[I,E]=B.current.cell,W=B.current.range;let T=W.x,L=W.x+W.width,$=W.y,N=W.y+W.height;const[Q,he]=xr(E)??[0,ve-1],ee=he+1;if(p!==0)switch(p){case 2:{N=ee,$=E,Et(0,N,"vertical");break}case-2:{$=Q,N=E+1,Et(0,$,"vertical");break}case 1:{$E+1?(N--,Et(0,N,"vertical")):($=Math.max(Q,$-1),Et(0,$,"vertical"));break}default:tr()}if(v!==0)if(v===2)L=Ke.length,T=I,Et(L-1-D,0,"horizontal");else if(v===-2)T=D,L=I+1,Et(T-D,0,"horizontal");else{let we=[];if(Rt!==void 0){const le=Rt({x:T,y:$,width:L-T-D,height:N-$},zt.current.signal);typeof le=="object"&&(we=Rd(le))}if(v===1){let le=!1;if(T0){const Ue=ro(T+1,I+1).find(xe=>!we.includes(xe-D));Ue!==void 0&&(T=Ue,le=!0)}else T++,le=!0;le&&Et(T,0,"horizontal")}le||(L=Math.min(Ke.length,L+1),Et(L-1-D,0,"horizontal"))}else if(v===-1){let le=!1;if(L>I+1){if(we.length>0){const Ue=ro(L-1,I,-1).find(xe=>!we.includes(xe-D));Ue!==void 0&&(L=Ue,le=!0)}else L--,le=!0;le&&Et(L-D,0,"horizontal")}le||(T=Math.max(D,T-1),Et(T-D,0,"horizontal"))}else tr()}_({cell:B.current.cell,range:{x:T,y:$,width:L-T,height:N-$}},!0,!1,"keyboard-select")},[Rt,xr,B,Ke.length,D,ve,Et,_]),Gn=a.useCallback((d,v,p,I)=>{const E=Yt-(p?0:1);d=sn(d,D,Ee.length-1+D),v=sn(v,0,E);const W=xn==null?void 0:xn[0],T=xn==null?void 0:xn[1];if(d===W&&v===T)return!1;if(I&&B.current!==void 0){const L=[...B.current.rangeStack];(B.current.range.width>1||B.current.range.height>1)&&L.push(B.current.range),Pt({...B,current:{cell:[d,v],range:{x:d,y:v,width:1,height:1},rangeStack:L}},!0)}else _({cell:[d,v],range:{x:d,y:v,width:1,height:1}},!0,!1,"keyboard-nav");return m.current!==void 0&&m.current[0]===d&&m.current[1]===v&&(m.current=void 0),Et(d-D,v),!0},[Yt,D,Ee.length,xn,B,Et,Pt,_]),vs=a.useCallback((d,v)=>{(r==null?void 0:r.cell)!==void 0&&d!==void 0&&Io(d)&&(rn([{location:r.cell,value:d}]),window.requestAnimationFrame(()=>{var E;(E=Vt.current)==null||E.damage([{cell:r.cell}])})),Gt(!0),i(void 0);const[p,I]=v;if(B.current!==void 0&&(p!==0||I!==0)){const E=B.current.cell[1]===Yt-1&&d!==void 0;Gn(sn(B.current.cell[0]+p,0,Ke.length-1),sn(B.current.cell[1]+I,0,Yt-1),E,!1)}K==null||K(d,v)},[r==null?void 0:r.cell,Gt,B,K,rn,Yt,Gn,Ke.length]),Cs=a.useMemo(()=>`gdg-overlay-${Md++}`,[]),to=a.useCallback(d=>{var p,I,E,W;Gt();const v=[];for(let T=d.x;T({cell:T.location})))},[Gt,X,De,rn,D]),Go=r!==void 0,Xi=a.useCallback(d=>{var Ue,xe;const v=()=>{d.stopPropagation(),d.preventDefault()},p={didMatch:!1},{bounds:I}=d,E=B.columns,W=B.rows,T=vn;if(!Go&&Le(T.clear,d,p))Pt(Tr,!1),bt==null||bt();else if(!Go&&Le(T.selectAll,d,p))Pt({columns:rt.empty(),rows:rt.empty(),current:{cell:((Ue=B.current)==null?void 0:Ue.cell)??[D,0],range:{x:D,y:0,width:C.length,height:ve},rangeStack:[]}},!1);else if(Le(T.search,d,p))(xe=l==null?void 0:l.current)==null||xe.focus({preventScroll:!0}),gr(!0);else if(Le(T.delete,d,p)){const ge=(te==null?void 0:te(B))??!0;if(ge!==!1){const Je=ge===!0?B:ge;if(Je.current!==void 0){to(Je.current.range);for(const ut of Je.current.rangeStack)to(ut)}for(const ut of Je.rows)to({x:D,y:ut,width:C.length,height:1});for(const ut of Je.columns)to({x:ut,y:0,width:1,height:ve})}}if(p.didMatch)return v(),!0;if(B.current===void 0)return!1;let[L,$]=B.current.cell;const[,N]=B.current.cell;let Q=!1,he=!1;if(Le(T.scrollToSelectedCell,d,p)?Mr.current(L-D,$):je!=="none"&&Le(T.selectColumn,d,p)?E.hasIndex(L)?se(E.remove(L),void 0,!0):je==="single"?se(rt.fromSingleSelection(L),void 0,!0):se(void 0,L,!0):j!=="none"&&Le(T.selectRow,d,p)?W.hasIndex($)?q(W.remove($),void 0,!0):j==="single"?q(rt.fromSingleSelection($),void 0,!0):q(void 0,$,!0):!Go&&I!==void 0&&Le(T.activateCell,d,p)?$===ve&>?window.setTimeout(()=>{const ge=vr(L);ko(ge??L)},0):(F==null||F([L-D,$]),xo(I,!0)):B.current.range.height>1&&Le(T.downFill,d,p)?$i():B.current.range.width>1&&Le(T.rightFill,d,p)?Oi():Le(T.goToNextPage,d,p)?$+=Math.max(1,it.current.height-4):Le(T.goToPreviousPage,d,p)?$-=Math.max(1,it.current.height-4):Le(T.goToFirstCell,d,p)?(i(void 0),$=0,L=0):Le(T.goToLastCell,d,p)?(i(void 0),$=Number.MAX_SAFE_INTEGER,L=Number.MAX_SAFE_INTEGER):Le(T.selectToFirstCell,d,p)?(i(void 0),hn([-2,-2])):Le(T.selectToLastCell,d,p)?(i(void 0),hn([2,2])):Go?(Le(T.closeOverlay,d,p)&&i(void 0),Le(T.acceptOverlayDown,d,p)&&(i(void 0),$++),Le(T.acceptOverlayUp,d,p)&&(i(void 0),$--),Le(T.acceptOverlayLeft,d,p)&&(i(void 0),L--),Le(T.acceptOverlayRight,d,p)&&(i(void 0),L++)):(Le(T.goDownCell,d,p)?$+=1:Le(T.goUpCell,d,p)?$-=1:Le(T.goRightCell,d,p)?L+=1:Le(T.goLeftCell,d,p)?L-=1:Le(T.goDownCellRetainSelection,d,p)?($+=1,Q=!0):Le(T.goUpCellRetainSelection,d,p)?($-=1,Q=!0):Le(T.goRightCellRetainSelection,d,p)?(L+=1,Q=!0):Le(T.goLeftCellRetainSelection,d,p)?(L-=1,Q=!0):Le(T.goToLastRow,d,p)?$=ve-1:Le(T.goToFirstRow,d,p)?$=Number.MIN_SAFE_INTEGER:Le(T.goToLastColumn,d,p)?L=Number.MAX_SAFE_INTEGER:Le(T.goToFirstColumn,d,p)?L=Number.MIN_SAFE_INTEGER:(at==="rect"||at==="multi-rect")&&(Le(T.selectGrowDown,d,p)?hn([0,1]):Le(T.selectGrowUp,d,p)?hn([0,-1]):Le(T.selectGrowRight,d,p)?hn([1,0]):Le(T.selectGrowLeft,d,p)?hn([-1,0]):Le(T.selectToLastRow,d,p)?hn([0,2]):Le(T.selectToFirstRow,d,p)?hn([0,-2]):Le(T.selectToLastColumn,d,p)?hn([2,0]):Le(T.selectToFirstColumn,d,p)&&hn([-2,0])),he=p.didMatch),fn!==void 0&&fn!=="normal"&&$!==N){const ge=fn==="skip-up"||fn==="skip"||fn==="block",Je=fn==="skip-down"||fn==="skip"||fn==="block",ut=$=0&&Qn($).isGroupHeader;)$--;$<0&&($=N)}else if(!ut&&Je){for(;$=ve&&($=N)}}const we=Gn(L,$,!1,Q),le=p.didMatch;return le&&(we||!he||Pn)&&v(),le},[fn,Go,B,vn,je,j,at,D,Qn,ve,Gn,Pt,bt,C.length,te,Pn,to,se,q,gt,vr,ko,F,xo,$i,Oi,hn]),Ko=a.useCallback(d=>{let v=!1;if(Qe!==void 0&&Qe({...d,cancel:()=>{v=!0}}),v||Xi(d)||B.current===void 0)return;const[p,I]=B.current.cell,E=it.current;if(nt&&!d.metaKey&&!d.ctrlKey&&B.current!==void 0&&d.key.length===1&&/[ -~]/g.test(d.key)&&d.bounds!==void 0&&Zo(X([p-D,Math.max(0,Math.min(I,ve-1))]))){if((!gt||I!==ve)&&(E.y>I||I>E.y+E.height||E.x>p||p>E.x+E.width))return;xo(d.bounds,!0,d.key),d.stopPropagation(),d.preventDefault()}},[nt,Qe,Xi,B,X,D,ve,gt,xo]),xs=a.useCallback((d,v)=>{const p=d.location[0]-D;if(d.kind==="header"&&(Ae==null||Ae(p,{...d,preventDefault:v})),d.kind===jt){if(p<0)return;G==null||G(p,{...d,preventDefault:v})}if(d.kind==="cell"){const[I,E]=d.location;oe==null||oe([p,E],{...d,preventDefault:v}),ha(B,d.location)||Gn(I,E,!1,!1)}},[B,oe,G,Ae,D,Gn]),li=a.useCallback(async d=>{var T,L,$;if(!vn.paste)return;function v(N,Q,he,ee){var le,Ue;const we=typeof he=="object"?(he==null?void 0:he.join(` -`))??"":(he==null?void 0:he.toString())??"";if(!Do(N)&&Zo(N)&&N.readonly!==!0){const xe=S==null?void 0:S(we,N);if(xe!==void 0&&Io(xe))return{location:Q,value:xe};const ge=De(N);if(ge===void 0)return;if(ge.kind===Z.Custom){Zt(N.kind===Z.Custom);const Je=(le=ge.onPaste)==null?void 0:le.call(ge,we,N.data);return Je===void 0?void 0:{location:Q,value:{...N,data:Je}}}else{const Je=(Ue=ge.onPaste)==null?void 0:Ue.call(ge,we,N,{formatted:ee,formattedString:typeof ee=="string"?ee:ee==null?void 0:ee.join(` -`),rawValue:he});return Je===void 0?void 0:(Zt(Je.kind===N.kind),{location:Q,value:Je})}}}const p=B.columns,I=B.rows,E=((T=f.current)==null?void 0:T.contains(document.activeElement))===!0||((L=s.current)==null?void 0:L.contains(document.activeElement))===!0;let W;if(B.current!==void 0?W=[B.current.range.x,B.current.range.y]:p.length===1?W=[p.first()??0,0]:I.length===1&&(W=[D,I.first()??0]),E&&W!==void 0){let N,Q;const he="text/plain",ee="text/html";if(navigator.clipboard.read!==void 0){const xe=await navigator.clipboard.read();for(const ge of xe){if(ge.types.includes(ee)){const ut=await(await ge.getType(ee)).text(),It=yl(ut);if(It!==void 0){N=It;break}}ge.types.includes(he)&&(Q=await(await ge.getType(he)).text())}}else if(navigator.clipboard.readText!==void 0)Q=await navigator.clipboard.readText();else if(d!==void 0&&(d==null?void 0:d.clipboardData)!==null){if(d.clipboardData.types.includes(ee)){const xe=d.clipboardData.getData(ee);N=yl(xe)}N===void 0&&d.clipboardData.types.includes(he)&&(Q=d.clipboardData.getData(he))}else return;const[we,le]=W,Ue=[];do{if(Oe===void 0){const xe=qt(W),ge=Q??(N==null?void 0:N.map(ut=>ut.map(It=>It.rawValue).join(" ")).join(" "))??"",Je=v(xe,W,ge,void 0);Je!==void 0&&Ue.push(Je);break}if(N===void 0){if(Q===void 0)return;N=ud(Q)}if(Oe===!1||typeof Oe=="function"&&(Oe==null?void 0:Oe([W[0]-D,W[1]],N.map(xe=>xe.map(ge=>{var Je;return((Je=ge.rawValue)==null?void 0:Je.toString())??""}))))!==!0)return;for(const[xe,ge]of N.entries()){if(xe+le>=ve)break;for(const[Je,ut]of ge.entries()){const It=[Je+we,xe+le],[gn,kn]=It;if(gn>=Ke.length||kn>=Yt)continue;const mn=qt(It),Sn=v(mn,It,ut.rawValue,ut.formatted);Sn!==void 0&&Ue.push(Sn)}}}while(!1);rn(Ue),($=Vt.current)==null||$.damage(Ue.map(xe=>({cell:xe.location})))}},[S,De,qt,B,vn.paste,Ke.length,rn,Yt,Oe,D,ve]);Ot("paste",li,w,!1,!0);const Uo=a.useCallback(async(d,v)=>{var T,L;if(!vn.copy)return;const p=v===!0||((T=f.current)==null?void 0:T.contains(document.activeElement))===!0||((L=s.current)==null?void 0:L.contains(document.activeElement))===!0,I=B.columns,E=B.rows,W=($,N)=>{if(!ae)pl($,N,d);else{const Q=N.map(he=>({kind:Z.Text,data:C[he].title,displayData:C[he].title,allowOverlay:!1}));pl([Q,...$],N,d)}};if(p&&Rt!==void 0){if(B.current!==void 0){let $=Rt(B.current.range,zt.current.signal);typeof $!="object"&&($=await $()),W($,ro(B.current.range.x-D,B.current.range.x+B.current.range.width-D))}else if(E!==void 0&&E.length>0){const N=[...E].map(Q=>{const he=Rt({x:D,y:Q,width:C.length,height:1},zt.current.signal);return typeof he=="object"?he[0]:he().then(ee=>ee[0])});if(N.some(Q=>Q instanceof Promise)){const Q=await Promise.all(N);W(Q,ro(C.length))}else W(N,ro(C.length))}else if(I.length>0){const $=[],N=[];for(const Q of I){let he=Rt({x:Q,y:0,width:1,height:ve},zt.current.signal);typeof he!="object"&&(he=await he()),$.push(he),N.push(Q-D)}if($.length===1)W($[0],N);else{const Q=$.reduce((he,ee)=>he.map((we,le)=>[...we,...ee[le]]));W(Q,N)}}}},[C,Rt,B,vn.copy,D,ve,ae]);Ot("copy",Uo,w,!1,!1);const ks=a.useCallback(async d=>{var p,I;if(!(!vn.cut||!(((p=f.current)==null?void 0:p.contains(document.activeElement))===!0||((I=s.current)==null?void 0:I.contains(document.activeElement))===!0))&&(await Uo(d),B.current!==void 0)){let E={current:{cell:B.current.cell,range:B.current.range,rangeStack:[]},rows:rt.empty(),columns:rt.empty()};const W=te==null?void 0:te(E);if(W===!1||(E=W===!0?E:W,E.current===void 0))return;to(E.current.range)}},[to,B,vn.cut,Uo,te]);Ot("cut",ks,w,!1,!1);const Ss=a.useCallback((d,v)=>{if(be!==void 0){D!==0&&(d=d.map(E=>[E[0]-D,E[1]])),be(d,v);return}if(d.length===0||v===-1)return;const[p,I]=d[v];m.current!==void 0&&m.current[0]===p&&m.current[1]===I||(m.current=[p,I],Gn(p,I,!1,!1))},[be,D,Gn]),[kr,Sr]=((qi=ft==null?void 0:ft.current)==null?void 0:qi.cell)??[],Mr=a.useRef(Et);Mr.current=Et,a.useLayoutEffect(()=>{var d,v,p,I;!un.current&&kr!==void 0&&Sr!==void 0&&(kr!==((v=(d=po.current)==null?void 0:d.current)==null?void 0:v.cell[0])||Sr!==((I=(p=po.current)==null?void 0:p.current)==null?void 0:I.cell[1]))&&Mr.current(kr,Sr),un.current=!1},[kr,Sr]);const Yi=B.current!==void 0&&(B.current.cell[0]>=Ke.length||B.current.cell[1]>=Yt);a.useLayoutEffect(()=>{Yi&&Pt(Tr,!1)},[Yi,Pt]);const Ms=a.useMemo(()=>gt===!0&&(pe==null?void 0:pe.tint)===!0?rt.fromSingleSelection(Yt-1):rt.empty(),[Yt,gt,pe==null?void 0:pe.tint]),Rs=a.useCallback(d=>typeof Be=="boolean"?Be:(Be==null?void 0:Be(d-D))??!0,[D,Be]),Es=a.useMemo(()=>{if(ei===void 0||s.current===null)return null;const{bounds:d,group:v}=ei,p=s.current.getBoundingClientRect();return a.createElement(ed,{bounds:d,group:v,canvasBounds:p,onClose:()=>ti(void 0),onFinish:I=>{ti(void 0),ye==null||ye(v,I)}})},[ye,ei]),Is=Math.min(Ke.length,Ce+(tn?1:0));a.useImperativeHandle(t,()=>({appendRow:(d,v)=>ko(d+D,v),updateCells:d=>{var v;return D!==0&&(d=d.map(p=>({cell:[p.cell[0]+D,p.cell[1]]}))),(v=Vt.current)==null?void 0:v.damage(d)},getBounds:(d,v)=>{var p;if(!((s==null?void 0:s.current)===null||(f==null?void 0:f.current)===null)){if(d===void 0&&v===void 0){const I=s.current.getBoundingClientRect(),E=I.width/f.current.clientWidth;return{x:I.x-f.current.scrollLeft*E,y:I.y-f.current.scrollTop*E,width:f.current.scrollWidth*E,height:f.current.scrollHeight*E}}return(p=Vt.current)==null?void 0:p.getBounds((d??0)+D,v)}},focus:()=>{var d;return(d=Vt.current)==null?void 0:d.focus()},emit:async d=>{switch(d){case"delete":Ko({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":Ko({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":Ko({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await Uo(void 0,!0);break;case"paste":await li();break}},scrollTo:Et,remeasureColumns:d=>{for(const v of d)Cr(v+D)}}),[ko,Cr,Uo,Ko,li,D,Et]);const[Gi,Ki]=xn??[],Ds=a.useCallback(d=>{const[v,p]=d;if(p===-1){je!=="none"&&(se(rt.fromSingleSelection(v),void 0,!1),Gt());return}Gi===v&&Ki===p||(_({cell:d,range:{x:v,y:p,width:1,height:1}},!0,!1,"keyboard-nav"),Et(v,p))},[je,Gt,Et,Gi,Ki,_,se]),[Fs,Hs]=a.useState(!1),Ui=a.useRef(Rl(d=>{Hs(d)},5)),Ts=a.useCallback(()=>{Ui.current(!0),B.current===void 0&&B.columns.length===0&&B.rows.length===0&&c===void 0&&_({cell:[D,mr],range:{x:D,y:mr,width:1,height:1}},!0,!1,"keyboard-select")},[mr,B,c,D,_]),As=a.useCallback(()=>{Ui.current(!1)},[]),[zs,Bs]=a.useMemo(()=>{let d;const v=(qe==null?void 0:qe.scrollbarWidthOverride)??wi(),p=ve+(gt?1:0);if(typeof Ut=="number")d=Wt+p*Ut;else{let E=0;const W=Math.min(p,10);for(let T=0;TW.width+E,0)+v;return[`${Math.min(1e5,I)}px`,`${Math.min(1e5,d)}px`]},[Ke,qe==null?void 0:qe.scrollbarWidthOverride,Ut,ve,gt,Wt]),Ls=a.useMemo(()=>Ea(ce),[ce]);return a.createElement(Gl.Provider,{value:ce},a.createElement(md,{style:Ls,className:Me,inWidth:b??zs,inHeight:x??Bs},a.createElement(jc,{fillHandle:Mt,drawFocusRing:so,experimental:qe,fixedShadowX:Tt,fixedShadowY:In,getRowThemeOverride:en,headerIcons:ir,imageWindowLoader:Bn,initialSize:Dn,isDraggable:Fn,onDragLeave:ao,onRowMoved:Ln,overscrollX:fr,overscrollY:hr,preventDiagonalScrolling:uo,rightElement:fo,rightElementProps:ho,smoothScrollX:Wn,smoothScrollY:Xr,className:Me,enableGroups:pt,onCanvasFocused:Ts,onCanvasBlur:As,canvasRef:s,onContextMenu:xs,theme:ce,cellXOffset:ss,cellYOffset:mr,accessibilityHeight:Bt.height,onDragEnd:bs,columns:Ke,nonGrowWidth:Ge,drawHeader:U,onColumnProposeMove:M,drawCell:de,disabledRows:Ms,freezeColumns:Is,lockColumns:D,firstColAccessible:D===0,getCellContent:qt,minColumnWidth:pn,maxColumnWidth:dn,searchInputRef:l,showSearch:Ur,onSearchClose:_r,highlightRegions:as,getCellsForSelection:Rt,getGroupDetails:Jr,headerHeight:Wo,isFocused:Fs,groupHeaderHeight:pt?Oo:0,freezeTrailingRows:ht+(gt&&(pe==null?void 0:pe.sticky)===!0?1:0),hasAppendRow:gt,onColumnResize:Xn,onColumnResizeEnd:jr,onColumnResizeStart:k,onCellFocused:Ds,onColumnMoved:ws,onDragStart:ys,onHeaderMenuClick:hs,onHeaderIndicatorClick:gs,onItemHovered:ii,isFilling:(c==null?void 0:c.fillHandle)===!0,onMouseMove:fs,onKeyDown:Ko,onKeyUp:tt,onMouseDown:cs,onMouseUp:us,onDragOverCell:St,onDrop:dt,onSearchResultsChanged:Ss,onVisibleRegionChanged:ms,clientSize:ue,rowHeight:Ut,searchResults:V,searchValue:Re,onSearchValueChange:Fe,rows:Yt,scrollRef:f,selection:B,translateX:Bt.tx,translateY:Bt.ty,verticalBorder:Rs,gridRef:Vt,getCellRenderer:De,resizeIndicator:cr}),Es,r!==void 0&&a.createElement(a.Suspense,{fallback:null},a.createElement(Sd,{...r,validateCell:bo,bloom:A,id:Cs,getCellRenderer:De,className:(qe==null?void 0:qe.isSubGrid)===!0?"click-outside-ignore":void 0,provideEditor:cn,imageEditorOverride:g,onFinishEditing:vs,markdownDivCreateNode:y,isOutsideClick:Gr}))))},Id=a.forwardRef(Ed),xl=20,Dd={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??"false"},kind:Z.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>Fd(e,e.cell.data,mi(e.cell),e.cell.maxSize??xl),onDelete:e=>({...e,data:!1}),onClick:e=>{const{cell:t,posX:n,posY:o,bounds:r,theme:i}=e,{width:l,height:s,x:c,y:u}=r,f=t.maxSize??xl,m=Math.floor(r.y+s/2),w=Fl(f,s,i.cellVerticalPadding),g=Dl(t.contentAlign??"center",c,l,i.cellHorizontalPadding,w),h=Il(g,m,w),y=Hl(c+n,u+o,h);if(mi(t)&&y)return{...t,data:rs(t.data)}},onPaste:(e,t)=>{let n=zr;return e.toLowerCase()==="true"?n=!0:e.toLowerCase()==="false"?n=!1:e.toLowerCase()==="indeterminate"&&(n=Ci),n===t.data?void 0:{...t,data:n}}};function Fd(e,t,n,o){if(!n&&t===zr)return;const{ctx:r,hoverAmount:i,theme:l,rect:s,highlighted:c,hoverX:u,hoverY:f,cell:{contentAlign:m}}=e,{x:w,y:g,width:h,height:y}=s,b=.35;let x=n?1-b+b*i:.4;t===zr&&(x*=i),x!==0&&(r.globalAlpha=x,Ei(r,l,t,w,g,h,y,c,u,f,o,m),r.globalAlpha=1)}const Hd=Qt("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),Td=e=>{const{bubbles:t}=e;return a.createElement(Hd,null,t.map((n,o)=>a.createElement("div",{key:o,className:"boe-bubble"},n)),a.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},Ad=Td,zd={getAccessibilityString:e=>Tl(e.data),kind:Z.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((o,r)=>e.measureText(r).width+o+20,0)+2*n.cellHorizontalPadding-4,draw:e=>Ld(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return a.createElement(Ad,{bubbles:t.data})},onPaste:()=>{}},Bd=4;function Ld(e,t){const{rect:n,theme:o,ctx:r,highlighted:i}=e,{x:l,y:s,width:c,height:u}=n,f=20,m=8,w=Bd;let g=l+o.cellHorizontalPadding;const h=[];for(const y of t){if(g>l+c)break;const b=Bo(y,r,o.baseFontFull).width;h.push({x:g,width:b}),g+=b+m*2+w}r.beginPath();for(const y of h)Rn(r,y.x,s+(u-f)/2,y.width+m*2,f,o.roundingRadius??f/2);r.fillStyle=i?o.bgBubbleSelected:o.bgBubble,r.fill();for(const[y,b]of h.entries())r.beginPath(),r.fillStyle=o.textBubble,r.fillText(t[y],b.x+m,s+u/2+qn(r,o))}const Pd=Qt("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),Wd=e=>{const{drilldowns:t}=e;return a.createElement(Pd,null,t.map((n,o)=>a.createElement("div",{key:o,className:"doe-bubble"},n.img!==void 0&&a.createElement("img",{src:n.img}),a.createElement("div",null,n.text))))},Od=Wd,$d={getAccessibilityString:e=>Tl(e.data.map(t=>t.text)),kind:Z.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((o,r)=>e.measureText(r.text).width+o+20+(r.img!==void 0?18:0),0)+2*n.cellHorizontalPadding-4,draw:e=>Yd(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return a.createElement(Od,{drilldowns:t.data})},onPaste:()=>{}},Nd=4,fi={};function Xd(e,t,n,o){const r=Math.ceil(window.devicePixelRatio),i=5,l=n-i*2,s=4,c=n*r,u=o+i,f=o*3,m=(f+i*2)*r,w=`${e},${t},${r},${n}`;if(fi[w]!==void 0)return{el:fi[w],height:c,width:m,middleWidth:s*r,sideWidth:u*r,padding:i*r,dpr:r};const g=document.createElement("canvas"),h=g.getContext("2d");return h===null?null:(g.width=m,g.height=c,h.scale(r,r),fi[w]=g,h.beginPath(),Rn(h,i,i,f,l,o),h.shadowColor="rgba(24, 25, 34, 0.4)",h.shadowBlur=1,h.fillStyle=e,h.fill(),h.shadowColor="rgba(24, 25, 34, 0.3)",h.shadowOffsetY=1,h.shadowBlur=5,h.fillStyle=e,h.fill(),h.shadowOffsetY=0,h.shadowBlur=0,h.shadowBlur=0,h.beginPath(),Rn(h,i+.5,i+.5,f,l,o),h.strokeStyle=t,h.lineWidth=1,h.stroke(),{el:g,height:c,width:m,sideWidth:u*r,middleWidth:o*r,padding:i*r,dpr:r})}function Yd(e,t){const{rect:n,theme:o,ctx:r,imageLoader:i,col:l,row:s}=e,{x:c,width:u}=n,f=o.baseFontFull,m=Ol(r,f),w=Math.min(n.height,Math.max(16,Math.ceil(m*o.lineHeight)*2)),g=Math.floor(n.y+(n.height-w)/2),h=w-10,y=8,b=Nd;let x=c+o.cellHorizontalPadding;const C=o.roundingRadius??6,z=Xd(o.bgCell,o.drilldownBorder,w,C),X=[];for(const Y of t){if(x>c+u)break;const H=Bo(Y.text,r,f).width;let K=0;Y.img!==void 0&&i.loadOrGetImage(Y.img,l,s)!==void 0&&(K=h-8+4);const S=H+K+y*2;X.push({x,width:S}),x+=S+b}if(z!==null){const{el:Y,height:F,middleWidth:H,sideWidth:K,width:S,dpr:O,padding:P}=z,A=K/O,R=P/O;for(const M of X){const ie=Math.floor(M.x),ne=Math.floor(M.width),oe=ne-(A-R)*2;r.imageSmoothingEnabled=!1,r.drawImage(Y,0,0,K,F,ie-R,g,A,w),oe>0&&r.drawImage(Y,K,0,H,F,ie+(A-R),g,oe,w),r.drawImage(Y,S-K,0,K,F,ie+ne-(A-R),g,A,w),r.imageSmoothingEnabled=!0}}r.beginPath();for(const[Y,F]of X.entries()){const H=t[Y];let K=F.x+y;if(H.img!==void 0){const S=i.loadOrGetImage(H.img,l,s);if(S!==void 0){const O=h-8;let P=0,A=0,R=S.width,M=S.height;R>M?(P+=(R-M)/2,R=M):M>R&&(A+=(M-R)/2,M=R),r.beginPath(),Rn(r,K,g+w/2-O/2,O,O,o.roundingRadius??3),r.save(),r.clip(),r.drawImage(S,P,A,R,M,K,g+w/2-O/2,O,O),r.restore(),K+=O+4}}r.beginPath(),r.fillStyle=o.textBubble,r.fillText(H.text,K,g+w/2+qn(r,o))}}const Gd={getAccessibilityString:e=>e.data.join(", "),kind:Z.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>Kd(e,e.cell.displayData??e.cell.data,e.cell.rounding??e.theme.roundingRadius??4,e.cell.contentAlign),measure:(e,t)=>t.data.length*50,onDelete:e=>({...e,data:[]}),provideEditor:()=>e=>{const{value:t,onFinishedEditing:n,imageEditorOverride:o}=e,r=o??ia;return a.createElement(r,{urls:t.data,canWrite:t.readonly!==!1,onCancel:n,onChange:i=>{n({...t,data:[i]})}})},onPaste:(e,t)=>{e=e.trim();const o=e.split(",").map(r=>{try{return new URL(r),r}catch{return}}).filter(r=>r!==void 0);if(!(o.length===t.data.length&&o.every((r,i)=>r===t.data[i])))return{...t,data:o}}},hi=4;function Kd(e,t,n,o){const{rect:r,col:i,row:l,theme:s,ctx:c,imageLoader:u}=e,{x:f,y:m,height:w,width:g}=r,h=w-s.cellVerticalPadding*2,y=[];let b=0;for(let C=0;C0&&(c.beginPath(),Rn(c,x,m+s.cellVerticalPadding,z,h,n),c.save(),c.clip()),c.drawImage(C,x,m+s.cellVerticalPadding,z,h),n>0&&c.restore(),x+=z+hi}}function Ud(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const _d={getAccessibilityString:()=>"",kind:Z.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:e=>{const{cell:t,col:n,row:o,ctx:r,rect:i,theme:l}=e;if(t.skeletonWidth===void 0||t.skeletonWidth===0)return;let s=t.skeletonWidth;t.skeletonWidthVariability!==void 0&&t.skeletonWidthVariability>0&&(s+=Math.round(Ud(n,o)*t.skeletonWidthVariability));const c=l.cellHorizontalPadding,u=t.skeletonHeight??Math.min(18,i.height-2*l.cellVerticalPadding);Rn(r,i.x+c,i.y+(i.height-u)/2,s,u,l.roundingRadius??3),r.fillStyle=io(l.textDark,.1),r.fill()},onPaste:()=>{}},Vd=()=>e=>e.targetWidth,kl=Qt("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[Vd(),"px"]}}),qd=e=>{const{value:t,onChange:n,forceEditMode:o,createNode:r,targetRect:i,onFinish:l,validatedSelection:s}=e,c=t.data,u=t.readonly===!0,[f,m]=a.useState(c===""||o),w=a.useCallback(()=>{m(h=>!h)},[]),g=c?"gdg-ml-6":"";return f?a.createElement(kl,{targetWidth:i.width-20},a.createElement($r,{autoFocus:!0,highlight:!1,validatedSelection:s,value:c,onKeyDown:h=>{h.key==="Enter"&&h.stopPropagation()},onChange:n}),a.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${g}`,onClick:()=>l(t)},a.createElement(Js,null))):a.createElement(kl,{targetWidth:i.width},a.createElement(sa,{contents:c,createNode:r}),!u&&a.createElement(a.Fragment,null,a.createElement("div",{className:"spacer"}),a.createElement("div",{className:`gdg-edit-icon gdg-edit-hover ${g}`,onClick:w},a.createElement(xi,null))),a.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},jd={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:rr,measure:(e,t,n)=>{const o=t.data.split(` -`)[0];return e.measureText(o).width+2*n.cellHorizontalPadding},draw:e=>Mn(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:o,onFinishedEditing:r,markdownDivCreateNode:i,forceEditMode:l,validatedSelection:s}=e;return a.createElement(qd,{onFinish:r,targetRect:o,value:n,validatedSelection:s,onChange:c=>t({...n,data:c.target.value}),forceEditMode:l,createNode:i})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},Zd={getAccessibilityString:e=>e.row.toString(),kind:an.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:Jd,measure:()=>44,draw:e=>eu(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:o,posY:r}=e,{width:i,height:l}=t,s=n.drawHandle?7+(i-7)/2:i/2,c=l/2;if(Math.abs(o-s)<=10&&Math.abs(r-c)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function Jd(e,t){const{ctx:n,theme:o}=e,r=o.markerFontFull,i=t??{};return(i==null?void 0:i.font)!==r&&(n.font=r,i.font=r),i.deprep=Qd,n.textAlign="center",i}function Qd(e){const{ctx:t}=e;t.textAlign="start"}function eu(e,t,n,o,r,i){const{ctx:l,rect:s,hoverAmount:c,theme:u}=e,{x:f,y:m,width:w,height:g}=s,h=n?1:o==="checkbox-visible"?.6+.4*c:c;if(o!=="number"&&h>0){l.globalAlpha=h;const y=7*(n?c:1);if(Ei(l,u,n,r?f+y:f,m,r?w-y:w,g,!0,void 0,void 0,18,"center",i),r){l.globalAlpha=c,l.beginPath();for(const b of[3,6])for(const x of[-5,-1,3])l.rect(f+b,m+g/2+x,2,2);l.fillStyle=u.textLight,l.fill(),l.beginPath()}l.globalAlpha=1}if(o==="number"||o==="both"&&!n){const y=t.toString(),b=u.markerFontFull,x=f+w/2;o==="both"&&c!==0&&(l.globalAlpha=1-c),l.fillStyle=u.textLight,l.font=b,l.fillText(y,x,m+g/2+qn(l,b)),c!==0&&(l.globalAlpha=1)}}const tu={getAccessibilityString:()=>"",kind:an.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>nu(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function nu(e,t,n){const{ctx:o,rect:r,hoverAmount:i,theme:l,spriteManager:s}=e,{x:c,y:u,width:f,height:m}=r;o.beginPath(),o.globalAlpha=i,o.rect(c+1,u+1,f,m-2),o.fillStyle=l.bgHeaderHovered,o.fill(),o.globalAlpha=1,o.beginPath();const w=t!=="";let g=0;if(n!==void 0){const y=m-8,b=c+8/2,x=u+8/2;s.drawSprite(n,"normal",o,b,x,y,l,w?1:i),g=y}else{g=24;const h=12,y=w?h:i*h,b=w?0:(1-i)*h*.5,x=l.cellHorizontalPadding+4;y>0&&(o.moveTo(c+x+b,u+m/2),o.lineTo(c+x+b+y,u+m/2),o.moveTo(c+x+b+y*.5,u+m/2-y*.5),o.lineTo(c+x+b+y*.5,u+m/2+y*.5),o.lineWidth=2,o.strokeStyle=l.bgIconHeader,o.lineCap="round",o.stroke())}o.fillStyle=l.textMedium,o.fillText(t,g+c+l.cellHorizontalPadding+.5,u+m/2+qn(o,l)),o.beginPath()}const ou=a.lazy(async()=>await Ml(()=>import("./number-overlay-editor-3ljU3NGx.js"),__vite__mapDeps([8,1,3,9]),import.meta.url)),ru={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Number,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:rr,draw:e=>Mn(e,e.cell.displayData,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.displayData).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:r}=e;return a.createElement(a.Suspense,{fallback:null},a.createElement(ou,{highlight:t,disabled:o.readonly===!0,value:o.data,fixedDecimals:o.fixedDecimals,allowNegative:o.allowNegative,thousandSeparator:o.thousandSeparator,decimalSeparator:o.decimalSeparator,validatedSelection:r,onChange:i=>n({...o,data:Number.isNaN(i.floatValue??0)?0:i.floatValue})}))},onPaste:(e,t,n)=>{const o=typeof n.rawValue=="number"?n.rawValue:Number.parseFloat(typeof n.rawValue=="string"?n.rawValue:e);if(!(Number.isNaN(o)||t.data===o))return{...t,data:o,displayData:n.formattedString??t.displayData}}},iu={getAccessibilityString:()=>"",measure:()=>108,kind:Z.Protected,needsHover:!1,needsHoverPosition:!1,draw:lu,onPaste:()=>{}};function lu(e){const{ctx:t,theme:n,rect:o}=e,{x:r,y:i,height:l}=o;t.beginPath();const s=2.5;let c=r+n.cellHorizontalPadding+s;const u=i+l/2,f=Math.cos(tl(30))*s,m=Math.sin(tl(30))*s;for(let w=0;w<12;w++)t.moveTo(c,u-s),t.lineTo(c,u+s),t.moveTo(c+f,u-m),t.lineTo(c-f,u+m),t.moveTo(c-f,u-m),t.lineTo(c+f,u+m),c+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const su={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>rr(e,t,e.theme.textLight),draw:e=>Mn(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+n.cellHorizontalPadding*2,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:r}=e;return yt.createElement($r,{highlight:t,autoFocus:o.readonly!==!0,disabled:o.readonly!==!1,value:o.data,validatedSelection:r,onChange:i=>n({...o,data:i.target.value})})},onPaste:()=>{}},au={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:rr,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:o,ctx:r,rect:i,theme:l,overrideCursor:s}=e,{displayData:c,contentAlign:u,hoverEffect:f,allowWrapping:m}=t;if(f===!0&&n>0){r.textBaseline="alphabetic";const w=l.cellHorizontalPadding,g=l.cellVerticalPadding,h=Bo(c,r,l.baseFontFull,"alphabetic"),y=i.height-g,b=Math.min(y,h.actualBoundingBoxAscent*2.5);r.beginPath(),Rn(r,i.x+w/2,i.y+(i.height-b)/2+1,h.width+w*3,b-1,l.roundingRadius??4),r.globalAlpha=n,r.fillStyle=io(l.textDark,.1),r.fill(),r.globalAlpha=1,r.fillStyle=l.textDark,r.textBaseline="middle",s==null||s("text")}Mn(e,c,u,m,o)},measure:(e,t,n)=>{const o=t.displayData.split(` -`,t.allowWrapping===!0?void 0:1);let r=0;for(const i of o)r=Math.max(r,e.measureText(i).width);return r+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:e.allowWrapping===!0,editor:t=>{const{isHighlighted:n,onChange:o,value:r,validatedSelection:i}=t;return a.createElement($r,{style:e.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:r.readonly!==!0,disabled:r.readonly===!0,altNewline:!0,value:r.data,validatedSelection:i,onChange:l=>o({...r,data:l.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},cu=Qt("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),du=e=>{const{uri:t,onChange:n,forceEditMode:o,readonly:r,validatedSelection:i,preview:l}=e,[s,c]=a.useState(!r&&(t===""||o)),u=a.useCallback(()=>{c(!0)},[]);return s?a.createElement($r,{validatedSelection:i,highlight:!0,autoFocus:!0,value:t,onChange:n}):a.createElement(cu,null,a.createElement("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer"},l),!r&&a.createElement("div",{className:"gdg-edit-icon",onClick:u},a.createElement(xi,null)),a.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},uu=du;function Sl(e,t,n,o){let r=n.cellHorizontalPadding;const i=t.height/2-e.actualBoundingBoxAscent/2,l=e.width,s=e.actualBoundingBoxAscent;return o==="right"?r=t.width-l-n.cellHorizontalPadding:o==="center"&&(r=t.width/2-l/2),{x:r,y:i,width:l,height:s}}const fu={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:rr,draw:e=>{const{cell:t,theme:n,overrideCursor:o,hoverX:r,hoverY:i,rect:l,ctx:s}=e,c=t.displayData??t.data,u=t.hoverEffect===!0;if(o!==void 0&&u&&r!==void 0&&i!==void 0){const f=Bo(c,s,n.baseFontFull),m=Sl(f,l,n,t.contentAlign),{x:w,y:g,width:h,height:y}=m;if(r>=w-4&&r<=w-4+h+8&&i>=g-4&&i<=g-4+y+8){const b=qn(s,n.baseFontFull);o("pointer");const x=5,C=g-b;s.beginPath(),s.moveTo(l.x+w,Math.floor(l.y+C+y+x)+.5),s.lineTo(l.x+w+h,Math.floor(l.y+C+y+x)+.5),s.strokeStyle=n.linkColor,s.stroke(),s.save(),s.fillStyle=e.cellFillColor,Mn({...e,rect:{...l,x:l.x-1}},c,t.contentAlign),Mn({...e,rect:{...l,x:l.x-2}},c,t.contentAlign),Mn({...e,rect:{...l,x:l.x+1}},c,t.contentAlign),Mn({...e,rect:{...l,x:l.x+2}},c,t.contentAlign),s.restore()}}s.fillStyle=u?n.linkColor:n.textDark,Mn(e,c,t.contentAlign)},onClick:e=>{const{cell:t,bounds:n,posX:o,posY:r,theme:i}=e,l=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return;const s=Pl(l,i.baseFontFull);if(s===void 0)return;const c=Sl(s,n,i,t.contentAlign);Ho({x:c.x-4,y:c.y-4,width:c.width+8,height:c.height+8},o,r)&&t.onClickUri(e)},measure:(e,t,n)=>e.measureText(t.displayData??t.data).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:""}),provideEditor:e=>t=>{const{onChange:n,value:o,forceEditMode:r,validatedSelection:i}=t;return a.createElement(uu,{forceEditMode:o.readonly!==!0&&(r||e.hoverEffect===!0&&e.onClickUri!==void 0),uri:o.data,preview:o.displayData??o.data,validatedSelection:i,readonly:o.readonly===!0,onChange:l=>n({...o,data:l.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},hu=[Zd,tu,Dd,zd,$d,Gd,_d,jd,ru,iu,su,au,fu],gi=[];class gu extends Nl{constructor(){super(...arguments);Ne(this,"imageLoaded",()=>{});Ne(this,"loadedLocations",[]);Ne(this,"cache",{});Ne(this,"sendLoaded",Gs(()=>{this.imageLoaded(new er(this.loadedLocations)),this.loadedLocations=[]},20));Ne(this,"clearOutOfWindow",()=>{const n=Object.keys(this.cache);for(const o of n){const r=this.cache[o];let i=!1;for(let l=0;l{c||(c=!0,gi.length<12?gi.unshift(s):l||(s.src=""))}},f=new Promise(m=>s.addEventListener("load",()=>m(null)));requestAnimationFrame(async()=>{try{s.src=n,await f,await s.decode();const m=this.cache[i];if(m!==void 0&&!c){m.img=s;for(const w of m.cells)this.loadedLocations.push(Ri(w));l=!0,this.sendLoaded()}}catch{u.cancel()}}),this.cache[i]=u}loadOrGetImage(n,o,r){const i=n,l=this.cache[i];if(l!==void 0){const s=wn(o,r);return l.cells.includes(s)||l.cells.push(s),l.img}else this.loadImage(n,o,r,i)}}const mu=gu,wu=(e,t)=>{const n=a.useMemo(()=>({...rc,...e.headerIcons}),[e.headerIcons]),o=a.useMemo(()=>e.imageWindowLoader??new mu,[e.imageWindowLoader]);return a.createElement(Id,{...e,renderers:hu,headerIcons:n,ref:t,imageWindowLoader:o})},Iu=a.forwardRef(wu);export{Zc as C,Iu as D,Z as G,Gl as T,$r as a,Jt as b,Mu as c,Ru as d,ku as e,Io as f,qn as g,Ji as h,Su as i,Do as j,Vs as k,Ea as l,Bo as m,Ao as p,Rn as r,Eu as u}; -function __vite__mapDeps(indexes) { - if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./data-grid-overlay-editor-APrLKi4s.js","./index-BMVQvedj.js","./index-wocATsGp.js","./marked.esm-dbrxtycE.js","./iframe-9FFu--7X.js","./throttle-7EuXLZa7.js","./_baseIteratee-WTHxv43n.js","./flatten-qRvRBp6y.js","./number-overlay-editor-3ljU3NGx.js","./react-number-format.es-2Vaki8Uh.js"] - } - return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -} \ No newline at end of file diff --git a/docs/assets/data-editor-repros.stories-2Sx4xcGK.js b/docs/assets/data-editor-repros.stories-HT3RvUND.js similarity index 92% rename from docs/assets/data-editor-repros.stories-2Sx4xcGK.js rename to docs/assets/data-editor-repros.stories-HT3RvUND.js index 537b67fd9..1ace773f9 100644 --- a/docs/assets/data-editor-repros.stories-2Sx4xcGK.js +++ b/docs/assets/data-editor-repros.stories-HT3RvUND.js @@ -1,4 +1,4 @@ -import{j as t,a as m,s as w}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{B as f}from"./story-utils-K2EZnGjM.js";import{G as p}from"./image-window-loader-lKUISrIQ.js";import{D as g}from"./data-editor-all-2MtuC67g.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";const{useState:T,useMemo:S}=__STORYBOOK_MODULE_ADDONS__,$={title:"Tests/TestCases/Bugs",decorators:[e=>t(f,{width:1e3,height:800,children:t(e,{})})]},A=([,e])=>({allowOverlay:!0,kind:p.Number,data:e,displayData:e.toString()}),x=()=>{},v=w("div")({name:"Bug70Style",class:"b1nvh7n2",propsAsIs:!1});function o(){return m(v,{className:"App",children:[t("p",{children:"To cause error: scroll down at least one row, edit a cell in Col2, and hit Tab"}),t("a",{href:"https://github.com/glideapps/glide-data-grid/issues/70",target:"_blank",rel:"noreferrer",children:"Original report"}),t(g,{width:500,height:500,rows:100,columns:[{title:"Col1",width:100},{title:"Col2",width:100}],getCellContent:A,onCellEdited:x})]})}const _=([e,r])=>({allowOverlay:!0,kind:p.Text,data:`${e} - ${r}`,displayData:`${e} - ${r}`}),l=[{title:"Col AAAA",width:120},{title:"Col AAA",width:120},{title:"Col AA",width:120},{title:"Col A",width:120},{title:"Col",width:120}];function n(){const[e,r]=T(""),C=S(()=>e===""?l:l.filter(s=>s.title.toLowerCase().includes(e.toLowerCase())),[e]);return m("div",{children:[t("input",{value:e,onChange:s=>{r(s.target.value)}}),t(g,{width:1e3,height:500,rows:100,columns:C,getCellContent:_,smoothScrollX:!0,smoothScrollY:!0})]})}var a,i,c;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:`function Bug70() { +import{j as t,a as m,s as w}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{B as f}from"./story-utils-K2EZnGjM.js";import{G as p}from"./image-window-loader-aCHQvgUN.js";import{D as g}from"./data-editor-all-MRDpHEQ_.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";const{useState:T,useMemo:S}=__STORYBOOK_MODULE_ADDONS__,$={title:"Tests/TestCases/Bugs",decorators:[e=>t(f,{width:1e3,height:800,children:t(e,{})})]},A=([,e])=>({allowOverlay:!0,kind:p.Number,data:e,displayData:e.toString()}),x=()=>{},v=w("div")({name:"Bug70Style",class:"b1nvh7n2",propsAsIs:!1});function o(){return m(v,{className:"App",children:[t("p",{children:"To cause error: scroll down at least one row, edit a cell in Col2, and hit Tab"}),t("a",{href:"https://github.com/glideapps/glide-data-grid/issues/70",target:"_blank",rel:"noreferrer",children:"Original report"}),t(g,{width:500,height:500,rows:100,columns:[{title:"Col1",width:100},{title:"Col2",width:100}],getCellContent:A,onCellEdited:x})]})}const _=([e,r])=>({allowOverlay:!0,kind:p.Text,data:`${e} - ${r}`,displayData:`${e} - ${r}`}),l=[{title:"Col AAAA",width:120},{title:"Col AAA",width:120},{title:"Col AA",width:120},{title:"Col A",width:120},{title:"Col",width:120}];function n(){const[e,r]=T(""),C=S(()=>e===""?l:l.filter(s=>s.title.toLowerCase().includes(e.toLowerCase())),[e]);return m("div",{children:[t("input",{value:e,onChange:s=>{r(s.target.value)}}),t(g,{width:1e3,height:500,rows:100,columns:C,getCellContent:_,smoothScrollX:!0,smoothScrollY:!0})]})}var a,i,c;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:`function Bug70() { const cols = [{ title: "Col1", width: 100 diff --git a/docs/assets/data-editor.stories-ge0BK-7S.js b/docs/assets/data-editor.stories-18boT4dm.js similarity index 98% rename from docs/assets/data-editor.stories-ge0BK-7S.js rename to docs/assets/data-editor.stories-18boT4dm.js index e8a9e9bbf..4f1ed39c4 100644 --- a/docs/assets/data-editor.stories-ge0BK-7S.js +++ b/docs/assets/data-editor.stories-18boT4dm.js @@ -1,4 +1,4 @@ -import{j as a}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{B as Me}from"./story-utils-K2EZnGjM.js";import{C,G as i}from"./image-window-loader-lKUISrIQ.js";import{D as c}from"./data-editor-all-2MtuC67g.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";const{useState:d,useCallback:m,useMemo:g}=__STORYBOOK_MODULE_ADDONS__,Fe={title:"Tests/TestCases",decorators:[e=>a(Me,{width:1e3,height:800,children:a(e,{})})]};function w([e,t]){return e===0?{kind:i.RowID,data:`RowID ${e}, ${t}`,allowOverlay:!1}:e===1?{kind:i.Bubble,data:[`Bub ${e}`,`Bub ${t}`,`Bub ${e}`,`Bub ${t}`,`Bub ${e}`,`Bub ${t}`,`Bub ${e}`,`Bub ${t}`,`Bub ${e}`,`Bub ${t}`],allowOverlay:!0}:e===2?{kind:i.Image,data:["https://i.imgur.com/5J0BftG.jpg","https://preview.redd.it/7jlqkp2cyap51.jpg?width=575&auto=webp&s=26fa9ed15b16fb450ee08ed1f2f0ccb5e0223581"],allowOverlay:!0,readonly:!1}:e===3?{kind:i.Markdown,data:`## Markdown has titles +import{j as a}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{B as Me}from"./story-utils-K2EZnGjM.js";import{C,G as i}from"./image-window-loader-aCHQvgUN.js";import{D as c}from"./data-editor-all-MRDpHEQ_.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";const{useState:d,useCallback:m,useMemo:g}=__STORYBOOK_MODULE_ADDONS__,Fe={title:"Tests/TestCases",decorators:[e=>a(Me,{width:1e3,height:800,children:a(e,{})})]};function w([e,t]){return e===0?{kind:i.RowID,data:`RowID ${e}, ${t}`,allowOverlay:!1}:e===1?{kind:i.Bubble,data:[`Bub ${e}`,`Bub ${t}`,`Bub ${e}`,`Bub ${t}`,`Bub ${e}`,`Bub ${t}`,`Bub ${e}`,`Bub ${t}`,`Bub ${e}`,`Bub ${t}`],allowOverlay:!0}:e===2?{kind:i.Image,data:["https://i.imgur.com/5J0BftG.jpg","https://preview.redd.it/7jlqkp2cyap51.jpg?width=575&auto=webp&s=26fa9ed15b16fb450ee08ed1f2f0ccb5e0223581"],allowOverlay:!0,readonly:!1}:e===3?{kind:i.Markdown,data:`## Markdown has titles And supports newline chars and automatic wrapping text that just needs to be long enough to trigger it. diff --git a/docs/assets/data-grid-overlay-editor-KImiKR0_.js b/docs/assets/data-grid-overlay-editor-I8cicvj5.js similarity index 93% rename from docs/assets/data-grid-overlay-editor-KImiKR0_.js rename to docs/assets/data-grid-overlay-editor-I8cicvj5.js index 1c51b8a77..e092e4d03 100644 --- a/docs/assets/data-grid-overlay-editor-KImiKR0_.js +++ b/docs/assets/data-grid-overlay-editor-I8cicvj5.js @@ -1 +1 @@ -import{s as $,j as h}from"./marked.esm-dbrxtycE.js";import{r as i}from"./index-BMVQvedj.js";import{r as J}from"./index-wocATsGp.js";import{C as Q}from"./data-editor-all-2MtuC67g.js";import{E as P,s as U,F as Z,T as ee,M as te}from"./image-window-loader-lKUISrIQ.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";const re=()=>t=>t.targetX,ie=()=>t=>t.targetY,se=()=>t=>t.targetWidth,ne=()=>t=>t.targetHeight,oe=()=>t=>t.targetY+10,ae=()=>t=>Math.max(0,(t.targetHeight-28)/2),le=$("div")({name:"DataGridOverlayEditorStyle",class:"d16c1ze1",propsAsIs:!1,vars:{"d16c1ze1-0":[ie(),"px"],"d16c1ze1-1":[re(),"px"],"d16c1ze1-2":[se(),"px"],"d16c1ze1-3":[ne(),"px"],"d16c1ze1-4":[oe(),"px"],"d16c1ze1-5":[ae(),"px"]}});function ce(){const[t,n]=i.useState();return[t??void 0,n]}function de(){const[t,n]=ce(),[s,y]=i.useState(0),[p,C]=i.useState(!0);i.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const o=new IntersectionObserver(a=>{a.length!==0&&C(a[0].isIntersecting)},{threshold:1});return o.observe(t),()=>o.disconnect()},[t]),i.useEffect(()=>{if(p||t===void 0)return;let o;const a=()=>{const{right:O}=t.getBoundingClientRect();y(m=>Math.min(m+window.innerWidth-O-10,0)),o=requestAnimationFrame(a)};return o=requestAnimationFrame(a),()=>{o!==void 0&&cancelAnimationFrame(o)}},[t,p]);const S=i.useMemo(()=>({transform:`translateX(${s}px)`}),[s]);return{ref:n,style:S}}const Ce=t=>{const{target:n,content:s,onFinishEditing:y,forceEditMode:p,initialValue:C,imageEditorOverride:S,markdownDivCreateNode:o,highlight:a,className:O,theme:m,id:X,cell:k,bloom:u,validateCell:l,getCellRenderer:w,provideEditor:v,isOutsideClick:A}=t,[c,N]=i.useState(p?s:void 0),R=i.useRef(c??s);R.current=c??s;const[E,I]=i.useState(()=>l===void 0?!0:!(P(s)&&(l==null?void 0:l(k,s,R.current))===!1)),f=i.useCallback((e,r)=>{y(E?e:void 0,r)},[E,y]),V=i.useCallback(e=>{if(l!==void 0&&e!==void 0&&P(e)){const r=l(k,e,R.current);r===!1?I(!1):(typeof r=="object"&&(e=r),I(!0))}N(e)},[k,l]),x=i.useRef(!1),g=i.useRef(void 0),W=i.useCallback(()=>{f(c,[0,0]),x.current=!0},[c,f]),Y=i.useCallback((e,r)=>{f(e,r??g.current??[0,0]),x.current=!0},[f]),K=i.useCallback(async e=>{let r=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),g.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),g.current=[0,1],r=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),g.current=[e.shiftKey?-1:1,0],r=!0),window.setTimeout(()=>{!x.current&&g.current!==void 0&&(f(r?c:void 0,g.current),x.current=!0)},0)},[f,c]),D=c??s,[d,q]=i.useMemo(()=>{var r,H;if(U(s))return[];const e=v==null?void 0:v(s);return e!==void 0?[e,!1]:[(H=(r=w(s))==null?void 0:r.provideEditor)==null?void 0:H.call(r,s),!1]},[s,w,v]),{ref:B,style:L}=de();let z=!0,M,_=!0,b;if(d!==void 0){z=d.disablePadding!==!0,_=d.disableStyling!==!0;const e=Z(d);e&&(b=d.styleOverride);const r=e?d.editor:d;M=h(r,{isHighlighted:a,onChange:V,value:D,initialValue:C,onFinishedEditing:Y,validatedSelection:P(D)?D.selectionRange:void 0,forceEditMode:p,target:n,imageEditorOverride:S,markdownDivCreateNode:o,isValid:E,theme:m})}b={...b,...L};const T=document.getElementById("portal");if(T===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `
` as the last child of your ``.'),null;let F=_?"gdg-style":"gdg-unstyle";E||(F+=" gdg-invalid"),z&&(F+=" gdg-pad");const j=(u==null?void 0:u[0])??1,G=(u==null?void 0:u[1])??1;return J.createPortal(h(ee.Provider,{value:m,children:h(Q,{style:te(m),className:O,onClickOutside:W,isOutsideClick:A,children:h(le,{ref:B,id:X,className:F,style:b,as:q===!0?"label":void 0,targetX:n.x-j,targetY:n.y-G,targetWidth:n.width+j*2,targetHeight:n.height+G*2,children:h("div",{className:"gdg-clip-region",onKeyDown:K,children:M})})})}),T)};export{Ce as default}; +import{s as $,j as h}from"./marked.esm-dbrxtycE.js";import{r as i}from"./index-BMVQvedj.js";import{r as J}from"./index-wocATsGp.js";import{C as Q}from"./data-editor-all-MRDpHEQ_.js";import{E as P,s as U,F as Z,T as ee,M as te}from"./image-window-loader-aCHQvgUN.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";const re=()=>t=>t.targetX,ie=()=>t=>t.targetY,se=()=>t=>t.targetWidth,ne=()=>t=>t.targetHeight,oe=()=>t=>t.targetY+10,ae=()=>t=>Math.max(0,(t.targetHeight-28)/2),le=$("div")({name:"DataGridOverlayEditorStyle",class:"d16c1ze1",propsAsIs:!1,vars:{"d16c1ze1-0":[ie(),"px"],"d16c1ze1-1":[re(),"px"],"d16c1ze1-2":[se(),"px"],"d16c1ze1-3":[ne(),"px"],"d16c1ze1-4":[oe(),"px"],"d16c1ze1-5":[ae(),"px"]}});function ce(){const[t,n]=i.useState();return[t??void 0,n]}function de(){const[t,n]=ce(),[s,y]=i.useState(0),[p,C]=i.useState(!0);i.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const o=new IntersectionObserver(a=>{a.length!==0&&C(a[0].isIntersecting)},{threshold:1});return o.observe(t),()=>o.disconnect()},[t]),i.useEffect(()=>{if(p||t===void 0)return;let o;const a=()=>{const{right:O}=t.getBoundingClientRect();y(m=>Math.min(m+window.innerWidth-O-10,0)),o=requestAnimationFrame(a)};return o=requestAnimationFrame(a),()=>{o!==void 0&&cancelAnimationFrame(o)}},[t,p]);const S=i.useMemo(()=>({transform:`translateX(${s}px)`}),[s]);return{ref:n,style:S}}const Ce=t=>{const{target:n,content:s,onFinishEditing:y,forceEditMode:p,initialValue:C,imageEditorOverride:S,markdownDivCreateNode:o,highlight:a,className:O,theme:m,id:X,cell:k,bloom:u,validateCell:l,getCellRenderer:w,provideEditor:v,isOutsideClick:A}=t,[c,N]=i.useState(p?s:void 0),R=i.useRef(c??s);R.current=c??s;const[E,I]=i.useState(()=>l===void 0?!0:!(P(s)&&(l==null?void 0:l(k,s,R.current))===!1)),f=i.useCallback((e,r)=>{y(E?e:void 0,r)},[E,y]),V=i.useCallback(e=>{if(l!==void 0&&e!==void 0&&P(e)){const r=l(k,e,R.current);r===!1?I(!1):(typeof r=="object"&&(e=r),I(!0))}N(e)},[k,l]),x=i.useRef(!1),g=i.useRef(void 0),W=i.useCallback(()=>{f(c,[0,0]),x.current=!0},[c,f]),Y=i.useCallback((e,r)=>{f(e,r??g.current??[0,0]),x.current=!0},[f]),K=i.useCallback(async e=>{let r=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),g.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),g.current=[0,1],r=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),g.current=[e.shiftKey?-1:1,0],r=!0),window.setTimeout(()=>{!x.current&&g.current!==void 0&&(f(r?c:void 0,g.current),x.current=!0)},0)},[f,c]),D=c??s,[d,q]=i.useMemo(()=>{var r,H;if(U(s))return[];const e=v==null?void 0:v(s);return e!==void 0?[e,!1]:[(H=(r=w(s))==null?void 0:r.provideEditor)==null?void 0:H.call(r,s),!1]},[s,w,v]),{ref:B,style:L}=de();let z=!0,M,_=!0,b;if(d!==void 0){z=d.disablePadding!==!0,_=d.disableStyling!==!0;const e=Z(d);e&&(b=d.styleOverride);const r=e?d.editor:d;M=h(r,{isHighlighted:a,onChange:V,value:D,initialValue:C,onFinishedEditing:Y,validatedSelection:P(D)?D.selectionRange:void 0,forceEditMode:p,target:n,imageEditorOverride:S,markdownDivCreateNode:o,isValid:E,theme:m})}b={...b,...L};const T=document.getElementById("portal");if(T===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `
` as the last child of your ``.'),null;let F=_?"gdg-style":"gdg-unstyle";E||(F+=" gdg-invalid"),z&&(F+=" gdg-pad");const j=(u==null?void 0:u[0])??1,G=(u==null?void 0:u[1])??1;return J.createPortal(h(ee.Provider,{value:m,children:h(Q,{style:te(m),className:O,onClickOutside:W,isOutsideClick:A,children:h(le,{ref:B,id:X,className:F,style:b,as:q===!0?"label":void 0,targetX:n.x-j,targetY:n.y-G,targetWidth:n.width+j*2,targetHeight:n.height+G*2,children:h("div",{className:"gdg-clip-region",onKeyDown:K,children:M})})})}),T)};export{Ce as default}; diff --git a/docs/assets/data-grid-overlay-editor-APrLKi4s.js b/docs/assets/data-grid-overlay-editor-LE8GSUsC.js similarity index 96% rename from docs/assets/data-grid-overlay-editor-APrLKi4s.js rename to docs/assets/data-grid-overlay-editor-LE8GSUsC.js index c1719652f..95c690756 100644 --- a/docs/assets/data-grid-overlay-editor-APrLKi4s.js +++ b/docs/assets/data-grid-overlay-editor-LE8GSUsC.js @@ -1 +1 @@ -import{r}from"./index-BMVQvedj.js";import{r as $}from"./index-wocATsGp.js";import{f as w,j as z,k as J,T as Q,C as U,l as Z}from"./data-editor-all-T-OiWfdB.js";import{s as ee}from"./marked.esm-dbrxtycE.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";const te=()=>t=>t.targetX,re=()=>t=>t.targetY,ne=()=>t=>t.targetWidth,ie=()=>t=>t.targetHeight,se=()=>t=>t.targetY+10,ae=()=>t=>Math.max(0,(t.targetHeight-28)/2),oe=ee("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[re(),"px"],"d19meir1-1":[te(),"px"],"d19meir1-2":[ne(),"px"],"d19meir1-3":[ie(),"px"],"d19meir1-4":[se(),"px"],"d19meir1-5":[ae(),"px"]}});function de(){const[t,s]=r.useState();return[t??void 0,s]}function le(){const[t,s]=de(),[i,y]=r.useState(0),[g,O]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(o=>{o.length!==0&&O(o[0].isIntersecting)},{threshold:1});return a.observe(t),()=>a.disconnect()},[t]),r.useEffect(()=>{if(g||t===void 0)return;let a;const o=()=>{const{right:S}=t.getBoundingClientRect();y(p=>Math.min(p+window.innerWidth-S-10,0)),a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!==void 0&&cancelAnimationFrame(a)}},[t,g]);const b=r.useMemo(()=>({transform:`translateX(${i}px)`}),[i]);return{ref:s,style:b}}const Ce=t=>{const{target:s,content:i,onFinishEditing:y,forceEditMode:g,initialValue:O,imageEditorOverride:b,markdownDivCreateNode:a,highlight:o,className:S,theme:p,id:H,cell:k,bloom:c,validateCell:d,getCellRenderer:F,provideEditor:h,isOutsideClick:X}=t,[l,j]=r.useState(g?i:void 0),v=r.useRef(l??i);v.current=l??i;const[E,R]=r.useState(()=>d===void 0?!0:!(w(i)&&(d==null?void 0:d(k,i,v.current))===!1)),f=r.useCallback((e,n)=>{y(E?e:void 0,n)},[E,y]),A=r.useCallback(e=>{if(d!==void 0&&e!==void 0&&w(e)){const n=d(k,e,v.current);n===!1?R(!1):(typeof n=="object"&&(e=n),R(!0))}j(e)},[k,d]),C=r.useRef(!1),m=r.useRef(void 0),K=r.useCallback(()=>{f(l,[0,0]),C.current=!0},[l,f]),W=r.useCallback((e,n)=>{f(e,n??m.current??[0,0]),C.current=!0},[f]),Y=r.useCallback(async e=>{let n=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),m.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),m.current=[0,1],n=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),m.current=[e.shiftKey?-1:1,0],n=!0),window.setTimeout(()=>{!C.current&&m.current!==void 0&&(f(n?l:void 0,m.current),C.current=!0)},0)},[f,l]),D=l??i,[u,q]=r.useMemo(()=>{var n,G;if(z(i))return[];const e=h==null?void 0:h(i);return e!==void 0?[e,!1]:[(G=(n=F(i))==null?void 0:n.provideEditor)==null?void 0:G.call(n,i),!1]},[i,F,h]),{ref:B,style:L}=le();let P=!0,M,_=!0,x;if(u!==void 0){P=u.disablePadding!==!0,_=u.disableStyling!==!0;const e=J(u);e&&(x=u.styleOverride);const n=e?u.editor:u;M=r.createElement(n,{isHighlighted:o,onChange:A,value:D,initialValue:O,onFinishedEditing:W,validatedSelection:w(D)?D.selectionRange:void 0,forceEditMode:g,target:s,imageEditorOverride:b,markdownDivCreateNode:a,isValid:E,theme:p})}x={...x,...L};const N=document.getElementById("portal");if(N===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `
` as the last child of your ``.'),null;let I=_?"gdg-style":"gdg-unstyle";E||(I+=" gdg-invalid"),P&&(I+=" gdg-pad");const T=(c==null?void 0:c[0])??1,V=(c==null?void 0:c[1])??1;return $.createPortal(r.createElement(Q.Provider,{value:p},r.createElement(U,{style:Z(p),className:S,onClickOutside:K,isOutsideClick:X},r.createElement(oe,{ref:B,id:H,className:I,style:x,as:q===!0?"label":void 0,targetX:s.x-T,targetY:s.y-V,targetWidth:s.width+T*2,targetHeight:s.height+V*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:Y},M)))),N)};export{Ce as default}; +import{r}from"./index-BMVQvedj.js";import{r as $}from"./index-wocATsGp.js";import{f as w,j as z,k as J,T as Q,C as U,l as Z}from"./data-editor-all-Jk8In-1B.js";import{s as ee}from"./marked.esm-dbrxtycE.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";const te=()=>t=>t.targetX,re=()=>t=>t.targetY,ne=()=>t=>t.targetWidth,ie=()=>t=>t.targetHeight,se=()=>t=>t.targetY+10,ae=()=>t=>Math.max(0,(t.targetHeight-28)/2),oe=ee("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[re(),"px"],"d19meir1-1":[te(),"px"],"d19meir1-2":[ne(),"px"],"d19meir1-3":[ie(),"px"],"d19meir1-4":[se(),"px"],"d19meir1-5":[ae(),"px"]}});function de(){const[t,s]=r.useState();return[t??void 0,s]}function le(){const[t,s]=de(),[i,y]=r.useState(0),[g,O]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(o=>{o.length!==0&&O(o[0].isIntersecting)},{threshold:1});return a.observe(t),()=>a.disconnect()},[t]),r.useEffect(()=>{if(g||t===void 0)return;let a;const o=()=>{const{right:S}=t.getBoundingClientRect();y(p=>Math.min(p+window.innerWidth-S-10,0)),a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!==void 0&&cancelAnimationFrame(a)}},[t,g]);const b=r.useMemo(()=>({transform:`translateX(${i}px)`}),[i]);return{ref:s,style:b}}const Ce=t=>{const{target:s,content:i,onFinishEditing:y,forceEditMode:g,initialValue:O,imageEditorOverride:b,markdownDivCreateNode:a,highlight:o,className:S,theme:p,id:H,cell:k,bloom:c,validateCell:d,getCellRenderer:F,provideEditor:h,isOutsideClick:X}=t,[l,j]=r.useState(g?i:void 0),v=r.useRef(l??i);v.current=l??i;const[E,R]=r.useState(()=>d===void 0?!0:!(w(i)&&(d==null?void 0:d(k,i,v.current))===!1)),f=r.useCallback((e,n)=>{y(E?e:void 0,n)},[E,y]),A=r.useCallback(e=>{if(d!==void 0&&e!==void 0&&w(e)){const n=d(k,e,v.current);n===!1?R(!1):(typeof n=="object"&&(e=n),R(!0))}j(e)},[k,d]),C=r.useRef(!1),m=r.useRef(void 0),K=r.useCallback(()=>{f(l,[0,0]),C.current=!0},[l,f]),W=r.useCallback((e,n)=>{f(e,n??m.current??[0,0]),C.current=!0},[f]),Y=r.useCallback(async e=>{let n=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),m.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),m.current=[0,1],n=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),m.current=[e.shiftKey?-1:1,0],n=!0),window.setTimeout(()=>{!C.current&&m.current!==void 0&&(f(n?l:void 0,m.current),C.current=!0)},0)},[f,l]),D=l??i,[u,q]=r.useMemo(()=>{var n,G;if(z(i))return[];const e=h==null?void 0:h(i);return e!==void 0?[e,!1]:[(G=(n=F(i))==null?void 0:n.provideEditor)==null?void 0:G.call(n,i),!1]},[i,F,h]),{ref:B,style:L}=le();let P=!0,M,_=!0,x;if(u!==void 0){P=u.disablePadding!==!0,_=u.disableStyling!==!0;const e=J(u);e&&(x=u.styleOverride);const n=e?u.editor:u;M=r.createElement(n,{isHighlighted:o,onChange:A,value:D,initialValue:O,onFinishedEditing:W,validatedSelection:w(D)?D.selectionRange:void 0,forceEditMode:g,target:s,imageEditorOverride:b,markdownDivCreateNode:a,isValid:E,theme:p})}x={...x,...L};const N=document.getElementById("portal");if(N===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `
` as the last child of your ``.'),null;let I=_?"gdg-style":"gdg-unstyle";E||(I+=" gdg-invalid"),P&&(I+=" gdg-pad");const T=(c==null?void 0:c[0])??1,V=(c==null?void 0:c[1])??1;return $.createPortal(r.createElement(Q.Provider,{value:p},r.createElement(U,{style:Z(p),className:S,onClickOutside:K,isOutsideClick:X},r.createElement(oe,{ref:B,id:H,className:I,style:x,as:q===!0?"label":void 0,targetX:s.x-T,targetY:s.y-V,targetWidth:s.width+T*2,targetHeight:s.height+V*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:Y},M)))),N)};export{Ce as default}; diff --git a/docs/assets/data-grid.stories-m1tO0wrE.js b/docs/assets/data-grid.stories-uU5mN9ME.js similarity index 99% rename from docs/assets/data-grid.stories-m1tO0wrE.js rename to docs/assets/data-grid.stories-uU5mN9ME.js index 05ed5d93e..5ff6d1267 100644 --- a/docs/assets/data-grid.stories-m1tO0wrE.js +++ b/docs/assets/data-grid.stories-uU5mN9ME.js @@ -1,4 +1,4 @@ -import{j as i}from"./marked.esm-dbrxtycE.js";import{r as m}from"./index-BMVQvedj.js";import{B as b}from"./story-utils-K2EZnGjM.js";import{C as d,Q as g,O as v,G as r,m as c,g as h,P as I}from"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";const B={title:"Subcomponents/DataGrid",decorators:[n=>i("div",{children:i(b,{width:1800,height:1e3,children:i("div",{style:{position:"relative"},children:i(n,{})})})})]},Y={columns:d.empty(),rows:d.empty(),current:void 0},w=n=>{if(n.kind!==r.Custom)return I.find(e=>e.kind===n.kind)};function l(){let n=0;const[e,o]=m.useState(0);return m.useEffect(()=>{let t=0;const a=()=>{o(O=>O+1),t=window.requestAnimationFrame(a)};return a(),()=>window.cancelAnimationFrame(t)},[]),i(g,{getCellRenderer:w,width:1800,height:1e3,cellXOffset:0,drawHeader:void 0,drawCell:void 0,experimental:void 0,onHeaderIndicatorClick:()=>{},headerIcons:void 0,isDraggable:void 0,onCanvasBlur:()=>{},onCanvasFocused:()=>{},onCellFocused:()=>{},onContextMenu:()=>{},onDragEnd:()=>{},onDragLeave:()=>{},onDragOverCell:()=>{},onDragStart:()=>{},onDrop:()=>{},onItemHovered:()=>{},onKeyDown:()=>{},onKeyUp:()=>{},onMouseDown:()=>{},onMouseMoveRaw:()=>{},onMouseUp:()=>{},resizeColumn:void 0,smoothScrollX:void 0,smoothScrollY:void 0,allowResize:void 0,canvasRef:void 0,disabledRows:void 0,eventTargetRef:void 0,fillHandle:void 0,fixedShadowX:void 0,fixedShadowY:void 0,getGroupDetails:void 0,getRowThemeOverride:void 0,highlightRegions:void 0,imageWindowLoader:new v,onHeaderMenuClick:void 0,prelightCells:void 0,translateX:void 0,translateY:void 0,dragAndDropState:void 0,drawFocusRing:!0,isFocused:!0,cellYOffset:e,isFilling:!1,onMouseMove:()=>{},groupHeaderHeight:0,accessibilityHeight:50,enableGroups:!1,selection:Y,rows:1e5,headerHeight:44,rowHeight:34,columns:["One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven"].map(t=>({title:t,width:122+(n+=10)})),getCellContent:([t,a])=>({kind:r.Text,displayData:`${t},${a} Testing things that are way too long`,data:`${t},${a} Testing things that are way too long`,allowOverlay:!1,owned:!0}),freezeColumns:0,firstColAccessible:!0,verticalBorder:()=>!0,freezeTrailingRows:0,hasAppendRow:!1,isResizing:!1,isDragging:!1,theme:c(h()),resizeIndicator:"full"})}function s(){let n=0;return i(g,{getCellRenderer:w,width:1800,height:1e3,cellXOffset:0,isFocused:!0,resizeIndicator:"full",drawHeader:void 0,drawCell:void 0,experimental:void 0,headerIcons:void 0,isDraggable:void 0,onCanvasBlur:()=>{},onCanvasFocused:()=>{},onHeaderIndicatorClick:()=>{},onCellFocused:()=>{},onContextMenu:()=>{},onDragEnd:()=>{},onDragLeave:()=>{},onDragOverCell:()=>{},onDragStart:()=>{},onDrop:()=>{},onItemHovered:()=>{},onKeyDown:()=>{},onKeyUp:()=>{},onMouseDown:()=>{},onMouseMoveRaw:()=>{},onMouseUp:()=>{},smoothScrollX:void 0,resizeColumn:void 0,smoothScrollY:void 0,allowResize:void 0,canvasRef:void 0,disabledRows:void 0,eventTargetRef:void 0,fillHandle:void 0,fixedShadowX:void 0,fixedShadowY:void 0,getGroupDetails:void 0,getRowThemeOverride:void 0,highlightRegions:void 0,imageWindowLoader:new v,onHeaderMenuClick:void 0,prelightCells:void 0,translateX:void 0,translateY:void 0,dragAndDropState:void 0,drawFocusRing:!0,onMouseMove:()=>{},accessibilityHeight:50,isFilling:!1,cellYOffset:0,groupHeaderHeight:34,enableGroups:!1,rows:1e3,headerHeight:44,rowHeight:34,columns:["One","Two","Three","Four","Five","Six","Seven"].map(e=>({title:e,width:122+(n+=10)})),getCellContent:([e,o])=>({kind:r.Text,displayData:`${e},${o} Testing things that are way too long`,data:`${e},${o} Testing things that are way too long`,allowOverlay:!1,owned:!0}),selection:{current:{cell:[2,2],range:{x:2,y:2,width:1,height:1},rangeStack:[]},columns:d.empty(),rows:d.empty()},freezeColumns:0,firstColAccessible:!0,verticalBorder:()=>!0,freezeTrailingRows:0,hasAppendRow:!1,isResizing:!1,isDragging:!1,theme:c(h())})}function u(){let n=0;return i(g,{getCellRenderer:w,onMouseMove:()=>{},width:1800,height:1e3,cellXOffset:0,cellYOffset:0,isFocused:!0,resizeIndicator:"full",resizeColumn:void 0,drawHeader:void 0,drawCell:void 0,experimental:void 0,headerIcons:void 0,isDraggable:void 0,onCanvasBlur:()=>{},onCanvasFocused:()=>{},onCellFocused:()=>{},onContextMenu:()=>{},onDragEnd:()=>{},onHeaderIndicatorClick:()=>{},onDragLeave:()=>{},onDragOverCell:()=>{},onDragStart:()=>{},onDrop:()=>{},onItemHovered:()=>{},onKeyDown:()=>{},onKeyUp:()=>{},onMouseDown:()=>{},onMouseMoveRaw:()=>{},onMouseUp:()=>{},smoothScrollX:void 0,smoothScrollY:void 0,allowResize:void 0,canvasRef:void 0,disabledRows:void 0,eventTargetRef:void 0,fillHandle:void 0,fixedShadowX:void 0,fixedShadowY:void 0,getGroupDetails:void 0,getRowThemeOverride:void 0,highlightRegions:void 0,imageWindowLoader:new v,onHeaderMenuClick:void 0,prelightCells:void 0,translateX:void 0,translateY:void 0,dragAndDropState:void 0,drawFocusRing:!0,groupHeaderHeight:34,accessibilityHeight:50,isFilling:!1,enableGroups:!1,rows:1e3,headerHeight:44,rowHeight:34,columns:["One","Two","Three","Four","Five","Six","Seven"].map(e=>({title:e,width:122+(n+=10)})),getCellContent:([e,o])=>({kind:r.Text,displayData:`${e},${o} Testing things that are way too long`,data:`${e},${o} Testing things that are way too long`,allowOverlay:!1,owned:!0}),selection:{current:void 0,rows:d.fromSingleSelection([2,4]),columns:d.empty()},freezeColumns:0,firstColAccessible:!0,verticalBorder:()=>!0,freezeTrailingRows:0,hasAppendRow:!1,isResizing:!1,isDragging:!1,theme:c(h())})}const f=()=>{let n=0;return i(g,{getCellRenderer:w,onMouseMove:()=>{},width:1800,height:1e3,cellXOffset:0,cellYOffset:0,isFocused:!0,resizeIndicator:"full",resizeColumn:void 0,drawHeader:void 0,experimental:void 0,headerIcons:void 0,isDraggable:void 0,onCanvasBlur:()=>{},onCanvasFocused:()=>{},onHeaderIndicatorClick:()=>{},onCellFocused:()=>{},onContextMenu:()=>{},onDragEnd:()=>{},onDragLeave:()=>{},onDragOverCell:()=>{},onDragStart:()=>{},onDrop:()=>{},onItemHovered:()=>{},onKeyDown:()=>{},onKeyUp:()=>{},onMouseDown:()=>{},onMouseMoveRaw:()=>{},onMouseUp:()=>{},smoothScrollX:void 0,smoothScrollY:void 0,allowResize:void 0,canvasRef:void 0,disabledRows:void 0,eventTargetRef:void 0,fillHandle:void 0,fixedShadowX:void 0,fixedShadowY:void 0,getGroupDetails:void 0,getRowThemeOverride:void 0,highlightRegions:void 0,imageWindowLoader:new v,onHeaderMenuClick:void 0,prelightCells:void 0,translateX:void 0,translateY:void 0,dragAndDropState:void 0,drawCell:void 0,drawFocusRing:!0,accessibilityHeight:50,isFilling:!1,groupHeaderHeight:34,enableGroups:!1,rows:1e3,headerHeight:44,rowHeight:34,columns:["One","Two","Three","Four","Five","Six","Seven"].map(e=>({title:e,width:122+(n+=10)})),getCellContent:([e,o])=>({kind:r.Text,displayData:`${e},${o} Testing things that are way too long`,data:`${e},${o} Testing things that are way too long`,allowOverlay:!1,owned:!0}),selection:{current:void 0,rows:d.empty(),columns:d.fromSingleSelection([2,4])},freezeColumns:0,firstColAccessible:!0,verticalBorder:()=>!0,freezeTrailingRows:0,hasAppendRow:!1,isResizing:!1,isDragging:!1,theme:c(h())})};var p,C,R;l.parameters={...l.parameters,docs:{...(p=l.parameters)==null?void 0:p.docs,source:{originalSource:`function Simplenotest() { +import{j as i}from"./marked.esm-dbrxtycE.js";import{r as m}from"./index-BMVQvedj.js";import{B as b}from"./story-utils-K2EZnGjM.js";import{C as d,Q as g,O as v,G as r,m as c,g as h,P as I}from"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";const B={title:"Subcomponents/DataGrid",decorators:[n=>i("div",{children:i(b,{width:1800,height:1e3,children:i("div",{style:{position:"relative"},children:i(n,{})})})})]},Y={columns:d.empty(),rows:d.empty(),current:void 0},w=n=>{if(n.kind!==r.Custom)return I.find(e=>e.kind===n.kind)};function l(){let n=0;const[e,o]=m.useState(0);return m.useEffect(()=>{let t=0;const a=()=>{o(O=>O+1),t=window.requestAnimationFrame(a)};return a(),()=>window.cancelAnimationFrame(t)},[]),i(g,{getCellRenderer:w,width:1800,height:1e3,cellXOffset:0,drawHeader:void 0,drawCell:void 0,experimental:void 0,onHeaderIndicatorClick:()=>{},headerIcons:void 0,isDraggable:void 0,onCanvasBlur:()=>{},onCanvasFocused:()=>{},onCellFocused:()=>{},onContextMenu:()=>{},onDragEnd:()=>{},onDragLeave:()=>{},onDragOverCell:()=>{},onDragStart:()=>{},onDrop:()=>{},onItemHovered:()=>{},onKeyDown:()=>{},onKeyUp:()=>{},onMouseDown:()=>{},onMouseMoveRaw:()=>{},onMouseUp:()=>{},resizeColumn:void 0,smoothScrollX:void 0,smoothScrollY:void 0,allowResize:void 0,canvasRef:void 0,disabledRows:void 0,eventTargetRef:void 0,fillHandle:void 0,fixedShadowX:void 0,fixedShadowY:void 0,getGroupDetails:void 0,getRowThemeOverride:void 0,highlightRegions:void 0,imageWindowLoader:new v,onHeaderMenuClick:void 0,prelightCells:void 0,translateX:void 0,translateY:void 0,dragAndDropState:void 0,drawFocusRing:!0,isFocused:!0,cellYOffset:e,isFilling:!1,onMouseMove:()=>{},groupHeaderHeight:0,accessibilityHeight:50,enableGroups:!1,selection:Y,rows:1e5,headerHeight:44,rowHeight:34,columns:["One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven"].map(t=>({title:t,width:122+(n+=10)})),getCellContent:([t,a])=>({kind:r.Text,displayData:`${t},${a} Testing things that are way too long`,data:`${t},${a} Testing things that are way too long`,allowOverlay:!1,owned:!0}),freezeColumns:0,firstColAccessible:!0,verticalBorder:()=>!0,freezeTrailingRows:0,hasAppendRow:!1,isResizing:!1,isDragging:!1,theme:c(h()),resizeIndicator:"full"})}function s(){let n=0;return i(g,{getCellRenderer:w,width:1800,height:1e3,cellXOffset:0,isFocused:!0,resizeIndicator:"full",drawHeader:void 0,drawCell:void 0,experimental:void 0,headerIcons:void 0,isDraggable:void 0,onCanvasBlur:()=>{},onCanvasFocused:()=>{},onHeaderIndicatorClick:()=>{},onCellFocused:()=>{},onContextMenu:()=>{},onDragEnd:()=>{},onDragLeave:()=>{},onDragOverCell:()=>{},onDragStart:()=>{},onDrop:()=>{},onItemHovered:()=>{},onKeyDown:()=>{},onKeyUp:()=>{},onMouseDown:()=>{},onMouseMoveRaw:()=>{},onMouseUp:()=>{},smoothScrollX:void 0,resizeColumn:void 0,smoothScrollY:void 0,allowResize:void 0,canvasRef:void 0,disabledRows:void 0,eventTargetRef:void 0,fillHandle:void 0,fixedShadowX:void 0,fixedShadowY:void 0,getGroupDetails:void 0,getRowThemeOverride:void 0,highlightRegions:void 0,imageWindowLoader:new v,onHeaderMenuClick:void 0,prelightCells:void 0,translateX:void 0,translateY:void 0,dragAndDropState:void 0,drawFocusRing:!0,onMouseMove:()=>{},accessibilityHeight:50,isFilling:!1,cellYOffset:0,groupHeaderHeight:34,enableGroups:!1,rows:1e3,headerHeight:44,rowHeight:34,columns:["One","Two","Three","Four","Five","Six","Seven"].map(e=>({title:e,width:122+(n+=10)})),getCellContent:([e,o])=>({kind:r.Text,displayData:`${e},${o} Testing things that are way too long`,data:`${e},${o} Testing things that are way too long`,allowOverlay:!1,owned:!0}),selection:{current:{cell:[2,2],range:{x:2,y:2,width:1,height:1},rangeStack:[]},columns:d.empty(),rows:d.empty()},freezeColumns:0,firstColAccessible:!0,verticalBorder:()=>!0,freezeTrailingRows:0,hasAppendRow:!1,isResizing:!1,isDragging:!1,theme:c(h())})}function u(){let n=0;return i(g,{getCellRenderer:w,onMouseMove:()=>{},width:1800,height:1e3,cellXOffset:0,cellYOffset:0,isFocused:!0,resizeIndicator:"full",resizeColumn:void 0,drawHeader:void 0,drawCell:void 0,experimental:void 0,headerIcons:void 0,isDraggable:void 0,onCanvasBlur:()=>{},onCanvasFocused:()=>{},onCellFocused:()=>{},onContextMenu:()=>{},onDragEnd:()=>{},onHeaderIndicatorClick:()=>{},onDragLeave:()=>{},onDragOverCell:()=>{},onDragStart:()=>{},onDrop:()=>{},onItemHovered:()=>{},onKeyDown:()=>{},onKeyUp:()=>{},onMouseDown:()=>{},onMouseMoveRaw:()=>{},onMouseUp:()=>{},smoothScrollX:void 0,smoothScrollY:void 0,allowResize:void 0,canvasRef:void 0,disabledRows:void 0,eventTargetRef:void 0,fillHandle:void 0,fixedShadowX:void 0,fixedShadowY:void 0,getGroupDetails:void 0,getRowThemeOverride:void 0,highlightRegions:void 0,imageWindowLoader:new v,onHeaderMenuClick:void 0,prelightCells:void 0,translateX:void 0,translateY:void 0,dragAndDropState:void 0,drawFocusRing:!0,groupHeaderHeight:34,accessibilityHeight:50,isFilling:!1,enableGroups:!1,rows:1e3,headerHeight:44,rowHeight:34,columns:["One","Two","Three","Four","Five","Six","Seven"].map(e=>({title:e,width:122+(n+=10)})),getCellContent:([e,o])=>({kind:r.Text,displayData:`${e},${o} Testing things that are way too long`,data:`${e},${o} Testing things that are way too long`,allowOverlay:!1,owned:!0}),selection:{current:void 0,rows:d.fromSingleSelection([2,4]),columns:d.empty()},freezeColumns:0,firstColAccessible:!0,verticalBorder:()=>!0,freezeTrailingRows:0,hasAppendRow:!1,isResizing:!1,isDragging:!1,theme:c(h())})}const f=()=>{let n=0;return i(g,{getCellRenderer:w,onMouseMove:()=>{},width:1800,height:1e3,cellXOffset:0,cellYOffset:0,isFocused:!0,resizeIndicator:"full",resizeColumn:void 0,drawHeader:void 0,experimental:void 0,headerIcons:void 0,isDraggable:void 0,onCanvasBlur:()=>{},onCanvasFocused:()=>{},onHeaderIndicatorClick:()=>{},onCellFocused:()=>{},onContextMenu:()=>{},onDragEnd:()=>{},onDragLeave:()=>{},onDragOverCell:()=>{},onDragStart:()=>{},onDrop:()=>{},onItemHovered:()=>{},onKeyDown:()=>{},onKeyUp:()=>{},onMouseDown:()=>{},onMouseMoveRaw:()=>{},onMouseUp:()=>{},smoothScrollX:void 0,smoothScrollY:void 0,allowResize:void 0,canvasRef:void 0,disabledRows:void 0,eventTargetRef:void 0,fillHandle:void 0,fixedShadowX:void 0,fixedShadowY:void 0,getGroupDetails:void 0,getRowThemeOverride:void 0,highlightRegions:void 0,imageWindowLoader:new v,onHeaderMenuClick:void 0,prelightCells:void 0,translateX:void 0,translateY:void 0,dragAndDropState:void 0,drawCell:void 0,drawFocusRing:!0,accessibilityHeight:50,isFilling:!1,groupHeaderHeight:34,enableGroups:!1,rows:1e3,headerHeight:44,rowHeight:34,columns:["One","Two","Three","Four","Five","Six","Seven"].map(e=>({title:e,width:122+(n+=10)})),getCellContent:([e,o])=>({kind:r.Text,displayData:`${e},${o} Testing things that are way too long`,data:`${e},${o} Testing things that are way too long`,allowOverlay:!1,owned:!0}),selection:{current:void 0,rows:d.empty(),columns:d.fromSingleSelection([2,4])},freezeColumns:0,firstColAccessible:!0,verticalBorder:()=>!0,freezeTrailingRows:0,hasAppendRow:!1,isResizing:!1,isDragging:!1,theme:c(h())})};var p,C,R;l.parameters={...l.parameters,docs:{...(p=l.parameters)==null?void 0:p.docs,source:{originalSource:`function Simplenotest() { let x = 0; const [y, setY] = React.useState(0); React.useEffect(() => { diff --git a/docs/assets/drag-source.stories-Ky4JqS9t.js b/docs/assets/drag-source.stories-gUClilXD.js similarity index 81% rename from docs/assets/drag-source.stories-Ky4JqS9t.js rename to docs/assets/drag-source.stories-gUClilXD.js index 6b3445b3a..473398f3e 100644 --- a/docs/assets/drag-source.stories-Ky4JqS9t.js +++ b/docs/assets/drag-source.stories-gUClilXD.js @@ -1,4 +1,4 @@ -import{j as e,F as m,a as c}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as g}from"./data-editor-all-2MtuC67g.js";import{B as u,D,P as w,u as h,d as C}from"./utils-J-I08TtD.js";import{S as M}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const y={title:"Glide-Data-Grid/DataEditor Demos",decorators:[a=>e(M,{children:e(u,{title:"Drag source",description:e(m,{children:c(D,{children:["Setting the ",e(w,{children:"isDraggable"})," prop can allow for more granular control over what is draggable in the grid via HTML drag and drop."]})}),children:e(a,{})})})]},o=a=>{const{cols:i,getCellContent:d,onColumnResize:p}=h(200);return e(g,{...C,getCellContent:d,columns:i,rowMarkers:"both",rows:5e3,onRowMoved:(r,t)=>window.alert(`Moved row ${r} to ${t}`),onColumnMoved:(r,t)=>window.alert(`Moved col ${r} to ${t}`),onColumnResize:p,isDraggable:a.isDraggable,onDragStart:r=>{r.setData("text/plain","Drag data here!")}})};o.argTypes={isDraggable:{control:{type:"select"},options:[!0,!1,"cell","header"]}};o.args={isDraggable:!1};var s,n,l;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`p => { +import{j as e,F as m,a as c}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as g}from"./data-editor-all-MRDpHEQ_.js";import{B as u,D,P as w,u as h,d as C}from"./utils-0sbaJdQp.js";import{S as M}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const y={title:"Glide-Data-Grid/DataEditor Demos",decorators:[a=>e(M,{children:e(u,{title:"Drag source",description:e(m,{children:c(D,{children:["Setting the ",e(w,{children:"isDraggable"})," prop can allow for more granular control over what is draggable in the grid via HTML drag and drop."]})}),children:e(a,{})})})]},o=a=>{const{cols:i,getCellContent:d,onColumnResize:p}=h(200);return e(g,{...C,getCellContent:d,columns:i,rowMarkers:"both",rows:5e3,onRowMoved:(r,t)=>window.alert(`Moved row ${r} to ${t}`),onColumnMoved:(r,t)=>window.alert(`Moved col ${r} to ${t}`),onColumnResize:p,isDraggable:a.isDraggable,onDragStart:r=>{r.setData("text/plain","Drag data here!")}})};o.argTypes={isDraggable:{control:{type:"select"},options:[!0,!1,"cell","header"]}};o.args={isDraggable:!1};var s,n,l;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`p => { const { cols, getCellContent, diff --git a/docs/assets/drop-events.stories-k5ZvAUD1.js b/docs/assets/drop-events.stories-OWz9nfw6.js similarity index 93% rename from docs/assets/drop-events.stories-k5ZvAUD1.js rename to docs/assets/drop-events.stories-OWz9nfw6.js index 258c8e7bc..09f75f22e 100644 --- a/docs/assets/drop-events.stories-k5ZvAUD1.js +++ b/docs/assets/drop-events.stories-OWz9nfw6.js @@ -1,4 +1,4 @@ -import{j as e,a as g,F as h}from"./marked.esm-dbrxtycE.js";import{R as o}from"./index-BMVQvedj.js";import{D as M}from"./data-editor-all-2MtuC67g.js";import{a as w,B as b,D as L,P as u,M as f,d as N}from"./utils-J-I08TtD.js";import{G as C}from"./image-window-loader-lKUISrIQ.js";import{S as U}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const Q={title:"Glide-Data-Grid/DataEditor Demos",decorators:[a=>e(U,{children:e(a,{})})]},D=new Set(["image/png","image/gif","image/bmp","image/jpeg"]),i=()=>{const{cols:a,getCellContent:c,onColumnResize:P,setCellValue:p}=w(),[E,l]=o.useState([]),[m,O]=o.useState(),S=o.useCallback((n,t)=>{if(l([]),t===null)return;const{files:r}=t;if(r.length!==1)return;const[s]=r;if(!D.has(s.type))return;const d=URL.createObjectURL(s);p(n,{kind:C.Image,data:[d],allowOverlay:!0,readonly:!0},!0,!0),O(n)},[p]),I=o.useCallback((n,t)=>{if(t===null)return;const{items:r}=t;if(r.length!==1)return;const[s]=r;if(!D.has(s.type))return;const[d,k]=n;c(n).kind===C.Image?l([{color:"#44BB0022",range:{x:d,y:k,width:1,height:1}}]):l([])},[c]),T=o.useCallback(()=>{l([])},[]);return e(b,{title:"Drop events",description:g(h,{children:[g(L,{children:["You can drag and drop into cells by using ",e(u,{children:"onDragOverCell"})," and"," ",e(u,{children:"onDrop"}),"."]}),e("div",{children:m===void 0?e(f,{children:"Nothing dropped, yet"}):e(h,{children:g(f,{children:["You last dropped in cell ",e(u,{children:JSON.stringify(m)})]})})})]}),children:e(M,{...N,getCellContent:c,columns:a,onCellEdited:p,onColumnResize:P,rows:1e3,onDrop:S,onDragOverCell:I,onDragLeave:T,highlightRegions:E,rowMarkers:"none"})})};var v,R,y;i.parameters={...i.parameters,docs:{...(v=i.parameters)==null?void 0:v.docs,source:{originalSource:`() => { +import{j as e,a as g,F as h}from"./marked.esm-dbrxtycE.js";import{R as o}from"./index-BMVQvedj.js";import{D as M}from"./data-editor-all-MRDpHEQ_.js";import{a as w,B as b,D as L,P as u,M as f,d as N}from"./utils-0sbaJdQp.js";import{G as C}from"./image-window-loader-aCHQvgUN.js";import{S as U}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const Q={title:"Glide-Data-Grid/DataEditor Demos",decorators:[a=>e(U,{children:e(a,{})})]},D=new Set(["image/png","image/gif","image/bmp","image/jpeg"]),i=()=>{const{cols:a,getCellContent:c,onColumnResize:P,setCellValue:p}=w(),[E,l]=o.useState([]),[m,O]=o.useState(),S=o.useCallback((n,t)=>{if(l([]),t===null)return;const{files:r}=t;if(r.length!==1)return;const[s]=r;if(!D.has(s.type))return;const d=URL.createObjectURL(s);p(n,{kind:C.Image,data:[d],allowOverlay:!0,readonly:!0},!0,!0),O(n)},[p]),I=o.useCallback((n,t)=>{if(t===null)return;const{items:r}=t;if(r.length!==1)return;const[s]=r;if(!D.has(s.type))return;const[d,k]=n;c(n).kind===C.Image?l([{color:"#44BB0022",range:{x:d,y:k,width:1,height:1}}]):l([])},[c]),T=o.useCallback(()=>{l([])},[]);return e(b,{title:"Drop events",description:g(h,{children:[g(L,{children:["You can drag and drop into cells by using ",e(u,{children:"onDragOverCell"})," and"," ",e(u,{children:"onDrop"}),"."]}),e("div",{children:m===void 0?e(f,{children:"Nothing dropped, yet"}):e(h,{children:g(f,{children:["You last dropped in cell ",e(u,{children:JSON.stringify(m)})]})})})]}),children:e(M,{...N,getCellContent:c,columns:a,onCellEdited:p,onColumnResize:P,rows:1e3,onDrop:S,onDragOverCell:I,onDragLeave:T,highlightRegions:E,rowMarkers:"none"})})};var v,R,y;i.parameters={...i.parameters,docs:{...(v=i.parameters)==null?void 0:v.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/fill-handle.stories-9STJPbh-.js b/docs/assets/fill-handle.stories-WE6EdeGj.js similarity index 88% rename from docs/assets/fill-handle.stories-9STJPbh-.js rename to docs/assets/fill-handle.stories-WE6EdeGj.js index 7b2c9f6e4..c14f639d5 100644 --- a/docs/assets/fill-handle.stories-9STJPbh-.js +++ b/docs/assets/fill-handle.stories-WE6EdeGj.js @@ -1,4 +1,4 @@ -import{j as t,a as c,F as f}from"./marked.esm-dbrxtycE.js";import{R as s}from"./index-BMVQvedj.js";import{D as h}from"./data-editor-all-2MtuC67g.js";import{B as k,D as b,M as D,P as F,u as M,c as v,d as y}from"./utils-J-I08TtD.js";import{G as E}from"./image-window-loader-lKUISrIQ.js";import{S as G}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const J={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>t(G,{children:t(k,{title:"Fill handle",description:c(f,{children:[t(b,{children:"Fill handles can be used to downfill data with the mouse."}),c(D,{children:["Just click and drag, the top row will be copied down. Enable using the"," ",t(F,{children:"fillHandle"})," prop."]})]}),children:t(r,{})})})]},o=()=>{const{cols:r,getCellContent:n,setCellValueRaw:i,setCellValue:m}=M(60,!1),[a,w]=s.useState(50),C=s.useCallback(l=>{let e=n(l);return l[0]===1&&e.kind===E.Text&&(e={...e,readonly:!0}),e},[n]),R=s.useCallback(()=>{const l=a;for(let e=0;e<6;e++){const g=n([e,l]);i([e,l],v(g))}w(e=>e+1)},[n,a,i]);return t(h,{...y,getCellContent:C,columns:r,rowMarkers:"both",onPaste:!0,fillHandle:!0,keybindings:{downFill:!0,rightFill:!0},onCellEdited:m,trailingRowOptions:{sticky:!0,tint:!0,hint:"New row..."},rows:a,onRowAppended:R})};var d,u,p;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`() => { +import{j as t,a as c,F as f}from"./marked.esm-dbrxtycE.js";import{R as s}from"./index-BMVQvedj.js";import{D as h}from"./data-editor-all-MRDpHEQ_.js";import{B as k,D as b,M as D,P as F,u as M,c as v,d as y}from"./utils-0sbaJdQp.js";import{G as E}from"./image-window-loader-aCHQvgUN.js";import{S as G}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const J={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>t(G,{children:t(k,{title:"Fill handle",description:c(f,{children:[t(b,{children:"Fill handles can be used to downfill data with the mouse."}),c(D,{children:["Just click and drag, the top row will be copied down. Enable using the"," ",t(F,{children:"fillHandle"})," prop."]})]}),children:t(r,{})})})]},o=()=>{const{cols:r,getCellContent:n,setCellValueRaw:i,setCellValue:m}=M(60,!1),[a,w]=s.useState(50),C=s.useCallback(l=>{let e=n(l);return l[0]===1&&e.kind===E.Text&&(e={...e,readonly:!0}),e},[n]),R=s.useCallback(()=>{const l=a;for(let e=0;e<6;e++){const g=n([e,l]);i([e,l],v(g))}w(e=>e+1)},[n,a,i]);return t(h,{...y,getCellContent:C,columns:r,rowMarkers:"both",onPaste:!0,fillHandle:!0,keybindings:{downFill:!0,rightFill:!0},onCellEdited:m,trailingRowOptions:{sticky:!0,tint:!0,hint:"New row..."},rows:a,onRowAppended:R})};var d,u,p;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/freeze-columns.stories-VUOxlg1v.js b/docs/assets/freeze-columns.stories-J-JtQz55.js similarity index 77% rename from docs/assets/freeze-columns.stories-VUOxlg1v.js rename to docs/assets/freeze-columns.stories-J-JtQz55.js index 4aa6ba32e..2e279ad6a 100644 --- a/docs/assets/freeze-columns.stories-VUOxlg1v.js +++ b/docs/assets/freeze-columns.stories-J-JtQz55.js @@ -1,4 +1,4 @@ -import{j as r,a as m}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as i}from"./data-editor-all-2MtuC67g.js";import{B as p,D as c,P as u,u as d,d as f}from"./utils-J-I08TtD.js";import{S as C}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>r(C,{children:r(p,{title:"Freeze columns",description:m(c,{children:["Columns at the start of your grid can be frozen in place by settings"," ",r(u,{children:"freezeColumns"})," to a number greater than 0."]}),children:r(o,{})})})]},e=o=>{const{cols:n,getCellContent:l}=d(100);return r(i,{...f,rowMarkers:"both",freezeColumns:o.freezeColumns,getCellContent:l,columns:n,verticalBorder:!1,rows:1e3})};e.argTypes={freezeColumns:{control:{type:"range",min:0,max:10}}};e.args={freezeColumns:1};var t,s,a;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`(p: { +import{j as r,a as m}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as i}from"./data-editor-all-MRDpHEQ_.js";import{B as p,D as c,P as u,u as d,d as f}from"./utils-0sbaJdQp.js";import{S as C}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>r(C,{children:r(p,{title:"Freeze columns",description:m(c,{children:["Columns at the start of your grid can be frozen in place by settings"," ",r(u,{children:"freezeColumns"})," to a number greater than 0."]}),children:r(o,{})})})]},e=o=>{const{cols:n,getCellContent:l}=d(100);return r(i,{...f,rowMarkers:"both",freezeColumns:o.freezeColumns,getCellContent:l,columns:n,verticalBorder:!1,rows:1e3})};e.argTypes={freezeColumns:{control:{type:"range",min:0,max:10}}};e.args={freezeColumns:1};var t,s,a;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`(p: { freezeColumns: number; }) => { const { diff --git a/docs/assets/freeze-rows.stories-XdchxYD_.js b/docs/assets/freeze-rows.stories-jRff6kph.js similarity index 88% rename from docs/assets/freeze-rows.stories-XdchxYD_.js rename to docs/assets/freeze-rows.stories-jRff6kph.js index 39e9a46bb..a55f86a43 100644 --- a/docs/assets/freeze-rows.stories-XdchxYD_.js +++ b/docs/assets/freeze-rows.stories-jRff6kph.js @@ -1,4 +1,4 @@ -import{j as t,F as h}from"./marked.esm-dbrxtycE.js";import{R as c}from"./index-BMVQvedj.js";import{D as C}from"./data-editor-all-2MtuC67g.js";import{B as g,D as f,u as k,c as D,d as S}from"./utils-J-I08TtD.js";import{S as z}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const _={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>t(z,{children:t(g,{title:"Freeze rows",description:t(h,{children:t(f,{children:"Rows can be frozen to make sure the user always sees them."})}),children:t(o,{})})})]},r=()=>{const{cols:o,getCellContent:n,setCellValueRaw:l,setCellValue:m}=k(60,!1),[s,p]=c.useState(50),d=c.useCallback(()=>{const a=s;for(let e=0;ee+1)},[o.length,n,s,l]);return t(C,{...S,getCellContent:n,columns:o,rowMarkers:"both",freezeTrailingRows:2,experimental:{kineticScrollPerfHack:!0},onPaste:!0,onCellEdited:m,trailingRowOptions:{sticky:!0,tint:!0,hint:"New row..."},rows:s,onRowAppended:d})};var i,u,w;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`() => { +import{j as t,F as h}from"./marked.esm-dbrxtycE.js";import{R as c}from"./index-BMVQvedj.js";import{D as C}from"./data-editor-all-MRDpHEQ_.js";import{B as g,D as f,u as k,c as D,d as S}from"./utils-0sbaJdQp.js";import{S as z}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const _={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>t(z,{children:t(g,{title:"Freeze rows",description:t(h,{children:t(f,{children:"Rows can be frozen to make sure the user always sees them."})}),children:t(o,{})})})]},r=()=>{const{cols:o,getCellContent:n,setCellValueRaw:l,setCellValue:m}=k(60,!1),[s,p]=c.useState(50),d=c.useCallback(()=>{const a=s;for(let e=0;ee+1)},[o.length,n,s,l]);return t(C,{...S,getCellContent:n,columns:o,rowMarkers:"both",freezeTrailingRows:2,experimental:{kineticScrollPerfHack:!0},onPaste:!0,onCellEdited:m,trailingRowOptions:{sticky:!0,tint:!0,hint:"New row..."},rows:s,onRowAppended:d})};var i,u,w;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/header-menus.stories-Qqydxr2n.js b/docs/assets/header-menus.stories-UgKhKI_h.js similarity index 93% rename from docs/assets/header-menus.stories-Qqydxr2n.js rename to docs/assets/header-menus.stories-UgKhKI_h.js index 479903a8c..4124501f6 100644 --- a/docs/assets/header-menus.stories-Qqydxr2n.js +++ b/docs/assets/header-menus.stories-UgKhKI_h.js @@ -1,4 +1,4 @@ -import{j as n,F as p,a as l,s as y}from"./marked.esm-dbrxtycE.js";import{R as d}from"./index-BMVQvedj.js";import{u as H}from"./react-laag.esm-PpDllAFI.js";import{D as x}from"./data-editor-all-2MtuC67g.js";import{B as O,D as w,P as D,a as R,d as S}from"./utils-J-I08TtD.js";import{S as A}from"./story-utils-K2EZnGjM.js";import"./index-wocATsGp.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";const J={title:"Glide-Data-Grid/DataEditor Demos",decorators:[s=>n(A,{children:n(O,{title:"Header menus",description:n(p,{children:l(w,{children:["Headers on the data grid can be configured to support menus. We provide the events and the menu icon, you provide the menu. The menu icon can be modified via the"," ",n(D,{children:"menuIcon"})," prop."]})}),children:n(s,{})})})]},I=y("div")({name:"SimpleMenu",class:"s7szcfi",propsAsIs:!1}),i=()=>{const{cols:s,getCellContent:h,onColumnResize:C,setCellValue:g}=R(),f=d.useMemo(()=>s.map((t,r)=>r===2?{...t,hasMenu:!0,menuIcon:"dots",overlayIcon:"rowOwnerOverlay"}:r===3?{...t,hasMenu:!0,menuIcon:"headerUri"}:{...t,hasMenu:!0}),[s]),[e,o]=d.useState(),a=e!==void 0,{layerProps:b,renderLayer:M}=H({isOpen:a,auto:!0,placement:"bottom-end",triggerOffset:2,onOutsideClick:()=>o(void 0),trigger:{getBounds:()=>({left:(e==null?void 0:e.bounds.x)??0,top:(e==null?void 0:e.bounds.y)??0,width:(e==null?void 0:e.bounds.width)??0,height:(e==null?void 0:e.bounds.height)??0,right:((e==null?void 0:e.bounds.x)??0)+((e==null?void 0:e.bounds.width)??0),bottom:((e==null?void 0:e.bounds.y)??0)+((e==null?void 0:e.bounds.height)??0)})}}),v=d.useCallback((t,r)=>{o({col:t,bounds:r})},[]),k=d.useCallback(()=>{console.log("Header clicked")},[]);return l(p,{children:[n(x,{...S,getCellContent:h,onHeaderMenuClick:v,onHeaderClicked:k,columns:f,onCellContextMenu:(t,r)=>r.preventDefault(),onCellEdited:g,onColumnResize:C,rows:1e3}),a&&M(l(I,{...b,children:[n("div",{onClick:()=>o(void 0),children:"These do nothing"}),n("div",{onClick:()=>o(void 0),children:"Add column right"}),n("div",{onClick:()=>o(void 0),children:"Add column left"}),n("div",{className:"danger",onClick:()=>o(void 0),children:"Delete"})]}))]})};var u,c,m;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:`() => { +import{j as n,F as p,a as l,s as y}from"./marked.esm-dbrxtycE.js";import{R as d}from"./index-BMVQvedj.js";import{u as H}from"./react-laag.esm-PpDllAFI.js";import{D as x}from"./data-editor-all-MRDpHEQ_.js";import{B as O,D as w,P as D,a as R,d as S}from"./utils-0sbaJdQp.js";import{S as A}from"./story-utils-K2EZnGjM.js";import"./index-wocATsGp.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";const J={title:"Glide-Data-Grid/DataEditor Demos",decorators:[s=>n(A,{children:n(O,{title:"Header menus",description:n(p,{children:l(w,{children:["Headers on the data grid can be configured to support menus. We provide the events and the menu icon, you provide the menu. The menu icon can be modified via the"," ",n(D,{children:"menuIcon"})," prop."]})}),children:n(s,{})})})]},I=y("div")({name:"SimpleMenu",class:"s7szcfi",propsAsIs:!1}),i=()=>{const{cols:s,getCellContent:h,onColumnResize:C,setCellValue:g}=R(),f=d.useMemo(()=>s.map((t,r)=>r===2?{...t,hasMenu:!0,menuIcon:"dots",overlayIcon:"rowOwnerOverlay"}:r===3?{...t,hasMenu:!0,menuIcon:"headerUri"}:{...t,hasMenu:!0}),[s]),[e,o]=d.useState(),a=e!==void 0,{layerProps:b,renderLayer:M}=H({isOpen:a,auto:!0,placement:"bottom-end",triggerOffset:2,onOutsideClick:()=>o(void 0),trigger:{getBounds:()=>({left:(e==null?void 0:e.bounds.x)??0,top:(e==null?void 0:e.bounds.y)??0,width:(e==null?void 0:e.bounds.width)??0,height:(e==null?void 0:e.bounds.height)??0,right:((e==null?void 0:e.bounds.x)??0)+((e==null?void 0:e.bounds.width)??0),bottom:((e==null?void 0:e.bounds.y)??0)+((e==null?void 0:e.bounds.height)??0)})}}),v=d.useCallback((t,r)=>{o({col:t,bounds:r})},[]),k=d.useCallback(()=>{console.log("Header clicked")},[]);return l(p,{children:[n(x,{...S,getCellContent:h,onHeaderMenuClick:v,onHeaderClicked:k,columns:f,onCellContextMenu:(t,r)=>r.preventDefault(),onCellEdited:g,onColumnResize:C,rows:1e3}),a&&M(l(I,{...b,children:[n("div",{onClick:()=>o(void 0),children:"These do nothing"}),n("div",{onClick:()=>o(void 0),children:"Add column right"}),n("div",{onClick:()=>o(void 0),children:"Add column left"}),n("div",{className:"danger",onClick:()=>o(void 0),children:"Delete"})]}))]})};var u,c,m;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/highlight-cells.stories-Dz0ASx6n.js b/docs/assets/highlight-cells.stories-L3aFgQ0D.js similarity index 87% rename from docs/assets/highlight-cells.stories-Dz0ASx6n.js rename to docs/assets/highlight-cells.stories-L3aFgQ0D.js index 3f7ce0e8f..94ed799c1 100644 --- a/docs/assets/highlight-cells.stories-Dz0ASx6n.js +++ b/docs/assets/highlight-cells.stories-L3aFgQ0D.js @@ -1,4 +1,4 @@ -import{j as e,a as p}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-2MtuC67g.js";import{B as S,D as C,P as f,u as w,d as D}from"./utils-J-I08TtD.js";import{C as s}from"./image-window-loader-lKUISrIQ.js";import{S as y}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const W={title:"Glide-Data-Grid/DataEditor Demos",decorators:[n=>e(y,{children:e(S,{title:"HighlightCells",description:p(C,{children:["The ",e(f,{children:"highlightRegions"})," prop can be set to provide additional hinting or context for the current selection."]}),children:e(n,{})})})]},r=()=>{const{cols:n,getCellContent:d}=w(100),[t,g]=l.useState({columns:s.empty(),rows:s.empty()}),m=l.useMemo(()=>{if(t.current===void 0)return;const[o,i]=t.current.cell;return[{color:"#44BB0022",range:{x:o+2,y:i,width:10,height:10},style:"solid"},{color:"#b000b021",range:{x:o,y:i+2,width:1,height:1}}]},[t]);return e(u,{...D,rowMarkers:"both",freezeColumns:1,highlightRegions:m,gridSelection:t,onGridSelectionChange:g,getCellContent:d,columns:n,verticalBorder:o=>o>0,rows:1e3})};var c,a,h;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`() => { +import{j as e,a as p}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-MRDpHEQ_.js";import{B as S,D as C,P as f,u as w,d as D}from"./utils-0sbaJdQp.js";import{C as s}from"./image-window-loader-aCHQvgUN.js";import{S as y}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const W={title:"Glide-Data-Grid/DataEditor Demos",decorators:[n=>e(y,{children:e(S,{title:"HighlightCells",description:p(C,{children:["The ",e(f,{children:"highlightRegions"})," prop can be set to provide additional hinting or context for the current selection."]}),children:e(n,{})})})]},r=()=>{const{cols:n,getCellContent:d}=w(100),[t,g]=l.useState({columns:s.empty(),rows:s.empty()}),m=l.useMemo(()=>{if(t.current===void 0)return;const[o,i]=t.current.cell;return[{color:"#44BB0022",range:{x:o+2,y:i,width:10,height:10},style:"solid"},{color:"#b000b021",range:{x:o,y:i+2,width:1,height:1}}]},[t]);return e(u,{...D,rowMarkers:"both",freezeColumns:1,highlightRegions:m,gridSelection:t,onGridSelectionChange:g,getCellContent:d,columns:n,verticalBorder:o=>o>0,rows:1e3})};var c,a,h;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/iframe-9FFu--7X.js b/docs/assets/iframe-9FFu--7X.js deleted file mode 100644 index a8edb4ff0..000000000 --- a/docs/assets/iframe-9FFu--7X.js +++ /dev/null @@ -1,7 +0,0 @@ -import"../sb-preview/runtime.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))_(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const t of s.addedNodes)t.tagName==="LINK"&&t.rel==="modulepreload"&&_(t)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function _(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();const u="modulepreload",E=function(a,o){return new URL(a,o).href},n={},e=function(o,i,_){if(!i||i.length===0)return o();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=E(s,_),s in n)return;n[s]=!0;const t=s.endsWith(".css"),d=t?'[rel="stylesheet"]':"";if(!!_)for(let m=r.length-1;m>=0;m--){const p=r[m];if(p.href===s&&(!t||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${d}`))return;const c=document.createElement("link");if(c.rel=t?"stylesheet":u,t||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),t)return new Promise((m,p)=>{c.addEventListener("load",m),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>o()).catch(s=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=s,window.dispatchEvent(t),!t.defaultPrevented)throw s})},{createBrowserChannel:x}=__STORYBOOK_MODULE_CHANNELS__,{addons:O}=__STORYBOOK_MODULE_PREVIEW_API__,l=x({page:"preview"});O.setChannel(l);window.__STORYBOOK_ADDONS_CHANNEL__=l;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=l);const g={"./packages/cells/src/cell.stories.tsx":async()=>e(()=>import("./cell.stories-_lJbBWx1.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx":async()=>e(()=>import("./data-editor-repros.stories-2Sx4xcGK.js"),__vite__mapDeps([11,1,2,12,13,14,4,5,15,16,6,17,18,19,20]),import.meta.url),"./packages/core/src/data-editor/stories/data-editor.stories.tsx":async()=>e(()=>import("./data-editor.stories-ge0BK-7S.js"),__vite__mapDeps([21,1,2,12,13,14,4,5,15,16,6,17,18,19]),import.meta.url),"./packages/core/src/docs/00-faq.stories.tsx":async()=>e(()=>import("./00-faq.stories-PKS7OADQ.js"),__vite__mapDeps([22,1,2,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/01-getting-started.stories.tsx":async()=>e(()=>import("./01-getting-started.stories-SKo_ladM.js"),__vite__mapDeps([25,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/02-editing-data.stories.tsx":async()=>e(()=>import("./02-editing-data.stories-PvpM_AMz.js"),__vite__mapDeps([26,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/03-grid-column.stories.tsx":async()=>e(()=>import("./03-grid-column.stories-DbEHOMDm.js"),__vite__mapDeps([27,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/04-streaming-data.stories.tsx":async()=>e(()=>import("./04-streaming-data.stories-j11zorLW.js"),__vite__mapDeps([28,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/06-search.stories.tsx":async()=>e(()=>import("./06-search.stories-1I9KmDgu.js"),__vite__mapDeps([29,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/07-column-grouping.stories.tsx":async()=>e(()=>import("./07-column-grouping.stories-ohXMXwJK.js"),__vite__mapDeps([30,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/08-theming.stories.tsx":async()=>e(()=>import("./08-theming.stories-AEh-daJ9.js"),__vite__mapDeps([31,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/09-menus.stories.tsx":async()=>e(()=>import("./09-menus.stories-AlLtaAqR.js"),__vite__mapDeps([32,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24,33,8]),import.meta.url),"./packages/core/src/docs/examples/add-column.stories.tsx":async()=>e(()=>import("./add-column.stories-scy9jOqX.js"),__vite__mapDeps([34,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/add-data-to-middle.stories.tsx":async()=>e(()=>import("./add-data-to-middle.stories-ysWJkolO.js"),__vite__mapDeps([38,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/add-data-to-top.stories.tsx":async()=>e(()=>import("./add-data-to-top.stories-yPyeuJec.js"),__vite__mapDeps([39,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/add-data.stories.tsx":async()=>e(()=>import("./add-data.stories-cLdvbjoj.js"),__vite__mapDeps([40,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/all-cell-kinds.stories.tsx":async()=>e(()=>import("./all-cell-kinds.stories-7gVCFxUQ.js"),__vite__mapDeps([41,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/append-row-handle.stories.tsx":async()=>e(()=>import("./append-row-handle.stories-07fu_RVb.js"),__vite__mapDeps([42,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/automatic-row-markers.stories.tsx":async()=>e(()=>import("./automatic-row-markers.stories-Y6l77uHg.js"),__vite__mapDeps([43,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/built-in-search.stories.tsx":async()=>e(()=>import("./built-in-search.stories-fmbphhmC.js"),__vite__mapDeps([44,1,2,14,4,5,15,16,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/cell-activated-event.stories.tsx":async()=>e(()=>import("./cell-activated-event.stories-Q5YF9u9g.js"),__vite__mapDeps([45,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/column-group-collapse.stories.tsx":async()=>e(()=>import("./column-group-collapse.stories-nex3LHlI.js"),__vite__mapDeps([46,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/column-groups.stories.tsx":async()=>e(()=>import("./column-groups.stories-aUe7DIMw.js"),__vite__mapDeps([47,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/content-alignment.stories.tsx":async()=>e(()=>import("./content-alignment.stories-qyF38rSl.js"),__vite__mapDeps([48,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/controlled-search.stories.tsx":async()=>e(()=>import("./controlled-search.stories-6CGqo4sD.js"),__vite__mapDeps([49,1,2,14,4,5,15,16,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/controlled-selection.stories.tsx":async()=>e(()=>import("./controlled-selection.stories-nB36Tesw.js"),__vite__mapDeps([50,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/copy-support.stories.tsx":async()=>e(()=>import("./copy-support.stories-gQT8odop.js"),__vite__mapDeps([51,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/custom-header-icons.stories.tsx":async()=>e(()=>import("./custom-header-icons.stories-1obFr94u.js"),__vite__mapDeps([52,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/custom-header.stories.tsx":async()=>e(()=>import("./custom-header.stories-dT08SgHP.js"),__vite__mapDeps([53,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/drag-source.stories.tsx":async()=>e(()=>import("./drag-source.stories-Ky4JqS9t.js"),__vite__mapDeps([54,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/drop-events.stories.tsx":async()=>e(()=>import("./drop-events.stories-k5ZvAUD1.js"),__vite__mapDeps([55,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/fill-handle.stories.tsx":async()=>e(()=>import("./fill-handle.stories-9STJPbh-.js"),__vite__mapDeps([56,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/freeze-columns.stories.tsx":async()=>e(()=>import("./freeze-columns.stories-VUOxlg1v.js"),__vite__mapDeps([57,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/freeze-rows.stories.tsx":async()=>e(()=>import("./freeze-rows.stories-XdchxYD_.js"),__vite__mapDeps([58,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/header-menus.stories.tsx":async()=>e(()=>import("./header-menus.stories-Qqydxr2n.js"),__vite__mapDeps([59,1,2,33,8,16,14,4,5,15,6,17,18,19,35,36,9,37,12,13,60]),import.meta.url),"./packages/core/src/docs/examples/highlight-cells.stories.tsx":async()=>e(()=>import("./highlight-cells.stories-Dz0ASx6n.js"),__vite__mapDeps([61,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/imperative-scroll.stories.tsx":async()=>e(()=>import("./imperative-scroll.stories-CLwyRI6H.js"),__vite__mapDeps([62,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/input-blending.stories.tsx":async()=>e(()=>import("./input-blending.stories-2pQxJpu-.js"),__vite__mapDeps([63,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/keybindings.stories.tsx":async()=>e(()=>import("./keybindings.stories-HbuiDWAA.js"),__vite__mapDeps([64,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/layout-integration.stories.tsx":async()=>e(()=>import("./layout-integration.stories-AGiGwCTK.js"),__vite__mapDeps([65,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/multi-select-columns.stories.tsx":async()=>e(()=>import("./multi-select-columns.stories-TzyZLAaG.js"),__vite__mapDeps([66,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/new-column-button.stories.tsx":async()=>e(()=>import("./new-column-button.stories-p9Gyngt9.js"),__vite__mapDeps([67,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/obscured-grid.stories.tsx":async()=>e(()=>import("./obscured-grid.stories-W_2SPJ8f.js"),__vite__mapDeps([68,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/observe-visible-region.stories.tsx":async()=>e(()=>import("./observe-visible-region.stories-4OA01Cgv.js"),__vite__mapDeps([69,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/one-hundred-thousand-columns.stories.tsx":async()=>e(()=>import("./one-hundred-thousand-columns.stories-OOMFzqtX.js"),__vite__mapDeps([70,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/one-million-rows.stories.tsx":async()=>e(()=>import("./one-million-rows.stories-_N8HpAmg.js"),__vite__mapDeps([71,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/overscroll.stories.tsx":async()=>e(()=>import("./overscroll.stories-wl5Dnic2.js"),__vite__mapDeps([72,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/padding.stories.tsx":async()=>e(()=>import("./padding.stories-2UoDigf3.js"),__vite__mapDeps([73,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/paste-support.stories.tsx":async()=>e(()=>import("./paste-support.stories-lDgwj2aN.js"),__vite__mapDeps([74,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/prevent-diagonal-scroll.stories.tsx":async()=>e(()=>import("./prevent-diagonal-scroll.stories-l2qFKd-I.js"),__vite__mapDeps([75,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/rapid-updates.stories.tsx":async()=>e(()=>import("./rapid-updates.stories-NR0W4vvJ.js"),__vite__mapDeps([76,1,2,35,14,4,5,15,36,9,8,6,37,12,13,16,17,18,19]),import.meta.url),"./packages/core/src/docs/examples/rearrange-columns.stories.tsx":async()=>e(()=>import("./rearrange-columns.stories-xC_BDMtK.js"),__vite__mapDeps([77,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/reorder-rows.stories.tsx":async()=>e(()=>import("./reorder-rows.stories-QuXMn7SV.js"),__vite__mapDeps([78,1,2,79,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/resizable-columns.stories.tsx":async()=>e(()=>import("./resizable-columns.stories-gzi2qzMf.js"),__vite__mapDeps([80,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/right-element.stories.tsx":async()=>e(()=>import("./right-element.stories-WEHYhkbP.js"),__vite__mapDeps([81,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/right-to-left.stories.tsx":async()=>e(()=>import("./right-to-left.stories-hSGpRnuv.js"),__vite__mapDeps([82,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/row-and-header-sizes.stories.tsx":async()=>e(()=>import("./row-and-header-sizes.stories-s2x0F9ko.js"),__vite__mapDeps([83,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/row-grouping.stories.tsx":async()=>e(()=>import("./row-grouping.stories-tlVFyJNB.js"),__vite__mapDeps([84,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13,79]),import.meta.url),"./packages/core/src/docs/examples/row-hover.stories.tsx":async()=>e(()=>import("./row-hover.stories-JzHt7fep.js"),__vite__mapDeps([85,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/row-markers.stories.tsx":async()=>e(()=>import("./row-markers.stories-4ulqVo5Y.js"),__vite__mapDeps([86,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/scaled-view.stories.tsx":async()=>e(()=>import("./scaled-view.stories-hV1ZL-mi.js"),__vite__mapDeps([87,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/scroll-shadows.stories.tsx":async()=>e(()=>import("./scroll-shadows.stories-5iBuHYZ-.js"),__vite__mapDeps([88,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/search-as-filter.stories.tsx":async()=>e(()=>import("./search-as-filter.stories-LfFO3nKd.js"),__vite__mapDeps([89,1,2,14,4,5,15,16,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/server-side-data.stories.tsx":async()=>e(()=>import("./server-side-data.stories-CI1jdhkZ.js"),__vite__mapDeps([90,1,2,14,4,5,15,12,13,16,6,17,18,19,35,36,9,8,37,23,7,24]),import.meta.url),"./packages/core/src/docs/examples/shadow-dom.stories.tsx":async()=>e(()=>import("./shadow-dom.stories-vyFIqB76.js"),__vite__mapDeps([91,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/silly-numbers.stories.tsx":async()=>e(()=>import("./silly-numbers.stories-GnfGtfvN.js"),__vite__mapDeps([92,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/small-editable-grid.stories.tsx":async()=>e(()=>import("./small-editable-grid.stories-2qea8rUB.js"),__vite__mapDeps([93,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/smooth-scrolling-grid.stories.tsx":async()=>e(()=>import("./smooth-scrolling-grid.stories-ZWoFIk8K.js"),__vite__mapDeps([94,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/span-cell.stories.tsx":async()=>e(()=>import("./span-cell.stories-eP9-BiLg.js"),__vite__mapDeps([95,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/stretch-column-size.stories.tsx":async()=>e(()=>import("./stretch-column-size.stories-hkXq64O3.js"),__vite__mapDeps([96,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/ten-million-cells.stories.tsx":async()=>e(()=>import("./ten-million-cells.stories-aaiU02Kg.js"),__vite__mapDeps([97,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/theme-per-column.stories.tsx":async()=>e(()=>import("./theme-per-column.stories-qUNsVCr0.js"),__vite__mapDeps([98,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/theme-per-row.stories.tsx":async()=>e(()=>import("./theme-per-row.stories-I5xPHUWV.js"),__vite__mapDeps([99,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/theme-support.stories.tsx":async()=>e(()=>import("./theme-support.stories-u5nvLSwt.js"),__vite__mapDeps([100,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/tooltips.stories.tsx":async()=>e(()=>import("./tooltips.stories-IlfllE36.js"),__vite__mapDeps([101,1,2,33,8,16,14,4,5,15,6,17,18,19,35,36,9,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/trailing-row-options.stories.tsx":async()=>e(()=>import("./trailing-row-options.stories-_XbReORf.js"),__vite__mapDeps([102,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/uneven-rows.stories.tsx":async()=>e(()=>import("./uneven-rows.stories-kSeFYGod.js"),__vite__mapDeps([103,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/validate-data.stories.tsx":async()=>e(()=>import("./validate-data.stories--x3VbZTz.js"),__vite__mapDeps([104,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/wrapping-text.stories.tsx":async()=>e(()=>import("./wrapping-text.stories-KghQhCY5.js"),__vite__mapDeps([105,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/internal/data-grid/data-grid.stories.tsx":async()=>e(()=>import("./data-grid.stories-m1tO0wrE.js"),__vite__mapDeps([106,1,2,12,13,14,4,5,15]),import.meta.url),"./packages/core/src/internal/scrolling-data-grid/scrolling-data-grid.stories.tsx":async()=>e(()=>import("./scrolling-data-grid.stories-TZdKGTtc.js"),__vite__mapDeps([107,1,2,12,13,17,4,5,14,15,18,108]),import.meta.url),"./packages/source/src/stories/use-data-source.stories.tsx":async()=>e(()=>import("./use-data-source.stories-_zu2oKfn.js"),__vite__mapDeps([109,1,2,9,8,36,5,3,4,6,110]),import.meta.url)};async function R(a){return g[a]()}const{composeConfigs:v,PreviewWeb:P,ClientApi:T}=__STORYBOOK_MODULE_PREVIEW_API__,y=async()=>{const a=await Promise.all([e(()=>import("./entry-preview-rD48AoDU.js"),__vite__mapDeps([111,2,8]),import.meta.url),e(()=>import("./entry-preview-docs-TnItVWWf.js"),__vite__mapDeps([112,2,5]),import.meta.url),e(()=>import("./preview-z4T7Lhw3.js"),__vite__mapDeps([]),import.meta.url)]);return v(a)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new P;window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;window.__STORYBOOK_CLIENT_API__=window.__STORYBOOK_CLIENT_API__||new T({storyStore:window.__STORYBOOK_PREVIEW__.storyStore});window.__STORYBOOK_PREVIEW__.initialize({importFn:R,getProjectAnnotations:y});export{e as _}; -function __vite__mapDeps(indexes) { - if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./cell.stories-_lJbBWx1.js","./marked.esm-dbrxtycE.js","./index-BMVQvedj.js","./data-editor-all-T-OiWfdB.js","./throttle-7EuXLZa7.js","./_baseIteratee-WTHxv43n.js","./flatten-qRvRBp6y.js","./toConsumableArray-ppDpjNRJ.js","./index-wocATsGp.js","./index.esm-Ejw8GwRl.js","./cell-hbkxrWJd.css","./data-editor-repros.stories-2Sx4xcGK.js","./story-utils-K2EZnGjM.js","./story-utils-P19cgLKl.css","./image-window-loader-lKUISrIQ.js","./image-window-loader-1jHxuE_X.css","./data-editor-all-2MtuC67g.js","./scrolling-data-grid-19OhoR-o.js","./scrolling-data-grid-dE2iz8sf.css","./data-editor-all-n_zxn1vv.css","./data-editor-repros-3oka-WZT.css","./data-editor.stories-ge0BK-7S.js","./00-faq.stories-PKS7OADQ.js","./doc-wrapper-m1-LpzDL.js","./doc-wrapper-WI-RO4K9.css","./01-getting-started.stories-SKo_ladM.js","./02-editing-data.stories-PvpM_AMz.js","./03-grid-column.stories-DbEHOMDm.js","./04-streaming-data.stories-j11zorLW.js","./06-search.stories-1I9KmDgu.js","./07-column-grouping.stories-ohXMXwJK.js","./08-theming.stories-AEh-daJ9.js","./09-menus.stories-AlLtaAqR.js","./react-laag.esm-PpDllAFI.js","./add-column.stories-scy9jOqX.js","./utils-J-I08TtD.js","./index-PWBWJyi_.js","./utils-ybqXy1Bp.css","./add-data-to-middle.stories-ysWJkolO.js","./add-data-to-top.stories-yPyeuJec.js","./add-data.stories-cLdvbjoj.js","./all-cell-kinds.stories-7gVCFxUQ.js","./append-row-handle.stories-07fu_RVb.js","./automatic-row-markers.stories-Y6l77uHg.js","./built-in-search.stories-fmbphhmC.js","./cell-activated-event.stories-Q5YF9u9g.js","./column-group-collapse.stories-nex3LHlI.js","./column-groups.stories-aUe7DIMw.js","./content-alignment.stories-qyF38rSl.js","./controlled-search.stories-6CGqo4sD.js","./controlled-selection.stories-nB36Tesw.js","./copy-support.stories-gQT8odop.js","./custom-header-icons.stories-1obFr94u.js","./custom-header.stories-dT08SgHP.js","./drag-source.stories-Ky4JqS9t.js","./drop-events.stories-k5ZvAUD1.js","./fill-handle.stories-9STJPbh-.js","./freeze-columns.stories-VUOxlg1v.js","./freeze-rows.stories-XdchxYD_.js","./header-menus.stories-Qqydxr2n.js","./header-menus-N_BOUD_t.css","./highlight-cells.stories-Dz0ASx6n.js","./imperative-scroll.stories-CLwyRI6H.js","./input-blending.stories-2pQxJpu-.js","./keybindings.stories-HbuiDWAA.js","./layout-integration.stories-AGiGwCTK.js","./multi-select-columns.stories-TzyZLAaG.js","./new-column-button.stories-p9Gyngt9.js","./obscured-grid.stories-W_2SPJ8f.js","./observe-visible-region.stories-4OA01Cgv.js","./one-hundred-thousand-columns.stories-OOMFzqtX.js","./one-million-rows.stories-_N8HpAmg.js","./overscroll.stories-wl5Dnic2.js","./padding.stories-2UoDigf3.js","./paste-support.stories-lDgwj2aN.js","./prevent-diagonal-scroll.stories-l2qFKd-I.js","./rapid-updates.stories-NR0W4vvJ.js","./rearrange-columns.stories-xC_BDMtK.js","./reorder-rows.stories-QuXMn7SV.js","./lodash-8jIGfDyZ.js","./resizable-columns.stories-gzi2qzMf.js","./right-element.stories-WEHYhkbP.js","./right-to-left.stories-hSGpRnuv.js","./row-and-header-sizes.stories-s2x0F9ko.js","./row-grouping.stories-tlVFyJNB.js","./row-hover.stories-JzHt7fep.js","./row-markers.stories-4ulqVo5Y.js","./scaled-view.stories-hV1ZL-mi.js","./scroll-shadows.stories-5iBuHYZ-.js","./search-as-filter.stories-LfFO3nKd.js","./server-side-data.stories-CI1jdhkZ.js","./shadow-dom.stories-vyFIqB76.js","./silly-numbers.stories-GnfGtfvN.js","./small-editable-grid.stories-2qea8rUB.js","./smooth-scrolling-grid.stories-ZWoFIk8K.js","./span-cell.stories-eP9-BiLg.js","./stretch-column-size.stories-hkXq64O3.js","./ten-million-cells.stories-aaiU02Kg.js","./theme-per-column.stories-qUNsVCr0.js","./theme-per-row.stories-I5xPHUWV.js","./theme-support.stories-u5nvLSwt.js","./tooltips.stories-IlfllE36.js","./trailing-row-options.stories-_XbReORf.js","./uneven-rows.stories-kSeFYGod.js","./validate-data.stories--x3VbZTz.js","./wrapping-text.stories-KghQhCY5.js","./data-grid.stories-m1tO0wrE.js","./scrolling-data-grid.stories-TZdKGTtc.js","./scrolling-data-grid-OMNPNZ5X.css","./use-data-source.stories-_zu2oKfn.js","./use-data-source-ruk7orBA.css","./entry-preview-rD48AoDU.js","./entry-preview-docs-TnItVWWf.js"] - } - return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -} \ No newline at end of file diff --git a/docs/assets/iframe-MICdw5w5.js b/docs/assets/iframe-MICdw5w5.js new file mode 100644 index 000000000..6243f739f --- /dev/null +++ b/docs/assets/iframe-MICdw5w5.js @@ -0,0 +1,7 @@ +import"../sb-preview/runtime.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))_(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const t of s.addedNodes)t.tagName==="LINK"&&t.rel==="modulepreload"&&_(t)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function _(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();const u="modulepreload",E=function(a,o){return new URL(a,o).href},n={},e=function(o,i,_){if(!i||i.length===0)return o();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=E(s,_),s in n)return;n[s]=!0;const t=s.endsWith(".css"),d=t?'[rel="stylesheet"]':"";if(!!_)for(let m=r.length-1;m>=0;m--){const p=r[m];if(p.href===s&&(!t||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${d}`))return;const c=document.createElement("link");if(c.rel=t?"stylesheet":u,t||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),t)return new Promise((m,p)=>{c.addEventListener("load",m),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>o()).catch(s=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=s,window.dispatchEvent(t),!t.defaultPrevented)throw s})},{createBrowserChannel:x}=__STORYBOOK_MODULE_CHANNELS__,{addons:O}=__STORYBOOK_MODULE_PREVIEW_API__,l=x({page:"preview"});O.setChannel(l);window.__STORYBOOK_ADDONS_CHANNEL__=l;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=l);const g={"./packages/cells/src/cell.stories.tsx":async()=>e(()=>import("./cell.stories-Ar45hIC9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx":async()=>e(()=>import("./data-editor-repros.stories-HT3RvUND.js"),__vite__mapDeps([11,1,2,12,13,14,4,5,15,16,6,17,18,19,20]),import.meta.url),"./packages/core/src/data-editor/stories/data-editor.stories.tsx":async()=>e(()=>import("./data-editor.stories-18boT4dm.js"),__vite__mapDeps([21,1,2,12,13,14,4,5,15,16,6,17,18,19]),import.meta.url),"./packages/core/src/docs/00-faq.stories.tsx":async()=>e(()=>import("./00-faq.stories-PKS7OADQ.js"),__vite__mapDeps([22,1,2,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/01-getting-started.stories.tsx":async()=>e(()=>import("./01-getting-started.stories-Lwq3bhsG.js"),__vite__mapDeps([25,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/02-editing-data.stories.tsx":async()=>e(()=>import("./02-editing-data.stories-uMNvuR4T.js"),__vite__mapDeps([26,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/03-grid-column.stories.tsx":async()=>e(()=>import("./03-grid-column.stories-ki_rf7c-.js"),__vite__mapDeps([27,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/04-streaming-data.stories.tsx":async()=>e(()=>import("./04-streaming-data.stories-FjbN6zdk.js"),__vite__mapDeps([28,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/06-search.stories.tsx":async()=>e(()=>import("./06-search.stories-SV1nFg-6.js"),__vite__mapDeps([29,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/07-column-grouping.stories.tsx":async()=>e(()=>import("./07-column-grouping.stories-KtsWGblh.js"),__vite__mapDeps([30,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/08-theming.stories.tsx":async()=>e(()=>import("./08-theming.stories-FgO0Jz0T.js"),__vite__mapDeps([31,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24]),import.meta.url),"./packages/core/src/docs/09-menus.stories.tsx":async()=>e(()=>import("./09-menus.stories-oEedqkBY.js"),__vite__mapDeps([32,1,2,14,4,5,15,16,6,17,18,19,12,13,23,7,24,33,8]),import.meta.url),"./packages/core/src/docs/examples/add-column.stories.tsx":async()=>e(()=>import("./add-column.stories-coHPOkoR.js"),__vite__mapDeps([34,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/add-data-to-middle.stories.tsx":async()=>e(()=>import("./add-data-to-middle.stories-CfzDpjdK.js"),__vite__mapDeps([38,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/add-data-to-top.stories.tsx":async()=>e(()=>import("./add-data-to-top.stories-dpZWH635.js"),__vite__mapDeps([39,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/add-data.stories.tsx":async()=>e(()=>import("./add-data.stories-14Dc9SRb.js"),__vite__mapDeps([40,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/all-cell-kinds.stories.tsx":async()=>e(()=>import("./all-cell-kinds.stories-fsQtSzKV.js"),__vite__mapDeps([41,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/append-row-handle.stories.tsx":async()=>e(()=>import("./append-row-handle.stories-YQyg-27A.js"),__vite__mapDeps([42,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/automatic-row-markers.stories.tsx":async()=>e(()=>import("./automatic-row-markers.stories-I-TgNR_X.js"),__vite__mapDeps([43,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/built-in-search.stories.tsx":async()=>e(()=>import("./built-in-search.stories-v39F_B-_.js"),__vite__mapDeps([44,1,2,14,4,5,15,16,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/cell-activated-event.stories.tsx":async()=>e(()=>import("./cell-activated-event.stories-QhCktdVw.js"),__vite__mapDeps([45,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/column-group-collapse.stories.tsx":async()=>e(()=>import("./column-group-collapse.stories-Acy8AFPO.js"),__vite__mapDeps([46,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/column-groups.stories.tsx":async()=>e(()=>import("./column-groups.stories-lpss0-Mz.js"),__vite__mapDeps([47,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/content-alignment.stories.tsx":async()=>e(()=>import("./content-alignment.stories--MNNaYaT.js"),__vite__mapDeps([48,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/controlled-search.stories.tsx":async()=>e(()=>import("./controlled-search.stories-b-OSRnqX.js"),__vite__mapDeps([49,1,2,14,4,5,15,16,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/controlled-selection.stories.tsx":async()=>e(()=>import("./controlled-selection.stories-Lx0jlMqX.js"),__vite__mapDeps([50,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/copy-support.stories.tsx":async()=>e(()=>import("./copy-support.stories-1uSBV0aF.js"),__vite__mapDeps([51,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/custom-header-icons.stories.tsx":async()=>e(()=>import("./custom-header-icons.stories-YLibh_hX.js"),__vite__mapDeps([52,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/custom-header.stories.tsx":async()=>e(()=>import("./custom-header.stories-vDuU60kQ.js"),__vite__mapDeps([53,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/drag-source.stories.tsx":async()=>e(()=>import("./drag-source.stories-gUClilXD.js"),__vite__mapDeps([54,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/drop-events.stories.tsx":async()=>e(()=>import("./drop-events.stories-OWz9nfw6.js"),__vite__mapDeps([55,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/fill-handle.stories.tsx":async()=>e(()=>import("./fill-handle.stories-WE6EdeGj.js"),__vite__mapDeps([56,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/freeze-columns.stories.tsx":async()=>e(()=>import("./freeze-columns.stories-J-JtQz55.js"),__vite__mapDeps([57,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/freeze-rows.stories.tsx":async()=>e(()=>import("./freeze-rows.stories-jRff6kph.js"),__vite__mapDeps([58,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/header-menus.stories.tsx":async()=>e(()=>import("./header-menus.stories-UgKhKI_h.js"),__vite__mapDeps([59,1,2,33,8,16,14,4,5,15,6,17,18,19,35,36,9,37,12,13,60]),import.meta.url),"./packages/core/src/docs/examples/highlight-cells.stories.tsx":async()=>e(()=>import("./highlight-cells.stories-L3aFgQ0D.js"),__vite__mapDeps([61,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/imperative-scroll.stories.tsx":async()=>e(()=>import("./imperative-scroll.stories-buAuN8Mq.js"),__vite__mapDeps([62,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/input-blending.stories.tsx":async()=>e(()=>import("./input-blending.stories-vMFDLYxv.js"),__vite__mapDeps([63,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/keybindings.stories.tsx":async()=>e(()=>import("./keybindings.stories-Mzh-GTTw.js"),__vite__mapDeps([64,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/layout-integration.stories.tsx":async()=>e(()=>import("./layout-integration.stories-5AdmzUNM.js"),__vite__mapDeps([65,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/multi-select-columns.stories.tsx":async()=>e(()=>import("./multi-select-columns.stories-ZBi8NFYt.js"),__vite__mapDeps([66,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/new-column-button.stories.tsx":async()=>e(()=>import("./new-column-button.stories-hlOEqGf0.js"),__vite__mapDeps([67,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/obscured-grid.stories.tsx":async()=>e(()=>import("./obscured-grid.stories-BhDuA2Kl.js"),__vite__mapDeps([68,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/observe-visible-region.stories.tsx":async()=>e(()=>import("./observe-visible-region.stories-5YC3GOv6.js"),__vite__mapDeps([69,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/one-hundred-thousand-columns.stories.tsx":async()=>e(()=>import("./one-hundred-thousand-columns.stories-IX8W2-Ky.js"),__vite__mapDeps([70,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/one-million-rows.stories.tsx":async()=>e(()=>import("./one-million-rows.stories-goFbk3px.js"),__vite__mapDeps([71,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/overscroll.stories.tsx":async()=>e(()=>import("./overscroll.stories-Ioltj5aT.js"),__vite__mapDeps([72,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/padding.stories.tsx":async()=>e(()=>import("./padding.stories-oLYFy8Nt.js"),__vite__mapDeps([73,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/paste-support.stories.tsx":async()=>e(()=>import("./paste-support.stories-8pSSjnL_.js"),__vite__mapDeps([74,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/prevent-diagonal-scroll.stories.tsx":async()=>e(()=>import("./prevent-diagonal-scroll.stories-1z_x72JR.js"),__vite__mapDeps([75,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/rapid-updates.stories.tsx":async()=>e(()=>import("./rapid-updates.stories-_pOVYGc8.js"),__vite__mapDeps([76,1,2,35,14,4,5,15,36,9,8,6,37,12,13,16,17,18,19]),import.meta.url),"./packages/core/src/docs/examples/rearrange-columns.stories.tsx":async()=>e(()=>import("./rearrange-columns.stories-5IgfC-te.js"),__vite__mapDeps([77,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/reorder-rows.stories.tsx":async()=>e(()=>import("./reorder-rows.stories-ZSuwtyLT.js"),__vite__mapDeps([78,1,2,79,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/resizable-columns.stories.tsx":async()=>e(()=>import("./resizable-columns.stories-jIxX01NI.js"),__vite__mapDeps([80,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/right-element.stories.tsx":async()=>e(()=>import("./right-element.stories-SlBlKhj_.js"),__vite__mapDeps([81,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/right-to-left.stories.tsx":async()=>e(()=>import("./right-to-left.stories-SJSb5h18.js"),__vite__mapDeps([82,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/row-and-header-sizes.stories.tsx":async()=>e(()=>import("./row-and-header-sizes.stories-_n_Og1OI.js"),__vite__mapDeps([83,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/row-grouping.stories.tsx":async()=>e(()=>import("./row-grouping.stories-eFOBPiXT.js"),__vite__mapDeps([84,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13,79]),import.meta.url),"./packages/core/src/docs/examples/row-hover.stories.tsx":async()=>e(()=>import("./row-hover.stories-U0PlxtgK.js"),__vite__mapDeps([85,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/row-markers.stories.tsx":async()=>e(()=>import("./row-markers.stories-gUwzzw83.js"),__vite__mapDeps([86,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/scaled-view.stories.tsx":async()=>e(()=>import("./scaled-view.stories-ZKXzscAE.js"),__vite__mapDeps([87,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/scroll-offset.stories.tsx":async()=>e(()=>import("./scroll-offset.stories-51l0E9Lj.js"),__vite__mapDeps([88,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13,79]),import.meta.url),"./packages/core/src/docs/examples/scroll-shadows.stories.tsx":async()=>e(()=>import("./scroll-shadows.stories-mMz0ZZOF.js"),__vite__mapDeps([89,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/search-as-filter.stories.tsx":async()=>e(()=>import("./search-as-filter.stories-JAMWQTp0.js"),__vite__mapDeps([90,1,2,14,4,5,15,16,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/server-side-data.stories.tsx":async()=>e(()=>import("./server-side-data.stories-vcsA3gAS.js"),__vite__mapDeps([91,1,2,14,4,5,15,12,13,16,6,17,18,19,35,36,9,8,37,23,7,24]),import.meta.url),"./packages/core/src/docs/examples/shadow-dom.stories.tsx":async()=>e(()=>import("./shadow-dom.stories-V3zAyFKt.js"),__vite__mapDeps([92,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/silly-numbers.stories.tsx":async()=>e(()=>import("./silly-numbers.stories-D0q20SS3.js"),__vite__mapDeps([93,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/small-editable-grid.stories.tsx":async()=>e(()=>import("./small-editable-grid.stories-ph4hBbrM.js"),__vite__mapDeps([94,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/smooth-scrolling-grid.stories.tsx":async()=>e(()=>import("./smooth-scrolling-grid.stories-Z9rTXot3.js"),__vite__mapDeps([95,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/span-cell.stories.tsx":async()=>e(()=>import("./span-cell.stories-9oBMW2Vd.js"),__vite__mapDeps([96,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/stretch-column-size.stories.tsx":async()=>e(()=>import("./stretch-column-size.stories-3Fc7tBvF.js"),__vite__mapDeps([97,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/ten-million-cells.stories.tsx":async()=>e(()=>import("./ten-million-cells.stories-dSX67I4a.js"),__vite__mapDeps([98,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/theme-per-column.stories.tsx":async()=>e(()=>import("./theme-per-column.stories-jOaP6A03.js"),__vite__mapDeps([99,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/theme-per-row.stories.tsx":async()=>e(()=>import("./theme-per-row.stories-LwBWKiYj.js"),__vite__mapDeps([100,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/theme-support.stories.tsx":async()=>e(()=>import("./theme-support.stories-Wf73fqnU.js"),__vite__mapDeps([101,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/tooltips.stories.tsx":async()=>e(()=>import("./tooltips.stories-FLMgvAmF.js"),__vite__mapDeps([102,1,2,33,8,16,14,4,5,15,6,17,18,19,35,36,9,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/trailing-row-options.stories.tsx":async()=>e(()=>import("./trailing-row-options.stories-9o3V2KvJ.js"),__vite__mapDeps([103,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/uneven-rows.stories.tsx":async()=>e(()=>import("./uneven-rows.stories-5ASaufVP.js"),__vite__mapDeps([104,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/validate-data.stories.tsx":async()=>e(()=>import("./validate-data.stories-K9YyRayS.js"),__vite__mapDeps([105,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/docs/examples/wrapping-text.stories.tsx":async()=>e(()=>import("./wrapping-text.stories-WIxnSyqc.js"),__vite__mapDeps([106,1,2,16,14,4,5,15,6,17,18,19,35,36,9,8,37,12,13]),import.meta.url),"./packages/core/src/internal/data-grid/data-grid.stories.tsx":async()=>e(()=>import("./data-grid.stories-uU5mN9ME.js"),__vite__mapDeps([107,1,2,12,13,14,4,5,15]),import.meta.url),"./packages/core/src/internal/scrolling-data-grid/scrolling-data-grid.stories.tsx":async()=>e(()=>import("./scrolling-data-grid.stories-G3gtc9yy.js"),__vite__mapDeps([108,1,2,12,13,17,4,5,14,15,18,109]),import.meta.url),"./packages/source/src/stories/use-data-source.stories.tsx":async()=>e(()=>import("./use-data-source.stories-moFMuBc7.js"),__vite__mapDeps([110,1,2,9,8,36,5,3,4,6,111]),import.meta.url)};async function R(a){return g[a]()}const{composeConfigs:v,PreviewWeb:P,ClientApi:T}=__STORYBOOK_MODULE_PREVIEW_API__,y=async()=>{const a=await Promise.all([e(()=>import("./entry-preview-rD48AoDU.js"),__vite__mapDeps([112,2,8]),import.meta.url),e(()=>import("./entry-preview-docs-TnItVWWf.js"),__vite__mapDeps([113,2,5]),import.meta.url),e(()=>import("./preview-z4T7Lhw3.js"),__vite__mapDeps([]),import.meta.url)]);return v(a)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new P;window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;window.__STORYBOOK_CLIENT_API__=window.__STORYBOOK_CLIENT_API__||new T({storyStore:window.__STORYBOOK_PREVIEW__.storyStore});window.__STORYBOOK_PREVIEW__.initialize({importFn:R,getProjectAnnotations:y});export{e as _}; +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = ["./cell.stories-Ar45hIC9.js","./marked.esm-dbrxtycE.js","./index-BMVQvedj.js","./data-editor-all-Jk8In-1B.js","./throttle-7EuXLZa7.js","./_baseIteratee-WTHxv43n.js","./flatten-qRvRBp6y.js","./toConsumableArray-ppDpjNRJ.js","./index-wocATsGp.js","./index.esm-Ejw8GwRl.js","./cell-hbkxrWJd.css","./data-editor-repros.stories-HT3RvUND.js","./story-utils-K2EZnGjM.js","./story-utils-P19cgLKl.css","./image-window-loader-aCHQvgUN.js","./image-window-loader-1jHxuE_X.css","./data-editor-all-MRDpHEQ_.js","./scrolling-data-grid-UJ5_dX2R.js","./scrolling-data-grid-dE2iz8sf.css","./data-editor-all-n_zxn1vv.css","./data-editor-repros-3oka-WZT.css","./data-editor.stories-18boT4dm.js","./00-faq.stories-PKS7OADQ.js","./doc-wrapper-m1-LpzDL.js","./doc-wrapper-WI-RO4K9.css","./01-getting-started.stories-Lwq3bhsG.js","./02-editing-data.stories-uMNvuR4T.js","./03-grid-column.stories-ki_rf7c-.js","./04-streaming-data.stories-FjbN6zdk.js","./06-search.stories-SV1nFg-6.js","./07-column-grouping.stories-KtsWGblh.js","./08-theming.stories-FgO0Jz0T.js","./09-menus.stories-oEedqkBY.js","./react-laag.esm-PpDllAFI.js","./add-column.stories-coHPOkoR.js","./utils-0sbaJdQp.js","./index-PWBWJyi_.js","./utils-ybqXy1Bp.css","./add-data-to-middle.stories-CfzDpjdK.js","./add-data-to-top.stories-dpZWH635.js","./add-data.stories-14Dc9SRb.js","./all-cell-kinds.stories-fsQtSzKV.js","./append-row-handle.stories-YQyg-27A.js","./automatic-row-markers.stories-I-TgNR_X.js","./built-in-search.stories-v39F_B-_.js","./cell-activated-event.stories-QhCktdVw.js","./column-group-collapse.stories-Acy8AFPO.js","./column-groups.stories-lpss0-Mz.js","./content-alignment.stories--MNNaYaT.js","./controlled-search.stories-b-OSRnqX.js","./controlled-selection.stories-Lx0jlMqX.js","./copy-support.stories-1uSBV0aF.js","./custom-header-icons.stories-YLibh_hX.js","./custom-header.stories-vDuU60kQ.js","./drag-source.stories-gUClilXD.js","./drop-events.stories-OWz9nfw6.js","./fill-handle.stories-WE6EdeGj.js","./freeze-columns.stories-J-JtQz55.js","./freeze-rows.stories-jRff6kph.js","./header-menus.stories-UgKhKI_h.js","./header-menus-N_BOUD_t.css","./highlight-cells.stories-L3aFgQ0D.js","./imperative-scroll.stories-buAuN8Mq.js","./input-blending.stories-vMFDLYxv.js","./keybindings.stories-Mzh-GTTw.js","./layout-integration.stories-5AdmzUNM.js","./multi-select-columns.stories-ZBi8NFYt.js","./new-column-button.stories-hlOEqGf0.js","./obscured-grid.stories-BhDuA2Kl.js","./observe-visible-region.stories-5YC3GOv6.js","./one-hundred-thousand-columns.stories-IX8W2-Ky.js","./one-million-rows.stories-goFbk3px.js","./overscroll.stories-Ioltj5aT.js","./padding.stories-oLYFy8Nt.js","./paste-support.stories-8pSSjnL_.js","./prevent-diagonal-scroll.stories-1z_x72JR.js","./rapid-updates.stories-_pOVYGc8.js","./rearrange-columns.stories-5IgfC-te.js","./reorder-rows.stories-ZSuwtyLT.js","./lodash-8jIGfDyZ.js","./resizable-columns.stories-jIxX01NI.js","./right-element.stories-SlBlKhj_.js","./right-to-left.stories-SJSb5h18.js","./row-and-header-sizes.stories-_n_Og1OI.js","./row-grouping.stories-eFOBPiXT.js","./row-hover.stories-U0PlxtgK.js","./row-markers.stories-gUwzzw83.js","./scaled-view.stories-ZKXzscAE.js","./scroll-offset.stories-51l0E9Lj.js","./scroll-shadows.stories-mMz0ZZOF.js","./search-as-filter.stories-JAMWQTp0.js","./server-side-data.stories-vcsA3gAS.js","./shadow-dom.stories-V3zAyFKt.js","./silly-numbers.stories-D0q20SS3.js","./small-editable-grid.stories-ph4hBbrM.js","./smooth-scrolling-grid.stories-Z9rTXot3.js","./span-cell.stories-9oBMW2Vd.js","./stretch-column-size.stories-3Fc7tBvF.js","./ten-million-cells.stories-dSX67I4a.js","./theme-per-column.stories-jOaP6A03.js","./theme-per-row.stories-LwBWKiYj.js","./theme-support.stories-Wf73fqnU.js","./tooltips.stories-FLMgvAmF.js","./trailing-row-options.stories-9o3V2KvJ.js","./uneven-rows.stories-5ASaufVP.js","./validate-data.stories-K9YyRayS.js","./wrapping-text.stories-WIxnSyqc.js","./data-grid.stories-uU5mN9ME.js","./scrolling-data-grid.stories-G3gtc9yy.js","./scrolling-data-grid-OMNPNZ5X.css","./use-data-source.stories-moFMuBc7.js","./use-data-source-ruk7orBA.css","./entry-preview-rD48AoDU.js","./entry-preview-docs-TnItVWWf.js"] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} \ No newline at end of file diff --git a/docs/assets/image-window-loader-lKUISrIQ.js b/docs/assets/image-window-loader-aCHQvgUN.js similarity index 99% rename from docs/assets/image-window-loader-lKUISrIQ.js rename to docs/assets/image-window-loader-aCHQvgUN.js index 8964b7510..1b214cfee 100644 --- a/docs/assets/image-window-loader-lKUISrIQ.js +++ b/docs/assets/image-window-loader-aCHQvgUN.js @@ -1,4 +1,4 @@ -var Li=Object.defineProperty;var Ni=(e,t,n)=>t in e?Li(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ne=(e,t,n)=>(Ni(e,typeof t!="symbol"?t+"":t,n),n);import{a as Je,j as $,F as Xn,s as gt,b as Oi}from"./marked.esm-dbrxtycE.js";import{r as I,R as Gn}from"./index-BMVQvedj.js";import{h as Xi,d as $i,v as Yi,_ as _i,g as Ui,c as wn,r as qi,j as ji,t as Vi}from"./throttle-7EuXLZa7.js";import{_ as Ki}from"./iframe-9FFu--7X.js";function Vo(e="This should not happen"){throw new Error(e)}function ft(e,t="Assertion failed"){if(!e)return Vo(t)}function Jn(e,t){return Vo(t??"Hell froze over")}function tl(e,t){try{return e()}catch{return t}}const Co=Object.prototype.hasOwnProperty;function Ot(e,t){let n,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((o=e.length)===t.length)for(;o--&&Ot(e[o],t[o]););return o===-1}if(!n||typeof e=="object"){o=0;for(n in e)if(Co.call(e,n)&&++o&&!Co.call(t,n)||!(n in t)||!Ot(e[n],t[n]))return!1;return Object.keys(t).length===o}}return e!==e&&t!==t}const xn=null,Qn=void 0;var ae=(e=>(e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom",e))(ae||{}),Gi=(e=>(e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay",e))(Gi||{}),$n=(e=>(e.Triangle="triangle",e.Dots="dots",e))($n||{});function nl(e){return"width"in e&&typeof e.width=="number"}async function ol(e){return typeof e=="object"?e:await e()}function Ji(e){return!(e.kind==="loading"||e.kind==="bubble"||e.kind==="row-id"||e.kind==="protected"||e.kind==="drilldown")}function il(e){return!(e.kind==="loading"||e.kind==="bubble"||e.kind==="row-id"||e.kind==="protected"||e.kind==="drilldown"||e.kind==="boolean"||e.kind==="image"||e.kind==="custom")}function Ko(e){return e.kind==="marker"||e.kind==="new-row"}function Qi(e){if(!Ji(e)||e.kind==="image")return!1;if(e.kind==="text"||e.kind==="number"||e.kind==="markdown"||e.kind==="uri"||e.kind==="custom"||e.kind==="boolean")return e.readonly!==!0;Jn(e,"A cell was passed with an invalid kind")}function rl(e){return Xi(e,"editor")}function Yn(e){return!(e.readonly??!1)}var tn=(e=>(e.NewRow="new-row",e.Marker="marker",e))(tn||{});function Zi(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(o,i){return o[0]-i[0]}),n.push([...t[0]]);for(const o of t.slice(1)){const i=n[n.length-1];i[1][o[0]+t,o[1]+t]);return new ut(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,o=Zi([...this.items,n]);return new ut(o)}remove(t){const n=[...this.items],o=typeof t=="number"?t:t[0],i=typeof t=="number"?t+1:t[1];for(const[r,l]of n.entries()){const[s,a]=l;if(s<=i&&o<=a){const d=[];s=o&&tSo??(So=new ut([]))),ne(ut,"fromSingleSelection",t=>ut.empty().add(t));let _n=ut;function Ge(e,t,n,o,i=!1){const r=I.useRef();r.current=t,I.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const l=n,s=a=>{var d;(d=r.current)==null||d.call(l,a)};return l.addEventListener(e,s,{passive:o,capture:i}),()=>{l.removeEventListener(e,s,{capture:i})}},[e,n,o,i])}function sl(e,t){return e===void 0?void 0:t}const er=Math.PI;function Io(e){return e*er/180}const Go=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),Jo=(e,t,n,o,i)=>{switch(e){case"left":return Math.floor(t)+o+i/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-o-i/2}},Qo=(e,t,n)=>Math.min(e,t-n*2),Zo=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,Zn=e=>{const t=e.fgColor??"currentColor";return Je("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[$("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),$("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"})]})},tr=e=>{const t=e.fgColor??"currentColor";return $("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:$("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})};function nr(e,t,n){const[o,i]=I.useState(e),r=I.useRef(!0);I.useEffect(()=>()=>{r.current=!1},[]);const l=I.useRef($i(s=>{r.current&&i(s)},n));return I.useLayoutEffect(()=>{r.current&&l.current(()=>e())},t),o}const or="֑-߿יִ-﷽ﹰ-ﻼ",ir="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",rr=new RegExp("^[^"+ir+"]*["+or+"]");function eo(e){return rr.test(e)?"rtl":"not-rtl"}let vn;function Mo(){if(typeof document>"u")return 0;if(vn!==void 0)return vn;const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.id="testScrollbar",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.append(e),document.body.append(t);const n=e.offsetWidth;t.style.overflow="scroll";let o=e.offsetWidth;return n===o&&(o=t.clientWidth),t.remove(),vn=n-o,vn}const Ft=Symbol();function ll(e){const t=I.useRef([Ft,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,o]=I.useState(e),[,i]=I.useState(),r=I.useCallback(s=>{const a=t.current[0];a!==Ft&&(s=typeof s=="function"?s(a):s,s===a)||(a!==Ft&&i({}),o(d=>typeof s=="function"?s(a===Ft?d:a):s),t.current[0]=Ft)},[]),l=I.useCallback(()=>{t.current[0]=Ft,i({})},[]);return[t.current[0]===Ft?n:t.current[0],r,l]}function ei(e){if(e.length===0)return"";let t=0,n=0;for(const o of e){if(n+=o.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function al(e){const t=I.useRef(e);return Ot(e,t.current)||(t.current=e),t.current}function sr(e,t){return Gn.useMemo(()=>e.map((n,o)=>({group:n.group,grow:n.grow,hasMenu:n.hasMenu,icon:n.icon,id:n.id,menuIcon:n.menuIcon,overlayIcon:n.overlayIcon,sourceIndex:o,sticky:o=r.x&&n=r.y&&o=t.span[0]&&n.current.cell[0]<=t.span[1]}function ar(e,t){const[n,o]=e;return n>=t.x&&n=t.y&&ol)return!1;if(t.span===void 0)return s>=o&&s<=i;const[d,f]=t.span;return d>=o&&d<=i||f>=o&&d<=i||di}function cr(e,t,n,o){let i=0;if(n.current===void 0)return i;const r=n.current.range;(o||r.height*r.width>1)&&Eo(e,t,r)&&i++;for(const l of n.current.rangeStack)Eo(e,t,l)&&i++;return i}function ni(e,t){let n=e;if(t!==void 0){let o=[...e];const i=n[t.src];t.src>t.dest?(o.splice(t.src,1),o.splice(t.dest,0,i)):(o.splice(t.dest+1,0,i),o.splice(t.src,1)),o=o.map((r,l)=>({...r,sticky:e[l].sticky})),n=o}return n}function Xt(e,t){let n=0;const o=ni(e,t);for(let i=0;i0)for(const d of l)n-=d.width;let s=t,a=i??0;for(;a<=n&&s=g)return h}const m=r-d,u=e-(a??0);if(typeof l=="number"){const c=Math.floor((u-f)/l)+s;return c>=m?void 0:c}else{let c=f;for(let h=s;h"u";async function hr(){var e;fr||((e=document==null?void 0:document.fonts)==null?void 0:e.ready)===void 0||(await document.fonts.ready,pn=0,Qt={},Yi())}hr();function oi(e,t,n,o){return`${e}_${o??(t==null?void 0:t.font)}_${n}`}function Yt(e,t,n,o="middle"){const i=oi(e,t,o,n);let r=Qt[i];return r===void 0&&(r=t.measureText(e),Qt[i]=r,pn++),pn>1e4&&(Qt={},pn=0),r}function ii(e,t){const n=oi(e,void 0,"middle",t);return Qt[n]}function xt(e,t){return typeof t!="string"&&(t=t.baseFontFull),gr(e,t)}function Bo(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ";e.save(),e.textBaseline=t;const o=e.measureText(n);return e.restore(),o}const Fo=[];function gr(e,t){for(const r of Fo)if(r.key===t)return r.val;const n=Bo(e,"alphabetic"),i=-(Bo(e,"middle").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return Fo.push({key:t,val:i}),i}function mr(e,t,n,o,i,r){const{ctx:l,rect:s,theme:a}=e;let d=Number.MAX_SAFE_INTEGER;const f=500;if(t!==void 0&&(d=n-t,dt in e?Li(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ne=(e,t,n)=>(Ni(e,typeof t!="symbol"?t+"":t,n),n);import{a as Je,j as $,F as Xn,s as gt,b as Oi}from"./marked.esm-dbrxtycE.js";import{r as I,R as Gn}from"./index-BMVQvedj.js";import{h as Xi,d as $i,v as Yi,_ as _i,g as Ui,c as wn,r as qi,j as ji,t as Vi}from"./throttle-7EuXLZa7.js";import{_ as Ki}from"./iframe-MICdw5w5.js";function Vo(e="This should not happen"){throw new Error(e)}function ft(e,t="Assertion failed"){if(!e)return Vo(t)}function Jn(e,t){return Vo(t??"Hell froze over")}function tl(e,t){try{return e()}catch{return t}}const Co=Object.prototype.hasOwnProperty;function Ot(e,t){let n,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((o=e.length)===t.length)for(;o--&&Ot(e[o],t[o]););return o===-1}if(!n||typeof e=="object"){o=0;for(n in e)if(Co.call(e,n)&&++o&&!Co.call(t,n)||!(n in t)||!Ot(e[n],t[n]))return!1;return Object.keys(t).length===o}}return e!==e&&t!==t}const xn=null,Qn=void 0;var ae=(e=>(e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom",e))(ae||{}),Gi=(e=>(e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay",e))(Gi||{}),$n=(e=>(e.Triangle="triangle",e.Dots="dots",e))($n||{});function nl(e){return"width"in e&&typeof e.width=="number"}async function ol(e){return typeof e=="object"?e:await e()}function Ji(e){return!(e.kind==="loading"||e.kind==="bubble"||e.kind==="row-id"||e.kind==="protected"||e.kind==="drilldown")}function il(e){return!(e.kind==="loading"||e.kind==="bubble"||e.kind==="row-id"||e.kind==="protected"||e.kind==="drilldown"||e.kind==="boolean"||e.kind==="image"||e.kind==="custom")}function Ko(e){return e.kind==="marker"||e.kind==="new-row"}function Qi(e){if(!Ji(e)||e.kind==="image")return!1;if(e.kind==="text"||e.kind==="number"||e.kind==="markdown"||e.kind==="uri"||e.kind==="custom"||e.kind==="boolean")return e.readonly!==!0;Jn(e,"A cell was passed with an invalid kind")}function rl(e){return Xi(e,"editor")}function Yn(e){return!(e.readonly??!1)}var tn=(e=>(e.NewRow="new-row",e.Marker="marker",e))(tn||{});function Zi(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(o,i){return o[0]-i[0]}),n.push([...t[0]]);for(const o of t.slice(1)){const i=n[n.length-1];i[1][o[0]+t,o[1]+t]);return new ut(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,o=Zi([...this.items,n]);return new ut(o)}remove(t){const n=[...this.items],o=typeof t=="number"?t:t[0],i=typeof t=="number"?t+1:t[1];for(const[r,l]of n.entries()){const[s,a]=l;if(s<=i&&o<=a){const d=[];s=o&&tSo??(So=new ut([]))),ne(ut,"fromSingleSelection",t=>ut.empty().add(t));let _n=ut;function Ge(e,t,n,o,i=!1){const r=I.useRef();r.current=t,I.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const l=n,s=a=>{var d;(d=r.current)==null||d.call(l,a)};return l.addEventListener(e,s,{passive:o,capture:i}),()=>{l.removeEventListener(e,s,{capture:i})}},[e,n,o,i])}function sl(e,t){return e===void 0?void 0:t}const er=Math.PI;function Io(e){return e*er/180}const Go=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),Jo=(e,t,n,o,i)=>{switch(e){case"left":return Math.floor(t)+o+i/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-o-i/2}},Qo=(e,t,n)=>Math.min(e,t-n*2),Zo=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,Zn=e=>{const t=e.fgColor??"currentColor";return Je("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[$("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),$("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"})]})},tr=e=>{const t=e.fgColor??"currentColor";return $("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:$("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})};function nr(e,t,n){const[o,i]=I.useState(e),r=I.useRef(!0);I.useEffect(()=>()=>{r.current=!1},[]);const l=I.useRef($i(s=>{r.current&&i(s)},n));return I.useLayoutEffect(()=>{r.current&&l.current(()=>e())},t),o}const or="֑-߿יִ-﷽ﹰ-ﻼ",ir="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",rr=new RegExp("^[^"+ir+"]*["+or+"]");function eo(e){return rr.test(e)?"rtl":"not-rtl"}let vn;function Mo(){if(typeof document>"u")return 0;if(vn!==void 0)return vn;const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.id="testScrollbar",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.append(e),document.body.append(t);const n=e.offsetWidth;t.style.overflow="scroll";let o=e.offsetWidth;return n===o&&(o=t.clientWidth),t.remove(),vn=n-o,vn}const Ft=Symbol();function ll(e){const t=I.useRef([Ft,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,o]=I.useState(e),[,i]=I.useState(),r=I.useCallback(s=>{const a=t.current[0];a!==Ft&&(s=typeof s=="function"?s(a):s,s===a)||(a!==Ft&&i({}),o(d=>typeof s=="function"?s(a===Ft?d:a):s),t.current[0]=Ft)},[]),l=I.useCallback(()=>{t.current[0]=Ft,i({})},[]);return[t.current[0]===Ft?n:t.current[0],r,l]}function ei(e){if(e.length===0)return"";let t=0,n=0;for(const o of e){if(n+=o.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function al(e){const t=I.useRef(e);return Ot(e,t.current)||(t.current=e),t.current}function sr(e,t){return Gn.useMemo(()=>e.map((n,o)=>({group:n.group,grow:n.grow,hasMenu:n.hasMenu,icon:n.icon,id:n.id,menuIcon:n.menuIcon,overlayIcon:n.overlayIcon,sourceIndex:o,sticky:o=r.x&&n=r.y&&o=t.span[0]&&n.current.cell[0]<=t.span[1]}function ar(e,t){const[n,o]=e;return n>=t.x&&n=t.y&&ol)return!1;if(t.span===void 0)return s>=o&&s<=i;const[d,f]=t.span;return d>=o&&d<=i||f>=o&&d<=i||di}function cr(e,t,n,o){let i=0;if(n.current===void 0)return i;const r=n.current.range;(o||r.height*r.width>1)&&Eo(e,t,r)&&i++;for(const l of n.current.rangeStack)Eo(e,t,l)&&i++;return i}function ni(e,t){let n=e;if(t!==void 0){let o=[...e];const i=n[t.src];t.src>t.dest?(o.splice(t.src,1),o.splice(t.dest,0,i)):(o.splice(t.dest+1,0,i),o.splice(t.src,1)),o=o.map((r,l)=>({...r,sticky:e[l].sticky})),n=o}return n}function Xt(e,t){let n=0;const o=ni(e,t);for(let i=0;i0)for(const d of l)n-=d.width;let s=t,a=i??0;for(;a<=n&&s=g)return h}const m=r-d,u=e-(a??0);if(typeof l=="number"){const c=Math.floor((u-f)/l)+s;return c>=m?void 0:c}else{let c=f;for(let h=s;h"u";async function hr(){var e;fr||((e=document==null?void 0:document.fonts)==null?void 0:e.ready)===void 0||(await document.fonts.ready,pn=0,Qt={},Yi())}hr();function oi(e,t,n,o){return`${e}_${o??(t==null?void 0:t.font)}_${n}`}function Yt(e,t,n,o="middle"){const i=oi(e,t,o,n);let r=Qt[i];return r===void 0&&(r=t.measureText(e),Qt[i]=r,pn++),pn>1e4&&(Qt={},pn=0),r}function ii(e,t){const n=oi(e,void 0,"middle",t);return Qt[n]}function xt(e,t){return typeof t!="string"&&(t=t.baseFontFull),gr(e,t)}function Bo(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ";e.save(),e.textBaseline=t;const o=e.measureText(n);return e.restore(),o}const Fo=[];function gr(e,t){for(const r of Fo)if(r.key===t)return r.val;const n=Bo(e,"alphabetic"),i=-(Bo(e,"middle").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return Fo.push({key:t,val:i}),i}function mr(e,t,n,o,i,r){const{ctx:l,rect:s,theme:a}=e;let d=Number.MAX_SAFE_INTEGER;const f=500;if(t!==void 0&&(d=n-t,dn&&(e=e.slice(0,n)),e}function vr(e,t,n,o,i,r,l,s,a,d){const f=s.baseFontFull,g=_i(e,t,f,i-s.cellHorizontalPadding*2,d??!1),m=si(e,f),u=s.lineHeight*m,c=m+u*(g.length-1),h=c+s.cellVerticalPadding>r;h&&(e.save(),e.rect(n,o,i,r),e.clip());const y=o+r/2-c/2;let b=Math.max(o+s.cellVerticalPadding,y);for(const k of g)if(ri(e,k,n,b,i,m,l,s,a),b+=u,b>o+r)break;h&&e.restore()}function ht(e,t,n,o,i){const{ctx:r,rect:l,theme:s}=e,{x:a,y:d,width:f,height:g}=l;o=o??!1,o||(t=yr(t,f));const m=xt(r,s),u=eo(t)==="rtl";if(n===void 0&&u&&(n="right"),u&&(r.direction="rtl"),t.length>0){let c=!1;n==="right"?(r.textAlign="right",c=!0):n!==void 0&&n!=="left"&&(r.textAlign=n,c=!0),o?vr(r,t,a,d,f,g,m,s,n,i):ri(r,t,a,d,f,g,m,s,n),c&&(r.textAlign="start"),u&&(r.direction="inherit")}}function st(e,t,n,o,i,r){typeof r=="number"&&(r={tl:r,tr:r,br:r,bl:r}),r={tl:Math.max(0,Math.min(r.tl,i/2,o/2)),tr:Math.max(0,Math.min(r.tr,i/2,o/2)),bl:Math.max(0,Math.min(r.bl,i/2,o/2)),br:Math.max(0,Math.min(r.br,i/2,o/2))},e.moveTo(t+r.tl,n),e.arcTo(t+o,n,t+o,n+r.tr,r.tr),e.arcTo(t+o,n+i,t+o-r.br,n+i,r.br),e.arcTo(t,n+i,t,n+i-r.bl,r.bl),e.arcTo(t,n,t+r.tl,n,r.tl)}function br(e,t,n){e.arc(t,n-1.25*3.5,1.25,0,2*Math.PI,!1),e.arc(t,n,1.25,0,2*Math.PI,!1),e.arc(t,n+1.25*3.5,1.25,0,2*Math.PI,!1)}function pr(e,t,n){const o=function(s,a){const d=a.x-s.x,f=a.y-s.y,g=Math.sqrt(d*d+f*f),m=d/g,u=f/g;return{x:d,y:a.y-s.y,len:g,nx:m,ny:u,ang:Math.atan2(u,m)}};let i;const r=t.length;let l=t[r-1];for(let s=0;s1?1:m),h=1,y=!1;u<0?c<0?c=Math.PI+c:(c=Math.PI-c,h=-1,y=!0):c>0&&(h=-1,y=!0),i=a.radius!==void 0?a.radius:n;const b=c/2;let k=Math.abs(Math.cos(b)*i/Math.sin(b)),E;k>Math.min(f.len/2,g.len/2)?(k=Math.min(f.len/2,g.len/2),E=Math.abs(k*Math.sin(b)/Math.cos(b))):E=i;let A=a.x+g.nx*k,H=a.y+g.ny*k;A+=-g.ny*E*h,H+=g.nx*E*h,e.arc(A,H,E,f.ang+Math.PI/2*h,g.ang-Math.PI/2*h,y),l=a,a=d}e.closePath()}function jn(e,t,n,o,i,r,l,s,a,d,f,g,m,u,c){const h={x:0,y:r+d,width:0,height:0};if(e>=u.length||t>=f||t<-2||e<0)return h;const y=r-i;if(e>=g){const b=l>e?-1:1,k=Xt(u);h.x+=k+a;for(let E=l;E!==e;E+=b)h.x+=u[b===1?E:E-1].width*b}else for(let b=0;b0&&Un(u[b-1].group,k)&&u[b-1].sticky===E;){const H=u[b-1];h.x-=H.width,h.width+=H.width,b--}let A=e;for(;A+1n&&(h.width=n-h.x)}}else if(t>=f-m){let b=f-t;for(h.y=o;b>0;){const k=t+b-1;h.height=typeof c=="number"?c:c(k),h.y-=h.height,b--}h.height+=1}else{const b=s>t?-1:1;if(typeof c=="number"){const k=t-s;h.y+=k*c}else for(let k=s;k!==t;k+=b)h.y+=c(k)*b;h.height=(typeof c=="number"?c:c(t))+1}return h}const to=1<<21;function tt(e,t){return(t+2)*to+e}function li(e){return e%to}function no(e){return Math.floor(e/to)-2}function oo(e){const t=li(e),n=no(e);return[t,n]}class ai{constructor(){ne(this,"visibleWindow",{x:0,y:0,width:0,height:0});ne(this,"freezeCols",0);ne(this,"freezeRows",[]);ne(this,"isInWindow",t=>{const n=li(t),o=no(t),i=this.visibleWindow,r=n>=i.x&&n<=i.x+i.width||n=i.y&&o<=i.y+i.height||this.freezeRows.includes(o);return r&&l})}setWindow(t,n,o){this.visibleWindow.x===t.x&&this.visibleWindow.y===t.y&&this.visibleWindow.width===t.width&&this.visibleWindow.height===t.height&&this.freezeCols===n&&Ot(this.freezeRows,o)||(this.visibleWindow=t,this.freezeCols=n,this.freezeRows=o,this.clearOutOfWindow())}}class wr extends ai{constructor(){super(...arguments);ne(this,"cache",new Map);ne(this,"setValue",(n,o)=>{this.cache.set(tt(n[0],n[1]),o)});ne(this,"getValue",n=>this.cache.get(tt(n[0],n[1])));ne(this,"clearOutOfWindow",()=>{for(const[n]of this.cache.entries())this.isInWindow(n)||this.cache.delete(n)})}}class Zt{constructor(t=[]){ne(this,"cells");this.cells=new Set(t.map(n=>tt(n[0],n[1])))}add(t){this.cells.add(tt(t[0],t[1]))}has(t){return t===void 0?!1:this.cells.has(tt(t[0],t[1]))}remove(t){this.cells.delete(tt(t[0],t[1]))}clear(){this.cells.clear()}get size(){return this.cells.size}hasHeader(){for(const t of this.cells)if(no(t)<0)return!0;return!1}hasItemInRectangle(t){for(let n=t.y;n{h.drawImage(y,0,0,g,g)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else a<1&&(o.globalAlpha=a),o.drawImage(u,0,0,g,g,i,r,l,l),a<1&&(o.globalAlpha=1)}}const Rn={};let wt=null;function Cr(){const e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}function Vn(e){const t=e.toLowerCase().trim();if(Rn[t]!==void 0)return Rn[t];wt=wt||Cr(),wt.style.color="#000",wt.style.color=t;const n=getComputedStyle(wt).color;wt.style.color="#fff",wt.style.color=t;const o=getComputedStyle(wt).color;if(o!==n)return[0,0,0,1];let i=o.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return i.length<4&&i.push(1),i=i.map(r=>Number.isNaN(r)?0:r),Rn[t]=i,i}function sn(e,t){const[n,o,i]=Vn(e);return`rgba(${n}, ${o}, ${i}, ${t})`}const Do=new Map;function Ao(e,t){const n=`${e}-${t}`,o=Do.get(n);if(o!==void 0)return o;const i=qe(e,t);return Do.set(n,i),i}function qe(e,t){if(t===void 0)return e;const[n,o,i,r]=Vn(e);if(r===1)return e;const[l,s,a,d]=Vn(t),f=r+d*(1-r),g=(r*n+d*l*(1-r))/f,m=(r*o+d*s*(1-r))/f,u=(r*i+d*a*(1-r))/f;return`rgba(${g}, ${m}, ${u}, ${f})`}function ci(e){if(e.length===0)return;let t;for(const n of e)t=Math.min(t??n.y,n.y)}function kn(e,t,n,o,i,r,l,s,a){s=s??t;let d=t,f=e;const g=o-r;let m=!1;for(;ds&&a(d,f,u,!1,l&&f===o-1)===!0){m=!0;break}d+=u,f++}if(!m){d=n;for(let u=0;u!u.sticky))==null?void 0:m.sourceIndex)??0;if(a>g){const u=Math.max(s,g);let c=t,h=o;for(let y=r.sourceIndex-1;y>=u;y--)c-=l[y].width,h+=l[y].width;for(let y=r.sourceIndex+1;y<=a;y++)h+=l[y].width;f={x:c,y:n,width:h,height:i}}if(g>s){const u=Math.min(a,g-1);let c=t,h=o;for(let y=r.sourceIndex-1;y>=s;y--)c-=l[y].width,h+=l[y].width;for(let y=r.sourceIndex+1;y<=u;y++)h+=l[y].width;d={x:c,y:n,width:h,height:i}}return[d,f]}function dl(e){return{"--gdg-accent-color":e.accentColor,"--gdg-accent-fg":e.accentFg,"--gdg-accent-light":e.accentLight,"--gdg-text-dark":e.textDark,"--gdg-text-medium":e.textMedium,"--gdg-text-light":e.textLight,"--gdg-text-bubble":e.textBubble,"--gdg-bg-icon-header":e.bgIconHeader,"--gdg-fg-icon-header":e.fgIconHeader,"--gdg-text-header":e.textHeader,"--gdg-text-group-header":e.textGroupHeader??e.textHeader,"--gdg-text-header-selected":e.textHeaderSelected,"--gdg-bg-cell":e.bgCell,"--gdg-bg-cell-medium":e.bgCellMedium,"--gdg-bg-header":e.bgHeader,"--gdg-bg-header-has-focus":e.bgHeaderHasFocus,"--gdg-bg-header-hovered":e.bgHeaderHovered,"--gdg-bg-bubble":e.bgBubble,"--gdg-bg-bubble-selected":e.bgBubbleSelected,"--gdg-bg-search-result":e.bgSearchResult,"--gdg-border-color":e.borderColor,"--gdg-horizontal-border-color":e.horizontalBorderColor??e.borderColor,"--gdg-drilldown-border":e.drilldownBorder,"--gdg-link-color":e.linkColor,"--gdg-cell-horizontal-padding":`${e.cellHorizontalPadding}px`,"--gdg-cell-vertical-padding":`${e.cellVerticalPadding}px`,"--gdg-header-font-style":e.headerFontStyle,"--gdg-base-font-style":e.baseFontStyle,"--gdg-marker-font-style":e.markerFontStyle,"--gdg-font-family":e.fontFamily,"--gdg-editor-font-size":e.editorFontSize,...e.resizeIndicatorColor===void 0?{}:{"--gdg-resize-indicator-color":e.resizeIndicatorColor},...e.headerBottomBorderColor===void 0?{}:{"--gdg-header-bottom-border-color":e.headerBottomBorderColor},...e.roundingRadius===void 0?{}:{"--gdg-rounding-radius":`${e.roundingRadius}px`}}}const fi={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#353fb5",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:"600 13px",baseFontStyle:"13px",markerFontStyle:"9px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4};function ul(){return fi}const fl=Gn.createContext(fi);function nn(e,...t){const n={...e};for(const o of t)if(o!==void 0)for(const i in o)o.hasOwnProperty(i)&&(i==="bgCell"?n[i]=qe(o[i],n[i]):n[i]=o[i]);return(n.headerFontFull===void 0||e.fontFamily!==n.fontFamily||e.headerFontStyle!==n.headerFontStyle)&&(n.headerFontFull=`${n.headerFontStyle} ${n.fontFamily}`),(n.baseFontFull===void 0||e.fontFamily!==n.fontFamily||e.baseFontStyle!==n.baseFontStyle)&&(n.baseFontFull=`${n.baseFontStyle} ${n.fontFamily}`),(n.markerFontFull===void 0||e.fontFamily!==n.fontFamily||e.markerFontStyle!==n.markerFontStyle)&&(n.markerFontFull=`${n.markerFontStyle} ${n.fontFamily}`),n}function hl(e,t,n,o){if(o==="any")return Sr(e,{x:t,y:n,width:1,height:1});if(o==="vertical"&&(t=e.x),o==="horizontal"&&(n=e.y),ar([t,n],e))return;const i=t-e.x,r=e.x+e.width-t,l=n-e.y+1,s=e.y+e.height-n,a=Math.min(o==="vertical"?Number.MAX_SAFE_INTEGER:i,o==="vertical"?Number.MAX_SAFE_INTEGER:r,o==="horizontal"?Number.MAX_SAFE_INTEGER:l,o==="horizontal"?Number.MAX_SAFE_INTEGER:s);return a===s?{x:e.x,y:e.y+e.height,width:e.width,height:n-e.y-e.height+1}:a===l?{x:e.x,y:n,width:e.width,height:e.y-n}:a===r?{x:e.x+e.width,y:e.y,width:t-e.x-e.width+1,height:e.height}:{x:t,y:e.y,width:e.x-t,height:e.height}}function on(e,t,n,o,i,r,l,s){return e<=i+l&&i<=e+n&&t<=r+s&&r<=t+o}function en(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Sr(e,t){const n=Math.min(e.x,t.x),o=Math.min(e.y,t.y),i=Math.max(e.x+e.width,t.x+t.width)-n,r=Math.max(e.y+e.height,t.y+t.height)-o;return{x:n,y:o,width:i,height:r}}function Ir(e,t){return e.x<=t.x&&e.y<=t.y&&e.x+e.width>=t.x+t.width&&e.y+e.height>=t.y+t.height}function Mr(e,t,n,o){if(e.x>t||e.y>n||e.x<0&&e.y<0&&e.x+e.width>t&&e.y+e.height>n)return;if(e.x>=0&&e.y>=0&&e.x+e.width<=t&&e.y+e.height<=n)return e;const i=-4,r=-4,l=t+4,s=n+4,a=i-e.x,d=e.x+e.width-l,f=r-e.y,g=e.y+e.height-s,m=a>0?e.x+Math.floor(a/o)*o:e.x,u=d>0?e.x+e.width-Math.floor(d/o)*o:e.x+e.width,c=f>0?e.y+Math.floor(f/o)*o:e.y,h=g>0?e.y+e.height-Math.floor(g/o)*o:e.y+e.height;return{x:m,y:c,width:u-m,height:h-c}}function Er(e,t,n,o,i){const[r,l,s,a]=t,[d,f,g,m]=i,{x:u,y:c,width:h,height:y}=e,b=[];if(h<=0||y<=0)return b;const k=u+h,E=c+y,A=us,F=c+y>a,W=u>=r&&ur&&k<=s||us,C=c>=l&&cl&&E<=a||ca;if(W&&C){const B=Math.max(u,r),w=Math.max(c,l),x=Math.min(k,s),p=Math.min(E,a);b.push({rect:{x:B,y:w,width:x-B,height:p-w},clip:{x:d,y:f,width:g-d+1,height:m-f+1}})}if(A&&H){const B=u,w=c,x=Math.min(k,r),p=Math.min(E,l);b.push({rect:{x:B,y:w,width:x-B,height:p-w},clip:{x:0,y:0,width:d+1,height:f+1}})}if(H&&W){const B=Math.max(u,r),w=c,x=Math.min(k,s),p=Math.min(E,l);b.push({rect:{x:B,y:w,width:x-B,height:p-w},clip:{x:d,y:0,width:g-d+1,height:f+1}})}if(H&&S){const B=Math.max(u,s),w=c,x=k,p=Math.min(E,l);b.push({rect:{x:B,y:w,width:x-B,height:p-w},clip:{x:g,y:0,width:n-g+1,height:f+1}})}if(A&&C){const B=u,w=Math.max(c,l),x=Math.min(k,r),p=Math.min(E,a);b.push({rect:{x:B,y:w,width:x-B,height:p-w},clip:{x:0,y:f,width:d+1,height:m-f+1}})}if(S&&C){const B=Math.max(u,s),w=Math.max(c,l),x=k,p=Math.min(E,a);b.push({rect:{x:B,y:w,width:x-B,height:p-w},clip:{x:g,y:f,width:n-g+1,height:m-f+1}})}if(A&&F){const B=u,w=Math.max(c,a),x=Math.min(k,r),p=E;b.push({rect:{x:B,y:w,width:x-B,height:p-w},clip:{x:0,y:m,width:d+1,height:o-m+1}})}if(F&&W){const B=Math.max(u,r),w=Math.max(c,a),x=Math.min(k,s),p=E;b.push({rect:{x:B,y:w,width:x-B,height:p-w},clip:{x:d,y:m,width:g-d+1,height:o-m+1}})}if(S&&F){const B=Math.max(u,s),w=Math.max(c,a),x=k,p=E;b.push({rect:{x:B,y:w,width:x-B,height:p-w},clip:{x:g,y:m,width:n-g+1,height:o-m+1}})}return b}const Br={kind:ae.Loading,allowOverlay:!1};function Ho(e,t,n,o,i,r,l,s,a,d,f,g,m,u,c,h,y,b,k,E,A,H,S,F,W,C,P,B,w,x,p,U,j,Y,se){let xe=(E==null?void 0:E.size)??Number.MAX_SAFE_INTEGER;const he=performance.now();let ce=x.baseFontFull;e.font=ce;const Le={ctx:e},G=[0,0],Oe=y>0?$t(a,y,d):0;let He,X;const Be=ci(k);return kt(t,s,r,l,i,(oe,Re,je,lt,Ct)=>{const at=Math.max(0,lt-Re),Ve=Re+at,me=i+1,mt=oe.width-at,yt=o-i-1;if(k.length>0){let we=!1;for(let le=0;le{e.save(),e.beginPath(),e.rect(Ve,me,mt,yt),e.clip()},de=A.columns.hasIndex(oe.sourceIndex),$e=g(oe.group??"").overrideTheme,Ce=oe.themeOverride===void 0&&$e===void 0?x:nn(x,$e,oe.themeOverride),Te=Ce.baseFontFull;Te!==ce&&(ce=Te,e.font=Te),Xe();let J;return kn(Ct,je,o,a,d,y,b,Be,(we,le,ye,L,V)=>{var It,nt,ot;if(le<0||(G[0]=oe.sourceIndex,G[1]=le,E!==void 0&&!E.has(G)))return;if(k.length>0){let te=!1;for(let Ie=0;Ieie.span!==void 0&&te>=ie.span[0]&&te<=ie.span[1]);Ke&&!c&&h?We=0:Ke&&h&&(We=Math.max(We,1)),Ht&&We++,Ke||(ue&&We++,de&&!V&&We++);const Pt=ie.kind===ae.Protected?Se.bgCellMedium:Se.bgCell;let ve;if((L||Pt!==x.bgCell)&&(ve=qe(Pt,ve)),We>0||ee){ee&&(ve=qe(Se.bgHeader,ve));for(let te=0;tese&&!Pe){const te=Se.baseFontFull;te!==ce&&(e.font=te,ce=te),J=hi(e,ie,oe.sourceIndex,le,ct,be,ke,we,fe,ye,We>0,Se,ve??Se.bgCell,F,W,(Ne==null?void 0:Ne.hoverAmount)??0,P,w,he,B,J,p,U,j,Y)}return St&&e.restore(),ie.style==="faded"&&(e.globalAlpha=1),xe--,K&&(e.restore(),(ot=J==null?void 0:J.deprep)==null||ot.call(J,Le),J=void 0,Xe(),ce=Te,e.font=Te),xe<=0}),e.restore(),xe<=0}),He}const Vt=[0,0],Kt={x:0,y:0,width:0,height:0},Tn=[void 0,()=>{}];let Kn=!1;function Fr(){Kn=!0}function hi(e,t,n,o,i,r,l,s,a,d,f,g,m,u,c,h,y,b,k,E,A,H,S,F,W){var U,j;let C,P;y!==void 0&&y[0][0]===n&&y[0][1]===o&&(C=y[1][0],P=y[1][1]);let B;Vt[0]=n,Vt[1]=o,Kt.x=l,Kt.y=s,Kt.width=a,Kt.height=d,Tn[0]=S.getValue(Vt),Tn[1]=Y=>S.setValue(Vt,Y),Kn=!1;const w={ctx:e,theme:g,col:n,row:o,cell:t,rect:Kt,highlighted:f,cellFillColor:m,hoverAmount:h,frameTime:k,hoverX:C,drawState:Tn,hoverY:P,imageLoader:u,spriteManager:c,hyperWrapping:b,overrideCursor:C!==void 0?W:void 0,requestAnimationFrame:Fr},x=mr(w,t.lastUpdated,k,A,i,r),p=F(t);if(p!==void 0){(A==null?void 0:A.renderer)!==p&&((U=A==null?void 0:A.deprep)==null||U.call(A,w),A=void 0);const Y=(j=p.drawPrep)==null?void 0:j.call(p,w,A);E!==void 0&&!Ko(w.cell)?E(w,()=>p.draw(w,t)):p.draw(w,t),B=Y===void 0?void 0:{deprep:Y==null?void 0:Y.deprep,fillStyle:Y==null?void 0:Y.fillStyle,font:Y==null?void 0:Y.font,renderer:p}}return(x||Kn)&&(H==null||H(Vt)),B}function io(e,t,n,o,i,r,l,s,a=-20,d=-20,f=32,g="center",m="square"){const u=Math.floor(i+l/2),c=m==="circle"?1e4:t.roundingRadius??4;let h=Qo(f,l,t.cellVerticalPadding),y=h/2;const b=Jo(g,o,r,t.cellHorizontalPadding,h),k=Go(b,u,h),E=Zo(o+a,i+d,k);switch(n){case!0:{e.beginPath(),st(e,b-h/2,u-h/2,h,h,c),m==="circle"&&(y*=.8,h*=.8),e.fillStyle=s?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(b-y+h/4.23,u-y+h/1.97),e.lineTo(b-y+h/2.42,u-y+h/1.44),e.lineTo(b-y+h/1.29,u-y+h/3.25),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break}case xn:case!1:{e.beginPath(),st(e,b-h/2+.5,u-h/2+.5,h-1,h-1,c),e.lineWidth=1,e.strokeStyle=E?t.textDark:t.textMedium,e.stroke();break}case Qn:{e.beginPath(),st(e,b-h/2,u-h/2,h,h,c),e.fillStyle=E?t.textMedium:t.textLight,e.fill(),m==="circle"&&(y*=.8,h*=.8),e.beginPath(),e.moveTo(b-h/3,u),e.lineTo(b+h/3,u),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break}default:Jn()}}function Dr(e,t,n,o,i,r,l,s,a,d,f,g,m,u,c,h,y,b,k){const E=l+s;if(E<=0)return;e.fillStyle=g.bgHeader,e.fillRect(0,0,i,E);const[A,H]=(o==null?void 0:o[0])??[],S=g.headerFontFull;e.font=S,kt(t,0,r,0,E,(F,W,C,P)=>{var Le;if(y!==void 0&&!y.has([F.sourceIndex,-1]))return;const B=Math.max(0,P-W);e.save(),e.beginPath(),e.rect(W+B,s,F.width-B,l),e.clip();const w=h(F.group??"").overrideTheme,x=F.themeOverride===void 0&&w===void 0?g:nn(g,w,F.themeOverride);x.bgHeader!==g.bgHeader&&(e.fillStyle=x.bgHeader,e.fill()),x!==g&&(e.font=x.baseFontFull);const p=f.columns.hasIndex(F.sourceIndex),U=a!==void 0||d,j=!U&&H===-1&&A===F.sourceIndex,Y=U?0:((Le=u.find(G=>G.item[0]===F.sourceIndex&&G.item[1]===-1))==null?void 0:Le.hoverAmount)??0,se=(f==null?void 0:f.current)!==void 0&&f.current.cell[0]===F.sourceIndex,xe=p?x.accentColor:se?x.bgHeaderHasFocus:x.bgHeader,he=n?s:0,ce=F.sourceIndex===0?0:1;p?(e.fillStyle=xe,e.fillRect(W+ce,he,F.width-ce,l)):(se||Y>0)&&(e.beginPath(),e.rect(W+ce,he,F.width-ce,l),se&&(e.fillStyle=x.bgHeaderHasFocus,e.fill()),Y>0&&(e.globalAlpha=Y,e.fillStyle=x.bgHeaderHovered,e.fill(),e.globalAlpha=1)),yi(e,W,he,F.width,l,F,p,x,j,se,Y,m,b,k),e.restore()}),n&&Ar(e,t,i,r,s,o,g,m,u,c,h,y)}function Ar(e,t,n,o,i,r,l,s,a,d,f,g){const[u,c]=(r==null?void 0:r[0])??[];let h=0;di(t,n,o,i,(y,b,k,E,A,H)=>{if(g!==void 0&&!g.hasItemInRectangle({x:y[0],y:-2,width:y[1]-y[0]+1,height:1}))return;e.save(),e.beginPath(),e.rect(k,E,A,H),e.clip();const S=f(b),F=(S==null?void 0:S.overrideTheme)===void 0?l:nn(l,S.overrideTheme),W=c===-2&&u!==void 0&&u>=y[0]&&u<=y[1],C=W?F.bgHeaderHovered:F.bgHeader;if(C!==l.bgHeader&&(e.fillStyle=C,e.fill()),e.fillStyle=F.textGroupHeader??F.textHeader,S!==void 0){let P=k;if(S.icon!==void 0&&(s.drawSprite(S.icon,"normal",e,P+8,(i-20)/2,20,F),P+=26),e.fillText(S.name,P+8,i/2+xt(e,l.headerFontFull)),S.actions!==void 0&&W){const B=gi({x:k,y:E,width:A,height:H},S.actions);e.beginPath();const w=B[0].x-10,x=k+A-w;e.rect(w,0,x,i);const p=e.createLinearGradient(w,0,w+x,0),U=sn(C,0);p.addColorStop(0,U),p.addColorStop(10/x,C),p.addColorStop(1,C),e.fillStyle=p,e.fill(),e.globalAlpha=.6;const[j,Y]=(r==null?void 0:r[1])??[-1,-1];for(let se=0;se35){const b=m?35:o-35,k=m?35*.7:o-35*.7,E=b/o,A=k/o,H=e.createLinearGradient(t,0,t+o,0),S=sn(c,0);H.addColorStop(m?1:0,c),H.addColorStop(E,c),H.addColorStop(A,S),H.addColorStop(m?0:1,S),e.fillStyle=H}else e.fillStyle=c;if(m&&(e.textAlign="right"),u.textBounds!==void 0&&e.fillText(r.title,m?u.textBounds.x+u.textBounds.width:u.textBounds.x,n+i/2+xt(e,s.headerFontFull)),m&&(e.textAlign="left"),r.indicatorIcon!==void 0&&u.indicatorIconBounds!==void 0&&(!h||!on(u.menuBounds.x,u.menuBounds.y,u.menuBounds.width,u.menuBounds.height,u.indicatorIconBounds.x,u.indicatorIconBounds.y,u.indicatorIconBounds.width,u.indicatorIconBounds.height))){let y=l?"selected":"normal";r.style==="highlight"&&(y=l?"selected":"special"),f.drawSprite(r.indicatorIcon,y,e,u.indicatorIconBounds.x,u.indicatorIconBounds.y,u.indicatorIconBounds.width,s)}if(h&&u.menuBounds!==void 0){const y=u.menuBounds;if(r.menuIcon===void 0||r.menuIcon===$n.Triangle){e.beginPath();const b=y.x+y.width/2-5.5,k=y.y+y.height/2-3;pr(e,[{x:b,y:k},{x:b+11,y:k},{x:b+5.5,y:k+6}],1),e.fillStyle=c,e.fill()}else if(r.menuIcon===$n.Dots){e.beginPath();const b=y.x+y.width/2,k=y.y+y.height/2;br(e,b,k),e.fillStyle=c,e.fill()}else{const b=y.x+(y.width-s.headerIconSize)/2,k=y.y+(y.height-s.headerIconSize)/2;f.drawSprite(r.menuIcon,"normal",e,b,k,s.headerIconSize,s)}}}function yi(e,t,n,o,i,r,l,s,a,d,f,g,m,u){const c=eo(r.title)==="rtl",h=mi(e,r,t,n,o,i,s,c);m!==void 0?m({ctx:e,theme:s,rect:{x:t,y:n,width:o,height:i},column:r,columnIndex:r.sourceIndex,isSelected:l,hoverAmount:f,isHovered:a,hasSelectedCell:d,spriteManager:g,menuBounds:(h==null?void 0:h.menuBounds)??{x:0,y:0,height:0,width:0}},()=>Po(e,t,n,o,i,r,l,s,a,f,g,u,c,h)):Po(e,t,n,o,i,r,l,s,a,f,g,u,c,h)}function Pr(e,t,n,o,i,r,l,s,a,d,f,g,m,u,c,h,y,b,k){if(b!==void 0||t[t.length-1]!==n[t.length-1])return;const E=ci(y);kt(t,a,l,s,r,(A,H,S,F,W)=>{if(A!==t[t.length-1])return;H+=A.width;const C=Math.max(H,F);C>o||(e.save(),e.beginPath(),e.rect(C,r+1,1e4,i-r-1),e.clip(),kn(W,S,i,d,f,c,h,E,(P,B,w,x)=>{if(!x&&y.length>0&&!y.some(se=>on(H,P,1e4,w,se.x,se.y,se.width,se.height)))return;const p=m.hasIndex(B),U=u.hasIndex(B);e.beginPath();const j=g==null?void 0:g(B),Y=j===void 0?k:nn(k,j);Y.bgCell!==k.bgCell&&(e.fillStyle=Y.bgCell,e.fillRect(H,P,1e4,w)),U&&(e.fillStyle=Y.bgHeader,e.fillRect(H,P,1e4,w)),p&&(e.fillStyle=Y.accentLight,e.fillRect(H,P,1e4,w))}),e.restore())})}function Rr(e,t,n,o,i,r,l,s,a){let d=!1;for(const c of t)if(!c.sticky){d=l(c.sourceIndex);break}const f=a.horizontalBorderColor??a.borderColor,g=a.borderColor,m=d?Xt(t):0;let u;if(m!==0&&(u=Ao(g,a.bgCell),e.beginPath(),e.moveTo(m+.5,0),e.lineTo(m+.5,o),e.strokeStyle=u,e.stroke()),i>0){const c=g===f&&u!==void 0?u:Ao(f,a.bgCell),h=$t(r,i,s);e.beginPath(),e.moveTo(0,o-h+.5),e.lineTo(n,o-h+.5),e.strokeStyle=c,e.stroke()}}const vi=(e,t,n)=>{let o=0,i=t,r=0,l=n;if(e!==void 0&&e.length>0){o=Number.MAX_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER;for(const s of e)o=Math.min(o,s.x-1),i=Math.max(i,s.x+s.width+1),r=Math.min(r,s.y-1),l=Math.max(l,s.y+s.height+1)}return{minX:o,maxX:i,minY:r,maxY:l}};function Tr(e,t,n,o,i,r,l,s,a,d,f,g,m,u,c){var w;const h=c.bgCell,{minX:y,maxX:b,minY:k,maxY:E}=vi(s,r,l),A=[],H=l-$t(u,m,d);let S=a,F=n,W=0;for(;S+i=k&&x<=E-1){const U=f==null?void 0:f(F),j=U==null?void 0:U.bgCell;j!==void 0&&j!==h&&F>=u-m&&A.push({x:y,y:x,w:b-y,h:p,color:j})}S+=p,F0)for(let x=0;x=y&&U<=b&&g(x+1)&&A.push({x:U,y:W,w:p.width,h:P,color:j}),C+=p.width}if(A.length===0)return;let B;e.beginPath();for(let x=A.length-1;x>=0;x--){const p=A[x];B===void 0?B=p.color:p.color!==B&&(e.fillStyle=B,e.fill(),e.beginPath(),B=p.color),e.rect(p.x,p.y,p.w,p.h)}B!==void 0&&(e.fillStyle=B,e.fill()),e.beginPath()}function Ro(e,t,n,o,i,r,l,s,a,d,f,g,m,u,c,h,y,b=!1){if(a!==void 0){e.beginPath(),e.save(),e.rect(0,0,r,l);for(const w of a)e.rect(w.x+1,w.y+1,w.width-1,w.height-1);e.clip("evenodd")}const k=y.horizontalBorderColor??y.borderColor,E=y.borderColor,{minX:A,maxX:H,minY:S,maxY:F}=vi(s,r,l),W=[];e.beginPath();let C=.5;for(let w=0;w=A&&p<=H&&u(w+1)&&W.push({x1:p,y1:Math.max(d,S),x2:p,y2:Math.min(l,F),color:E})}let P=l+.5;for(let w=h-c;w=S&&U<=F-1){const j=m==null?void 0:m(x);W.push({x1:A,y1:U,x2:H,y2:U,color:(j==null?void 0:j.horizontalBorderColor)??(j==null?void 0:j.borderColor)??k})}w+=g(x),x++}}const B=Ui(W,w=>w.color);for(const w of Object.keys(B)){e.strokeStyle=w;for(const x of B[w])e.moveTo(x.x1,x.y1),e.lineTo(x.x2,x.y2);e.stroke(),e.beginPath()}a!==void 0&&e.restore()}function Wr(e,t,n,o,i,r,l,s,a,d,f,g,m,u,c,h,y,b,k){const E=[];e.imageSmoothingEnabled=!1;const A=Math.min(i.cellYOffset,l),H=Math.max(i.cellYOffset,l);let S=0;if(typeof b=="number")S+=(H-A)*b;else for(let p=A;pi.cellYOffset&&(S=-S),S+=a-i.translateY;const F=Math.min(i.cellXOffset,r),W=Math.max(i.cellXOffset,r);let C=0;for(let p=F;pi.cellXOffset&&(C=-C),C+=s-i.translateX;const P=Xt(y);if(C!==0&&S!==0)return{regions:[]};const B=d>0?$t(m,d,b):0,w=f-P-Math.abs(C),x=g-u-B-Math.abs(S)-1;if(w>150&&x>150){const p={sx:0,sy:0,sw:f*c,sh:g*c,dx:0,dy:0,dw:f*c,dh:g*c};if(S>0?(p.sy=(u+1)*c,p.sh=x*c,p.dy=(S+u+1)*c,p.dh=x*c,E.push({x:0,y:u,width:f,height:S+1})):S<0&&(p.sy=(-S+u+1)*c,p.sh=x*c,p.dy=(u+1)*c,p.dh=x*c,E.push({x:0,y:g+S-B,width:f,height:-S+B})),C>0?(p.sx=P*c,p.sw=w*c,p.dx=(C+P)*c,p.dw=w*c,E.push({x:P-1,y:0,width:C+2,height:g})):C<0&&(p.sx=(P-C)*c,p.sw=w*c,p.dx=P*c,p.dw=w*c,E.push({x:f+C,y:0,width:-C,height:g})),e.setTransform(1,0,0,1,0,0),k){if(P>0&&C!==0&&S===0&&(o===void 0||(n==null?void 0:n[1])!==!1)){const U=P*c,j=g*c;e.drawImage(t,0,0,U,j,0,0,U,j)}if(B>0&&C===0&&S!==0&&(o===void 0||(n==null?void 0:n[0])!==!1)){const U=(g-B)*c,j=f*c,Y=B*c;e.drawImage(t,0,U,j,Y,0,U,j,Y)}}e.drawImage(t,p.sx,p.sy,p.sw,p.sh,p.dx,p.dy,p.dw,p.dh),e.scale(c,c)}return e.imageSmoothingEnabled=!0,{regions:E}}function zr(e,t,n,o,i,r,l,s,a,d){const f=[];return t!==e.cellXOffset||n!==e.cellYOffset||o!==e.translateX||i!==e.translateY||kt(a,n,o,i,s,(g,m,u,c)=>{if(g.sourceIndex===d){const h=Math.max(m,c)+1;return f.push({x:h,y:0,width:r-h,height:l}),!0}}),f}function Lr(e,t){if(t===void 0||e.width!==t.width||e.height!==t.height||e.theme!==t.theme||e.headerHeight!==t.headerHeight||e.rowHeight!==t.rowHeight||e.rows!==t.rows||e.freezeColumns!==t.freezeColumns||e.getRowThemeOverride!==t.getRowThemeOverride||e.isFocused!==t.isFocused||e.isResizing!==t.isResizing||e.verticalBorder!==t.verticalBorder||e.getCellContent!==t.getCellContent||e.highlightRegions!==t.highlightRegions||e.selection!==t.selection||e.dragAndDropState!==t.dragAndDropState||e.prelightCells!==t.prelightCells||e.touchMode!==t.touchMode||e.maxScaleFactor!==t.maxScaleFactor)return!1;if(e.mappedColumns!==t.mappedColumns){if(e.mappedColumns.length>100||e.mappedColumns.length!==t.mappedColumns.length)return!1;let n;for(let o=0;oF.style!=="no-outline");if(y===void 0||y.length===0)return;const b=Xt(s),k=$t(u,m,g),E=[a,0,s.length,u-m],A=[b,0,t,n-k],H=y.map(F=>{const W=F.range,C=F.style??"dashed";return Er(W,E,t,n,A).map(P=>{const B=P.rect,w=jn(B.x,B.y,t,n,f,d+f,o,i,r,l,u,a,m,s,g),x=B.width===1&&B.height===1?w:jn(B.x+B.width-1,B.y+B.height-1,t,n,f,d+f,o,i,r,l,u,a,m,s,g);return B.x+B.width>=s.length&&(x.width-=1),B.y+B.height>=u&&(x.height-=1),{color:F.color,style:C,clip:P.clip,rect:Mr({x:w.x,y:w.y,width:x.x+x.width-w.x,height:x.y+x.height-w.y},t,n,8)}})}),S=()=>{e.lineWidth=1;let F=!1;for(const W of H)for(const C of W)if((C==null?void 0:C.rect)!==void 0&&on(0,0,t,n,C.rect.x,C.rect.y,C.rect.width,C.rect.height)){const P=F,B=!Ir(C.clip,C.rect);B&&(e.save(),e.rect(C.clip.x,C.clip.y,C.clip.width,C.clip.height),e.clip()),C.style==="dashed"&&!F?(e.setLineDash([5,3]),F=!0):(C.style==="solid"||C.style==="solid-outline")&&F&&(e.setLineDash([]),F=!1),e.strokeStyle=C.style==="solid-outline"?qe(qe(C.color,h.borderColor),h.bgCell):sn(C.color,1),e.strokeRect(C.rect.x+.5,C.rect.y+.5,C.rect.width-1,C.rect.height-1),B&&(e.restore(),F=P)}F&&e.setLineDash([])};return S(),S}function Wo(e,t,n,o,i){e.beginPath(),e.moveTo(t,n),e.lineTo(t,o),e.lineWidth=2,e.strokeStyle=i,e.stroke(),e.globalAlpha=1}function Wn(e,t,n,o,i,r,l,s,a,d,f,g,m,u,c,h,y){if(f.current===void 0)return;const b=f.current.range,k=f.current.cell,E=[b.x+b.width-1,b.y+b.height-1];if(k[1]>=y&&E[1]>=y||!l.some(p=>p.sourceIndex===k[0]||p.sourceIndex===E[0]))return;const[H,S]=f.current.cell,F=m(f.current.cell),W=F.span??[H,H],C=S>=y-u,P=u>0&&!C?$t(y,u,g)-1:0,B=E[1];let w;if(kt(l,o,i,r,d,(p,U,j,Y,se)=>{if(p.sticky&&H>p.sourceIndex)return;const xe=p.sourceIndexW[1],ce=p.sourceIndex===E[0];if(!(!ce&&(xe||he)))return kn(se,j,n,y,g,u,c,void 0,(Le,G,Oe)=>{if(G!==S&&G!==B)return;let He=U,X=p.width;if(F.span!==void 0){const oe=ui(F.span,U,Le,p.width,Oe,p,s),Re=p.sticky?oe[0]:oe[1];Re!==void 0&&(He=Re.x,X=Re.width)}return G===B&&ce&&h&&(w=()=>{var oe;Y>He&&!p.sticky&&(e.beginPath(),e.rect(Y,0,t-Y,n),e.clip()),e.beginPath(),e.rect(He+X-4,Le+Oe-4,4,4),e.fillStyle=((oe=p.themeOverride)==null?void 0:oe.accentColor)??a.accentColor,e.fill()}),w!==void 0}),w!==void 0}),w===void 0)return;const x=()=>{e.save(),e.beginPath(),e.rect(0,d,t,n-d-P),e.clip(),w==null||w(),e.restore()};return x(),x}function Nr(e,t,n,o,i,r,l,s,a){a===void 0||a.size===0||(e.beginPath(),di(t,n,r,o,(d,f,g,m,u,c)=>{a.hasItemInRectangle({x:d[0],y:-2,width:d[1]-d[0]+1,height:1})&&e.rect(g,m,u,c)}),kt(t,s,r,l,i,(d,f,g,m)=>{const u=Math.max(0,m-f),c=f+u+1,h=d.width-u-1;a.has([d.sourceIndex,-1])&&e.rect(c,o,h,i-o)}),e.clip())}function Or(e,t,n,o,i,r,l,s,a,d){let f=0;return kt(e,r,o,i,n,(g,m,u,c,h)=>(kn(h,u,t,l,s,a,d,void 0,(y,b,k,E)=>{E||(f=Math.max(b,f))}),!0)),f}function zo(e,t){var ct;const{canvasCtx:n,headerCanvasCtx:o,width:i,height:r,cellXOffset:l,cellYOffset:s,translateX:a,translateY:d,mappedColumns:f,enableGroups:g,freezeColumns:m,dragAndDropState:u,theme:c,drawFocus:h,headerHeight:y,groupHeaderHeight:b,disabledRows:k,rowHeight:E,verticalBorder:A,overrideCursor:H,isResizing:S,selection:F,fillHandle:W,freezeTrailingRows:C,rows:P,getCellContent:B,getGroupDetails:w,getRowThemeOverride:x,isFocused:p,drawHeaderCallback:U,prelightCells:j,drawCellCallback:Y,highlightRegions:se,resizeCol:xe,imageLoader:he,lastBlitData:ce,hoverValues:Le,hyperWrapping:G,hoverInfo:Oe,spriteManager:He,maxScaleFactor:X,hasAppendRow:Be,touchMode:oe,enqueue:Re,renderStateProvider:je,getCellRenderer:lt,renderStrategy:Ct,bufferACtx:at,bufferBCtx:Ve,damage:me,minimumCellWidth:mt,resizeIndicator:yt}=e;if(i===0||r===0)return;const Xe=Ct==="double-buffer",de=Math.min(X,Math.ceil(window.devicePixelRatio??1)),$e=Ct!=="direct"&&Lr(e,t),Ce=n.canvas;(Ce.width!==i*de||Ce.height!==r*de)&&(Ce.width=i*de,Ce.height=r*de,Ce.style.width=i+"px",Ce.style.height=r+"px");const Te=o.canvas,J=g?b+y:y,we=J+1;(Te.width!==i*de||Te.height!==we*de)&&(Te.width=i*de,Te.height=we*de,Te.style.width=i+"px",Te.style.height=we+"px");const le=at.canvas,ye=Ve.canvas;Xe&&(le.width!==i*de||le.height!==r*de)&&(le.width=i*de,le.height=r*de,ce.current!==void 0&&(ce.current.aBufferScroll=void 0)),Xe&&(ye.width!==i*de||ye.height!==r*de)&&(ye.width=i*de,ye.height=r*de,ce.current!==void 0&&(ce.current.bBufferScroll=void 0));const L=ce.current;if($e===!0&&l===(L==null?void 0:L.cellXOffset)&&s===(L==null?void 0:L.cellYOffset)&&a===(L==null?void 0:L.translateX)&&d===(L==null?void 0:L.translateY))return;let V=null;Xe&&(V=n);const ue=o;let ee;Xe?me!==void 0?ee=(L==null?void 0:L.lastBuffer)==="b"?Ve:at:ee=(L==null?void 0:L.lastBuffer)==="b"?at:Ve:ee=n;const ie=ee.canvas,ke=Xe?ie===le?ye:le:Ce,fe=typeof E=="number"?()=>E:E;ue.save(),ee.save(),ue.beginPath(),ee.beginPath(),ue.textBaseline="middle",ee.textBaseline="middle",de!==1&&(ue.scale(de,de),ee.scale(de,de));const K=qn(f,l,i,u,a);let Pe=[];const Ye=h&&((ct=F.current)==null?void 0:ct.cell[1])===s&&d===0;let _e=!1;if(se!==void 0){for(const be of se)if(be.style!=="no-outline"&&be.range.y===s&&d===0){_e=!0;break}}const Se=()=>{Dr(ue,K,g,Oe,i,a,y,b,u,S,F,c,He,Le,A,w,me,U,oe),Ro(ue,K,s,a,d,i,r,void 0,void 0,b,J,fe,x,A,C,P,c,!0),ue.beginPath(),ue.moveTo(0,we-.5),ue.lineTo(i,we-.5),ue.strokeStyle=qe(c.headerBottomBorderColor??c.horizontalBorderColor??c.borderColor,c.bgHeader),ue.stroke(),_e&&To(ue,i,r,l,s,a,d,f,m,y,b,E,C,P,se,c),Ye&&Wn(ue,i,r,s,a,d,K,f,c,J,F,fe,B,C,Be,W,P)};if(me!==void 0){const be=K[K.length-1].sourceIndex+1,Ne=me.hasItemInRegion([{x:l,y:-2,width:be,height:2},{x:l,y:s,width:be,height:300},{x:0,y:s,width:m,height:300},{x:0,y:-2,width:m,height:2},{x:l,y:P-C,width:be,height:C,when:C>0}]),It=nt=>{Ho(nt,K,f,r,J,a,d,s,P,fe,B,w,x,k,p,h,C,Be,Pe,me,F,j,se,he,He,Le,Oe,Y,G,c,Re,je,lt,H,mt);const ot=F.current;W&&h&&ot!==void 0&&me.has(ti(ot.range))&&Wn(nt,i,r,s,a,d,K,f,c,J,F,fe,B,C,Be,W,P)};Ne&&(It(ee),V!==null&&(V.save(),V.scale(de,de),V.textBaseline="middle",It(V),V.restore()),me.hasHeader()&&(Nr(ue,K,i,b,J,a,d,s,me),Se())),ee.restore(),ue.restore();return}if(($e!==!0||l!==(L==null?void 0:L.cellXOffset)||a!==(L==null?void 0:L.translateX)||Ye!==(L==null?void 0:L.mustDrawFocusOnHeader)||_e!==(L==null?void 0:L.mustDrawHighlightRingsOnHeader))&&Se(),$e===!0){ft(ke!==void 0&&L!==void 0);const{regions:be}=Wr(ee,ke,ke===le?L.aBufferScroll:L.bBufferScroll,ke===le?L.bBufferScroll:L.aBufferScroll,L,l,s,a,d,C,i,r,P,J,de,f,K,E,Xe);Pe=be}else $e!==!1&&(ft(L!==void 0),Pe=zr(L,l,s,a,d,i,r,J,K,$e));Rr(ee,K,i,r,C,P,A,fe,c);const Ke=To(ee,i,r,l,s,a,d,f,m,y,b,E,C,P,se,c),We=h?Wn(ee,i,r,s,a,d,K,f,c,J,F,fe,B,C,Be,W,P):void 0;if(ee.fillStyle=c.bgCell,Pe.length>0){ee.beginPath();for(const be of Pe)ee.rect(be.x,be.y,be.width,be.height);ee.clip(),ee.fill(),ee.beginPath()}else ee.fillRect(0,0,i,r);const Ht=Ho(ee,K,f,r,J,a,d,s,P,fe,B,w,x,k,p,h,C,Be,Pe,me,F,j,se,he,He,Le,Oe,Y,G,c,Re,je,lt,H,mt);Pr(ee,K,f,i,r,J,a,d,s,P,fe,x,F.rows,k,C,Be,Pe,me,c),Tr(ee,K,s,a,d,i,r,Pe,J,fe,x,A,C,P,c),Ro(ee,K,s,a,d,i,r,Pe,Ht,b,J,fe,x,A,C,P,c),Ke==null||Ke(),We==null||We(),S&&yt!=="none"&&kt(K,0,a,0,J,(be,Ne)=>be.sourceIndex===xe?(Wo(ue,Ne+be.width,0,J+1,qe(c.resizeIndicatorColor??c.accentLight,c.bgHeader)),yt==="full"&&Wo(ee,Ne+be.width,J,r,qe(c.resizeIndicatorColor??c.accentLight,c.bgCell)),!0):!1),V!==null&&(V.fillStyle=c.bgCell,V.fillRect(0,0,i,r),V.drawImage(ee.canvas,0,0));const Pt=Or(K,r,J,a,d,s,P,fe,C,Be);he==null||he.setWindow({x:l,y:s,width:K.length,height:Pt-s},m,Array.from({length:C},(be,Ne)=>P-1-Ne));const ve=L!==void 0&&(l!==L.cellXOffset||a!==L.translateX),St=L!==void 0&&(s!==L.cellYOffset||d!==L.translateY);ce.current={cellXOffset:l,cellYOffset:s,translateX:a,translateY:d,mustDrawFocusOnHeader:Ye,mustDrawHighlightRingsOnHeader:_e,lastBuffer:Xe?ie===le?"a":"b":void 0,aBufferScroll:ie===le?[ve,St]:L==null?void 0:L.aBufferScroll,bBufferScroll:ie===ye?[ve,St]:L==null?void 0:L.bBufferScroll},ee.restore(),ue.restore()}const Xr=80;function $r(e){const t=e-1;return t*t*t+1}class Yr{constructor(t){ne(this,"currentHoveredItem");ne(this,"leavingItems",[]);ne(this,"lastAnimationTime");ne(this,"addToLeavingItems",t=>{this.leavingItems.some(o=>bn(o.item,t.item))||this.leavingItems.push(t)});ne(this,"removeFromLeavingItems",t=>{const n=this.leavingItems.find(o=>bn(o.item,t));return this.leavingItems=this.leavingItems.filter(o=>o!==n),(n==null?void 0:n.hoverAmount)??0});ne(this,"cleanUpLeavingElements",()=>{this.leavingItems=this.leavingItems.filter(t=>t.hoverAmount>0)});ne(this,"shouldStep",()=>{const t=this.leavingItems.length>0,n=this.currentHoveredItem!==void 0&&this.currentHoveredItem.hoverAmount<1;return t||n});ne(this,"getAnimatingItems",()=>this.currentHoveredItem!==void 0?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map(t=>({...t,hoverAmount:$r(t.hoverAmount)})));ne(this,"step",t=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=t;else{const o=(t-this.lastAnimationTime)/Xr;for(const r of this.leavingItems)r.hoverAmount=wn(r.hoverAmount-o,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=wn(this.currentHoveredItem.hoverAmount+o,0,1));const i=this.getAnimatingItems();this.callback(i),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=t,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0});ne(this,"setHovered",t=>{var n;if(!bn((n=this.currentHoveredItem)==null?void 0:n.item,t)){if(this.currentHoveredItem!==void 0&&this.addToLeavingItems(this.currentHoveredItem),t!==void 0){const o=this.removeFromLeavingItems(t);this.currentHoveredItem={item:t,hoverAmount:o}}else this.currentHoveredItem=void 0;this.lastAnimationTime===void 0&&window.requestAnimationFrame(this.step)}});this.callback=t}}class _r{constructor(t){ne(this,"fn");ne(this,"val");this.fn=t}get value(){return this.val??(this.val=this.fn())}}function ro(e){return new _r(e)}const Ur=ro(()=>window.navigator.userAgent.includes("Firefox")),Lo=ro(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")),gl=ro(()=>window.navigator.platform.toLowerCase().startsWith("mac"));function qr(e){const t=I.useRef([]),n=I.useRef(0),o=I.useRef(e);o.current=e;const i=I.useCallback(()=>{const r=()=>window.requestAnimationFrame(l),l=()=>{const s=t.current.map(oo);t.current=[],o.current(new Zt(s)),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?r:l)},[]);return I.useCallback(r=>{t.current.length===0&&i();const l=tt(r[0],r[1]);t.current.includes(l)||t.current.push(l)},[i])}const Dt="header",At="group-header",No="out-of-bounds";var Jt=(e=>(e[e.Start=-2]="Start",e[e.StartPadding=-1]="StartPadding",e[e.Center=0]="Center",e[e.EndPadding=1]="EndPadding",e[e.End=2]="End",e))(Jt||{});function jr(e,t){return e===t?!0:(e==null?void 0:e.kind)==="out-of-bounds"?(e==null?void 0:e.kind)===(t==null?void 0:t.kind)&&(e==null?void 0:e.location[0])===(t==null?void 0:t.location[0])&&(e==null?void 0:e.location[1])===(t==null?void 0:t.location[1])&&(e==null?void 0:e.region[0])===(t==null?void 0:t.region[0])&&(e==null?void 0:e.region[1])===(t==null?void 0:t.region[1]):(e==null?void 0:e.kind)===(t==null?void 0:t.kind)&&(e==null?void 0:e.location[0])===(t==null?void 0:t.location[0])&&(e==null?void 0:e.location[1])===(t==null?void 0:t.location[1])}const Oo=6,Vr=(e,t)=>{if(e.kind===ae.Custom)return e.copyData;const n=t==null?void 0:t(e);return(n==null?void 0:n.getAccessibilityString(e))??""},Kr=(e,t)=>{const{width:n,height:o,accessibilityHeight:i,columns:r,cellXOffset:l,cellYOffset:s,headerHeight:a,fillHandle:d=!1,groupHeaderHeight:f,rowHeight:g,rows:m,getCellContent:u,getRowThemeOverride:c,onHeaderMenuClick:h,onHeaderIndicatorClick:y,enableGroups:b,isFilling:k,onCanvasFocused:E,onCanvasBlur:A,isFocused:H,selection:S,freezeColumns:F,onContextMenu:W,freezeTrailingRows:C,fixedShadowX:P=!0,fixedShadowY:B=!0,drawFocusRing:w,onMouseDown:x,onMouseUp:p,onMouseMoveRaw:U,onMouseMove:j,onItemHovered:Y,dragAndDropState:se,firstColAccessible:xe,onKeyDown:he,onKeyUp:ce,highlightRegions:Le,canvasRef:G,onDragStart:Oe,onDragEnd:He,eventTargetRef:X,isResizing:Be,resizeColumn:oe,isDragging:Re,isDraggable:je=!1,allowResize:lt,disabledRows:Ct,hasAppendRow:at,getGroupDetails:Ve,theme:me,prelightCells:mt,headerIcons:yt,verticalBorder:Xe,drawCell:de,drawHeader:$e,onCellFocused:Ce,onDragOverCell:Te,onDrop:J,onDragLeave:we,imageWindowLoader:le,smoothScrollX:ye=!1,smoothScrollY:L=!1,experimental:V,getCellRenderer:ue,resizeIndicator:ee="full"}=e,ie=e.translateX??0,ke=e.translateY??0,fe=Math.max(F,Math.min(r.length-1,l)),K=I.useRef(null),Pe=I.useRef(window),Ye=Pe.current,_e=le,Se=I.useRef(),[Ke,We]=I.useState(!1),Ht=I.useRef([]),Pt=I.useRef(),[ve,St]=I.useState(),[ct,be]=I.useState(),Ne=I.useRef(null),[It,nt]=I.useState(),[ot,te]=I.useState(!1),Ie=I.useRef(ot);Ie.current=ot;const pe=I.useMemo(()=>new kr(yt,()=>{an.current=void 0,_t.current()}),[yt]),it=b?f+a:a,Ue=I.useRef(-1),vt=((V==null?void 0:V.enableFirefoxRescaling)??!1)&&Ur.value,Sn=((V==null?void 0:V.enableSafariRescaling)??!1)&&Lo.value;I.useLayoutEffect(()=>{window.devicePixelRatio===1||!vt&&!Sn||(Ue.current!==-1&&We(!0),window.clearTimeout(Ue.current),Ue.current=window.setTimeout(()=>{We(!1),Ue.current=-1},200))},[s,fe,ie,ke,vt,Sn]);const Me=sr(r,F),In=P?Xt(Me,se):0,Fe=I.useCallback((v,M,z)=>{const T=v.getBoundingClientRect();if(M>=Me.length||z>=m)return;const D=T.width/n,R=jn(M,z,n,o,f,it,fe,s,ie,ke,m,F,C,Me,g);return D!==1&&(R.x*=D,R.y*=D,R.width*=D,R.height*=D),R.x+=T.x,R.y+=T.y,R},[n,o,f,it,fe,s,ie,ke,m,F,C,Me,g]),ze=I.useCallback((v,M,z,T)=>{const D=v.getBoundingClientRect(),R=D.width/n,_=(M-D.left)/R,q=(z-D.top)/R,N=5,De=qn(Me,fe,n,void 0,ie);let O=0,re=0;T instanceof MouseEvent&&(O=T.button,re=T.buttons);const Q=dr(_,De,ie),Z=ur(q,o,b,a,f,m,g,s,ke,C),Ae=(T==null?void 0:T.shiftKey)===!0,Qe=(T==null?void 0:T.ctrlKey)===!0,Ee=(T==null?void 0:T.metaKey)===!0,dt=T!==void 0&&!(T instanceof MouseEvent)||(T==null?void 0:T.pointerType)==="touch",bt=[_<0?-1:n<_?1:0,qn||q>o){const ge=_>n?1:_<0?-1:0,et=q>o?1:q<0?-1:0;let rt=ge*2,qt=et*2;ge===0&&(rt=Q===-1?Jt.EndPadding:Jt.Center),et===0&&(qt=Z===void 0?Jt.EndPadding:Jt.Center);let pt=!1;if(Q===-1&&Z===-1){const jt=Fe(v,Me.length-1,-1);ft(jt!==void 0),pt=Mn&&_o&&q=0?(et=!0,ge=Fe(v,rt,Z),ft(ge!==void 0),Ze={kind:b&&Z===-2?At:Dt,location:[rt,Z],bounds:ge,group:Me[rt].group??"",isEdge:et,shiftKey:Ae,ctrlKey:Qe,metaKey:Ee,isTouch:dt,localEventX:M-ge.x,localEventY:z-ge.y,button:O,buttons:re,scrollEdge:bt}):Ze={kind:b&&Z===-2?At:Dt,group:Me[Q].group??"",location:[Q,Z],bounds:ge,isEdge:et,shiftKey:Ae,ctrlKey:Qe,metaKey:Ee,isTouch:dt,localEventX:M-ge.x,localEventY:z-ge.y,button:O,buttons:re,scrollEdge:bt}}else{const ge=Fe(v,Q,Z);ft(ge!==void 0);const et=ge!==void 0&&ge.x+ge.width-M{}),Rt=I.useRef(ve);Rt.current=ve;const[Et,Bt]=I.useMemo(()=>{const v=document.createElement("canvas"),M=document.createElement("canvas");return v.style.display="none",v.style.opacity="0",v.style.position="fixed",M.style.display="none",M.style.opacity="0",M.style.position="fixed",[v.getContext("2d",{alpha:!1}),M.getContext("2d",{alpha:!1})]},[]);I.useLayoutEffect(()=>{if(!(Et===null||Bt===null))return document.documentElement.append(Et.canvas),document.documentElement.append(Bt.canvas),()=>{Et.canvas.remove(),Bt.canvas.remove()}},[Et,Bt]);const ln=I.useMemo(()=>new wr,[]),lo=vt&&Ke?1:Sn&&Ke?2:5,ao=(V==null?void 0:V.disableMinimumCellWidth)===!0?1:10,an=I.useRef(),cn=I.useRef(null),dn=I.useRef(null),un=I.useCallback(()=>{var _;const v=K.current,M=Ne.current;if(v===null||M===null||(cn.current===null&&(cn.current=v.getContext("2d",{alpha:!1}),v.width=0,v.height=0),dn.current===null&&(dn.current=M.getContext("2d",{alpha:!1}),M.width=0,M.height=0),cn.current===null||dn.current===null||Et===null||Bt===null))return;let z=!1;const T=q=>{z=!0,nt(q)},D=an.current,R={headerCanvasCtx:dn.current,canvasCtx:cn.current,bufferACtx:Et,bufferBCtx:Bt,width:n,height:o,cellXOffset:fe,cellYOffset:s,translateX:Math.round(ie),translateY:Math.round(ke),mappedColumns:Me,enableGroups:b,freezeColumns:F,dragAndDropState:se,theme:me,headerHeight:a,groupHeaderHeight:f,disabledRows:Ct??_n.empty(),rowHeight:g,verticalBorder:Xe,isResizing:Be,resizeCol:oe,isFocused:H,selection:S,fillHandle:d,drawCellCallback:de,hasAppendRow:at,overrideCursor:T,maxScaleFactor:lo,freezeTrailingRows:C,rows:m,drawFocus:w,getCellContent:u,getGroupDetails:Ve??(q=>({name:q})),getRowThemeOverride:c,drawHeaderCallback:$e,prelightCells:mt,highlightRegions:Le,imageLoader:_e,lastBlitData:Pt,damage:Se.current,hoverValues:Ht.current,hoverInfo:Rt.current,spriteManager:pe,scrolling:Ke,hyperWrapping:(V==null?void 0:V.hyperWrapping)??!1,touchMode:ot,enqueue:so.current,renderStateProvider:ln,renderStrategy:(V==null?void 0:V.renderStrategy)??(Lo.value?"double-buffer":"single-buffer"),getCellRenderer:ue,minimumCellWidth:ao,resizeIndicator:ee};R.damage===void 0?(an.current=R,zo(R,D)):zo(R,void 0),!z&&(R.damage===void 0||R.damage.has((_=Rt==null?void 0:Rt.current)==null?void 0:_[0]))&&nt(void 0)},[Et,Bt,n,o,fe,s,ie,ke,Me,b,F,se,me,a,f,Ct,g,Xe,Be,at,oe,H,S,d,C,m,w,lo,u,Ve,c,de,$e,mt,Le,_e,pe,Ke,V==null?void 0:V.hyperWrapping,V==null?void 0:V.renderStrategy,ot,ln,ue,ao,ee]),_t=I.useRef(un);I.useLayoutEffect(()=>{un(),_t.current=un},[un]),I.useLayoutEffect(()=>{(async()=>{var M;((M=document==null?void 0:document.fonts)==null?void 0:M.ready)!==void 0&&(await document.fonts.ready,an.current=void 0,_t.current())})()},[]);const Tt=I.useCallback(v=>{Se.current=v,_t.current(),Se.current=void 0},[]),bi=qr(Tt);so.current=bi;const co=I.useCallback(v=>{Tt(new Zt(v.map(M=>M.cell)))},[Tt]);_e.setCallback(Tt);const[pi,wi]=I.useState(!1),[fn,Wt]=Mt??[],xi=fn!==void 0&&Wt===-1,ki=fn!==void 0&&Wt===-2;let uo=!1,fo=!1,hn=It;if(hn===void 0&&fn!==void 0&&Wt!==void 0&&Wt>-1&&Wt({contain:"strict",display:"block",cursor:ho}),[ho]),go=I.useRef("default"),En=X==null?void 0:X.current;En!=null&&go.current!==Mn.cursor&&(En.style.cursor=go.current=Mn.cursor);const zt=I.useCallback((v,M,z,T)=>{if(Ve===void 0)return;const D=Ve(v);if(D.actions!==void 0){const R=gi(M,D.actions);for(const[_,q]of R.entries())if(en(q,z+M.x,T+q.y))return D.actions[_]}},[Ve]),Lt=I.useCallback((v,M,z,T)=>{const D=Me[M];if(!Re&&!Be&&!(ct??!1)){const R=Fe(v,M,-1);ft(R!==void 0);const _=mi(void 0,D,R.x,R.y,R.width,R.height,me,eo(D.title)==="rtl");if(D.hasMenu===!0&&_.menuBounds!==void 0&&en(_.menuBounds,z,T))return{area:"menu",bounds:_.menuBounds};if(D.indicatorIcon!==void 0&&_.indicatorIconBounds!==void 0&&en(_.indicatorIconBounds,z,T))return{area:"indicator",bounds:_.indicatorIconBounds}}},[Me,Fe,ct,Re,Be,me]),Bn=I.useRef(0),Ut=I.useRef(),Fn=I.useRef(!1),mo=I.useCallback(v=>{const M=K.current,z=X==null?void 0:X.current;if(M===null||v.target!==M&&v.target!==z)return;Fn.current=!0;let T,D;if(v instanceof MouseEvent?(T=v.clientX,D=v.clientY):(T=v.touches[0].clientX,D=v.touches[0].clientY),v.target===z&&z!==null){const _=z.getBoundingClientRect();if(T>_.right||D>_.bottom)return}const R=ze(M,T,D,v);Ut.current=R.location,R.isTouch&&(Bn.current=Date.now()),Ie.current!==R.isTouch&&te(R.isTouch),!(R.kind===Dt&&Lt(M,R.location[0],T,D)!==void 0)&&(R.kind===At&&zt(R.group,R.bounds,R.localEventX,R.localEventY)!==void 0||(x==null||x(R),!R.isTouch&&je!==!0&&je!==R.kind&&R.button<3&&R.button!==1&&v.preventDefault()))},[X,je,ze,zt,Lt,x]);Ge("touchstart",mo,Ye,!1),Ge("mousedown",mo,Ye,!1);const yo=I.useRef(0),vo=I.useCallback(v=>{var re,Q;const M=yo.current;yo.current=Date.now();const z=K.current;if(Fn.current=!1,p===void 0||z===null)return;const T=X==null?void 0:X.current,D=v.target!==z&&v.target!==T;let R,_,q=!0;if(v instanceof MouseEvent){if(R=v.clientX,_=v.clientY,q=v.button<3,v.pointerType==="touch")return}else R=v.changedTouches[0].clientX,_=v.changedTouches[0].clientY;let N=ze(z,R,_,v);N.isTouch&&Bn.current!==0&&Date.now()-Bn.current>500&&(N={...N,isLongTouch:!0}),M!==0&&Date.now()-M<(N.isTouch?1e3:500)&&(N={...N,isDoubleClick:!0}),Ie.current!==N.isTouch&&te(N.isTouch),!D&&v.cancelable&&q&&v.preventDefault();const[De]=N.location,O=Lt(z,De,R,_);if(N.kind===Dt&&O!==void 0){(N.button!==0||((re=Ut.current)==null?void 0:re[0])!==De||((Q=Ut.current)==null?void 0:Q[1])!==-1)&&p(N,!0);return}else if(N.kind===At){const Z=zt(N.group,N.bounds,N.localEventX,N.localEventY);if(Z!==void 0){N.button===0&&Z.onClick(N);return}}p(N,D)},[p,X,ze,Lt,zt]);Ge("mouseup",vo,Ye,!1),Ge("touchend",vo,Ye,!1);const Ci=I.useCallback(v=>{var De,O;const M=K.current;if(M===null)return;const z=X==null?void 0:X.current,T=v.target!==M&&v.target!==z;let D,R,_=!0;v instanceof MouseEvent?(D=v.clientX,R=v.clientY,_=v.button<3):(D=v.changedTouches[0].clientX,R=v.changedTouches[0].clientY);const q=ze(M,D,R,v);Ie.current!==q.isTouch&&te(q.isTouch),!T&&v.cancelable&&_&&v.preventDefault();const[N]=q.location;if(q.kind===Dt){const re=Lt(M,N,D,R);re!==void 0&&q.button===0&&((De=Ut.current)==null?void 0:De[0])===N&&((O=Ut.current)==null?void 0:O[1])===-1&&(re.area==="menu"?h==null||h(N,re.bounds):re.area==="indicator"&&(y==null||y(N,re.bounds)))}else if(q.kind===At){const re=zt(q.group,q.bounds,q.localEventX,q.localEventY);re!==void 0&&q.button===0&&re.onClick(q)}},[X,ze,Lt,h,y,zt]);Ge("click",Ci,Ye,!1);const Si=I.useCallback(v=>{const M=K.current,z=X==null?void 0:X.current;if(M===null||v.target!==M&&v.target!==z||W===void 0)return;const T=ze(M,v.clientX,v.clientY,v);W(T,()=>{v.cancelable&&v.preventDefault()})},[X,ze,W]);Ge("contextmenu",Si,(X==null?void 0:X.current)??null,!1);const bo=I.useCallback(v=>{Se.current=new Zt(v.map(M=>M.item)),Ht.current=v,_t.current(),Se.current=void 0},[]),po=I.useMemo(()=>new Yr(bo),[bo]),wo=I.useRef(po);wo.current=po,I.useLayoutEffect(()=>{const v=wo.current;if(Mt===void 0||Mt[1]<0){v.setHovered(Mt);return}const M=u(Mt,!0),z=ue(M),T=z===void 0&&M.kind===ae.Custom||(z==null?void 0:z.needsHover)!==void 0&&(typeof z.needsHover=="boolean"?z.needsHover:z.needsHover(M));v.setHovered(T?Mt:void 0)},[u,ue,Mt]);const xo=I.useRef(),Ii=I.useCallback(v=>{var q;const M=K.current;if(M===null)return;const z=X==null?void 0:X.current,T=v.target!==M&&v.target!==z,D=ze(M,v.clientX,v.clientY,v);if(D.kind!=="out-of-bounds"&&T&&!Fn.current&&!D.isTouch)return;const R=(N,De)=>{St(O=>O===N||(O==null?void 0:O[0][0])===(N==null?void 0:N[0][0])&&(O==null?void 0:O[0][1])===(N==null?void 0:N[0][1])&&((O==null?void 0:O[1][0])===(N==null?void 0:N[1][0])&&(O==null?void 0:O[1][1])===(N==null?void 0:N[1][1])||!De)?O:N)};if(!jr(D,xo.current))nt(void 0),Y==null||Y(D),R(D.kind===No?void 0:[D.location,[D.localEventX,D.localEventY]],!0),xo.current=D;else if(D.kind==="cell"||D.kind===Dt||D.kind===At){let N=!1,De=!0;if(D.kind==="cell"){const re=u(D.location);De=((q=ue(re))==null?void 0:q.needsHoverPosition)??re.kind===ae.Custom,N=De}else D.kind===At&&(N=!0);const O=[D.location,[D.localEventX,D.localEventY]];R(O,De),Rt.current=O,N&&Tt(new Zt([D.location]))}const _=D.location[0]>=(xe?0:1);be(D.kind===Dt&&D.isEdge&&_&<===!0),wi(D.kind==="cell"&&D.isFillHandle),U==null||U(v),j(D)},[X,ze,xe,lt,U,j,Y,u,ue,Tt]);Ge("mousemove",Ii,Ye,!0);const Mi=I.useCallback(v=>{const M=K.current;if(M===null)return;let z,T;S.current!==void 0&&(z=Fe(M,S.current.cell[0],S.current.cell[1]),T=S.current.cell),he==null||he({bounds:z,stopPropagation:()=>v.stopPropagation(),preventDefault:()=>v.preventDefault(),cancel:()=>{},ctrlKey:v.ctrlKey,metaKey:v.metaKey,shiftKey:v.shiftKey,altKey:v.altKey,key:v.key,keyCode:v.keyCode,rawEvent:v,location:T})},[he,S,Fe]),Ei=I.useCallback(v=>{const M=K.current;if(M===null)return;let z,T;S.current!==void 0&&(z=Fe(M,S.current.cell[0],S.current.cell[1]),T=S.current.cell),ce==null||ce({bounds:z,stopPropagation:()=>v.stopPropagation(),preventDefault:()=>v.preventDefault(),cancel:()=>{},ctrlKey:v.ctrlKey,metaKey:v.metaKey,shiftKey:v.shiftKey,altKey:v.altKey,key:v.key,keyCode:v.keyCode,rawEvent:v,location:T})},[ce,S,Fe]),Bi=I.useCallback(v=>{if(K.current=v,G!==void 0&&(G.current=v),v===null)Pe.current=window;else{const M=v.getRootNode();M===document&&(Pe.current=window),Pe.current=M}},[G]),Fi=I.useCallback(v=>{const M=K.current;if(M===null||je===!1||Be){v.preventDefault();return}let z,T;const D=ze(M,v.clientX,v.clientY);if(je!==!0&&D.kind!==je){v.preventDefault();return}const R=(re,Q)=>{z=re,T=Q};let _,q,N;const De=(re,Q,Z)=>{_=re,q=Q,N=Z};let O=!1;if(Oe==null||Oe({...D,setData:R,setDragImage:De,preventDefault:()=>O=!0,defaultPrevented:()=>O}),!O&&z!==void 0&&T!==void 0&&v.dataTransfer!==null)if(v.dataTransfer.setData(z,T),v.dataTransfer.effectAllowed="copyLink",_!==void 0&&q!==void 0&&N!==void 0)v.dataTransfer.setDragImage(_,q,N);else{const[re,Q]=D.location;if(Q!==void 0){const Z=document.createElement("canvas"),Ae=Fe(M,re,Q);ft(Ae!==void 0);const Qe=Math.ceil(window.devicePixelRatio??1);Z.width=Ae.width*Qe,Z.height=Ae.height*Qe;const Ee=Z.getContext("2d");Ee!==null&&(Ee.scale(Qe,Qe),Ee.textBaseline="middle",Q===-1?(Ee.font=me.headerFontFull,Ee.fillStyle=me.bgHeader,Ee.fillRect(0,0,Z.width,Z.height),yi(Ee,0,0,Ae.width,Ae.height,Me[re],!1,me,!1,!1,0,pe,$e,!1)):(Ee.font=me.baseFontFull,Ee.fillStyle=me.bgCell,Ee.fillRect(0,0,Z.width,Z.height),hi(Ee,u([re,Q]),0,Q,!1,!1,0,0,Ae.width,Ae.height,!1,me,me.bgCell,_e,pe,1,void 0,!1,0,void 0,void 0,void 0,ln,ue,()=>{}))),Z.style.left="-100%",Z.style.position="absolute",Z.style.width=`${Ae.width}px`,Z.style.height=`${Ae.height}px`,document.body.append(Z),v.dataTransfer.setDragImage(Z,Ae.width/2,Ae.height/2),window.setTimeout(()=>{Z.remove()},0)}}else v.preventDefault()},[je,Be,ze,Oe,Fe,me,Me,pe,$e,u,_e,ln,ue]);Ge("dragstart",Fi,(X==null?void 0:X.current)??null,!1,!1);const Dn=I.useRef(),Di=I.useCallback(v=>{const M=K.current;if(J!==void 0&&v.preventDefault(),M===null||Te===void 0)return;const z=ze(M,v.clientX,v.clientY),[T,D]=z.location,R=T-(xe?0:1),[_,q]=Dn.current??[];(_!==R||q!==D)&&(Dn.current=[R,D],Te([R,D],v.dataTransfer))},[xe,ze,Te,J]);Ge("dragover",Di,(X==null?void 0:X.current)??null,!1,!1);const Ai=I.useCallback(()=>{Dn.current=void 0,He==null||He()},[He]);Ge("dragend",Ai,(X==null?void 0:X.current)??null,!1,!1);const Hi=I.useCallback(v=>{const M=K.current;if(M===null||J===void 0)return;v.preventDefault();const z=ze(M,v.clientX,v.clientY),[T,D]=z.location,R=T-(xe?0:1);J([R,D],v.dataTransfer)},[xe,ze,J]);Ge("drop",Hi,(X==null?void 0:X.current)??null,!1,!1);const Pi=I.useCallback(()=>{we==null||we()},[we]);Ge("dragleave",Pi,(X==null?void 0:X.current)??null,!1,!1);const ko=I.useRef(S);ko.current=S;const gn=I.useRef(null),An=I.useCallback(v=>{var M;K.current===null||!K.current.contains(document.activeElement)||(v===null&&ko.current.current!==void 0?(M=G==null?void 0:G.current)==null||M.focus({preventScroll:!0}):v!==null&&v.focus({preventScroll:!0}),gn.current=v)},[G]);I.useImperativeHandle(t,()=>({focus:()=>{var M;const v=gn.current;v===null||!document.contains(v)?(M=G==null?void 0:G.current)==null||M.focus({preventScroll:!0}):v.focus({preventScroll:!0})},getBounds:(v,M)=>{if(!(G===void 0||G.current===null))return Fe(G.current,v??0,M??-1)},damage:co}),[G,co,Fe]);const Hn=I.useRef(),Ri=nr(()=>{var q,N,De;if(n<50||(V==null?void 0:V.disableAccessibilityTree)===!0)return null;let v=qn(Me,fe,n,se,ie);const M=xe?0:-1;!xe&&((q=v[0])==null?void 0:q.sourceIndex)===0&&(v=v.slice(1));const[z,T]=((N=S.current)==null?void 0:N.cell)??[],D=(De=S.current)==null?void 0:De.range,R=v.map(O=>O.sourceIndex),_=qi(s,Math.min(m,s+i));return z!==void 0&&T!==void 0&&!(R.includes(z)&&_.includes(T))&&An(null),Je("table",{role:"grid","aria-rowcount":m+1,"aria-multiselectable":"true","aria-colcount":Me.length+M,children:[$("thead",{role:"rowgroup",children:$("tr",{role:"row","aria-rowindex":1,children:v.map(O=>$("th",{role:"columnheader","aria-selected":S.columns.hasIndex(O.sourceIndex),"aria-colindex":O.sourceIndex+1+M,tabIndex:-1,onFocus:re=>{if(re.target!==gn.current)return Ce==null?void 0:Ce([O.sourceIndex,-1])},children:O.title},O.sourceIndex))})}),$("tbody",{role:"rowgroup",children:_.map(O=>$("tr",{role:"row","aria-selected":S.rows.hasIndex(O),"aria-rowindex":O+2,children:v.map(re=>{const Q=re.sourceIndex,Z=tt(Q,O),Ae=z===Q&&T===O,Qe=D!==void 0&&Q>=D.x&&Q=D.y&&O{const Ze=G==null?void 0:G.current;if(Ze!=null)return he==null?void 0:he({bounds:Fe(Ze,Q,O),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:dt})},onFocusCapture:Ze=>{var ge,et;if(!(Ze.target===gn.current||((ge=Hn.current)==null?void 0:ge[0])===Q&&((et=Hn.current)==null?void 0:et[1])===O))return Hn.current=dt,Ce==null?void 0:Ce(dt)},ref:Ae?An:void 0,tabIndex:-1,children:Vr(bt,ue)},Z)})},O))})]},"access-tree")},[n,Me,fe,se,ie,m,s,i,S,An,u,G,he,Fe,Ce],200),mn=F===0||!P?0:fe>F?1:wn(-ie/100,0,1),Ti=-s*32+ke,yn=B?wn(-Ti/100,0,1):0,Wi=I.useMemo(()=>{if(!mn&&!yn)return null;const v={position:"absolute",top:0,left:In,width:n-In,height:o,opacity:mn,pointerEvents:"none",transition:ye?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},M={position:"absolute",top:it,left:0,width:n,height:o,opacity:yn,pointerEvents:"none",transition:L?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return Je(Xn,{children:[mn>0&&$("div",{id:"shadow-x",style:v}),yn>0&&$("div",{id:"shadow-y",style:M})]})},[mn,yn,In,n,ye,it,o,L]),zi=I.useMemo(()=>({position:"absolute",top:0,left:0}),[]);return Je(Xn,{children:[$("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:Mi,onKeyUp:Ei,onFocus:E,onBlur:A,ref:Bi,style:Mn,children:Ri}),$("canvas",{ref:Ne,style:zi}),Wi]})},ml=I.memo(I.forwardRef(Kr));function Gr(e){if(e.copyData!==void 0)return{formatted:e.copyData,rawValue:e.copyData,format:"string"};switch(e.kind){case ae.Boolean:return{formatted:e.data===!0?"TRUE":e.data===!1?"FALSE":e.data===Qn?"INDETERMINATE":"",rawValue:e.data,format:"boolean"};case ae.Custom:return{formatted:e.copyData,rawValue:e.copyData,format:"string"};case ae.Image:case ae.Bubble:return{formatted:e.data,rawValue:e.data,format:"string-array"};case ae.Drilldown:return{formatted:e.data.map(t=>t.text),rawValue:e.data.map(t=>t.text),format:"string-array"};case ae.Text:return{formatted:e.displayData??e.data,rawValue:e.data,format:"string"};case ae.Uri:return{formatted:e.displayData??e.data,rawValue:e.data,format:"url"};case ae.Markdown:case ae.RowID:return{formatted:e.data,rawValue:e.data,format:"string"};case ae.Number:return{formatted:e.displayData,rawValue:e.data,format:"number"};case ae.Loading:return{formatted:"#LOADING",rawValue:"",format:"string"};case ae.Protected:return{formatted:"************",rawValue:"",format:"string"};default:Jn()}}function Jr(e,t){return e.map((o,i)=>{const r=t[i];return o.map(l=>l.span!==void 0&&l.span[0]!==r?{formatted:"",rawValue:"",format:"string"}:Gr(l))})}function Xo(e,t){return(t?/[\t\n",]/:/[\t\n"]/).test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}function Qr(e){var n;const t=[];for(const o of e){const i=[];for(const r of o)r.format==="url"?i.push(((n=r.rawValue)==null?void 0:n.toString())??""):r.format==="string-array"?i.push(r.formatted.map(l=>Xo(l,!0)).join(",")):i.push(Xo(r.formatted,!1));t.push(i.join(" "))}return t.join(` `)}function zn(e){return e.replace(/\t/g," ").replace(/ {2,}/g,t=>" ".repeat(t.length))}function $o(e){return'"'+e.replace(/&/g,"&").replace(/"/g,""").replace(//g,">")+'"'}function Zr(e){return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function es(e){var n;const t=[];t.push('',"");for(const o of e){t.push("");for(const i of o){const r=`gdg-format="${i.format}"`;i.format==="url"?t.push(``):i.format==="string-array"?t.push(``):t.push(``)}t.push("")}return t.push("
${zn(i.formatted)}
    ${i.formatted.map((l,s)=>`
  1. `+zn(l)+"
  2. ").join("")}
${zn(i.formatted)}
"),t.join("")}function ts(e,t){const n=Jr(e,t),o=Qr(n),i=es(n);return{textPlain:o,textHtml:i}}function yl(e){var l;const t=document.createElement("html");t.innerHTML=e.replace(/ /g," ");const n=t.querySelector("table");if(n===null)return;const o=[n],i=[];let r;for(;o.length>0;){const s=o.pop();if(s===void 0)break;if(s instanceof HTMLTableElement||s.nodeName==="TBODY")o.push(...[...s.children].reverse());else if(s instanceof HTMLTableRowElement)r!==void 0&&i.push(r),r=[],o.push(...[...s.children].reverse());else if(s instanceof HTMLTableCellElement){const a=s.cloneNode(!0),f=a.children.length===1&&a.children[0].nodeName==="P"?a.children[0]:null,g=(f==null?void 0:f.children.length)===1&&f.children[0].nodeName==="FONT",m=a.querySelectorAll("br");for(const h of m)h.replaceWith(` `);const u=a.getAttribute("gdg-raw-value"),c=a.getAttribute("gdg-format")??"string";if(a.querySelector("a")!==null)r==null||r.push({rawValue:((l=a.querySelector("a"))==null?void 0:l.getAttribute("href"))??"",formatted:a.textContent??"",format:c});else if(a.querySelector("ol")!==null){const h=a.querySelectorAll("li");r==null||r.push({rawValue:[...h].map(y=>y.getAttribute("gdg-raw-value")??""),formatted:[...h].map(y=>y.textContent??""),format:"string-array"})}else if(u!==null)r==null||r.push({rawValue:Zr(u),formatted:a.textContent??"",format:c});else{let h=a.textContent??"";g&&(h=h.replace(/\n(?!\n)/g,"")),r==null||r.push({rawValue:h??"",formatted:h??"",format:c})}}}return r!==void 0&&i.push(r),i}function vl(e,t,n,o,i){var s;const r=e;if(o==="allowPartial"||e.current===void 0||t===void 0)return e;let l=!1;do{if((e==null?void 0:e.current)===void 0)break;const a=(s=e.current)==null?void 0:s.range,d=[];if(a.width>2){const m=t({x:a.x,y:a.y,width:1,height:a.height},i.signal);if(typeof m=="function")return r;d.push(...m);const u=t({x:a.x+a.width-1,y:a.y,width:1,height:a.height},i.signal);if(typeof u=="function")return r;d.push(...u)}else{const m=t({x:a.x,y:a.y,width:a.width,height:a.height},i.signal);if(typeof m=="function")return r;d.push(...m)}let f=a.x-n,g=a.x+a.width-1-n;for(const m of d)for(const u of m)u.span!==void 0&&(f=Math.min(u.span[0],f),g=Math.max(u.span[1],g));f===a.x-n&&g===a.x+a.width-1-n?l=!0:e={current:{cell:e.current.cell??[0,0],range:{x:f+n,y:a.y,width:g-f+1,height:a.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!l);return e}function Yo(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function bl(e){let t;(s=>{s[s.None=0]="None",s[s.inString=1]="inString",s[s.inStringPostQuote=2]="inStringPostQuote"})(t||(t={}));const n=[];let o=[],i=0,r=0;e=e.replace(/\r\n/g,` @@ -9,7 +9,7 @@ var Li=Object.defineProperty;var Ni=(e,t,n)=>t in e?Li(e,t,{enumerable:!0,config `&&(n.push(o),o=[])),r=0);break}l++}return is.map(a=>({rawValue:a,formatted:a,format:"string"})))}function pl(e,t,n){var s;const o=ts(e,t),i=a=>{var d;(d=window.navigator.clipboard)==null||d.writeText(a)},r=(a,d)=>{var f;return((f=window.navigator.clipboard)==null?void 0:f.write)===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([d],{type:"text/html"})})]),!0)},l=(a,d)=>{var f,g;try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");(f=n==null?void 0:n.clipboardData)==null||f.setData("text/plain",a),(g=n==null?void 0:n.clipboardData)==null||g.setData("text/html",d)}catch{r(a,d)||i(a)}};((s=window.navigator.clipboard)==null?void 0:s.write)!==void 0||(n==null?void 0:n.clipboardData)!==void 0?l(o.textPlain,o.textHtml):i(o.textPlain),n==null||n.preventDefault()}function ns(e){return e!==!0}const _o=20,os={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??"false"},kind:ae.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>is(e,e.cell.data,Yn(e.cell),e.cell.maxSize??_o),onDelete:e=>({...e,data:!1}),onClick:e=>{const{cell:t,posX:n,posY:o,bounds:i,theme:r}=e,{width:l,height:s,x:a,y:d}=i,f=t.maxSize??_o,g=Math.floor(i.y+s/2),m=Qo(f,s,r.cellVerticalPadding),u=Jo(t.contentAlign??"center",a,l,r.cellHorizontalPadding,m),c=Go(u,g,m),h=Zo(a+n,d+o,c);if(Yn(t)&&h)return{...t,data:ns(t.data)}},onPaste:(e,t)=>{let n=xn;return e.toLowerCase()==="true"?n=!0:e.toLowerCase()==="false"?n=!1:e.toLowerCase()==="indeterminate"&&(n=Qn),n===t.data?void 0:{...t,data:n}}};function is(e,t,n,o){if(!n&&t===xn)return;const{ctx:i,hoverAmount:r,theme:l,rect:s,highlighted:a,hoverX:d,hoverY:f,cell:{contentAlign:g}}=e,{x:m,y:u,width:c,height:h}=s,y=.35;let b=n?1-y+y*r:.4;t===xn&&(b*=r),b!==0&&(i.globalAlpha=b,io(i,l,t,m,u,c,h,a,d,f,o,g),i.globalAlpha=1)}const rs=gt("div")({name:"BubblesOverlayEditorStyle",class:"bed7b9f",propsAsIs:!1}),ss=e=>{const{bubbles:t}=e;return Je(rs,{children:[t.map((n,o)=>$("div",{className:"boe-bubble",children:n},o)),$("textarea",{className:"gdg-input",autoFocus:!0})]})},ls=ss,as={getAccessibilityString:e=>ei(e.data),kind:ae.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((o,i)=>e.measureText(i).width+o+20,0)+2*n.cellHorizontalPadding-4,draw:e=>ds(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return $(ls,{bubbles:t.data})},onPaste:()=>{}},cs=4;function ds(e,t){const{rect:n,theme:o,ctx:i,highlighted:r}=e,{x:l,y:s,width:a,height:d}=n,f=20,g=8,m=cs;let u=l+o.cellHorizontalPadding;const c=[];for(const h of t){if(u>l+a)break;const y=Yt(h,i,o.baseFontFull).width;c.push({x:u,width:y}),u+=y+g*2+m}i.beginPath();for(const h of c)st(i,h.x,s+(d-f)/2,h.width+g*2,f,o.roundingRadius??f/2);i.fillStyle=r?o.bgBubbleSelected:o.bgBubble,i.fill();for(const[h,y]of c.entries())i.beginPath(),i.fillStyle=o.textBubble,i.fillText(t[h],y.x+g,s+d/2+xt(i,o))}const us=gt("div")({name:"DrilldownOverlayEditorStyle",class:"dy18k32",propsAsIs:!1}),fs=e=>{const{drilldowns:t}=e;return $(us,{children:t.map((n,o)=>Je("div",{className:"doe-bubble",children:[n.img!==void 0&&$("img",{src:n.img}),$("div",{children:n.text})]},o))})},hs=fs,gs={getAccessibilityString:e=>ei(e.data.map(t=>t.text)),kind:ae.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((o,i)=>e.measureText(i.text).width+o+20+(i.img!==void 0?18:0),0)+2*n.cellHorizontalPadding-4,draw:e=>vs(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return $(hs,{drilldowns:t.data})},onPaste:()=>{}},ms=4,Ln={};function ys(e,t,n,o){const i=Math.ceil(window.devicePixelRatio),r=5,l=n-r*2,s=4,a=n*i,d=o+r,f=o*3,g=(f+r*2)*i,m=`${e},${t},${i},${n}`;if(Ln[m]!==void 0)return{el:Ln[m],height:a,width:g,middleWidth:s*i,sideWidth:d*i,padding:r*i,dpr:i};const u=document.createElement("canvas"),c=u.getContext("2d");return c===null?null:(u.width=g,u.height=a,c.scale(i,i),Ln[m]=u,c.beginPath(),st(c,r,r,f,l,o),c.shadowColor="rgba(24, 25, 34, 0.4)",c.shadowBlur=1,c.fillStyle=e,c.fill(),c.shadowColor="rgba(24, 25, 34, 0.3)",c.shadowOffsetY=1,c.shadowBlur=5,c.fillStyle=e,c.fill(),c.shadowOffsetY=0,c.shadowBlur=0,c.shadowBlur=0,c.beginPath(),st(c,r+.5,r+.5,f,l,o),c.strokeStyle=t,c.lineWidth=1,c.stroke(),{el:u,height:a,width:g,sideWidth:d*i,middleWidth:o*i,padding:r*i,dpr:i})}function vs(e,t){const{rect:n,theme:o,ctx:i,imageLoader:r,col:l,row:s}=e,{x:a,width:d}=n,f=o.baseFontFull,g=si(i,f),m=Math.min(n.height,Math.max(16,Math.ceil(g*o.lineHeight)*2)),u=Math.floor(n.y+(n.height-m)/2),c=m-10,h=8,y=ms;let b=a+o.cellHorizontalPadding;const k=o.roundingRadius??6,E=ys(o.bgCell,o.drilldownBorder,m,k),A=[];for(const H of t){if(b>a+d)break;const F=Yt(H.text,i,f).width;let W=0;H.img!==void 0&&r.loadOrGetImage(H.img,l,s)!==void 0&&(W=c-8+4);const C=F+W+h*2;A.push({x:b,width:C}),b+=C+y}if(E!==null){const{el:H,height:S,middleWidth:F,sideWidth:W,width:C,dpr:P,padding:B}=E,w=W/P,x=B/P;for(const p of A){const U=Math.floor(p.x),j=Math.floor(p.width),Y=j-(w-x)*2;i.imageSmoothingEnabled=!1,i.drawImage(H,0,0,W,S,U-x,u,w,m),Y>0&&i.drawImage(H,W,0,F,S,U+(w-x),u,Y,m),i.drawImage(H,C-W,0,W,S,U+j-(w-x),u,w,m),i.imageSmoothingEnabled=!0}}i.beginPath();for(const[H,S]of A.entries()){const F=t[H];let W=S.x+h;if(F.img!==void 0){const C=r.loadOrGetImage(F.img,l,s);if(C!==void 0){const P=c-8;let B=0,w=0,x=C.width,p=C.height;x>p?(B+=(x-p)/2,x=p):p>x&&(w+=(p-x)/2,p=x),i.beginPath(),st(i,W,u+m/2-P/2,P,P,o.roundingRadius??3),i.save(),i.clip(),i.drawImage(C,B,w,x,p,W,u+m/2-P/2,P,P),i.restore(),W+=P+4}}i.beginPath(),i.fillStyle=o.textBubble,i.fillText(F.text,W,u+m/2+xt(i,o))}}const bs=gt("div")({name:"ImageOverlayEditorStyle",class:"i1f2fhaz",propsAsIs:!1}),ps=e=>{const{urls:t,canWrite:n,onEditClick:o,renderImage:i}=e,r=t.filter(s=>s!=="");if(r.length===0)return null;const l=r.length>1;return Je(bs,{"data-testid":"GDG-default-image-overlay-editor",children:[$(ji.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l,children:r.map(s=>{const a=(i==null?void 0:i(s))??$("img",{draggable:!1,src:s});return $("div",{className:"gdg-centering-container",children:a},s)})}),n&&o&&$("button",{className:"gdg-edit-icon",onClick:o,children:$(Zn,{})})]})},ws={getAccessibilityString:e=>e.data.join(", "),kind:ae.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>xs(e,e.cell.displayData??e.cell.data,e.cell.rounding??e.theme.roundingRadius??4,e.cell.contentAlign),measure:(e,t)=>t.data.length*50,onDelete:e=>({...e,data:[]}),provideEditor:()=>e=>{const{value:t,onFinishedEditing:n,imageEditorOverride:o}=e;return $(o??ps,{urls:t.data,canWrite:t.readonly!==!1,onCancel:n,onChange:r=>{n({...t,data:[r]})}})},onPaste:(e,t)=>{e=e.trim();const o=e.split(",").map(i=>{try{return new URL(i),i}catch{return}}).filter(i=>i!==void 0);if(!(o.length===t.data.length&&o.every((i,r)=>i===t.data[r])))return{...t,data:o}}},Nn=4;function xs(e,t,n,o){const{rect:i,col:r,row:l,theme:s,ctx:a,imageLoader:d}=e,{x:f,y:g,height:m,width:u}=i,c=m-s.cellVerticalPadding*2,h=[];let y=0;for(let k=0;k0&&(a.beginPath(),st(a,b,g+s.cellVerticalPadding,E,c,n),a.save(),a.clip()),a.drawImage(k,b,g+s.cellVerticalPadding,E,c),n>0&&a.restore(),b+=E+Nn}}function ks(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const Cs={getAccessibilityString:()=>"",kind:ae.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:e=>{const{cell:t,col:n,row:o,ctx:i,rect:r,theme:l}=e;if(t.skeletonWidth===void 0||t.skeletonWidth===0)return;let s=t.skeletonWidth;t.skeletonWidthVariability!==void 0&&t.skeletonWidthVariability>0&&(s+=Math.round(ks(n,o)*t.skeletonWidthVariability));const a=l.cellHorizontalPadding,d=t.skeletonHeight??Math.min(18,r.height-2*l.cellVerticalPadding);st(i,r.x+a,r.y+(r.height-d)/2,s,d,l.roundingRadius??3),i.fillStyle=sn(l.textDark,.1),i.fill()},onPaste:()=>{}},Ss=gt("div")({name:"MarkdownContainer",class:"m1ec5h7p",propsAsIs:!1});class Is extends Gn.PureComponent{constructor(){super(...arguments);ne(this,"targetElement",null);ne(this,"containerRefHook",n=>{this.targetElement=n,this.renderMarkdownIntoDiv()})}renderMarkdownIntoDiv(){const{targetElement:n,props:o}=this;if(n===null)return;const{contents:i,createNode:r}=o,l=Oi(i),s=document.createRange();s.selectNodeContents(n),s.deleteContents();let a=r==null?void 0:r(l);if(a===void 0){const f=document.createElement("template");f.innerHTML=l,a=f.content}n.append(a);const d=n.getElementsByTagName("a");for(const f of d)f.target="_blank",f.rel="noreferrer noopener"}render(){return this.renderMarkdownIntoDiv(),$(Ss,{ref:this.containerRefHook})}}const Ms=gt("textarea")({name:"InputBox",class:"iotb8b8",propsAsIs:!1}),Es=gt("div")({name:"ShadowBox",class:"s1xtsfdl",propsAsIs:!1}),Bs=gt("div")({name:"GrowingEntryStyle",class:"g1d7u5bt",propsAsIs:!1});let Uo=0;const Cn=e=>{const{placeholder:t,value:n,onKeyDown:o,highlight:i,altNewline:r,validatedSelection:l,...s}=e,{onChange:a,className:d}=s,f=I.useRef(null),g=n??"";ft(a!==void 0,"GrowingEntry must be a controlled input area");const[m]=I.useState(()=>"input-box-"+(Uo=(Uo+1)%1e7));I.useEffect(()=>{const c=f.current;if(c===null||c.disabled)return;const h=g.toString().length;c.focus(),c.setSelectionRange(i?0:h,h)},[]),I.useLayoutEffect(()=>{var c;if(l!==void 0){const h=typeof l=="number"?[l,null]:l;(c=f.current)==null||c.setSelectionRange(h[0],h[1])}},[l]);const u=I.useCallback(c=>{c.key==="Enter"&&c.shiftKey&&r===!0||o==null||o(c)},[r,o]);return Je(Bs,{className:"gdg-growing-entry",children:[$(Es,{className:d,children:g+` `}),$(Ms,{...s,className:(d??"")+" gdg-input",id:m,ref:f,onKeyDown:u,value:g,placeholder:t,dir:"auto"})]})},Fs=()=>e=>e.targetWidth,qo=gt("div")({name:"MarkdownOverlayEditorStyle",class:"mmv7gx6",propsAsIs:!1,vars:{"mmv7gx6-0":[Fs(),"px"]}}),Ds=e=>{const{value:t,onChange:n,forceEditMode:o,createNode:i,targetRect:r,onFinish:l,validatedSelection:s}=e,a=t.data,d=t.readonly===!0,[f,g]=I.useState(a===""||o),m=I.useCallback(()=>{g(c=>!c)},[]),u=a?"gdg-ml-6":"";return f?Je(qo,{targetWidth:r.width-20,children:[$(Cn,{autoFocus:!0,highlight:!1,validatedSelection:s,value:a,onKeyDown:c=>{c.key==="Enter"&&c.stopPropagation()},onChange:n}),$("div",{className:`gdg-edit-icon gdg-checkmark-hover ${u}`,onClick:()=>l(t),children:$(tr,{})})]}):Je(qo,{targetWidth:r.width,children:[$(Is,{contents:a,createNode:i}),!d&&Je(Xn,{children:[$("div",{className:"spacer"}),$("div",{className:`gdg-edit-icon gdg-edit-hover ${u}`,onClick:m,children:$(Zn,{})})]}),$("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0})]})},As={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:ae.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:rn,measure:(e,t,n)=>{const o=t.data.split(` `)[0];return e.measureText(o).width+2*n.cellHorizontalPadding},draw:e=>ht(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:o,onFinishedEditing:i,markdownDivCreateNode:r,forceEditMode:l,validatedSelection:s}=e;return $(Ds,{onFinish:i,targetRect:o,value:n,validatedSelection:s,onChange:a=>t({...n,data:a.target.value}),forceEditMode:l,createNode:r})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},Hs={getAccessibilityString:e=>e.row.toString(),kind:tn.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:Ps,measure:()=>44,draw:e=>Ts(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:o,posY:i}=e,{width:r,height:l}=t,s=n.drawHandle?7+(r-7)/2:r/2,a=l/2;if(Math.abs(o-s)<=10&&Math.abs(i-a)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function Ps(e,t){const{ctx:n,theme:o}=e,i=o.markerFontFull,r=t??{};return(r==null?void 0:r.font)!==i&&(n.font=i,r.font=i),r.deprep=Rs,n.textAlign="center",r}function Rs(e){const{ctx:t}=e;t.textAlign="start"}function Ts(e,t,n,o,i,r){const{ctx:l,rect:s,hoverAmount:a,theme:d}=e,{x:f,y:g,width:m,height:u}=s,c=n?1:o==="checkbox-visible"?.6+.4*a:a;if(o!=="number"&&c>0){l.globalAlpha=c;const h=7*(n?a:1);if(io(l,d,n,i?f+h:f,g,i?m-h:m,u,!0,void 0,void 0,18,"center",r),i){l.globalAlpha=a,l.beginPath();for(const y of[3,6])for(const b of[-5,-1,3])l.rect(f+y,g+u/2+b,2,2);l.fillStyle=d.textLight,l.fill(),l.beginPath()}l.globalAlpha=1}if(o==="number"||o==="both"&&!n){const h=t.toString(),y=d.markerFontFull,b=f+m/2;o==="both"&&a!==0&&(l.globalAlpha=1-a),l.fillStyle=d.textLight,l.font=y,l.fillText(h,b,g+u/2+xt(l,y)),a!==0&&(l.globalAlpha=1)}}const Ws={getAccessibilityString:()=>"",kind:tn.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>zs(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function zs(e,t,n){const{ctx:o,rect:i,hoverAmount:r,theme:l,spriteManager:s}=e,{x:a,y:d,width:f,height:g}=i;o.beginPath(),o.globalAlpha=r,o.rect(a+1,d+1,f,g-2),o.fillStyle=l.bgHeaderHovered,o.fill(),o.globalAlpha=1,o.beginPath();const m=t!=="";let u=0;if(n!==void 0){const h=g-8,y=a+8/2,b=d+8/2;s.drawSprite(n,"normal",o,y,b,h,l,m?1:r),u=h}else{u=24;const c=12,h=m?c:r*c,y=m?0:(1-r)*c*.5,b=l.cellHorizontalPadding+4;h>0&&(o.moveTo(a+b+y,d+g/2),o.lineTo(a+b+y+h,d+g/2),o.moveTo(a+b+y+h*.5,d+g/2-h*.5),o.lineTo(a+b+y+h*.5,d+g/2+h*.5),o.lineWidth=2,o.strokeStyle=l.bgIconHeader,o.lineCap="round",o.stroke())}o.fillStyle=l.textMedium,o.fillText(t,u+a+l.cellHorizontalPadding+.5,d+g/2+xt(o,l)),o.beginPath()}const Ls=I.lazy(async()=>await Ki(()=>import("./number-overlay-editor-wZgFM_Mr.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),Ns={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:ae.Number,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:rn,draw:e=>ht(e,e.cell.displayData,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.displayData).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:i}=e;return $(I.Suspense,{fallback:null,children:$(Ls,{highlight:t,disabled:o.readonly===!0,value:o.data,fixedDecimals:o.fixedDecimals,allowNegative:o.allowNegative,thousandSeparator:o.thousandSeparator,decimalSeparator:o.decimalSeparator,validatedSelection:i,onChange:r=>n({...o,data:Number.isNaN(r.floatValue??0)?0:r.floatValue})})})},onPaste:(e,t,n)=>{const o=typeof n.rawValue=="number"?n.rawValue:Number.parseFloat(typeof n.rawValue=="string"?n.rawValue:e);if(!(Number.isNaN(o)||t.data===o))return{...t,data:o,displayData:n.formattedString??t.displayData}}},Os={getAccessibilityString:()=>"",measure:()=>108,kind:ae.Protected,needsHover:!1,needsHoverPosition:!1,draw:Xs,onPaste:()=>{}};function Xs(e){const{ctx:t,theme:n,rect:o}=e,{x:i,y:r,height:l}=o;t.beginPath();const s=2.5;let a=i+n.cellHorizontalPadding+s;const d=r+l/2,f=Math.cos(Io(30))*s,g=Math.sin(Io(30))*s;for(let m=0;m<12;m++)t.moveTo(a,d-s),t.lineTo(a,d+s),t.moveTo(a+f,d-g),t.lineTo(a-f,d+g),t.moveTo(a-f,d-g),t.lineTo(a+f,d+g),a+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const $s={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:ae.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>rn(e,t,e.theme.textLight),draw:e=>ht(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+n.cellHorizontalPadding*2,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:i}=e;return $(Cn,{highlight:t,autoFocus:o.readonly!==!0,disabled:o.readonly!==!1,value:o.data,validatedSelection:i,onChange:r=>n({...o,data:r.target.value})})},onPaste:()=>{}},Ys={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:ae.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:rn,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:o,ctx:i,rect:r,theme:l,overrideCursor:s}=e,{displayData:a,contentAlign:d,hoverEffect:f,allowWrapping:g}=t;if(f===!0&&n>0){i.textBaseline="alphabetic";const m=l.cellHorizontalPadding,u=l.cellVerticalPadding,c=Yt(a,i,l.baseFontFull,"alphabetic"),h=r.height-u,y=Math.min(h,c.actualBoundingBoxAscent*2.5);i.beginPath(),st(i,r.x+m/2,r.y+(r.height-y)/2+1,c.width+m*3,y-1,l.roundingRadius??4),i.globalAlpha=n,i.fillStyle=sn(l.textDark,.1),i.fill(),i.globalAlpha=1,i.fillStyle=l.textDark,i.textBaseline="middle",s==null||s("text")}ht(e,a,d,g,o)},measure:(e,t,n)=>{const o=t.displayData.split(` -`,t.allowWrapping===!0?void 0:1);let i=0;for(const r of o)i=Math.max(i,e.measureText(r).width);return i+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:e.allowWrapping===!0,editor:t=>{const{isHighlighted:n,onChange:o,value:i,validatedSelection:r}=t;return $(Cn,{style:e.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:i.readonly!==!0,disabled:i.readonly===!0,altNewline:!0,value:i.data,validatedSelection:r,onChange:l=>o({...i,data:l.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},_s=gt("div")({name:"UriOverlayEditorStyle",class:"uwr6ffw",propsAsIs:!1}),Us=e=>{const{uri:t,onChange:n,forceEditMode:o,readonly:i,validatedSelection:r,preview:l}=e,[s,a]=I.useState(!i&&(t===""||o)),d=I.useCallback(()=>{a(!0)},[]);return s?$(Cn,{validatedSelection:r,highlight:!0,autoFocus:!0,value:t,onChange:n}):Je(_s,{children:[$("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer",children:l}),!i&&$("div",{className:"gdg-edit-icon",onClick:d,children:$(Zn,{})}),$("textarea",{className:"gdg-input",autoFocus:!0})]})},qs=Us;function jo(e,t,n,o){let i=n.cellHorizontalPadding;const r=t.height/2-e.actualBoundingBoxAscent/2,l=e.width,s=e.actualBoundingBoxAscent;return o==="right"?i=t.width-l-n.cellHorizontalPadding:o==="center"&&(i=t.width/2-l/2),{x:i,y:r,width:l,height:s}}const js={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:ae.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:rn,draw:e=>{const{cell:t,theme:n,overrideCursor:o,hoverX:i,hoverY:r,rect:l,ctx:s}=e,a=t.displayData??t.data,d=t.hoverEffect===!0;if(o!==void 0&&d&&i!==void 0&&r!==void 0){const f=Yt(a,s,n.baseFontFull),g=jo(f,l,n,t.contentAlign),{x:m,y:u,width:c,height:h}=g;if(i>=m-4&&i<=m-4+c+8&&r>=u-4&&r<=u-4+h+8){const y=xt(s,n.baseFontFull);o("pointer");const b=5,k=u-y;s.beginPath(),s.moveTo(l.x+m,Math.floor(l.y+k+h+b)+.5),s.lineTo(l.x+m+c,Math.floor(l.y+k+h+b)+.5),s.strokeStyle=n.linkColor,s.stroke(),s.save(),s.fillStyle=e.cellFillColor,ht({...e,rect:{...l,x:l.x-1}},a,t.contentAlign),ht({...e,rect:{...l,x:l.x-2}},a,t.contentAlign),ht({...e,rect:{...l,x:l.x+1}},a,t.contentAlign),ht({...e,rect:{...l,x:l.x+2}},a,t.contentAlign),s.restore()}}s.fillStyle=d?n.linkColor:n.textDark,ht(e,a,t.contentAlign)},onClick:e=>{const{cell:t,bounds:n,posX:o,posY:i,theme:r}=e,l=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return;const s=ii(l,r.baseFontFull);if(s===void 0)return;const a=jo(s,n,r,t.contentAlign);en({x:a.x-4,y:a.y-4,width:a.width+8,height:a.height+8},o,i)&&t.onClickUri(e)},measure:(e,t,n)=>e.measureText(t.displayData??t.data).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:""}),provideEditor:e=>t=>{const{onChange:n,value:o,forceEditMode:i,validatedSelection:r}=t;return $(qs,{forceEditMode:o.readonly!==!0&&(i||e.hoverEffect===!0&&e.onClickUri!==void 0),uri:o.data,preview:o.displayData??o.data,validatedSelection:r,readonly:o.readonly===!0,onChange:l=>n({...o,data:l.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},wl=[Hs,Ws,os,as,gs,ws,Cs,As,Ns,Os,$s,Ys,js],On=[];class Vs extends ai{constructor(){super(...arguments);ne(this,"imageLoaded",()=>{});ne(this,"loadedLocations",[]);ne(this,"cache",{});ne(this,"sendLoaded",Vi(()=>{this.imageLoaded(new Zt(this.loadedLocations)),this.loadedLocations=[]},20));ne(this,"clearOutOfWindow",()=>{const n=Object.keys(this.cache);for(const o of n){const i=this.cache[o];let r=!1;for(let l=0;l{a||(a=!0,On.length<12?On.unshift(s):l||(s.src=""))}},f=new Promise(g=>s.addEventListener("load",()=>g(null)));requestAnimationFrame(async()=>{try{s.src=n,await f,await s.decode();const g=this.cache[r];if(g!==void 0&&!a){g.img=s;for(const m of g.cells)this.loadedLocations.push(oo(m));l=!0,this.sendLoaded()}}catch{d.cancel()}}),this.cache[r]=d}loadOrGetImage(n,o,i){const r=n,l=this.cache[r];if(l!==void 0){const s=tt(o,i);return l.cells.includes(s)||l.cells.push(s),l.img}else this.loadImage(n,o,i,r)}}const xl=Vs;export{jr as A,hl as B,_n as C,Jn as D,Ji as E,rl as F,ae as G,cl as H,tn as I,yl as J,bl as K,Mo as L,dl as M,pl as N,xl as O,wl as P,ml as Q,Lo as R,Ur as S,fl as T,il as U,Gi as a,ft as b,gl as c,al as d,vl as e,ll as f,ul as g,sn as h,nl as i,tl as j,$t as k,At as l,nn as m,Un as n,No as o,en as p,ar as q,ol as r,Ko as s,ns as t,Ge as u,Qi as v,sl as w,Sr as x,bn as y,Dt as z}; +`,t.allowWrapping===!0?void 0:1);let i=0;for(const r of o)i=Math.max(i,e.measureText(r).width);return i+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:e.allowWrapping===!0,editor:t=>{const{isHighlighted:n,onChange:o,value:i,validatedSelection:r}=t;return $(Cn,{style:e.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:i.readonly!==!0,disabled:i.readonly===!0,altNewline:!0,value:i.data,validatedSelection:r,onChange:l=>o({...i,data:l.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},_s=gt("div")({name:"UriOverlayEditorStyle",class:"uwr6ffw",propsAsIs:!1}),Us=e=>{const{uri:t,onChange:n,forceEditMode:o,readonly:i,validatedSelection:r,preview:l}=e,[s,a]=I.useState(!i&&(t===""||o)),d=I.useCallback(()=>{a(!0)},[]);return s?$(Cn,{validatedSelection:r,highlight:!0,autoFocus:!0,value:t,onChange:n}):Je(_s,{children:[$("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer",children:l}),!i&&$("div",{className:"gdg-edit-icon",onClick:d,children:$(Zn,{})}),$("textarea",{className:"gdg-input",autoFocus:!0})]})},qs=Us;function jo(e,t,n,o){let i=n.cellHorizontalPadding;const r=t.height/2-e.actualBoundingBoxAscent/2,l=e.width,s=e.actualBoundingBoxAscent;return o==="right"?i=t.width-l-n.cellHorizontalPadding:o==="center"&&(i=t.width/2-l/2),{x:i,y:r,width:l,height:s}}const js={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:ae.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:rn,draw:e=>{const{cell:t,theme:n,overrideCursor:o,hoverX:i,hoverY:r,rect:l,ctx:s}=e,a=t.displayData??t.data,d=t.hoverEffect===!0;if(o!==void 0&&d&&i!==void 0&&r!==void 0){const f=Yt(a,s,n.baseFontFull),g=jo(f,l,n,t.contentAlign),{x:m,y:u,width:c,height:h}=g;if(i>=m-4&&i<=m-4+c+8&&r>=u-4&&r<=u-4+h+8){const y=xt(s,n.baseFontFull);o("pointer");const b=5,k=u-y;s.beginPath(),s.moveTo(l.x+m,Math.floor(l.y+k+h+b)+.5),s.lineTo(l.x+m+c,Math.floor(l.y+k+h+b)+.5),s.strokeStyle=n.linkColor,s.stroke(),s.save(),s.fillStyle=e.cellFillColor,ht({...e,rect:{...l,x:l.x-1}},a,t.contentAlign),ht({...e,rect:{...l,x:l.x-2}},a,t.contentAlign),ht({...e,rect:{...l,x:l.x+1}},a,t.contentAlign),ht({...e,rect:{...l,x:l.x+2}},a,t.contentAlign),s.restore()}}s.fillStyle=d?n.linkColor:n.textDark,ht(e,a,t.contentAlign)},onClick:e=>{const{cell:t,bounds:n,posX:o,posY:i,theme:r}=e,l=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return;const s=ii(l,r.baseFontFull);if(s===void 0)return;const a=jo(s,n,r,t.contentAlign);en({x:a.x-4,y:a.y-4,width:a.width+8,height:a.height+8},o,i)&&t.onClickUri(e)},measure:(e,t,n)=>e.measureText(t.displayData??t.data).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:""}),provideEditor:e=>t=>{const{onChange:n,value:o,forceEditMode:i,validatedSelection:r}=t;return $(qs,{forceEditMode:o.readonly!==!0&&(i||e.hoverEffect===!0&&e.onClickUri!==void 0),uri:o.data,preview:o.displayData??o.data,validatedSelection:r,readonly:o.readonly===!0,onChange:l=>n({...o,data:l.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},wl=[Hs,Ws,os,as,gs,ws,Cs,As,Ns,Os,$s,Ys,js],On=[];class Vs extends ai{constructor(){super(...arguments);ne(this,"imageLoaded",()=>{});ne(this,"loadedLocations",[]);ne(this,"cache",{});ne(this,"sendLoaded",Vi(()=>{this.imageLoaded(new Zt(this.loadedLocations)),this.loadedLocations=[]},20));ne(this,"clearOutOfWindow",()=>{const n=Object.keys(this.cache);for(const o of n){const i=this.cache[o];let r=!1;for(let l=0;l{a||(a=!0,On.length<12?On.unshift(s):l||(s.src=""))}},f=new Promise(g=>s.addEventListener("load",()=>g(null)));requestAnimationFrame(async()=>{try{s.src=n,await f,await s.decode();const g=this.cache[r];if(g!==void 0&&!a){g.img=s;for(const m of g.cells)this.loadedLocations.push(oo(m));l=!0,this.sendLoaded()}}catch{d.cancel()}}),this.cache[r]=d}loadOrGetImage(n,o,i){const r=n,l=this.cache[r];if(l!==void 0){const s=tt(o,i);return l.cells.includes(s)||l.cells.push(s),l.img}else this.loadImage(n,o,i,r)}}const xl=Vs;export{jr as A,hl as B,_n as C,Jn as D,Ji as E,rl as F,ae as G,cl as H,tn as I,yl as J,bl as K,Mo as L,dl as M,pl as N,xl as O,wl as P,ml as Q,Lo as R,Ur as S,fl as T,il as U,Gi as a,ft as b,gl as c,al as d,ll as e,vl as f,ul as g,sn as h,nl as i,tl as j,$t as k,At as l,nn as m,Un as n,No as o,en as p,ar as q,ol as r,Ko as s,ns as t,Ge as u,Qi as v,sl as w,Sr as x,bn as y,Dt as z}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = ["./number-overlay-editor-wZgFM_Mr.js","./marked.esm-dbrxtycE.js","./index-BMVQvedj.js","./react-number-format.es-2Vaki8Uh.js","./number-overlay-editor-8QJ1sjy4.css"] diff --git a/docs/assets/imperative-scroll.stories-CLwyRI6H.js b/docs/assets/imperative-scroll.stories-buAuN8Mq.js similarity index 88% rename from docs/assets/imperative-scroll.stories-CLwyRI6H.js rename to docs/assets/imperative-scroll.stories-buAuN8Mq.js index c0c38ae01..2f2b658e2 100644 --- a/docs/assets/imperative-scroll.stories-CLwyRI6H.js +++ b/docs/assets/imperative-scroll.stories-buAuN8Mq.js @@ -1,4 +1,4 @@ -import{j as o,a as n,F as u}from"./marked.esm-dbrxtycE.js";import{R as g}from"./index-BMVQvedj.js";import{D as f}from"./data-editor-all-2MtuC67g.js";import{a as C,B as h,D as v,P as A,M as k,d as D}from"./utils-J-I08TtD.js";import{S as b}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const j={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>o(b,{children:o(e,{})})]},r=e=>{const{cols:c,getCellContent:p,onColumnResize:d,setCellValue:m}=C(),t=g.useRef(null);return o(h,{title:"Imperative scrolling",description:n(u,{children:[n(v,{children:["You can imperatively scroll to a cell by calling ",o(A,{children:"scrollTo"})," on a DataEditor ref."]}),n(k,{children:["Click ",o("button",{onClick:()=>{var l;(l=t.current)==null||l.scrollTo(4,99,"both",e.paddingX,e.paddingY,{vAlign:e.vAlign,hAlign:e.hAlign})},children:"Here"})," to scroll to column 4 row 100"]})]}),children:o(f,{...D,ref:t,rowMarkers:"clickable-number",getCellContent:p,columns:c,onCellEdited:m,onColumnResize:d,rows:1e4})})};r.args={paddingY:0,paddingX:0,vAlign:"start",hAlign:"start"};r.argTypes={paddingY:0,paddingX:0,vAlign:{control:{type:"select"},options:["start","center","end",void 0]},hAlign:{control:{type:"select"},options:["start","center","end",void 0]}};var i,a,s;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`p => { +import{j as o,a as n,F as u}from"./marked.esm-dbrxtycE.js";import{R as g}from"./index-BMVQvedj.js";import{D as f}from"./data-editor-all-MRDpHEQ_.js";import{a as C,B as h,D as v,P as A,M as k,d as D}from"./utils-0sbaJdQp.js";import{S as b}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const j={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>o(b,{children:o(e,{})})]},r=e=>{const{cols:c,getCellContent:p,onColumnResize:d,setCellValue:m}=C(),t=g.useRef(null);return o(h,{title:"Imperative scrolling",description:n(u,{children:[n(v,{children:["You can imperatively scroll to a cell by calling ",o(A,{children:"scrollTo"})," on a DataEditor ref."]}),n(k,{children:["Click ",o("button",{onClick:()=>{var l;(l=t.current)==null||l.scrollTo(4,99,"both",e.paddingX,e.paddingY,{vAlign:e.vAlign,hAlign:e.hAlign})},children:"Here"})," to scroll to column 4 row 100"]})]}),children:o(f,{...D,ref:t,rowMarkers:"clickable-number",getCellContent:p,columns:c,onCellEdited:m,onColumnResize:d,rows:1e4})})};r.args={paddingY:0,paddingX:0,vAlign:"start",hAlign:"start"};r.argTypes={paddingY:0,paddingX:0,vAlign:{control:{type:"select"},options:["start","center","end",void 0]},hAlign:{control:{type:"select"},options:["start","center","end",void 0]}};var i,a,s;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`p => { const { cols, getCellContent, diff --git a/docs/assets/input-blending.stories-2pQxJpu-.js b/docs/assets/input-blending.stories-vMFDLYxv.js similarity index 89% rename from docs/assets/input-blending.stories-2pQxJpu-.js rename to docs/assets/input-blending.stories-vMFDLYxv.js index 58765169b..2258d6fb8 100644 --- a/docs/assets/input-blending.stories-2pQxJpu-.js +++ b/docs/assets/input-blending.stories-vMFDLYxv.js @@ -1,4 +1,4 @@ -import{j as n}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-2MtuC67g.js";import{B as s,D as a,u as p,d as m}from"./utils-J-I08TtD.js";import{S as d}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const E={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>n(d,{children:n(s,{title:"Input blending",description:n(a,{children:"Input blending can be enabled or disable between row, column, and range selections. Multi-selections can also be enabled or disabled with the same level of granularity."}),children:n(e,{})})})]},t=e=>{const{cols:i,getCellContent:c}=p(30);return n(u,{...m,rowMarkers:e.rowMultiSelect==="none"?"number":"both",keybindings:{clear:!0,copy:!0,downFill:!0,rightFill:!0,pageDown:!0,pageUp:!0,paste:!0,search:!0,selectAll:!0,selectColumn:!0,selectRow:!0},getCellsForSelection:!0,rangeSelect:e.rangeMultiSelect,columnSelect:e.columnMultiSelect,rowSelect:e.rowMultiSelect,rangeSelectionBlending:e.rangeBlending,columnSelectionBlending:e.columnBlending,rowSelectionBlending:e.rowBlending,getCellContent:c,columns:i,rows:1e4})};t.args={rangeBlending:"mixed",columnBlending:"mixed",rowBlending:"mixed",rangeMultiSelect:"rect",columnMultiSelect:"multi",rowMultiSelect:"multi"};t.argTypes={rangeBlending:{control:{type:"select"},options:["mixed","exclusive"]},columnBlending:{control:{type:"select"},options:["mixed","exclusive"]},rowBlending:{control:{type:"select"},options:["mixed","exclusive"]},rangeMultiSelect:{control:{type:"select"},options:["none","cell","rect","multi-cell","multi-rect"]},columnMultiSelect:{control:{type:"select"},options:["none","single","multi"]},rowMultiSelect:{control:{type:"select"},options:["none","single","multi"]}};var l,o,r;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`p => { +import{j as n}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-MRDpHEQ_.js";import{B as s,D as a,u as p,d as m}from"./utils-0sbaJdQp.js";import{S as d}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const E={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>n(d,{children:n(s,{title:"Input blending",description:n(a,{children:"Input blending can be enabled or disable between row, column, and range selections. Multi-selections can also be enabled or disabled with the same level of granularity."}),children:n(e,{})})})]},t=e=>{const{cols:i,getCellContent:c}=p(30);return n(u,{...m,rowMarkers:e.rowMultiSelect==="none"?"number":"both",keybindings:{clear:!0,copy:!0,downFill:!0,rightFill:!0,pageDown:!0,pageUp:!0,paste:!0,search:!0,selectAll:!0,selectColumn:!0,selectRow:!0},getCellsForSelection:!0,rangeSelect:e.rangeMultiSelect,columnSelect:e.columnMultiSelect,rowSelect:e.rowMultiSelect,rangeSelectionBlending:e.rangeBlending,columnSelectionBlending:e.columnBlending,rowSelectionBlending:e.rowBlending,getCellContent:c,columns:i,rows:1e4})};t.args={rangeBlending:"mixed",columnBlending:"mixed",rowBlending:"mixed",rangeMultiSelect:"rect",columnMultiSelect:"multi",rowMultiSelect:"multi"};t.argTypes={rangeBlending:{control:{type:"select"},options:["mixed","exclusive"]},columnBlending:{control:{type:"select"},options:["mixed","exclusive"]},rowBlending:{control:{type:"select"},options:["mixed","exclusive"]},rangeMultiSelect:{control:{type:"select"},options:["none","cell","rect","multi-cell","multi-rect"]},columnMultiSelect:{control:{type:"select"},options:["none","single","multi"]},rowMultiSelect:{control:{type:"select"},options:["none","single","multi"]}};var l,o,r;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`p => { const { cols, getCellContent diff --git a/docs/assets/keybindings.stories-HbuiDWAA.js b/docs/assets/keybindings.stories-Mzh-GTTw.js similarity index 92% rename from docs/assets/keybindings.stories-HbuiDWAA.js rename to docs/assets/keybindings.stories-Mzh-GTTw.js index 3ad2a3a1f..d035f8743 100644 --- a/docs/assets/keybindings.stories-HbuiDWAA.js +++ b/docs/assets/keybindings.stories-Mzh-GTTw.js @@ -1,4 +1,4 @@ -import{j as n,a as s}from"./marked.esm-dbrxtycE.js";import{r as h}from"./index-BMVQvedj.js";import{D as f,k as C}from"./data-editor-all-2MtuC67g.js";import{u as x,B as K,D as v,d as w}from"./utils-J-I08TtD.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const N={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>n(D,{children:n(o,{})})]},i=()=>{const{getCellContent:o,cols:y,setCellValue:g}=x(30,!1),u={display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gridColumnGap:"32px",gridRowGap:"10px",marginBottom:"10px",marginTop:"20px",font:"13px sans-serif"},m={display:"flex",justifyContent:"space-between",alignItems:"center"},{copy:S,cut:G,paste:j,pageDown:E,pageUp:T,first:B,last:M,...a}=C,[r,b]=h.useState(a),l=(e,t)=>{b(k=>({...k,[e]:t}))};return n(K,{title:"Custom Keybindings",description:s(v,{children:["This demo showcases custom keybindings. Modify the keybindings using the controls below.",n("div",{style:u,children:Object.keys(a).map(e=>s("div",{style:m,children:[s("label",{children:[e,": "]}),s("div",{children:[n("input",{type:"checkbox",checked:r[e]===!0,onChange:t=>l(e,!!t.target.checked)}),n("input",{type:"text",style:{width:"100px"},value:r[e]||"",onChange:t=>l(e,t.target.value)})]})]},e))})]}),children:n(f,{...w,getCellContent:o,onCellEdited:g,keybindings:r,columns:y,rangeSelect:"multi-rect",rows:100,rowMarkers:"both"})})};var d,p,c;i.parameters={...i.parameters,docs:{...(d=i.parameters)==null?void 0:d.docs,source:{originalSource:`() => { +import{j as n,a as s}from"./marked.esm-dbrxtycE.js";import{r as h}from"./index-BMVQvedj.js";import{D as f,k as C}from"./data-editor-all-MRDpHEQ_.js";import{u as x,B as K,D as v,d as w}from"./utils-0sbaJdQp.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const N={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>n(D,{children:n(o,{})})]},i=()=>{const{getCellContent:o,cols:y,setCellValue:g}=x(30,!1),u={display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gridColumnGap:"32px",gridRowGap:"10px",marginBottom:"10px",marginTop:"20px",font:"13px sans-serif"},m={display:"flex",justifyContent:"space-between",alignItems:"center"},{copy:S,cut:G,paste:j,pageDown:E,pageUp:T,first:B,last:M,...a}=C,[r,b]=h.useState(a),l=(e,t)=>{b(k=>({...k,[e]:t}))};return n(K,{title:"Custom Keybindings",description:s(v,{children:["This demo showcases custom keybindings. Modify the keybindings using the controls below.",n("div",{style:u,children:Object.keys(a).map(e=>s("div",{style:m,children:[s("label",{children:[e,": "]}),s("div",{children:[n("input",{type:"checkbox",checked:r[e]===!0,onChange:t=>l(e,!!t.target.checked)}),n("input",{type:"text",style:{width:"100px"},value:r[e]||"",onChange:t=>l(e,t.target.value)})]})]},e))})]}),children:n(f,{...w,getCellContent:o,onCellEdited:g,keybindings:r,columns:y,rangeSelect:"multi-rect",rows:100,rowMarkers:"both"})})};var d,p,c;i.parameters={...i.parameters,docs:{...(d=i.parameters)==null?void 0:d.docs,source:{originalSource:`() => { const { getCellContent, cols, diff --git a/docs/assets/layout-integration.stories-AGiGwCTK.js b/docs/assets/layout-integration.stories-5AdmzUNM.js similarity index 82% rename from docs/assets/layout-integration.stories-AGiGwCTK.js rename to docs/assets/layout-integration.stories-5AdmzUNM.js index 252041e31..98a54cdce 100644 --- a/docs/assets/layout-integration.stories-AGiGwCTK.js +++ b/docs/assets/layout-integration.stories-5AdmzUNM.js @@ -1,4 +1,4 @@ -import{j as t,a,F as d}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as s}from"./data-editor-all-2MtuC67g.js";import{b as m,D as h,u as c,d as n}from"./utils-J-I08TtD.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const P={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>t(u,{children:a(m,{children:[t("h1",{children:"Layout Integration"}),t(h,{children:"Trying the grid in different situations"}),t(e,{})]})})]},r=()=>{const{cols:e,getCellContent:o}=c(1e3,!0,!0);return a(d,{children:[t(s,{...n,getCellContent:o,columns:e,rows:10,rowMarkers:"both",height:200}),t(s,{...n,getCellContent:o,columns:e,rows:10,rowMarkers:"both"}),a("div",{style:{display:"flex",height:"300px"},children:[t(s,{...n,getCellContent:o,columns:e,rows:10,rowMarkers:"both"}),t("div",{style:{flexShrink:0},children:"This is some text what happens here?"})]})]})};var i,l,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`() => { +import{j as t,a,F as d}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as s}from"./data-editor-all-MRDpHEQ_.js";import{b as m,D as h,u as c,d as n}from"./utils-0sbaJdQp.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const P={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>t(u,{children:a(m,{children:[t("h1",{children:"Layout Integration"}),t(h,{children:"Trying the grid in different situations"}),t(e,{})]})})]},r=()=>{const{cols:e,getCellContent:o}=c(1e3,!0,!0);return a(d,{children:[t(s,{...n,getCellContent:o,columns:e,rows:10,rowMarkers:"both",height:200}),t(s,{...n,getCellContent:o,columns:e,rows:10,rowMarkers:"both"}),a("div",{style:{display:"flex",height:"300px"},children:[t(s,{...n,getCellContent:o,columns:e,rows:10,rowMarkers:"both"}),t("div",{style:{flexShrink:0},children:"This is some text what happens here?"})]})]})};var i,l,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/multi-select-columns.stories-TzyZLAaG.js b/docs/assets/multi-select-columns.stories-ZBi8NFYt.js similarity index 77% rename from docs/assets/multi-select-columns.stories-TzyZLAaG.js rename to docs/assets/multi-select-columns.stories-ZBi8NFYt.js index 0b02e1751..f595e9220 100644 --- a/docs/assets/multi-select-columns.stories-TzyZLAaG.js +++ b/docs/assets/multi-select-columns.stories-ZBi8NFYt.js @@ -1,4 +1,4 @@ -import{j as e,a as t,F as m}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as p}from"./data-editor-all-2MtuC67g.js";import{B as u,D as d,P as s,M as C,K as n,u as h,d as D}from"./utils-J-I08TtD.js";import{S as M}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(M,{children:e(u,{title:"Multi select columns",description:t(m,{children:[t(d,{children:["You can select multiple columns by using the ",e(s,{children:"selectedColumns"})," and"," ",e(s,{children:"onSelectedColumnsChange"})," props"]}),t(C,{children:["Here you can multi select columns by using ",e(n,{children:"Ctrl"})," (on Windows) or"," ",e(n,{children:"⌘"})," (on Mac)"]})]}),children:e(r,{})})})]},o=()=>{const{cols:r,getCellContent:c}=h(100);return e(p,{...D,getCellContent:c,rowMarkers:"both",columns:r,rows:1e5})};var l,a,i;o.parameters={...o.parameters,docs:{...(l=o.parameters)==null?void 0:l.docs,source:{originalSource:`() => { +import{j as e,a as t,F as m}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as p}from"./data-editor-all-MRDpHEQ_.js";import{B as u,D as d,P as s,M as C,K as n,u as h,d as D}from"./utils-0sbaJdQp.js";import{S as M}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(M,{children:e(u,{title:"Multi select columns",description:t(m,{children:[t(d,{children:["You can select multiple columns by using the ",e(s,{children:"selectedColumns"})," and"," ",e(s,{children:"onSelectedColumnsChange"})," props"]}),t(C,{children:["Here you can multi select columns by using ",e(n,{children:"Ctrl"})," (on Windows) or"," ",e(n,{children:"⌘"})," (on Mac)"]})]}),children:e(r,{})})})]},o=()=>{const{cols:r,getCellContent:c}=h(100);return e(p,{...D,getCellContent:c,rowMarkers:"both",columns:r,rows:1e5})};var l,a,i;o.parameters={...o.parameters,docs:{...(l=o.parameters)==null?void 0:l.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/new-column-button.stories-p9Gyngt9.js b/docs/assets/new-column-button.stories-hlOEqGf0.js similarity index 83% rename from docs/assets/new-column-button.stories-p9Gyngt9.js rename to docs/assets/new-column-button.stories-hlOEqGf0.js index 063cde851..89f2e1b0f 100644 --- a/docs/assets/new-column-button.stories-p9Gyngt9.js +++ b/docs/assets/new-column-button.stories-hlOEqGf0.js @@ -1,4 +1,4 @@ -import{j as t,a as i}from"./marked.esm-dbrxtycE.js";import{R as c}from"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-2MtuC67g.js";import{B as d,D as p,P as C,u as f,d as h,C as w}from"./utils-J-I08TtD.js";import{S as g}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const y={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>t(g,{children:t(d,{title:"New column button",description:i(p,{children:["A new column button can be created using the ",t(C,{children:"rightElement"}),"."]}),children:t(o,{})})})]},e=()=>{const{cols:o,getCellContent:a}=f(10,!0),l=c.useMemo(()=>o.map(m=>({...m,grow:1})),[o]);return t(u,{...h,getCellContent:a,columns:l,rightElement:t(w,{children:t("button",{onClick:()=>window.alert("Add a column!"),children:"+"})}),rightElementProps:{fill:!1,sticky:!1},rows:3e3,rowMarkers:"both"})};var r,n,s;e.parameters={...e.parameters,docs:{...(r=e.parameters)==null?void 0:r.docs,source:{originalSource:`() => { +import{j as t,a as i}from"./marked.esm-dbrxtycE.js";import{R as c}from"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-MRDpHEQ_.js";import{B as d,D as p,P as C,u as f,d as h,C as w}from"./utils-0sbaJdQp.js";import{S as g}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const y={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>t(g,{children:t(d,{title:"New column button",description:i(p,{children:["A new column button can be created using the ",t(C,{children:"rightElement"}),"."]}),children:t(o,{})})})]},e=()=>{const{cols:o,getCellContent:a}=f(10,!0),l=c.useMemo(()=>o.map(m=>({...m,grow:1})),[o]);return t(u,{...h,getCellContent:a,columns:l,rightElement:t(w,{children:t("button",{onClick:()=>window.alert("Add a column!"),children:"+"})}),rightElementProps:{fill:!1,sticky:!1},rows:3e3,rowMarkers:"both"})};var r,n,s;e.parameters={...e.parameters,docs:{...(r=e.parameters)==null?void 0:r.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/obscured-grid.stories-W_2SPJ8f.js b/docs/assets/obscured-grid.stories-BhDuA2Kl.js similarity index 85% rename from docs/assets/obscured-grid.stories-W_2SPJ8f.js rename to docs/assets/obscured-grid.stories-BhDuA2Kl.js index b8bfb9402..747744342 100644 --- a/docs/assets/obscured-grid.stories-W_2SPJ8f.js +++ b/docs/assets/obscured-grid.stories-BhDuA2Kl.js @@ -1,4 +1,4 @@ -import{j as o,a as n,F as c}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-2MtuC67g.js";import{B as C,D as m,M as p,u as g,d as x}from"./utils-J-I08TtD.js";import{S as h}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const S={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>o(h,{children:n(C,{title:"Obscured Data Grid",description:n(c,{children:[o(m,{children:"The data grid should respect being obscured by other elements"}),o(p,{children:"This is mostly a test area because its hard to test with unit tests."})]}),children:[o(r,{}),o("div",{style:{position:"absolute",top:0,left:"50%",width:"50%",height:"100%",background:"rgba(0,0,0,0.5)",zIndex:100}})]})})]},t=()=>{const{cols:r,getCellContent:i,setCellValue:d}=g(60,!1);return o(u,{...x,getCellContent:i,onItemHovered:e=>console.log("onItemHovered",e),onCellClicked:e=>console.log("onCellClicked",e),onHeaderClicked:e=>console.log("onHeaderClicked",e),onCellContextMenu:e=>console.log("onCellContextMenu",e),onHeaderContextMenu:e=>console.log("onHeaderContextMenu",e),columns:r,rowMarkers:"both",onPaste:!0,onCellEdited:d,trailingRowOptions:{sticky:!0,tint:!0,hint:"New row..."},rows:1e4})};var l,s,a;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`() => { +import{j as o,a as n,F as c}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-MRDpHEQ_.js";import{B as C,D as m,M as p,u as g,d as x}from"./utils-0sbaJdQp.js";import{S as h}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const S={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>o(h,{children:n(C,{title:"Obscured Data Grid",description:n(c,{children:[o(m,{children:"The data grid should respect being obscured by other elements"}),o(p,{children:"This is mostly a test area because its hard to test with unit tests."})]}),children:[o(r,{}),o("div",{style:{position:"absolute",top:0,left:"50%",width:"50%",height:"100%",background:"rgba(0,0,0,0.5)",zIndex:100}})]})})]},t=()=>{const{cols:r,getCellContent:i,setCellValue:d}=g(60,!1);return o(u,{...x,getCellContent:i,onItemHovered:e=>console.log("onItemHovered",e),onCellClicked:e=>console.log("onCellClicked",e),onHeaderClicked:e=>console.log("onHeaderClicked",e),onCellContextMenu:e=>console.log("onCellContextMenu",e),onHeaderContextMenu:e=>console.log("onHeaderContextMenu",e),columns:r,rowMarkers:"both",onPaste:!0,onCellEdited:d,trailingRowOptions:{sticky:!0,tint:!0,hint:"New row..."},rows:1e4})};var l,s,a;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/observe-visible-region.stories-4OA01Cgv.js b/docs/assets/observe-visible-region.stories-5YC3GOv6.js similarity index 84% rename from docs/assets/observe-visible-region.stories-4OA01Cgv.js rename to docs/assets/observe-visible-region.stories-5YC3GOv6.js index e49ec44e8..b85f8df2f 100644 --- a/docs/assets/observe-visible-region.stories-4OA01Cgv.js +++ b/docs/assets/observe-visible-region.stories-5YC3GOv6.js @@ -1,4 +1,4 @@ -import{j as e,a as t,F as g}from"./marked.esm-dbrxtycE.js";import{R as p}from"./index-BMVQvedj.js";import{D as d}from"./data-editor-all-2MtuC67g.js";import{u as h,B as b,D as u,P as R,M as v,K as n,d as y}from"./utils-J-I08TtD.js";import{S as f}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const W={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(f,{children:e(r,{})})]},o=()=>{const{cols:r,getCellContent:c}=h(100),[i,m]=p.useState({x:0,y:0,width:0,height:0});return e(b,{title:"Observe Visible Region",description:t(g,{children:[t(u,{children:["The visible region can be observed using ",e(R,{children:"onVisibleRegionChanged"})]}),t(v,{children:["Then current visible region is x:",e(n,{children:i.x})," y:",e(n,{children:i.y})," width:",e(n,{children:i.width})," height:",e(n,{children:i.height})]})]}),children:e(d,{...y,getCellContent:c,columns:r,rows:1e3,onVisibleRegionChanged:m})})};var s,a,l;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`() => { +import{j as e,a as t,F as g}from"./marked.esm-dbrxtycE.js";import{R as p}from"./index-BMVQvedj.js";import{D as d}from"./data-editor-all-MRDpHEQ_.js";import{u as h,B as b,D as u,P as R,M as v,K as n,d as y}from"./utils-0sbaJdQp.js";import{S as f}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const W={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(f,{children:e(r,{})})]},o=()=>{const{cols:r,getCellContent:c}=h(100),[i,m]=p.useState({x:0,y:0,width:0,height:0});return e(b,{title:"Observe Visible Region",description:t(g,{children:[t(u,{children:["The visible region can be observed using ",e(R,{children:"onVisibleRegionChanged"})]}),t(v,{children:["Then current visible region is x:",e(n,{children:i.x})," y:",e(n,{children:i.y})," width:",e(n,{children:i.width})," height:",e(n,{children:i.height})]})]}),children:e(d,{...y,getCellContent:c,columns:r,rows:1e3,onVisibleRegionChanged:m})})};var s,a,l;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/one-hundred-thousand-columns.stories-OOMFzqtX.js b/docs/assets/one-hundred-thousand-columns.stories-IX8W2-Ky.js similarity index 77% rename from docs/assets/one-hundred-thousand-columns.stories-OOMFzqtX.js rename to docs/assets/one-hundred-thousand-columns.stories-IX8W2-Ky.js index ec5d5e008..e9ec7af0d 100644 --- a/docs/assets/one-hundred-thousand-columns.stories-OOMFzqtX.js +++ b/docs/assets/one-hundred-thousand-columns.stories-IX8W2-Ky.js @@ -1,4 +1,4 @@ -import{j as o}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as i}from"./data-editor-all-2MtuC67g.js";import{B as l,D as m,u as d,d as p}from"./utils-J-I08TtD.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const j={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>o(u,{children:o(l,{title:"One Hundred Thousand Columns",description:o(m,{children:"Data grid supports way more columns than you will ever need. Also this is rendering 10 million cells but that's not important."}),children:o(t,{})})})]},r=()=>{const{cols:t,getCellContent:a}=d(1e5);return o(i,{...p,getCellContent:a,columns:t,rows:1e3})};var e,s,n;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`() => { +import{j as o}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as i}from"./data-editor-all-MRDpHEQ_.js";import{B as l,D as m,u as d,d as p}from"./utils-0sbaJdQp.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const j={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>o(u,{children:o(l,{title:"One Hundred Thousand Columns",description:o(m,{children:"Data grid supports way more columns than you will ever need. Also this is rendering 10 million cells but that's not important."}),children:o(t,{})})})]},r=()=>{const{cols:t,getCellContent:a}=d(1e5);return o(i,{...p,getCellContent:a,columns:t,rows:1e3})};var e,s,n;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/one-million-rows.stories-_N8HpAmg.js b/docs/assets/one-million-rows.stories-goFbk3px.js similarity index 77% rename from docs/assets/one-million-rows.stories-_N8HpAmg.js rename to docs/assets/one-million-rows.stories-goFbk3px.js index f6ff86131..08c5c2311 100644 --- a/docs/assets/one-million-rows.stories-_N8HpAmg.js +++ b/docs/assets/one-million-rows.stories-goFbk3px.js @@ -1,4 +1,4 @@ -import{j as o}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as n}from"./data-editor-all-2MtuC67g.js";import{B as l,D as m,u as p,d as c}from"./utils-J-I08TtD.js";import{S as d}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const S={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>o(d,{children:o(l,{title:"One Million Rows",description:o(m,{children:"Data grid supports over 1 million rows. Your limit is mostly RAM."}),children:o(t,{})})})]},r=()=>{const{cols:t,getCellContent:a}=p(6);return o(n,{...c,getCellContent:a,columns:t,rowHeight:31,rows:1e6,rowMarkers:"number"})};var e,s,i;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`() => { +import{j as o}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as n}from"./data-editor-all-MRDpHEQ_.js";import{B as l,D as m,u as p,d as c}from"./utils-0sbaJdQp.js";import{S as d}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const S={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>o(d,{children:o(l,{title:"One Million Rows",description:o(m,{children:"Data grid supports over 1 million rows. Your limit is mostly RAM."}),children:o(t,{})})})]},r=()=>{const{cols:t,getCellContent:a}=p(6);return o(n,{...c,getCellContent:a,columns:t,rowHeight:31,rows:1e6,rowMarkers:"number"})};var e,s,i;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/overscroll.stories-wl5Dnic2.js b/docs/assets/overscroll.stories-Ioltj5aT.js similarity index 78% rename from docs/assets/overscroll.stories-wl5Dnic2.js rename to docs/assets/overscroll.stories-Ioltj5aT.js index b51bb322e..680e2aa3f 100644 --- a/docs/assets/overscroll.stories-wl5Dnic2.js +++ b/docs/assets/overscroll.stories-Ioltj5aT.js @@ -1,4 +1,4 @@ -import{j as r,F as m,a as d}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as v}from"./data-editor-all-2MtuC67g.js";import{B as u,D as g,P as t,u as h,d as D}from"./utils-J-I08TtD.js";import{S as f}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>r(f,{children:r(u,{title:"Overscroll",description:r(m,{children:d(g,{children:["You can allocate extra space at the ends of the grid by setting the"," ",r(t,{children:"overscrollX"})," and ",r(t,{children:"overscrollY"})," props"]})}),children:r(e,{})})})]},o=e=>{const{overscrollX:c,overscrollY:n}=e,{cols:i,getCellContent:p}=h(20);return r(v,{...D,getCellContent:p,columns:i,overscrollX:c,overscrollY:n,rows:50})};o.argTypes={overscrollX:{control:{type:"range",min:0,max:600}},overscrollY:{control:{type:"range",min:0,max:600}}};o.args={overscrollX:200,overscrollY:200};var s,l,a;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`p => { +import{j as r,F as m,a as d}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as v}from"./data-editor-all-MRDpHEQ_.js";import{B as u,D as g,P as t,u as h,d as D}from"./utils-0sbaJdQp.js";import{S as f}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>r(f,{children:r(u,{title:"Overscroll",description:r(m,{children:d(g,{children:["You can allocate extra space at the ends of the grid by setting the"," ",r(t,{children:"overscrollX"})," and ",r(t,{children:"overscrollY"})," props"]})}),children:r(e,{})})})]},o=e=>{const{overscrollX:c,overscrollY:n}=e,{cols:i,getCellContent:p}=h(20);return r(v,{...D,getCellContent:p,columns:i,overscrollX:c,overscrollY:n,rows:50})};o.argTypes={overscrollX:{control:{type:"range",min:0,max:600}},overscrollY:{control:{type:"range",min:0,max:600}}};o.args={overscrollX:200,overscrollY:200};var s,l,a;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`p => { const { overscrollX, overscrollY diff --git a/docs/assets/padding.stories-2UoDigf3.js b/docs/assets/padding.stories-oLYFy8Nt.js similarity index 78% rename from docs/assets/padding.stories-2UoDigf3.js rename to docs/assets/padding.stories-oLYFy8Nt.js index 9d4805caf..46bf1e4bc 100644 --- a/docs/assets/padding.stories-2UoDigf3.js +++ b/docs/assets/padding.stories-oLYFy8Nt.js @@ -1,4 +1,4 @@ -import{j as t,F as g,a as l}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as c}from"./data-editor-all-2MtuC67g.js";import{B as h,D as u,P as e,u as D,d as f}from"./utils-J-I08TtD.js";import{S as x}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const T={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>t(x,{children:t(h,{title:"Padding",description:t(g,{children:l(u,{children:["You can add padding at the ends of the grid by setting the"," ",t(e,{children:"paddingRight"})," and ",t(e,{children:"paddingBottom"})," props"]})}),children:t(r,{})})})]},o=r=>{const{paddingRight:d,paddingBottom:s}=r,{cols:p,getCellContent:m}=D(20);return t(c,{...f,getCellContent:m,columns:p,rowMarkers:"both",experimental:{paddingRight:d,paddingBottom:s},rows:50})};o.argTypes={paddingRight:{control:{type:"range",min:0,max:600}},paddingBottom:{control:{type:"range",min:0,max:600}}};o.args={paddingRight:200,paddingBottom:200};var a,n,i;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:`p => { +import{j as t,F as g,a as l}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as c}from"./data-editor-all-MRDpHEQ_.js";import{B as h,D as u,P as e,u as D,d as f}from"./utils-0sbaJdQp.js";import{S as x}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const T={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>t(x,{children:t(h,{title:"Padding",description:t(g,{children:l(u,{children:["You can add padding at the ends of the grid by setting the"," ",t(e,{children:"paddingRight"})," and ",t(e,{children:"paddingBottom"})," props"]})}),children:t(r,{})})})]},o=r=>{const{paddingRight:d,paddingBottom:s}=r,{cols:p,getCellContent:m}=D(20);return t(c,{...f,getCellContent:m,columns:p,rowMarkers:"both",experimental:{paddingRight:d,paddingBottom:s},rows:50})};o.argTypes={paddingRight:{control:{type:"range",min:0,max:600}},paddingBottom:{control:{type:"range",min:0,max:600}}};o.args={paddingRight:200,paddingBottom:200};var a,n,i;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:`p => { const { paddingRight, paddingBottom diff --git a/docs/assets/paste-support.stories-lDgwj2aN.js b/docs/assets/paste-support.stories-8pSSjnL_.js similarity index 86% rename from docs/assets/paste-support.stories-lDgwj2aN.js rename to docs/assets/paste-support.stories-8pSSjnL_.js index cec3d11ea..93f3b8a40 100644 --- a/docs/assets/paste-support.stories-lDgwj2aN.js +++ b/docs/assets/paste-support.stories-8pSSjnL_.js @@ -1,4 +1,4 @@ -import{j as e,a,F as d}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as m}from"./data-editor-all-2MtuC67g.js";import{B as u,D as c,P as g,M as h,u as f,d as C}from"./utils-J-I08TtD.js";import{S as y}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(y,{children:e(u,{title:"Paste support",description:a(d,{children:[a(c,{children:["The data grid can handle paste automatically by returning true from"," ",e(g,{children:"onPaste"}),". You can also return false and handle paste yourself. If paste is undefined the DataEditor will do its best to paste to the current cell."]}),e(h,{children:"Paste supports the copy format of Google Sheets and Excel. Below is an example of data copied from excel with some escaped text."}),e("textarea",{value:`Sunday Dogs https://google.com +import{j as e,a,F as d}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as m}from"./data-editor-all-MRDpHEQ_.js";import{B as u,D as c,P as g,M as h,u as f,d as C}from"./utils-0sbaJdQp.js";import{S as y}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(y,{children:e(u,{title:"Paste support",description:a(d,{children:[a(c,{children:["The data grid can handle paste automatically by returning true from"," ",e(g,{children:"onPaste"}),". You can also return false and handle paste yourself. If paste is undefined the DataEditor will do its best to paste to the current cell."]}),e(h,{children:"Paste supports the copy format of Google Sheets and Excel. Below is an example of data copied from excel with some escaped text."}),e("textarea",{value:`Sunday Dogs https://google.com Monday Cats https://google.com Tuesday Turtles https://google.com Wednesday Bears https://google.com diff --git a/docs/assets/prevent-diagonal-scroll.stories-l2qFKd-I.js b/docs/assets/prevent-diagonal-scroll.stories-1z_x72JR.js similarity index 74% rename from docs/assets/prevent-diagonal-scroll.stories-l2qFKd-I.js rename to docs/assets/prevent-diagonal-scroll.stories-1z_x72JR.js index 0d8e71d0d..cdf9cad74 100644 --- a/docs/assets/prevent-diagonal-scroll.stories-l2qFKd-I.js +++ b/docs/assets/prevent-diagonal-scroll.stories-1z_x72JR.js @@ -1,4 +1,4 @@ -import{j as r,F as i,a as s}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as p}from"./data-editor-all-2MtuC67g.js";import{B as c,D as m,P as d,u as g,d as D}from"./utils-J-I08TtD.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>r(u,{children:r(c,{title:"Prevent Diagonal Scroll",description:r(i,{children:s(m,{children:["Diagonal scrolling can be prevented by setting"," ",r(d,{children:"preventDiagonalScrolling"}),"."]})}),children:r(o,{})})})]},e=()=>{const{cols:o,getCellContent:l}=g(200);return r(p,{...D,getCellContent:l,columns:o,preventDiagonalScrolling:!0,rows:5e3})};var t,a,n;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`() => { +import{j as r,F as i,a as s}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as p}from"./data-editor-all-MRDpHEQ_.js";import{B as c,D as m,P as d,u as g,d as D}from"./utils-0sbaJdQp.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const F={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>r(u,{children:r(c,{title:"Prevent Diagonal Scroll",description:r(i,{children:s(m,{children:["Diagonal scrolling can be prevented by setting"," ",r(d,{children:"preventDiagonalScrolling"}),"."]})}),children:r(o,{})})})]},e=()=>{const{cols:o,getCellContent:l}=g(200);return r(p,{...D,getCellContent:l,columns:o,preventDiagonalScrolling:!0,rows:5e3})};var t,a,n;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/rapid-updates.stories-NR0W4vvJ.js b/docs/assets/rapid-updates.stories-_pOVYGc8.js similarity index 92% rename from docs/assets/rapid-updates.stories-NR0W4vvJ.js rename to docs/assets/rapid-updates.stories-_pOVYGc8.js index 42be510a1..93eb26c4d 100644 --- a/docs/assets/rapid-updates.stories-NR0W4vvJ.js +++ b/docs/assets/rapid-updates.stories-_pOVYGc8.js @@ -1,4 +1,4 @@ -import{j as e,a as h,F as k}from"./marked.esm-dbrxtycE.js";import{R as n}from"./index-BMVQvedj.js";import{u as U,B as M,D as b,M as E,K as I,d as G}from"./utils-J-I08TtD.js";import{G as v}from"./image-window-loader-lKUISrIQ.js";import{S as A}from"./story-utils-K2EZnGjM.js";import{D as F}from"./data-editor-all-2MtuC67g.js";import"./index-PWBWJyi_.js";import"./_baseIteratee-WTHxv43n.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";import"./flatten-qRvRBp6y.js";import"./throttle-7EuXLZa7.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./scrolling-data-grid-19OhoR-o.js";const z={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(A,{children:e(r,{})})]};let w=1;function R(){return w=w*16807%2147483647}const a=()=>{const{cols:r,getCellContent:D,setCellValueRaw:s}=U(100),l=n.useRef(null),d=n.useRef(0),o=n.useRef(null);return n.useEffect(()=>{let i=0;const c=()=>{var p;const u=[],x=performance.now();for(let t=0;t<5e3;t++){const f=Math.max(10,R()%100),m=R()%1e4;s([f,m],{kind:v.Text,data:t.toString(),displayData:`${t}k`,themeOverride:t%5!==0?{bgCell:"#f2fff4",textDark:"#00d41c"}:{bgCell:"#fff6f6",textDark:"#d40000"},allowOverlay:!0,lastUpdated:x}),u.push({cell:[f,m]})}d.current+=5e3,o.current!==null&&(o.current.textContent=`${d.current}`),(p=l.current)==null||p.updateCells(u),i=window.requestAnimationFrame(c)};return c(),()=>{cancelAnimationFrame(i)}},[s]),e(M,{title:"Rapid updating",description:h(k,{children:[e(b,{children:"Data grid can support many thousands of updates per seconds. The data grid can easily update data faster than a human can read it, more importantly the faster the data grid can update, the more time your code can spend doing more valuable work."}),h(E,{children:["Updates processed: ",e(I,{ref:o})," We could do this faster but we wrote a really crappy data store for this demo which is actually slowing down the data grid."]})]}),children:e(F,{...G,ref:l,getCellContent:D,columns:r,rows:1e4})})};var C,g,y;a.parameters={...a.parameters,docs:{...(C=a.parameters)==null?void 0:C.docs,source:{originalSource:`() => { +import{j as e,a as h,F as k}from"./marked.esm-dbrxtycE.js";import{R as n}from"./index-BMVQvedj.js";import{u as U,B as M,D as b,M as E,K as I,d as G}from"./utils-0sbaJdQp.js";import{G as v}from"./image-window-loader-aCHQvgUN.js";import{S as A}from"./story-utils-K2EZnGjM.js";import{D as F}from"./data-editor-all-MRDpHEQ_.js";import"./index-PWBWJyi_.js";import"./_baseIteratee-WTHxv43n.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";import"./flatten-qRvRBp6y.js";import"./throttle-7EuXLZa7.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./scrolling-data-grid-UJ5_dX2R.js";const z={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(A,{children:e(r,{})})]};let w=1;function R(){return w=w*16807%2147483647}const a=()=>{const{cols:r,getCellContent:D,setCellValueRaw:s}=U(100),l=n.useRef(null),d=n.useRef(0),o=n.useRef(null);return n.useEffect(()=>{let i=0;const c=()=>{var p;const u=[],x=performance.now();for(let t=0;t<5e3;t++){const f=Math.max(10,R()%100),m=R()%1e4;s([f,m],{kind:v.Text,data:t.toString(),displayData:`${t}k`,themeOverride:t%5!==0?{bgCell:"#f2fff4",textDark:"#00d41c"}:{bgCell:"#fff6f6",textDark:"#d40000"},allowOverlay:!0,lastUpdated:x}),u.push({cell:[f,m]})}d.current+=5e3,o.current!==null&&(o.current.textContent=`${d.current}`),(p=l.current)==null||p.updateCells(u),i=window.requestAnimationFrame(c)};return c(),()=>{cancelAnimationFrame(i)}},[s]),e(M,{title:"Rapid updating",description:h(k,{children:[e(b,{children:"Data grid can support many thousands of updates per seconds. The data grid can easily update data faster than a human can read it, more importantly the faster the data grid can update, the more time your code can spend doing more valuable work."}),h(E,{children:["Updates processed: ",e(I,{ref:o})," We could do this faster but we wrote a really crappy data store for this demo which is actually slowing down the data grid."]})]}),children:e(F,{...G,ref:l,getCellContent:D,columns:r,rows:1e4})})};var C,g,y;a.parameters={...a.parameters,docs:{...(C=a.parameters)==null?void 0:C.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/rearrange-columns.stories-xC_BDMtK.js b/docs/assets/rearrange-columns.stories-5IgfC-te.js similarity index 88% rename from docs/assets/rearrange-columns.stories-xC_BDMtK.js rename to docs/assets/rearrange-columns.stories-5IgfC-te.js index f077f4a2a..7359f4c1d 100644 --- a/docs/assets/rearrange-columns.stories-xC_BDMtK.js +++ b/docs/assets/rearrange-columns.stories-5IgfC-te.js @@ -1,4 +1,4 @@ -import{j as t,a as x}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as v}from"./data-editor-all-2MtuC67g.js";import{B as h,D as k,P as f,u as I,d as S}from"./utils-J-I08TtD.js";import{S as w}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const q={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>t(w,{children:t(h,{title:"Rearrange Columns",description:x(k,{children:["Columns can be rearranged by drag and dropping, as long as you respond to the"," ",t(f,{children:"onColumnMoved"})," callback."]}),children:t(e,{})})})]},s=()=>{const{cols:e,getCellContent:d}=I(60),[a,p]=l.useState(e),u=l.useCallback((r,o)=>{p(c=>{const n=[...c],[M]=n.splice(r,1);return n.splice(o,0,M),n})},[]),g=l.useCallback((r,o)=>o!==3,[]),b=l.useCallback(([r,o])=>{const c=e.findIndex(n=>n.title===a[r].title);return d([c,o])},[e,d,a]);return t(v,{...S,freezeColumns:1,rowMarkers:"both",getCellContent:b,onColumnProposeMove:g,columns:a,onColumnMoved:u,columnSelectionBlending:"mixed",rangeSelectionBlending:"mixed",rows:1e3})};var i,C,m;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`() => { +import{j as t,a as x}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as v}from"./data-editor-all-MRDpHEQ_.js";import{B as h,D as k,P as f,u as I,d as S}from"./utils-0sbaJdQp.js";import{S as w}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const q={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>t(w,{children:t(h,{title:"Rearrange Columns",description:x(k,{children:["Columns can be rearranged by drag and dropping, as long as you respond to the"," ",t(f,{children:"onColumnMoved"})," callback."]}),children:t(e,{})})})]},s=()=>{const{cols:e,getCellContent:d}=I(60),[a,p]=l.useState(e),u=l.useCallback((r,o)=>{p(c=>{const n=[...c],[M]=n.splice(r,1);return n.splice(o,0,M),n})},[]),g=l.useCallback((r,o)=>o!==3,[]),b=l.useCallback(([r,o])=>{const c=e.findIndex(n=>n.title===a[r].title);return d([c,o])},[e,d,a]);return t(v,{...S,freezeColumns:1,rowMarkers:"both",getCellContent:b,onColumnProposeMove:g,columns:a,onColumnMoved:u,columnSelectionBlending:"mixed",rangeSelectionBlending:"mixed",rows:1e3})};var i,C,m;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/reorder-rows.stories-QuXMn7SV.js b/docs/assets/reorder-rows.stories-ZSuwtyLT.js similarity index 87% rename from docs/assets/reorder-rows.stories-QuXMn7SV.js rename to docs/assets/reorder-rows.stories-ZSuwtyLT.js index be340259a..87abfe308 100644 --- a/docs/assets/reorder-rows.stories-QuXMn7SV.js +++ b/docs/assets/reorder-rows.stories-ZSuwtyLT.js @@ -1,4 +1,4 @@ -import{j as o,F as C,a as D}from"./marked.esm-dbrxtycE.js";import{l as f}from"./lodash-8jIGfDyZ.js";import{R as t}from"./index-BMVQvedj.js";import{D as h}from"./data-editor-all-2MtuC67g.js";import{B as b,D as g,P as v,d as k}from"./utils-J-I08TtD.js";import{G as x}from"./image-window-loader-lKUISrIQ.js";import{S as M}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const q={title:"Glide-Data-Grid/DataEditor Demos",decorators:[s=>o(M,{children:o(b,{title:"Reorder Rows",description:o(C,{children:D(g,{children:["Rows can be re-arranged by using the ",o(v,{children:"onRowMoved"})," callback. When set the first row can be used to drag and drop."]})}),children:o(s,{})})})]},a=()=>{const s=t.useMemo(()=>[{title:"Col A",width:150},{title:"Col B",width:150}],[]),[n,m]=t.useState(()=>f.range(0,50).map(e=>[`A: ${e}`,`B: ${e}`])),p=t.useCallback(([e,r])=>({kind:x.Text,allowOverlay:!1,data:n[r][e],displayData:n[r][e]}),[n]),w=t.useCallback((e,r)=>{m(u=>{const l=[...u],R=l.splice(e,1);return l.splice(r,0,...R),l})},[]);return o(h,{...k,rowMarkers:"both",onRowMoved:w,getCellContent:p,columns:s,rows:50})};var d,i,c;a.parameters={...a.parameters,docs:{...(d=a.parameters)==null?void 0:d.docs,source:{originalSource:`() => { +import{j as o,F as C,a as D}from"./marked.esm-dbrxtycE.js";import{l as f}from"./lodash-8jIGfDyZ.js";import{R as t}from"./index-BMVQvedj.js";import{D as h}from"./data-editor-all-MRDpHEQ_.js";import{B as b,D as g,P as v,d as k}from"./utils-0sbaJdQp.js";import{G as x}from"./image-window-loader-aCHQvgUN.js";import{S as M}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const q={title:"Glide-Data-Grid/DataEditor Demos",decorators:[s=>o(M,{children:o(b,{title:"Reorder Rows",description:o(C,{children:D(g,{children:["Rows can be re-arranged by using the ",o(v,{children:"onRowMoved"})," callback. When set the first row can be used to drag and drop."]})}),children:o(s,{})})})]},a=()=>{const s=t.useMemo(()=>[{title:"Col A",width:150},{title:"Col B",width:150}],[]),[n,m]=t.useState(()=>f.range(0,50).map(e=>[`A: ${e}`,`B: ${e}`])),p=t.useCallback(([e,r])=>({kind:x.Text,allowOverlay:!1,data:n[r][e],displayData:n[r][e]}),[n]),w=t.useCallback((e,r)=>{m(u=>{const l=[...u],R=l.splice(e,1);return l.splice(r,0,...R),l})},[]);return o(h,{...k,rowMarkers:"both",onRowMoved:w,getCellContent:p,columns:s,rows:50})};var d,i,c;a.parameters={...a.parameters,docs:{...(d=a.parameters)==null?void 0:d.docs,source:{originalSource:`() => { const cols = React.useMemo(() => [{ title: "Col A", width: 150 diff --git a/docs/assets/resizable-columns.stories-gzi2qzMf.js b/docs/assets/resizable-columns.stories-jIxX01NI.js similarity index 85% rename from docs/assets/resizable-columns.stories-gzi2qzMf.js rename to docs/assets/resizable-columns.stories-jIxX01NI.js index 915f3609f..ca96003ab 100644 --- a/docs/assets/resizable-columns.stories-gzi2qzMf.js +++ b/docs/assets/resizable-columns.stories-jIxX01NI.js @@ -1,4 +1,4 @@ -import{j as e,a as t,F as c}from"./marked.esm-dbrxtycE.js";import{R as u}from"./index-BMVQvedj.js";import{D as p}from"./data-editor-all-2MtuC67g.js";import{B as d,D as h,P as s,M as C,u as g,d as f}from"./utils-J-I08TtD.js";import{S as z}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const Y={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(z,{children:e(d,{title:"Resizable columns",description:t(c,{children:[t(h,{children:["You can resize columns by dragging their edges, as long as you respond to the"," ",e(s,{children:"onColumnResize"})," prop."]}),t(C,{children:["By setting the ",e(s,{children:"overscrollX"})," property extra space can be allocated at the end of the grid to allow for easier resizing of the final column. You can highlight multiple columns to resize them all at once."]})]}),children:e(r,{})})})]},o=()=>{const{cols:r,getCellContent:i,onColumnResize:m}=g(60);return e(p,{...f,getCellContent:i,columns:r,rowMarkers:"both",overscrollX:200,overscrollY:200,maxColumnAutoWidth:500,maxColumnWidth:2e3,rows:50,scaleToRem:!0,theme:u.useMemo(()=>({baseFontStyle:"0.8125rem",headerFontStyle:"600 0.8125rem",editorFontSize:"0.8125rem"}),[]),onColumnResize:m})};var a,n,l;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:`() => { +import{j as e,a as t,F as c}from"./marked.esm-dbrxtycE.js";import{R as u}from"./index-BMVQvedj.js";import{D as p}from"./data-editor-all-MRDpHEQ_.js";import{B as d,D as h,P as s,M as C,u as g,d as f}from"./utils-0sbaJdQp.js";import{S as z}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const Y={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(z,{children:e(d,{title:"Resizable columns",description:t(c,{children:[t(h,{children:["You can resize columns by dragging their edges, as long as you respond to the"," ",e(s,{children:"onColumnResize"})," prop."]}),t(C,{children:["By setting the ",e(s,{children:"overscrollX"})," property extra space can be allocated at the end of the grid to allow for easier resizing of the final column. You can highlight multiple columns to resize them all at once."]})]}),children:e(r,{})})})]},o=()=>{const{cols:r,getCellContent:i,onColumnResize:m}=g(60);return e(p,{...f,getCellContent:i,columns:r,rowMarkers:"both",overscrollX:200,overscrollY:200,maxColumnAutoWidth:500,maxColumnWidth:2e3,rows:50,scaleToRem:!0,theme:u.useMemo(()=>({baseFontStyle:"0.8125rem",headerFontStyle:"600 0.8125rem",editorFontSize:"0.8125rem"}),[]),onColumnResize:m})};var a,n,l;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/right-element.stories-WEHYhkbP.js b/docs/assets/right-element.stories-SlBlKhj_.js similarity index 90% rename from docs/assets/right-element.stories-WEHYhkbP.js rename to docs/assets/right-element.stories-SlBlKhj_.js index bd56c2761..c27d0d3af 100644 --- a/docs/assets/right-element.stories-WEHYhkbP.js +++ b/docs/assets/right-element.stories-SlBlKhj_.js @@ -1,4 +1,4 @@ -import{j as t,a as d}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as g}from"./data-editor-all-2MtuC67g.js";import{B as R,D as b,P as y,u as C,d as x}from"./utils-J-I08TtD.js";import{S as k}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const T={title:"Glide-Data-Grid/DataEditor Demos",decorators:[n=>t(k,{children:t(R,{title:"Right Element",description:d(b,{children:["A DOM element may be added as a trailer to the grid by using the"," ",t(y,{children:"rightElement"})," prop."]}),children:t(n,{})})})]},o=()=>{const{cols:n,getCellContent:m,setCellValue:a}=C(8,!1),u=l.useMemo(()=>n.map(s=>({...s,grow:1})),[n]),[r,w]=l.useState(300),h=l.useCallback(()=>{const s=r;w(e=>e+1);for(let e=0;e<6;e++)a([e,s],{displayData:"",data:""})},[r,a]);return t(g,{...x,getCellContent:m,columns:u,rowMarkers:"both",onCellEdited:a,trailingRowOptions:{hint:"New row...",sticky:!0,tint:!0},rows:r,onRowAppended:h,rightElementProps:{sticky:!0},rightElement:d("div",{style:{height:"100%",padding:"20px 20px 40px 20px",width:200,color:"black",whiteSpace:"pre-wrap",backgroundColor:"rgba(240, 240, 250, 0.2)",display:"flex",justifyContent:"center",alignItems:"center",boxShadow:"0 0 10px rgba(0, 0, 0, 0.15)",backdropFilter:"blur(12px)"},children:["This is a real DOM element. You can put whatever you want here. You can also size it as big as you want. ",` +import{j as t,a as d}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as g}from"./data-editor-all-MRDpHEQ_.js";import{B as R,D as b,P as y,u as C,d as x}from"./utils-0sbaJdQp.js";import{S as k}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const T={title:"Glide-Data-Grid/DataEditor Demos",decorators:[n=>t(k,{children:t(R,{title:"Right Element",description:d(b,{children:["A DOM element may be added as a trailer to the grid by using the"," ",t(y,{children:"rightElement"})," prop."]}),children:t(n,{})})})]},o=()=>{const{cols:n,getCellContent:m,setCellValue:a}=C(8,!1),u=l.useMemo(()=>n.map(s=>({...s,grow:1})),[n]),[r,w]=l.useState(300),h=l.useCallback(()=>{const s=r;w(e=>e+1);for(let e=0;e<6;e++)a([e,s],{displayData:"",data:""})},[r,a]);return t(g,{...x,getCellContent:m,columns:u,rowMarkers:"both",onCellEdited:a,trailingRowOptions:{hint:"New row...",sticky:!0,tint:!0},rows:r,onRowAppended:h,rightElementProps:{sticky:!0},rightElement:d("div",{style:{height:"100%",padding:"20px 20px 40px 20px",width:200,color:"black",whiteSpace:"pre-wrap",backgroundColor:"rgba(240, 240, 250, 0.2)",display:"flex",justifyContent:"center",alignItems:"center",boxShadow:"0 0 10px rgba(0, 0, 0, 0.15)",backdropFilter:"blur(12px)"},children:["This is a real DOM element. You can put whatever you want here. You can also size it as big as you want. ",` `,"It also does not have to be sticky."]})})};var i,c,p;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`() => { const { diff --git a/docs/assets/right-to-left.stories-hSGpRnuv.js b/docs/assets/right-to-left.stories-SJSb5h18.js similarity index 88% rename from docs/assets/right-to-left.stories-hSGpRnuv.js rename to docs/assets/right-to-left.stories-SJSb5h18.js index 44b0c4fde..86a4e9e51 100644 --- a/docs/assets/right-to-left.stories-hSGpRnuv.js +++ b/docs/assets/right-to-left.stories-SJSb5h18.js @@ -1,4 +1,4 @@ -import{j as t,F as m}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as p}from"./data-editor-all-2MtuC67g.js";import{B as g,D as E,u as f,d as h}from"./utils-J-I08TtD.js";import{G as M}from"./image-window-loader-lKUISrIQ.js";import{S as k}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const V={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>t(k,{children:t(g,{title:"Right to Left support",description:t(m,{children:t(E,{children:"The data editor automatically detects RTL in text cells and respects it."})}),children:t(r,{})})})]},o=()=>{const{cols:r,getCellContent:u,setCellValue:i,onColumnResize:D}=f(60,!1),c=l.useMemo(()=>{const e=[...r];return e[0]={...e[0],title:"גלייד",hasMenu:!0},e},[r]),C=l.useCallback(e=>{const[d,R]=e;return d!==0?u(e):{kind:M.Text,allowOverlay:!0,data:"אני גדעון, מומחה לאפליקציות גלייד.",displayData:"אני גדעון, מומחה לאפליקציות גלייד.",allowWrapping:!0}},[u]);return t(p,{...h,getCellContent:C,columns:c,onColumnResize:D,getCellsForSelection:!0,rowMarkers:"both",onHeaderMenuClick:()=>alert("menu click"),onPaste:!0,onCellEdited:i,rows:1e3})};var n,a,s;o.parameters={...o.parameters,docs:{...(n=o.parameters)==null?void 0:n.docs,source:{originalSource:`() => { +import{j as t,F as m}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as p}from"./data-editor-all-MRDpHEQ_.js";import{B as g,D as E,u as f,d as h}from"./utils-0sbaJdQp.js";import{G as M}from"./image-window-loader-aCHQvgUN.js";import{S as k}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const V={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>t(k,{children:t(g,{title:"Right to Left support",description:t(m,{children:t(E,{children:"The data editor automatically detects RTL in text cells and respects it."})}),children:t(r,{})})})]},o=()=>{const{cols:r,getCellContent:u,setCellValue:i,onColumnResize:D}=f(60,!1),c=l.useMemo(()=>{const e=[...r];return e[0]={...e[0],title:"גלייד",hasMenu:!0},e},[r]),C=l.useCallback(e=>{const[d,R]=e;return d!==0?u(e):{kind:M.Text,allowOverlay:!0,data:"אני גדעון, מומחה לאפליקציות גלייד.",displayData:"אני גדעון, מומחה לאפליקציות גלייד.",allowWrapping:!0}},[u]);return t(p,{...h,getCellContent:C,columns:c,onColumnResize:D,getCellsForSelection:!0,rowMarkers:"both",onHeaderMenuClick:()=>alert("menu click"),onPaste:!0,onCellEdited:i,rows:1e3})};var n,a,s;o.parameters={...o.parameters,docs:{...(n=o.parameters)==null?void 0:n.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/row-and-header-sizes.stories-s2x0F9ko.js b/docs/assets/row-and-header-sizes.stories-_n_Og1OI.js similarity index 78% rename from docs/assets/row-and-header-sizes.stories-s2x0F9ko.js rename to docs/assets/row-and-header-sizes.stories-_n_Og1OI.js index 0e8542625..0b6870815 100644 --- a/docs/assets/row-and-header-sizes.stories-s2x0F9ko.js +++ b/docs/assets/row-and-header-sizes.stories-_n_Og1OI.js @@ -1,4 +1,4 @@ -import{j as e,a as o,F as h}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as l}from"./data-editor-all-2MtuC67g.js";import{B as p,D as c,P as a,M as g,u as w,d as H}from"./utils-J-I08TtD.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const R={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>e(u,{children:e(p,{title:"Row and Header sizes",description:o(h,{children:[o(c,{children:["The row size can be controlled with ",e(a,{children:"rowHeight"})," and the header size with ",e(a,{children:"headerHeight"}),"."]}),e(g,{children:"Use the story's controls to resize them"})]}),children:e(t,{})})})]},r=t=>{const{cols:d,getCellContent:m}=w(6);return e(l,{...H,rowHeight:t.rowHeight,headerHeight:t.headerHeight,rowMarkers:"number",getCellContent:m,columns:d,rows:1e3})};r.args={rowHeight:34,headerHeight:34};r.argTypes={rowHeight:{control:{type:"range",min:20,max:200}},headerHeight:{control:{type:"range",min:20,max:200}}};var i,s,n;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`p => { +import{j as e,a as o,F as h}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as l}from"./data-editor-all-MRDpHEQ_.js";import{B as p,D as c,P as a,M as g,u as w,d as H}from"./utils-0sbaJdQp.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const R={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>e(u,{children:e(p,{title:"Row and Header sizes",description:o(h,{children:[o(c,{children:["The row size can be controlled with ",e(a,{children:"rowHeight"})," and the header size with ",e(a,{children:"headerHeight"}),"."]}),e(g,{children:"Use the story's controls to resize them"})]}),children:e(t,{})})})]},r=t=>{const{cols:d,getCellContent:m}=w(6);return e(l,{...H,rowHeight:t.rowHeight,headerHeight:t.headerHeight,rowMarkers:"number",getCellContent:m,columns:d,rows:1e3})};r.args={rowHeight:34,headerHeight:34};r.argTypes={rowHeight:{control:{type:"range",min:20,max:200}},headerHeight:{control:{type:"range",min:20,max:200}}};var i,s,n;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`p => { const { cols, getCellContent diff --git a/docs/assets/row-grouping.stories-tlVFyJNB.js b/docs/assets/row-grouping.stories-eFOBPiXT.js similarity index 93% rename from docs/assets/row-grouping.stories-tlVFyJNB.js rename to docs/assets/row-grouping.stories-eFOBPiXT.js index c05841f0c..a8b9cbb04 100644 --- a/docs/assets/row-grouping.stories-tlVFyJNB.js +++ b/docs/assets/row-grouping.stories-eFOBPiXT.js @@ -1,4 +1,4 @@ -import{j as o,a as v}from"./marked.esm-dbrxtycE.js";import{R as p}from"./index-BMVQvedj.js";import{u as x,D as O}from"./data-editor-all-2MtuC67g.js";import{B as y,D as I,P as D,u as P,d as B}from"./utils-J-I08TtD.js";import{S}from"./story-utils-K2EZnGjM.js";import{G as m}from"./image-window-loader-lKUISrIQ.js";import"./lodash-8jIGfDyZ.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const U={title:"Glide-Data-Grid/DataEditor Demos",decorators:[l=>o(S,{children:o(y,{title:"Row Grouping",description:v(I,{children:["The ",o(D,{children:"rowGrouping"})," prop can be used to group and even fold rows."]}),children:o(l,{})})})]},s=l=>{const{cols:f,getCellContent:u}=P(100),d=1e3,[r,R]=p.useState(()=>({groups:[{headerIndex:0,isCollapsed:!1},{headerIndex:10,isCollapsed:!0,subGroups:[{headerIndex:15,isCollapsed:!1},{headerIndex:20,isCollapsed:!1}]},{headerIndex:30,isCollapsed:!1}],height:55,navigationBehavior:"block",selectionBehavior:"block-spanning",themeOverride:{bgCell:"rgba(0, 100, 255, 0.1)"}})),{mapper:t,getRowGroupingForPath:g,updateRowGroupingByPath:c}=x(r,d),b=p.useCallback(n=>{const{path:e,isGroupHeader:a}=t(n);if(a&&n[0]===0){const i=g(r.groups,e);R(C=>({...C,groups:c(C.groups,e,{isCollapsed:!i.isCollapsed})}))}},[g,t,r.groups,c]),k=p.useCallback(n=>{const{path:e,isGroupHeader:a,originalIndex:i}=t(n);return n[0]===0?{kind:m.Text,data:`Row ${JSON.stringify(e)}`,displayData:`Row ${JSON.stringify(e)}`,allowOverlay:!1}:a?{kind:m.Loading,allowOverlay:!1}:u(i)},[u,t]);return o(O,{...B,rowGrouping:r,height:"100%",rowMarkers:"both",freezeColumns:l.freezeColumns,getRowThemeOverride:(n,e,a)=>{if(e%2===0)return{bgCell:"rgba(0, 0, 0, 0.1)"}},onCellClicked:b,getCellContent:k,columns:f,rows:d})};var h,w,G;s.parameters={...s.parameters,docs:{...(h=s.parameters)==null?void 0:h.docs,source:{originalSource:`(p: { +import{j as o,a as v}from"./marked.esm-dbrxtycE.js";import{R as p}from"./index-BMVQvedj.js";import{u as x,D as O}from"./data-editor-all-MRDpHEQ_.js";import{B as y,D as I,P as D,u as P,d as B}from"./utils-0sbaJdQp.js";import{S}from"./story-utils-K2EZnGjM.js";import{G as m}from"./image-window-loader-aCHQvgUN.js";import"./lodash-8jIGfDyZ.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const U={title:"Glide-Data-Grid/DataEditor Demos",decorators:[l=>o(S,{children:o(y,{title:"Row Grouping",description:v(I,{children:["The ",o(D,{children:"rowGrouping"})," prop can be used to group and even fold rows."]}),children:o(l,{})})})]},s=l=>{const{cols:f,getCellContent:u}=P(100),d=1e3,[r,R]=p.useState(()=>({groups:[{headerIndex:0,isCollapsed:!1},{headerIndex:10,isCollapsed:!0,subGroups:[{headerIndex:15,isCollapsed:!1},{headerIndex:20,isCollapsed:!1}]},{headerIndex:30,isCollapsed:!1}],height:55,navigationBehavior:"block",selectionBehavior:"block-spanning",themeOverride:{bgCell:"rgba(0, 100, 255, 0.1)"}})),{mapper:t,getRowGroupingForPath:g,updateRowGroupingByPath:c}=x(r,d),b=p.useCallback(n=>{const{path:e,isGroupHeader:a}=t(n);if(a&&n[0]===0){const i=g(r.groups,e);R(C=>({...C,groups:c(C.groups,e,{isCollapsed:!i.isCollapsed})}))}},[g,t,r.groups,c]),k=p.useCallback(n=>{const{path:e,isGroupHeader:a,originalIndex:i}=t(n);return n[0]===0?{kind:m.Text,data:`Row ${JSON.stringify(e)}`,displayData:`Row ${JSON.stringify(e)}`,allowOverlay:!1}:a?{kind:m.Loading,allowOverlay:!1}:u(i)},[u,t]);return o(O,{...B,rowGrouping:r,height:"100%",rowMarkers:"both",freezeColumns:l.freezeColumns,getRowThemeOverride:(n,e,a)=>{if(e%2===0)return{bgCell:"rgba(0, 0, 0, 0.1)"}},onCellClicked:b,getCellContent:k,columns:f,rows:d})};var h,w,G;s.parameters={...s.parameters,docs:{...(h=s.parameters)==null?void 0:h.docs,source:{originalSource:`(p: { freezeColumns: number; }) => { const { diff --git a/docs/assets/row-hover.stories-JzHt7fep.js b/docs/assets/row-hover.stories-U0PlxtgK.js similarity index 85% rename from docs/assets/row-hover.stories-JzHt7fep.js rename to docs/assets/row-hover.stories-U0PlxtgK.js index 2d22edcc3..22e0ef750 100644 --- a/docs/assets/row-hover.stories-JzHt7fep.js +++ b/docs/assets/row-hover.stories-U0PlxtgK.js @@ -1,4 +1,4 @@ -import{j as e,a as p}from"./marked.esm-dbrxtycE.js";import{R as n}from"./index-BMVQvedj.js";import{D as w}from"./data-editor-all-2MtuC67g.js";import{B as v,D as h,P as R,a as g,d as C}from"./utils-J-I08TtD.js";import{S as b}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const K={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>e(b,{children:e(v,{title:"Row Hover Effect",description:p(h,{children:["Through careful usage of the ",e(R,{children:"onItemHovered"})," callback it is possible to easily create a row hover effect."]}),children:e(t,{})})})]},r=()=>{const{cols:t,getCellContent:c}=g(),[s,d]=n.useState(void 0),m=n.useCallback(o=>{const[k,f]=o.location;d(o.kind!=="cell"?void 0:f)},[]),u=n.useCallback(o=>{if(o===s)return{bgCell:"#f7f7f7",bgCellMedium:"#f0f0f0"}},[s]);return e(w,{...C,rowMarkers:"both",onItemHovered:m,getCellContent:c,getRowThemeOverride:u,columns:t,rows:300})};var a,i,l;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:`() => { +import{j as e,a as p}from"./marked.esm-dbrxtycE.js";import{R as n}from"./index-BMVQvedj.js";import{D as w}from"./data-editor-all-MRDpHEQ_.js";import{B as v,D as h,P as R,a as g,d as C}from"./utils-0sbaJdQp.js";import{S as b}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const K={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>e(b,{children:e(v,{title:"Row Hover Effect",description:p(h,{children:["Through careful usage of the ",e(R,{children:"onItemHovered"})," callback it is possible to easily create a row hover effect."]}),children:e(t,{})})})]},r=()=>{const{cols:t,getCellContent:c}=g(),[s,d]=n.useState(void 0),m=n.useCallback(o=>{const[k,f]=o.location;d(o.kind!=="cell"?void 0:f)},[]),u=n.useCallback(o=>{if(o===s)return{bgCell:"#f7f7f7",bgCellMedium:"#f0f0f0"}},[s]);return e(w,{...C,rowMarkers:"both",onItemHovered:m,getCellContent:c,getRowThemeOverride:u,columns:t,rows:300})};var a,i,l;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/row-markers.stories-4ulqVo5Y.js b/docs/assets/row-markers.stories-gUwzzw83.js similarity index 77% rename from docs/assets/row-markers.stories-4ulqVo5Y.js rename to docs/assets/row-markers.stories-gUwzzw83.js index 4ec5b6e8a..844f6f012 100644 --- a/docs/assets/row-markers.stories-4ulqVo5Y.js +++ b/docs/assets/row-markers.stories-gUwzzw83.js @@ -1,4 +1,4 @@ -import{j as r,F as c,a as l}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as m}from"./data-editor-all-2MtuC67g.js";import{B as p,D as d,P as k,u,d as h}from"./utils-J-I08TtD.js";import{S as b}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const v={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>r(b,{children:r(p,{title:"Row markers",description:r(c,{children:l(d,{children:["Row Markers can be controlled by setting the ",r(k,{children:"rowMarkers"})," prop."]})}),children:r(o,{})})})]},e=o=>{const{cols:n,getCellContent:i}=u(10,!1);return r(m,{...h,getCellContent:i,verticalBorder:!1,rowMarkers:{kind:o.markers,checkboxStyle:"circle"},columns:n,rows:400})};e.args={markers:"both"};e.argTypes={markers:{control:{type:"select"},options:["both","checkbox","number","none","clickable-number","checkbox-visible"]}};var t,s,a;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`p => { +import{j as r,F as c,a as l}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as m}from"./data-editor-all-MRDpHEQ_.js";import{B as p,D as d,P as k,u,d as h}from"./utils-0sbaJdQp.js";import{S as b}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const v={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>r(b,{children:r(p,{title:"Row markers",description:r(c,{children:l(d,{children:["Row Markers can be controlled by setting the ",r(k,{children:"rowMarkers"})," prop."]})}),children:r(o,{})})})]},e=o=>{const{cols:n,getCellContent:i}=u(10,!1);return r(m,{...h,getCellContent:i,verticalBorder:!1,rowMarkers:{kind:o.markers,checkboxStyle:"circle"},columns:n,rows:400})};e.args={markers:"both"};e.argTypes={markers:{control:{type:"select"},options:["both","checkbox","number","none","clickable-number","checkbox-visible"]}};var t,s,a;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`p => { const { cols, getCellContent diff --git a/docs/assets/scaled-view.stories-hV1ZL-mi.js b/docs/assets/scaled-view.stories-ZKXzscAE.js similarity index 73% rename from docs/assets/scaled-view.stories-hV1ZL-mi.js rename to docs/assets/scaled-view.stories-ZKXzscAE.js index e990c57be..d212192a7 100644 --- a/docs/assets/scaled-view.stories-hV1ZL-mi.js +++ b/docs/assets/scaled-view.stories-ZKXzscAE.js @@ -1,4 +1,4 @@ -import{j as e}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as l}from"./data-editor-all-2MtuC67g.js";import{B as m,D as p,u as c,d}from"./utils-J-I08TtD.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const V={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(u,{children:e(m,{title:"Scaled view",description:e(p,{children:"The data editor supports being scaled."}),scale:"0.5",children:e(r,{})})})]},o=()=>{const{cols:r,getCellContent:i,onColumnResize:n}=c(60);return e(l,{...d,getCellContent:i,columns:r,rowMarkers:"both",rows:500,onColumnResize:n})};var t,s,a;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`() => { +import{j as e}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as l}from"./data-editor-all-MRDpHEQ_.js";import{B as m,D as p,u as c,d}from"./utils-0sbaJdQp.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const V={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(u,{children:e(m,{title:"Scaled view",description:e(p,{children:"The data editor supports being scaled."}),scale:"0.5",children:e(r,{})})})]},o=()=>{const{cols:r,getCellContent:i,onColumnResize:n}=c(60);return e(l,{...d,getCellContent:i,columns:r,rowMarkers:"both",rows:500,onColumnResize:n})};var t,s,a;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/scroll-offset.stories-51l0E9Lj.js b/docs/assets/scroll-offset.stories-51l0E9Lj.js new file mode 100644 index 000000000..d0160b902 --- /dev/null +++ b/docs/assets/scroll-offset.stories-51l0E9Lj.js @@ -0,0 +1,10 @@ +import{j as r,a as n}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as i}from"./data-editor-all-MRDpHEQ_.js";import{B as p,D as c,P as m,u as d,d as f}from"./utils-0sbaJdQp.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./lodash-8jIGfDyZ.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const v={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>r(u,{children:r(p,{title:"Scroll Offset",description:n(c,{children:["The ",r(m,{children:"rowGrouping"})," prop can be used to group and even fold rows."]}),children:r(t,{})})})]},o=()=>{const{cols:t,getCellContent:l}=d(100);return r(i,{...f,height:"100%",rowMarkers:"both",scrollOffsetY:400,getCellContent:l,columns:t,rows:1e3})};var e,s,a;o.parameters={...o.parameters,docs:{...(e=o.parameters)==null?void 0:e.docs,source:{originalSource:`() => { + const { + cols, + getCellContent + } = useMockDataGenerator(100); + const rows = 1000; + return ; +}`,...(a=(s=o.parameters)==null?void 0:s.docs)==null?void 0:a.source}}};const T=["ScrollOffset"];export{o as ScrollOffset,T as __namedExportsOrder,v as default}; diff --git a/docs/assets/scroll-shadows.stories-5iBuHYZ-.js b/docs/assets/scroll-shadows.stories-mMz0ZZOF.js similarity index 90% rename from docs/assets/scroll-shadows.stories-5iBuHYZ-.js rename to docs/assets/scroll-shadows.stories-mMz0ZZOF.js index 5d4137904..f68de5409 100644 --- a/docs/assets/scroll-shadows.stories-5iBuHYZ-.js +++ b/docs/assets/scroll-shadows.stories-mMz0ZZOF.js @@ -1,4 +1,4 @@ -import{j as o,F as S}from"./marked.esm-dbrxtycE.js";import{R as t}from"./index-BMVQvedj.js";import{D as C}from"./data-editor-all-2MtuC67g.js";import{B as b,D as R,u as y,d as k}from"./utils-J-I08TtD.js";import{C as c}from"./image-window-loader-lKUISrIQ.js";import{S as B}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const L={title:"Glide-Data-Grid/DataEditor Demos",decorators:[a=>o(B,{children:o(b,{title:"Scroll Shadows",description:o(S,{children:o(R,{children:"You can enable and disable the horizontal/vertical scroll shadows."})}),children:o(a,{})})})]},n=()=>{const{cols:a,getCellContent:h}=y(6),[w,f]=t.useState({rows:c.empty(),columns:c.empty()}),p=t.useCallback(e=>{var l;let r=c.empty();e.current!==void 0&&(r=r.add([e.current.range.y,e.current.range.y+e.current.range.height]));for(const s of((l=e.current)==null?void 0:l.rangeStack)??[])r=r.add([s.y,s.y+s.height]);f({...e,rows:r})},[]),u=t.useMemo(()=>({accentLight:"#b1f6ff",horizontalBorderColor:"transparent",headerBottomBorderColor:"rgba(115, 116, 131, 0.16)"}),[]),g=t.useCallback(e=>e%2===0?void 0:{bgCell:"#f5f5f6"},[]);return o(C,{...k,rowMarkers:"number",gridSelection:w,onGridSelectionChange:p,fixedShadowX:!1,headerHeight:26,drawFocusRing:!1,rowHeight:22,fixedShadowY:!1,getRowThemeOverride:g,verticalBorder:!1,getCellContent:h,columns:a,rows:1e3,theme:u})};var i,d,m;n.parameters={...n.parameters,docs:{...(i=n.parameters)==null?void 0:i.docs,source:{originalSource:`() => { +import{j as o,F as S}from"./marked.esm-dbrxtycE.js";import{R as t}from"./index-BMVQvedj.js";import{D as C}from"./data-editor-all-MRDpHEQ_.js";import{B as b,D as R,u as y,d as k}from"./utils-0sbaJdQp.js";import{C as c}from"./image-window-loader-aCHQvgUN.js";import{S as B}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const L={title:"Glide-Data-Grid/DataEditor Demos",decorators:[a=>o(B,{children:o(b,{title:"Scroll Shadows",description:o(S,{children:o(R,{children:"You can enable and disable the horizontal/vertical scroll shadows."})}),children:o(a,{})})})]},n=()=>{const{cols:a,getCellContent:h}=y(6),[w,f]=t.useState({rows:c.empty(),columns:c.empty()}),p=t.useCallback(e=>{var l;let r=c.empty();e.current!==void 0&&(r=r.add([e.current.range.y,e.current.range.y+e.current.range.height]));for(const s of((l=e.current)==null?void 0:l.rangeStack)??[])r=r.add([s.y,s.y+s.height]);f({...e,rows:r})},[]),u=t.useMemo(()=>({accentLight:"#b1f6ff",horizontalBorderColor:"transparent",headerBottomBorderColor:"rgba(115, 116, 131, 0.16)"}),[]),g=t.useCallback(e=>e%2===0?void 0:{bgCell:"#f5f5f6"},[]);return o(C,{...k,rowMarkers:"number",gridSelection:w,onGridSelectionChange:p,fixedShadowX:!1,headerHeight:26,drawFocusRing:!1,rowHeight:22,fixedShadowY:!1,getRowThemeOverride:g,verticalBorder:!1,getCellContent:h,columns:a,rows:1e3,theme:u})};var i,d,m;n.parameters={...n.parameters,docs:{...(i=n.parameters)==null?void 0:i.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/scrolling-data-grid-19OhoR-o.js b/docs/assets/scrolling-data-grid-UJ5_dX2R.js similarity index 99% rename from docs/assets/scrolling-data-grid-19OhoR-o.js rename to docs/assets/scrolling-data-grid-UJ5_dX2R.js index 3ad5b7c4c..122e18ef0 100644 --- a/docs/assets/scrolling-data-grid-19OhoR-o.js +++ b/docs/assets/scrolling-data-grid-UJ5_dX2R.js @@ -1 +1 @@ -import{j as U,a as he,F as me,s as Ce}from"./marked.esm-dbrxtycE.js";import{r as t}from"./index-BMVQvedj.js";import{c as Re}from"./throttle-7EuXLZa7.js";import{Q as Se,R as we,u as ve}from"./image-window-loader-lKUISrIQ.js";function ae(e,f,m,o){return Re(Math.round(f-(e.growOffset??0)),Math.ceil(m),Math.floor(o))}const De=e=>{const[f,m]=t.useState(),[o,D]=t.useState(),[i,O]=t.useState(),[h,w]=t.useState(),[C,b]=t.useState(!1),[K,c]=t.useState(),[R,X]=t.useState(),[N,oe]=t.useState(),[q,ee]=t.useState(!1),[ne,re]=t.useState(),{onHeaderMenuClick:Y,onHeaderIndicatorClick:te,getCellContent:x,onColumnMoved:j,onColumnResize:S,onColumnResizeStart:$,onColumnResizeEnd:F,gridRef:_,maxColumnWidth:M,minColumnWidth:W,onRowMoved:E,lockColumns:A,onColumnProposeMove:J,onMouseDown:P,onMouseUp:Z,onItemHovered:n,onDragStart:L,canvasRef:H}=e,G=(S??F??$)!==void 0,{columns:a,selection:l}=e,s=l.columns,d=t.useCallback(r=>{const[g,y]=r.location;i!==void 0&&h!==g&&g>=A?(b(!0),w(g)):R!==void 0&&y!==void 0?(ee(!0),oe(Math.max(0,y))):o===void 0&&!C&&!q&&(n==null||n(r))},[i,R,h,n,A,o,C,q]),B=j!==void 0,V=t.useCallback(r=>{var g;if(r.button===0){const[y,v]=r.location;if(r.kind==="out-of-bounds"&&r.isEdge&&G){const T=(g=_==null?void 0:_.current)==null?void 0:g.getBounds(a.length-1,-1);T!==void 0&&(m(T.x),D(a.length-1))}else if(r.kind==="header"&&y>=A){const T=H==null?void 0:H.current;if(r.isEdge&&G&&T){m(r.bounds.x),D(y);const ue=T.getBoundingClientRect().width/T.offsetWidth,le=r.bounds.width/ue;$==null||$(a[y],le,y,le+(a[y].growOffset??0))}else r.kind==="header"&&B&&(c(r.bounds.x),O(y))}else r.kind==="cell"&&A>0&&y===0&&v!==void 0&&E!==void 0&&(re(r.bounds.y),X(v))}P==null||P(r)},[P,G,A,E,_,a,B,$,H]),Q=t.useCallback((r,g)=>{C||q||Y==null||Y(r,g)},[C,q,Y]),se=t.useCallback((r,g)=>{C||q||te==null||te(r,g)},[C,q,te]),k=t.useRef(-1),u=t.useCallback(()=>{k.current=-1,X(void 0),oe(void 0),re(void 0),ee(!1),O(void 0),w(void 0),c(void 0),b(!1),D(void 0),m(void 0)},[]),z=t.useCallback((r,g)=>{if(r.button===0){if(o!==void 0){if((s==null?void 0:s.hasIndex(o))===!0)for(const v of s){if(v===o)continue;const T=a[v],p=ae(T,k.current,W,M);S==null||S(T,p,v,p+(T.growOffset??0))}const y=ae(a[o],k.current,W,M);if(F==null||F(a[o],y,o,y+(a[o].growOffset??0)),s.hasIndex(o))for(const v of s){if(v===o)continue;const T=a[v],p=ae(T,k.current,W,M);F==null||F(T,p,v,p+(T.growOffset??0))}}u(),i!==void 0&&h!==void 0&&(j==null||j(i,h)),R!==void 0&&N!==void 0&&(E==null||E(R,N))}Z==null||Z(r,g)},[Z,o,i,h,R,N,s,F,a,W,M,S,j,E,u]),I=t.useMemo(()=>{if(!(i===void 0||h===void 0)&&i!==h&&(J==null?void 0:J(i,h))!==!1)return{src:i,dest:h}},[i,h,J]),ie=t.useCallback(r=>{const g=H==null?void 0:H.current;if(i!==void 0&&K!==void 0)Math.abs(r.clientX-K)>20&&b(!0);else if(R!==void 0&&ne!==void 0)Math.abs(r.clientY-ne)>20&&ee(!0);else if(o!==void 0&&f!==void 0&&g){const v=g.getBoundingClientRect().width/g.offsetWidth,T=(r.clientX-f)/v,p=a[o],ue=ae(p,T,W,M);if(S==null||S(p,ue,o,ue+(p.growOffset??0)),k.current=T,(s==null?void 0:s.first())===o)for(const le of s){if(le===o)continue;const fe=a[le],ge=ae(fe,k.current,W,M);S==null||S(fe,ge,le,ge+(fe.growOffset??0))}}},[i,K,R,ne,o,f,a,W,M,S,s,H]),ce=t.useCallback((r,g)=>{if(R===void 0||N===void 0)return x(r,g);let[y,v]=r;return v===N?v=R:(v>N&&(v-=1),v>=R&&(v+=1)),x([y,v],g)},[R,N,x]),de=t.useCallback(r=>{L==null||L(r),r.defaultPrevented()||u()},[u,L]);return U(Se,{accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,enableGroups:e.enableGroups,eventTargetRef:e.eventTargetRef,experimental:e.experimental,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,headerIcons:e.headerIcons,height:e.height,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,resizeColumn:o,isDraggable:e.isDraggable,isFilling:e.isFilling,isFocused:e.isFocused,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDrop:e.onDrop,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,resizeIndicator:e.resizeIndicator,verticalBorder:e.verticalBorder,width:e.width,getCellContent:ce,isResizing:o!==void 0,onHeaderMenuClick:Q,onHeaderIndicatorClick:se,isDragging:C,onItemHovered:d,onDragStart:de,onMouseDown:V,allowResize:G,onMouseUp:z,dragAndDropState:I,onMouseMoveRaw:ie,ref:_})},be=De;function He(e){const f=t.useRef(null),[m,o]=t.useState({width:e==null?void 0:e[0],height:e==null?void 0:e[1]});return t.useLayoutEffect(()=>{const D=O=>{for(const h of O){const{width:w,height:C}=h&&h.contentRect||{};o(b=>b.width===w&&b.height===C?b:{width:w,height:C})}},i=new window.ResizeObserver(D);return f.current&&i.observe(f.current,void 0),()=>{i.disconnect()}},[f.current]),{ref:f,...m}}const ye=(e,f,m)=>{const o=t.useRef(null),D=t.useRef(null),i=t.useRef(null),O=t.useRef(0),h=t.useRef(f);h.current=f;const w=m.current;t.useEffect(()=>{const C=()=>{var c,R;if(D.current===!1&&w!==null){const X=[w.scrollLeft,w.scrollTop];if(((c=i.current)==null?void 0:c[0])===X[0]&&((R=i.current)==null?void 0:R[1])===X[1])if(O.current>10){i.current=null,D.current=null;return}else O.current++;else O.current=0,h.current(X[0],X[1]),i.current=X;o.current=window.setTimeout(C,8.333333333333334)}},b=()=>{D.current=!0,i.current=null,o.current!==null&&(window.clearTimeout(o.current),o.current=null)},K=c=>{c.touches.length===0&&(D.current=!1,O.current=0,o.current=window.setTimeout(C,8.333333333333334))};if(e&&w!==null){const c=w;return c.addEventListener("touchstart",b),c.addEventListener("touchend",K),()=>{c.removeEventListener("touchstart",b),c.removeEventListener("touchend",K),o.current!==null&&window.clearTimeout(o.current)}}},[e,w])},xe=ye,Me=()=>e=>e.isSafari?"scroll":"auto",ke=Ce("div")({name:"ScrollRegionStyle",class:"sj2f20c",propsAsIs:!1,vars:{"sj2f20c-0":[Me()]}});function Te(e){const[f,m]=t.useState(!1),o=typeof window>"u"?null:window,D=t.useRef(0);return ve("touchstart",t.useCallback(()=>{window.clearTimeout(D.current),m(!0)},[]),o,!0,!1),ve("touchend",t.useCallback(i=>{i.touches.length===0&&(D.current=window.setTimeout(()=>m(!1),e))},[e]),o,!0,!1),f}const Ie=e=>{var G,a;const{children:f,clientHeight:m,scrollHeight:o,scrollWidth:D,update:i,draggable:O,className:h,preventDiagonalScrolling:w=!1,paddingBottom:C=0,paddingRight:b=0,rightElement:K,rightElementProps:c,kineticScrollPerfHack:R=!1,scrollRef:X,initialSize:N}=e,oe=[],q=(c==null?void 0:c.sticky)??!1,ee=(c==null?void 0:c.fill)??!1,ne=t.useRef(0),re=t.useRef(0),Y=t.useRef(null),te=typeof window>"u"?1:window.devicePixelRatio,x=t.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),j=t.useRef(null),S=Te(200),[$,F]=t.useState(!0),_=t.useRef(0);t.useLayoutEffect(()=>{if(!$||S||x.current.lockDirection===void 0)return;const l=Y.current;if(l===null)return;const[s,d]=x.current.lockDirection;s!==void 0?l.scrollLeft=s:d!==void 0&&(l.scrollTop=d),x.current.lockDirection=void 0},[S,$]);const M=t.useCallback((l,s)=>{var de;const d=Y.current;if(d===null)return;s=s??d.scrollTop,l=l??d.scrollLeft;const B=x.current.scrollTop,V=x.current.scrollLeft,Q=l-V,se=s-B;S&&Q!==0&&se!==0&&(Math.abs(Q)>3||Math.abs(se)>3)&&w&&x.current.lockDirection===void 0&&(x.current.lockDirection=Math.abs(Q)0&&(Math.abs(ie)>2e3||I===0||I===ce)&&o>d.scrollHeight+5){const r=I/ce,g=(o-z)*r;ne.current=g-I}k!==void 0&&(window.clearTimeout(_.current),F(!1),_.current=window.setTimeout(()=>F(!0),200)),i({x:l,y:I+ne.current,width:u-b,height:z-C,paddingRight:((de=j.current)==null?void 0:de.clientWidth)??0})},[C,b,o,i,w,S]);xe(R&&we.value,M,Y);const W=t.useRef(M);W.current=M;const E=t.useRef(),A=t.useRef(!1);t.useLayoutEffect(()=>{A.current?M():A.current=!0},[M,C,b]);const J=t.useCallback(l=>{Y.current=l,X!==void 0&&(X.current=l)},[X]);let P=0,Z=0;for(oe.push(U("div",{style:{width:D,height:0}},P++));ZW.current(),0),E.current={width:L,height:H}),(L??0)===0||(H??0)===0?U("div",{ref:n}):U("div",{ref:n,children:he(ke,{isSafari:we.value,children:[U("div",{className:"dvn-underlay",children:f}),U("div",{ref:J,style:E.current,draggable:O,onDragStart:l=>{O||(l.stopPropagation(),l.preventDefault())},className:"dvn-scroller "+(h??""),onScroll:()=>M(),children:he("div",{className:"dvn-scroll-inner"+(K===void 0?" dvn-hidden":""),children:[U("div",{className:"dvn-stack",children:oe}),K!==void 0&&he(me,{children:[!ee&&U("div",{className:"dvn-spacer"}),U("div",{ref:j,style:{height:H,maxHeight:m-Math.ceil(te%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:b,flexGrow:ee?1:void 0,right:q?b??0:void 0,pointerEvents:"auto"},children:K})]})]})})]})})},Oe=e=>{const{columns:f,rows:m,rowHeight:o,headerHeight:D,groupHeaderHeight:i,enableGroups:O,freezeColumns:h,experimental:w,nonGrowWidth:C,clientSize:b,className:K,onVisibleRegionChanged:c,scrollRef:R,preventDiagonalScrolling:X,rightElement:N,rightElementProps:oe,overscrollX:q,overscrollY:ee,initialSize:ne,smoothScrollX:re=!1,smoothScrollY:Y=!1,isDraggable:te}=e,{paddingRight:x,paddingBottom:j}=w??{},[S,$]=b,F=t.useRef(),_=t.useRef(),M=t.useRef(),W=t.useRef(),E=C+Math.max(0,q??0);let A=O?D+i:D;if(typeof o=="number")A+=m*o;else for(let n=0;n{var se,k;if(J.current===void 0)return;const n={...J.current};let L=0,H=n.x<0?-n.x:0,G=0,a=0;n.x=n.x<0?0:n.x;let l=0;for(let u=0;u=z+u.width)L+=u.width,a++,G++;else if(n.x>z)L+=u.width,re?H+=z-n.x:a++,G++;else if(n.x+n.width>z)L+=u.width,G++;else break}let s=0,d=0,B=0;if(typeof o=="number")Y?(d=Math.floor(n.y/o),s=d*o-n.y):d=Math.ceil(n.y/o),B=Math.ceil(n.height/o)+d,s<0&&B++;else{let u=0;for(let z=0;z=u+I)u+=I,d++,B++;else if(n.y>ie)u+=I,Y?s+=ie-n.y:d++,B++;else if(n.y+n.height>I/2+u)u+=I,B++;else break}}const V={x:a,y:d,width:G-a,height:B-d},Q=F.current;(Q===void 0||Q.y!==V.y||Q.x!==V.x||Q.height!==V.height||Q.width!==V.width||_.current!==H||M.current!==s||n.width!==((se=W.current)==null?void 0:se[0])||n.height!==((k=W.current)==null?void 0:k[1]))&&(c==null||c({x:a,y:d,width:G-a,height:B-d},n.width,n.height,n.paddingRight??0,H,s),F.current=V,_.current=H,M.current=s,W.current=[n.width,n.height])},[f,o,m,c,h,re,Y]),Z=t.useCallback(n=>{J.current=n,P()},[P]);return t.useEffect(()=>{P()},[P]),U(Ie,{scrollRef:R,className:K,kineticScrollPerfHack:w==null?void 0:w.kineticScrollPerfHack,preventDiagonalScrolling:X,draggable:te===!0||typeof te=="string",scrollWidth:E+(x??0),scrollHeight:A+(j??0),clientHeight:$,rightElement:N,paddingBottom:j,paddingRight:x,rightElementProps:oe,update:Z,initialSize:ne,children:U(be,{eventTargetRef:R,width:S,height:$,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,onColumnProposeMove:e.onColumnProposeMove,verticalBorder:e.verticalBorder,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator})})},ze=Oe;export{ze as G}; +import{j as U,a as he,F as me,s as Ce}from"./marked.esm-dbrxtycE.js";import{r as t}from"./index-BMVQvedj.js";import{c as Re}from"./throttle-7EuXLZa7.js";import{Q as Se,R as we,u as ve}from"./image-window-loader-aCHQvgUN.js";function ae(e,f,m,o){return Re(Math.round(f-(e.growOffset??0)),Math.ceil(m),Math.floor(o))}const De=e=>{const[f,m]=t.useState(),[o,D]=t.useState(),[i,O]=t.useState(),[h,w]=t.useState(),[C,b]=t.useState(!1),[K,c]=t.useState(),[R,X]=t.useState(),[N,oe]=t.useState(),[q,ee]=t.useState(!1),[ne,re]=t.useState(),{onHeaderMenuClick:Y,onHeaderIndicatorClick:te,getCellContent:x,onColumnMoved:j,onColumnResize:S,onColumnResizeStart:$,onColumnResizeEnd:F,gridRef:_,maxColumnWidth:M,minColumnWidth:W,onRowMoved:E,lockColumns:A,onColumnProposeMove:J,onMouseDown:P,onMouseUp:Z,onItemHovered:n,onDragStart:L,canvasRef:H}=e,G=(S??F??$)!==void 0,{columns:a,selection:l}=e,s=l.columns,d=t.useCallback(r=>{const[g,y]=r.location;i!==void 0&&h!==g&&g>=A?(b(!0),w(g)):R!==void 0&&y!==void 0?(ee(!0),oe(Math.max(0,y))):o===void 0&&!C&&!q&&(n==null||n(r))},[i,R,h,n,A,o,C,q]),B=j!==void 0,V=t.useCallback(r=>{var g;if(r.button===0){const[y,v]=r.location;if(r.kind==="out-of-bounds"&&r.isEdge&&G){const T=(g=_==null?void 0:_.current)==null?void 0:g.getBounds(a.length-1,-1);T!==void 0&&(m(T.x),D(a.length-1))}else if(r.kind==="header"&&y>=A){const T=H==null?void 0:H.current;if(r.isEdge&&G&&T){m(r.bounds.x),D(y);const ue=T.getBoundingClientRect().width/T.offsetWidth,le=r.bounds.width/ue;$==null||$(a[y],le,y,le+(a[y].growOffset??0))}else r.kind==="header"&&B&&(c(r.bounds.x),O(y))}else r.kind==="cell"&&A>0&&y===0&&v!==void 0&&E!==void 0&&(re(r.bounds.y),X(v))}P==null||P(r)},[P,G,A,E,_,a,B,$,H]),Q=t.useCallback((r,g)=>{C||q||Y==null||Y(r,g)},[C,q,Y]),se=t.useCallback((r,g)=>{C||q||te==null||te(r,g)},[C,q,te]),k=t.useRef(-1),u=t.useCallback(()=>{k.current=-1,X(void 0),oe(void 0),re(void 0),ee(!1),O(void 0),w(void 0),c(void 0),b(!1),D(void 0),m(void 0)},[]),z=t.useCallback((r,g)=>{if(r.button===0){if(o!==void 0){if((s==null?void 0:s.hasIndex(o))===!0)for(const v of s){if(v===o)continue;const T=a[v],p=ae(T,k.current,W,M);S==null||S(T,p,v,p+(T.growOffset??0))}const y=ae(a[o],k.current,W,M);if(F==null||F(a[o],y,o,y+(a[o].growOffset??0)),s.hasIndex(o))for(const v of s){if(v===o)continue;const T=a[v],p=ae(T,k.current,W,M);F==null||F(T,p,v,p+(T.growOffset??0))}}u(),i!==void 0&&h!==void 0&&(j==null||j(i,h)),R!==void 0&&N!==void 0&&(E==null||E(R,N))}Z==null||Z(r,g)},[Z,o,i,h,R,N,s,F,a,W,M,S,j,E,u]),I=t.useMemo(()=>{if(!(i===void 0||h===void 0)&&i!==h&&(J==null?void 0:J(i,h))!==!1)return{src:i,dest:h}},[i,h,J]),ie=t.useCallback(r=>{const g=H==null?void 0:H.current;if(i!==void 0&&K!==void 0)Math.abs(r.clientX-K)>20&&b(!0);else if(R!==void 0&&ne!==void 0)Math.abs(r.clientY-ne)>20&&ee(!0);else if(o!==void 0&&f!==void 0&&g){const v=g.getBoundingClientRect().width/g.offsetWidth,T=(r.clientX-f)/v,p=a[o],ue=ae(p,T,W,M);if(S==null||S(p,ue,o,ue+(p.growOffset??0)),k.current=T,(s==null?void 0:s.first())===o)for(const le of s){if(le===o)continue;const fe=a[le],ge=ae(fe,k.current,W,M);S==null||S(fe,ge,le,ge+(fe.growOffset??0))}}},[i,K,R,ne,o,f,a,W,M,S,s,H]),ce=t.useCallback((r,g)=>{if(R===void 0||N===void 0)return x(r,g);let[y,v]=r;return v===N?v=R:(v>N&&(v-=1),v>=R&&(v+=1)),x([y,v],g)},[R,N,x]),de=t.useCallback(r=>{L==null||L(r),r.defaultPrevented()||u()},[u,L]);return U(Se,{accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,enableGroups:e.enableGroups,eventTargetRef:e.eventTargetRef,experimental:e.experimental,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,headerIcons:e.headerIcons,height:e.height,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,resizeColumn:o,isDraggable:e.isDraggable,isFilling:e.isFilling,isFocused:e.isFocused,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDrop:e.onDrop,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,resizeIndicator:e.resizeIndicator,verticalBorder:e.verticalBorder,width:e.width,getCellContent:ce,isResizing:o!==void 0,onHeaderMenuClick:Q,onHeaderIndicatorClick:se,isDragging:C,onItemHovered:d,onDragStart:de,onMouseDown:V,allowResize:G,onMouseUp:z,dragAndDropState:I,onMouseMoveRaw:ie,ref:_})},be=De;function He(e){const f=t.useRef(null),[m,o]=t.useState({width:e==null?void 0:e[0],height:e==null?void 0:e[1]});return t.useLayoutEffect(()=>{const D=O=>{for(const h of O){const{width:w,height:C}=h&&h.contentRect||{};o(b=>b.width===w&&b.height===C?b:{width:w,height:C})}},i=new window.ResizeObserver(D);return f.current&&i.observe(f.current,void 0),()=>{i.disconnect()}},[f.current]),{ref:f,...m}}const ye=(e,f,m)=>{const o=t.useRef(null),D=t.useRef(null),i=t.useRef(null),O=t.useRef(0),h=t.useRef(f);h.current=f;const w=m.current;t.useEffect(()=>{const C=()=>{var c,R;if(D.current===!1&&w!==null){const X=[w.scrollLeft,w.scrollTop];if(((c=i.current)==null?void 0:c[0])===X[0]&&((R=i.current)==null?void 0:R[1])===X[1])if(O.current>10){i.current=null,D.current=null;return}else O.current++;else O.current=0,h.current(X[0],X[1]),i.current=X;o.current=window.setTimeout(C,8.333333333333334)}},b=()=>{D.current=!0,i.current=null,o.current!==null&&(window.clearTimeout(o.current),o.current=null)},K=c=>{c.touches.length===0&&(D.current=!1,O.current=0,o.current=window.setTimeout(C,8.333333333333334))};if(e&&w!==null){const c=w;return c.addEventListener("touchstart",b),c.addEventListener("touchend",K),()=>{c.removeEventListener("touchstart",b),c.removeEventListener("touchend",K),o.current!==null&&window.clearTimeout(o.current)}}},[e,w])},xe=ye,Me=()=>e=>e.isSafari?"scroll":"auto",ke=Ce("div")({name:"ScrollRegionStyle",class:"sj2f20c",propsAsIs:!1,vars:{"sj2f20c-0":[Me()]}});function Te(e){const[f,m]=t.useState(!1),o=typeof window>"u"?null:window,D=t.useRef(0);return ve("touchstart",t.useCallback(()=>{window.clearTimeout(D.current),m(!0)},[]),o,!0,!1),ve("touchend",t.useCallback(i=>{i.touches.length===0&&(D.current=window.setTimeout(()=>m(!1),e))},[e]),o,!0,!1),f}const Ie=e=>{var G,a;const{children:f,clientHeight:m,scrollHeight:o,scrollWidth:D,update:i,draggable:O,className:h,preventDiagonalScrolling:w=!1,paddingBottom:C=0,paddingRight:b=0,rightElement:K,rightElementProps:c,kineticScrollPerfHack:R=!1,scrollRef:X,initialSize:N}=e,oe=[],q=(c==null?void 0:c.sticky)??!1,ee=(c==null?void 0:c.fill)??!1,ne=t.useRef(0),re=t.useRef(0),Y=t.useRef(null),te=typeof window>"u"?1:window.devicePixelRatio,x=t.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),j=t.useRef(null),S=Te(200),[$,F]=t.useState(!0),_=t.useRef(0);t.useLayoutEffect(()=>{if(!$||S||x.current.lockDirection===void 0)return;const l=Y.current;if(l===null)return;const[s,d]=x.current.lockDirection;s!==void 0?l.scrollLeft=s:d!==void 0&&(l.scrollTop=d),x.current.lockDirection=void 0},[S,$]);const M=t.useCallback((l,s)=>{var de;const d=Y.current;if(d===null)return;s=s??d.scrollTop,l=l??d.scrollLeft;const B=x.current.scrollTop,V=x.current.scrollLeft,Q=l-V,se=s-B;S&&Q!==0&&se!==0&&(Math.abs(Q)>3||Math.abs(se)>3)&&w&&x.current.lockDirection===void 0&&(x.current.lockDirection=Math.abs(Q)0&&(Math.abs(ie)>2e3||I===0||I===ce)&&o>d.scrollHeight+5){const r=I/ce,g=(o-z)*r;ne.current=g-I}k!==void 0&&(window.clearTimeout(_.current),F(!1),_.current=window.setTimeout(()=>F(!0),200)),i({x:l,y:I+ne.current,width:u-b,height:z-C,paddingRight:((de=j.current)==null?void 0:de.clientWidth)??0})},[C,b,o,i,w,S]);xe(R&&we.value,M,Y);const W=t.useRef(M);W.current=M;const E=t.useRef(),A=t.useRef(!1);t.useLayoutEffect(()=>{A.current?M():A.current=!0},[M,C,b]);const J=t.useCallback(l=>{Y.current=l,X!==void 0&&(X.current=l)},[X]);let P=0,Z=0;for(oe.push(U("div",{style:{width:D,height:0}},P++));ZW.current(),0),E.current={width:L,height:H}),(L??0)===0||(H??0)===0?U("div",{ref:n}):U("div",{ref:n,children:he(ke,{isSafari:we.value,children:[U("div",{className:"dvn-underlay",children:f}),U("div",{ref:J,style:E.current,draggable:O,onDragStart:l=>{O||(l.stopPropagation(),l.preventDefault())},className:"dvn-scroller "+(h??""),onScroll:()=>M(),children:he("div",{className:"dvn-scroll-inner"+(K===void 0?" dvn-hidden":""),children:[U("div",{className:"dvn-stack",children:oe}),K!==void 0&&he(me,{children:[!ee&&U("div",{className:"dvn-spacer"}),U("div",{ref:j,style:{height:H,maxHeight:m-Math.ceil(te%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:b,flexGrow:ee?1:void 0,right:q?b??0:void 0,pointerEvents:"auto"},children:K})]})]})})]})})},Oe=e=>{const{columns:f,rows:m,rowHeight:o,headerHeight:D,groupHeaderHeight:i,enableGroups:O,freezeColumns:h,experimental:w,nonGrowWidth:C,clientSize:b,className:K,onVisibleRegionChanged:c,scrollRef:R,preventDiagonalScrolling:X,rightElement:N,rightElementProps:oe,overscrollX:q,overscrollY:ee,initialSize:ne,smoothScrollX:re=!1,smoothScrollY:Y=!1,isDraggable:te}=e,{paddingRight:x,paddingBottom:j}=w??{},[S,$]=b,F=t.useRef(),_=t.useRef(),M=t.useRef(),W=t.useRef(),E=C+Math.max(0,q??0);let A=O?D+i:D;if(typeof o=="number")A+=m*o;else for(let n=0;n{var se,k;if(J.current===void 0)return;const n={...J.current};let L=0,H=n.x<0?-n.x:0,G=0,a=0;n.x=n.x<0?0:n.x;let l=0;for(let u=0;u=z+u.width)L+=u.width,a++,G++;else if(n.x>z)L+=u.width,re?H+=z-n.x:a++,G++;else if(n.x+n.width>z)L+=u.width,G++;else break}let s=0,d=0,B=0;if(typeof o=="number")Y?(d=Math.floor(n.y/o),s=d*o-n.y):d=Math.ceil(n.y/o),B=Math.ceil(n.height/o)+d,s<0&&B++;else{let u=0;for(let z=0;z=u+I)u+=I,d++,B++;else if(n.y>ie)u+=I,Y?s+=ie-n.y:d++,B++;else if(n.y+n.height>I/2+u)u+=I,B++;else break}}const V={x:a,y:d,width:G-a,height:B-d},Q=F.current;(Q===void 0||Q.y!==V.y||Q.x!==V.x||Q.height!==V.height||Q.width!==V.width||_.current!==H||M.current!==s||n.width!==((se=W.current)==null?void 0:se[0])||n.height!==((k=W.current)==null?void 0:k[1]))&&(c==null||c({x:a,y:d,width:G-a,height:B-d},n.width,n.height,n.paddingRight??0,H,s),F.current=V,_.current=H,M.current=s,W.current=[n.width,n.height])},[f,o,m,c,h,re,Y]),Z=t.useCallback(n=>{J.current=n,P()},[P]);return t.useEffect(()=>{P()},[P]),U(Ie,{scrollRef:R,className:K,kineticScrollPerfHack:w==null?void 0:w.kineticScrollPerfHack,preventDiagonalScrolling:X,draggable:te===!0||typeof te=="string",scrollWidth:E+(x??0),scrollHeight:A+(j??0),clientHeight:$,rightElement:N,paddingBottom:j,paddingRight:x,rightElementProps:oe,update:Z,initialSize:ne,children:U(be,{eventTargetRef:R,width:S,height:$,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,onColumnProposeMove:e.onColumnProposeMove,verticalBorder:e.verticalBorder,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator})})},ze=Oe;export{ze as G}; diff --git a/docs/assets/scrolling-data-grid.stories-TZdKGTtc.js b/docs/assets/scrolling-data-grid.stories-G3gtc9yy.js similarity index 96% rename from docs/assets/scrolling-data-grid.stories-TZdKGTtc.js rename to docs/assets/scrolling-data-grid.stories-G3gtc9yy.js index 313d19658..69b601caf 100644 --- a/docs/assets/scrolling-data-grid.stories-TZdKGTtc.js +++ b/docs/assets/scrolling-data-grid.stories-G3gtc9yy.js @@ -1,4 +1,4 @@ -import{j as i,s as y}from"./marked.esm-dbrxtycE.js";import{r as n}from"./index-BMVQvedj.js";import{B as x}from"./story-utils-K2EZnGjM.js";import{G as T}from"./scrolling-data-grid-19OhoR-o.js";import{G as c,O as D,m as b,g as H,C as l,P as I}from"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";const k=y("div")({name:"InnerContainer",class:"i1iwi3t9",propsAsIs:!1}),G=o=>{if(o.kind!==c.Custom)return I.find(r=>r.kind===o.kind)},$={title:"Subcomponents/ScrollingDataGrid",decorators:[o=>i("div",{children:i(x,{width:1500,height:1e3,children:i(k,{children:i(o,{})})})})]};function d(){const[o,r]=n.useState(0),[g,m]=n.useState(0),[f,h]=n.useState(0),[v,p]=n.useState(0),C=n.useCallback((e,t,R)=>{r(e.x),m(e.y),h(t),p(R)},[]),w=n.useMemo(()=>{let e=0;return["One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten"].map(t=>({title:t,width:122+(e+=50)}))},[]),S=n.useCallback(([e,t])=>({kind:c.Text,displayData:`${e},${t} Testing things that are way too long`,data:`${e},${t} Testing things that are way too long`,allowOverlay:!0}),[]);return i(T,{getCellRenderer:G,onMouseMove:()=>{},rows:1e4,enableGroups:!1,clientSize:[1e3,1e3,0],resizeIndicator:"full",cellXOffset:o,cellYOffset:g,drawHeader:void 0,experimental:void 0,headerIcons:void 0,isDraggable:void 0,nonGrowWidth:1e3,onCanvasBlur:()=>{},onCanvasFocused:()=>{},onCellFocused:()=>{},onContextMenu:()=>{},onDragEnd:()=>{},onDragLeave:()=>{},onDragOverCell:()=>{},onDragStart:()=>{},onDrop:()=>{},onHeaderIndicatorClick:()=>{},onItemHovered:()=>{},onKeyDown:()=>{},onKeyUp:()=>{},onMouseDown:()=>{},onMouseUp:()=>{},canvasRef:void 0,className:void 0,drawCell:void 0,disabledRows:void 0,fillHandle:void 0,fixedShadowX:void 0,fixedShadowY:void 0,getGroupDetails:void 0,getRowThemeOverride:void 0,highlightRegions:void 0,imageWindowLoader:new D,onHeaderMenuClick:void 0,prelightCells:void 0,drawFocusRing:!0,initialSize:void 0,overscrollX:void 0,overscrollY:void 0,preventDiagonalScrolling:void 0,rightElement:void 0,rightElementProps:void 0,scrollRef:void 0,minColumnWidth:50,isFocused:!0,theme:b(H()),isFilling:!1,maxColumnWidth:500,accessibilityHeight:50,translateX:f,translateY:v,lockColumns:0,selection:{current:void 0,rows:l.empty(),columns:l.empty()},firstColAccessible:!0,groupHeaderHeight:34,headerHeight:44,freezeTrailingRows:0,hasAppendRow:!1,rowHeight:34,onVisibleRegionChanged:C,columns:w,getCellContent:S,freezeColumns:0,verticalBorder:()=>!0,smoothScrollX:!0,smoothScrollY:!0})}var a,s,u;d.parameters={...d.parameters,docs:{...(a=d.parameters)==null?void 0:a.docs,source:{originalSource:`function Simplenotest() { +import{j as i,s as y}from"./marked.esm-dbrxtycE.js";import{r as n}from"./index-BMVQvedj.js";import{B as x}from"./story-utils-K2EZnGjM.js";import{G as T}from"./scrolling-data-grid-UJ5_dX2R.js";import{G as c,O as D,m as b,g as H,C as l,P as I}from"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";const k=y("div")({name:"InnerContainer",class:"i1iwi3t9",propsAsIs:!1}),G=o=>{if(o.kind!==c.Custom)return I.find(r=>r.kind===o.kind)},$={title:"Subcomponents/ScrollingDataGrid",decorators:[o=>i("div",{children:i(x,{width:1500,height:1e3,children:i(k,{children:i(o,{})})})})]};function d(){const[o,r]=n.useState(0),[g,m]=n.useState(0),[f,h]=n.useState(0),[v,p]=n.useState(0),C=n.useCallback((e,t,R)=>{r(e.x),m(e.y),h(t),p(R)},[]),w=n.useMemo(()=>{let e=0;return["One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten"].map(t=>({title:t,width:122+(e+=50)}))},[]),S=n.useCallback(([e,t])=>({kind:c.Text,displayData:`${e},${t} Testing things that are way too long`,data:`${e},${t} Testing things that are way too long`,allowOverlay:!0}),[]);return i(T,{getCellRenderer:G,onMouseMove:()=>{},rows:1e4,enableGroups:!1,clientSize:[1e3,1e3,0],resizeIndicator:"full",cellXOffset:o,cellYOffset:g,drawHeader:void 0,experimental:void 0,headerIcons:void 0,isDraggable:void 0,nonGrowWidth:1e3,onCanvasBlur:()=>{},onCanvasFocused:()=>{},onCellFocused:()=>{},onContextMenu:()=>{},onDragEnd:()=>{},onDragLeave:()=>{},onDragOverCell:()=>{},onDragStart:()=>{},onDrop:()=>{},onHeaderIndicatorClick:()=>{},onItemHovered:()=>{},onKeyDown:()=>{},onKeyUp:()=>{},onMouseDown:()=>{},onMouseUp:()=>{},canvasRef:void 0,className:void 0,drawCell:void 0,disabledRows:void 0,fillHandle:void 0,fixedShadowX:void 0,fixedShadowY:void 0,getGroupDetails:void 0,getRowThemeOverride:void 0,highlightRegions:void 0,imageWindowLoader:new D,onHeaderMenuClick:void 0,prelightCells:void 0,drawFocusRing:!0,initialSize:void 0,overscrollX:void 0,overscrollY:void 0,preventDiagonalScrolling:void 0,rightElement:void 0,rightElementProps:void 0,scrollRef:void 0,minColumnWidth:50,isFocused:!0,theme:b(H()),isFilling:!1,maxColumnWidth:500,accessibilityHeight:50,translateX:f,translateY:v,lockColumns:0,selection:{current:void 0,rows:l.empty(),columns:l.empty()},firstColAccessible:!0,groupHeaderHeight:34,headerHeight:44,freezeTrailingRows:0,hasAppendRow:!1,rowHeight:34,onVisibleRegionChanged:C,columns:w,getCellContent:S,freezeColumns:0,verticalBorder:()=>!0,smoothScrollX:!0,smoothScrollY:!0})}var a,s,u;d.parameters={...d.parameters,docs:{...(a=d.parameters)==null?void 0:a.docs,source:{originalSource:`function Simplenotest() { const [x, setX] = React.useState(0); const [y, setY] = React.useState(0); const [translateX, setTx] = React.useState(0); diff --git a/docs/assets/search-as-filter.stories-LfFO3nKd.js b/docs/assets/search-as-filter.stories-JAMWQTp0.js similarity index 90% rename from docs/assets/search-as-filter.stories-LfFO3nKd.js rename to docs/assets/search-as-filter.stories-JAMWQTp0.js index 06fb1639f..73721d1f2 100644 --- a/docs/assets/search-as-filter.stories-LfFO3nKd.js +++ b/docs/assets/search-as-filter.stories-JAMWQTp0.js @@ -1,4 +1,4 @@ -import{j as e,F as f}from"./marked.esm-dbrxtycE.js";import{R as o}from"./index-BMVQvedj.js";import{C as c,u as V}from"./image-window-loader-lKUISrIQ.js";import{D as y}from"./data-editor-all-2MtuC67g.js";import{B as R,D,a as F,d as v}from"./utils-J-I08TtD.js";import{S as E}from"./story-utils-K2EZnGjM.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const T={title:"Glide-Data-Grid/DataEditor Demos",decorators:[a=>e(E,{children:e(R,{title:"Filtering down to search results",description:e(f,{children:e(D,{children:"You can update your grid however you want based on search inputs."})}),children:e(a,{})})})]},s=()=>{const{cols:a,getCellContent:m,onColumnResize:p,setCellValue:S}=F(),[d,n]=o.useState(!1),[C,g]=o.useState({rows:c.empty(),columns:c.empty()});V("keydown",o.useCallback(t=>{(t.ctrlKey||t.metaKey)&&t.code==="KeyF"&&(n(w=>!w),t.stopPropagation(),t.preventDefault())},[]),window,!1,!0);const[r,l]=o.useState("");return e(y,{...v,searchResults:[],getCellContent:m,getCellsForSelection:!0,gridSelection:C,onGridSelectionChange:g,columns:a,onCellEdited:S,onColumnResize:p,searchValue:r,onSearchValueChange:l,showSearch:d,onSearchClose:()=>{n(!1),l("")},rows:r.length===0?1e4:r.length})};var i,u,h;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`() => { +import{j as e,F as f}from"./marked.esm-dbrxtycE.js";import{R as o}from"./index-BMVQvedj.js";import{C as c,u as V}from"./image-window-loader-aCHQvgUN.js";import{D as y}from"./data-editor-all-MRDpHEQ_.js";import{B as R,D,a as F,d as v}from"./utils-0sbaJdQp.js";import{S as E}from"./story-utils-K2EZnGjM.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const T={title:"Glide-Data-Grid/DataEditor Demos",decorators:[a=>e(E,{children:e(R,{title:"Filtering down to search results",description:e(f,{children:e(D,{children:"You can update your grid however you want based on search inputs."})}),children:e(a,{})})})]},s=()=>{const{cols:a,getCellContent:m,onColumnResize:p,setCellValue:S}=F(),[d,n]=o.useState(!1),[C,g]=o.useState({rows:c.empty(),columns:c.empty()});V("keydown",o.useCallback(t=>{(t.ctrlKey||t.metaKey)&&t.code==="KeyF"&&(n(w=>!w),t.stopPropagation(),t.preventDefault())},[]),window,!1,!0);const[r,l]=o.useState("");return e(y,{...v,searchResults:[],getCellContent:m,getCellsForSelection:!0,gridSelection:C,onGridSelectionChange:g,columns:a,onCellEdited:S,onColumnResize:p,searchValue:r,onSearchValueChange:l,showSearch:d,onSearchClose:()=>{n(!1),l("")},rows:r.length===0?1e4:r.length})};var i,u,h;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/server-side-data.stories-CI1jdhkZ.js b/docs/assets/server-side-data.stories-vcsA3gAS.js similarity index 93% rename from docs/assets/server-side-data.stories-CI1jdhkZ.js rename to docs/assets/server-side-data.stories-vcsA3gAS.js index 30fe2cb4d..0084165e4 100644 --- a/docs/assets/server-side-data.stories-CI1jdhkZ.js +++ b/docs/assets/server-side-data.stories-vcsA3gAS.js @@ -1,4 +1,4 @@ -import{j as x}from"./marked.esm-dbrxtycE.js";import{g as S,R as l}from"./index-BMVQvedj.js";import{G as y,C as $}from"./image-window-loader-lKUISrIQ.js";import{S as B}from"./story-utils-K2EZnGjM.js";import{D as W}from"./data-editor-all-2MtuC67g.js";import{a as F,b as O,r as C}from"./throttle-7EuXLZa7.js";import{B as V}from"./utils-J-I08TtD.js";import{a as j}from"./doc-wrapper-m1-LpzDL.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./_baseIteratee-WTHxv43n.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";import"./toConsumableArray-ppDpjNRJ.js";function K(e,t,a){var c=-1,r=e.length;t<0&&(t=-t>r?0:r+t),a=a>r?r:a,a<0&&(a+=r),r=t>a?0:a-t>>>0,t>>>=0;for(var o=Array(r);++cx(B,{children:x(e,{})})]};function te(e,t,a,c,r,o){e=Math.max(e,1);const m=l.useRef($.empty()),h=l.useRef([]),[f,G]=l.useState({x:0,y:0,width:0,height:0}),b=l.useRef(f);b.current=f;const T=l.useCallback(n=>{G(s=>n.x===s.x&&n.y===s.y&&n.width===s.width&&n.height===s.height?s:n)},[]),v=l.useCallback(n=>{const[s,d]=n,i=h.current[d];return i!==void 0?c(i,s):{kind:y.Loading,allowOverlay:!1}},[c]),k=l.useCallback(async n=>{var p;m.current=m.current.add(n);const s=n*e,d=await a([s,(n+1)*e]),i=b.current,u=[],w=h.current;for(const[R,E]of d.entries()){w[R+s]=E;for(let D=i.x;D<=i.x+i.width;D++)u.push({cell:[D,R+s]})}(p=o.current)==null||p.updateCells(u)},[a,o,e]),_=l.useCallback(n=>async()=>{const s=Math.max(0,Math.floor(n.y/e)),d=Math.floor((n.y+n.height)/e);for(const u of ee(C(s,d+1).filter(w=>!m.current.hasIndex(w)),t))await Promise.allSettled(u.map(k));const i=[];for(let u=n.y;u{const n=f,s=Math.max(0,Math.floor((n.y-e/2)/e)),d=Math.floor((n.y+n.height+e/2)/e);for(const i of C(s,d+1))m.current.hasIndex(i)||k(i)},[k,e,f]);const A=l.useCallback((n,s)=>{const[,d]=n,i=h.current[d];if(i===void 0)return;const u=r(n,s,i);u!==void 0&&(h.current[d]=u)},[r]);return{getCellContent:v,onVisibleRegionChanged:T,onCellEdited:A,getCellsForSelection:_}}const g=()=>{const e=l.useRef(null),t=l.useCallback(async r=>(await new Promise(o=>setTimeout(o,300)),C(r[0],r[1]).map(o=>[`1, ${o}`,`2, ${o}`])),[]),a=l.useMemo(()=>[{title:"A",width:150},{title:"B",width:200}],[]),c=te(50,5,t,l.useCallback((r,o)=>({kind:y.Text,data:r[o],allowOverlay:!0,displayData:r[o]}),[]),l.useCallback((r,o,m)=>{const[h]=r;if(o.kind!==y.Text)return;const f=[...m];return f[h]=o.data,f},[]),e);return x(V,{title:"Server Side Data",description:x(j,{children:"Glide data grid is fully ready to handle your server side data needs. This example condenses the implementation into a single custom hook and loads in pages of 50. We are using 300ms sleeps, but network transactions should work the same."}),children:x(W,{ref:e,...c,width:"100%",columns:a,rows:3e3,rowMarkers:"both"})})};g.parameters={options:{showPanel:!1}};var M,I,P;g.parameters={...g.parameters,docs:{...(M=g.parameters)==null?void 0:M.docs,source:{originalSource:`() => { +import{j as x}from"./marked.esm-dbrxtycE.js";import{g as S,R as l}from"./index-BMVQvedj.js";import{G as y,C as $}from"./image-window-loader-aCHQvgUN.js";import{S as B}from"./story-utils-K2EZnGjM.js";import{D as W}from"./data-editor-all-MRDpHEQ_.js";import{a as F,b as O,r as C}from"./throttle-7EuXLZa7.js";import{B as V}from"./utils-0sbaJdQp.js";import{a as j}from"./doc-wrapper-m1-LpzDL.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./_baseIteratee-WTHxv43n.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";import"./toConsumableArray-ppDpjNRJ.js";function K(e,t,a){var c=-1,r=e.length;t<0&&(t=-t>r?0:r+t),a=a>r?r:a,a<0&&(a+=r),r=t>a?0:a-t>>>0,t>>>=0;for(var o=Array(r);++cx(B,{children:x(e,{})})]};function te(e,t,a,c,r,o){e=Math.max(e,1);const m=l.useRef($.empty()),h=l.useRef([]),[f,G]=l.useState({x:0,y:0,width:0,height:0}),b=l.useRef(f);b.current=f;const T=l.useCallback(n=>{G(s=>n.x===s.x&&n.y===s.y&&n.width===s.width&&n.height===s.height?s:n)},[]),v=l.useCallback(n=>{const[s,d]=n,i=h.current[d];return i!==void 0?c(i,s):{kind:y.Loading,allowOverlay:!1}},[c]),k=l.useCallback(async n=>{var p;m.current=m.current.add(n);const s=n*e,d=await a([s,(n+1)*e]),i=b.current,u=[],w=h.current;for(const[R,E]of d.entries()){w[R+s]=E;for(let D=i.x;D<=i.x+i.width;D++)u.push({cell:[D,R+s]})}(p=o.current)==null||p.updateCells(u)},[a,o,e]),_=l.useCallback(n=>async()=>{const s=Math.max(0,Math.floor(n.y/e)),d=Math.floor((n.y+n.height)/e);for(const u of ee(C(s,d+1).filter(w=>!m.current.hasIndex(w)),t))await Promise.allSettled(u.map(k));const i=[];for(let u=n.y;u{const n=f,s=Math.max(0,Math.floor((n.y-e/2)/e)),d=Math.floor((n.y+n.height+e/2)/e);for(const i of C(s,d+1))m.current.hasIndex(i)||k(i)},[k,e,f]);const A=l.useCallback((n,s)=>{const[,d]=n,i=h.current[d];if(i===void 0)return;const u=r(n,s,i);u!==void 0&&(h.current[d]=u)},[r]);return{getCellContent:v,onVisibleRegionChanged:T,onCellEdited:A,getCellsForSelection:_}}const g=()=>{const e=l.useRef(null),t=l.useCallback(async r=>(await new Promise(o=>setTimeout(o,300)),C(r[0],r[1]).map(o=>[`1, ${o}`,`2, ${o}`])),[]),a=l.useMemo(()=>[{title:"A",width:150},{title:"B",width:200}],[]),c=te(50,5,t,l.useCallback((r,o)=>({kind:y.Text,data:r[o],allowOverlay:!0,displayData:r[o]}),[]),l.useCallback((r,o,m)=>{const[h]=r;if(o.kind!==y.Text)return;const f=[...m];return f[h]=o.data,f},[]),e);return x(V,{title:"Server Side Data",description:x(j,{children:"Glide data grid is fully ready to handle your server side data needs. This example condenses the implementation into a single custom hook and loads in pages of 50. We are using 300ms sleeps, but network transactions should work the same."}),children:x(W,{ref:e,...c,width:"100%",columns:a,rows:3e3,rowMarkers:"both"})})};g.parameters={options:{showPanel:!1}};var M,I,P;g.parameters={...g.parameters,docs:{...(M=g.parameters)==null?void 0:M.docs,source:{originalSource:`() => { const ref = React.useRef(null); const getRowData = React.useCallback(async (r: Item) => { await new Promise(res => setTimeout(res, 300)); diff --git a/docs/assets/shadow-dom.stories-vyFIqB76.js b/docs/assets/shadow-dom.stories-V3zAyFKt.js similarity index 82% rename from docs/assets/shadow-dom.stories-vyFIqB76.js rename to docs/assets/shadow-dom.stories-V3zAyFKt.js index a87a9cf31..61ef9c2c9 100644 --- a/docs/assets/shadow-dom.stories-vyFIqB76.js +++ b/docs/assets/shadow-dom.stories-V3zAyFKt.js @@ -1,4 +1,4 @@ -import{j as e,a as u,F as h}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as f}from"./data-editor-all-2MtuC67g.js";import{B as w,D,P as g,u as R,d as S}from"./utils-J-I08TtD.js";import{S as y}from"./story-utils-K2EZnGjM.js";import{R as C}from"./index-wocATsGp.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";const q={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>e(y,{children:e(w,{title:"Shadow DOM",description:u(D,{children:["Columns in the data grid may be grouped by setting their ",e(g,{children:"group"})," ","property."]}),children:e(t,{})})})]},n=()=>{const{cols:t,getCellContent:o}=R(20,!1,!1);return e(E,{render:()=>e(f,{...S,getCellContent:o,columns:t,rows:1e3,height:"100%",rowMarkers:"both"})})},M=t=>{const o=document.createElement("style");for(const r of document.styleSheets)try{if(r.cssRules!==void 0){const s=[...r.cssRules].map(i=>i.cssText).join(` +import{j as e,a as u,F as h}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as f}from"./data-editor-all-MRDpHEQ_.js";import{B as w,D,P as g,u as R,d as S}from"./utils-0sbaJdQp.js";import{S as y}from"./story-utils-K2EZnGjM.js";import{R as C}from"./index-wocATsGp.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";const q={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>e(y,{children:e(w,{title:"Shadow DOM",description:u(D,{children:["Columns in the data grid may be grouped by setting their ",e(g,{children:"group"})," ","property."]}),children:e(t,{})})})]},n=()=>{const{cols:t,getCellContent:o}=R(20,!1,!1);return e(E,{render:()=>e(f,{...S,getCellContent:o,columns:t,rows:1e3,height:"100%",rowMarkers:"both"})})},M=t=>{const o=document.createElement("style");for(const r of document.styleSheets)try{if(r.cssRules!==void 0){const s=[...r.cssRules].map(i=>i.cssText).join(` `);o.append(document.createTextNode(s))}}catch(s){console.warn("Cannot access stylesheet rules due to CORS policy",s)}t.append(o)},E=({className:t,render:o})=>{const r=l.useRef(null),s=l.useRef(!0);return l.useEffect(()=>{if(r.current===null||s.current){s.current=!1;return}const c=r.current.attachShadow({mode:"open"});window.glideShadowRoot=c,M(c);const a=document.createElement("div");return a.style.height="100%",c.append(a),C.render(e(h,{children:o()}),a),()=>{a.remove()}},[o]),e("div",{ref:r,className:t,style:{height:"100%"}})};var d,p,m;n.parameters={...n.parameters,docs:{...(d=n.parameters)==null?void 0:d.docs,source:{originalSource:`() => { const { cols, diff --git a/docs/assets/silly-numbers.stories-GnfGtfvN.js b/docs/assets/silly-numbers.stories-D0q20SS3.js similarity index 78% rename from docs/assets/silly-numbers.stories-GnfGtfvN.js rename to docs/assets/silly-numbers.stories-D0q20SS3.js index f6f116402..6f3091df5 100644 --- a/docs/assets/silly-numbers.stories-GnfGtfvN.js +++ b/docs/assets/silly-numbers.stories-D0q20SS3.js @@ -1,4 +1,4 @@ -import{j as r}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as a}from"./data-editor-all-2MtuC67g.js";import{B as n,D as m,u as p,d as c}from"./utils-J-I08TtD.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const G={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>r(u,{children:r(n,{title:"100 Million Rows",description:r(m,{children:"100 million rows is silly. Once we cross about 33 million pixels in height we can no longer trust the browser to scroll accurately."}),children:r(e,{})})})]},o=()=>{const{cols:e,getCellContent:l}=p(6);return r(a,{...c,getCellContent:l,columns:e,rowHeight:31,rows:1e8,rowMarkers:"number"})};var t,s,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`() => { +import{j as r}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as a}from"./data-editor-all-MRDpHEQ_.js";import{B as n,D as m,u as p,d as c}from"./utils-0sbaJdQp.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const G={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>r(u,{children:r(n,{title:"100 Million Rows",description:r(m,{children:"100 million rows is silly. Once we cross about 33 million pixels in height we can no longer trust the browser to scroll accurately."}),children:r(e,{})})})]},o=()=>{const{cols:e,getCellContent:l}=p(6);return r(a,{...c,getCellContent:l,columns:e,rowHeight:31,rows:1e8,rowMarkers:"number"})};var t,s,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/small-editable-grid.stories-2qea8rUB.js b/docs/assets/small-editable-grid.stories-ph4hBbrM.js similarity index 78% rename from docs/assets/small-editable-grid.stories-2qea8rUB.js rename to docs/assets/small-editable-grid.stories-ph4hBbrM.js index f2d04e767..9d1d2089f 100644 --- a/docs/assets/small-editable-grid.stories-2qea8rUB.js +++ b/docs/assets/small-editable-grid.stories-ph4hBbrM.js @@ -1,4 +1,4 @@ -import{j as e}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as n}from"./data-editor-all-2MtuC67g.js";import{B as d,D as m,u as p,d as c}from"./utils-J-I08TtD.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const v={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>e(u,{children:e(d,{title:"Editable Grid",description:e(m,{children:"Data grid supports overlay editors for changing values. There are bespoke editors for numbers, strings, images, booleans, markdown, and uri."}),children:e(t,{})})})]},r=()=>{const{cols:t,getCellContent:l,setCellValue:i}=p(6,!1);return e(n,{...c,getCellContent:l,columns:t,rows:20,onCellEdited:i})};var o,a,s;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`() => { +import{j as e}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as n}from"./data-editor-all-MRDpHEQ_.js";import{B as d,D as m,u as p,d as c}from"./utils-0sbaJdQp.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const v={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>e(u,{children:e(d,{title:"Editable Grid",description:e(m,{children:"Data grid supports overlay editors for changing values. There are bespoke editors for numbers, strings, images, booleans, markdown, and uri."}),children:e(t,{})})})]},r=()=>{const{cols:t,getCellContent:l,setCellValue:i}=p(6,!1);return e(n,{...c,getCellContent:l,columns:t,rows:20,onCellEdited:i})};var o,a,s;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/smooth-scrolling-grid.stories-ZWoFIk8K.js b/docs/assets/smooth-scrolling-grid.stories-Z9rTXot3.js similarity index 77% rename from docs/assets/smooth-scrolling-grid.stories-ZWoFIk8K.js rename to docs/assets/smooth-scrolling-grid.stories-Z9rTXot3.js index 2df1ea35e..097f54561 100644 --- a/docs/assets/smooth-scrolling-grid.stories-ZWoFIk8K.js +++ b/docs/assets/smooth-scrolling-grid.stories-Z9rTXot3.js @@ -1,4 +1,4 @@ -import{j as o,a as c}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as n}from"./data-editor-all-2MtuC67g.js";import{B as p,D as d,P as l,u as h,d as S}from"./utils-J-I08TtD.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const v={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>o(u,{children:o(p,{title:"Smooth scrolling",description:c(d,{children:["You can enable smooth scrolling with the ",o(l,{children:"smoothScrollX"})," and"," ",o(l,{children:"smoothScrollY"})," props. Disabling smooth scrolling can dramatically increase performance and improve visual stability during rapid scrolling."]}),children:o(t,{})})})]},r=t=>{const{cols:i,getCellContent:m}=h(30);return o(n,{...S,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY,getCellContent:m,columns:i,rows:1e4})};r.args={smoothScrollX:!1,smoothScrollY:!1};var s,e,a;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`p => { +import{j as o,a as c}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as n}from"./data-editor-all-MRDpHEQ_.js";import{B as p,D as d,P as l,u as h,d as S}from"./utils-0sbaJdQp.js";import{S as u}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const v={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>o(u,{children:o(p,{title:"Smooth scrolling",description:c(d,{children:["You can enable smooth scrolling with the ",o(l,{children:"smoothScrollX"})," and"," ",o(l,{children:"smoothScrollY"})," props. Disabling smooth scrolling can dramatically increase performance and improve visual stability during rapid scrolling."]}),children:o(t,{})})})]},r=t=>{const{cols:i,getCellContent:m}=h(30);return o(n,{...S,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY,getCellContent:m,columns:i,rows:1e4})};r.args={smoothScrollX:!1,smoothScrollY:!1};var s,e,a;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`p => { const { cols, getCellContent diff --git a/docs/assets/span-cell.stories-eP9-BiLg.js b/docs/assets/span-cell.stories-9oBMW2Vd.js similarity index 89% rename from docs/assets/span-cell.stories-eP9-BiLg.js rename to docs/assets/span-cell.stories-9oBMW2Vd.js index c27979309..a31d2eb2c 100644 --- a/docs/assets/span-cell.stories-eP9-BiLg.js +++ b/docs/assets/span-cell.stories-9oBMW2Vd.js @@ -1,4 +1,4 @@ -import{j as t,a as c}from"./marked.esm-dbrxtycE.js";import{R as d}from"./index-BMVQvedj.js";import{D as f}from"./data-editor-all-2MtuC67g.js";import{B as w,D as S,P as C,M as x,u as G,d as v}from"./utils-J-I08TtD.js";import{G as m}from"./image-window-loader-lKUISrIQ.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const W={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>t(D,{children:t(w,{title:"Spans",description:c(S,{children:["By setting the ",t(C,{children:"span"})," of a cell you can create spans in your grid. All cells within a span must return consistent data for defined behavior.",c(x,{children:["Spans will always be split if they span frozen and non-frozen columns. By default selections are always expanded to include a span. This can be disabled using the"," ",t(C,{children:"spanRangeBehavior"})," prop."]})]}),children:t(o,{})})})]},a=()=>{const{cols:o,getCellContent:i}=G(100,!0,!0),r=d.useCallback(e=>{const[n,l]=e;return l===6&&n>=3&&n<=4?{kind:m.Text,allowOverlay:!1,data:"Span Cell that is very long and will go past the cell limits",span:[3,4],displayData:"Span Cell that is very long and will go past the cell limits"}:l===5?{kind:m.Text,allowOverlay:!1,data:"Span Cell that is very long and will go past the cell limits",span:[0,99],displayData:"Span Cell that is very long and will go past the cell limits"}:i(e)},[i]),y=d.useCallback(e=>{const n=[];for(let l=e.y;l { +import{j as t,a as c}from"./marked.esm-dbrxtycE.js";import{R as d}from"./index-BMVQvedj.js";import{D as f}from"./data-editor-all-MRDpHEQ_.js";import{B as w,D as S,P as C,M as x,u as G,d as v}from"./utils-0sbaJdQp.js";import{G as m}from"./image-window-loader-aCHQvgUN.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const W={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>t(D,{children:t(w,{title:"Spans",description:c(S,{children:["By setting the ",t(C,{children:"span"})," of a cell you can create spans in your grid. All cells within a span must return consistent data for defined behavior.",c(x,{children:["Spans will always be split if they span frozen and non-frozen columns. By default selections are always expanded to include a span. This can be disabled using the"," ",t(C,{children:"spanRangeBehavior"})," prop."]})]}),children:t(o,{})})})]},a=()=>{const{cols:o,getCellContent:i}=G(100,!0,!0),r=d.useCallback(e=>{const[n,l]=e;return l===6&&n>=3&&n<=4?{kind:m.Text,allowOverlay:!1,data:"Span Cell that is very long and will go past the cell limits",span:[3,4],displayData:"Span Cell that is very long and will go past the cell limits"}:l===5?{kind:m.Text,allowOverlay:!1,data:"Span Cell that is very long and will go past the cell limits",span:[0,99],displayData:"Span Cell that is very long and will go past the cell limits"}:i(e)},[i]),y=d.useCallback(e=>{const n=[];for(let l=e.y;l { const { cols, getCellContent diff --git a/docs/assets/stretch-column-size.stories-hkXq64O3.js b/docs/assets/stretch-column-size.stories-3Fc7tBvF.js similarity index 84% rename from docs/assets/stretch-column-size.stories-hkXq64O3.js rename to docs/assets/stretch-column-size.stories-3Fc7tBvF.js index 59a91c5c8..1fdcd7501 100644 --- a/docs/assets/stretch-column-size.stories-hkXq64O3.js +++ b/docs/assets/stretch-column-size.stories-3Fc7tBvF.js @@ -1,4 +1,4 @@ -import{j as e,a as C}from"./marked.esm-dbrxtycE.js";import{R as a}from"./index-BMVQvedj.js";import{D as w}from"./data-editor-all-2MtuC67g.js";import{B as z,D as R,P as S,u as f,d as g}from"./utils-J-I08TtD.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const N={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(D,{children:e(z,{title:"Column Grow",description:C(R,{children:["Columns in the data grid may be set to grow to fill space by setting the"," ",e(S,{children:"grow"})," prop."]}),children:e(o,{})})})]},r=()=>{const{cols:o,getCellContent:l,onColumnResize:u}=f(5,!0,!0),s=a.useRef(new Set),p=a.useMemo(()=>o.map((t,n)=>({...t,grow:s.current.has(n)?void 0:(5+n)/5})),[o]);return e(w,{...g,getCellContent:l,columns:p,rows:1e3,onColumnResize:(t,n,d,h)=>{s.current.add(d),u(t,h)},rowMarkers:"both"})};var i,m,c;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`() => { +import{j as e,a as C}from"./marked.esm-dbrxtycE.js";import{R as a}from"./index-BMVQvedj.js";import{D as w}from"./data-editor-all-MRDpHEQ_.js";import{B as z,D as R,P as S,u as f,d as g}from"./utils-0sbaJdQp.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const N={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(D,{children:e(z,{title:"Column Grow",description:C(R,{children:["Columns in the data grid may be set to grow to fill space by setting the"," ",e(S,{children:"grow"})," prop."]}),children:e(o,{})})})]},r=()=>{const{cols:o,getCellContent:l,onColumnResize:u}=f(5,!0,!0),s=a.useRef(new Set),p=a.useMemo(()=>o.map((t,n)=>({...t,grow:s.current.has(n)?void 0:(5+n)/5})),[o]);return e(w,{...g,getCellContent:l,columns:p,rows:1e3,onColumnResize:(t,n,d,h)=>{s.current.add(d),u(t,h)},rowMarkers:"both"})};var i,m,c;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/ten-million-cells.stories-aaiU02Kg.js b/docs/assets/ten-million-cells.stories-dSX67I4a.js similarity index 76% rename from docs/assets/ten-million-cells.stories-aaiU02Kg.js rename to docs/assets/ten-million-cells.stories-dSX67I4a.js index c568aa98e..43aedf9f9 100644 --- a/docs/assets/ten-million-cells.stories-aaiU02Kg.js +++ b/docs/assets/ten-million-cells.stories-dSX67I4a.js @@ -1,4 +1,4 @@ -import{j as r}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as n}from"./data-editor-all-2MtuC67g.js";import{B as a,D as m,u as p,d as c}from"./utils-J-I08TtD.js";import{S as d}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const b={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>r(d,{children:r(a,{title:"Ten Million Cells",description:r(m,{children:"Data grid supports over 10 million cells. Go nuts with it."}),children:r(o,{})})})]},e=()=>{const{cols:o,getCellContent:l}=p(100);return r(n,{...c,rowMarkers:"number",getCellContent:l,columns:o,rows:1e5})};var t,s,i;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`() => { +import{j as r}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as n}from"./data-editor-all-MRDpHEQ_.js";import{B as a,D as m,u as p,d as c}from"./utils-0sbaJdQp.js";import{S as d}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const b={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>r(d,{children:r(a,{title:"Ten Million Cells",description:r(m,{children:"Data grid supports over 10 million cells. Go nuts with it."}),children:r(o,{})})})]},e=()=>{const{cols:o,getCellContent:l}=p(100);return r(n,{...c,rowMarkers:"number",getCellContent:l,columns:o,rows:1e5})};var t,s,i;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/theme-per-column.stories-qUNsVCr0.js b/docs/assets/theme-per-column.stories-jOaP6A03.js similarity index 90% rename from docs/assets/theme-per-column.stories-qUNsVCr0.js rename to docs/assets/theme-per-column.stories-jOaP6A03.js index 5a88a9b88..b9e8c80f5 100644 --- a/docs/assets/theme-per-column.stories-qUNsVCr0.js +++ b/docs/assets/theme-per-column.stories-jOaP6A03.js @@ -1,4 +1,4 @@ -import{j as n,F as m}from"./marked.esm-dbrxtycE.js";import{R as d}from"./index-BMVQvedj.js";import{D as F}from"./data-editor-all-2MtuC67g.js";import{B as p,D as A,a as g,d as u}from"./utils-J-I08TtD.js";import{S as h}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const z={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>n(h,{children:n(p,{title:"Theme per column",description:n(m,{children:n(A,{children:"Each column can provide theme overrides for rendering that column."})}),children:n(t,{})})})]},r=()=>{const{cols:t,getCellContent:l,onColumnResize:s,setCellValue:C}=g(),i=d.useMemo(()=>{const e=[...t];return e[3]={...e[3],themeOverride:{textDark:"#009CA6",bgIconHeader:"#009CA6",accentColor:"#009CA6",accentLight:"#009CA620",fgIconHeader:"#FFFFFF",baseFontStyle:"600 13px"}},e[4]={...e[4],themeOverride:{textDark:"#009CA6",bgIconHeader:"#009CA6",accentColor:"#009CA6",accentLight:"#009CA620",fgIconHeader:"#FFFFFF",baseFontStyle:"600 13px"}},e[9]={...e[9],themeOverride:{textDark:"#009CA6",bgIconHeader:"#009CA6",accentColor:"#009CA6",accentLight:"#009CA620",fgIconHeader:"#FFFFFF"}},e[10]={...e[10],themeOverride:{textDark:"#009CA6",bgIconHeader:"#009CA6",accentColor:"#009CA6",accentLight:"#009CA620",fgIconHeader:"#FFFFFF"}},e},[t]);return n(F,{...u,getCellContent:l,columns:i,onCellEdited:C,onColumnResize:s,rows:1e3})};var o,c,a;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`() => { +import{j as n,F as m}from"./marked.esm-dbrxtycE.js";import{R as d}from"./index-BMVQvedj.js";import{D as F}from"./data-editor-all-MRDpHEQ_.js";import{B as p,D as A,a as g,d as u}from"./utils-0sbaJdQp.js";import{S as h}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const z={title:"Glide-Data-Grid/DataEditor Demos",decorators:[t=>n(h,{children:n(p,{title:"Theme per column",description:n(m,{children:n(A,{children:"Each column can provide theme overrides for rendering that column."})}),children:n(t,{})})})]},r=()=>{const{cols:t,getCellContent:l,onColumnResize:s,setCellValue:C}=g(),i=d.useMemo(()=>{const e=[...t];return e[3]={...e[3],themeOverride:{textDark:"#009CA6",bgIconHeader:"#009CA6",accentColor:"#009CA6",accentLight:"#009CA620",fgIconHeader:"#FFFFFF",baseFontStyle:"600 13px"}},e[4]={...e[4],themeOverride:{textDark:"#009CA6",bgIconHeader:"#009CA6",accentColor:"#009CA6",accentLight:"#009CA620",fgIconHeader:"#FFFFFF",baseFontStyle:"600 13px"}},e[9]={...e[9],themeOverride:{textDark:"#009CA6",bgIconHeader:"#009CA6",accentColor:"#009CA6",accentLight:"#009CA620",fgIconHeader:"#FFFFFF"}},e[10]={...e[10],themeOverride:{textDark:"#009CA6",bgIconHeader:"#009CA6",accentColor:"#009CA6",accentLight:"#009CA620",fgIconHeader:"#FFFFFF"}},e},[t]);return n(F,{...u,getCellContent:l,columns:i,onCellEdited:C,onColumnResize:s,rows:1e3})};var o,c,a;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/theme-per-row.stories-I5xPHUWV.js b/docs/assets/theme-per-row.stories-LwBWKiYj.js similarity index 85% rename from docs/assets/theme-per-row.stories-I5xPHUWV.js rename to docs/assets/theme-per-row.stories-LwBWKiYj.js index 8663cd4c9..0c80439eb 100644 --- a/docs/assets/theme-per-row.stories-I5xPHUWV.js +++ b/docs/assets/theme-per-row.stories-LwBWKiYj.js @@ -1,4 +1,4 @@ -import{j as e,F as c,a as p}from"./marked.esm-dbrxtycE.js";import{R as u}from"./index-BMVQvedj.js";import{D as C}from"./data-editor-all-2MtuC67g.js";import{B as f,D as h,P as g,u as R,d as w}from"./utils-J-I08TtD.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const A={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(D,{children:e(f,{title:"Theme per row",description:e(c,{children:p(h,{children:["Each row can provide theme overrides for rendering that row using the"," ",e(g,{children:"getRowThemeOverride"})," callback."]})}),children:e(o,{})})})]},t=()=>{const{cols:o,getCellContent:i,onColumnResize:a,setCellValue:m}=R(5),d=u.useMemo(()=>{const r=[...o];return r[3]={...r[3],themeOverride:{bgCell:"#d6fafd"}},r},[o]);return e(C,{...w,getCellContent:i,columns:d,height:"100%",getRowThemeOverride:r=>r%2===0?void 0:{bgCell:"#e0f0ff88"},onCellEdited:m,onColumnResize:a,rows:10})};var n,s,l;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:`() => { +import{j as e,F as c,a as p}from"./marked.esm-dbrxtycE.js";import{R as u}from"./index-BMVQvedj.js";import{D as C}from"./data-editor-all-MRDpHEQ_.js";import{B as f,D as h,P as g,u as R,d as w}from"./utils-0sbaJdQp.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const A={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(D,{children:e(f,{title:"Theme per row",description:e(c,{children:p(h,{children:["Each row can provide theme overrides for rendering that row using the"," ",e(g,{children:"getRowThemeOverride"})," callback."]})}),children:e(o,{})})})]},t=()=>{const{cols:o,getCellContent:i,onColumnResize:a,setCellValue:m}=R(5),d=u.useMemo(()=>{const r=[...o];return r[3]={...r[3],themeOverride:{bgCell:"#d6fafd"}},r},[o]);return e(C,{...w,getCellContent:i,columns:d,height:"100%",getRowThemeOverride:r=>r%2===0?void 0:{bgCell:"#e0f0ff88"},onCellEdited:m,onColumnResize:a,rows:10})};var n,s,l;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/theme-support.stories-u5nvLSwt.js b/docs/assets/theme-support.stories-Wf73fqnU.js similarity index 93% rename from docs/assets/theme-support.stories-u5nvLSwt.js rename to docs/assets/theme-support.stories-Wf73fqnU.js index 7f784901b..0e66507be 100644 --- a/docs/assets/theme-support.stories-u5nvLSwt.js +++ b/docs/assets/theme-support.stories-Wf73fqnU.js @@ -1,4 +1,4 @@ -import{j as e,a as s,F as C}from"./marked.esm-dbrxtycE.js";import{R as i}from"./index-BMVQvedj.js";import{D as R}from"./data-editor-all-2MtuC67g.js";import{a as S,B as w,D as k,P as x,M as D,d as H}from"./utils-J-I08TtD.js";import{S as F}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const _={title:"Glide-Data-Grid/DataEditor Demos",decorators:[n=>e(F,{children:e(n,{})})]},y={accentColor:"#8c96ff",accentLight:"rgba(202, 206, 255, 0.253)",textDark:"#ffffff",textMedium:"#b8b8b8",textLight:"#a0a0a0",textBubble:"#ffffff",bgIconHeader:"#b8b8b8",fgIconHeader:"#000000",textHeader:"#a1a1a1",textHeaderSelected:"#000000",bgCell:"#16161b",bgCellMedium:"#202027",bgHeader:"#212121",bgHeaderHasFocus:"#474747",bgHeaderHovered:"#404040",bgBubble:"#212121",bgBubbleSelected:"#000000",bgSearchResult:"#423c24",borderColor:"rgba(225,225,225,0.2)",drilldownBorder:"rgba(225,225,225,0.4)",linkColor:"#4F5DFF",headerFontStyle:"bold 14px",baseFontStyle:"13px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif"},v={accentColor:"#8c96ff",accentLight:"rgba(202, 206, 255, 0.253)",textDark:"#ffffff",textMedium:"rgba(255, 255, 255, 0.9)",textLight:"rgba(255, 255, 255, 0.7)",textBubble:"#000000",bgIconHeader:"#880000",fgIconHeader:"#ff5555",textHeader:"rgba(0, 0, 0, 0.9)",textHeaderSelected:"#000000",bgCell:"#ff0000",bgCellMedium:"#ff4d4d",bgHeader:"#f3f300",bgHeaderHasFocus:"#eeee00",bgHeaderHovered:"#e0e000",bgBubble:"#ffff00",bgBubbleSelected:"#ffff00",bgSearchResult:"#423c24",borderColor:"#ffff00",drilldownBorder:"#ffff00",linkColor:"#4F5DFF",headerFontStyle:"bold 14px",baseFontStyle:"13px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",roundingRadius:6},o=()=>{const{cols:n,getCellContent:p,onColumnResize:m,setCellValue:r}=S(),[f,a]=i.useState({}),[l,b]=i.useState(1e3),h=i.useCallback(()=>{const g=l;b(t=>t+1);for(let t=0;t<6;t++)r([t,g],{displayData:"",data:""})},[l,r]);return e(w,{title:"Theme support",description:s(C,{children:[s(k,{children:["DataGrid respects the theme provided by the ",e(x,{children:"theme"})," prop."]}),s(D,{children:[e("button",{onClick:()=>a({}),children:"Light"})," or"," ",e("button",{onClick:()=>a(y),children:"Dark"})," even"," ",e("button",{onClick:()=>a(v),children:"Hotdog Stand"})]})]}),children:e(R,{...H,theme:f,getCellContent:p,columns:n,onRowAppended:h,trailingRowOptions:{tint:!0,sticky:!0},onCellEdited:r,onColumnResize:m,rows:l})})};var d,c,u;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`() => { +import{j as e,a as s,F as C}from"./marked.esm-dbrxtycE.js";import{R as i}from"./index-BMVQvedj.js";import{D as R}from"./data-editor-all-MRDpHEQ_.js";import{a as S,B as w,D as k,P as x,M as D,d as H}from"./utils-0sbaJdQp.js";import{S as F}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const _={title:"Glide-Data-Grid/DataEditor Demos",decorators:[n=>e(F,{children:e(n,{})})]},y={accentColor:"#8c96ff",accentLight:"rgba(202, 206, 255, 0.253)",textDark:"#ffffff",textMedium:"#b8b8b8",textLight:"#a0a0a0",textBubble:"#ffffff",bgIconHeader:"#b8b8b8",fgIconHeader:"#000000",textHeader:"#a1a1a1",textHeaderSelected:"#000000",bgCell:"#16161b",bgCellMedium:"#202027",bgHeader:"#212121",bgHeaderHasFocus:"#474747",bgHeaderHovered:"#404040",bgBubble:"#212121",bgBubbleSelected:"#000000",bgSearchResult:"#423c24",borderColor:"rgba(225,225,225,0.2)",drilldownBorder:"rgba(225,225,225,0.4)",linkColor:"#4F5DFF",headerFontStyle:"bold 14px",baseFontStyle:"13px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif"},v={accentColor:"#8c96ff",accentLight:"rgba(202, 206, 255, 0.253)",textDark:"#ffffff",textMedium:"rgba(255, 255, 255, 0.9)",textLight:"rgba(255, 255, 255, 0.7)",textBubble:"#000000",bgIconHeader:"#880000",fgIconHeader:"#ff5555",textHeader:"rgba(0, 0, 0, 0.9)",textHeaderSelected:"#000000",bgCell:"#ff0000",bgCellMedium:"#ff4d4d",bgHeader:"#f3f300",bgHeaderHasFocus:"#eeee00",bgHeaderHovered:"#e0e000",bgBubble:"#ffff00",bgBubbleSelected:"#ffff00",bgSearchResult:"#423c24",borderColor:"#ffff00",drilldownBorder:"#ffff00",linkColor:"#4F5DFF",headerFontStyle:"bold 14px",baseFontStyle:"13px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",roundingRadius:6},o=()=>{const{cols:n,getCellContent:p,onColumnResize:m,setCellValue:r}=S(),[f,a]=i.useState({}),[l,b]=i.useState(1e3),h=i.useCallback(()=>{const g=l;b(t=>t+1);for(let t=0;t<6;t++)r([t,g],{displayData:"",data:""})},[l,r]);return e(w,{title:"Theme support",description:s(C,{children:[s(k,{children:["DataGrid respects the theme provided by the ",e(x,{children:"theme"})," prop."]}),s(D,{children:[e("button",{onClick:()=>a({}),children:"Light"})," or"," ",e("button",{onClick:()=>a(y),children:"Dark"})," even"," ",e("button",{onClick:()=>a(v),children:"Hotdog Stand"})]})]}),children:e(R,{...H,theme:f,getCellContent:p,columns:n,onRowAppended:h,trailingRowOptions:{tint:!0,sticky:!0},onCellEdited:r,onColumnResize:m,rows:l})})};var d,c,u;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/tooltips.stories-IlfllE36.js b/docs/assets/tooltips.stories-FLMgvAmF.js similarity index 89% rename from docs/assets/tooltips.stories-IlfllE36.js rename to docs/assets/tooltips.stories-FLMgvAmF.js index 599f58b24..44d1cc13a 100644 --- a/docs/assets/tooltips.stories-IlfllE36.js +++ b/docs/assets/tooltips.stories-FLMgvAmF.js @@ -1,4 +1,4 @@ -import{j as t,a as m,F as b}from"./marked.esm-dbrxtycE.js";import{R as r}from"./index-BMVQvedj.js";import{u as w}from"./react-laag.esm-PpDllAFI.js";import{D as y}from"./data-editor-all-2MtuC67g.js";import{B as T,D as v,P as R,u as x,d as C}from"./utils-J-I08TtD.js";import{S as k}from"./story-utils-K2EZnGjM.js";import"./index-wocATsGp.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";const N={title:"Glide-Data-Grid/DataEditor Demos",decorators:[i=>t(k,{children:t(T,{title:"Tooltips",className:"double",description:m(v,{children:["Using the ",t(R,{children:"onItemHovered"})," event makes it easy to create tooltips. This story is intentionally forced to scroll vertically so layout in scrolling documents can be confirmed."]}),children:t(i,{})})})]},D={left:0,top:0,width:0,height:0,bottom:0,right:0},s=()=>{const{cols:i,getCellContent:f}=x(6),[o,a]=r.useState(),n=r.useRef(0),g=r.useCallback(e=>{e.kind==="cell"?(window.clearTimeout(n.current),a(void 0),n.current=window.setTimeout(()=>{a({val:`Tooltip for ${e.location[0]}, ${e.location[1]}`,bounds:{left:e.bounds.x,top:e.bounds.y,width:e.bounds.width,height:e.bounds.height,right:e.bounds.x+e.bounds.width,bottom:e.bounds.y+e.bounds.height}})},1e3)):(window.clearTimeout(n.current),n.current=0,a(void 0))},[]);r.useEffect(()=>()=>window.clearTimeout(n.current),[]);const d=o!==void 0,{renderLayer:h,layerProps:l}=w({isOpen:d,triggerOffset:4,auto:!0,container:"portal",trigger:{getBounds:()=>(o==null?void 0:o.bounds)??D}});return m(b,{children:[t(y,{...C,onItemHovered:g,getCellContent:f,columns:i,rowMarkers:"both",rows:1e3}),d&&h(t("div",{...l,style:{...l.style,padding:"8px 12px",color:"white",font:"500 13px Inter",backgroundColor:"rgba(0, 0, 0, 0.85)",borderRadius:9},children:o.val}))]})};var u,c,p;s.parameters={...s.parameters,docs:{...(u=s.parameters)==null?void 0:u.docs,source:{originalSource:`() => { +import{j as t,a as m,F as b}from"./marked.esm-dbrxtycE.js";import{R as r}from"./index-BMVQvedj.js";import{u as w}from"./react-laag.esm-PpDllAFI.js";import{D as y}from"./data-editor-all-MRDpHEQ_.js";import{B as T,D as v,P as R,u as x,d as C}from"./utils-0sbaJdQp.js";import{S as k}from"./story-utils-K2EZnGjM.js";import"./index-wocATsGp.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";const N={title:"Glide-Data-Grid/DataEditor Demos",decorators:[i=>t(k,{children:t(T,{title:"Tooltips",className:"double",description:m(v,{children:["Using the ",t(R,{children:"onItemHovered"})," event makes it easy to create tooltips. This story is intentionally forced to scroll vertically so layout in scrolling documents can be confirmed."]}),children:t(i,{})})})]},D={left:0,top:0,width:0,height:0,bottom:0,right:0},s=()=>{const{cols:i,getCellContent:f}=x(6),[o,a]=r.useState(),n=r.useRef(0),g=r.useCallback(e=>{e.kind==="cell"?(window.clearTimeout(n.current),a(void 0),n.current=window.setTimeout(()=>{a({val:`Tooltip for ${e.location[0]}, ${e.location[1]}`,bounds:{left:e.bounds.x,top:e.bounds.y,width:e.bounds.width,height:e.bounds.height,right:e.bounds.x+e.bounds.width,bottom:e.bounds.y+e.bounds.height}})},1e3)):(window.clearTimeout(n.current),n.current=0,a(void 0))},[]);r.useEffect(()=>()=>window.clearTimeout(n.current),[]);const d=o!==void 0,{renderLayer:h,layerProps:l}=w({isOpen:d,triggerOffset:4,auto:!0,container:"portal",trigger:{getBounds:()=>(o==null?void 0:o.bounds)??D}});return m(b,{children:[t(y,{...C,onItemHovered:g,getCellContent:f,columns:i,rowMarkers:"both",rows:1e3}),d&&h(t("div",{...l,style:{...l.style,padding:"8px 12px",color:"white",font:"500 13px Inter",backgroundColor:"rgba(0, 0, 0, 0.85)",borderRadius:9},children:o.val}))]})};var u,c,p;s.parameters={...s.parameters,docs:{...(u=s.parameters)==null?void 0:u.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/trailing-row-options.stories-_XbReORf.js b/docs/assets/trailing-row-options.stories-9o3V2KvJ.js similarity index 89% rename from docs/assets/trailing-row-options.stories-_XbReORf.js rename to docs/assets/trailing-row-options.stories-9o3V2KvJ.js index abc09414e..fecfde6f7 100644 --- a/docs/assets/trailing-row-options.stories-_XbReORf.js +++ b/docs/assets/trailing-row-options.stories-9o3V2KvJ.js @@ -1,4 +1,4 @@ -import{j as n,a as O}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as h}from"./data-editor-all-2MtuC67g.js";import{B as x,D as I,P as f,u as D,c as b,d as k}from"./utils-J-I08TtD.js";import{a}from"./image-window-loader-lKUISrIQ.js";import{S as T}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const K={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>n(T,{children:n(x,{title:"Trailing row options",description:O(I,{children:["You can customize the trailing row in each column by setting a"," ",n(f,{children:"trailingRowOptions"})," in your columns."]}),children:n(o,{})})})]},A={2:"Smol text",3:"Add",5:"New"},E={2:a.HeaderArray,3:a.HeaderEmoji,5:a.HeaderNumber},S={2:0,3:0,5:0},V={3:!0},y={2:{baseFontStyle:"10px"}},s=()=>{const{cols:o,getCellContent:i,setCellValueRaw:c,setCellValue:d}=D(60,!1),[r,w]=l.useState(50),R=l.useCallback(()=>{const t=r;for(let e=0;e<6;e++){const g=i([e,t]);c([e,t],b(g))}w(e=>e+1)},[i,r,c]),C=l.useMemo(()=>o.map((t,e)=>({...t,trailingRowOptions:{hint:A[e],addIcon:E[e],targetColumn:S[e],disabled:V[e],themeOverride:y[e]}})),[o]);return n(h,{...k,getCellContent:i,columns:C,rowMarkers:"both",onCellEdited:d,trailingRowOptions:{tint:!0,sticky:!0},rows:r,onRowAppended:R})};var m,u,p;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`() => { +import{j as n,a as O}from"./marked.esm-dbrxtycE.js";import{R as l}from"./index-BMVQvedj.js";import{D as h}from"./data-editor-all-MRDpHEQ_.js";import{B as x,D as I,P as f,u as D,c as b,d as k}from"./utils-0sbaJdQp.js";import{a}from"./image-window-loader-aCHQvgUN.js";import{S as T}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const K={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>n(T,{children:n(x,{title:"Trailing row options",description:O(I,{children:["You can customize the trailing row in each column by setting a"," ",n(f,{children:"trailingRowOptions"})," in your columns."]}),children:n(o,{})})})]},A={2:"Smol text",3:"Add",5:"New"},E={2:a.HeaderArray,3:a.HeaderEmoji,5:a.HeaderNumber},S={2:0,3:0,5:0},V={3:!0},y={2:{baseFontStyle:"10px"}},s=()=>{const{cols:o,getCellContent:i,setCellValueRaw:c,setCellValue:d}=D(60,!1),[r,w]=l.useState(50),R=l.useCallback(()=>{const t=r;for(let e=0;e<6;e++){const g=i([e,t]);c([e,t],b(g))}w(e=>e+1)},[i,r,c]),C=l.useMemo(()=>o.map((t,e)=>({...t,trailingRowOptions:{hint:A[e],addIcon:E[e],targetColumn:S[e],disabled:V[e],themeOverride:y[e]}})),[o]);return n(h,{...k,getCellContent:i,columns:C,rowMarkers:"both",onCellEdited:d,trailingRowOptions:{tint:!0,sticky:!0},rows:r,onRowAppended:R})};var m,u,p;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/uneven-rows.stories-kSeFYGod.js b/docs/assets/uneven-rows.stories-5ASaufVP.js similarity index 73% rename from docs/assets/uneven-rows.stories-kSeFYGod.js rename to docs/assets/uneven-rows.stories-5ASaufVP.js index 77ca7bd8e..68d232e8f 100644 --- a/docs/assets/uneven-rows.stories-kSeFYGod.js +++ b/docs/assets/uneven-rows.stories-5ASaufVP.js @@ -1,4 +1,4 @@ -import{j as e,a as p}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as m}from"./data-editor-all-2MtuC67g.js";import{B as l,D as c,P as d,u,d as w}from"./utils-J-I08TtD.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./image-window-loader-lKUISrIQ.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const U={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(D,{children:e(l,{title:"Uneven Rows",description:p(c,{children:["Rows can be made uneven by passing a callback to the ",e(d,{children:"rowHeight"})," prop"]}),children:e(o,{})})})]},r=()=>{const{cols:o,getCellContent:i}=u(6);return e(m,{...w,rowHeight:t=>t%3===0?30:t%2?50:60,getCellContent:i,columns:o,rows:1e3})};var s,a,n;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`() => { +import{j as e,a as p}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as m}from"./data-editor-all-MRDpHEQ_.js";import{B as l,D as c,P as d,u,d as w}from"./utils-0sbaJdQp.js";import{S as D}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./image-window-loader-aCHQvgUN.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const U={title:"Glide-Data-Grid/DataEditor Demos",decorators:[o=>e(D,{children:e(l,{title:"Uneven Rows",description:p(c,{children:["Rows can be made uneven by passing a callback to the ",e(d,{children:"rowHeight"})," prop"]}),children:e(o,{})})})]},r=()=>{const{cols:o,getCellContent:i}=u(6);return e(m,{...w,rowHeight:t=>t%3===0?30:t%2?50:60,getCellContent:i,columns:o,rows:1e3})};var s,a,n;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`() => { const { cols, getCellContent diff --git a/docs/assets/use-data-source.stories-_zu2oKfn.js b/docs/assets/use-data-source.stories-moFMuBc7.js similarity index 99% rename from docs/assets/use-data-source.stories-_zu2oKfn.js rename to docs/assets/use-data-source.stories-moFMuBc7.js index 5a516c203..22fa82c14 100644 --- a/docs/assets/use-data-source.stories-_zu2oKfn.js +++ b/docs/assets/use-data-source.stories-moFMuBc7.js @@ -1,4 +1,4 @@ -var ce=Object.defineProperty;var ue=(n,e,t)=>e in n?ce(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var z=(n,e,t)=>(ue(n,typeof e!="symbol"?e+"":e,t),t);import{j as w,s as T,a as $}from"./marked.esm-dbrxtycE.js";import{R,g as de,r as l}from"./index-BMVQvedj.js";import{u as pe}from"./index.esm-Ejw8GwRl.js";import{y as x}from"./index-PWBWJyi_.js";import{m as fe,k as me,x as ge,y as Ce,z as ye,A as he,e as oe,a as be,w as G}from"./_baseIteratee-WTHxv43n.js";import{G as g,e as ke,f as N,h as M,D as se}from"./data-editor-all-T-OiWfdB.js";import{e as Se,r as I}from"./throttle-7EuXLZa7.js";import"./index-wocATsGp.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";function ve(n){const[e,t]=R.useState([]),[o,s]=R.useState(void 0),{columns:r,onGroupHeaderClicked:a,onGridSelectionChange:f,getGroupDetails:d,gridSelection:i,freezeColumns:p=0,theme:b}=n,k=i??o,c=R.useMemo(()=>{const u=[];let C=[-1,-1],S;for(let F=p;Fc.length===0?r:r.map((u,C)=>{for(const[S,F]of c)if(C>=S&&C{var F;a==null||a(u,C);const S=((F=y[u])==null?void 0:F.group)??"";S!==""&&(C.preventDefault(),t(A=>A.includes(S)?A.filter(D=>D!==S):[...A,S]))},[y,a]),v=R.useCallback(u=>{if(u.current!==void 0){const C=u.current.cell[0],S=y[C];t(F=>F.includes((S==null?void 0:S.group)??"")?F.filter(A=>A!==S.group):F)}f!==void 0?f(u):s(u)},[y,f]),h=R.useCallback(u=>({...d==null?void 0:d(u),name:u,overrideTheme:e.includes(u??"")?{bgHeader:b.bgHeaderHasFocus}:void 0}),[e,d,b.bgHeaderHasFocus]);return{columns:y,onGroupHeaderClicked:m,onGridSelectionChange:v,getGroupDetails:h,gridSelection:k}}var we=Se,Fe=fe;function xe(n,e){var t=-1,o=Fe(n)?Array(n.length):[];return we(n,function(s,r,a){o[++t]=e(s,r,a)}),o}var Ae=xe;function Re(n,e){var t=n.length;for(n.sort(e);t--;)n[t]=n[t].value;return n}var Me=Re,L=me;function He(n,e){if(n!==e){var t=n!==void 0,o=n===null,s=n===n,r=L(n),a=e!==void 0,f=e===null,d=e===e,i=L(e);if(!f&&!i&&!r&&n>e||r&&a&&d&&!f&&!i||o&&a&&d||!t&&d||!s)return 1;if(!o&&!r&&!i&&n=f)return d;var i=t[o];return d*(i=="desc"?-1:1)}}return n.index-e.index}var Be=Ee,_=ge,Ge=ye,Te=be,Ie=Ae,_e=Me,$e=he,Oe=Be,ze=Ce,Ne=oe;function Le(n,e,t){e.length?e=_(e,function(r){return Ne(r)?function(a){return Ge(a,r.length===1?r[0]:r)}:r}):e=[ze];var o=-1;e=_(e,$e(Te));var s=Ie(n,function(r,a,f){var d=_(e,function(i){return i(r)});return{criteria:d,index:++o,value:r}});return _e(s,function(r,a){return Oe(r,a,t)})}var Ke=Le,Pe=Ke,K=oe;function Ve(n,e,t,o){return n==null?[]:(K(e)||(e=e==null?[]:[e]),t=o?void 0:t,K(t)||(t=t==null?[]:[t]),Pe(n,e,t))}var We=Ve;const P=de(We);function B(n){return n.id??`${n.group??""}/${n.title}`}function V(n,e){return typeof e=="string"?B(n)===e:B(n)===B(e)}function W(n,e,t){const o=e.indexOf(n);if(o===-1)return Number.MAX_SAFE_INTEGER;const s=t.findIndex(r=>V(n,r));if(s!==-1)return s;for(let r=o;r>=0;r--){const a=t.findIndex(f=>V(e[r],f));if(a!==-1)return a+.5}return-1}function je(n){const{columns:e,getCellContent:t,onColumnMoved:o}=n,[s,r]=l.useState(()=>e.map(B)),a=l.useMemo(()=>P(e,p=>W(p,e,s)),[s,e]),f=l.useRef(o);f.current=o;const d=l.useCallback((p,b)=>{var k;r(c=>{const y=[...c],[m]=y.splice(p,1);return y.splice(b,0,m),y}),(k=f.current)==null||k.call(f,p,b)},[]);l.useEffect(()=>{r(p=>P(e,b=>W(b,e,p)).map(B))},[e]);const i=l.useCallback(p=>{const[b,k]=p,c=a[b],y=e.indexOf(c);return t([y,k])},[a,e,t]);return{columns:a,onColumnMoved:d,getCellContent:i}}function Ze(n){var e,t;switch(n.kind){case g.Number:return((e=n.data)==null?void 0:e.toString())??"";case g.Boolean:return((t=n.data)==null?void 0:t.toString())??"";case g.Markdown:case g.RowID:case g.Text:case g.Uri:return n.data??"";case g.Bubble:case g.Image:return n.data.join("");case g.Drilldown:return n.data.map(o=>o.text).join("");case g.Protected:case g.Loading:return"";case g.Custom:return n.copyData}}function j(n){if(typeof n=="number")return n;if(n.length>0){const e=Number(n);isNaN(e)||(n=e)}return n}function Ye(n,e){return n=j(n),e=j(e),typeof n=="string"&&typeof e=="string"?n.localeCompare(e):typeof n=="number"&&typeof e=="number"?n===e?0:n>e?1:-1:n==e?0:n>e?1:-1}function Xe(n,e){return n>e?1:n===e?0:-1}function qe(n){const{sort:e,rows:t,getCellContent:o}=n;let s=e===void 0?void 0:n.columns.findIndex(i=>e.column===i||i.id!==void 0&&e.column.id===i.id);s===-1&&(s=void 0);const r=(e==null?void 0:e.direction)??"asc",a=l.useMemo(()=>{if(s===void 0)return;const i=new Array(t),p=[s,0];for(let k=0;kXe(i[k],i[c])):(e==null?void 0:e.mode)==="smart"?b=I(t).sort((k,c)=>Ye(i[k],i[c])):b=I(t).sort((k,c)=>i[k].localeCompare(i[c])),r==="desc"&&b.reverse(),b},[o,t,e==null?void 0:e.mode,r,s]),f=l.useCallback(i=>a===void 0?i:a[i],[a]),d=l.useCallback(([i,p])=>a===void 0?o([i,p]):(p=a[p],o([i,p])),[o,a]);return a===void 0?{getCellContent:n.getCellContent,getOriginalIndex:f}:{getOriginalIndex:f,getCellContent:d}}const Je={undoHistory:[],redoHistory:[],canUndo:!1,canRedo:!1,isApplyingUndo:!1,isApplyingRedo:!1};function Qe(n,e){const t={...n};switch(e.type){case"undo":if(n.canUndo){t.undoHistory=[...n.undoHistory];const o=t.undoHistory.pop();return t.operation=o,t.canUndo=t.undoHistory.length>0,t.isApplyingUndo=!0,t}return n;case"redo":if(n.canRedo){t.redoHistory=[...n.redoHistory];const o=t.redoHistory.pop();return t.operation=o,t.canRedo=t.redoHistory.length>0,t.isApplyingRedo=!0,t}return n;case"operationApplied":return t.operation=void 0,t.isApplyingRedo=!1,t.isApplyingUndo=!1,t;case"edit":return!n.isApplyingRedo&&!n.isApplyingUndo&&(t.undoHistory=[...n.undoHistory,e.batch],t.redoHistory=[],t.canUndo=!0,t.canRedo=!1),n.isApplyingUndo&&(t.redoHistory=[...n.redoHistory,e.batch],t.canRedo=!0),n.isApplyingRedo&&(t.undoHistory=[...n.undoHistory,e.batch],t.canUndo=!0),t;default:throw new Error("Invalid action")}}function en(n,e,t,o){const[s,r]=l.useReducer(Qe,Je),a=l.useRef(null),f=l.useRef(null),d=l.useRef(!1),i=l.useRef(!1);l.useEffect(()=>{d.current=s.isApplyingUndo,i.current=s.isApplyingRedo},[s.isApplyingUndo,s.isApplyingRedo]);const[p,b]=l.useState(null),k=l.useRef(null),c=l.useCallback(h=>{o&&o(h),b(h),k.current=h},[o]),y=l.useCallback((h,u)=>{if(!(d.current||i.current)&&k.current){clearTimeout(f.current);const S=e(h);a.current===null&&(a.current={edits:[],selection:k.current}),a.current.edits.push({cell:h,newValue:S}),f.current=setTimeout(()=>{a.current&&(r({type:"edit",batch:a.current}),a.current=null)},0)}t(h,u)},[t,e]),m=l.useCallback(()=>{r({type:"undo"})},[r]),v=l.useCallback(()=>{r({type:"redo"})},[r]);return l.useEffect(()=>{if(s.operation&&k.current&&n.current){const h=[],u={edits:[],selection:k.current};for(const C of s.operation.edits){const S=e(C.cell);u.edits.push({cell:C.cell,newValue:S}),t(C.cell,C.newValue),h.push({cell:C.cell})}b(s.operation.selection),k.current=s.operation.selection,n.current.updateCells(h),r({type:"edit",batch:u}),r({type:"operationApplied"})}},[s.operation,n,t,b,e]),l.useEffect(()=>{const h=u=>{u.key==="z"&&(u.metaKey||u.ctrlKey)&&(u.shiftKey?v():m()),u.key==="y"&&(u.metaKey||u.ctrlKey)&&v()};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[m,v]),l.useMemo(()=>({undo:m,redo:v,canUndo:s.canUndo,canRedo:s.canRedo,onCellEdited:y,onGridSelectionChange:c,gridSelection:p}),[m,v,y,s.canUndo,s.canRedo,c,p])}x.seed(1337);function nn(n){return!!n}function tn(n,e){var o;const t=n.data;if(typeof t==typeof e.data)return{...e,data:t};switch(e.kind){case g.Uri:return G(t)?{...e,data:t[0]}:{...e,data:(t==null?void 0:t.toString())??""};case g.Boolean:return G(t)?{...e,data:t[0]!==void 0}:n.kind===g.Boolean?{...e,data:n.data}:{...e,data:!!nn(t)};case g.Image:return G(t)?{...e,data:[t[0]]}:{...e,data:[(t==null?void 0:t.toString())??""]};case g.Number:return{...e,data:0};case g.Text:case g.Markdown:return G(t)?{...e,data:t[0].toString()??""}:{...e,data:((o=n.data)==null?void 0:o.toString())??""};case g.Custom:return e}cn()}function rn(n){const{getContent:e,...t}=n;return t}function Z(n,e){const t=[{title:"First name",id:"First name",group:e?"Name":void 0,icon:M.HeaderString,hasMenu:!1,getContent:()=>{const r=x.name.firstName();return{kind:g.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Last name",id:"Last name",group:e?"Name":void 0,icon:M.HeaderString,hasMenu:!1,getContent:()=>{const r=x.name.lastName();return{kind:g.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Avatar",id:"Avatar",group:e?"Info":void 0,icon:M.HeaderImage,hasMenu:!1,getContent:()=>{const r=Math.round(Math.random()*100);return{kind:g.Image,data:[`https://picsum.photos/id/${r}/900/900`],displayData:[`https://picsum.photos/id/${r}/40/40`],allowOverlay:!0,readonly:!0}}},{title:"Email",id:"Email",group:e?"Info":void 0,icon:M.HeaderString,hasMenu:!1,getContent:()=>{const r=x.internet.email();return{kind:g.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Title",id:"Title",group:e?"Info":void 0,icon:M.HeaderString,hasMenu:!1,getContent:()=>{const r=x.name.jobTitle();return{kind:g.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"More Info",id:"More Info",group:e?"Info":void 0,icon:M.HeaderUri,hasMenu:!1,getContent:()=>{const r=x.internet.url();return{kind:g.Uri,displayData:r,data:r,allowOverlay:!0,readonly:!0}}}];if(non(a+t.length,e));return[...t,...s]}function on(n,e){return{title:`Column ${n}`,id:`Column ${n}`,group:e?`Group ${Math.round(n/3)}`:void 0,icon:M.HeaderString,hasMenu:!1,getContent:()=>{const t=x.lorem.word();return{kind:g.Text,data:t,displayData:t,allowOverlay:!0,readonly:!0}}}}class sn{constructor(){z(this,"cachedContent",new Map)}get(e,t){const o=this.cachedContent.get(e);if(o!==void 0)return o[t]}set(e,t,o){let s=this.cachedContent.get(e);s===void 0&&this.cachedContent.set(e,s=[]),s[t]=o}}function an(n,e=!0,t=!1){const o=l.useRef(new sn),[s,r]=l.useState(()=>Z(n,t));l.useEffect(()=>{r(Z(n,t))},[t,n]);const a=l.useCallback((c,y)=>{r(m=>{const v=m.findIndex(u=>u.title===c.title),h=[...m];return h.splice(v,1,{...m[v],width:y}),h})},[]),f=l.useMemo(()=>s.map(rn),[s]),d=l.useRef(s);d.current=s;const i=l.useCallback(([c,y])=>{let m=o.current.get(c,y);return m===void 0&&(m=d.current[c].getContent(),!e&&ke(m)&&(m={...m,readonly:e}),o.current.set(c,y,m)),m},[e]),p=l.useCallback(c=>{const y=[];for(let m=c.y;m{o.current.set(c,y,m)},[]),k=l.useCallback(([c,y],m)=>{let v=o.current.get(c,y);if(v===void 0&&(v=s[c].getContent()),N(m)&&N(v)){const h=tn(m,v);o.current.set(c,y,{...h,displayData:typeof h.data=="string"?h.data:h.displayData,lastUpdated:performance.now()})}},[s]);return{cols:f,getCellContent:i,onColumnResize:a,setCellValue:k,getCellsForSelection:p,setCellValueRaw:b}}function ln(n="This should not happen"){throw new Error(n)}function cn(n){return ln("Hell froze over")}x.seed(1337);const un=T("div")({name:"SimpleWrapper",class:"ss4kmn3",propsAsIs:!1}),dn=n=>w(un,{children:w("div",{className:"content",children:n.children})}),Rn={title:"Extra Packages/Source",decorators:[n=>w(dn,{children:w(n,{})})]},pn=T("div")({name:"BeautifulStyle",class:"bkh67gx",propsAsIs:!1}),ae=n=>{const{title:e,children:t,description:o}=n,{ref:s,width:r,height:a}=pe();return $(pn,{children:[w("h1",{children:e}),o,w("div",{className:"sizer",children:w("div",{className:"sizer-clip",ref:s,children:w("div",{style:{position:"relative",width:r??100,height:a??100},children:t})})})]})},ie=T("p")({name:"Description",class:"d1deot3s",propsAsIs:!1}),H=T("p")({name:"MoreInfo",class:"m1ml0sw1",propsAsIs:!1}),le={smoothScrollX:!0,smoothScrollY:!0,isDraggable:!1,rowMarkers:"none",width:"100%"},fn={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",headerIconSize:20,markerFontStyle:"13px",bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",horizontalBorderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#4F5DFF",cellHorizontalPadding:8,cellVerticalPadding:3,headerFontStyle:"600 13px",baseFontStyle:"13px",editorFontSize:"13px",lineHeight:1.4,fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif"},mn=[{title:"A",width:200,group:"Group 1"},{title:"B",width:200,group:"Group 1"},{title:"C",width:200,group:"Group 2"},{title:"D",width:200,group:"Group 2"},{title:"E",width:200,group:"Group 2"}],U=()=>{const n=l.useRef({}),e=1e5,t=je({columns:mn,getCellContent:l.useCallback(([d,i])=>{if(d===0)return{kind:g.Text,allowOverlay:!0,data:`${i}`,displayData:`${i}`};const p=`${d},${i}`;n.current[p]===void 0&&(n.current[p]=x.name.firstName()+" "+x.name.lastName());const b=n.current[p];return{kind:g.Text,allowOverlay:!0,data:b,displayData:b}},[])}),[o,s]=l.useState(),r=qe({columns:t.columns,getCellContent:t.getCellContent,rows:e,sort:o===void 0?void 0:{column:t.columns[o],direction:"desc",mode:"smart"}}),a=ve({columns:t.columns,theme:fn,freezeColumns:0}),f=l.useCallback(d=>{s(d)},[]);return w(ae,{title:"Custom source extensions",description:w(ie,{children:"Fixme."}),children:w(se,{...le,...t,...r,...a,rows:e,onColumnMoved:t.onColumnMoved,onHeaderClicked:f})})};U.parameters={options:{showPanel:!1}};const E=()=>{const{cols:n,getCellContent:e,setCellValue:t}=an(6),o=l.useRef(null),{gridSelection:s,onCellEdited:r,onGridSelectionChange:a,undo:f,canRedo:d,canUndo:i,redo:p}=en(o,e,t);return w(ae,{title:"Undo / Redo Support",description:$(ie,{children:["A simple undo/redo implementation",$(H,{children:["Use keyboard shortcuts CMD+Z and CMD+SHIFT+Z / CTRL+Z and CTRL+Y. Or click these buttons:",w("button",{onClick:f,disabled:!i,style:{opacity:i?1:.4},children:"Undo"}),w("button",{onClick:p,disabled:!d,style:{opacity:d?1:.4},children:"Redo"})]}),w(H,{children:"It works by taking a snapshot of the content of a cell before it is edited and replaying any edits back."})]}),children:w(se,{...le,ref:o,onCellEdited:r,getCellContent:e,gridSelection:s??void 0,onGridSelectionChange:a,columns:n,rows:1e3})})};E.parameters={options:{showPanel:!1}};var Y,X,q;H.parameters={...H.parameters,docs:{...(Y=H.parameters)==null?void 0:Y.docs,source:{originalSource:`styled.p\` +var ce=Object.defineProperty;var ue=(n,e,t)=>e in n?ce(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var z=(n,e,t)=>(ue(n,typeof e!="symbol"?e+"":e,t),t);import{j as w,s as T,a as $}from"./marked.esm-dbrxtycE.js";import{R,g as de,r as l}from"./index-BMVQvedj.js";import{u as pe}from"./index.esm-Ejw8GwRl.js";import{y as x}from"./index-PWBWJyi_.js";import{m as fe,k as me,x as ge,y as Ce,z as ye,A as he,e as oe,a as be,w as G}from"./_baseIteratee-WTHxv43n.js";import{G as g,e as ke,f as N,h as M,D as se}from"./data-editor-all-Jk8In-1B.js";import{e as Se,r as I}from"./throttle-7EuXLZa7.js";import"./index-wocATsGp.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";function ve(n){const[e,t]=R.useState([]),[o,s]=R.useState(void 0),{columns:r,onGroupHeaderClicked:a,onGridSelectionChange:f,getGroupDetails:d,gridSelection:i,freezeColumns:p=0,theme:b}=n,k=i??o,c=R.useMemo(()=>{const u=[];let C=[-1,-1],S;for(let F=p;Fc.length===0?r:r.map((u,C)=>{for(const[S,F]of c)if(C>=S&&C{var F;a==null||a(u,C);const S=((F=y[u])==null?void 0:F.group)??"";S!==""&&(C.preventDefault(),t(A=>A.includes(S)?A.filter(D=>D!==S):[...A,S]))},[y,a]),v=R.useCallback(u=>{if(u.current!==void 0){const C=u.current.cell[0],S=y[C];t(F=>F.includes((S==null?void 0:S.group)??"")?F.filter(A=>A!==S.group):F)}f!==void 0?f(u):s(u)},[y,f]),h=R.useCallback(u=>({...d==null?void 0:d(u),name:u,overrideTheme:e.includes(u??"")?{bgHeader:b.bgHeaderHasFocus}:void 0}),[e,d,b.bgHeaderHasFocus]);return{columns:y,onGroupHeaderClicked:m,onGridSelectionChange:v,getGroupDetails:h,gridSelection:k}}var we=Se,Fe=fe;function xe(n,e){var t=-1,o=Fe(n)?Array(n.length):[];return we(n,function(s,r,a){o[++t]=e(s,r,a)}),o}var Ae=xe;function Re(n,e){var t=n.length;for(n.sort(e);t--;)n[t]=n[t].value;return n}var Me=Re,L=me;function He(n,e){if(n!==e){var t=n!==void 0,o=n===null,s=n===n,r=L(n),a=e!==void 0,f=e===null,d=e===e,i=L(e);if(!f&&!i&&!r&&n>e||r&&a&&d&&!f&&!i||o&&a&&d||!t&&d||!s)return 1;if(!o&&!r&&!i&&n=f)return d;var i=t[o];return d*(i=="desc"?-1:1)}}return n.index-e.index}var Be=Ee,_=ge,Ge=ye,Te=be,Ie=Ae,_e=Me,$e=he,Oe=Be,ze=Ce,Ne=oe;function Le(n,e,t){e.length?e=_(e,function(r){return Ne(r)?function(a){return Ge(a,r.length===1?r[0]:r)}:r}):e=[ze];var o=-1;e=_(e,$e(Te));var s=Ie(n,function(r,a,f){var d=_(e,function(i){return i(r)});return{criteria:d,index:++o,value:r}});return _e(s,function(r,a){return Oe(r,a,t)})}var Ke=Le,Pe=Ke,K=oe;function Ve(n,e,t,o){return n==null?[]:(K(e)||(e=e==null?[]:[e]),t=o?void 0:t,K(t)||(t=t==null?[]:[t]),Pe(n,e,t))}var We=Ve;const P=de(We);function B(n){return n.id??`${n.group??""}/${n.title}`}function V(n,e){return typeof e=="string"?B(n)===e:B(n)===B(e)}function W(n,e,t){const o=e.indexOf(n);if(o===-1)return Number.MAX_SAFE_INTEGER;const s=t.findIndex(r=>V(n,r));if(s!==-1)return s;for(let r=o;r>=0;r--){const a=t.findIndex(f=>V(e[r],f));if(a!==-1)return a+.5}return-1}function je(n){const{columns:e,getCellContent:t,onColumnMoved:o}=n,[s,r]=l.useState(()=>e.map(B)),a=l.useMemo(()=>P(e,p=>W(p,e,s)),[s,e]),f=l.useRef(o);f.current=o;const d=l.useCallback((p,b)=>{var k;r(c=>{const y=[...c],[m]=y.splice(p,1);return y.splice(b,0,m),y}),(k=f.current)==null||k.call(f,p,b)},[]);l.useEffect(()=>{r(p=>P(e,b=>W(b,e,p)).map(B))},[e]);const i=l.useCallback(p=>{const[b,k]=p,c=a[b],y=e.indexOf(c);return t([y,k])},[a,e,t]);return{columns:a,onColumnMoved:d,getCellContent:i}}function Ze(n){var e,t;switch(n.kind){case g.Number:return((e=n.data)==null?void 0:e.toString())??"";case g.Boolean:return((t=n.data)==null?void 0:t.toString())??"";case g.Markdown:case g.RowID:case g.Text:case g.Uri:return n.data??"";case g.Bubble:case g.Image:return n.data.join("");case g.Drilldown:return n.data.map(o=>o.text).join("");case g.Protected:case g.Loading:return"";case g.Custom:return n.copyData}}function j(n){if(typeof n=="number")return n;if(n.length>0){const e=Number(n);isNaN(e)||(n=e)}return n}function Ye(n,e){return n=j(n),e=j(e),typeof n=="string"&&typeof e=="string"?n.localeCompare(e):typeof n=="number"&&typeof e=="number"?n===e?0:n>e?1:-1:n==e?0:n>e?1:-1}function Xe(n,e){return n>e?1:n===e?0:-1}function qe(n){const{sort:e,rows:t,getCellContent:o}=n;let s=e===void 0?void 0:n.columns.findIndex(i=>e.column===i||i.id!==void 0&&e.column.id===i.id);s===-1&&(s=void 0);const r=(e==null?void 0:e.direction)??"asc",a=l.useMemo(()=>{if(s===void 0)return;const i=new Array(t),p=[s,0];for(let k=0;kXe(i[k],i[c])):(e==null?void 0:e.mode)==="smart"?b=I(t).sort((k,c)=>Ye(i[k],i[c])):b=I(t).sort((k,c)=>i[k].localeCompare(i[c])),r==="desc"&&b.reverse(),b},[o,t,e==null?void 0:e.mode,r,s]),f=l.useCallback(i=>a===void 0?i:a[i],[a]),d=l.useCallback(([i,p])=>a===void 0?o([i,p]):(p=a[p],o([i,p])),[o,a]);return a===void 0?{getCellContent:n.getCellContent,getOriginalIndex:f}:{getOriginalIndex:f,getCellContent:d}}const Je={undoHistory:[],redoHistory:[],canUndo:!1,canRedo:!1,isApplyingUndo:!1,isApplyingRedo:!1};function Qe(n,e){const t={...n};switch(e.type){case"undo":if(n.canUndo){t.undoHistory=[...n.undoHistory];const o=t.undoHistory.pop();return t.operation=o,t.canUndo=t.undoHistory.length>0,t.isApplyingUndo=!0,t}return n;case"redo":if(n.canRedo){t.redoHistory=[...n.redoHistory];const o=t.redoHistory.pop();return t.operation=o,t.canRedo=t.redoHistory.length>0,t.isApplyingRedo=!0,t}return n;case"operationApplied":return t.operation=void 0,t.isApplyingRedo=!1,t.isApplyingUndo=!1,t;case"edit":return!n.isApplyingRedo&&!n.isApplyingUndo&&(t.undoHistory=[...n.undoHistory,e.batch],t.redoHistory=[],t.canUndo=!0,t.canRedo=!1),n.isApplyingUndo&&(t.redoHistory=[...n.redoHistory,e.batch],t.canRedo=!0),n.isApplyingRedo&&(t.undoHistory=[...n.undoHistory,e.batch],t.canUndo=!0),t;default:throw new Error("Invalid action")}}function en(n,e,t,o){const[s,r]=l.useReducer(Qe,Je),a=l.useRef(null),f=l.useRef(null),d=l.useRef(!1),i=l.useRef(!1);l.useEffect(()=>{d.current=s.isApplyingUndo,i.current=s.isApplyingRedo},[s.isApplyingUndo,s.isApplyingRedo]);const[p,b]=l.useState(null),k=l.useRef(null),c=l.useCallback(h=>{o&&o(h),b(h),k.current=h},[o]),y=l.useCallback((h,u)=>{if(!(d.current||i.current)&&k.current){clearTimeout(f.current);const S=e(h);a.current===null&&(a.current={edits:[],selection:k.current}),a.current.edits.push({cell:h,newValue:S}),f.current=setTimeout(()=>{a.current&&(r({type:"edit",batch:a.current}),a.current=null)},0)}t(h,u)},[t,e]),m=l.useCallback(()=>{r({type:"undo"})},[r]),v=l.useCallback(()=>{r({type:"redo"})},[r]);return l.useEffect(()=>{if(s.operation&&k.current&&n.current){const h=[],u={edits:[],selection:k.current};for(const C of s.operation.edits){const S=e(C.cell);u.edits.push({cell:C.cell,newValue:S}),t(C.cell,C.newValue),h.push({cell:C.cell})}b(s.operation.selection),k.current=s.operation.selection,n.current.updateCells(h),r({type:"edit",batch:u}),r({type:"operationApplied"})}},[s.operation,n,t,b,e]),l.useEffect(()=>{const h=u=>{u.key==="z"&&(u.metaKey||u.ctrlKey)&&(u.shiftKey?v():m()),u.key==="y"&&(u.metaKey||u.ctrlKey)&&v()};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[m,v]),l.useMemo(()=>({undo:m,redo:v,canUndo:s.canUndo,canRedo:s.canRedo,onCellEdited:y,onGridSelectionChange:c,gridSelection:p}),[m,v,y,s.canUndo,s.canRedo,c,p])}x.seed(1337);function nn(n){return!!n}function tn(n,e){var o;const t=n.data;if(typeof t==typeof e.data)return{...e,data:t};switch(e.kind){case g.Uri:return G(t)?{...e,data:t[0]}:{...e,data:(t==null?void 0:t.toString())??""};case g.Boolean:return G(t)?{...e,data:t[0]!==void 0}:n.kind===g.Boolean?{...e,data:n.data}:{...e,data:!!nn(t)};case g.Image:return G(t)?{...e,data:[t[0]]}:{...e,data:[(t==null?void 0:t.toString())??""]};case g.Number:return{...e,data:0};case g.Text:case g.Markdown:return G(t)?{...e,data:t[0].toString()??""}:{...e,data:((o=n.data)==null?void 0:o.toString())??""};case g.Custom:return e}cn()}function rn(n){const{getContent:e,...t}=n;return t}function Z(n,e){const t=[{title:"First name",id:"First name",group:e?"Name":void 0,icon:M.HeaderString,hasMenu:!1,getContent:()=>{const r=x.name.firstName();return{kind:g.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Last name",id:"Last name",group:e?"Name":void 0,icon:M.HeaderString,hasMenu:!1,getContent:()=>{const r=x.name.lastName();return{kind:g.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Avatar",id:"Avatar",group:e?"Info":void 0,icon:M.HeaderImage,hasMenu:!1,getContent:()=>{const r=Math.round(Math.random()*100);return{kind:g.Image,data:[`https://picsum.photos/id/${r}/900/900`],displayData:[`https://picsum.photos/id/${r}/40/40`],allowOverlay:!0,readonly:!0}}},{title:"Email",id:"Email",group:e?"Info":void 0,icon:M.HeaderString,hasMenu:!1,getContent:()=>{const r=x.internet.email();return{kind:g.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Title",id:"Title",group:e?"Info":void 0,icon:M.HeaderString,hasMenu:!1,getContent:()=>{const r=x.name.jobTitle();return{kind:g.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"More Info",id:"More Info",group:e?"Info":void 0,icon:M.HeaderUri,hasMenu:!1,getContent:()=>{const r=x.internet.url();return{kind:g.Uri,displayData:r,data:r,allowOverlay:!0,readonly:!0}}}];if(non(a+t.length,e));return[...t,...s]}function on(n,e){return{title:`Column ${n}`,id:`Column ${n}`,group:e?`Group ${Math.round(n/3)}`:void 0,icon:M.HeaderString,hasMenu:!1,getContent:()=>{const t=x.lorem.word();return{kind:g.Text,data:t,displayData:t,allowOverlay:!0,readonly:!0}}}}class sn{constructor(){z(this,"cachedContent",new Map)}get(e,t){const o=this.cachedContent.get(e);if(o!==void 0)return o[t]}set(e,t,o){let s=this.cachedContent.get(e);s===void 0&&this.cachedContent.set(e,s=[]),s[t]=o}}function an(n,e=!0,t=!1){const o=l.useRef(new sn),[s,r]=l.useState(()=>Z(n,t));l.useEffect(()=>{r(Z(n,t))},[t,n]);const a=l.useCallback((c,y)=>{r(m=>{const v=m.findIndex(u=>u.title===c.title),h=[...m];return h.splice(v,1,{...m[v],width:y}),h})},[]),f=l.useMemo(()=>s.map(rn),[s]),d=l.useRef(s);d.current=s;const i=l.useCallback(([c,y])=>{let m=o.current.get(c,y);return m===void 0&&(m=d.current[c].getContent(),!e&&ke(m)&&(m={...m,readonly:e}),o.current.set(c,y,m)),m},[e]),p=l.useCallback(c=>{const y=[];for(let m=c.y;m{o.current.set(c,y,m)},[]),k=l.useCallback(([c,y],m)=>{let v=o.current.get(c,y);if(v===void 0&&(v=s[c].getContent()),N(m)&&N(v)){const h=tn(m,v);o.current.set(c,y,{...h,displayData:typeof h.data=="string"?h.data:h.displayData,lastUpdated:performance.now()})}},[s]);return{cols:f,getCellContent:i,onColumnResize:a,setCellValue:k,getCellsForSelection:p,setCellValueRaw:b}}function ln(n="This should not happen"){throw new Error(n)}function cn(n){return ln("Hell froze over")}x.seed(1337);const un=T("div")({name:"SimpleWrapper",class:"ss4kmn3",propsAsIs:!1}),dn=n=>w(un,{children:w("div",{className:"content",children:n.children})}),Rn={title:"Extra Packages/Source",decorators:[n=>w(dn,{children:w(n,{})})]},pn=T("div")({name:"BeautifulStyle",class:"bkh67gx",propsAsIs:!1}),ae=n=>{const{title:e,children:t,description:o}=n,{ref:s,width:r,height:a}=pe();return $(pn,{children:[w("h1",{children:e}),o,w("div",{className:"sizer",children:w("div",{className:"sizer-clip",ref:s,children:w("div",{style:{position:"relative",width:r??100,height:a??100},children:t})})})]})},ie=T("p")({name:"Description",class:"d1deot3s",propsAsIs:!1}),H=T("p")({name:"MoreInfo",class:"m1ml0sw1",propsAsIs:!1}),le={smoothScrollX:!0,smoothScrollY:!0,isDraggable:!1,rowMarkers:"none",width:"100%"},fn={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",headerIconSize:20,markerFontStyle:"13px",bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",horizontalBorderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#4F5DFF",cellHorizontalPadding:8,cellVerticalPadding:3,headerFontStyle:"600 13px",baseFontStyle:"13px",editorFontSize:"13px",lineHeight:1.4,fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif"},mn=[{title:"A",width:200,group:"Group 1"},{title:"B",width:200,group:"Group 1"},{title:"C",width:200,group:"Group 2"},{title:"D",width:200,group:"Group 2"},{title:"E",width:200,group:"Group 2"}],U=()=>{const n=l.useRef({}),e=1e5,t=je({columns:mn,getCellContent:l.useCallback(([d,i])=>{if(d===0)return{kind:g.Text,allowOverlay:!0,data:`${i}`,displayData:`${i}`};const p=`${d},${i}`;n.current[p]===void 0&&(n.current[p]=x.name.firstName()+" "+x.name.lastName());const b=n.current[p];return{kind:g.Text,allowOverlay:!0,data:b,displayData:b}},[])}),[o,s]=l.useState(),r=qe({columns:t.columns,getCellContent:t.getCellContent,rows:e,sort:o===void 0?void 0:{column:t.columns[o],direction:"desc",mode:"smart"}}),a=ve({columns:t.columns,theme:fn,freezeColumns:0}),f=l.useCallback(d=>{s(d)},[]);return w(ae,{title:"Custom source extensions",description:w(ie,{children:"Fixme."}),children:w(se,{...le,...t,...r,...a,rows:e,onColumnMoved:t.onColumnMoved,onHeaderClicked:f})})};U.parameters={options:{showPanel:!1}};const E=()=>{const{cols:n,getCellContent:e,setCellValue:t}=an(6),o=l.useRef(null),{gridSelection:s,onCellEdited:r,onGridSelectionChange:a,undo:f,canRedo:d,canUndo:i,redo:p}=en(o,e,t);return w(ae,{title:"Undo / Redo Support",description:$(ie,{children:["A simple undo/redo implementation",$(H,{children:["Use keyboard shortcuts CMD+Z and CMD+SHIFT+Z / CTRL+Z and CTRL+Y. Or click these buttons:",w("button",{onClick:f,disabled:!i,style:{opacity:i?1:.4},children:"Undo"}),w("button",{onClick:p,disabled:!d,style:{opacity:d?1:.4},children:"Redo"})]}),w(H,{children:"It works by taking a snapshot of the content of a cell before it is edited and replaying any edits back."})]}),children:w(se,{...le,ref:o,onCellEdited:r,getCellContent:e,gridSelection:s??void 0,onGridSelectionChange:a,columns:n,rows:1e3})})};E.parameters={options:{showPanel:!1}};var Y,X,q;H.parameters={...H.parameters,docs:{...(Y=H.parameters)==null?void 0:Y.docs,source:{originalSource:`styled.p\` font-size: 14px; flex-shrink: 0; margin: 0 0 20px 0; diff --git a/docs/assets/utils-J-I08TtD.js b/docs/assets/utils-0sbaJdQp.js similarity index 99% rename from docs/assets/utils-J-I08TtD.js rename to docs/assets/utils-0sbaJdQp.js index e4c46191c..f6210d77a 100644 --- a/docs/assets/utils-J-I08TtD.js +++ b/docs/assets/utils-0sbaJdQp.js @@ -1,4 +1,4 @@ -var H=Object.defineProperty;var T=(e,t,a)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var x=(e,t,a)=>(T(e,typeof t!="symbol"?t+"":t,a),a);import{s as k,a as B,j as M}from"./marked.esm-dbrxtycE.js";import{r as c}from"./index-BMVQvedj.js";import{S as $,U as R,E as I,G as n,D as U,a as l}from"./image-window-loader-lKUISrIQ.js";import{y as s}from"./index-PWBWJyi_.js";import{w as b}from"./_baseIteratee-WTHxv43n.js";import{u as G}from"./index.esm-Ejw8GwRl.js";import{n as E}from"./flatten-qRvRBp6y.js";s.seed(1337);function z(e){return!!e}function O(e,t){var i;const a=e.data;if(typeof a==typeof t.data)return{...t,data:a};switch(t.kind){case n.Uri:return b(a)?{...t,data:a[0]}:{...t,data:(a==null?void 0:a.toString())??""};case n.Boolean:return b(a)?{...t,data:a[0]!==void 0}:e.kind===n.Boolean?{...t,data:e.data}:{...t,data:!!z(a)};case n.Image:return b(a)?{...t,data:[a[0]]}:{...t,data:[(a==null?void 0:a.toString())??""]};case n.Number:return{...t,data:0};case n.Text:case n.Markdown:return b(a)?{...t,data:a[0].toString()??""}:{...t,data:((i=e.data)==null?void 0:i.toString())??""};case n.Custom:return t}U()}function S(e){const{getContent:t,...a}=e;return a}const J=k("div")({name:"ColumnAddButton",class:"c4uqbye",propsAsIs:!1}),j=k("div")({name:"BeautifulStyle",class:"b1bsqg7n",propsAsIs:!1}),Q=k("span")({name:"PropName",class:"piiq54i",propsAsIs:!1}),Z=k("p")({name:"Description",class:"d1k3yj19",propsAsIs:!1}),ee=k("p")({name:"MoreInfo",class:"m1j0dy02",propsAsIs:!1}),te=e=>{const{title:t,children:a,description:i,className:d,scale:r}=e,{ref:C,width:v,height:g}=G();return B(j,{className:d+($.value?" firefox":""),children:[M("h1",{children:t}),i,M("div",{style:{scale:r},className:"sizer",children:M("div",{className:"sizer-clip",ref:C,children:M("div",{style:{position:"relative",width:v??100,height:g??100},children:a})})})]})};function P(e,t){return{title:`Column ${e}`,id:`Column ${e}`,group:t?`Group ${Math.round(e/3)}`:void 0,icon:l.HeaderString,hasMenu:!1,getContent:()=>{const a=s.lorem.word();return{kind:n.Text,data:a,displayData:a,allowOverlay:!0,readonly:!0}}}}function N(e,t){const a=[{title:"First name",id:"First name",group:t?"Name":void 0,icon:l.HeaderString,hasMenu:!1,getContent:()=>{const r=s.name.firstName();return{kind:n.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Last name",id:"Last name",group:t?"Name":void 0,icon:l.HeaderString,hasMenu:!1,getContent:()=>{const r=s.name.lastName();return{kind:n.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Avatar",id:"Avatar",group:t?"Info":void 0,icon:l.HeaderImage,hasMenu:!1,getContent:()=>{const r=Math.round(Math.random()*100);return{kind:n.Image,data:[`https://picsum.photos/id/${r}/900/900`],displayData:[`https://picsum.photos/id/${r}/40/40`],allowOverlay:!0,readonly:!0}}},{title:"Email",id:"Email",group:t?"Info":void 0,icon:l.HeaderString,hasMenu:!1,getContent:()=>{const r=s.internet.email();return{kind:n.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Title",id:"Title",group:t?"Info":void 0,icon:l.HeaderString,hasMenu:!1,getContent:()=>{const r=s.name.jobTitle();return{kind:n.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"More Info",id:"More Info",group:t?"Info":void 0,icon:l.HeaderUri,hasMenu:!1,getContent:()=>{const r=s.internet.url();return{kind:n.Uri,displayData:r,data:r,hoverEffect:!0,allowOverlay:!0,readonly:!0,onClickUri:C=>{window.open(r,"_blank"),C.preventDefault()}}}}];if(eP(C+a.length,t));return[...a,...d]}class A{constructor(){x(this,"cachedContent",new Map)}get(t,a){const i=this.cachedContent.get(t);if(i!==void 0)return i[a]}set(t,a,i){let d=this.cachedContent.get(t);d===void 0&&this.cachedContent.set(t,d=[]),d[a]=i}}function ae(e,t=!0,a=!1){const i=c.useRef(new A),[d,r]=c.useState(()=>N(e,a));c.useEffect(()=>{r(N(e,a))},[a,e]);const C=c.useCallback((u,m)=>{r(o=>{const h=o.findIndex(D=>D.title===u.title),y=[...o];return y.splice(h,1,{...o[h],width:m}),y})},[]),v=c.useMemo(()=>d.map(S),[d]),g=c.useRef(d);g.current=d;const p=c.useCallback(([u,m])=>{let o=i.current.get(u,m);return o===void 0&&(o=g.current[u].getContent(),!t&&R(o)&&(o={...o,readonly:t}),i.current.set(u,m,o)),o},[t]),w=c.useCallback(([u,m],o)=>{i.current.set(u,m,o)},[]),f=c.useCallback(([u,m],o)=>{let h=i.current.get(u,m);if(h===void 0&&(h=d[u].getContent()),I(o)&&I(h)){const y=O(o,h);i.current.set(u,m,{...y,displayData:typeof y.data=="string"?y.data:y.displayData,lastUpdated:performance.now()})}},[d]);return{cols:v,getCellContent:p,onColumnResize:C,setCellValue:f,setCellValueRaw:w}}const ne=k("kbd")({name:"KeyName",class:"kcvwzr4",propsAsIs:!1}),re={smoothScrollX:!0,smoothScrollY:!0,getCellsForSelection:!0,width:"100%"};function se(e){switch(e.kind){case n.Boolean:return{...e,data:!1};case n.Image:return{...e,data:[],displayData:[]};case n.Drilldown:case n.Bubble:return{...e,data:[]};case n.Uri:case n.Markdown:return{...e,data:""};case n.Text:return{...e,data:"",displayData:""};case n.Number:return{...e,data:0,displayData:""}}return e}function V(){return[{title:"Row ID",width:120,icon:l.HeaderRowID,hasMenu:!1,getContent:()=>({kind:n.RowID,data:s.datatype.uuid(),allowOverlay:!0})},{title:"Protected",width:120,icon:l.HeaderCode,hasMenu:!1,getContent:()=>({kind:n.Protected,data:s.finance.bitcoinAddress(),allowOverlay:!1})},{title:"Loading",width:120,icon:l.HeaderString,hasMenu:!1,getContent:()=>({kind:n.Loading,allowOverlay:!1,skeletonWidth:70,skeletonWidthVariability:25})},{title:"Text",width:120,icon:l.HeaderCode,hasMenu:!1,getContent:()=>{const e=s.name.firstName();return{kind:n.Text,data:e,displayData:e,allowOverlay:!0}}},{title:"Number",width:120,icon:l.HeaderNumber,hasMenu:!1,getContent:()=>{const e=s.datatype.number(100);return{kind:n.Number,data:e,displayData:`${e}`,allowOverlay:!0}}},{title:"Boolean",width:120,icon:l.HeaderBoolean,hasMenu:!1,getContent:()=>{const e=Math.random(),t=e<.1?void 0:e<.2?null:e<.6;return{kind:n.Boolean,data:t,allowOverlay:!1,readonly:!1}}},{title:"Image",width:120,icon:l.HeaderImage,hasMenu:!1,getContent:()=>({kind:n.Image,data:[`${s.image.animals(40,40)}?random=${s.datatype.number(1e5)}`],allowOverlay:!0,readonly:!0})},{title:"Uri",width:120,icon:l.HeaderUri,hasMenu:!1,getContent:()=>{const e=s.internet.url();return{kind:n.Uri,data:e,allowOverlay:!0}}},{title:"Markdown",width:120,icon:l.HeaderMarkdown,hasMenu:!1,getContent:()=>{const e=`# Title +var H=Object.defineProperty;var T=(e,t,a)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var x=(e,t,a)=>(T(e,typeof t!="symbol"?t+"":t,a),a);import{s as k,a as B,j as M}from"./marked.esm-dbrxtycE.js";import{r as c}from"./index-BMVQvedj.js";import{S as $,U as R,E as I,G as n,D as U,a as l}from"./image-window-loader-aCHQvgUN.js";import{y as s}from"./index-PWBWJyi_.js";import{w as b}from"./_baseIteratee-WTHxv43n.js";import{u as G}from"./index.esm-Ejw8GwRl.js";import{n as E}from"./flatten-qRvRBp6y.js";s.seed(1337);function z(e){return!!e}function O(e,t){var i;const a=e.data;if(typeof a==typeof t.data)return{...t,data:a};switch(t.kind){case n.Uri:return b(a)?{...t,data:a[0]}:{...t,data:(a==null?void 0:a.toString())??""};case n.Boolean:return b(a)?{...t,data:a[0]!==void 0}:e.kind===n.Boolean?{...t,data:e.data}:{...t,data:!!z(a)};case n.Image:return b(a)?{...t,data:[a[0]]}:{...t,data:[(a==null?void 0:a.toString())??""]};case n.Number:return{...t,data:0};case n.Text:case n.Markdown:return b(a)?{...t,data:a[0].toString()??""}:{...t,data:((i=e.data)==null?void 0:i.toString())??""};case n.Custom:return t}U()}function S(e){const{getContent:t,...a}=e;return a}const J=k("div")({name:"ColumnAddButton",class:"c4uqbye",propsAsIs:!1}),j=k("div")({name:"BeautifulStyle",class:"b1bsqg7n",propsAsIs:!1}),Q=k("span")({name:"PropName",class:"piiq54i",propsAsIs:!1}),Z=k("p")({name:"Description",class:"d1k3yj19",propsAsIs:!1}),ee=k("p")({name:"MoreInfo",class:"m1j0dy02",propsAsIs:!1}),te=e=>{const{title:t,children:a,description:i,className:d,scale:r}=e,{ref:C,width:v,height:g}=G();return B(j,{className:d+($.value?" firefox":""),children:[M("h1",{children:t}),i,M("div",{style:{scale:r},className:"sizer",children:M("div",{className:"sizer-clip",ref:C,children:M("div",{style:{position:"relative",width:v??100,height:g??100},children:a})})})]})};function P(e,t){return{title:`Column ${e}`,id:`Column ${e}`,group:t?`Group ${Math.round(e/3)}`:void 0,icon:l.HeaderString,hasMenu:!1,getContent:()=>{const a=s.lorem.word();return{kind:n.Text,data:a,displayData:a,allowOverlay:!0,readonly:!0}}}}function N(e,t){const a=[{title:"First name",id:"First name",group:t?"Name":void 0,icon:l.HeaderString,hasMenu:!1,getContent:()=>{const r=s.name.firstName();return{kind:n.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Last name",id:"Last name",group:t?"Name":void 0,icon:l.HeaderString,hasMenu:!1,getContent:()=>{const r=s.name.lastName();return{kind:n.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Avatar",id:"Avatar",group:t?"Info":void 0,icon:l.HeaderImage,hasMenu:!1,getContent:()=>{const r=Math.round(Math.random()*100);return{kind:n.Image,data:[`https://picsum.photos/id/${r}/900/900`],displayData:[`https://picsum.photos/id/${r}/40/40`],allowOverlay:!0,readonly:!0}}},{title:"Email",id:"Email",group:t?"Info":void 0,icon:l.HeaderString,hasMenu:!1,getContent:()=>{const r=s.internet.email();return{kind:n.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"Title",id:"Title",group:t?"Info":void 0,icon:l.HeaderString,hasMenu:!1,getContent:()=>{const r=s.name.jobTitle();return{kind:n.Text,displayData:r,data:r,allowOverlay:!0,readonly:!0}}},{title:"More Info",id:"More Info",group:t?"Info":void 0,icon:l.HeaderUri,hasMenu:!1,getContent:()=>{const r=s.internet.url();return{kind:n.Uri,displayData:r,data:r,hoverEffect:!0,allowOverlay:!0,readonly:!0,onClickUri:C=>{window.open(r,"_blank"),C.preventDefault()}}}}];if(eP(C+a.length,t));return[...a,...d]}class A{constructor(){x(this,"cachedContent",new Map)}get(t,a){const i=this.cachedContent.get(t);if(i!==void 0)return i[a]}set(t,a,i){let d=this.cachedContent.get(t);d===void 0&&this.cachedContent.set(t,d=[]),d[a]=i}}function ae(e,t=!0,a=!1){const i=c.useRef(new A),[d,r]=c.useState(()=>N(e,a));c.useEffect(()=>{r(N(e,a))},[a,e]);const C=c.useCallback((u,m)=>{r(o=>{const h=o.findIndex(D=>D.title===u.title),y=[...o];return y.splice(h,1,{...o[h],width:m}),y})},[]),v=c.useMemo(()=>d.map(S),[d]),g=c.useRef(d);g.current=d;const p=c.useCallback(([u,m])=>{let o=i.current.get(u,m);return o===void 0&&(o=g.current[u].getContent(),!t&&R(o)&&(o={...o,readonly:t}),i.current.set(u,m,o)),o},[t]),w=c.useCallback(([u,m],o)=>{i.current.set(u,m,o)},[]),f=c.useCallback(([u,m],o)=>{let h=i.current.get(u,m);if(h===void 0&&(h=d[u].getContent()),I(o)&&I(h)){const y=O(o,h);i.current.set(u,m,{...y,displayData:typeof y.data=="string"?y.data:y.displayData,lastUpdated:performance.now()})}},[d]);return{cols:v,getCellContent:p,onColumnResize:C,setCellValue:f,setCellValueRaw:w}}const ne=k("kbd")({name:"KeyName",class:"kcvwzr4",propsAsIs:!1}),re={smoothScrollX:!0,smoothScrollY:!0,getCellsForSelection:!0,width:"100%"};function se(e){switch(e.kind){case n.Boolean:return{...e,data:!1};case n.Image:return{...e,data:[],displayData:[]};case n.Drilldown:case n.Bubble:return{...e,data:[]};case n.Uri:case n.Markdown:return{...e,data:""};case n.Text:return{...e,data:"",displayData:""};case n.Number:return{...e,data:0,displayData:""}}return e}function V(){return[{title:"Row ID",width:120,icon:l.HeaderRowID,hasMenu:!1,getContent:()=>({kind:n.RowID,data:s.datatype.uuid(),allowOverlay:!0})},{title:"Protected",width:120,icon:l.HeaderCode,hasMenu:!1,getContent:()=>({kind:n.Protected,data:s.finance.bitcoinAddress(),allowOverlay:!1})},{title:"Loading",width:120,icon:l.HeaderString,hasMenu:!1,getContent:()=>({kind:n.Loading,allowOverlay:!1,skeletonWidth:70,skeletonWidthVariability:25})},{title:"Text",width:120,icon:l.HeaderCode,hasMenu:!1,getContent:()=>{const e=s.name.firstName();return{kind:n.Text,data:e,displayData:e,allowOverlay:!0}}},{title:"Number",width:120,icon:l.HeaderNumber,hasMenu:!1,getContent:()=>{const e=s.datatype.number(100);return{kind:n.Number,data:e,displayData:`${e}`,allowOverlay:!0}}},{title:"Boolean",width:120,icon:l.HeaderBoolean,hasMenu:!1,getContent:()=>{const e=Math.random(),t=e<.1?void 0:e<.2?null:e<.6;return{kind:n.Boolean,data:t,allowOverlay:!1,readonly:!1}}},{title:"Image",width:120,icon:l.HeaderImage,hasMenu:!1,getContent:()=>({kind:n.Image,data:[`${s.image.animals(40,40)}?random=${s.datatype.number(1e5)}`],allowOverlay:!0,readonly:!0})},{title:"Uri",width:120,icon:l.HeaderUri,hasMenu:!1,getContent:()=>{const e=s.internet.url();return{kind:n.Uri,data:e,allowOverlay:!0}}},{title:"Markdown",width:120,icon:l.HeaderMarkdown,hasMenu:!1,getContent:()=>{const e=`# Title Hello my name is *${s.name.firstName()}* ## TODO: diff --git a/docs/assets/validate-data.stories--x3VbZTz.js b/docs/assets/validate-data.stories-K9YyRayS.js similarity index 81% rename from docs/assets/validate-data.stories--x3VbZTz.js rename to docs/assets/validate-data.stories-K9YyRayS.js index cb217aea4..1740cabfc 100644 --- a/docs/assets/validate-data.stories--x3VbZTz.js +++ b/docs/assets/validate-data.stories-K9YyRayS.js @@ -1,4 +1,4 @@ -import{j as e,a as l,F as c}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-2MtuC67g.js";import{B as m,D as p,P as f,M as C,u as D,d as V}from"./utils-J-I08TtD.js";import{G as h}from"./image-window-loader-lKUISrIQ.js";import{S as w}from"./story-utils-K2EZnGjM.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const L={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(w,{children:e(m,{title:"Validate data",description:l(c,{children:[l(p,{children:["Data can be validated using the ",e(f,{children:"validateCell"})," callback"]}),e(C,{children:'This example only allows the word "Valid" inside text cells.'})]}),children:e(r,{})})})]},a=()=>{const{cols:r,getCellContent:s,setCellValue:d}=D(60,!1);return e(u,{...V,getCellContent:s,columns:r,rowMarkers:"both",onPaste:!0,onCellEdited:d,rows:100,validateCell:(g,t)=>t.kind!==h.Text||t.data==="Valid"?!0:t.data.toLowerCase()==="valid"?{...t,data:"Valid",selectionRange:[0,3]}:!1})};var o,n,i;a.parameters={...a.parameters,docs:{...(o=a.parameters)==null?void 0:o.docs,source:{originalSource:`() => { +import{j as e,a as l,F as c}from"./marked.esm-dbrxtycE.js";import"./index-BMVQvedj.js";import{D as u}from"./data-editor-all-MRDpHEQ_.js";import{B as m,D as p,P as f,M as C,u as D,d as V}from"./utils-0sbaJdQp.js";import{G as h}from"./image-window-loader-aCHQvgUN.js";import{S as w}from"./story-utils-K2EZnGjM.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./throttle-7EuXLZa7.js";import"./_baseIteratee-WTHxv43n.js";import"./flatten-qRvRBp6y.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index-PWBWJyi_.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const L={title:"Glide-Data-Grid/DataEditor Demos",decorators:[r=>e(w,{children:e(m,{title:"Validate data",description:l(c,{children:[l(p,{children:["Data can be validated using the ",e(f,{children:"validateCell"})," callback"]}),e(C,{children:'This example only allows the word "Valid" inside text cells.'})]}),children:e(r,{})})})]},a=()=>{const{cols:r,getCellContent:s,setCellValue:d}=D(60,!1);return e(u,{...V,getCellContent:s,columns:r,rowMarkers:"both",onPaste:!0,onCellEdited:d,rows:100,validateCell:(g,t)=>t.kind!==h.Text||t.data==="Valid"?!0:t.data.toLowerCase()==="valid"?{...t,data:"Valid",selectionRange:[0,3]}:!1})};var o,n,i;a.parameters={...a.parameters,docs:{...(o=a.parameters)==null?void 0:o.docs,source:{originalSource:`() => { const { cols, getCellContent, diff --git a/docs/assets/wrapping-text.stories-KghQhCY5.js b/docs/assets/wrapping-text.stories-WIxnSyqc.js similarity index 88% rename from docs/assets/wrapping-text.stories-KghQhCY5.js rename to docs/assets/wrapping-text.stories-WIxnSyqc.js index a9b650dcd..4afcbc210 100644 --- a/docs/assets/wrapping-text.stories-KghQhCY5.js +++ b/docs/assets/wrapping-text.stories-WIxnSyqc.js @@ -1,4 +1,4 @@ -import{j as n,a as f}from"./marked.esm-dbrxtycE.js";import{R as i}from"./index-BMVQvedj.js";import{D as C}from"./data-editor-all-2MtuC67g.js";import{B as h,D as x,P as w,u as y,d as W}from"./utils-J-I08TtD.js";import{G as D}from"./image-window-loader-lKUISrIQ.js";import{S as G}from"./story-utils-K2EZnGjM.js";import{r as T}from"./throttle-7EuXLZa7.js";import{y as R}from"./index-PWBWJyi_.js";import"./iframe-9FFu--7X.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./_baseIteratee-WTHxv43n.js";import"./scrolling-data-grid-19OhoR-o.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const K={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>n(G,{children:n(h,{title:"Wrapping Text",description:f(x,{children:["Text cells can have wrapping text by setting the ",n(w,{children:"allowWrapping"})," prop to true."]}),children:n(e,{})})})]},t=e=>{const{cols:c,getCellContent:a,onColumnResize:g}=y(6),r=i.useMemo(()=>T(0,100).map(()=>R.lorem.sentence(e.length)),[e.length]),u=i.useCallback(l=>{const[d,o]=l;return d===0?{kind:D.Text,allowOverlay:!0,displayData:`${o}, +import{j as n,a as f}from"./marked.esm-dbrxtycE.js";import{R as i}from"./index-BMVQvedj.js";import{D as C}from"./data-editor-all-MRDpHEQ_.js";import{B as h,D as x,P as w,u as y,d as W}from"./utils-0sbaJdQp.js";import{G as D}from"./image-window-loader-aCHQvgUN.js";import{S as G}from"./story-utils-K2EZnGjM.js";import{r as T}from"./throttle-7EuXLZa7.js";import{y as R}from"./index-PWBWJyi_.js";import"./iframe-MICdw5w5.js";import"../sb-preview/runtime.js";import"./flatten-qRvRBp6y.js";import"./_baseIteratee-WTHxv43n.js";import"./scrolling-data-grid-UJ5_dX2R.js";import"./index.esm-Ejw8GwRl.js";import"./index-wocATsGp.js";const K={title:"Glide-Data-Grid/DataEditor Demos",decorators:[e=>n(G,{children:n(h,{title:"Wrapping Text",description:f(x,{children:["Text cells can have wrapping text by setting the ",n(w,{children:"allowWrapping"})," prop to true."]}),children:n(e,{})})})]},t=e=>{const{cols:c,getCellContent:a,onColumnResize:g}=y(6),r=i.useMemo(()=>T(0,100).map(()=>R.lorem.sentence(e.length)),[e.length]),u=i.useCallback(l=>{const[d,o]=l;return d===0?{kind:D.Text,allowOverlay:!0,displayData:`${o}, ${r[o%r.length]}`,data:`${o}, ${r}`,allowWrapping:!0,contentAlign:e.alignment}:a(l)},[a,e.alignment,r]);return n(C,{...W,rowHeight:80,getCellContent:u,columns:c,rows:1e3,onColumnResize:g,experimental:{hyperWrapping:e.hyperWrapping}})};t.args={alignment:"left",length:20,hyperWrapping:!1};t.argTypes={alignment:{control:{type:"select"},options:["left","center","right"]},length:{control:{type:"range",min:2,max:200}}};var s,p,m;t.parameters={...t.parameters,docs:{...(s=t.parameters)==null?void 0:s.docs,source:{originalSource:`p => { const { diff --git a/docs/iframe.html b/docs/iframe.html index 920d34f67..95af98915 100644 --- a/docs/iframe.html +++ b/docs/iframe.html @@ -382,7 +382,7 @@ } - + diff --git a/docs/index.json b/docs/index.json index fb04ad27f..fb911d084 100644 --- a/docs/index.json +++ b/docs/index.json @@ -1 +1 @@ -{"v":4,"entries":{"glide-data-grid-dataeditor-demos--add-columns":{"type":"story","id":"glide-data-grid-dataeditor-demos--add-columns","name":"Add Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-column.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--add-data-to-middle":{"type":"story","id":"glide-data-grid-dataeditor-demos--add-data-to-middle","name":"Add Data To Middle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data-to-middle.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--add-data-to-top":{"type":"story","id":"glide-data-grid-dataeditor-demos--add-data-to-top","name":"Add Data To Top","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data-to-top.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--add-data":{"type":"story","id":"glide-data-grid-dataeditor-demos--add-data","name":"Add Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--all-cell-kinds":{"type":"story","id":"glide-data-grid-dataeditor-demos--all-cell-kinds","name":"All Cell Kinds","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/all-cell-kinds.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--append-row-handle":{"type":"story","id":"glide-data-grid-dataeditor-demos--append-row-handle","name":"Append Row Handle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/append-row-handle.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--automatic-row-markers":{"type":"story","id":"glide-data-grid-dataeditor-demos--automatic-row-markers","name":"Automatic Row Markers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/automatic-row-markers.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--built-in-search":{"type":"story","id":"glide-data-grid-dataeditor-demos--built-in-search","name":"Built In Search","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/built-in-search.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--cell-activated-event":{"type":"story","id":"glide-data-grid-dataeditor-demos--cell-activated-event","name":"Cell Activated Event","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/cell-activated-event.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--column-group-collapse":{"type":"story","id":"glide-data-grid-dataeditor-demos--column-group-collapse","name":"Column Group Collapse","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/column-group-collapse.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--column-groups":{"type":"story","id":"glide-data-grid-dataeditor-demos--column-groups","name":"Column Groups","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/column-groups.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--content-alignment":{"type":"story","id":"glide-data-grid-dataeditor-demos--content-alignment","name":"Content Alignment","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/content-alignment.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--controlled-search":{"type":"story","id":"glide-data-grid-dataeditor-demos--controlled-search","name":"Controlled Search","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/controlled-search.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--controlled-selection":{"type":"story","id":"glide-data-grid-dataeditor-demos--controlled-selection","name":"Controlled Selection","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/controlled-selection.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--copy-support":{"type":"story","id":"glide-data-grid-dataeditor-demos--copy-support","name":"Copy Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/copy-support.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--custom-header-icons":{"type":"story","id":"glide-data-grid-dataeditor-demos--custom-header-icons","name":"Custom Header Icons","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/custom-header-icons.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--custom-drawing":{"type":"story","id":"glide-data-grid-dataeditor-demos--custom-drawing","name":"Custom Drawing","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/custom-header.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--drag-source":{"type":"story","id":"glide-data-grid-dataeditor-demos--drag-source","name":"Drag Source","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/drag-source.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--drop-events":{"type":"story","id":"glide-data-grid-dataeditor-demos--drop-events","name":"Drop Events","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/drop-events.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--fill-handle":{"type":"story","id":"glide-data-grid-dataeditor-demos--fill-handle","name":"Fill Handle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/fill-handle.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--freeze-columns":{"type":"story","id":"glide-data-grid-dataeditor-demos--freeze-columns","name":"Freeze Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/freeze-columns.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--freeze-rows":{"type":"story","id":"glide-data-grid-dataeditor-demos--freeze-rows","name":"Freeze Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/freeze-rows.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--header-menus":{"type":"story","id":"glide-data-grid-dataeditor-demos--header-menus","name":"Header Menus","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/header-menus.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--highlight-cells":{"type":"story","id":"glide-data-grid-dataeditor-demos--highlight-cells","name":"Highlight Cells","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/highlight-cells.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--imperative-scroll":{"type":"story","id":"glide-data-grid-dataeditor-demos--imperative-scroll","name":"Imperative Scroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/imperative-scroll.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--input-blending":{"type":"story","id":"glide-data-grid-dataeditor-demos--input-blending","name":"Input Blending","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/input-blending.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--custom-keybindings":{"type":"story","id":"glide-data-grid-dataeditor-demos--custom-keybindings","name":"Custom Keybindings","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/keybindings.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--layout-integration":{"type":"story","id":"glide-data-grid-dataeditor-demos--layout-integration","name":"Layout Integration","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/layout-integration.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--multi-select-columns":{"type":"story","id":"glide-data-grid-dataeditor-demos--multi-select-columns","name":"Multi Select Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/multi-select-columns.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--new-column-button":{"type":"story","id":"glide-data-grid-dataeditor-demos--new-column-button","name":"New Column Button","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/new-column-button.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--obscured-data-grid":{"type":"story","id":"glide-data-grid-dataeditor-demos--obscured-data-grid","name":"Obscured Data Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/obscured-grid.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--observe-visible-region":{"type":"story","id":"glide-data-grid-dataeditor-demos--observe-visible-region","name":"Observe Visible Region","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/observe-visible-region.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--one-hundred-thousand-cols":{"type":"story","id":"glide-data-grid-dataeditor-demos--one-hundred-thousand-cols","name":"One Hundred Thousand Cols","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/one-hundred-thousand-columns.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--one-million-rows":{"type":"story","id":"glide-data-grid-dataeditor-demos--one-million-rows","name":"One Million Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/one-million-rows.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--overscroll":{"type":"story","id":"glide-data-grid-dataeditor-demos--overscroll","name":"Overscroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/overscroll.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--padding":{"type":"story","id":"glide-data-grid-dataeditor-demos--padding","name":"Padding","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/padding.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--paste-support":{"type":"story","id":"glide-data-grid-dataeditor-demos--paste-support","name":"Paste Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/paste-support.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--prevent-diagonal-scroll":{"type":"story","id":"glide-data-grid-dataeditor-demos--prevent-diagonal-scroll","name":"Prevent Diagonal Scroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/prevent-diagonal-scroll.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--rapid-updates":{"type":"story","id":"glide-data-grid-dataeditor-demos--rapid-updates","name":"Rapid Updates","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/rapid-updates.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--rearrange-columns":{"type":"story","id":"glide-data-grid-dataeditor-demos--rearrange-columns","name":"Rearrange Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/rearrange-columns.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--reorder-rows":{"type":"story","id":"glide-data-grid-dataeditor-demos--reorder-rows","name":"Reorder Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/reorder-rows.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--resizable-columns":{"type":"story","id":"glide-data-grid-dataeditor-demos--resizable-columns","name":"Resizable Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/resizable-columns.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--right-element":{"type":"story","id":"glide-data-grid-dataeditor-demos--right-element","name":"Right Element","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/right-element.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--right-to-left":{"type":"story","id":"glide-data-grid-dataeditor-demos--right-to-left","name":"Right To Left","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/right-to-left.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--row-and-header-sizes":{"type":"story","id":"glide-data-grid-dataeditor-demos--row-and-header-sizes","name":"Row And Header Sizes","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-and-header-sizes.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--row-grouping":{"type":"story","id":"glide-data-grid-dataeditor-demos--row-grouping","name":"Row Grouping","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-grouping.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--row-hover":{"type":"story","id":"glide-data-grid-dataeditor-demos--row-hover","name":"Row Hover","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-hover.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--row-markers":{"type":"story","id":"glide-data-grid-dataeditor-demos--row-markers","name":"Row Markers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-markers.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--scaled-view":{"type":"story","id":"glide-data-grid-dataeditor-demos--scaled-view","name":"Scaled View","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/scaled-view.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--scroll-shadows":{"type":"story","id":"glide-data-grid-dataeditor-demos--scroll-shadows","name":"Scroll Shadows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/scroll-shadows.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--search-as-filter":{"type":"story","id":"glide-data-grid-dataeditor-demos--search-as-filter","name":"Search As Filter","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/search-as-filter.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--server-side-data":{"type":"story","id":"glide-data-grid-dataeditor-demos--server-side-data","name":"Server Side Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/server-side-data.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--shadow-dom":{"type":"story","id":"glide-data-grid-dataeditor-demos--shadow-dom","name":"Shadow DOM","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/shadow-dom.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--silly-numbers":{"type":"story","id":"glide-data-grid-dataeditor-demos--silly-numbers","name":"Silly Numbers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/silly-numbers.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--small-editable-grid":{"type":"story","id":"glide-data-grid-dataeditor-demos--small-editable-grid","name":"Small Editable Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/small-editable-grid.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--smooth-scrolling-grid":{"type":"story","id":"glide-data-grid-dataeditor-demos--smooth-scrolling-grid","name":"Smooth Scrolling Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/smooth-scrolling-grid.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--span-cell":{"type":"story","id":"glide-data-grid-dataeditor-demos--span-cell","name":"Span Cell","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/span-cell.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--stretch-column-size":{"type":"story","id":"glide-data-grid-dataeditor-demos--stretch-column-size","name":"Stretch Column Size","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/stretch-column-size.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--ten-million-cells":{"type":"story","id":"glide-data-grid-dataeditor-demos--ten-million-cells","name":"Ten Million Cells","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/ten-million-cells.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--theme-per-column":{"type":"story","id":"glide-data-grid-dataeditor-demos--theme-per-column","name":"Theme Per Column","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-per-column.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--theme-per-row":{"type":"story","id":"glide-data-grid-dataeditor-demos--theme-per-row","name":"Theme Per Row","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-per-row.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--theme-support":{"type":"story","id":"glide-data-grid-dataeditor-demos--theme-support","name":"Theme Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-support.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--tooltips":{"type":"story","id":"glide-data-grid-dataeditor-demos--tooltips","name":"Tooltips","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/tooltips.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--trailing-row-options":{"type":"story","id":"glide-data-grid-dataeditor-demos--trailing-row-options","name":"Trailing Row Options","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/trailing-row-options.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--uneven-rows":{"type":"story","id":"glide-data-grid-dataeditor-demos--uneven-rows","name":"Uneven Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/uneven-rows.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--validate-data":{"type":"story","id":"glide-data-grid-dataeditor-demos--validate-data","name":"Validate Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/validate-data.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--wrapping-text":{"type":"story","id":"glide-data-grid-dataeditor-demos--wrapping-text","name":"Wrapping Text","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/wrapping-text.stories.tsx","tags":["story"]},"glide-data-grid-docs--faq":{"type":"story","id":"glide-data-grid-docs--faq","name":"FAQ","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/00-faq.stories.tsx","tags":["story"]},"glide-data-grid-docs--getting-started":{"type":"story","id":"glide-data-grid-docs--getting-started","name":"Getting Started","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/01-getting-started.stories.tsx","tags":["story"]},"glide-data-grid-docs--editing-data":{"type":"story","id":"glide-data-grid-docs--editing-data","name":"Editing Data","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/02-editing-data.stories.tsx","tags":["story"]},"glide-data-grid-docs--grid-columns":{"type":"story","id":"glide-data-grid-docs--grid-columns","name":"Grid Columns","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/03-grid-column.stories.tsx","tags":["story"]},"glide-data-grid-docs--streaming-data":{"type":"story","id":"glide-data-grid-docs--streaming-data","name":"Streaming Data","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/04-streaming-data.stories.tsx","tags":["story"]},"glide-data-grid-docs--search":{"type":"story","id":"glide-data-grid-docs--search","name":"Search","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/06-search.stories.tsx","tags":["story"]},"glide-data-grid-docs--column-grouping":{"type":"story","id":"glide-data-grid-docs--column-grouping","name":"Column Grouping","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/07-column-grouping.stories.tsx","tags":["story"]},"glide-data-grid-docs--theming":{"type":"story","id":"glide-data-grid-docs--theming","name":"Theming","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/08-theming.stories.tsx","tags":["story"]},"glide-data-grid-docs--menus":{"type":"story","id":"glide-data-grid-docs--menus","name":"Menus","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/09-menus.stories.tsx","tags":["story"]},"extra-packages-cells--custom-cells":{"type":"story","id":"extra-packages-cells--custom-cells","name":"Custom Cells","title":"Extra Packages/Cells","importPath":"./packages/cells/src/cell.stories.tsx","tags":["story"]},"extra-packages-cells--custom-cell-editing":{"type":"story","id":"extra-packages-cells--custom-cell-editing","name":"Custom Cell Editing","title":"Extra Packages/Cells","importPath":"./packages/cells/src/cell.stories.tsx","tags":["story"]},"extra-packages-source--more-info":{"type":"story","id":"extra-packages-source--more-info","name":"More Info","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"]},"extra-packages-source--use-data-source":{"type":"story","id":"extra-packages-source--use-data-source","name":"Use Data Source","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"]},"extra-packages-source--undo-redo":{"type":"story","id":"extra-packages-source--undo-redo","name":"Undo Redo","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"]},"subcomponents-datagrid--simplenotest":{"type":"story","id":"subcomponents-datagrid--simplenotest","name":"Simplenotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"]},"subcomponents-datagrid--selected-cellnotest":{"type":"story","id":"subcomponents-datagrid--selected-cellnotest","name":"Selected Cellnotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"]},"subcomponents-datagrid--selected-rownotest":{"type":"story","id":"subcomponents-datagrid--selected-rownotest","name":"Selected Rownotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"]},"subcomponents-datagrid--selected-columnnotest":{"type":"story","id":"subcomponents-datagrid--selected-columnnotest","name":"Selected Columnnotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"]},"subcomponents-scrollingdatagrid--simplenotest":{"type":"story","id":"subcomponents-scrollingdatagrid--simplenotest","name":"Simplenotest","title":"Subcomponents/ScrollingDataGrid","importPath":"./packages/core/src/internal/scrolling-data-grid/scrolling-data-grid.stories.tsx","tags":["story"]},"tests-testcases--simplenotest":{"type":"story","id":"tests-testcases--simplenotest","name":"Simplenotest","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--relation-column":{"type":"story","id":"tests-testcases--relation-column","name":"Relation Column","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--minimal":{"type":"story","id":"tests-testcases--minimal","name":"Minimal","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--smooth":{"type":"story","id":"tests-testcases--smooth","name":"Smooth","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--manual-control":{"type":"story","id":"tests-testcases--manual-control","name":"Manual Control","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--draggable":{"type":"story","id":"tests-testcases--draggable","name":"Draggable","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--ideal-size":{"type":"story","id":"tests-testcases--ideal-size","name":"Ideal Size","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--dynamic-add-remove-columns":{"type":"story","id":"tests-testcases--dynamic-add-remove-columns","name":"Dynamic Add Remove Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--grid-selection-out-of-range-no-columns":{"type":"story","id":"tests-testcases--grid-selection-out-of-range-no-columns","name":"Grid Selection Out Of Range No Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--resizable-columns":{"type":"story","id":"tests-testcases--resizable-columns","name":"Resizable Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--grid-selection-out-of-range-less-columns-than-selection":{"type":"story","id":"tests-testcases--grid-selection-out-of-range-less-columns-than-selection","name":"Grid Selection Out Of Range Less Columns Than Selection","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--grid-add-new-rows":{"type":"story","id":"tests-testcases--grid-add-new-rows","name":"Grid Add New Rows","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--grid-no-trailing-blank-row":{"type":"story","id":"tests-testcases--grid-no-trailing-blank-row","name":"Grid No Trailing Blank Row","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--markdown-edits":{"type":"story","id":"tests-testcases--markdown-edits","name":"Markdown Edits","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--can-edit-boolean":{"type":"story","id":"tests-testcases--can-edit-boolean","name":"Can Edit Boolean","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--simple-editable":{"type":"story","id":"tests-testcases--simple-editable","name":"Simple Editable","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases-bugs--bug-70":{"type":"story","id":"tests-testcases-bugs--bug-70","name":"Bug 70","title":"Tests/TestCases/Bugs","importPath":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx","tags":["story"]},"tests-testcases-bugs--filter-columns":{"type":"story","id":"tests-testcases-bugs--filter-columns","name":"Filter Columns","title":"Tests/TestCases/Bugs","importPath":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx","tags":["story"]}}} +{"v":4,"entries":{"glide-data-grid-dataeditor-demos--add-columns":{"type":"story","id":"glide-data-grid-dataeditor-demos--add-columns","name":"Add Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-column.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--add-data-to-middle":{"type":"story","id":"glide-data-grid-dataeditor-demos--add-data-to-middle","name":"Add Data To Middle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data-to-middle.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--add-data-to-top":{"type":"story","id":"glide-data-grid-dataeditor-demos--add-data-to-top","name":"Add Data To Top","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data-to-top.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--add-data":{"type":"story","id":"glide-data-grid-dataeditor-demos--add-data","name":"Add Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--all-cell-kinds":{"type":"story","id":"glide-data-grid-dataeditor-demos--all-cell-kinds","name":"All Cell Kinds","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/all-cell-kinds.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--append-row-handle":{"type":"story","id":"glide-data-grid-dataeditor-demos--append-row-handle","name":"Append Row Handle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/append-row-handle.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--automatic-row-markers":{"type":"story","id":"glide-data-grid-dataeditor-demos--automatic-row-markers","name":"Automatic Row Markers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/automatic-row-markers.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--built-in-search":{"type":"story","id":"glide-data-grid-dataeditor-demos--built-in-search","name":"Built In Search","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/built-in-search.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--cell-activated-event":{"type":"story","id":"glide-data-grid-dataeditor-demos--cell-activated-event","name":"Cell Activated Event","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/cell-activated-event.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--column-group-collapse":{"type":"story","id":"glide-data-grid-dataeditor-demos--column-group-collapse","name":"Column Group Collapse","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/column-group-collapse.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--column-groups":{"type":"story","id":"glide-data-grid-dataeditor-demos--column-groups","name":"Column Groups","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/column-groups.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--content-alignment":{"type":"story","id":"glide-data-grid-dataeditor-demos--content-alignment","name":"Content Alignment","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/content-alignment.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--controlled-search":{"type":"story","id":"glide-data-grid-dataeditor-demos--controlled-search","name":"Controlled Search","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/controlled-search.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--controlled-selection":{"type":"story","id":"glide-data-grid-dataeditor-demos--controlled-selection","name":"Controlled Selection","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/controlled-selection.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--copy-support":{"type":"story","id":"glide-data-grid-dataeditor-demos--copy-support","name":"Copy Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/copy-support.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--custom-header-icons":{"type":"story","id":"glide-data-grid-dataeditor-demos--custom-header-icons","name":"Custom Header Icons","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/custom-header-icons.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--custom-drawing":{"type":"story","id":"glide-data-grid-dataeditor-demos--custom-drawing","name":"Custom Drawing","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/custom-header.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--drag-source":{"type":"story","id":"glide-data-grid-dataeditor-demos--drag-source","name":"Drag Source","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/drag-source.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--drop-events":{"type":"story","id":"glide-data-grid-dataeditor-demos--drop-events","name":"Drop Events","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/drop-events.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--fill-handle":{"type":"story","id":"glide-data-grid-dataeditor-demos--fill-handle","name":"Fill Handle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/fill-handle.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--freeze-columns":{"type":"story","id":"glide-data-grid-dataeditor-demos--freeze-columns","name":"Freeze Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/freeze-columns.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--freeze-rows":{"type":"story","id":"glide-data-grid-dataeditor-demos--freeze-rows","name":"Freeze Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/freeze-rows.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--header-menus":{"type":"story","id":"glide-data-grid-dataeditor-demos--header-menus","name":"Header Menus","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/header-menus.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--highlight-cells":{"type":"story","id":"glide-data-grid-dataeditor-demos--highlight-cells","name":"Highlight Cells","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/highlight-cells.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--imperative-scroll":{"type":"story","id":"glide-data-grid-dataeditor-demos--imperative-scroll","name":"Imperative Scroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/imperative-scroll.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--input-blending":{"type":"story","id":"glide-data-grid-dataeditor-demos--input-blending","name":"Input Blending","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/input-blending.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--custom-keybindings":{"type":"story","id":"glide-data-grid-dataeditor-demos--custom-keybindings","name":"Custom Keybindings","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/keybindings.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--layout-integration":{"type":"story","id":"glide-data-grid-dataeditor-demos--layout-integration","name":"Layout Integration","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/layout-integration.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--multi-select-columns":{"type":"story","id":"glide-data-grid-dataeditor-demos--multi-select-columns","name":"Multi Select Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/multi-select-columns.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--new-column-button":{"type":"story","id":"glide-data-grid-dataeditor-demos--new-column-button","name":"New Column Button","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/new-column-button.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--obscured-data-grid":{"type":"story","id":"glide-data-grid-dataeditor-demos--obscured-data-grid","name":"Obscured Data Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/obscured-grid.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--observe-visible-region":{"type":"story","id":"glide-data-grid-dataeditor-demos--observe-visible-region","name":"Observe Visible Region","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/observe-visible-region.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--one-hundred-thousand-cols":{"type":"story","id":"glide-data-grid-dataeditor-demos--one-hundred-thousand-cols","name":"One Hundred Thousand Cols","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/one-hundred-thousand-columns.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--one-million-rows":{"type":"story","id":"glide-data-grid-dataeditor-demos--one-million-rows","name":"One Million Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/one-million-rows.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--overscroll":{"type":"story","id":"glide-data-grid-dataeditor-demos--overscroll","name":"Overscroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/overscroll.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--padding":{"type":"story","id":"glide-data-grid-dataeditor-demos--padding","name":"Padding","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/padding.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--paste-support":{"type":"story","id":"glide-data-grid-dataeditor-demos--paste-support","name":"Paste Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/paste-support.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--prevent-diagonal-scroll":{"type":"story","id":"glide-data-grid-dataeditor-demos--prevent-diagonal-scroll","name":"Prevent Diagonal Scroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/prevent-diagonal-scroll.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--rapid-updates":{"type":"story","id":"glide-data-grid-dataeditor-demos--rapid-updates","name":"Rapid Updates","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/rapid-updates.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--rearrange-columns":{"type":"story","id":"glide-data-grid-dataeditor-demos--rearrange-columns","name":"Rearrange Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/rearrange-columns.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--reorder-rows":{"type":"story","id":"glide-data-grid-dataeditor-demos--reorder-rows","name":"Reorder Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/reorder-rows.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--resizable-columns":{"type":"story","id":"glide-data-grid-dataeditor-demos--resizable-columns","name":"Resizable Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/resizable-columns.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--right-element":{"type":"story","id":"glide-data-grid-dataeditor-demos--right-element","name":"Right Element","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/right-element.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--right-to-left":{"type":"story","id":"glide-data-grid-dataeditor-demos--right-to-left","name":"Right To Left","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/right-to-left.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--row-and-header-sizes":{"type":"story","id":"glide-data-grid-dataeditor-demos--row-and-header-sizes","name":"Row And Header Sizes","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-and-header-sizes.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--row-grouping":{"type":"story","id":"glide-data-grid-dataeditor-demos--row-grouping","name":"Row Grouping","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-grouping.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--row-hover":{"type":"story","id":"glide-data-grid-dataeditor-demos--row-hover","name":"Row Hover","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-hover.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--row-markers":{"type":"story","id":"glide-data-grid-dataeditor-demos--row-markers","name":"Row Markers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-markers.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--scaled-view":{"type":"story","id":"glide-data-grid-dataeditor-demos--scaled-view","name":"Scaled View","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/scaled-view.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--scroll-offset":{"type":"story","id":"glide-data-grid-dataeditor-demos--scroll-offset","name":"Scroll Offset","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/scroll-offset.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--scroll-shadows":{"type":"story","id":"glide-data-grid-dataeditor-demos--scroll-shadows","name":"Scroll Shadows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/scroll-shadows.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--search-as-filter":{"type":"story","id":"glide-data-grid-dataeditor-demos--search-as-filter","name":"Search As Filter","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/search-as-filter.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--server-side-data":{"type":"story","id":"glide-data-grid-dataeditor-demos--server-side-data","name":"Server Side Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/server-side-data.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--shadow-dom":{"type":"story","id":"glide-data-grid-dataeditor-demos--shadow-dom","name":"Shadow DOM","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/shadow-dom.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--silly-numbers":{"type":"story","id":"glide-data-grid-dataeditor-demos--silly-numbers","name":"Silly Numbers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/silly-numbers.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--small-editable-grid":{"type":"story","id":"glide-data-grid-dataeditor-demos--small-editable-grid","name":"Small Editable Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/small-editable-grid.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--smooth-scrolling-grid":{"type":"story","id":"glide-data-grid-dataeditor-demos--smooth-scrolling-grid","name":"Smooth Scrolling Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/smooth-scrolling-grid.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--span-cell":{"type":"story","id":"glide-data-grid-dataeditor-demos--span-cell","name":"Span Cell","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/span-cell.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--stretch-column-size":{"type":"story","id":"glide-data-grid-dataeditor-demos--stretch-column-size","name":"Stretch Column Size","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/stretch-column-size.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--ten-million-cells":{"type":"story","id":"glide-data-grid-dataeditor-demos--ten-million-cells","name":"Ten Million Cells","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/ten-million-cells.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--theme-per-column":{"type":"story","id":"glide-data-grid-dataeditor-demos--theme-per-column","name":"Theme Per Column","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-per-column.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--theme-per-row":{"type":"story","id":"glide-data-grid-dataeditor-demos--theme-per-row","name":"Theme Per Row","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-per-row.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--theme-support":{"type":"story","id":"glide-data-grid-dataeditor-demos--theme-support","name":"Theme Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-support.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--tooltips":{"type":"story","id":"glide-data-grid-dataeditor-demos--tooltips","name":"Tooltips","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/tooltips.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--trailing-row-options":{"type":"story","id":"glide-data-grid-dataeditor-demos--trailing-row-options","name":"Trailing Row Options","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/trailing-row-options.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--uneven-rows":{"type":"story","id":"glide-data-grid-dataeditor-demos--uneven-rows","name":"Uneven Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/uneven-rows.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--validate-data":{"type":"story","id":"glide-data-grid-dataeditor-demos--validate-data","name":"Validate Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/validate-data.stories.tsx","tags":["story"]},"glide-data-grid-dataeditor-demos--wrapping-text":{"type":"story","id":"glide-data-grid-dataeditor-demos--wrapping-text","name":"Wrapping Text","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/wrapping-text.stories.tsx","tags":["story"]},"glide-data-grid-docs--faq":{"type":"story","id":"glide-data-grid-docs--faq","name":"FAQ","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/00-faq.stories.tsx","tags":["story"]},"glide-data-grid-docs--getting-started":{"type":"story","id":"glide-data-grid-docs--getting-started","name":"Getting Started","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/01-getting-started.stories.tsx","tags":["story"]},"glide-data-grid-docs--editing-data":{"type":"story","id":"glide-data-grid-docs--editing-data","name":"Editing Data","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/02-editing-data.stories.tsx","tags":["story"]},"glide-data-grid-docs--grid-columns":{"type":"story","id":"glide-data-grid-docs--grid-columns","name":"Grid Columns","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/03-grid-column.stories.tsx","tags":["story"]},"glide-data-grid-docs--streaming-data":{"type":"story","id":"glide-data-grid-docs--streaming-data","name":"Streaming Data","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/04-streaming-data.stories.tsx","tags":["story"]},"glide-data-grid-docs--search":{"type":"story","id":"glide-data-grid-docs--search","name":"Search","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/06-search.stories.tsx","tags":["story"]},"glide-data-grid-docs--column-grouping":{"type":"story","id":"glide-data-grid-docs--column-grouping","name":"Column Grouping","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/07-column-grouping.stories.tsx","tags":["story"]},"glide-data-grid-docs--theming":{"type":"story","id":"glide-data-grid-docs--theming","name":"Theming","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/08-theming.stories.tsx","tags":["story"]},"glide-data-grid-docs--menus":{"type":"story","id":"glide-data-grid-docs--menus","name":"Menus","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/09-menus.stories.tsx","tags":["story"]},"extra-packages-cells--custom-cells":{"type":"story","id":"extra-packages-cells--custom-cells","name":"Custom Cells","title":"Extra Packages/Cells","importPath":"./packages/cells/src/cell.stories.tsx","tags":["story"]},"extra-packages-cells--custom-cell-editing":{"type":"story","id":"extra-packages-cells--custom-cell-editing","name":"Custom Cell Editing","title":"Extra Packages/Cells","importPath":"./packages/cells/src/cell.stories.tsx","tags":["story"]},"extra-packages-source--more-info":{"type":"story","id":"extra-packages-source--more-info","name":"More Info","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"]},"extra-packages-source--use-data-source":{"type":"story","id":"extra-packages-source--use-data-source","name":"Use Data Source","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"]},"extra-packages-source--undo-redo":{"type":"story","id":"extra-packages-source--undo-redo","name":"Undo Redo","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"]},"subcomponents-datagrid--simplenotest":{"type":"story","id":"subcomponents-datagrid--simplenotest","name":"Simplenotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"]},"subcomponents-datagrid--selected-cellnotest":{"type":"story","id":"subcomponents-datagrid--selected-cellnotest","name":"Selected Cellnotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"]},"subcomponents-datagrid--selected-rownotest":{"type":"story","id":"subcomponents-datagrid--selected-rownotest","name":"Selected Rownotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"]},"subcomponents-datagrid--selected-columnnotest":{"type":"story","id":"subcomponents-datagrid--selected-columnnotest","name":"Selected Columnnotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"]},"subcomponents-scrollingdatagrid--simplenotest":{"type":"story","id":"subcomponents-scrollingdatagrid--simplenotest","name":"Simplenotest","title":"Subcomponents/ScrollingDataGrid","importPath":"./packages/core/src/internal/scrolling-data-grid/scrolling-data-grid.stories.tsx","tags":["story"]},"tests-testcases--simplenotest":{"type":"story","id":"tests-testcases--simplenotest","name":"Simplenotest","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--relation-column":{"type":"story","id":"tests-testcases--relation-column","name":"Relation Column","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--minimal":{"type":"story","id":"tests-testcases--minimal","name":"Minimal","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--smooth":{"type":"story","id":"tests-testcases--smooth","name":"Smooth","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--manual-control":{"type":"story","id":"tests-testcases--manual-control","name":"Manual Control","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--draggable":{"type":"story","id":"tests-testcases--draggable","name":"Draggable","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--ideal-size":{"type":"story","id":"tests-testcases--ideal-size","name":"Ideal Size","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--dynamic-add-remove-columns":{"type":"story","id":"tests-testcases--dynamic-add-remove-columns","name":"Dynamic Add Remove Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--grid-selection-out-of-range-no-columns":{"type":"story","id":"tests-testcases--grid-selection-out-of-range-no-columns","name":"Grid Selection Out Of Range No Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--resizable-columns":{"type":"story","id":"tests-testcases--resizable-columns","name":"Resizable Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--grid-selection-out-of-range-less-columns-than-selection":{"type":"story","id":"tests-testcases--grid-selection-out-of-range-less-columns-than-selection","name":"Grid Selection Out Of Range Less Columns Than Selection","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--grid-add-new-rows":{"type":"story","id":"tests-testcases--grid-add-new-rows","name":"Grid Add New Rows","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--grid-no-trailing-blank-row":{"type":"story","id":"tests-testcases--grid-no-trailing-blank-row","name":"Grid No Trailing Blank Row","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--markdown-edits":{"type":"story","id":"tests-testcases--markdown-edits","name":"Markdown Edits","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--can-edit-boolean":{"type":"story","id":"tests-testcases--can-edit-boolean","name":"Can Edit Boolean","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases--simple-editable":{"type":"story","id":"tests-testcases--simple-editable","name":"Simple Editable","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"]},"tests-testcases-bugs--bug-70":{"type":"story","id":"tests-testcases-bugs--bug-70","name":"Bug 70","title":"Tests/TestCases/Bugs","importPath":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx","tags":["story"]},"tests-testcases-bugs--filter-columns":{"type":"story","id":"tests-testcases-bugs--filter-columns","name":"Filter Columns","title":"Tests/TestCases/Bugs","importPath":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx","tags":["story"]}}} diff --git a/docs/project.json b/docs/project.json index 0607dbc9c..cdbb6fdf1 100644 --- a/docs/project.json +++ b/docs/project.json @@ -1 +1 @@ -{"generatedAt":1707376848723,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"monorepo":"Workspaces","packageManager":{"type":"npm","version":"10.2.3"},"typescriptOptions":{"reactDocgen":false},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","storybookVersion":"7.6.12","storybookVersionSpecifier":"^7.6.12","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"7.6.12"},"@storybook/addon-controls":{"version":"7.6.12"},"@storybook/addon-links":{"version":"7.6.12"},"@storybook/addon-storysource":{"version":"7.6.12"},"@storybook/addons":{"version":"7.6.12"},"@storybook/react":{"version":"7.6.12"},"@storybook/react-vite":{"version":"7.6.12"},"@storybook/react-webpack5":{"version":"7.6.12"},"storybook":{"version":"7.6.12"}},"addons":{"$SNIP/node_modules/@storybook/addon-storysource":{"version":null},"$SNIP/node_modules/@storybook/addon-controls":{"version":null}}} +{"generatedAt":1707543004539,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"monorepo":"Workspaces","packageManager":{"type":"npm","version":"10.2.3"},"typescriptOptions":{"reactDocgen":false},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","storybookVersion":"7.6.12","storybookVersionSpecifier":"^7.6.12","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"7.6.12"},"@storybook/addon-controls":{"version":"7.6.12"},"@storybook/addon-links":{"version":"7.6.12"},"@storybook/addon-storysource":{"version":"7.6.12"},"@storybook/addons":{"version":"7.6.12"},"@storybook/react":{"version":"7.6.12"},"@storybook/react-vite":{"version":"7.6.12"},"@storybook/react-webpack5":{"version":"7.6.12"},"storybook":{"version":"7.6.12"}},"addons":{"$SNIP/node_modules/@storybook/addon-storysource":{"version":null},"$SNIP/node_modules/@storybook/addon-controls":{"version":null}}} diff --git a/docs/stories.json b/docs/stories.json index 8157f6635..4ef958286 100644 --- a/docs/stories.json +++ b/docs/stories.json @@ -1 +1 @@ -{"v":3,"stories":{"glide-data-grid-dataeditor-demos--add-columns":{"id":"glide-data-grid-dataeditor-demos--add-columns","name":"Add Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-column.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Add Columns","parameters":{"__id":"glide-data-grid-dataeditor-demos--add-columns","docsOnly":false,"fileName":"./packages/core/src/docs/examples/add-column.stories.tsx"}},"glide-data-grid-dataeditor-demos--add-data-to-middle":{"id":"glide-data-grid-dataeditor-demos--add-data-to-middle","name":"Add Data To Middle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data-to-middle.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Add Data To Middle","parameters":{"__id":"glide-data-grid-dataeditor-demos--add-data-to-middle","docsOnly":false,"fileName":"./packages/core/src/docs/examples/add-data-to-middle.stories.tsx"}},"glide-data-grid-dataeditor-demos--add-data-to-top":{"id":"glide-data-grid-dataeditor-demos--add-data-to-top","name":"Add Data To Top","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data-to-top.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Add Data To Top","parameters":{"__id":"glide-data-grid-dataeditor-demos--add-data-to-top","docsOnly":false,"fileName":"./packages/core/src/docs/examples/add-data-to-top.stories.tsx"}},"glide-data-grid-dataeditor-demos--add-data":{"id":"glide-data-grid-dataeditor-demos--add-data","name":"Add Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Add Data","parameters":{"__id":"glide-data-grid-dataeditor-demos--add-data","docsOnly":false,"fileName":"./packages/core/src/docs/examples/add-data.stories.tsx"}},"glide-data-grid-dataeditor-demos--all-cell-kinds":{"id":"glide-data-grid-dataeditor-demos--all-cell-kinds","name":"All Cell Kinds","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/all-cell-kinds.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"All Cell Kinds","parameters":{"__id":"glide-data-grid-dataeditor-demos--all-cell-kinds","docsOnly":false,"fileName":"./packages/core/src/docs/examples/all-cell-kinds.stories.tsx"}},"glide-data-grid-dataeditor-demos--append-row-handle":{"id":"glide-data-grid-dataeditor-demos--append-row-handle","name":"Append Row Handle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/append-row-handle.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Append Row Handle","parameters":{"__id":"glide-data-grid-dataeditor-demos--append-row-handle","docsOnly":false,"fileName":"./packages/core/src/docs/examples/append-row-handle.stories.tsx"}},"glide-data-grid-dataeditor-demos--automatic-row-markers":{"id":"glide-data-grid-dataeditor-demos--automatic-row-markers","name":"Automatic Row Markers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/automatic-row-markers.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Automatic Row Markers","parameters":{"__id":"glide-data-grid-dataeditor-demos--automatic-row-markers","docsOnly":false,"fileName":"./packages/core/src/docs/examples/automatic-row-markers.stories.tsx"}},"glide-data-grid-dataeditor-demos--built-in-search":{"id":"glide-data-grid-dataeditor-demos--built-in-search","name":"Built In Search","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/built-in-search.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Built In Search","parameters":{"__id":"glide-data-grid-dataeditor-demos--built-in-search","docsOnly":false,"fileName":"./packages/core/src/docs/examples/built-in-search.stories.tsx"}},"glide-data-grid-dataeditor-demos--cell-activated-event":{"id":"glide-data-grid-dataeditor-demos--cell-activated-event","name":"Cell Activated Event","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/cell-activated-event.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Cell Activated Event","parameters":{"__id":"glide-data-grid-dataeditor-demos--cell-activated-event","docsOnly":false,"fileName":"./packages/core/src/docs/examples/cell-activated-event.stories.tsx"}},"glide-data-grid-dataeditor-demos--column-group-collapse":{"id":"glide-data-grid-dataeditor-demos--column-group-collapse","name":"Column Group Collapse","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/column-group-collapse.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Column Group Collapse","parameters":{"__id":"glide-data-grid-dataeditor-demos--column-group-collapse","docsOnly":false,"fileName":"./packages/core/src/docs/examples/column-group-collapse.stories.tsx"}},"glide-data-grid-dataeditor-demos--column-groups":{"id":"glide-data-grid-dataeditor-demos--column-groups","name":"Column Groups","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/column-groups.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Column Groups","parameters":{"__id":"glide-data-grid-dataeditor-demos--column-groups","docsOnly":false,"fileName":"./packages/core/src/docs/examples/column-groups.stories.tsx"}},"glide-data-grid-dataeditor-demos--content-alignment":{"id":"glide-data-grid-dataeditor-demos--content-alignment","name":"Content Alignment","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/content-alignment.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Content Alignment","parameters":{"__id":"glide-data-grid-dataeditor-demos--content-alignment","docsOnly":false,"fileName":"./packages/core/src/docs/examples/content-alignment.stories.tsx"}},"glide-data-grid-dataeditor-demos--controlled-search":{"id":"glide-data-grid-dataeditor-demos--controlled-search","name":"Controlled Search","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/controlled-search.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Controlled Search","parameters":{"__id":"glide-data-grid-dataeditor-demos--controlled-search","docsOnly":false,"fileName":"./packages/core/src/docs/examples/controlled-search.stories.tsx"}},"glide-data-grid-dataeditor-demos--controlled-selection":{"id":"glide-data-grid-dataeditor-demos--controlled-selection","name":"Controlled Selection","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/controlled-selection.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Controlled Selection","parameters":{"__id":"glide-data-grid-dataeditor-demos--controlled-selection","docsOnly":false,"fileName":"./packages/core/src/docs/examples/controlled-selection.stories.tsx"}},"glide-data-grid-dataeditor-demos--copy-support":{"id":"glide-data-grid-dataeditor-demos--copy-support","name":"Copy Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/copy-support.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Copy Support","parameters":{"__id":"glide-data-grid-dataeditor-demos--copy-support","docsOnly":false,"fileName":"./packages/core/src/docs/examples/copy-support.stories.tsx"}},"glide-data-grid-dataeditor-demos--custom-header-icons":{"id":"glide-data-grid-dataeditor-demos--custom-header-icons","name":"Custom Header Icons","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/custom-header-icons.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Custom Header Icons","parameters":{"__id":"glide-data-grid-dataeditor-demos--custom-header-icons","docsOnly":false,"fileName":"./packages/core/src/docs/examples/custom-header-icons.stories.tsx"}},"glide-data-grid-dataeditor-demos--custom-drawing":{"id":"glide-data-grid-dataeditor-demos--custom-drawing","name":"Custom Drawing","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/custom-header.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Custom Drawing","parameters":{"__id":"glide-data-grid-dataeditor-demos--custom-drawing","docsOnly":false,"fileName":"./packages/core/src/docs/examples/custom-header.stories.tsx"}},"glide-data-grid-dataeditor-demos--drag-source":{"id":"glide-data-grid-dataeditor-demos--drag-source","name":"Drag Source","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/drag-source.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Drag Source","parameters":{"__id":"glide-data-grid-dataeditor-demos--drag-source","docsOnly":false,"fileName":"./packages/core/src/docs/examples/drag-source.stories.tsx"}},"glide-data-grid-dataeditor-demos--drop-events":{"id":"glide-data-grid-dataeditor-demos--drop-events","name":"Drop Events","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/drop-events.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Drop Events","parameters":{"__id":"glide-data-grid-dataeditor-demos--drop-events","docsOnly":false,"fileName":"./packages/core/src/docs/examples/drop-events.stories.tsx"}},"glide-data-grid-dataeditor-demos--fill-handle":{"id":"glide-data-grid-dataeditor-demos--fill-handle","name":"Fill Handle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/fill-handle.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Fill Handle","parameters":{"__id":"glide-data-grid-dataeditor-demos--fill-handle","docsOnly":false,"fileName":"./packages/core/src/docs/examples/fill-handle.stories.tsx"}},"glide-data-grid-dataeditor-demos--freeze-columns":{"id":"glide-data-grid-dataeditor-demos--freeze-columns","name":"Freeze Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/freeze-columns.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Freeze Columns","parameters":{"__id":"glide-data-grid-dataeditor-demos--freeze-columns","docsOnly":false,"fileName":"./packages/core/src/docs/examples/freeze-columns.stories.tsx"}},"glide-data-grid-dataeditor-demos--freeze-rows":{"id":"glide-data-grid-dataeditor-demos--freeze-rows","name":"Freeze Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/freeze-rows.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Freeze Rows","parameters":{"__id":"glide-data-grid-dataeditor-demos--freeze-rows","docsOnly":false,"fileName":"./packages/core/src/docs/examples/freeze-rows.stories.tsx"}},"glide-data-grid-dataeditor-demos--header-menus":{"id":"glide-data-grid-dataeditor-demos--header-menus","name":"Header Menus","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/header-menus.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Header Menus","parameters":{"__id":"glide-data-grid-dataeditor-demos--header-menus","docsOnly":false,"fileName":"./packages/core/src/docs/examples/header-menus.stories.tsx"}},"glide-data-grid-dataeditor-demos--highlight-cells":{"id":"glide-data-grid-dataeditor-demos--highlight-cells","name":"Highlight Cells","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/highlight-cells.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Highlight Cells","parameters":{"__id":"glide-data-grid-dataeditor-demos--highlight-cells","docsOnly":false,"fileName":"./packages/core/src/docs/examples/highlight-cells.stories.tsx"}},"glide-data-grid-dataeditor-demos--imperative-scroll":{"id":"glide-data-grid-dataeditor-demos--imperative-scroll","name":"Imperative Scroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/imperative-scroll.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Imperative Scroll","parameters":{"__id":"glide-data-grid-dataeditor-demos--imperative-scroll","docsOnly":false,"fileName":"./packages/core/src/docs/examples/imperative-scroll.stories.tsx"}},"glide-data-grid-dataeditor-demos--input-blending":{"id":"glide-data-grid-dataeditor-demos--input-blending","name":"Input Blending","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/input-blending.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Input Blending","parameters":{"__id":"glide-data-grid-dataeditor-demos--input-blending","docsOnly":false,"fileName":"./packages/core/src/docs/examples/input-blending.stories.tsx"}},"glide-data-grid-dataeditor-demos--custom-keybindings":{"id":"glide-data-grid-dataeditor-demos--custom-keybindings","name":"Custom Keybindings","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/keybindings.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Custom Keybindings","parameters":{"__id":"glide-data-grid-dataeditor-demos--custom-keybindings","docsOnly":false,"fileName":"./packages/core/src/docs/examples/keybindings.stories.tsx"}},"glide-data-grid-dataeditor-demos--layout-integration":{"id":"glide-data-grid-dataeditor-demos--layout-integration","name":"Layout Integration","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/layout-integration.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Layout Integration","parameters":{"__id":"glide-data-grid-dataeditor-demos--layout-integration","docsOnly":false,"fileName":"./packages/core/src/docs/examples/layout-integration.stories.tsx"}},"glide-data-grid-dataeditor-demos--multi-select-columns":{"id":"glide-data-grid-dataeditor-demos--multi-select-columns","name":"Multi Select Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/multi-select-columns.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Multi Select Columns","parameters":{"__id":"glide-data-grid-dataeditor-demos--multi-select-columns","docsOnly":false,"fileName":"./packages/core/src/docs/examples/multi-select-columns.stories.tsx"}},"glide-data-grid-dataeditor-demos--new-column-button":{"id":"glide-data-grid-dataeditor-demos--new-column-button","name":"New Column Button","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/new-column-button.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"New Column Button","parameters":{"__id":"glide-data-grid-dataeditor-demos--new-column-button","docsOnly":false,"fileName":"./packages/core/src/docs/examples/new-column-button.stories.tsx"}},"glide-data-grid-dataeditor-demos--obscured-data-grid":{"id":"glide-data-grid-dataeditor-demos--obscured-data-grid","name":"Obscured Data Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/obscured-grid.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Obscured Data Grid","parameters":{"__id":"glide-data-grid-dataeditor-demos--obscured-data-grid","docsOnly":false,"fileName":"./packages/core/src/docs/examples/obscured-grid.stories.tsx"}},"glide-data-grid-dataeditor-demos--observe-visible-region":{"id":"glide-data-grid-dataeditor-demos--observe-visible-region","name":"Observe Visible Region","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/observe-visible-region.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Observe Visible Region","parameters":{"__id":"glide-data-grid-dataeditor-demos--observe-visible-region","docsOnly":false,"fileName":"./packages/core/src/docs/examples/observe-visible-region.stories.tsx"}},"glide-data-grid-dataeditor-demos--one-hundred-thousand-cols":{"id":"glide-data-grid-dataeditor-demos--one-hundred-thousand-cols","name":"One Hundred Thousand Cols","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/one-hundred-thousand-columns.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"One Hundred Thousand Cols","parameters":{"__id":"glide-data-grid-dataeditor-demos--one-hundred-thousand-cols","docsOnly":false,"fileName":"./packages/core/src/docs/examples/one-hundred-thousand-columns.stories.tsx"}},"glide-data-grid-dataeditor-demos--one-million-rows":{"id":"glide-data-grid-dataeditor-demos--one-million-rows","name":"One Million Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/one-million-rows.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"One Million Rows","parameters":{"__id":"glide-data-grid-dataeditor-demos--one-million-rows","docsOnly":false,"fileName":"./packages/core/src/docs/examples/one-million-rows.stories.tsx"}},"glide-data-grid-dataeditor-demos--overscroll":{"id":"glide-data-grid-dataeditor-demos--overscroll","name":"Overscroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/overscroll.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Overscroll","parameters":{"__id":"glide-data-grid-dataeditor-demos--overscroll","docsOnly":false,"fileName":"./packages/core/src/docs/examples/overscroll.stories.tsx"}},"glide-data-grid-dataeditor-demos--padding":{"id":"glide-data-grid-dataeditor-demos--padding","name":"Padding","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/padding.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Padding","parameters":{"__id":"glide-data-grid-dataeditor-demos--padding","docsOnly":false,"fileName":"./packages/core/src/docs/examples/padding.stories.tsx"}},"glide-data-grid-dataeditor-demos--paste-support":{"id":"glide-data-grid-dataeditor-demos--paste-support","name":"Paste Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/paste-support.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Paste Support","parameters":{"__id":"glide-data-grid-dataeditor-demos--paste-support","docsOnly":false,"fileName":"./packages/core/src/docs/examples/paste-support.stories.tsx"}},"glide-data-grid-dataeditor-demos--prevent-diagonal-scroll":{"id":"glide-data-grid-dataeditor-demos--prevent-diagonal-scroll","name":"Prevent Diagonal Scroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/prevent-diagonal-scroll.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Prevent Diagonal Scroll","parameters":{"__id":"glide-data-grid-dataeditor-demos--prevent-diagonal-scroll","docsOnly":false,"fileName":"./packages/core/src/docs/examples/prevent-diagonal-scroll.stories.tsx"}},"glide-data-grid-dataeditor-demos--rapid-updates":{"id":"glide-data-grid-dataeditor-demos--rapid-updates","name":"Rapid Updates","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/rapid-updates.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Rapid Updates","parameters":{"__id":"glide-data-grid-dataeditor-demos--rapid-updates","docsOnly":false,"fileName":"./packages/core/src/docs/examples/rapid-updates.stories.tsx"}},"glide-data-grid-dataeditor-demos--rearrange-columns":{"id":"glide-data-grid-dataeditor-demos--rearrange-columns","name":"Rearrange Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/rearrange-columns.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Rearrange Columns","parameters":{"__id":"glide-data-grid-dataeditor-demos--rearrange-columns","docsOnly":false,"fileName":"./packages/core/src/docs/examples/rearrange-columns.stories.tsx"}},"glide-data-grid-dataeditor-demos--reorder-rows":{"id":"glide-data-grid-dataeditor-demos--reorder-rows","name":"Reorder Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/reorder-rows.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Reorder Rows","parameters":{"__id":"glide-data-grid-dataeditor-demos--reorder-rows","docsOnly":false,"fileName":"./packages/core/src/docs/examples/reorder-rows.stories.tsx"}},"glide-data-grid-dataeditor-demos--resizable-columns":{"id":"glide-data-grid-dataeditor-demos--resizable-columns","name":"Resizable Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/resizable-columns.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Resizable Columns","parameters":{"__id":"glide-data-grid-dataeditor-demos--resizable-columns","docsOnly":false,"fileName":"./packages/core/src/docs/examples/resizable-columns.stories.tsx"}},"glide-data-grid-dataeditor-demos--right-element":{"id":"glide-data-grid-dataeditor-demos--right-element","name":"Right Element","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/right-element.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Right Element","parameters":{"__id":"glide-data-grid-dataeditor-demos--right-element","docsOnly":false,"fileName":"./packages/core/src/docs/examples/right-element.stories.tsx"}},"glide-data-grid-dataeditor-demos--right-to-left":{"id":"glide-data-grid-dataeditor-demos--right-to-left","name":"Right To Left","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/right-to-left.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Right To Left","parameters":{"__id":"glide-data-grid-dataeditor-demos--right-to-left","docsOnly":false,"fileName":"./packages/core/src/docs/examples/right-to-left.stories.tsx"}},"glide-data-grid-dataeditor-demos--row-and-header-sizes":{"id":"glide-data-grid-dataeditor-demos--row-and-header-sizes","name":"Row And Header Sizes","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-and-header-sizes.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Row And Header Sizes","parameters":{"__id":"glide-data-grid-dataeditor-demos--row-and-header-sizes","docsOnly":false,"fileName":"./packages/core/src/docs/examples/row-and-header-sizes.stories.tsx"}},"glide-data-grid-dataeditor-demos--row-grouping":{"id":"glide-data-grid-dataeditor-demos--row-grouping","name":"Row Grouping","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-grouping.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Row Grouping","parameters":{"__id":"glide-data-grid-dataeditor-demos--row-grouping","docsOnly":false,"fileName":"./packages/core/src/docs/examples/row-grouping.stories.tsx"}},"glide-data-grid-dataeditor-demos--row-hover":{"id":"glide-data-grid-dataeditor-demos--row-hover","name":"Row Hover","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-hover.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Row Hover","parameters":{"__id":"glide-data-grid-dataeditor-demos--row-hover","docsOnly":false,"fileName":"./packages/core/src/docs/examples/row-hover.stories.tsx"}},"glide-data-grid-dataeditor-demos--row-markers":{"id":"glide-data-grid-dataeditor-demos--row-markers","name":"Row Markers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-markers.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Row Markers","parameters":{"__id":"glide-data-grid-dataeditor-demos--row-markers","docsOnly":false,"fileName":"./packages/core/src/docs/examples/row-markers.stories.tsx"}},"glide-data-grid-dataeditor-demos--scaled-view":{"id":"glide-data-grid-dataeditor-demos--scaled-view","name":"Scaled View","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/scaled-view.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Scaled View","parameters":{"__id":"glide-data-grid-dataeditor-demos--scaled-view","docsOnly":false,"fileName":"./packages/core/src/docs/examples/scaled-view.stories.tsx"}},"glide-data-grid-dataeditor-demos--scroll-shadows":{"id":"glide-data-grid-dataeditor-demos--scroll-shadows","name":"Scroll Shadows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/scroll-shadows.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Scroll Shadows","parameters":{"__id":"glide-data-grid-dataeditor-demos--scroll-shadows","docsOnly":false,"fileName":"./packages/core/src/docs/examples/scroll-shadows.stories.tsx"}},"glide-data-grid-dataeditor-demos--search-as-filter":{"id":"glide-data-grid-dataeditor-demos--search-as-filter","name":"Search As Filter","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/search-as-filter.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Search As Filter","parameters":{"__id":"glide-data-grid-dataeditor-demos--search-as-filter","docsOnly":false,"fileName":"./packages/core/src/docs/examples/search-as-filter.stories.tsx"}},"glide-data-grid-dataeditor-demos--server-side-data":{"id":"glide-data-grid-dataeditor-demos--server-side-data","name":"Server Side Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/server-side-data.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Server Side Data","parameters":{"__id":"glide-data-grid-dataeditor-demos--server-side-data","docsOnly":false,"fileName":"./packages/core/src/docs/examples/server-side-data.stories.tsx"}},"glide-data-grid-dataeditor-demos--shadow-dom":{"id":"glide-data-grid-dataeditor-demos--shadow-dom","name":"Shadow DOM","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/shadow-dom.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Shadow DOM","parameters":{"__id":"glide-data-grid-dataeditor-demos--shadow-dom","docsOnly":false,"fileName":"./packages/core/src/docs/examples/shadow-dom.stories.tsx"}},"glide-data-grid-dataeditor-demos--silly-numbers":{"id":"glide-data-grid-dataeditor-demos--silly-numbers","name":"Silly Numbers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/silly-numbers.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Silly Numbers","parameters":{"__id":"glide-data-grid-dataeditor-demos--silly-numbers","docsOnly":false,"fileName":"./packages/core/src/docs/examples/silly-numbers.stories.tsx"}},"glide-data-grid-dataeditor-demos--small-editable-grid":{"id":"glide-data-grid-dataeditor-demos--small-editable-grid","name":"Small Editable Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/small-editable-grid.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Small Editable Grid","parameters":{"__id":"glide-data-grid-dataeditor-demos--small-editable-grid","docsOnly":false,"fileName":"./packages/core/src/docs/examples/small-editable-grid.stories.tsx"}},"glide-data-grid-dataeditor-demos--smooth-scrolling-grid":{"id":"glide-data-grid-dataeditor-demos--smooth-scrolling-grid","name":"Smooth Scrolling Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/smooth-scrolling-grid.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Smooth Scrolling Grid","parameters":{"__id":"glide-data-grid-dataeditor-demos--smooth-scrolling-grid","docsOnly":false,"fileName":"./packages/core/src/docs/examples/smooth-scrolling-grid.stories.tsx"}},"glide-data-grid-dataeditor-demos--span-cell":{"id":"glide-data-grid-dataeditor-demos--span-cell","name":"Span Cell","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/span-cell.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Span Cell","parameters":{"__id":"glide-data-grid-dataeditor-demos--span-cell","docsOnly":false,"fileName":"./packages/core/src/docs/examples/span-cell.stories.tsx"}},"glide-data-grid-dataeditor-demos--stretch-column-size":{"id":"glide-data-grid-dataeditor-demos--stretch-column-size","name":"Stretch Column Size","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/stretch-column-size.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Stretch Column Size","parameters":{"__id":"glide-data-grid-dataeditor-demos--stretch-column-size","docsOnly":false,"fileName":"./packages/core/src/docs/examples/stretch-column-size.stories.tsx"}},"glide-data-grid-dataeditor-demos--ten-million-cells":{"id":"glide-data-grid-dataeditor-demos--ten-million-cells","name":"Ten Million Cells","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/ten-million-cells.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Ten Million Cells","parameters":{"__id":"glide-data-grid-dataeditor-demos--ten-million-cells","docsOnly":false,"fileName":"./packages/core/src/docs/examples/ten-million-cells.stories.tsx"}},"glide-data-grid-dataeditor-demos--theme-per-column":{"id":"glide-data-grid-dataeditor-demos--theme-per-column","name":"Theme Per Column","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-per-column.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Theme Per Column","parameters":{"__id":"glide-data-grid-dataeditor-demos--theme-per-column","docsOnly":false,"fileName":"./packages/core/src/docs/examples/theme-per-column.stories.tsx"}},"glide-data-grid-dataeditor-demos--theme-per-row":{"id":"glide-data-grid-dataeditor-demos--theme-per-row","name":"Theme Per Row","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-per-row.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Theme Per Row","parameters":{"__id":"glide-data-grid-dataeditor-demos--theme-per-row","docsOnly":false,"fileName":"./packages/core/src/docs/examples/theme-per-row.stories.tsx"}},"glide-data-grid-dataeditor-demos--theme-support":{"id":"glide-data-grid-dataeditor-demos--theme-support","name":"Theme Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-support.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Theme Support","parameters":{"__id":"glide-data-grid-dataeditor-demos--theme-support","docsOnly":false,"fileName":"./packages/core/src/docs/examples/theme-support.stories.tsx"}},"glide-data-grid-dataeditor-demos--tooltips":{"id":"glide-data-grid-dataeditor-demos--tooltips","name":"Tooltips","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/tooltips.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Tooltips","parameters":{"__id":"glide-data-grid-dataeditor-demos--tooltips","docsOnly":false,"fileName":"./packages/core/src/docs/examples/tooltips.stories.tsx"}},"glide-data-grid-dataeditor-demos--trailing-row-options":{"id":"glide-data-grid-dataeditor-demos--trailing-row-options","name":"Trailing Row Options","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/trailing-row-options.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Trailing Row Options","parameters":{"__id":"glide-data-grid-dataeditor-demos--trailing-row-options","docsOnly":false,"fileName":"./packages/core/src/docs/examples/trailing-row-options.stories.tsx"}},"glide-data-grid-dataeditor-demos--uneven-rows":{"id":"glide-data-grid-dataeditor-demos--uneven-rows","name":"Uneven Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/uneven-rows.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Uneven Rows","parameters":{"__id":"glide-data-grid-dataeditor-demos--uneven-rows","docsOnly":false,"fileName":"./packages/core/src/docs/examples/uneven-rows.stories.tsx"}},"glide-data-grid-dataeditor-demos--validate-data":{"id":"glide-data-grid-dataeditor-demos--validate-data","name":"Validate Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/validate-data.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Validate Data","parameters":{"__id":"glide-data-grid-dataeditor-demos--validate-data","docsOnly":false,"fileName":"./packages/core/src/docs/examples/validate-data.stories.tsx"}},"glide-data-grid-dataeditor-demos--wrapping-text":{"id":"glide-data-grid-dataeditor-demos--wrapping-text","name":"Wrapping Text","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/wrapping-text.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Wrapping Text","parameters":{"__id":"glide-data-grid-dataeditor-demos--wrapping-text","docsOnly":false,"fileName":"./packages/core/src/docs/examples/wrapping-text.stories.tsx"}},"glide-data-grid-docs--faq":{"id":"glide-data-grid-docs--faq","name":"FAQ","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/00-faq.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"FAQ","parameters":{"__id":"glide-data-grid-docs--faq","docsOnly":false,"fileName":"./packages/core/src/docs/00-faq.stories.tsx"}},"glide-data-grid-docs--getting-started":{"id":"glide-data-grid-docs--getting-started","name":"Getting Started","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/01-getting-started.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Getting Started","parameters":{"__id":"glide-data-grid-docs--getting-started","docsOnly":false,"fileName":"./packages/core/src/docs/01-getting-started.stories.tsx"}},"glide-data-grid-docs--editing-data":{"id":"glide-data-grid-docs--editing-data","name":"Editing Data","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/02-editing-data.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Editing Data","parameters":{"__id":"glide-data-grid-docs--editing-data","docsOnly":false,"fileName":"./packages/core/src/docs/02-editing-data.stories.tsx"}},"glide-data-grid-docs--grid-columns":{"id":"glide-data-grid-docs--grid-columns","name":"Grid Columns","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/03-grid-column.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Grid Columns","parameters":{"__id":"glide-data-grid-docs--grid-columns","docsOnly":false,"fileName":"./packages/core/src/docs/03-grid-column.stories.tsx"}},"glide-data-grid-docs--streaming-data":{"id":"glide-data-grid-docs--streaming-data","name":"Streaming Data","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/04-streaming-data.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Streaming Data","parameters":{"__id":"glide-data-grid-docs--streaming-data","docsOnly":false,"fileName":"./packages/core/src/docs/04-streaming-data.stories.tsx"}},"glide-data-grid-docs--search":{"id":"glide-data-grid-docs--search","name":"Search","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/06-search.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Search","parameters":{"__id":"glide-data-grid-docs--search","docsOnly":false,"fileName":"./packages/core/src/docs/06-search.stories.tsx"}},"glide-data-grid-docs--column-grouping":{"id":"glide-data-grid-docs--column-grouping","name":"Column Grouping","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/07-column-grouping.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Column Grouping","parameters":{"__id":"glide-data-grid-docs--column-grouping","docsOnly":false,"fileName":"./packages/core/src/docs/07-column-grouping.stories.tsx"}},"glide-data-grid-docs--theming":{"id":"glide-data-grid-docs--theming","name":"Theming","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/08-theming.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Theming","parameters":{"__id":"glide-data-grid-docs--theming","docsOnly":false,"fileName":"./packages/core/src/docs/08-theming.stories.tsx"}},"glide-data-grid-docs--menus":{"id":"glide-data-grid-docs--menus","name":"Menus","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/09-menus.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Menus","parameters":{"__id":"glide-data-grid-docs--menus","docsOnly":false,"fileName":"./packages/core/src/docs/09-menus.stories.tsx"}},"extra-packages-cells--custom-cells":{"id":"extra-packages-cells--custom-cells","name":"Custom Cells","title":"Extra Packages/Cells","importPath":"./packages/cells/src/cell.stories.tsx","tags":["story"],"kind":"Extra Packages/Cells","story":"Custom Cells","parameters":{"__id":"extra-packages-cells--custom-cells","docsOnly":false,"fileName":"./packages/cells/src/cell.stories.tsx"}},"extra-packages-cells--custom-cell-editing":{"id":"extra-packages-cells--custom-cell-editing","name":"Custom Cell Editing","title":"Extra Packages/Cells","importPath":"./packages/cells/src/cell.stories.tsx","tags":["story"],"kind":"Extra Packages/Cells","story":"Custom Cell Editing","parameters":{"__id":"extra-packages-cells--custom-cell-editing","docsOnly":false,"fileName":"./packages/cells/src/cell.stories.tsx"}},"extra-packages-source--more-info":{"id":"extra-packages-source--more-info","name":"More Info","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"],"kind":"Extra Packages/Source","story":"More Info","parameters":{"__id":"extra-packages-source--more-info","docsOnly":false,"fileName":"./packages/source/src/stories/use-data-source.stories.tsx"}},"extra-packages-source--use-data-source":{"id":"extra-packages-source--use-data-source","name":"Use Data Source","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"],"kind":"Extra Packages/Source","story":"Use Data Source","parameters":{"__id":"extra-packages-source--use-data-source","docsOnly":false,"fileName":"./packages/source/src/stories/use-data-source.stories.tsx"}},"extra-packages-source--undo-redo":{"id":"extra-packages-source--undo-redo","name":"Undo Redo","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"],"kind":"Extra Packages/Source","story":"Undo Redo","parameters":{"__id":"extra-packages-source--undo-redo","docsOnly":false,"fileName":"./packages/source/src/stories/use-data-source.stories.tsx"}},"subcomponents-datagrid--simplenotest":{"id":"subcomponents-datagrid--simplenotest","name":"Simplenotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"],"kind":"Subcomponents/DataGrid","story":"Simplenotest","parameters":{"__id":"subcomponents-datagrid--simplenotest","docsOnly":false,"fileName":"./packages/core/src/internal/data-grid/data-grid.stories.tsx"}},"subcomponents-datagrid--selected-cellnotest":{"id":"subcomponents-datagrid--selected-cellnotest","name":"Selected Cellnotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"],"kind":"Subcomponents/DataGrid","story":"Selected Cellnotest","parameters":{"__id":"subcomponents-datagrid--selected-cellnotest","docsOnly":false,"fileName":"./packages/core/src/internal/data-grid/data-grid.stories.tsx"}},"subcomponents-datagrid--selected-rownotest":{"id":"subcomponents-datagrid--selected-rownotest","name":"Selected Rownotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"],"kind":"Subcomponents/DataGrid","story":"Selected Rownotest","parameters":{"__id":"subcomponents-datagrid--selected-rownotest","docsOnly":false,"fileName":"./packages/core/src/internal/data-grid/data-grid.stories.tsx"}},"subcomponents-datagrid--selected-columnnotest":{"id":"subcomponents-datagrid--selected-columnnotest","name":"Selected Columnnotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"],"kind":"Subcomponents/DataGrid","story":"Selected Columnnotest","parameters":{"__id":"subcomponents-datagrid--selected-columnnotest","docsOnly":false,"fileName":"./packages/core/src/internal/data-grid/data-grid.stories.tsx"}},"subcomponents-scrollingdatagrid--simplenotest":{"id":"subcomponents-scrollingdatagrid--simplenotest","name":"Simplenotest","title":"Subcomponents/ScrollingDataGrid","importPath":"./packages/core/src/internal/scrolling-data-grid/scrolling-data-grid.stories.tsx","tags":["story"],"kind":"Subcomponents/ScrollingDataGrid","story":"Simplenotest","parameters":{"__id":"subcomponents-scrollingdatagrid--simplenotest","docsOnly":false,"fileName":"./packages/core/src/internal/scrolling-data-grid/scrolling-data-grid.stories.tsx"}},"tests-testcases--simplenotest":{"id":"tests-testcases--simplenotest","name":"Simplenotest","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Simplenotest","parameters":{"__id":"tests-testcases--simplenotest","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--relation-column":{"id":"tests-testcases--relation-column","name":"Relation Column","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Relation Column","parameters":{"__id":"tests-testcases--relation-column","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--minimal":{"id":"tests-testcases--minimal","name":"Minimal","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Minimal","parameters":{"__id":"tests-testcases--minimal","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--smooth":{"id":"tests-testcases--smooth","name":"Smooth","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Smooth","parameters":{"__id":"tests-testcases--smooth","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--manual-control":{"id":"tests-testcases--manual-control","name":"Manual Control","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Manual Control","parameters":{"__id":"tests-testcases--manual-control","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--draggable":{"id":"tests-testcases--draggable","name":"Draggable","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Draggable","parameters":{"__id":"tests-testcases--draggable","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--ideal-size":{"id":"tests-testcases--ideal-size","name":"Ideal Size","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Ideal Size","parameters":{"__id":"tests-testcases--ideal-size","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--dynamic-add-remove-columns":{"id":"tests-testcases--dynamic-add-remove-columns","name":"Dynamic Add Remove Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Dynamic Add Remove Columns","parameters":{"__id":"tests-testcases--dynamic-add-remove-columns","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--grid-selection-out-of-range-no-columns":{"id":"tests-testcases--grid-selection-out-of-range-no-columns","name":"Grid Selection Out Of Range No Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Grid Selection Out Of Range No Columns","parameters":{"__id":"tests-testcases--grid-selection-out-of-range-no-columns","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--resizable-columns":{"id":"tests-testcases--resizable-columns","name":"Resizable Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Resizable Columns","parameters":{"__id":"tests-testcases--resizable-columns","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--grid-selection-out-of-range-less-columns-than-selection":{"id":"tests-testcases--grid-selection-out-of-range-less-columns-than-selection","name":"Grid Selection Out Of Range Less Columns Than Selection","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Grid Selection Out Of Range Less Columns Than Selection","parameters":{"__id":"tests-testcases--grid-selection-out-of-range-less-columns-than-selection","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--grid-add-new-rows":{"id":"tests-testcases--grid-add-new-rows","name":"Grid Add New Rows","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Grid Add New Rows","parameters":{"__id":"tests-testcases--grid-add-new-rows","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--grid-no-trailing-blank-row":{"id":"tests-testcases--grid-no-trailing-blank-row","name":"Grid No Trailing Blank Row","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Grid No Trailing Blank Row","parameters":{"__id":"tests-testcases--grid-no-trailing-blank-row","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--markdown-edits":{"id":"tests-testcases--markdown-edits","name":"Markdown Edits","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Markdown Edits","parameters":{"__id":"tests-testcases--markdown-edits","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--can-edit-boolean":{"id":"tests-testcases--can-edit-boolean","name":"Can Edit Boolean","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Can Edit Boolean","parameters":{"__id":"tests-testcases--can-edit-boolean","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--simple-editable":{"id":"tests-testcases--simple-editable","name":"Simple Editable","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Simple Editable","parameters":{"__id":"tests-testcases--simple-editable","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases-bugs--bug-70":{"id":"tests-testcases-bugs--bug-70","name":"Bug 70","title":"Tests/TestCases/Bugs","importPath":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx","tags":["story"],"kind":"Tests/TestCases/Bugs","story":"Bug 70","parameters":{"__id":"tests-testcases-bugs--bug-70","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx"}},"tests-testcases-bugs--filter-columns":{"id":"tests-testcases-bugs--filter-columns","name":"Filter Columns","title":"Tests/TestCases/Bugs","importPath":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx","tags":["story"],"kind":"Tests/TestCases/Bugs","story":"Filter Columns","parameters":{"__id":"tests-testcases-bugs--filter-columns","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx"}}}} +{"v":3,"stories":{"glide-data-grid-dataeditor-demos--add-columns":{"id":"glide-data-grid-dataeditor-demos--add-columns","name":"Add Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-column.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Add Columns","parameters":{"__id":"glide-data-grid-dataeditor-demos--add-columns","docsOnly":false,"fileName":"./packages/core/src/docs/examples/add-column.stories.tsx"}},"glide-data-grid-dataeditor-demos--add-data-to-middle":{"id":"glide-data-grid-dataeditor-demos--add-data-to-middle","name":"Add Data To Middle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data-to-middle.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Add Data To Middle","parameters":{"__id":"glide-data-grid-dataeditor-demos--add-data-to-middle","docsOnly":false,"fileName":"./packages/core/src/docs/examples/add-data-to-middle.stories.tsx"}},"glide-data-grid-dataeditor-demos--add-data-to-top":{"id":"glide-data-grid-dataeditor-demos--add-data-to-top","name":"Add Data To Top","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data-to-top.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Add Data To Top","parameters":{"__id":"glide-data-grid-dataeditor-demos--add-data-to-top","docsOnly":false,"fileName":"./packages/core/src/docs/examples/add-data-to-top.stories.tsx"}},"glide-data-grid-dataeditor-demos--add-data":{"id":"glide-data-grid-dataeditor-demos--add-data","name":"Add Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/add-data.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Add Data","parameters":{"__id":"glide-data-grid-dataeditor-demos--add-data","docsOnly":false,"fileName":"./packages/core/src/docs/examples/add-data.stories.tsx"}},"glide-data-grid-dataeditor-demos--all-cell-kinds":{"id":"glide-data-grid-dataeditor-demos--all-cell-kinds","name":"All Cell Kinds","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/all-cell-kinds.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"All Cell Kinds","parameters":{"__id":"glide-data-grid-dataeditor-demos--all-cell-kinds","docsOnly":false,"fileName":"./packages/core/src/docs/examples/all-cell-kinds.stories.tsx"}},"glide-data-grid-dataeditor-demos--append-row-handle":{"id":"glide-data-grid-dataeditor-demos--append-row-handle","name":"Append Row Handle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/append-row-handle.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Append Row Handle","parameters":{"__id":"glide-data-grid-dataeditor-demos--append-row-handle","docsOnly":false,"fileName":"./packages/core/src/docs/examples/append-row-handle.stories.tsx"}},"glide-data-grid-dataeditor-demos--automatic-row-markers":{"id":"glide-data-grid-dataeditor-demos--automatic-row-markers","name":"Automatic Row Markers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/automatic-row-markers.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Automatic Row Markers","parameters":{"__id":"glide-data-grid-dataeditor-demos--automatic-row-markers","docsOnly":false,"fileName":"./packages/core/src/docs/examples/automatic-row-markers.stories.tsx"}},"glide-data-grid-dataeditor-demos--built-in-search":{"id":"glide-data-grid-dataeditor-demos--built-in-search","name":"Built In Search","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/built-in-search.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Built In Search","parameters":{"__id":"glide-data-grid-dataeditor-demos--built-in-search","docsOnly":false,"fileName":"./packages/core/src/docs/examples/built-in-search.stories.tsx"}},"glide-data-grid-dataeditor-demos--cell-activated-event":{"id":"glide-data-grid-dataeditor-demos--cell-activated-event","name":"Cell Activated Event","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/cell-activated-event.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Cell Activated Event","parameters":{"__id":"glide-data-grid-dataeditor-demos--cell-activated-event","docsOnly":false,"fileName":"./packages/core/src/docs/examples/cell-activated-event.stories.tsx"}},"glide-data-grid-dataeditor-demos--column-group-collapse":{"id":"glide-data-grid-dataeditor-demos--column-group-collapse","name":"Column Group Collapse","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/column-group-collapse.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Column Group Collapse","parameters":{"__id":"glide-data-grid-dataeditor-demos--column-group-collapse","docsOnly":false,"fileName":"./packages/core/src/docs/examples/column-group-collapse.stories.tsx"}},"glide-data-grid-dataeditor-demos--column-groups":{"id":"glide-data-grid-dataeditor-demos--column-groups","name":"Column Groups","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/column-groups.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Column Groups","parameters":{"__id":"glide-data-grid-dataeditor-demos--column-groups","docsOnly":false,"fileName":"./packages/core/src/docs/examples/column-groups.stories.tsx"}},"glide-data-grid-dataeditor-demos--content-alignment":{"id":"glide-data-grid-dataeditor-demos--content-alignment","name":"Content Alignment","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/content-alignment.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Content Alignment","parameters":{"__id":"glide-data-grid-dataeditor-demos--content-alignment","docsOnly":false,"fileName":"./packages/core/src/docs/examples/content-alignment.stories.tsx"}},"glide-data-grid-dataeditor-demos--controlled-search":{"id":"glide-data-grid-dataeditor-demos--controlled-search","name":"Controlled Search","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/controlled-search.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Controlled Search","parameters":{"__id":"glide-data-grid-dataeditor-demos--controlled-search","docsOnly":false,"fileName":"./packages/core/src/docs/examples/controlled-search.stories.tsx"}},"glide-data-grid-dataeditor-demos--controlled-selection":{"id":"glide-data-grid-dataeditor-demos--controlled-selection","name":"Controlled Selection","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/controlled-selection.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Controlled Selection","parameters":{"__id":"glide-data-grid-dataeditor-demos--controlled-selection","docsOnly":false,"fileName":"./packages/core/src/docs/examples/controlled-selection.stories.tsx"}},"glide-data-grid-dataeditor-demos--copy-support":{"id":"glide-data-grid-dataeditor-demos--copy-support","name":"Copy Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/copy-support.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Copy Support","parameters":{"__id":"glide-data-grid-dataeditor-demos--copy-support","docsOnly":false,"fileName":"./packages/core/src/docs/examples/copy-support.stories.tsx"}},"glide-data-grid-dataeditor-demos--custom-header-icons":{"id":"glide-data-grid-dataeditor-demos--custom-header-icons","name":"Custom Header Icons","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/custom-header-icons.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Custom Header Icons","parameters":{"__id":"glide-data-grid-dataeditor-demos--custom-header-icons","docsOnly":false,"fileName":"./packages/core/src/docs/examples/custom-header-icons.stories.tsx"}},"glide-data-grid-dataeditor-demos--custom-drawing":{"id":"glide-data-grid-dataeditor-demos--custom-drawing","name":"Custom Drawing","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/custom-header.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Custom Drawing","parameters":{"__id":"glide-data-grid-dataeditor-demos--custom-drawing","docsOnly":false,"fileName":"./packages/core/src/docs/examples/custom-header.stories.tsx"}},"glide-data-grid-dataeditor-demos--drag-source":{"id":"glide-data-grid-dataeditor-demos--drag-source","name":"Drag Source","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/drag-source.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Drag Source","parameters":{"__id":"glide-data-grid-dataeditor-demos--drag-source","docsOnly":false,"fileName":"./packages/core/src/docs/examples/drag-source.stories.tsx"}},"glide-data-grid-dataeditor-demos--drop-events":{"id":"glide-data-grid-dataeditor-demos--drop-events","name":"Drop Events","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/drop-events.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Drop Events","parameters":{"__id":"glide-data-grid-dataeditor-demos--drop-events","docsOnly":false,"fileName":"./packages/core/src/docs/examples/drop-events.stories.tsx"}},"glide-data-grid-dataeditor-demos--fill-handle":{"id":"glide-data-grid-dataeditor-demos--fill-handle","name":"Fill Handle","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/fill-handle.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Fill Handle","parameters":{"__id":"glide-data-grid-dataeditor-demos--fill-handle","docsOnly":false,"fileName":"./packages/core/src/docs/examples/fill-handle.stories.tsx"}},"glide-data-grid-dataeditor-demos--freeze-columns":{"id":"glide-data-grid-dataeditor-demos--freeze-columns","name":"Freeze Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/freeze-columns.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Freeze Columns","parameters":{"__id":"glide-data-grid-dataeditor-demos--freeze-columns","docsOnly":false,"fileName":"./packages/core/src/docs/examples/freeze-columns.stories.tsx"}},"glide-data-grid-dataeditor-demos--freeze-rows":{"id":"glide-data-grid-dataeditor-demos--freeze-rows","name":"Freeze Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/freeze-rows.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Freeze Rows","parameters":{"__id":"glide-data-grid-dataeditor-demos--freeze-rows","docsOnly":false,"fileName":"./packages/core/src/docs/examples/freeze-rows.stories.tsx"}},"glide-data-grid-dataeditor-demos--header-menus":{"id":"glide-data-grid-dataeditor-demos--header-menus","name":"Header Menus","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/header-menus.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Header Menus","parameters":{"__id":"glide-data-grid-dataeditor-demos--header-menus","docsOnly":false,"fileName":"./packages/core/src/docs/examples/header-menus.stories.tsx"}},"glide-data-grid-dataeditor-demos--highlight-cells":{"id":"glide-data-grid-dataeditor-demos--highlight-cells","name":"Highlight Cells","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/highlight-cells.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Highlight Cells","parameters":{"__id":"glide-data-grid-dataeditor-demos--highlight-cells","docsOnly":false,"fileName":"./packages/core/src/docs/examples/highlight-cells.stories.tsx"}},"glide-data-grid-dataeditor-demos--imperative-scroll":{"id":"glide-data-grid-dataeditor-demos--imperative-scroll","name":"Imperative Scroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/imperative-scroll.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Imperative Scroll","parameters":{"__id":"glide-data-grid-dataeditor-demos--imperative-scroll","docsOnly":false,"fileName":"./packages/core/src/docs/examples/imperative-scroll.stories.tsx"}},"glide-data-grid-dataeditor-demos--input-blending":{"id":"glide-data-grid-dataeditor-demos--input-blending","name":"Input Blending","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/input-blending.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Input Blending","parameters":{"__id":"glide-data-grid-dataeditor-demos--input-blending","docsOnly":false,"fileName":"./packages/core/src/docs/examples/input-blending.stories.tsx"}},"glide-data-grid-dataeditor-demos--custom-keybindings":{"id":"glide-data-grid-dataeditor-demos--custom-keybindings","name":"Custom Keybindings","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/keybindings.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Custom Keybindings","parameters":{"__id":"glide-data-grid-dataeditor-demos--custom-keybindings","docsOnly":false,"fileName":"./packages/core/src/docs/examples/keybindings.stories.tsx"}},"glide-data-grid-dataeditor-demos--layout-integration":{"id":"glide-data-grid-dataeditor-demos--layout-integration","name":"Layout Integration","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/layout-integration.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Layout Integration","parameters":{"__id":"glide-data-grid-dataeditor-demos--layout-integration","docsOnly":false,"fileName":"./packages/core/src/docs/examples/layout-integration.stories.tsx"}},"glide-data-grid-dataeditor-demos--multi-select-columns":{"id":"glide-data-grid-dataeditor-demos--multi-select-columns","name":"Multi Select Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/multi-select-columns.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Multi Select Columns","parameters":{"__id":"glide-data-grid-dataeditor-demos--multi-select-columns","docsOnly":false,"fileName":"./packages/core/src/docs/examples/multi-select-columns.stories.tsx"}},"glide-data-grid-dataeditor-demos--new-column-button":{"id":"glide-data-grid-dataeditor-demos--new-column-button","name":"New Column Button","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/new-column-button.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"New Column Button","parameters":{"__id":"glide-data-grid-dataeditor-demos--new-column-button","docsOnly":false,"fileName":"./packages/core/src/docs/examples/new-column-button.stories.tsx"}},"glide-data-grid-dataeditor-demos--obscured-data-grid":{"id":"glide-data-grid-dataeditor-demos--obscured-data-grid","name":"Obscured Data Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/obscured-grid.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Obscured Data Grid","parameters":{"__id":"glide-data-grid-dataeditor-demos--obscured-data-grid","docsOnly":false,"fileName":"./packages/core/src/docs/examples/obscured-grid.stories.tsx"}},"glide-data-grid-dataeditor-demos--observe-visible-region":{"id":"glide-data-grid-dataeditor-demos--observe-visible-region","name":"Observe Visible Region","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/observe-visible-region.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Observe Visible Region","parameters":{"__id":"glide-data-grid-dataeditor-demos--observe-visible-region","docsOnly":false,"fileName":"./packages/core/src/docs/examples/observe-visible-region.stories.tsx"}},"glide-data-grid-dataeditor-demos--one-hundred-thousand-cols":{"id":"glide-data-grid-dataeditor-demos--one-hundred-thousand-cols","name":"One Hundred Thousand Cols","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/one-hundred-thousand-columns.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"One Hundred Thousand Cols","parameters":{"__id":"glide-data-grid-dataeditor-demos--one-hundred-thousand-cols","docsOnly":false,"fileName":"./packages/core/src/docs/examples/one-hundred-thousand-columns.stories.tsx"}},"glide-data-grid-dataeditor-demos--one-million-rows":{"id":"glide-data-grid-dataeditor-demos--one-million-rows","name":"One Million Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/one-million-rows.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"One Million Rows","parameters":{"__id":"glide-data-grid-dataeditor-demos--one-million-rows","docsOnly":false,"fileName":"./packages/core/src/docs/examples/one-million-rows.stories.tsx"}},"glide-data-grid-dataeditor-demos--overscroll":{"id":"glide-data-grid-dataeditor-demos--overscroll","name":"Overscroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/overscroll.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Overscroll","parameters":{"__id":"glide-data-grid-dataeditor-demos--overscroll","docsOnly":false,"fileName":"./packages/core/src/docs/examples/overscroll.stories.tsx"}},"glide-data-grid-dataeditor-demos--padding":{"id":"glide-data-grid-dataeditor-demos--padding","name":"Padding","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/padding.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Padding","parameters":{"__id":"glide-data-grid-dataeditor-demos--padding","docsOnly":false,"fileName":"./packages/core/src/docs/examples/padding.stories.tsx"}},"glide-data-grid-dataeditor-demos--paste-support":{"id":"glide-data-grid-dataeditor-demos--paste-support","name":"Paste Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/paste-support.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Paste Support","parameters":{"__id":"glide-data-grid-dataeditor-demos--paste-support","docsOnly":false,"fileName":"./packages/core/src/docs/examples/paste-support.stories.tsx"}},"glide-data-grid-dataeditor-demos--prevent-diagonal-scroll":{"id":"glide-data-grid-dataeditor-demos--prevent-diagonal-scroll","name":"Prevent Diagonal Scroll","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/prevent-diagonal-scroll.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Prevent Diagonal Scroll","parameters":{"__id":"glide-data-grid-dataeditor-demos--prevent-diagonal-scroll","docsOnly":false,"fileName":"./packages/core/src/docs/examples/prevent-diagonal-scroll.stories.tsx"}},"glide-data-grid-dataeditor-demos--rapid-updates":{"id":"glide-data-grid-dataeditor-demos--rapid-updates","name":"Rapid Updates","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/rapid-updates.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Rapid Updates","parameters":{"__id":"glide-data-grid-dataeditor-demos--rapid-updates","docsOnly":false,"fileName":"./packages/core/src/docs/examples/rapid-updates.stories.tsx"}},"glide-data-grid-dataeditor-demos--rearrange-columns":{"id":"glide-data-grid-dataeditor-demos--rearrange-columns","name":"Rearrange Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/rearrange-columns.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Rearrange Columns","parameters":{"__id":"glide-data-grid-dataeditor-demos--rearrange-columns","docsOnly":false,"fileName":"./packages/core/src/docs/examples/rearrange-columns.stories.tsx"}},"glide-data-grid-dataeditor-demos--reorder-rows":{"id":"glide-data-grid-dataeditor-demos--reorder-rows","name":"Reorder Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/reorder-rows.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Reorder Rows","parameters":{"__id":"glide-data-grid-dataeditor-demos--reorder-rows","docsOnly":false,"fileName":"./packages/core/src/docs/examples/reorder-rows.stories.tsx"}},"glide-data-grid-dataeditor-demos--resizable-columns":{"id":"glide-data-grid-dataeditor-demos--resizable-columns","name":"Resizable Columns","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/resizable-columns.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Resizable Columns","parameters":{"__id":"glide-data-grid-dataeditor-demos--resizable-columns","docsOnly":false,"fileName":"./packages/core/src/docs/examples/resizable-columns.stories.tsx"}},"glide-data-grid-dataeditor-demos--right-element":{"id":"glide-data-grid-dataeditor-demos--right-element","name":"Right Element","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/right-element.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Right Element","parameters":{"__id":"glide-data-grid-dataeditor-demos--right-element","docsOnly":false,"fileName":"./packages/core/src/docs/examples/right-element.stories.tsx"}},"glide-data-grid-dataeditor-demos--right-to-left":{"id":"glide-data-grid-dataeditor-demos--right-to-left","name":"Right To Left","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/right-to-left.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Right To Left","parameters":{"__id":"glide-data-grid-dataeditor-demos--right-to-left","docsOnly":false,"fileName":"./packages/core/src/docs/examples/right-to-left.stories.tsx"}},"glide-data-grid-dataeditor-demos--row-and-header-sizes":{"id":"glide-data-grid-dataeditor-demos--row-and-header-sizes","name":"Row And Header Sizes","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-and-header-sizes.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Row And Header Sizes","parameters":{"__id":"glide-data-grid-dataeditor-demos--row-and-header-sizes","docsOnly":false,"fileName":"./packages/core/src/docs/examples/row-and-header-sizes.stories.tsx"}},"glide-data-grid-dataeditor-demos--row-grouping":{"id":"glide-data-grid-dataeditor-demos--row-grouping","name":"Row Grouping","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-grouping.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Row Grouping","parameters":{"__id":"glide-data-grid-dataeditor-demos--row-grouping","docsOnly":false,"fileName":"./packages/core/src/docs/examples/row-grouping.stories.tsx"}},"glide-data-grid-dataeditor-demos--row-hover":{"id":"glide-data-grid-dataeditor-demos--row-hover","name":"Row Hover","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-hover.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Row Hover","parameters":{"__id":"glide-data-grid-dataeditor-demos--row-hover","docsOnly":false,"fileName":"./packages/core/src/docs/examples/row-hover.stories.tsx"}},"glide-data-grid-dataeditor-demos--row-markers":{"id":"glide-data-grid-dataeditor-demos--row-markers","name":"Row Markers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/row-markers.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Row Markers","parameters":{"__id":"glide-data-grid-dataeditor-demos--row-markers","docsOnly":false,"fileName":"./packages/core/src/docs/examples/row-markers.stories.tsx"}},"glide-data-grid-dataeditor-demos--scaled-view":{"id":"glide-data-grid-dataeditor-demos--scaled-view","name":"Scaled View","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/scaled-view.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Scaled View","parameters":{"__id":"glide-data-grid-dataeditor-demos--scaled-view","docsOnly":false,"fileName":"./packages/core/src/docs/examples/scaled-view.stories.tsx"}},"glide-data-grid-dataeditor-demos--scroll-offset":{"id":"glide-data-grid-dataeditor-demos--scroll-offset","name":"Scroll Offset","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/scroll-offset.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Scroll Offset","parameters":{"__id":"glide-data-grid-dataeditor-demos--scroll-offset","docsOnly":false,"fileName":"./packages/core/src/docs/examples/scroll-offset.stories.tsx"}},"glide-data-grid-dataeditor-demos--scroll-shadows":{"id":"glide-data-grid-dataeditor-demos--scroll-shadows","name":"Scroll Shadows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/scroll-shadows.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Scroll Shadows","parameters":{"__id":"glide-data-grid-dataeditor-demos--scroll-shadows","docsOnly":false,"fileName":"./packages/core/src/docs/examples/scroll-shadows.stories.tsx"}},"glide-data-grid-dataeditor-demos--search-as-filter":{"id":"glide-data-grid-dataeditor-demos--search-as-filter","name":"Search As Filter","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/search-as-filter.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Search As Filter","parameters":{"__id":"glide-data-grid-dataeditor-demos--search-as-filter","docsOnly":false,"fileName":"./packages/core/src/docs/examples/search-as-filter.stories.tsx"}},"glide-data-grid-dataeditor-demos--server-side-data":{"id":"glide-data-grid-dataeditor-demos--server-side-data","name":"Server Side Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/server-side-data.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Server Side Data","parameters":{"__id":"glide-data-grid-dataeditor-demos--server-side-data","docsOnly":false,"fileName":"./packages/core/src/docs/examples/server-side-data.stories.tsx"}},"glide-data-grid-dataeditor-demos--shadow-dom":{"id":"glide-data-grid-dataeditor-demos--shadow-dom","name":"Shadow DOM","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/shadow-dom.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Shadow DOM","parameters":{"__id":"glide-data-grid-dataeditor-demos--shadow-dom","docsOnly":false,"fileName":"./packages/core/src/docs/examples/shadow-dom.stories.tsx"}},"glide-data-grid-dataeditor-demos--silly-numbers":{"id":"glide-data-grid-dataeditor-demos--silly-numbers","name":"Silly Numbers","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/silly-numbers.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Silly Numbers","parameters":{"__id":"glide-data-grid-dataeditor-demos--silly-numbers","docsOnly":false,"fileName":"./packages/core/src/docs/examples/silly-numbers.stories.tsx"}},"glide-data-grid-dataeditor-demos--small-editable-grid":{"id":"glide-data-grid-dataeditor-demos--small-editable-grid","name":"Small Editable Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/small-editable-grid.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Small Editable Grid","parameters":{"__id":"glide-data-grid-dataeditor-demos--small-editable-grid","docsOnly":false,"fileName":"./packages/core/src/docs/examples/small-editable-grid.stories.tsx"}},"glide-data-grid-dataeditor-demos--smooth-scrolling-grid":{"id":"glide-data-grid-dataeditor-demos--smooth-scrolling-grid","name":"Smooth Scrolling Grid","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/smooth-scrolling-grid.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Smooth Scrolling Grid","parameters":{"__id":"glide-data-grid-dataeditor-demos--smooth-scrolling-grid","docsOnly":false,"fileName":"./packages/core/src/docs/examples/smooth-scrolling-grid.stories.tsx"}},"glide-data-grid-dataeditor-demos--span-cell":{"id":"glide-data-grid-dataeditor-demos--span-cell","name":"Span Cell","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/span-cell.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Span Cell","parameters":{"__id":"glide-data-grid-dataeditor-demos--span-cell","docsOnly":false,"fileName":"./packages/core/src/docs/examples/span-cell.stories.tsx"}},"glide-data-grid-dataeditor-demos--stretch-column-size":{"id":"glide-data-grid-dataeditor-demos--stretch-column-size","name":"Stretch Column Size","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/stretch-column-size.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Stretch Column Size","parameters":{"__id":"glide-data-grid-dataeditor-demos--stretch-column-size","docsOnly":false,"fileName":"./packages/core/src/docs/examples/stretch-column-size.stories.tsx"}},"glide-data-grid-dataeditor-demos--ten-million-cells":{"id":"glide-data-grid-dataeditor-demos--ten-million-cells","name":"Ten Million Cells","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/ten-million-cells.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Ten Million Cells","parameters":{"__id":"glide-data-grid-dataeditor-demos--ten-million-cells","docsOnly":false,"fileName":"./packages/core/src/docs/examples/ten-million-cells.stories.tsx"}},"glide-data-grid-dataeditor-demos--theme-per-column":{"id":"glide-data-grid-dataeditor-demos--theme-per-column","name":"Theme Per Column","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-per-column.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Theme Per Column","parameters":{"__id":"glide-data-grid-dataeditor-demos--theme-per-column","docsOnly":false,"fileName":"./packages/core/src/docs/examples/theme-per-column.stories.tsx"}},"glide-data-grid-dataeditor-demos--theme-per-row":{"id":"glide-data-grid-dataeditor-demos--theme-per-row","name":"Theme Per Row","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-per-row.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Theme Per Row","parameters":{"__id":"glide-data-grid-dataeditor-demos--theme-per-row","docsOnly":false,"fileName":"./packages/core/src/docs/examples/theme-per-row.stories.tsx"}},"glide-data-grid-dataeditor-demos--theme-support":{"id":"glide-data-grid-dataeditor-demos--theme-support","name":"Theme Support","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/theme-support.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Theme Support","parameters":{"__id":"glide-data-grid-dataeditor-demos--theme-support","docsOnly":false,"fileName":"./packages/core/src/docs/examples/theme-support.stories.tsx"}},"glide-data-grid-dataeditor-demos--tooltips":{"id":"glide-data-grid-dataeditor-demos--tooltips","name":"Tooltips","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/tooltips.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Tooltips","parameters":{"__id":"glide-data-grid-dataeditor-demos--tooltips","docsOnly":false,"fileName":"./packages/core/src/docs/examples/tooltips.stories.tsx"}},"glide-data-grid-dataeditor-demos--trailing-row-options":{"id":"glide-data-grid-dataeditor-demos--trailing-row-options","name":"Trailing Row Options","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/trailing-row-options.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Trailing Row Options","parameters":{"__id":"glide-data-grid-dataeditor-demos--trailing-row-options","docsOnly":false,"fileName":"./packages/core/src/docs/examples/trailing-row-options.stories.tsx"}},"glide-data-grid-dataeditor-demos--uneven-rows":{"id":"glide-data-grid-dataeditor-demos--uneven-rows","name":"Uneven Rows","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/uneven-rows.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Uneven Rows","parameters":{"__id":"glide-data-grid-dataeditor-demos--uneven-rows","docsOnly":false,"fileName":"./packages/core/src/docs/examples/uneven-rows.stories.tsx"}},"glide-data-grid-dataeditor-demos--validate-data":{"id":"glide-data-grid-dataeditor-demos--validate-data","name":"Validate Data","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/validate-data.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Validate Data","parameters":{"__id":"glide-data-grid-dataeditor-demos--validate-data","docsOnly":false,"fileName":"./packages/core/src/docs/examples/validate-data.stories.tsx"}},"glide-data-grid-dataeditor-demos--wrapping-text":{"id":"glide-data-grid-dataeditor-demos--wrapping-text","name":"Wrapping Text","title":"Glide-Data-Grid/DataEditor Demos","importPath":"./packages/core/src/docs/examples/wrapping-text.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/DataEditor Demos","story":"Wrapping Text","parameters":{"__id":"glide-data-grid-dataeditor-demos--wrapping-text","docsOnly":false,"fileName":"./packages/core/src/docs/examples/wrapping-text.stories.tsx"}},"glide-data-grid-docs--faq":{"id":"glide-data-grid-docs--faq","name":"FAQ","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/00-faq.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"FAQ","parameters":{"__id":"glide-data-grid-docs--faq","docsOnly":false,"fileName":"./packages/core/src/docs/00-faq.stories.tsx"}},"glide-data-grid-docs--getting-started":{"id":"glide-data-grid-docs--getting-started","name":"Getting Started","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/01-getting-started.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Getting Started","parameters":{"__id":"glide-data-grid-docs--getting-started","docsOnly":false,"fileName":"./packages/core/src/docs/01-getting-started.stories.tsx"}},"glide-data-grid-docs--editing-data":{"id":"glide-data-grid-docs--editing-data","name":"Editing Data","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/02-editing-data.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Editing Data","parameters":{"__id":"glide-data-grid-docs--editing-data","docsOnly":false,"fileName":"./packages/core/src/docs/02-editing-data.stories.tsx"}},"glide-data-grid-docs--grid-columns":{"id":"glide-data-grid-docs--grid-columns","name":"Grid Columns","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/03-grid-column.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Grid Columns","parameters":{"__id":"glide-data-grid-docs--grid-columns","docsOnly":false,"fileName":"./packages/core/src/docs/03-grid-column.stories.tsx"}},"glide-data-grid-docs--streaming-data":{"id":"glide-data-grid-docs--streaming-data","name":"Streaming Data","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/04-streaming-data.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Streaming Data","parameters":{"__id":"glide-data-grid-docs--streaming-data","docsOnly":false,"fileName":"./packages/core/src/docs/04-streaming-data.stories.tsx"}},"glide-data-grid-docs--search":{"id":"glide-data-grid-docs--search","name":"Search","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/06-search.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Search","parameters":{"__id":"glide-data-grid-docs--search","docsOnly":false,"fileName":"./packages/core/src/docs/06-search.stories.tsx"}},"glide-data-grid-docs--column-grouping":{"id":"glide-data-grid-docs--column-grouping","name":"Column Grouping","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/07-column-grouping.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Column Grouping","parameters":{"__id":"glide-data-grid-docs--column-grouping","docsOnly":false,"fileName":"./packages/core/src/docs/07-column-grouping.stories.tsx"}},"glide-data-grid-docs--theming":{"id":"glide-data-grid-docs--theming","name":"Theming","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/08-theming.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Theming","parameters":{"__id":"glide-data-grid-docs--theming","docsOnly":false,"fileName":"./packages/core/src/docs/08-theming.stories.tsx"}},"glide-data-grid-docs--menus":{"id":"glide-data-grid-docs--menus","name":"Menus","title":"Glide-Data-Grid/Docs","importPath":"./packages/core/src/docs/09-menus.stories.tsx","tags":["story"],"kind":"Glide-Data-Grid/Docs","story":"Menus","parameters":{"__id":"glide-data-grid-docs--menus","docsOnly":false,"fileName":"./packages/core/src/docs/09-menus.stories.tsx"}},"extra-packages-cells--custom-cells":{"id":"extra-packages-cells--custom-cells","name":"Custom Cells","title":"Extra Packages/Cells","importPath":"./packages/cells/src/cell.stories.tsx","tags":["story"],"kind":"Extra Packages/Cells","story":"Custom Cells","parameters":{"__id":"extra-packages-cells--custom-cells","docsOnly":false,"fileName":"./packages/cells/src/cell.stories.tsx"}},"extra-packages-cells--custom-cell-editing":{"id":"extra-packages-cells--custom-cell-editing","name":"Custom Cell Editing","title":"Extra Packages/Cells","importPath":"./packages/cells/src/cell.stories.tsx","tags":["story"],"kind":"Extra Packages/Cells","story":"Custom Cell Editing","parameters":{"__id":"extra-packages-cells--custom-cell-editing","docsOnly":false,"fileName":"./packages/cells/src/cell.stories.tsx"}},"extra-packages-source--more-info":{"id":"extra-packages-source--more-info","name":"More Info","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"],"kind":"Extra Packages/Source","story":"More Info","parameters":{"__id":"extra-packages-source--more-info","docsOnly":false,"fileName":"./packages/source/src/stories/use-data-source.stories.tsx"}},"extra-packages-source--use-data-source":{"id":"extra-packages-source--use-data-source","name":"Use Data Source","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"],"kind":"Extra Packages/Source","story":"Use Data Source","parameters":{"__id":"extra-packages-source--use-data-source","docsOnly":false,"fileName":"./packages/source/src/stories/use-data-source.stories.tsx"}},"extra-packages-source--undo-redo":{"id":"extra-packages-source--undo-redo","name":"Undo Redo","title":"Extra Packages/Source","importPath":"./packages/source/src/stories/use-data-source.stories.tsx","tags":["story"],"kind":"Extra Packages/Source","story":"Undo Redo","parameters":{"__id":"extra-packages-source--undo-redo","docsOnly":false,"fileName":"./packages/source/src/stories/use-data-source.stories.tsx"}},"subcomponents-datagrid--simplenotest":{"id":"subcomponents-datagrid--simplenotest","name":"Simplenotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"],"kind":"Subcomponents/DataGrid","story":"Simplenotest","parameters":{"__id":"subcomponents-datagrid--simplenotest","docsOnly":false,"fileName":"./packages/core/src/internal/data-grid/data-grid.stories.tsx"}},"subcomponents-datagrid--selected-cellnotest":{"id":"subcomponents-datagrid--selected-cellnotest","name":"Selected Cellnotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"],"kind":"Subcomponents/DataGrid","story":"Selected Cellnotest","parameters":{"__id":"subcomponents-datagrid--selected-cellnotest","docsOnly":false,"fileName":"./packages/core/src/internal/data-grid/data-grid.stories.tsx"}},"subcomponents-datagrid--selected-rownotest":{"id":"subcomponents-datagrid--selected-rownotest","name":"Selected Rownotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"],"kind":"Subcomponents/DataGrid","story":"Selected Rownotest","parameters":{"__id":"subcomponents-datagrid--selected-rownotest","docsOnly":false,"fileName":"./packages/core/src/internal/data-grid/data-grid.stories.tsx"}},"subcomponents-datagrid--selected-columnnotest":{"id":"subcomponents-datagrid--selected-columnnotest","name":"Selected Columnnotest","title":"Subcomponents/DataGrid","importPath":"./packages/core/src/internal/data-grid/data-grid.stories.tsx","tags":["story"],"kind":"Subcomponents/DataGrid","story":"Selected Columnnotest","parameters":{"__id":"subcomponents-datagrid--selected-columnnotest","docsOnly":false,"fileName":"./packages/core/src/internal/data-grid/data-grid.stories.tsx"}},"subcomponents-scrollingdatagrid--simplenotest":{"id":"subcomponents-scrollingdatagrid--simplenotest","name":"Simplenotest","title":"Subcomponents/ScrollingDataGrid","importPath":"./packages/core/src/internal/scrolling-data-grid/scrolling-data-grid.stories.tsx","tags":["story"],"kind":"Subcomponents/ScrollingDataGrid","story":"Simplenotest","parameters":{"__id":"subcomponents-scrollingdatagrid--simplenotest","docsOnly":false,"fileName":"./packages/core/src/internal/scrolling-data-grid/scrolling-data-grid.stories.tsx"}},"tests-testcases--simplenotest":{"id":"tests-testcases--simplenotest","name":"Simplenotest","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Simplenotest","parameters":{"__id":"tests-testcases--simplenotest","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--relation-column":{"id":"tests-testcases--relation-column","name":"Relation Column","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Relation Column","parameters":{"__id":"tests-testcases--relation-column","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--minimal":{"id":"tests-testcases--minimal","name":"Minimal","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Minimal","parameters":{"__id":"tests-testcases--minimal","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--smooth":{"id":"tests-testcases--smooth","name":"Smooth","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Smooth","parameters":{"__id":"tests-testcases--smooth","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--manual-control":{"id":"tests-testcases--manual-control","name":"Manual Control","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Manual Control","parameters":{"__id":"tests-testcases--manual-control","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--draggable":{"id":"tests-testcases--draggable","name":"Draggable","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Draggable","parameters":{"__id":"tests-testcases--draggable","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--ideal-size":{"id":"tests-testcases--ideal-size","name":"Ideal Size","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Ideal Size","parameters":{"__id":"tests-testcases--ideal-size","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--dynamic-add-remove-columns":{"id":"tests-testcases--dynamic-add-remove-columns","name":"Dynamic Add Remove Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Dynamic Add Remove Columns","parameters":{"__id":"tests-testcases--dynamic-add-remove-columns","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--grid-selection-out-of-range-no-columns":{"id":"tests-testcases--grid-selection-out-of-range-no-columns","name":"Grid Selection Out Of Range No Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Grid Selection Out Of Range No Columns","parameters":{"__id":"tests-testcases--grid-selection-out-of-range-no-columns","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--resizable-columns":{"id":"tests-testcases--resizable-columns","name":"Resizable Columns","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Resizable Columns","parameters":{"__id":"tests-testcases--resizable-columns","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--grid-selection-out-of-range-less-columns-than-selection":{"id":"tests-testcases--grid-selection-out-of-range-less-columns-than-selection","name":"Grid Selection Out Of Range Less Columns Than Selection","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Grid Selection Out Of Range Less Columns Than Selection","parameters":{"__id":"tests-testcases--grid-selection-out-of-range-less-columns-than-selection","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--grid-add-new-rows":{"id":"tests-testcases--grid-add-new-rows","name":"Grid Add New Rows","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Grid Add New Rows","parameters":{"__id":"tests-testcases--grid-add-new-rows","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--grid-no-trailing-blank-row":{"id":"tests-testcases--grid-no-trailing-blank-row","name":"Grid No Trailing Blank Row","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Grid No Trailing Blank Row","parameters":{"__id":"tests-testcases--grid-no-trailing-blank-row","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--markdown-edits":{"id":"tests-testcases--markdown-edits","name":"Markdown Edits","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Markdown Edits","parameters":{"__id":"tests-testcases--markdown-edits","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--can-edit-boolean":{"id":"tests-testcases--can-edit-boolean","name":"Can Edit Boolean","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Can Edit Boolean","parameters":{"__id":"tests-testcases--can-edit-boolean","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases--simple-editable":{"id":"tests-testcases--simple-editable","name":"Simple Editable","title":"Tests/TestCases","importPath":"./packages/core/src/data-editor/stories/data-editor.stories.tsx","tags":["story"],"kind":"Tests/TestCases","story":"Simple Editable","parameters":{"__id":"tests-testcases--simple-editable","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor.stories.tsx"}},"tests-testcases-bugs--bug-70":{"id":"tests-testcases-bugs--bug-70","name":"Bug 70","title":"Tests/TestCases/Bugs","importPath":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx","tags":["story"],"kind":"Tests/TestCases/Bugs","story":"Bug 70","parameters":{"__id":"tests-testcases-bugs--bug-70","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx"}},"tests-testcases-bugs--filter-columns":{"id":"tests-testcases-bugs--filter-columns","name":"Filter Columns","title":"Tests/TestCases/Bugs","importPath":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx","tags":["story"],"kind":"Tests/TestCases/Bugs","story":"Filter Columns","parameters":{"__id":"tests-testcases-bugs--filter-columns","docsOnly":false,"fileName":"./packages/core/src/data-editor/stories/data-editor-repros.stories.tsx"}}}}