solace-ui-components 17.0.7 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/charts.js +1 -1
  2. package/dist/charts.modern.mjs +1 -1
  3. package/dist/chunk-2RTZL4CF.modern.mjs +4 -0
  4. package/dist/chunk-2RTZL4CF.modern.mjs.map +1 -0
  5. package/dist/chunk-4XH33OL7.js +384 -0
  6. package/dist/chunk-4XH33OL7.js.map +1 -0
  7. package/dist/chunk-7SKICMGL.js +2 -0
  8. package/dist/{chunk-3NKPHQNZ.js.map → chunk-7SKICMGL.js.map} +1 -1
  9. package/dist/{chunk-KQ4FCALU.js → chunk-AOKITPX2.js} +2 -2
  10. package/dist/{chunk-KQ4FCALU.js.map → chunk-AOKITPX2.js.map} +1 -1
  11. package/dist/chunk-GDZZVHFP.js +2 -0
  12. package/dist/chunk-GDZZVHFP.js.map +1 -0
  13. package/dist/chunk-HLXBN2OE.modern.mjs +2 -0
  14. package/dist/{chunk-BRCNJ6YU.modern.mjs.map → chunk-HLXBN2OE.modern.mjs.map} +1 -1
  15. package/dist/chunk-IHSXSGCC.modern.mjs +384 -0
  16. package/dist/chunk-IHSXSGCC.modern.mjs.map +1 -0
  17. package/dist/chunk-QV564WAK.modern.mjs +2 -0
  18. package/dist/chunk-QV564WAK.modern.mjs.map +1 -0
  19. package/dist/chunk-ROSPS5NM.modern.mjs +2 -0
  20. package/dist/chunk-ROSPS5NM.modern.mjs.map +1 -0
  21. package/dist/{chunk-6GFRKOAD.js → chunk-TSSPQLS6.js} +3 -3
  22. package/dist/chunk-TSSPQLS6.js.map +1 -0
  23. package/dist/chunk-UFDVHFXE.js +2 -0
  24. package/dist/chunk-UFDVHFXE.js.map +1 -0
  25. package/dist/chunk-ULYCLLUO.modern.mjs +2 -0
  26. package/dist/{chunk-OIYJ7CVG.modern.mjs.map → chunk-ULYCLLUO.modern.mjs.map} +1 -1
  27. package/dist/code-editor.js +1 -1
  28. package/dist/code-editor.js.map +1 -1
  29. package/dist/code-editor.modern.mjs +1 -1
  30. package/dist/code-editor.modern.mjs.map +1 -1
  31. package/dist/datepicker.js +1 -1
  32. package/dist/datepicker.modern.mjs +1 -1
  33. package/dist/drag-drop.js +1 -1
  34. package/dist/drag-drop.js.map +1 -1
  35. package/dist/drag-drop.modern.mjs +1 -1
  36. package/dist/drag-drop.modern.mjs.map +1 -1
  37. package/dist/index.d.mts +1 -40
  38. package/dist/index.d.ts +1 -40
  39. package/dist/index.js +59 -60
  40. package/dist/index.js.map +1 -1
  41. package/dist/index.modern.mjs +59 -60
  42. package/dist/index.modern.mjs.map +1 -1
  43. package/dist/json-schema-form.js +1 -1
  44. package/dist/json-schema-form.js.map +1 -1
  45. package/dist/json-schema-form.modern.mjs +1 -1
  46. package/dist/json-schema-form.modern.mjs.map +1 -1
  47. package/dist/textDiff.d.mts +44 -0
  48. package/dist/textDiff.d.ts +44 -0
  49. package/dist/textDiff.js +3 -0
  50. package/dist/textDiff.js.map +1 -0
  51. package/dist/textDiff.modern.mjs +3 -0
  52. package/dist/textDiff.modern.mjs.map +1 -0
  53. package/migrate-imports.js +10 -2
  54. package/package.json +41 -46
  55. package/dist/chunk-3NKPHQNZ.js +0 -2
  56. package/dist/chunk-3R3N5YG6.js +0 -365
  57. package/dist/chunk-3R3N5YG6.js.map +0 -1
  58. package/dist/chunk-6GFRKOAD.js.map +0 -1
  59. package/dist/chunk-BRCNJ6YU.modern.mjs +0 -2
  60. package/dist/chunk-C2UC34ZQ.modern.mjs +0 -4
  61. package/dist/chunk-C2UC34ZQ.modern.mjs.map +0 -1
  62. package/dist/chunk-GQTRWH6F.modern.mjs +0 -365
  63. package/dist/chunk-GQTRWH6F.modern.mjs.map +0 -1
  64. package/dist/chunk-O6RZQMKZ.modern.mjs +0 -2
  65. package/dist/chunk-O6RZQMKZ.modern.mjs.map +0 -1
  66. package/dist/chunk-OIYJ7CVG.modern.mjs +0 -2
  67. package/dist/chunk-UKAGR4YU.js +0 -2
  68. package/dist/chunk-UKAGR4YU.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/SolaceTextDiff.tsx"],"names":["DiffContainer","styled_default","HeaderContainer","HeaderPane","theme","CodeDiffContainer","DiffSplitView","DiffPane","DiffLine","lineType","DiffGutter","DiffContent","NoDifferencesContainer","createChangesArray","change","lines","oldStart","newStart","type","line","i","diffChange","getChangeLines","SolaceTextDiff","props","id","text1","text2","text1Header","text2Header","noContentText","noDifferencesText","hideWhenNoDifferences","hunks","React","changes","T","changesArr","hunk","allChanges","renderLine","side","index","lineNumber","jsxs","jsx","SolaceStackLabel_default","idx"],"mappings":"opBAuBA,IAAMA,CAAAA,CAAgBC,mBAAAA,CAAO,KAAK,CAAA,CAAE,CACnC,QAAS,MAAA,CACT,aAAA,CAAe,QAAA,CACf,KAAA,CAAO,MACR,CAAC,CAAA,CAEKC,EAAkBD,mBAAAA,CAAO,KAAK,EAAE,CACrC,OAAA,CAAS,OACT,KAAA,CAAO,MACR,CAAC,CAAA,CAEKE,CAAAA,CAAaF,oBAAO,KAAK,CAAA,CAAE,CAAC,CAAE,KAAA,CAAAG,CAAM,CAAA,IAAO,CAChD,IAAA,CAAM,CAAA,CACN,SAAU,CAAA,CACV,OAAA,CAASA,EAAM,OAAA,CAAQ,CAAA,CAAG,CAAA,CAAG,EAAA,CAAK,CAAC,CACpC,CAAA,CAAE,EAEIC,CAAAA,CAAoBJ,mBAAAA,CAAO,KAAK,CAAA,CAAE,CAAC,CAAE,KAAA,CAAAG,CAAM,CAAA,IAAO,CACvD,OAAQ,CAAA,UAAA,EAAaA,CAAAA,CAAM,QAAQ,EAAA,CAAG,SAAA,CAAU,GAAG,CAAA,CAAA,CACnD,YAAA,CAAcA,EAAM,KAAA,CAAM,YAAA,CAC1B,WAAY,WAAA,CACZ,QAAA,CAAU,OACV,QAAA,CAAU,QACX,CAAA,CAAE,CAAA,CAEIE,EAAgBL,mBAAAA,CAAO,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A,CAAA,CACA,QAAA,CAAA,CAAAuC,cAAAA,CAACtC,EAAA,CAAU,QAAA,CAAAgC,EAAW,GAAA,CAAI,CAACzB,EAAQiC,CAAAA,GAAQP,CAAAA,CAAW1B,EAAQ,KAAA,CAAOiC,CAAG,CAAC,CAAA,CAAE,EAC3EF,cAAAA,CAACtC,CAAAA,CAAA,CAAU,QAAA,CAAAgC,CAAAA,CAAW,IAAI,CAACzB,CAAAA,CAAQiC,IAAQP,CAAAA,CAAW1B,CAAAA,CAAQ,MAAOiC,CAAG,CAAC,EAAE,CAAA,CAAA,CAC5E,CAAA,CACD,GACD,CAEF","file":"textDiff.js","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { styled } from \"@mui/material\";\nimport * as Diff from \"diff\";\nimport React from \"react\";\n\nimport SolaceComponentProps from \"./SolaceComponentProps\";\nimport SolaceStackLabel from \"./form/SolaceStackLabel\";\n\nconst DiffContainer = styled(\"div\")({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\twidth: \"100%\"\n});\n\nconst HeaderContainer = styled(\"div\")({\n\tdisplay: \"flex\",\n\twidth: \"100%\"\n});\n\nconst HeaderPane = styled(\"div\")(({ theme }) => ({\n\tflex: 1,\n\tminWidth: 0,\n\tpadding: theme.spacing(1, 2, 0.5, 0)\n}));\n\nconst CodeDiffContainer = styled(\"div\")(({ theme }) => ({\n\tborder: `1px solid ${theme.palette.ux.secondary.w40}`,\n\tborderRadius: theme.shape.borderRadius,\n\tfontFamily: \"monospace\",\n\tfontSize: \"14px\",\n\toverflow: \"hidden\"\n}));\n\nconst DiffSplitView = styled(\"div\")({\n\tdisplay: \"flex\",\n\twidth: \"100%\"\n});\n\nconst DiffPane = styled(\"div\")({\n\tflex: 1,\n\tminWidth: 0\n});\n\nconst DiffLine = styled(\"div\")<{ lineType: \"normal\" | \"insert\" | \"delete\" | \"empty\" }>(({ theme, lineType }) => ({\n\tdisplay: \"flex\",\n\tminHeight: \"1.2em\",\n\tlineHeight: \"1.2em\",\n\t...(lineType === \"insert\" && {\n\t\tbackgroundColor: theme.palette.ux.success.w10\n\t}),\n\t...(lineType === \"delete\" && {\n\t\tbackgroundColor: theme.palette.ux.warning.w10,\n\t\tmixBlendMode: \"multiply\"\n\t}),\n\t...(lineType === \"empty\" && {\n\t\tbackgroundColor: theme.palette.ux.error.wMain,\n\t\topacity: 0.1\n\t})\n}));\n\nconst DiffGutter = styled(\"div\")(({ theme }) => ({\n\tcolor: theme.palette.ux.secondary.text.wMain,\n\tbackgroundColor: theme.palette.ux.background.w20,\n\ttextAlign: \"center\",\n\tminWidth: theme.spacing(3),\n\tpadding: theme.spacing(0, 0.5),\n\tborderRight: `1px solid ${theme.palette.ux.secondary.w40}`,\n\tuserSelect: \"none\",\n\tflexShrink: 0\n}));\n\nconst DiffContent = styled(\"div\")(({ theme }) => ({\n\tpadding: theme.spacing(0, 1),\n\twhiteSpace: \"pre-wrap\",\n\toverflow: \"hidden\",\n\twordWrap: \"break-word\",\n\tflex: 1\n}));\n\nconst NoDifferencesContainer = styled(\"div\")(({ theme }) => ({\n\tpadding: theme.spacing(2),\n\ttextAlign: \"center\",\n\tcolor: theme.palette.ux.secondary.text.wMain\n}));\n\n// Type definitions for diff changes\ninterface DiffChange {\n\ttype: \"insert\" | \"delete\" | \"normal\";\n\tisInsert?: boolean;\n\tisDelete?: boolean;\n\tisNormal?: boolean;\n\tcontent: string;\n\toldLineNumber?: number;\n\tnewLineNumber?: number;\n\tlineNumber?: number;\n}\n\ninterface DiffHunk {\n\tcontent: string;\n\toldStart: number;\n\tnewStart: number;\n\toldLines: number;\n\tnewLines: number;\n\tchanges: DiffChange[];\n}\n\nexport interface SolaceTextDiffProps extends SolaceComponentProps {\n\t/**\n\t * unique identifier\n\t */\n\tid: string;\n\t/**\n\t * \tText 1 for comparison\n\t */\n\ttext1: string;\n\t/**\n\t * \tText 2 for comparison\n\t */\n\ttext2: string;\n\t/**\n\t * Header content to display above the old text pane.\n\t */\n\ttext1Header?: string | JSX.Element;\n\t/**\n\t * Header content to display above the new text pane.\n\t */\n\ttext2Header?: string | JSX.Element;\n\t/**\n\t * Text to display when there is no content to compare.\n\t * @default 'No content to compare'\n\t */\n\tnoContentText?: string;\n\t/**\n\t * Text to display when there are no differences.\n\t * @default 'No Differences'\n\t */\n\tnoDifferencesText?: string;\n\t/**\n\t * Whether to hide the diff and show the noDifferencesText when there are no differences.\n\t * @default false\n\t */\n\thideWhenNoDifferences?: boolean;\n}\n\nconst createChangesArray = (change: Diff.Change, lines: string[], oldStart: number, newStart: number): DiffChange[] => {\n\tconst type = change.added ? \"insert\" : change.removed ? \"delete\" : \"normal\";\n\n\treturn lines.map((line, i) => {\n\t\tconst diffChange: DiffChange = {\n\t\t\ttype,\n\t\t\tcontent: line\n\t\t};\n\n\t\tif (type === \"insert\") {\n\t\t\tdiffChange.isInsert = true;\n\t\t\tdiffChange.newLineNumber = newStart + i;\n\t\t\tdiffChange.lineNumber = newStart + i;\n\t\t} else if (type === \"delete\") {\n\t\t\tdiffChange.isDelete = true;\n\t\t\tdiffChange.oldLineNumber = oldStart + i;\n\t\t\tdiffChange.lineNumber = oldStart + i;\n\t\t} else {\n\t\t\t// normal\n\t\t\tdiffChange.isNormal = true;\n\t\t\tdiffChange.oldLineNumber = oldStart + i;\n\t\t\tdiffChange.newLineNumber = newStart + i;\n\t\t}\n\t\treturn diffChange;\n\t});\n};\n\nconst getChangeLines = (change: Diff.Change): string[] => {\n\tif (!change.value) {\n\t\treturn [];\n\t}\n\tconst lines = change.value.split(\"\\n\");\n\tif (lines.length > 0 && lines[lines.length - 1] === \"\") {\n\t\tlines.pop();\n\t}\n\treturn lines;\n};\n\nexport default function SolaceTextDiff(props: SolaceTextDiffProps): JSX.Element {\n\tconst {\n\t\tid,\n\t\ttext1,\n\t\ttext2,\n\t\ttext1Header,\n\t\ttext2Header,\n\t\tnoContentText = \"No content to compare\",\n\t\tnoDifferencesText = \"No Differences\",\n\t\thideWhenNoDifferences = false\n\t} = props;\n\n\tconst hunks = React.useMemo((): DiffHunk[] => {\n\t\tconst changes = Diff.diffLines(text1, text2);\n\t\tconst hunks: DiffHunk[] = [];\n\t\tlet oldStart = 1;\n\t\tlet newStart = 1;\n\t\tfor (const change of changes) {\n\t\t\tconst lines = getChangeLines(change);\n\t\t\tif (lines.length === 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst changesArr = createChangesArray(change, lines, oldStart, newStart);\n\n\t\t\tconst hunk: DiffHunk = {\n\t\t\t\tcontent: \"\",\n\t\t\t\toldStart,\n\t\t\t\tnewStart,\n\t\t\t\toldLines: change.added ? 0 : lines.length,\n\t\t\t\tnewLines: change.removed ? 0 : lines.length,\n\t\t\t\tchanges: changesArr\n\t\t\t};\n\t\t\thunks.push(hunk);\n\t\t\tif (!change.added) {\n\t\t\t\toldStart += lines.length;\n\t\t\t}\n\t\t\tif (!change.removed) {\n\t\t\t\tnewStart += lines.length;\n\t\t\t}\n\t\t}\n\t\treturn hunks;\n\t}, [text1, text2]);\n\n\t// Collect all changes from all hunks\n\tconst allChanges = React.useMemo(() => {\n\t\treturn hunks.flatMap((hunk) => hunk.changes);\n\t}, [hunks]);\n\n\t// Helper function to render a single line\n\tconst renderLine = (change: DiffChange, side: \"old\" | \"new\", index: number) => {\n\t\tconst lineNumber = side === \"old\" ? change.oldLineNumber : change.newLineNumber;\n\t\tconst shouldShow = side === \"old\" ? !change.isInsert : !change.isDelete;\n\n\t\tif (!shouldShow) {\n\t\t\treturn (\n\t\t\t\t<DiffLine key={`${side}-empty-${index}`} lineType=\"empty\">\n\t\t\t\t\t<DiffGutter>&nbsp;</DiffGutter>\n\t\t\t\t\t<DiffContent>&nbsp;</DiffContent>\n\t\t\t\t</DiffLine>\n\t\t\t);\n\t\t}\n\n\t\tconst lineType = change.isInsert ? \"insert\" : change.isDelete ? \"delete\" : \"normal\";\n\n\t\treturn (\n\t\t\t<DiffLine key={`${side}-${lineNumber || index}`} lineType={lineType}>\n\t\t\t\t<DiffGutter>{lineNumber || \"\"}</DiffGutter>\n\t\t\t\t<DiffContent>{change.content}</DiffContent>\n\t\t\t</DiffLine>\n\t\t);\n\t};\n\n\tif (!text1 && !text2) {\n\t\treturn (\n\t\t\t<CodeDiffContainer id={`code-diff-${id}`}>\n\t\t\t\t<NoDifferencesContainer>{noContentText}</NoDifferencesContainer>\n\t\t\t</CodeDiffContainer>\n\t\t);\n\t}\n\n\tif (hideWhenNoDifferences && allChanges.every((change) => change.isNormal)) {\n\t\treturn (\n\t\t\t<CodeDiffContainer id={`code-diff-${id}`}>\n\t\t\t\t<NoDifferencesContainer>{noDifferencesText}</NoDifferencesContainer>\n\t\t\t</CodeDiffContainer>\n\t\t);\n\t}\n\n\treturn (\n\t\t<DiffContainer>\n\t\t\t{(text1Header || text2Header) && (\n\t\t\t\t<HeaderContainer>\n\t\t\t\t\t<HeaderPane>\n\t\t\t\t\t\t{text1Header && <SolaceStackLabel id={`diff-text1Header-${id}`}>{text1Header}</SolaceStackLabel>}\n\t\t\t\t\t</HeaderPane>\n\t\t\t\t\t<HeaderPane>\n\t\t\t\t\t\t{text2Header && <SolaceStackLabel id={`diff-text2Header-${id}`}>{text2Header}</SolaceStackLabel>}\n\t\t\t\t\t</HeaderPane>\n\t\t\t\t</HeaderContainer>\n\t\t\t)}\n\t\t\t<CodeDiffContainer id={`code-diff-${id}`}>\n\t\t\t\t<DiffSplitView>\n\t\t\t\t\t<DiffPane>{allChanges.map((change, idx) => renderLine(change, \"old\", idx))}</DiffPane>\n\t\t\t\t\t<DiffPane>{allChanges.map((change, idx) => renderLine(change, \"new\", idx))}</DiffPane>\n\t\t\t\t</DiffSplitView>\n\t\t\t</CodeDiffContainer>\n\t\t</DiffContainer>\n\t);\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import {a}from'./chunk-ROSPS5NM.modern.mjs';import {wa}from'./chunk-IHSXSGCC.modern.mjs';import*as T from'diff';import y from'react';import {jsx,jsxs}from'react/jsx-runtime';var A=wa("div")({display:"flex",flexDirection:"column",width:"100%"}),I=wa("div")({display:"flex",width:"100%"}),S=wa("div")(({theme:e})=>({flex:1,minWidth:0,padding:e.spacing(1,2,.5,0)})),C=wa("div")(({theme:e})=>({border:`1px solid ${e.palette.ux.secondary.w40}`,borderRadius:e.shape.borderRadius,fontFamily:"monospace",fontSize:"14px",overflow:"hidden"})),R=wa("div")({display:"flex",width:"100%"}),N=wa("div")({flex:1,minWidth:0}),L=wa("div")(({theme:e,lineType:n})=>({display:"flex",minHeight:"1.2em",lineHeight:"1.2em",...n==="insert"&&{backgroundColor:e.palette.ux.success.w10},...n==="delete"&&{backgroundColor:e.palette.ux.warning.w10,mixBlendMode:"multiply"},...n==="empty"&&{backgroundColor:e.palette.ux.error.wMain,opacity:.1}})),k=wa("div")(({theme:e})=>({color:e.palette.ux.secondary.text.wMain,backgroundColor:e.palette.ux.background.w20,textAlign:"center",minWidth:e.spacing(3),padding:e.spacing(0,.5),borderRight:`1px solid ${e.palette.ux.secondary.w40}`,userSelect:"none",flexShrink:0})),v=wa("div")(({theme:e})=>({padding:e.spacing(0,1),whiteSpace:"pre-wrap",overflow:"hidden",wordWrap:"break-word",flex:1})),H=wa("div")(({theme:e})=>({padding:e.spacing(2),textAlign:"center",color:e.palette.ux.secondary.text.wMain})),E=(e,n,l,d)=>{let c=e.added?"insert":e.removed?"delete":"normal";return n.map((D,a)=>{let o={type:c,content:D};return c==="insert"?(o.isInsert=true,o.newLineNumber=d+a,o.lineNumber=d+a):c==="delete"?(o.isDelete=true,o.oldLineNumber=l+a,o.lineNumber=l+a):(o.isNormal=true,o.oldLineNumber=l+a,o.newLineNumber=d+a),o})},G=e=>{if(!e.value)return [];let n=e.value.split(`
