@jpmorganchase/mosaic-content-editor-plugin 0.1.0-beta.10 → 0.1.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- @jpmorganchase/mosaic-content-editor-plugin:build: cache hit, replaying output 53879ed0068c2a4a
1
+ @jpmorganchase/mosaic-content-editor-plugin:build: cache hit, replaying output 8f0185f38842ccca
2
2
  @jpmorganchase/mosaic-content-editor-plugin:build: $ npm-run-all --parallel build:*
3
3
  @jpmorganchase/mosaic-content-editor-plugin:build: $ node ../../scripts/bundle.js
4
4
  @jpmorganchase/mosaic-content-editor-plugin:build: $ tsc
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # @jpmorganchase/mosaic-content-editor-plugin
2
2
 
3
+ ## 0.1.0-beta.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 9ec358b: Upgrade React to version 18 and NextJs to version 13
8
+ - 3eb35bf: initial work to enable generators to run outside of the repo
9
+ - Updated dependencies [9ec358b]
10
+ - Updated dependencies [3eb35bf]
11
+ - @jpmorganchase/mosaic-components@0.1.0-beta.12
12
+ - @jpmorganchase/mosaic-theme@0.1.0-beta.12
13
+
14
+ ## 0.1.0-beta.11
15
+
16
+ ### Patch Changes
17
+
18
+ - 146a4bb: fix SSR Initial render
19
+
20
+ removed Salt Core patch
21
+ added Salt Labs patch (Cascading Menu) to support SSR
22
+
23
+ - fc5d7b5: Generators can now interactively add sources
24
+
25
+ Previously we were making local edits to our own site or examples to implement new features.
26
+ What we wanted was the ability to create a local rig, A local rig can be used for development purposes,
27
+ without touching our site code.
28
+
29
+ We have added Mosaic repo commands, to enable us to generates local rigs (`yarn gen:rig`) and deploy our own
30
+ tech docs via snapshot (`yarn gen`)
31
+
32
+ To generate a site+snapshot from sources defined in `mosaic-generators.js`, run `yarn gen`
33
+ To generate a dynamic site from sources defined in `mosaic-generators.js`, run `yarn gen:site`
34
+ To generate a rig `yarn gen:rig`
35
+
36
+ Equally these changes can be used to generate sites in other repos via the `mosaic-create-site` command.
37
+
38
+ `yarn mosaic-create-site init` will create a `mosaic.generators.js`.
39
+
40
+ Configure the `mosaic.generators.js` with your generator and sources, then run.
41
+
42
+ `yarn mosaic-create-site create -i -o path/to/my-site`
43
+
44
+ When this command is run, it will present an interactive menu of generators and output the site to `path/to/my-site`.
45
+
46
+ - Updated dependencies [146a4bb]
47
+ - Updated dependencies [fc5d7b5]
48
+ - @jpmorganchase/mosaic-components@0.1.0-beta.11
49
+ - @jpmorganchase/mosaic-theme@0.1.0-beta.11
50
+
3
51
  ## 0.1.0-beta.10
4
52
 
5
53
  ### Patch Changes