2
+ `);return n.length>0&&n[n.length-1]===""&&n.pop(),n};function P(e){let{id:n,text1:l,text2:d,text1Header:c,text2Header:D,noContentText:a$1="No content to compare",noDifferencesText:o="No Differences",hideWhenNoDifferences:$=false}=e,h=y.useMemo(()=>{let t=T.diffLines(l,d),r=[],p=1,m=1;for(let u of t){let s=G(u);if(s.length===0)continue;let M=E(u,s,p,m),W={content:"",oldStart:p,newStart:m,oldLines:u.added?0:s.length,newLines:u.removed?0:s.length,changes:M};r.push(W),u.added||(p+=s.length),u.removed||(m+=s.length);}return r},[l,d]),x=y.useMemo(()=>h.flatMap(t=>t.changes),[h]),w=(t,r,p)=>{let m=r==="old"?t.oldLineNumber:t.newLineNumber;if(!(r==="old"?!t.isInsert:!t.isDelete))return jsxs(L,{lineType:"empty",children:[jsx(k,{children:"\xA0"}),jsx(v,{children:"\xA0"})]},`${r}-empty-${p}`);let s=t.isInsert?"insert":t.isDelete?"delete":"normal";return jsxs(L,{lineType:s,children:[jsx(k,{children:m||""}),jsx(v,{children:t.content})]},`${r}-${m||p}`)};return !l&&!d?jsx(C,{id:`code-diff-${n}`,children:jsx(H,{children:a$1})}):$&&x.every(t=>t.isNormal)?jsx(C,{id:`code-diff-${n}`,children:jsx(H,{children:o})}):jsxs(A,{children:[(c||D)&&jsxs(I,{children:[jsx(S,{children:c&&jsx(a,{id:`diff-text1Header-${n}`,children:c})}),jsx(S,{children:D&&jsx(a,{id:`diff-text2Header-${n}`,children:D})})]}),jsx(C,{id:`code-diff-${n}`,children:jsxs(R,{children:[jsx(N,{children:x.map((t,r)=>w(t,"old",r))}),jsx(N,{children:x.map((t,r)=>w(t,"new",r))})]})})]})}export{P as SolaceTextDiff};//# sourceMappingURL=textDiff.modern.mjs.map
3
+ //# sourceMappingURL=textDiff.modern.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/SolaceTextDiff.tsx"],"names":["DiffContainer","styled_default","HeaderContainer","HeaderPane","theme","CodeDiffContainer","DiffSplitView","DiffPane","DiffLine","lineType","DiffGutter","DiffContent","NoDifferencesContainer","createChangesArray","change","lines","oldStart","newStart","type","line","i","diffChange","getChangeLines","SolaceTextDiff","props","id","text1","text2","text1Header","text2Header","noContentText","noDifferencesText","hideWhenNoDifferences","hunks","React","changes","changesArr","hunk","allChanges","renderLine","side","index","lineNumber","jsxs","jsx","SolaceStackLabel_default","idx"],"mappings":"8KAuBA,IAAMA,CAAAA,CAAgBC,EAAAA,CAAO,KAAK,CAAA,CAAE,CACnC,QAAS,MAAA,CACT,aAAA,CAAe,QAAA,CACf,KAAA,CAAO,MACR,CAAC,CAAA,CAEKC,EAAkBD,EAAAA,CAAO,KAAK,EAAE,CACrC,OAAA,CAAS,OACT,KAAA,CAAO,MACR,CAAC,CAAA,CAEKE,CAAAA,CAAaF,GAAO,KAAK,CAAA,CAAE,CAAC,CAAE,KAAA,CAAAG,CAAM,CAAA,IAAO,CAChD,IAAA,CAAM,CAAA,CACN,SAAU,CAAA,CACV,OAAA,CAASA,EAAM,OAAA,CAAQ,CAAA,CAAG,CAAA,CAAG,EAAA,CAAK,CAAC,CACpC,CAAA,CAAE,EAEIC,CAAAA,CAAoBJ,EAAAA,CAAO,KAAK,CAAA,CAAE,CAAC,CAAE,KAAA,CAAAG,CAAM,CAAA,IAAO,CACvD,OAAQ,CAAA,UAAA,EAAaA,CAAAA,CAAM,QAAQ,EAAA,CAAG,SAAA,CAAU,GAAG,CAAA,CAAA,CACnD,YAAA,CAAcA,EAAM,KAAA,CAAM,YAAA,CAC1B,WAAY,WAAA,CACZ,QAAA,CAAU,OACV,QAAA,CAAU,QACX,CAAA,CAAE,CAAA,CAEIE,EAAgBL,EAAAA,CAAO,KAAK,EAAE,CACnC,OAAA,CAAS,OACT,KAAA,CAAO,MACR,CAAC,CAAA,CAEKM,EAAWN,EAAAA,CAAO,KAAK,EAAE,CA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,CAAWzB,EAAQ,KAAA,CAAOgC,CAAG,CAAC,CAAA,CAAE,EAC3EF,GAAAA,CAACrC,CAAAA,CAAA,CAAU,QAAA,CAAA+B,CAAAA,CAAW,IAAI,CAACxB,CAAAA,CAAQgC,IAAQP,CAAAA,CAAWzB,CAAAA,CAAQ,MAAOgC,CAAG,CAAC,EAAE,CAAA,CAAA,CAC5E,CAAA,CACD,GACD,CAEF","file":"textDiff.modern.mjs","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { styled } from \"@mui/material\";\nimport * as Diff from \"diff\";\nimport React from \"react\";\n\nimport SolaceComponentProps from \"./SolaceComponentProps\";\nimport SolaceStackLabel from \"./form/SolaceStackLabel\";\n\nconst DiffContainer = styled(\"div\")({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\twidth: \"100%\"\n});\n\nconst HeaderContainer = styled(\"div\")({\n\tdisplay: \"flex\",\n\twidth: \"100%\"\n});\n\nconst HeaderPane = styled(\"div\")(({ theme }) => ({\n\tflex: 1,\n\tminWidth: 0,\n\tpadding: theme.spacing(1, 2, 0.5, 0)\n}));\n\nconst CodeDiffContainer = styled(\"div\")(({ theme }) => ({\n\tborder: `1px solid ${theme.palette.ux.secondary.w40}`,\n\tborderRadius: theme.shape.borderRadius,\n\tfontFamily: \"monospace\",\n\tfontSize: \"14px\",\n\toverflow: \"hidden\"\n}));\n\nconst DiffSplitView = styled(\"div\")({\n\tdisplay: \"flex\",\n\twidth: \"100%\"\n});\n\nconst DiffPane = styled(\"div\")({\n\tflex: 1,\n\tminWidth: 0\n});\n\nconst DiffLine = styled(\"div\")<{ lineType: \"normal\" | \"insert\" | \"delete\" | \"empty\" }>(({ theme, lineType }) => ({\n\tdisplay: \"flex\",\n\tminHeight: \"1.2em\",\n\tlineHeight: \"1.2em\",\n\t...(lineType === \"insert\" && {\n\t\tbackgroundColor: theme.palette.ux.success.w10\n\t}),\n\t...(lineType === \"delete\" && {\n\t\tbackgroundColor: theme.palette.ux.warning.w10,\n\t\tmixBlendMode: \"multiply\"\n\t}),\n\t...(lineType === \"empty\" && {\n\t\tbackgroundColor: theme.palette.ux.error.wMain,\n\t\topacity: 0.1\n\t})\n}));\n\nconst DiffGutter = styled(\"div\")(({ theme }) => ({\n\tcolor: theme.palette.ux.secondary.text.wMain,\n\tbackgroundColor: theme.palette.ux.background.w20,\n\ttextAlign: \"center\",\n\tminWidth: theme.spacing(3),\n\tpadding: theme.spacing(0, 0.5),\n\tborderRight: `1px solid ${theme.palette.ux.secondary.w40}`,\n\tuserSelect: \"none\",\n\tflexShrink: 0\n}));\n\nconst DiffContent = styled(\"div\")(({ theme }) => ({\n\tpadding: theme.spacing(0, 1),\n\twhiteSpace: \"pre-wrap\",\n\toverflow: \"hidden\",\n\twordWrap: \"break-word\",\n\tflex: 1\n}));\n\nconst NoDifferencesContainer = styled(\"div\")(({ theme }) => ({\n\tpadding: theme.spacing(2),\n\ttextAlign: \"center\",\n\tcolor: theme.palette.ux.secondary.text.wMain\n}));\n\n// Type definitions for diff changes\ninterface DiffChange {\n\ttype: \"insert\" | \"delete\" | \"normal\";\n\tisInsert?: boolean;\n\tisDelete?: boolean;\n\tisNormal?: boolean;\n\tcontent: string;\n\toldLineNumber?: number;\n\tnewLineNumber?: number;\n\tlineNumber?: number;\n}\n\ninterface DiffHunk {\n\tcontent: string;\n\toldStart: number;\n\tnewStart: number;\n\toldLines: number;\n\tnewLines: number;\n\tchanges: DiffChange[];\n}\n\nexport interface SolaceTextDiffProps extends SolaceComponentProps {\n\t/**\n\t * unique identifier\n\t */\n\tid: string;\n\t/**\n\t * \tText 1 for comparison\n\t */\n\ttext1: string;\n\t/**\n\t * \tText 2 for comparison\n\t */\n\ttext2: string;\n\t/**\n\t * Header content to display above the old text pane.\n\t */\n\ttext1Header?: string | JSX.Element;\n\t/**\n\t * Header content to display above the new text pane.\n\t */\n\ttext2Header?: string | JSX.Element;\n\t/**\n\t * Text to display when there is no content to compare.\n\t * @default 'No content to compare'\n\t */\n\tnoContentText?: string;\n\t/**\n\t * Text to display when there are no differences.\n\t * @default 'No Differences'\n\t */\n\tnoDifferencesText?: string;\n\t/**\n\t * Whether to hide the diff and show the noDifferencesText when there are no differences.\n\t * @default false\n\t */\n\thideWhenNoDifferences?: boolean;\n}\n\nconst createChangesArray = (change: Diff.Change, lines: string[], oldStart: number, newStart: number): DiffChange[] => {\n\tconst type = change.added ? \"insert\" : change.removed ? \"delete\" : \"normal\";\n\n\treturn lines.map((line, i) => {\n\t\tconst diffChange: DiffChange = {\n\t\t\ttype,\n\t\t\tcontent: line\n\t\t};\n\n\t\tif (type === \"insert\") {\n\t\t\tdiffChange.isInsert = true;\n\t\t\tdiffChange.newLineNumber = newStart + i;\n\t\t\tdiffChange.lineNumber = newStart + i;\n\t\t} else if (type === \"delete\") {\n\t\t\tdiffChange.isDelete = true;\n\t\t\tdiffChange.oldLineNumber = oldStart + i;\n\t\t\tdiffChange.lineNumber = oldStart + i;\n\t\t} else {\n\t\t\t// normal\n\t\t\tdiffChange.isNormal = true;\n\t\t\tdiffChange.oldLineNumber = oldStart + i;\n\t\t\tdiffChange.newLineNumber = newStart + i;\n\t\t}\n\t\treturn diffChange;\n\t});\n};\n\nconst getChangeLines = (change: Diff.Change): string[] => {\n\tif (!change.value) {\n\t\treturn [];\n\t}\n\tconst lines = change.value.split(\"\\n\");\n\tif (lines.length > 0 && lines[lines.length - 1] === \"\") {\n\t\tlines.pop();\n\t}\n\treturn lines;\n};\n\nexport default function SolaceTextDiff(props: SolaceTextDiffProps): JSX.Element {\n\tconst {\n\t\tid,\n\t\ttext1,\n\t\ttext2,\n\t\ttext1Header,\n\t\ttext2Header,\n\t\tnoContentText = \"No content to compare\",\n\t\tnoDifferencesText = \"No Differences\",\n\t\thideWhenNoDifferences = false\n\t} = props;\n\n\tconst hunks = React.useMemo((): DiffHunk[] => {\n\t\tconst changes = Diff.diffLines(text1, text2);\n\t\tconst hunks: DiffHunk[] = [];\n\t\tlet oldStart = 1;\n\t\tlet newStart = 1;\n\t\tfor (const change of changes) {\n\t\t\tconst lines = getChangeLines(change);\n\t\t\tif (lines.length === 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst changesArr = createChangesArray(change, lines, oldStart, newStart);\n\n\t\t\tconst hunk: DiffHunk = {\n\t\t\t\tcontent: \"\",\n\t\t\t\toldStart,\n\t\t\t\tnewStart,\n\t\t\t\toldLines: change.added ? 0 : lines.length,\n\t\t\t\tnewLines: change.removed ? 0 : lines.length,\n\t\t\t\tchanges: changesArr\n\t\t\t};\n\t\t\thunks.push(hunk);\n\t\t\tif (!change.added) {\n\t\t\t\toldStart += lines.length;\n\t\t\t}\n\t\t\tif (!change.removed) {\n\t\t\t\tnewStart += lines.length;\n\t\t\t}\n\t\t}\n\t\treturn hunks;\n\t}, [text1, text2]);\n\n\t// Collect all changes from all hunks\n\tconst allChanges = React.useMemo(() => {\n\t\treturn hunks.flatMap((hunk) => hunk.changes);\n\t}, [hunks]);\n\n\t// Helper function to render a single line\n\tconst renderLine = (change: DiffChange, side: \"old\" | \"new\", index: number) => {\n\t\tconst lineNumber = side === \"old\" ? change.oldLineNumber : change.newLineNumber;\n\t\tconst shouldShow = side === \"old\" ? !change.isInsert : !change.isDelete;\n\n\t\tif (!shouldShow) {\n\t\t\treturn (\n\t\t\t\t<DiffLine key={`${side}-empty-${index}`} lineType=\"empty\">\n\t\t\t\t\t<DiffGutter>&nbsp;</DiffGutter>\n\t\t\t\t\t<DiffContent>&nbsp;</DiffContent>\n\t\t\t\t</DiffLine>\n\t\t\t);\n\t\t}\n\n\t\tconst lineType = change.isInsert ? \"insert\" : change.isDelete ? \"delete\" : \"normal\";\n\n\t\treturn (\n\t\t\t<DiffLine key={`${side}-${lineNumber || index}`} lineType={lineType}>\n\t\t\t\t<DiffGutter>{lineNumber || \"\"}</DiffGutter>\n\t\t\t\t<DiffContent>{change.content}</DiffContent>\n\t\t\t</DiffLine>\n\t\t);\n\t};\n\n\tif (!text1 && !text2) {\n\t\treturn (\n\t\t\t<CodeDiffContainer id={`code-diff-${id}`}>\n\t\t\t\t<NoDifferencesContainer>{noContentText}</NoDifferencesContainer>\n\t\t\t</CodeDiffContainer>\n\t\t);\n\t}\n\n\tif (hideWhenNoDifferences && allChanges.every((change) => change.isNormal)) {\n\t\treturn (\n\t\t\t<CodeDiffContainer id={`code-diff-${id}`}>\n\t\t\t\t<NoDifferencesContainer>{noDifferencesText}</NoDifferencesContainer>\n\t\t\t</CodeDiffContainer>\n\t\t);\n\t}\n\n\treturn (\n\t\t<DiffContainer>\n\t\t\t{(text1Header || text2Header) && (\n\t\t\t\t<HeaderContainer>\n\t\t\t\t\t<HeaderPane>\n\t\t\t\t\t\t{text1Header && <SolaceStackLabel id={`diff-text1Header-${id}`}>{text1Header}</SolaceStackLabel>}\n\t\t\t\t\t</HeaderPane>\n\t\t\t\t\t<HeaderPane>\n\t\t\t\t\t\t{text2Header && <SolaceStackLabel id={`diff-text2Header-${id}`}>{text2Header}</SolaceStackLabel>}\n\t\t\t\t\t</HeaderPane>\n\t\t\t\t</HeaderContainer>\n\t\t\t)}\n\t\t\t<CodeDiffContainer id={`code-diff-${id}`}>\n\t\t\t\t<DiffSplitView>\n\t\t\t\t\t<DiffPane>{allChanges.map((change, idx) => renderLine(change, \"old\", idx))}</DiffPane>\n\t\t\t\t\t<DiffPane>{allChanges.map((change, idx) => renderLine(change, \"new\", idx))}</DiffPane>\n\t\t\t\t</DiffSplitView>\n\t\t\t</CodeDiffContainer>\n\t\t</DiffContainer>\n\t);\n}\n"]}
@@ -35,6 +35,10 @@ const componentMigrations = {
35
35
 
36
36
  // Drag and Drop components
37
37
  'SolaceAttributeValuePairForm': '@SolaceDev/maas-react-components/drag-drop',
38
+
39
+ // Text Diff components
40
+ 'SolaceTextDiff': '@SolaceDev/maas-react-components/textDiff',
41
+ 'SolaceTextDiffProps': '@SolaceDev/maas-react-components/textDiff',
38
42
  };
39
43
 
40
44
  // Map of entry points to their required peer dependencies with exact versions
@@ -48,8 +52,8 @@ const peerDependencies = {
48
52
  installCmd: 'npm install recharts@3.6.0'
49
53
  },
50
54
  '@SolaceDev/maas-react-components/code-editor': {
51
- packages: ['@uiw/react-codemirror@4.25.1', '@codemirror/lang-json@6.0.2', '@codemirror/lang-xml@6.1.0', '@codemirror/language@6.11.3', '@codemirror/view@6.38.1', '@lezer/highlight@1.2.1'],
52
- installCmd: 'npm install @uiw/react-codemirror@4.25.1 @codemirror/lang-json@6.0.2 @codemirror/lang-xml@6.1.0 @codemirror/language@6.11.3 @codemirror/view@6.38.1 @lezer/highlight@1.2.1'
55
+ packages: ['@uiw/react-codemirror@4.25.1', '@codemirror/lang-json@6.0.2', '@codemirror/lang-xml@6.1.0', '@codemirror/language@6.11.3', '@codemirror/view@6.38.1', '@codemirror/state@6.5.4', '@lezer/highlight@1.2.1'],
56
+ installCmd: 'npm install @uiw/react-codemirror@4.25.1 @codemirror/lang-json@6.0.2 @codemirror/lang-xml@6.1.0 @codemirror/language@6.11.3 @codemirror/view@6.38.1 @codemirror/state@6.5.4 @lezer/highlight@1.2.1'
53
57
  },
54
58
  '@SolaceDev/maas-react-components/json-schema-form': {
55
59
  packages: ['@rjsf/core@5.24.13', '@rjsf/mui@5.24.13', '@rjsf/utils@5.24.13', '@rjsf/validator-ajv8@5.24.13'],
@@ -58,6 +62,10 @@ const peerDependencies = {
58
62
  '@SolaceDev/maas-react-components/drag-drop': {
59
63
  packages: ['@hello-pangea/dnd@16.6.0'],
60
64
  installCmd: 'npm install @hello-pangea/dnd@16.6.0'
65
+ },
66
+ '@SolaceDev/maas-react-components/textDiff': {
67
+ packages: ['diff@8.0.2'],
68
+ installCmd: 'npm install diff@8.0.2'
61
69
  }
62
70
  };
63
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solace-ui-components",
3
- "version": "17.0.7",
3
+ "version": "18.0.0",
4
4
  "description": "React component library designed for Solace.",
5
5
  "author": "Solace",
6
6
  "license": "Apache-2.0",
@@ -38,36 +38,22 @@
38
38
  "import": "./dist/drag-drop.modern.mjs",
39
39
  "require": "./dist/drag-drop.js"
40
40
  },
41
+ "./textDiff": {
42
+ "types": "./dist/textDiff.d.ts",
43
+ "import": "./dist/textDiff.modern.mjs",
44
+ "require": "./dist/textDiff.js"
45
+ },
41
46
  "./package.json": "./package.json"
42
47
  },
43
48
  "sideEffects": false,
44
49
  "engines": {
45
50
  "node": ">=14"
46
51
  },
47
- "scripts": {
48
- "install:dev": "npm ci && cd storybook/ && npm ci",
49
- "dev:link": "npm link && cd storybook && npm link @SolaceDev/maas-react-components",
50
- "build": "tsup",
51
- "build:dev": "tsup --watch --no-dts --env.NODE_ENV development",
52
- "start": "./scripts/start.sh",
53
- "prepare": "husky install && run-s build",
54
- "test": "cross-env CI=1 react-scripts test --env=jsdom",
55
- "test:build": "run-s build",
56
- "test:lint": "eslint .",
57
- "test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
58
- "test:watch": "react-scripts test --env=jsdom",
59
- "predeploy": "cd example && npm ci && npm run build",
60
- "deploy": "gh-pages -d example/build",
61
- "types": "tsc",
62
- "prettier:fix": "prettier --write .",
63
- "lint:fix": "eslint ./src --fix",
64
- "lint-storybook:fix": "eslint ./storybook/src/stories --fix",
65
- "coverage:merge": "lcov-result-merger 'coverage/lcov*.info' 'coverage/lcov-final.info'"
66
- },
67
52
  "peerDependencies": {
68
53
  "@codemirror/lang-json": "^6.0.2",
69
54
  "@codemirror/lang-xml": "^6.1.0",
70
55
  "@codemirror/language": "^6.11.3",
56
+ "@codemirror/state": "^6.0.0",
71
57
  "@codemirror/view": "^6.38.1",
72
58
  "@hello-pangea/dnd": "^16.6.0",
73
59
  "@lezer/highlight": "^1.2.1",
@@ -77,6 +63,7 @@
77
63
  "@rjsf/utils": "5.24.13",
78
64
  "@rjsf/validator-ajv8": "5.24.13",
79
65
  "@uiw/react-codemirror": "^4.25.1",
66
+ "diff": "^8.0.2",
80
67
  "lodash": "^4.17.21",
81
68
  "moment": "^2.30.1",
82
69
  "moment-timezone": "0.5.48",
@@ -98,6 +85,9 @@
98
85
  "@codemirror/language": {
99
86
  "optional": true
100
87
  },
88
+ "@codemirror/state": {
89
+ "optional": true
90
+ },
101
91
  "@codemirror/view": {
102
92
  "optional": true
103
93
  },
@@ -107,6 +97,9 @@
107
97
  "@lezer/highlight": {
108
98
  "optional": true
109
99
  },
100
+ "diff": {
101
+ "optional": true
102
+ },
110
103
  "@mui/x-date-pickers": {
111
104
  "optional": true
112
105
  },
@@ -148,12 +141,16 @@
148
141
  }
149
142
  },
150
143
  "devDependencies": {
144
+ "@codemirror/commands": "^6.10.2",
151
145
  "@codemirror/lang-json": "^6.0.2",
152
146
  "@codemirror/lang-xml": "^6.1.0",
153
147
  "@codemirror/language": "^6.11.3",
148
+ "@codemirror/state": "^6.5.4",
154
149
  "@codemirror/view": "^6.38.1",
155
150
  "@hello-pangea/dnd": "^16.6.0",
156
151
  "@lezer/highlight": "^1.2.1",
152
+ "@mui/styled-engine": "^7.3.8",
153
+ "@mui/system": "^7.3.8",
157
154
  "@mui/x-date-pickers": "^7.29.4",
158
155
  "@rjsf/core": "5.24.13",
159
156
  "@rjsf/mui": "5.24.13",
@@ -175,8 +172,9 @@
175
172
  "@uiw/react-codemirror": "^4.25.1",
176
173
  "attr-accept": "^2.2.2",
177
174
  "babel-eslint": "^10.1.0",
175
+ "clsx": "^2.1.1",
178
176
  "cross-env": "^7.0.3",
179
- "diff": "^8.0.2",
177
+ "diff": "8.0.2",
180
178
  "eslint": "^8.53.0",
181
179
  "eslint-config-prettier": "^9.0.0",
182
180
  "eslint-plugin-react": "^7.33.2",
@@ -206,12 +204,12 @@
206
204
  "typescript": "5.3.3"
207
205
  },
208
206
  "dependencies": {
207
+ "@SolaceDev/maas-icons": "^0.2.154",
209
208
  "@emotion/react": "11.13.5",
210
209
  "@emotion/styled": "11.13.5",
211
210
  "@mui/base": "^5.0.0-beta.70",
212
211
  "@mui/icons-material": "^6.1.9",
213
212
  "@mui/material": "^6.1.9",
214
- "@SolaceDev/maas-icons": "^0.2.154",
215
213
  "ajv": "^8.12.0"
216
214
  },
217
215
  "files": [
@@ -221,32 +219,29 @@
221
219
  "THIRD_PARTY_LICENSES.txt",
222
220
  "migrate-imports.js"
223
221
  ],
224
- "overrides": {
225
- "redux": "^5.0.1",
226
- "@rjsf/core": {
227
- "react": "$react",
228
- "react-dom": "$react-dom"
229
- },
230
- "@rjsf/mui": {
231
- "react": "$react",
232
- "react-dom": "$react-dom",
233
- "@mui/material": "$@mui/material",
234
- "@mui/icons-material": "$@mui/icons-material"
235
- },
236
- "@rjsf/utils": {
237
- "react": "$react",
238
- "react-dom": "$react-dom"
239
- },
240
- "@rjsf/validator-ajv8": {
241
- "react": "$react",
242
- "react-dom": "$react-dom"
243
- }
244
- },
245
222
  "lint-staged": {
246
223
  "*.{tsx,ts}": [
247
224
  "eslint --cache --fix"
248
225
  ],
249
226
  "*.{ts,tsx,css,md}": "prettier --write"
250
227
  },
251
- "homepage": "https://solace.dev"
252
- }
228
+ "homepage": "https://solace.dev",
229
+ "scripts": {
230
+ "preinstall": "npx only-allow pnpm",
231
+ "install:dev": "pnpm install && cd storybook/ && pnpm install",
232
+ "dev:link": "pnpm link -g && cd storybook && pnpm link -g @SolaceDev/maas-react-components",
233
+ "build": "tsup",
234
+ "build:dev": "tsup --watch --no-dts --env.NODE_ENV development",
235
+ "start": "./scripts/start.sh",
236
+ "test": "cross-env CI=1 react-scripts test --env=jsdom",
237
+ "test:build": "run-s build",
238
+ "test:lint": "eslint .",
239
+ "test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
240
+ "test:watch": "react-scripts test --env=jsdom",
241
+ "types": "tsc",
242
+ "prettier:fix": "prettier --write .",
243
+ "lint:fix": "eslint ./src --fix",
244
+ "lint-storybook:fix": "eslint ./storybook/src/stories --fix",
245
+ "coverage:merge": "lcov-result-merger 'coverage/lcov*.info' 'coverage/lcov-final.info'"
246
+ }
247
+ }
@@ -1,2 +0,0 @@
1
- 'use strict';var chunk3R3N5YG6_js=require('./chunk-3R3N5YG6.js'),react=require('react'),lodash=require('lodash'),jsxRuntime=require('react/jsx-runtime');var O="text",z="overflow",B="rich",$="html",f={text:O,overflow:z,rich:B,html:$};var q=chunk3R3N5YG6_js.ua("div")(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",position:"relative","&::after":{content:'""',display:"block"}}));function G({id:e,title:t,variant:o=f.text,children:l,placement:L="bottom",maxWidth:T="small",disableFocusListener:H=false,disableHoverListener:V=false,enterDelay:W=500,enterNextDelay:X=0,leaveDelay:M=0,open:J,onOpen:c,onClose:C,dataQa:R,dataTags:Z}){let[_,u]=react.useState(false),p=react.useRef(null),D=react.useCallback(x=>{if(lodash.isEmpty(t))return;let E=true;o==="overflow"&&p.current&&p.current.scrollWidth<=p.current.clientWidth&&(E=false),E&&(u(true),c&&c(x));},[c,t,o]),F=react.useCallback(x=>{u(false),C&&C(x);},[C]);return jsxRuntime.jsx(chunk3R3N5YG6_js.zg,{id:e,title:t??"",classes:{tooltip:`${o===f.html||o===f.rich?"htmlContent":""} ${T?T+"Width":""}`},placement:L,"data-qa":R,"data-tags":Z,disableFocusListener:H,disableHoverListener:V,enterDelay:W,enterNextDelay:X,leaveDelay:M,TransitionComponent:chunk3R3N5YG6_js.sc,TransitionProps:{timeout:{enter:150,exit:200}},open:J??_,onOpen:D,onClose:F,children:o==="overflow"?jsxRuntime.jsx(q,{ref:p,children:l}):typeof l=="string"?jsxRuntime.jsx("span",{children:l}):l})}var x1=G;function K({children:e}){let t=chunk3R3N5YG6_js.sa();return jsxRuntime.jsx(chunk3R3N5YG6_js.je,{sx:{color:t.palette.ux.secondary.text.wMain,fontSize:t.typography.caption.fontSize,marginTop:"2px"},children:e})}var T1=K;function P({size:e,fill:t}){return jsxRuntime.jsxs(chunk3R3N5YG6_js.La,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.208 14.784C11.2827 14.8587 11.3733 14.896 11.48 14.896H12.776C12.8933 14.896 12.984 14.8587 13.048 14.784C13.1227 14.7093 13.16 14.6187 13.16 14.512V7.184C13.16 7.06667 13.1227 6.976 13.048 6.912C12.984 6.83733 12.8933 6.8 12.776 6.8H11.48C11.3733 6.8 11.2827 6.83733 11.208 6.912C11.1333 6.98667 11.096 7.07733 11.096 7.184V14.512C11.096 14.6187 11.1333 14.7093 11.208 14.784Z",fill:t}),jsxRuntime.jsx("path",{d:"M11.112 17.888C11.1867 17.9627 11.2773 18 11.384 18H12.872C12.9893 18 13.0853 17.9627 13.16 17.888C13.2347 17.8133 13.272 17.7227 13.272 17.616V16.128C13.272 16.0107 13.2347 15.9147 13.16 15.84C13.0853 15.7653 12.9893 15.728 12.872 15.728H11.384C11.2773 15.728 11.1867 15.7653 11.112 15.84C11.0373 15.9147 11 16.0107 11 16.128V17.616C11 17.7227 11.0373 17.8133 11.112 17.888Z",fill:t}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12Z",fill:t})]})}var Y=chunk3R3N5YG6_js.ua(chunk3R3N5YG6_js.H)(({theme:e})=>({...e.mixins.formComponent_ErrorText.container})),j=chunk3R3N5YG6_js.ua(chunk3R3N5YG6_js.je)(({theme:e})=>({...e.mixins.formComponent_ErrorText.label}));function e1({children:e}){let t=chunk3R3N5YG6_js.sa(),o=t.typography.subtitle1.fontSize?.toString();return jsxRuntime.jsxs(Y,{children:[jsxRuntime.jsx(P,{size:o?parseInt(o):chunk3R3N5YG6_js.ki.md,fill:t.palette.ux.error.wMain}),jsxRuntime.jsx(j,{children:e})]})}var L1=e1;function w({size:e,fill:t}){return jsxRuntime.jsxs(chunk3R3N5YG6_js.La,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.8746 14.996C11.9493 15.0706 12.04 15.108 12.1466 15.108H13.4426C13.56 15.108 13.6506 15.0706 13.7146 14.996C13.7893 14.9213 13.8266 14.8306 13.8266 14.724V10.396C13.8266 10.2786 13.7893 10.188 13.7146 10.124C13.6506 10.0493 13.56 10.012 13.4426 10.012H12.1466C12.04 10.012 11.9493 10.0493 11.8746 10.124C11.8 10.1986 11.7626 10.2893 11.7626 10.396V14.724C11.7626 14.8306 11.8 14.9213 11.8746 14.996Z",fill:t}),jsxRuntime.jsx("path",{d:"M11.7786 18.1C11.8533 18.1746 11.944 18.212 12.0506 18.212H13.5386C13.656 18.212 13.752 18.1746 13.8266 18.1C13.9013 18.0253 13.9386 17.9346 13.9386 17.828V16.34C13.9386 16.2226 13.9013 16.1266 13.8266 16.052C13.752 15.9773 13.656 15.94 13.5386 15.94H12.0506C11.944 15.94 11.8533 15.9773 11.7786 16.052C11.704 16.1266 11.6666 16.2226 11.6666 16.34V17.828C11.6666 17.9346 11.704 18.0253 11.7786 18.1Z",fill:t}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7919 3.79001C12.1726 3.10304 13.1604 3.10304 13.5411 3.79001L22.2358 19.4772C22.6053 20.1437 22.1233 20.962 21.3612 20.962H3.97177C3.20973 20.962 2.72771 20.1437 3.09713 19.4772L11.7919 3.79001ZM5.66936 18.962L12.6665 6.3376L19.6636 18.962H5.66936Z",fill:t})]})}var r1=chunk3R3N5YG6_js.ua(chunk3R3N5YG6_js.H)(({theme:e})=>({...e.mixins.formComponent_WarningText.container})),n1=chunk3R3N5YG6_js.ua(chunk3R3N5YG6_js.je)(({theme:e})=>({...e.mixins.formComponent_WarningText.label}));function i1({children:e}){let t=chunk3R3N5YG6_js.sa(),o=t.typography.subtitle1.fontSize?.toString();return jsxRuntime.jsxs(r1,{children:[jsxRuntime.jsx(w,{size:o?parseInt(o):chunk3R3N5YG6_js.ki.md,fill:t.palette.ux.warning.w100}),jsxRuntime.jsx(n1,{children:e})]})}var D1=i1;exports.a=f;exports.b=x1;exports.c=T1;exports.d=P;exports.e=L1;exports.f=w;exports.g=D1;//# sourceMappingURL=chunk-3NKPHQNZ.js.map
2
- //# sourceMappingURL=chunk-3NKPHQNZ.js.map