@@ -1 +1 @@
1
- import{a as D}from"./chunk-3ODP7WU3.js";import{a as h}from"./chunk-XGBC7YGO.js";import{a as S}from"./chunk-FI57IKHZ.js";import{c as P,d as C}from"./chunk-KE4TEFFN.js";import e,{useState as d}from"react";import{useLexicalComposerContext as T}from"@lexical/react/LexicalComposerContext";import{$convertToMarkdownString as x}from"@lexical/markdown";import{Link as H,P2 as b,Button as w}from"@jpmorganchase/mosaic-components";import{Dialog as B,DialogTitle as E,DialogContent as L,DialogActions as F}from"@salt-ds/lab";var G=({isRaising:i,prHref:a,error:u})=>!i&&!a&&!u?e.createElement(e.Fragment,null,e.createElement(b,null,"The content of this page resides in a Git repository and to update it requires a Pull Request which will be reviewed by the content owners."),e.createElement("br",null),e.createElement(b,null,"Should you decide to stop editing before creating the Pull Request then all changes will be lost.")):null,Q=({meta:i})=>{let{pageState:a,setPageState:u}=P(),{user:p}=C(),[y]=T(),[r,s]=d(!1),[o,t]=d(null),[n,l]=d(null),k=a==="SAVING",q=o!==null?"success":"info",m=()=>{u("EDIT"),t(null),s(!1)};return e.createElement(B,{onClose:m,open:k,status:n?"error":q,width:"50%"},e.createElement(E,null,o?"Pull Request Created Successfully":"Save Changes"),e.createElement(L,null,(r||n)&&!o&&e.createElement(D,{isRaising:r,error:n}),e.createElement(G,{isRaising:r,prHref:o,error:n}),!r&&o&&e.createElement(H,{href:o,target:"_blank"},"A Pull Request for your changes has been created")),e.createElement(F,null,e.createElement(w,{disabled:r,onClick:m},"Cancel"),e.createElement(w,{disabled:r||o!==null,onClick:()=>{s(!0),t(null),l(null);try{y.update(async()=>{let f=x(h);if(f&&p){let{sid:I,displayName:v,email:A}=p,c=await S({sid:I,name:v,email:A},i.route,f);if(c.ok){let g=await c.json();g.error?(l(g.error),t(null),s(!1)):(t(g?.links?.self[0]?.href),s(!1))}c.status===500&&(l("An unexpected error has occurred."),t(null),s(!1))}})}catch{l("Sorry"),t(null),s(!1)}},variant:"cta"},"Raise Pull Request")))};export{Q as a};
1
+ import{a as D}from"./chunk-YER34KSW.js";import{a as h}from"./chunk-XGBC7YGO.js";import{a as S}from"./chunk-FI57IKHZ.js";import{c as P,d as C}from"./chunk-KE4TEFFN.js";import e,{useState as d}from"react";import{useLexicalComposerContext as T}from"@lexical/react/LexicalComposerContext";import{$convertToMarkdownString as x}from"@lexical/markdown";import{Link as H,P2 as b,Button as w}from"@jpmorganchase/mosaic-components";import{Dialog as B,DialogTitle as E,DialogContent as L,DialogActions as F}from"@salt-ds/lab";var G=({isRaising:i,prHref:a,error:u})=>!i&&!a&&!u?e.createElement(e.Fragment,null,e.createElement(b,null,"The content of this page resides in a Git repository and to update it requires a Pull Request which will be reviewed by the content owners."),e.createElement("br",null),e.createElement(b,null,"Should you decide to stop editing before creating the Pull Request then all changes will be lost.")):null,Q=({meta:i})=>{let{pageState:a,setPageState:u}=P(),{user:p}=C(),[y]=T(),[r,s]=d(!1),[o,t]=d(null),[n,l]=d(null),k=a==="SAVING",q=o!==null?"success":"info",m=()=>{u("EDIT"),t(null),s(!1)};return e.createElement(B,{onClose:m,open:k,status:n?"error":q,width:"50%"},e.createElement(E,null,o?"Pull Request Created Successfully":"Save Changes"),e.createElement(L,null,(r||n)&&!o&&e.createElement(D,{isRaising:r,error:n}),e.createElement(G,{isRaising:r,prHref:o,error:n}),!r&&o&&e.createElement(H,{href:o,target:"_blank"},"A Pull Request for your changes has been created")),e.createElement(F,null,e.createElement(w,{disabled:r,onClick:m},"Cancel"),e.createElement(w,{disabled:r||o!==null,onClick:()=>{s(!0),t(null),l(null);try{y.update(async()=>{let f=x(h);if(f&&p){let{sid:I,displayName:v,email:A}=p,c=await S({sid:I,name:v,email:A},i.route,f);if(c.ok){let g=await c.json();g.error?(l(g.error),t(null),s(!1)):(t(g?.links?.self[0]?.href),s(!1))}c.status===500&&(l("An unexpected error has occurred."),t(null),s(!1))}})}catch{l("Sorry"),t(null),s(!1)}},variant:"cta"},"Raise Pull Request")))};export{Q as a};
@@ -1 +1 @@
1
- import{a as h}from"./chunk-VC2SMAQF.js";import{a as k}from"./chunk-I7LEOMRH.js";import{a as f}from"./chunk-PZQ26XWS.js";import{a as b}from"./chunk-U22HX567.js";import{a as T}from"./chunk-4EAOB7YQ.js";import{a as y}from"./chunk-3FJGHVH5.js";import{a as s}from"./chunk-XGBC7YGO.js";import{a as M}from"./chunk-BXNO7GED.js";import{a as P}from"./chunk-RO6ARCLZ.js";import{a as F}from"./chunk-NLBFMDUH.js";import{a as x}from"./chunk-FKL4ZGDB.js";import{b as w}from"./chunk-YBFKG74H.js";import{b as E,d as S}from"./chunk-7FEXXQT5.js";import{a as g}from"./chunk-WCG3U3X2.js";import{a as t}from"./chunk-NXV7KCC5.js";import{a as C,d as v,f as p}from"./chunk-KE4TEFFN.js";import R from"react";import{$convertToMarkdownString as oo}from"@lexical/markdown";import{OnChangePlugin as ro}from"@lexical/react/LexicalOnChangePlugin";import to from"lodash/debounce";import o,{useRef as I,useState as $}from"react";import A from"classnames";import O from"gray-matter";import{LexicalComposer as U}from"@lexical/react/LexicalComposer";import{ListPlugin as X}from"@lexical/react/LexicalListPlugin";import{TablePlugin as W}from"@lexical/react/LexicalTablePlugin";import{LinkPlugin as j}from"@lexical/react/LexicalLinkPlugin";import{HistoryPlugin as q}from"@lexical/react/LexicalHistoryPlugin";import{MarkdownShortcutPlugin as G}from"@lexical/react/LexicalMarkdownShortcutPlugin";import J from"react-split";import{$convertFromMarkdownString as K}from"@lexical/markdown";function Q(r){console.error(r)}var V={namespace:"mosaic-content-editor",onError:Q,nodes:P,theme:y},Y=()=>{let r=document.createElement("div");return r.className=t.gutter,r},Z=({compileMDX:r,content:m,source:a,PreviewComponent:e,user:n,components:l})=>{let i=C()||a,{setUser:N}=v(),[u,d]=$(!1),z=I(null),{data:c,content:D}=O(m),B=()=>{d(!0),N(n)},H=()=>{d(!1)};return o.createElement(U,{initialConfig:{...V,editorState:()=>K(D,s)}},o.createElement("div",{className:t.root,onFocus:B,onBlur:H},o.createElement("div",{className:t.toolbarContainer},o.createElement(h,null),o.createElement(k,{meta:c}),o.createElement(M,null)),o.createElement("div",{className:t.editorRoot},o.createElement(J,{className:t.splitter,cursor:"col-resize",direction:"horizontal",dragInterval:1,expandToMin:!1,gutter:Y,gutterAlign:"center",minSize:100,sizes:[50,50],snapOffset:30},o.createElement(f,{className:A({[t.focused]:u,[t.unfocused]:!u}),ref:z},o.createElement(g,null)),o.createElement(f,null,e&&o.createElement(e,{source:i,meta:c,components:l}))),o.createElement(q,null),o.createElement(X,null),o.createElement(W,null),o.createElement(j,null),o.createElement(G,{transformers:s}),r&&o.createElement(L,{compileMDX:r}),o.createElement(w,null),o.createElement(E,null),o.createElement(b,null),o.createElement(x,null),o.createElement(F,null),o.createElement(T,null),o.createElement(S,null))))},_=Z;function eo(r){let m=to(r,250,{maxWait:500});return{onChange:e=>{e.read(()=>{let n=oo(s);n&&m(n)})}}}var L=({compileMDX:r})=>{let{setErrorMessage:m,setPreviewContent:a}=p(),e=async l=>{try{let i=await r(l,!1);a(i)}catch(i){i instanceof Error&&m(`MDX Error: ${i.message}`)}},{onChange:n}=eo(e);return R.createElement(ro,{onChange:n,ignoreSelectionChange:!0})};export{L as a,_ as b};
1
+ import{a as h}from"./chunk-RUQR4E6N.js";import{a as k}from"./chunk-FYR74YJH.js";import{a as f}from"./chunk-PZQ26XWS.js";import{a as b}from"./chunk-U22HX567.js";import{a as T}from"./chunk-4EAOB7YQ.js";import{a as y}from"./chunk-3FJGHVH5.js";import{a as s}from"./chunk-XGBC7YGO.js";import{a as M}from"./chunk-BXNO7GED.js";import{a as P}from"./chunk-RO6ARCLZ.js";import{a as F}from"./chunk-NLBFMDUH.js";import{a as x}from"./chunk-FKL4ZGDB.js";import{b as w}from"./chunk-YBFKG74H.js";import{b as E,d as S}from"./chunk-7FEXXQT5.js";import{a as g}from"./chunk-WCG3U3X2.js";import{a as t}from"./chunk-NXV7KCC5.js";import{a as C,d as v,f as p}from"./chunk-KE4TEFFN.js";import R from"react";import{$convertToMarkdownString as oo}from"@lexical/markdown";import{OnChangePlugin as ro}from"@lexical/react/LexicalOnChangePlugin";import to from"lodash/debounce";import o,{useRef as I,useState as $}from"react";import A from"classnames";import O from"gray-matter";import{LexicalComposer as U}from"@lexical/react/LexicalComposer";import{ListPlugin as X}from"@lexical/react/LexicalListPlugin";import{TablePlugin as W}from"@lexical/react/LexicalTablePlugin";import{LinkPlugin as j}from"@lexical/react/LexicalLinkPlugin";import{HistoryPlugin as q}from"@lexical/react/LexicalHistoryPlugin";import{MarkdownShortcutPlugin as G}from"@lexical/react/LexicalMarkdownShortcutPlugin";import J from"react-split";import{$convertFromMarkdownString as K}from"@lexical/markdown";function Q(r){console.error(r)}var V={namespace:"mosaic-content-editor",onError:Q,nodes:P,theme:y},Y=()=>{let r=document.createElement("div");return r.className=t.gutter,r},Z=({compileMDX:r,content:m,source:a,PreviewComponent:e,user:n,components:l})=>{let i=C()||a,{setUser:N}=v(),[u,d]=$(!1),z=I(null),{data:c,content:D}=O(m),B=()=>{d(!0),N(n)},H=()=>{d(!1)};return o.createElement(U,{initialConfig:{...V,editorState:()=>K(D,s)}},o.createElement("div",{className:t.root,onFocus:B,onBlur:H},o.createElement("div",{className:t.toolbarContainer},o.createElement(h,null),o.createElement(k,{meta:c}),o.createElement(M,null)),o.createElement("div",{className:t.editorRoot},o.createElement(J,{className:t.splitter,cursor:"col-resize",direction:"horizontal",dragInterval:1,expandToMin:!1,gutter:Y,gutterAlign:"center",minSize:100,sizes:[50,50],snapOffset:30},o.createElement(f,{className:A({[t.focused]:u,[t.unfocused]:!u}),ref:z},o.createElement(g,null)),o.createElement(f,null,e&&o.createElement(e,{source:i,meta:c,components:l}))),o.createElement(q,null),o.createElement(X,null),o.createElement(W,null),o.createElement(j,null),o.createElement(G,{transformers:s}),r&&o.createElement(L,{compileMDX:r}),o.createElement(w,null),o.createElement(E,null),o.createElement(b,null),o.createElement(x,null),o.createElement(F,null),o.createElement(T,null),o.createElement(S,null))))},_=Z;function eo(r){let m=to(r,250,{maxWait:500});return{onChange:e=>{e.read(()=>{let n=oo(s);n&&m(n)})}}}var L=({compileMDX:r})=>{let{setErrorMessage:m,setPreviewContent:a}=p(),e=async l=>{try{let i=await r(l,!1);a(i)}catch(i){i instanceof Error&&m(`MDX Error: ${i.message}`)}},{onChange:n}=eo(e);return R.createElement(ro,{onChange:n,ignoreSelectionChange:!0})};export{L as a,_ as b};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-ZUGL4RMA.js";import{a as d}from"./chunk-GGJCFLQH.js";import{a as m}from"./chunk-Y4VRZBBA.js";import{a as i}from"./chunk-FW7CHFWO.js";import{a as e}from"./chunk-QWW5D4V7.js";import{c as b}from"./chunk-7FEXXQT5.js";import{a as n}from"./chunk-2N4TKE2M.js";import{c as a}from"./chunk-KE4TEFFN.js";import o from"react";import{Toolbar as g,ToolbarButton as t,Tooltray as r}from"@salt-ds/lab";import{Icon as l}from"@jpmorganchase/mosaic-components";var I=()=>{let{canRedo:p,canUndo:T,redoEdit:y,undoEdit:f}=i(),{setPageState:u}=a();return o.createElement(g,{"aria-label":"page editing toolbar",style:{minWidth:"100px"}},o.createElement(r,{"aria-label":"history tooltray"},o.createElement(t,{label:"Undo",disabled:!T,onClick:f},o.createElement(l,{name:"undo"})),o.createElement(t,{label:"Redo",disabled:!p,onClick:y},o.createElement(l,{name:"redo"}))),o.createElement(e,null),o.createElement(r,{"aria-label":"text format tooltray"},o.createElement(b,null),o.createElement(m,null),o.createElement(d,null),o.createElement(s,null)),o.createElement(r,{"aria-label":"stop editing tooltray",alignEnd:!0},o.createElement(t,{label:"Cancel Editing",onClick:()=>u("VIEW")},o.createElement(l,{name:"delete"}))),o.createElement(r,{"aria-label":"copy tooltray","data-pad-start":!0},o.createElement(n,null)))},v=I;export{v as a};
1
+ import{a as s}from"./chunk-ZUGL4RMA.js";import{a as d}from"./chunk-GGJCFLQH.js";import{a as m}from"./chunk-U5U3LMRF.js";import{a as i}from"./chunk-FW7CHFWO.js";import{a as e}from"./chunk-QWW5D4V7.js";import{c as b}from"./chunk-7FEXXQT5.js";import{a as n}from"./chunk-2N4TKE2M.js";import{c as a}from"./chunk-KE4TEFFN.js";import o from"react";import{Toolbar as g,ToolbarButton as t,Tooltray as r}from"@salt-ds/lab";import{Icon as l}from"@jpmorganchase/mosaic-components";var I=()=>{let{canRedo:p,canUndo:T,redoEdit:y,undoEdit:f}=i(),{setPageState:u}=a();return o.createElement(g,{"aria-label":"page editing toolbar",style:{minWidth:"100px"}},o.createElement(r,{"aria-label":"history tooltray"},o.createElement(t,{label:"Undo",disabled:!T,onClick:f},o.createElement(l,{name:"undo"})),o.createElement(t,{label:"Redo",disabled:!p,onClick:y},o.createElement(l,{name:"redo"}))),o.createElement(e,null),o.createElement(r,{"aria-label":"text format tooltray"},o.createElement(b,null),o.createElement(m,null),o.createElement(d,null),o.createElement(s,null)),o.createElement(r,{"aria-label":"stop editing tooltray",alignEnd:!0},o.createElement(t,{label:"Cancel Editing",onClick:()=>u("VIEW")},o.createElement(l,{name:"delete"}))),o.createElement(r,{"aria-label":"copy tooltray","data-pad-start":!0},o.createElement(n,null)))},v=I;export{v as a};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-GWUYDDYS.js";import{c as N,d as M}from"./chunk-ENTOKO6G.js";import{a as F}from"./chunk-4QQTGYY3.js";import{a as E}from"./chunk-7N3YX6NW.js";import e,{useRef as P,useState as y}from"react";import{Icon as H}from"@jpmorganchase/mosaic-components";import{useLexicalComposerContext as W}from"@lexical/react/LexicalComposerContext";import{INSERT_TABLE_COMMAND as j}from"@lexical/table";import{useFloatingUI as q}from"@salt-ds/lab";var G=({index:n,...r})=>e.createElement("td",{className:o.cell,"data-column":n,...r}),J=({children:n,index:r})=>e.createElement("tr",{className:r===1?o.headerRow:o.row,"data-row":r},n),K=({rowCount:n,columnCount:r})=>{let a=[],s=[];for(let t=1;t<=r;t++)a.push(e.createElement(G,{key:t,index:t}));for(let t=1;t<=n;t++)s.push(e.createElement(J,{key:t,index:t},a));return e.createElement("tbody",null,s)};function Q(n){let r=parseInt(n?.dataset?.column||"0",10),a=n.parentNode,s=parseInt(a?.dataset?.row||"0",10);return{columnIndex:r,rowIndex:s}}var ie=({minRows:n=2,minColumns:r=2,maxColumns:a=10,initialRowCount:s=4,initialColumnCount:t=4})=>{let[O]=W(),g=P(null),c=P(!1),[m,d]=y(t),[i,p]=y(s),[f,h]=y(!1),v=()=>{x(),h(l=>!l)},{context:L,floating:S,reference:B,strategy:k,x:A,y:D}=q({placement:"bottom",strategy:"absolute",open:f,onOpenChange:v}),{getFloatingProps:_}=N([M(L,{ancestorScroll:!0})]),$=l=>{let I=l.nativeEvent.target;if(!g.current?.contains(I)||!c.current)return;let{columnIndex:w,rowIndex:T}=Q(I);w<m&&w>=r&&d(w),T<i&&T>=n&&p(T)};function x(){d(t),p(s),c.current=!1}let z=()=>{c.current=!0,m+1<=a&&d(l=>l+1)},R=()=>{c.current=!0,p(l=>l+1)},U=()=>{O.dispatchCommand(j,{columns:m.toString(),rows:i.toString()}),x(),h(!1)},u=25,b=i*u,C=m*u;return e.createElement(e.Fragment,null,e.createElement(E,{ref:B,onClick:v,active:f},e.createElement(H,{name:"grid"}),e.createElement("div",{className:o.spacer}),e.createElement(H,{name:"chevronDown"})),e.createElement(F,{className:o.popper,ref:S,open:f,style:{top:D??"",left:A??"",position:k},..._({})},e.createElement("div",{className:o.tableContainer,onMouseOver:$,onClick:U},e.createElement("table",{className:o.table,style:{width:C,height:b},ref:g},e.createElement(K,{rowCount:i,columnCount:m})),e.createElement("div",{className:o.dimensions},`${m} x ${i}`),e.createElement("div",{className:o.addColumnArea,style:{left:C,height:b+u},onMouseOver:z}),e.createElement("div",{className:o.addRowArea,style:{top:b,width:C+u},onMouseOver:R}))))};export{ie as a};
@@ -0,0 +1 @@
1
+ import{a as r}from"./chunk-6TM3EYFS.js";import t,{useEffect as m,useState as g}from"react";import u from"classnames";import{P2 as c}from"@jpmorganchase/mosaic-components";var o=["Making a copy...","Applying changes...","Creating a Pull Request..."],p=o.length-1,S=({children:l,isComplete:a,isCurrent:e})=>t.createElement("div",{className:u(r.step,{[r.stepComplete]:a,[r.stepActive]:e})},t.createElement("span",{role:"img","aria-label":"emoji with party hat"},a?"\u{1F973}":null),t.createElement("span",{role:"img","aria-label":"person grimacing emoji "},e?"\u{1F603}":null),t.createElement("span",{role:"img","aria-label":"sleepy emoji"},!e&&!a?"\u{1F4A4}":null),t.createElement("span",{className:r.stepText},l),t.createElement("span",{role:"img","aria-label":"hourglass"},e?"\u231B":null)),I=({isRaising:l,error:a})=>{let[e,i]=g(0);return m(()=>{let n=setInterval(()=>{e===o.length-1?clearInterval(n):i(s=>s+1)},2e3);return function(){clearInterval(n)}},[e]),a?t.createElement(c,null,"\u{1F622} Sorry something has went wrong. Please try again later."):t.createElement(t.Fragment,null,o.map((n,s)=>t.createElement(S,{key:`step -${s}`,isComplete:e===p&&s===p?!l:e>s,isCurrent:e===s},n)))};export{I as a};
@@ -1 +1 @@
1
- import{b as a}from"../chunk-GDXWHJOU.js";import"../chunk-VC2SMAQF.js";import"../chunk-ZUGL4RMA.js";import"../chunk-GGJCFLQH.js";import"../chunk-KZXCNQER.js";import"../chunk-Y4VRZBBA.js";import"../chunk-GWUYDDYS.js";import"../chunk-I7LEOMRH.js";import"../chunk-3ODP7WU3.js";import"../chunk-6TM3EYFS.js";import"../chunk-PZQ26XWS.js";import"../chunk-KQ2ZCDYD.js";import"../chunk-U22HX567.js";import"../chunk-G4LBXKDE.js";import"../chunk-HB6ONQSD.js";import"../chunk-5YCBSSDA.js";import"../chunk-MJUOPD42.js";import"../chunk-4EAOB7YQ.js";import"../chunk-ESKW4XF6.js";import"../chunk-PHAO5PCV.js";import"../chunk-3FJGHVH5.js";import"../chunk-JQUDHJIQ.js";import"../chunk-XGBC7YGO.js";import"../chunk-WNTJMWYJ.js";import"../chunk-ESJNOEFD.js";import"../chunk-RT5CJ7T5.js";import"../chunk-BXNO7GED.js";import"../chunk-FW7CHFWO.js";import"../chunk-RO6ARCLZ.js";import"../chunk-NLBFMDUH.js";import"../chunk-QWW5D4V7.js";import"../chunk-JYGEHLYM.js";import"../chunk-U7COOUR6.js";import"../chunk-ENTOKO6G.js";import"../chunk-4QQTGYY3.js";import"../chunk-XP37MJCS.js";import"../chunk-P5OBPOC4.js";import"../chunk-FKL4ZGDB.js";import"../chunk-YBFKG74H.js";import"../chunk-7FEXXQT5.js";import"../chunk-WZYDYWT3.js";import"../chunk-7N3YX6NW.js";import"../chunk-FFJYM47T.js";import"../chunk-FI57IKHZ.js";import"../chunk-WCG3U3X2.js";import"../chunk-NXV7KCC5.js";import"../chunk-PVPRWTXB.js";import"../chunk-WTMALWJU.js";import"../chunk-2N4TKE2M.js";import"../chunk-KE4TEFFN.js";export{a as default};
1
+ import{b as a}from"../chunk-J42KME6A.js";import"../chunk-RUQR4E6N.js";import"../chunk-ZUGL4RMA.js";import"../chunk-GGJCFLQH.js";import"../chunk-KZXCNQER.js";import"../chunk-U5U3LMRF.js";import"../chunk-GWUYDDYS.js";import"../chunk-FYR74YJH.js";import"../chunk-YER34KSW.js";import"../chunk-6TM3EYFS.js";import"../chunk-PZQ26XWS.js";import"../chunk-KQ2ZCDYD.js";import"../chunk-U22HX567.js";import"../chunk-G4LBXKDE.js";import"../chunk-HB6ONQSD.js";import"../chunk-5YCBSSDA.js";import"../chunk-MJUOPD42.js";import"../chunk-4EAOB7YQ.js";import"../chunk-ESKW4XF6.js";import"../chunk-PHAO5PCV.js";import"../chunk-3FJGHVH5.js";import"../chunk-JQUDHJIQ.js";import"../chunk-XGBC7YGO.js";import"../chunk-WNTJMWYJ.js";import"../chunk-ESJNOEFD.js";import"../chunk-RT5CJ7T5.js";import"../chunk-BXNO7GED.js";import"../chunk-FW7CHFWO.js";import"../chunk-RO6ARCLZ.js";import"../chunk-NLBFMDUH.js";import"../chunk-QWW5D4V7.js";import"../chunk-JYGEHLYM.js";import"../chunk-U7COOUR6.js";import"../chunk-ENTOKO6G.js";import"../chunk-4QQTGYY3.js";import"../chunk-XP37MJCS.js";import"../chunk-P5OBPOC4.js";import"../chunk-FKL4ZGDB.js";import"../chunk-YBFKG74H.js";import"../chunk-7FEXXQT5.js";import"../chunk-WZYDYWT3.js";import"../chunk-7N3YX6NW.js";import"../chunk-FFJYM47T.js";import"../chunk-FI57IKHZ.js";import"../chunk-WCG3U3X2.js";import"../chunk-NXV7KCC5.js";import"../chunk-PVPRWTXB.js";import"../chunk-WTMALWJU.js";import"../chunk-2N4TKE2M.js";import"../chunk-KE4TEFFN.js";export{a as default};
@@ -1 +1 @@
1
- import{a}from"../../chunk-3ODP7WU3.js";import"../../chunk-6TM3EYFS.js";export{a as PersistStatus};
1
+ import{a}from"../../chunk-YER34KSW.js";import"../../chunk-6TM3EYFS.js";export{a as PersistStatus};
@@ -1 +1 @@
1
- import{a}from"../../chunk-I7LEOMRH.js";import"../../chunk-3ODP7WU3.js";import"../../chunk-6TM3EYFS.js";import"../../chunk-XGBC7YGO.js";import"../../chunk-WNTJMWYJ.js";import"../../chunk-ESJNOEFD.js";import"../../chunk-RT5CJ7T5.js";import"../../chunk-FI57IKHZ.js";import"../../chunk-KE4TEFFN.js";export{a as PersistDialog};
1
+ import{a}from"../../chunk-FYR74YJH.js";import"../../chunk-YER34KSW.js";import"../../chunk-6TM3EYFS.js";import"../../chunk-XGBC7YGO.js";import"../../chunk-WNTJMWYJ.js";import"../../chunk-ESJNOEFD.js";import"../../chunk-RT5CJ7T5.js";import"../../chunk-FI57IKHZ.js";import"../../chunk-KE4TEFFN.js";export{a as PersistDialog};
@@ -1 +1 @@
1
- import{a}from"../../chunk-Y4VRZBBA.js";import"../../chunk-GWUYDDYS.js";import"../../chunk-ENTOKO6G.js";import"../../chunk-4QQTGYY3.js";import"../../chunk-XP37MJCS.js";import"../../chunk-P5OBPOC4.js";import"../../chunk-7N3YX6NW.js";import"../../chunk-FFJYM47T.js";export{a as InsertTable};
1
+ import{a}from"../../chunk-U5U3LMRF.js";import"../../chunk-GWUYDDYS.js";import"../../chunk-ENTOKO6G.js";import"../../chunk-4QQTGYY3.js";import"../../chunk-XP37MJCS.js";import"../../chunk-P5OBPOC4.js";import"../../chunk-7N3YX6NW.js";import"../../chunk-FFJYM47T.js";export{a as InsertTable};
@@ -1 +1 @@
1
- import{a}from"../../chunk-VC2SMAQF.js";import"../../chunk-ZUGL4RMA.js";import"../../chunk-GGJCFLQH.js";import"../../chunk-KZXCNQER.js";import"../../chunk-Y4VRZBBA.js";import"../../chunk-GWUYDDYS.js";import"../../chunk-FW7CHFWO.js";import"../../chunk-QWW5D4V7.js";import"../../chunk-JYGEHLYM.js";import"../../chunk-U7COOUR6.js";import"../../chunk-ENTOKO6G.js";import"../../chunk-4QQTGYY3.js";import"../../chunk-XP37MJCS.js";import"../../chunk-P5OBPOC4.js";import"../../chunk-YBFKG74H.js";import"../../chunk-7FEXXQT5.js";import"../../chunk-WZYDYWT3.js";import"../../chunk-7N3YX6NW.js";import"../../chunk-FFJYM47T.js";import"../../chunk-2N4TKE2M.js";import"../../chunk-KE4TEFFN.js";export{a as default};
1
+ import{a}from"../../chunk-RUQR4E6N.js";import"../../chunk-ZUGL4RMA.js";import"../../chunk-GGJCFLQH.js";import"../../chunk-KZXCNQER.js";import"../../chunk-U5U3LMRF.js";import"../../chunk-GWUYDDYS.js";import"../../chunk-FW7CHFWO.js";import"../../chunk-QWW5D4V7.js";import"../../chunk-JYGEHLYM.js";import"../../chunk-U7COOUR6.js";import"../../chunk-ENTOKO6G.js";import"../../chunk-4QQTGYY3.js";import"../../chunk-XP37MJCS.js";import"../../chunk-P5OBPOC4.js";import"../../chunk-YBFKG74H.js";import"../../chunk-7FEXXQT5.js";import"../../chunk-WZYDYWT3.js";import"../../chunk-7N3YX6NW.js";import"../../chunk-FFJYM47T.js";import"../../chunk-2N4TKE2M.js";import"../../chunk-KE4TEFFN.js";export{a as default};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{b as c}from"./chunk-GDXWHJOU.js";import"./chunk-VC2SMAQF.js";import"./chunk-ZUGL4RMA.js";import"./chunk-GGJCFLQH.js";import"./chunk-KZXCNQER.js";import"./chunk-Y4VRZBBA.js";import"./chunk-GWUYDDYS.js";import"./chunk-I7LEOMRH.js";import"./chunk-3ODP7WU3.js";import"./chunk-6TM3EYFS.js";import"./chunk-PZQ26XWS.js";import"./chunk-KQ2ZCDYD.js";import"./chunk-U22HX567.js";import"./chunk-G4LBXKDE.js";import"./chunk-HB6ONQSD.js";import"./chunk-5YCBSSDA.js";import"./chunk-MJUOPD42.js";import"./chunk-4EAOB7YQ.js";import"./chunk-ESKW4XF6.js";import"./chunk-PHAO5PCV.js";import"./chunk-3FJGHVH5.js";import"./chunk-JQUDHJIQ.js";import"./chunk-XGBC7YGO.js";import"./chunk-WNTJMWYJ.js";import"./chunk-ESJNOEFD.js";import"./chunk-RT5CJ7T5.js";import"./chunk-BXNO7GED.js";import"./chunk-FW7CHFWO.js";import"./chunk-RO6ARCLZ.js";import"./chunk-NLBFMDUH.js";import"./chunk-QWW5D4V7.js";import"./chunk-JYGEHLYM.js";import"./chunk-U7COOUR6.js";import"./chunk-ENTOKO6G.js";import"./chunk-4QQTGYY3.js";import"./chunk-XP37MJCS.js";import"./chunk-P5OBPOC4.js";import"./chunk-FKL4ZGDB.js";import"./chunk-YBFKG74H.js";import"./chunk-7FEXXQT5.js";import"./chunk-WZYDYWT3.js";import"./chunk-7N3YX6NW.js";import"./chunk-FFJYM47T.js";import"./chunk-FI57IKHZ.js";import"./chunk-WCG3U3X2.js";import"./chunk-NXV7KCC5.js";import{a as d}from"./chunk-PVPRWTXB.js";import"./chunk-WTMALWJU.js";import"./chunk-2N4TKE2M.js";import{c as a,f as b}from"./chunk-KE4TEFFN.js";export{c as Editor,d as EditorControls,b as useContentEditor,a as usePageState};
1
+ import{b as c}from"./chunk-J42KME6A.js";import"./chunk-RUQR4E6N.js";import"./chunk-ZUGL4RMA.js";import"./chunk-GGJCFLQH.js";import"./chunk-KZXCNQER.js";import"./chunk-U5U3LMRF.js";import"./chunk-GWUYDDYS.js";import"./chunk-FYR74YJH.js";import"./chunk-YER34KSW.js";import"./chunk-6TM3EYFS.js";import"./chunk-PZQ26XWS.js";import"./chunk-KQ2ZCDYD.js";import"./chunk-U22HX567.js";import"./chunk-G4LBXKDE.js";import"./chunk-HB6ONQSD.js";import"./chunk-5YCBSSDA.js";import"./chunk-MJUOPD42.js";import"./chunk-4EAOB7YQ.js";import"./chunk-ESKW4XF6.js";import"./chunk-PHAO5PCV.js";import"./chunk-3FJGHVH5.js";import"./chunk-JQUDHJIQ.js";import"./chunk-XGBC7YGO.js";import"./chunk-WNTJMWYJ.js";import"./chunk-ESJNOEFD.js";import"./chunk-RT5CJ7T5.js";import"./chunk-BXNO7GED.js";import"./chunk-FW7CHFWO.js";import"./chunk-RO6ARCLZ.js";import"./chunk-NLBFMDUH.js";import"./chunk-QWW5D4V7.js";import"./chunk-JYGEHLYM.js";import"./chunk-U7COOUR6.js";import"./chunk-ENTOKO6G.js";import"./chunk-4QQTGYY3.js";import"./chunk-XP37MJCS.js";import"./chunk-P5OBPOC4.js";import"./chunk-FKL4ZGDB.js";import"./chunk-YBFKG74H.js";import"./chunk-7FEXXQT5.js";import"./chunk-WZYDYWT3.js";import"./chunk-7N3YX6NW.js";import"./chunk-FFJYM47T.js";import"./chunk-FI57IKHZ.js";import"./chunk-WCG3U3X2.js";import"./chunk-NXV7KCC5.js";import{a as d}from"./chunk-PVPRWTXB.js";import"./chunk-WTMALWJU.js";import"./chunk-2N4TKE2M.js";import{c as a,f as b}from"./chunk-KE4TEFFN.js";export{c as Editor,d as EditorControls,b as useContentEditor,a as usePageState};
@@ -1 +1 @@
1
- import{a}from"../chunk-GDXWHJOU.js";import"../chunk-VC2SMAQF.js";import"../chunk-ZUGL4RMA.js";import"../chunk-GGJCFLQH.js";import"../chunk-KZXCNQER.js";import"../chunk-Y4VRZBBA.js";import"../chunk-GWUYDDYS.js";import"../chunk-I7LEOMRH.js";import"../chunk-3ODP7WU3.js";import"../chunk-6TM3EYFS.js";import"../chunk-PZQ26XWS.js";import"../chunk-KQ2ZCDYD.js";import"../chunk-U22HX567.js";import"../chunk-G4LBXKDE.js";import"../chunk-HB6ONQSD.js";import"../chunk-5YCBSSDA.js";import"../chunk-MJUOPD42.js";import"../chunk-4EAOB7YQ.js";import"../chunk-ESKW4XF6.js";import"../chunk-PHAO5PCV.js";import"../chunk-3FJGHVH5.js";import"../chunk-JQUDHJIQ.js";import"../chunk-XGBC7YGO.js";import"../chunk-WNTJMWYJ.js";import"../chunk-ESJNOEFD.js";import"../chunk-RT5CJ7T5.js";import"../chunk-BXNO7GED.js";import"../chunk-FW7CHFWO.js";import"../chunk-RO6ARCLZ.js";import"../chunk-NLBFMDUH.js";import"../chunk-QWW5D4V7.js";import"../chunk-JYGEHLYM.js";import"../chunk-U7COOUR6.js";import"../chunk-ENTOKO6G.js";import"../chunk-4QQTGYY3.js";import"../chunk-XP37MJCS.js";import"../chunk-P5OBPOC4.js";import"../chunk-FKL4ZGDB.js";import"../chunk-YBFKG74H.js";import"../chunk-7FEXXQT5.js";import"../chunk-WZYDYWT3.js";import"../chunk-7N3YX6NW.js";import"../chunk-FFJYM47T.js";import"../chunk-FI57IKHZ.js";import"../chunk-WCG3U3X2.js";import"../chunk-NXV7KCC5.js";import"../chunk-PVPRWTXB.js";import"../chunk-WTMALWJU.js";import"../chunk-2N4TKE2M.js";import"../chunk-KE4TEFFN.js";export{a as PreviewPlugin};
1
+ import{a}from"../chunk-J42KME6A.js";import"../chunk-RUQR4E6N.js";import"../chunk-ZUGL4RMA.js";import"../chunk-GGJCFLQH.js";import"../chunk-KZXCNQER.js";import"../chunk-U5U3LMRF.js";import"../chunk-GWUYDDYS.js";import"../chunk-FYR74YJH.js";import"../chunk-YER34KSW.js";import"../chunk-6TM3EYFS.js";import"../chunk-PZQ26XWS.js";import"../chunk-KQ2ZCDYD.js";import"../chunk-U22HX567.js";import"../chunk-G4LBXKDE.js";import"../chunk-HB6ONQSD.js";import"../chunk-5YCBSSDA.js";import"../chunk-MJUOPD42.js";import"../chunk-4EAOB7YQ.js";import"../chunk-ESKW4XF6.js";import"../chunk-PHAO5PCV.js";import"../chunk-3FJGHVH5.js";import"../chunk-JQUDHJIQ.js";import"../chunk-XGBC7YGO.js";import"../chunk-WNTJMWYJ.js";import"../chunk-ESJNOEFD.js";import"../chunk-RT5CJ7T5.js";import"../chunk-BXNO7GED.js";import"../chunk-FW7CHFWO.js";import"../chunk-RO6ARCLZ.js";import"../chunk-NLBFMDUH.js";import"../chunk-QWW5D4V7.js";import"../chunk-JYGEHLYM.js";import"../chunk-U7COOUR6.js";import"../chunk-ENTOKO6G.js";import"../chunk-4QQTGYY3.js";import"../chunk-XP37MJCS.js";import"../chunk-P5OBPOC4.js";import"../chunk-FKL4ZGDB.js";import"../chunk-YBFKG74H.js";import"../chunk-7FEXXQT5.js";import"../chunk-WZYDYWT3.js";import"../chunk-7N3YX6NW.js";import"../chunk-FFJYM47T.js";import"../chunk-FI57IKHZ.js";import"../chunk-WCG3U3X2.js";import"../chunk-NXV7KCC5.js";import"../chunk-PVPRWTXB.js";import"../chunk-WTMALWJU.js";import"../chunk-2N4TKE2M.js";import"../chunk-KE4TEFFN.js";export{a as PreviewPlugin};
package/package.json CHANGED
@@ -1,12 +1,22 @@
1
1
  {
2
2
  "name": "@jpmorganchase/mosaic-content-editor-plugin",
3
3
  "description": "Mosaic - In Browser content editing plugin",
4
- "version": "0.1.0-beta.10",
4
+ "version": "0.1.0-beta.12",
5
5
  "license": "Apache-2.0",
6
6
  "author": "",
7
+ "type": "module",
7
8
  "main": "./dist/index.js",
8
9
  "types": "./dist/index.d.ts",
9
10
  "style": "./dist/index.css",
11
+ "exports": {
12
+ "./index.css": "./dist/index.css",
13
+ ".": {
14
+ "style": "./dist/index.css",
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js",
17
+ "node": "./dist/index.js"
18
+ }
19
+ },
10
20
  "scripts": {
11
21
  "build": "npm-run-all --parallel build:*",
12
22
  "build:bundle": "node ../../scripts/bundle.js",
@@ -17,15 +27,14 @@
17
27
  },
18
28
  "devDependencies": {
19
29
  "@testing-library/jest-dom": "^5.16.5",
20
- "@testing-library/react": "^12.0.0",
30
+ "@testing-library/react": "^13.4.0",
21
31
  "@testing-library/user-event": "^14.0.0",
22
- "@testing-library/react-hooks": "^8.0.1",
23
32
  "msw": "^0.49.1",
24
33
  "typescript": "^4.8.3"
25
34
  },
26
35
  "dependencies": {
27
- "@jpmorganchase/mosaic-components": "^0.1.0-beta.10",
28
- "@jpmorganchase/mosaic-theme": "^0.1.0-beta.10",
36
+ "@jpmorganchase/mosaic-components": "^0.1.0-beta.12",
37
+ "@jpmorganchase/mosaic-theme": "^0.1.0-beta.12",
29
38
  "@salt-ds/core": "^1.0.0",
30
39
  "@salt-ds/icons": "^1.0.0",
31
40
  "@salt-ds/lab": "^1.0.0-alpha.0",
@@ -49,8 +58,8 @@
49
58
  "zustand": "^4.1.1"
50
59
  },
51
60
  "peerDependencies": {
52
- "@types/react": "^16.9.34",
53
- "react": "^16.8.0",
54
- "react-dom": "^16.9.0"
61
+ "@types/react": "^18.0.26",
62
+ "react": "^18.2.0",
63
+ "react-dom": "^18.2.0"
55
64
  }
56
65
  }
@@ -1,4 +1,4 @@
1
- import React, { FC, useEffect, useState } from 'react';
1
+ import React, { FC, ReactNode, useEffect, useState } from 'react';
2
2
  import classnames from 'classnames';
3
3
  import { P2 } from '@jpmorganchase/mosaic-components';
4
4
 
@@ -8,6 +8,7 @@ const steps = ['Making a copy...', 'Applying changes...', 'Creating a Pull Reque
8
8
  const lastStep = steps.length - 1;
9
9
 
10
10
  interface StepProps {
11
+ children?: ReactNode;
11
12
  isComplete: boolean;
12
13
  isCurrent: boolean;
13
14
  }
@@ -1,4 +1,4 @@
1
- import React, { ReactElement, FC, MouseEventHandler, useRef, useState } from 'react';
1
+ import React, { ReactElement, FC, ReactNode, MouseEventHandler, useRef, useState } from 'react';
2
2
  import { Icon } from '@jpmorganchase/mosaic-components';
3
3
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
4
4
  import { INSERT_TABLE_COMMAND } from '@lexical/table';
@@ -10,6 +10,7 @@ import { TextFormatToolbarButton } from './TextFormatToolbarButton';
10
10
  import styles from './InsertTable.css';
11
11
 
12
12
  interface IndexableEntity {
13
+ children?: ReactNode;
13
14
  index: number;
14
15
  }
15
16
 
@@ -1,4 +1,4 @@
1
- import { act, renderHook } from '@testing-library/react-hooks';
1
+ import { act, renderHook } from '@testing-library/react';
2
2
 
3
3
  import useStore, {
4
4
  ContentEditorState,
@@ -1 +0,0 @@
1
- import{a as r}from"./chunk-6TM3EYFS.js";import s,{useEffect as m,useState as g}from"react";import u from"classnames";import{P2 as S}from"@jpmorganchase/mosaic-components";var p=["Making a copy...","Applying changes...","Creating a Pull Request..."],o=p.length-1,c=({children:l,isComplete:a,isCurrent:e})=>s.createElement("div",{className:u(r.step,{[r.stepComplete]:a,[r.stepActive]:e})},s.createElement("span",{role:"img","aria-label":"emoji with party hat"},a?"\u{1F973}":null),s.createElement("span",{role:"img","aria-label":"person grimacing emoji "},e?"\u{1F603}":null),s.createElement("span",{role:"img","aria-label":"sleepy emoji"},!e&&!a?"\u{1F4A4}":null),s.createElement("span",{className:r.stepText},l),s.createElement("span",{role:"img","aria-label":"hourglass"},e?"\u231B":null)),b=({isRaising:l,error:a})=>{let[e,i]=g(0);return m(()=>{let n=setInterval(()=>{e===p.length-1?clearInterval(n):i(t=>t+1)},2e3);return function(){clearInterval(n)}},[e]),a?s.createElement(S,null,"\u{1F622} Sorry something has went wrong. Please try again later."):s.createElement(s.Fragment,null,p.map((n,t)=>s.createElement(c,{key:`step -${t}`,isComplete:e===o&&t===o?!l:e>t,isCurrent:e===t},n)))};export{b as a};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-GWUYDDYS.js";import{c as M,d as N}from"./chunk-ENTOKO6G.js";import{a as F}from"./chunk-4QQTGYY3.js";import{a as E}from"./chunk-7N3YX6NW.js";import e,{useRef as P,useState as y}from"react";import{Icon as H}from"@jpmorganchase/mosaic-components";import{useLexicalComposerContext as j}from"@lexical/react/LexicalComposerContext";import{INSERT_TABLE_COMMAND as q}from"@lexical/table";import{useFloatingUI as G}from"@salt-ds/lab";var J=({index:n,...r})=>e.createElement("td",{className:o.cell,"data-column":n,...r}),K=({children:n,index:r})=>e.createElement("tr",{className:r===1?o.headerRow:o.row,"data-row":r},n),Q=({rowCount:n,columnCount:r})=>{let a=[],s=[];for(let t=1;t<=r;t++)a.push(e.createElement(J,{key:t,index:t}));for(let t=1;t<=n;t++)s.push(e.createElement(K,{key:t,index:t},a));return e.createElement("tbody",null,s)};function V(n){let r=parseInt(n?.dataset?.column||"0",10),a=n.parentNode,s=parseInt(a?.dataset?.row||"0",10);return{columnIndex:r,rowIndex:s}}var me=({minRows:n=2,minColumns:r=2,maxColumns:a=10,initialRowCount:s=4,initialColumnCount:t=4})=>{let[O]=j(),g=P(null),u=P(!1),[m,d]=y(t),[i,p]=y(s),[f,v]=y(!1),x=()=>{h(),v(l=>!l)},{context:L,floating:S,reference:B,strategy:k,x:A,y:D}=G({placement:"bottom",strategy:"absolute",open:f,onOpenChange:x}),{getFloatingProps:_}=M([N(L,{ancestorScroll:!0})]),$=l=>{let I=l.nativeEvent.target;if(!g.current?.contains(I)||!u.current)return;let{columnIndex:w,rowIndex:T}=V(I);w<m&&w>=r&&d(w),T<i&&T>=n&&p(T)};function h(){d(t),p(s),u.current=!1}let z=()=>{u.current=!0,m+1<=a&&d(l=>l+1)},U=()=>{u.current=!0,p(l=>l+1)},W=()=>{O.dispatchCommand(q,{columns:m.toString(),rows:i.toString()}),h(),v(!1)},c=25,b=i*c,C=m*c;return e.createElement(e.Fragment,null,e.createElement(E,{ref:B,onClick:x,active:f},e.createElement(H,{name:"grid"}),e.createElement("div",{className:o.spacer}),e.createElement(H,{name:"chevronDown"})),e.createElement(F,{className:o.popper,ref:S,open:f,style:{top:D??"",left:A??"",position:k},..._({})},e.createElement("div",{className:o.tableContainer,onMouseOver:$,onClick:W},e.createElement("table",{className:o.table,style:{width:C,height:b},ref:g},e.createElement(Q,{rowCount:i,columnCount:m})),e.createElement("div",{className:o.dimensions},`${m} x ${i}`),e.createElement("div",{className:o.addColumnArea,style:{left:C,height:b+c},onMouseOver:z}),e.createElement("div",{className:o.addRowArea,style:{top:b,width:C+c},onMouseOver:U}))))};export{me as a};