solace-ui-components 18.0.0 → 18.0.2

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 (47) hide show
  1. package/dist/charts.js +1 -1
  2. package/dist/charts.modern.mjs +1 -1
  3. package/dist/{chunk-ULYCLLUO.modern.mjs → chunk-54TEARQI.modern.mjs} +2 -2
  4. package/dist/{chunk-ULYCLLUO.modern.mjs.map → chunk-54TEARQI.modern.mjs.map} +1 -1
  5. package/dist/{chunk-2RTZL4CF.modern.mjs → chunk-HQH2WKJP.modern.mjs} +3 -3
  6. package/dist/{chunk-2RTZL4CF.modern.mjs.map → chunk-HQH2WKJP.modern.mjs.map} +1 -1
  7. package/dist/{chunk-IHSXSGCC.modern.mjs → chunk-I7OJ5H4U.modern.mjs} +2 -2
  8. package/dist/{chunk-IHSXSGCC.modern.mjs.map → chunk-I7OJ5H4U.modern.mjs.map} +1 -1
  9. package/dist/{chunk-HLXBN2OE.modern.mjs → chunk-LGBO373S.modern.mjs} +2 -2
  10. package/dist/{chunk-HLXBN2OE.modern.mjs.map → chunk-LGBO373S.modern.mjs.map} +1 -1
  11. package/dist/{chunk-AOKITPX2.js → chunk-PYADJP2I.js} +2 -2
  12. package/dist/{chunk-AOKITPX2.js.map → chunk-PYADJP2I.js.map} +1 -1
  13. package/dist/{chunk-ROSPS5NM.modern.mjs → chunk-QKQRCYG4.modern.mjs} +2 -2
  14. package/dist/{chunk-ROSPS5NM.modern.mjs.map → chunk-QKQRCYG4.modern.mjs.map} +1 -1
  15. package/dist/{chunk-TSSPQLS6.js → chunk-SKQ7JGO5.js} +3 -3
  16. package/dist/{chunk-TSSPQLS6.js.map → chunk-SKQ7JGO5.js.map} +1 -1
  17. package/dist/{chunk-7SKICMGL.js → chunk-SWGQVSXQ.js} +2 -2
  18. package/dist/{chunk-7SKICMGL.js.map → chunk-SWGQVSXQ.js.map} +1 -1
  19. package/dist/{chunk-UFDVHFXE.js → chunk-SXQRCXMP.js} +2 -2
  20. package/dist/{chunk-UFDVHFXE.js.map → chunk-SXQRCXMP.js.map} +1 -1
  21. package/dist/{chunk-4XH33OL7.js → chunk-V45EFIXB.js} +2 -2
  22. package/dist/{chunk-4XH33OL7.js.map → chunk-V45EFIXB.js.map} +1 -1
  23. package/dist/{chunk-QV564WAK.modern.mjs → chunk-VYHLNTMX.modern.mjs} +2 -2
  24. package/dist/{chunk-QV564WAK.modern.mjs.map → chunk-VYHLNTMX.modern.mjs.map} +1 -1
  25. package/dist/chunk-YQTPPT5K.js +2 -0
  26. package/dist/{chunk-GDZZVHFP.js.map → chunk-YQTPPT5K.js.map} +1 -1
  27. package/dist/code-editor.d.mts +7 -2
  28. package/dist/code-editor.d.ts +7 -2
  29. package/dist/code-editor.js +2 -2
  30. package/dist/code-editor.js.map +1 -1
  31. package/dist/code-editor.modern.mjs +2 -2
  32. package/dist/code-editor.modern.mjs.map +1 -1
  33. package/dist/datepicker.js +1 -1
  34. package/dist/datepicker.modern.mjs +1 -1
  35. package/dist/drag-drop.js +1 -1
  36. package/dist/drag-drop.modern.mjs +1 -1
  37. package/dist/index.js +58 -58
  38. package/dist/index.js.map +1 -1
  39. package/dist/index.modern.mjs +55 -55
  40. package/dist/index.modern.mjs.map +1 -1
  41. package/dist/json-schema-form.js +1 -1
  42. package/dist/json-schema-form.modern.mjs +1 -1
  43. package/dist/textDiff.js +2 -2
  44. package/dist/textDiff.modern.mjs +1 -1
  45. package/migrate-imports.js +85 -75
  46. package/package.json +12 -5
  47. package/dist/chunk-GDZZVHFP.js +0 -2
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkTSSPQLS6_js=require('./chunk-TSSPQLS6.js'),chunkAOKITPX2_js=require('./chunk-AOKITPX2.js'),chunkUFDVHFXE_js=require('./chunk-UFDVHFXE.js');require('./chunk-7SKICMGL.js'),require('./chunk-GDZZVHFP.js');var chunk4XH33OL7_js=require('./chunk-4XH33OL7.js'),mui=require('@rjsf/mui'),lodash=require('lodash'),react=require('react'),jsxRuntime=require('react/jsx-runtime'),validatorAjv8=require('@rjsf/validator-ajv8'),de=require('ajv/dist/2020');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var de__default=/*#__PURE__*/_interopDefault(de);var _=({size:e=24,fill:r=""})=>{let o=chunk4XH33OL7_js.ua();return jsxRuntime.jsxs(chunk4XH33OL7_js.Na,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsxRuntime.jsx("g",{clipPath:"url(#clip0_3496_34902)",children:jsxRuntime.jsx("path",{d:"M16.34 12.28C15.94 10.78 14.73 9.55999 13.22 9.15999C12.74 9.02999 12.26 8.97999 11.8 9.00999L16.49 13.7C16.52 13.24 16.47 12.76 16.34 12.28ZM15.82 15.85L8.62999 8.65999L7.10999 7.13999L3.69999 3.72999C3.54999 3.57999 3.28999 3.57999 3.13999 3.72999L2.28999 4.58999C2.13999 4.73999 2.13999 4.99999 2.28999 5.14999L5.37999 8.23999C3.99999 9.32999 2.86999 10.76 2.03999 12.43C1.90999 12.69 2.10999 13 2.39999 13H3.76999C3.90999 13 4.03999 12.92 4.10999 12.8C4.84999 11.54 5.75999 10.49 6.82999 9.68999L8.21999 11.08C7.56999 12.09 7.30999 13.38 7.65999 14.72C8.05999 16.22 9.27999 17.44 10.78 17.84C12.12 18.2 13.41 17.93 14.42 17.28L19.46 22.32C19.61 22.47 19.87 22.47 20.02 22.32L20.87 21.47C21.02 21.32 21.02 21.06 20.87 20.91L15.82 15.85ZM21.96 12.43C20.05 8.60999 16.59 5.99999 12 5.99999C11 5.99999 10.05 6.12999 9.15999 6.36999L10.87 8.06999C11.23 8.01999 11.61 7.99999 12 7.99999C15.52 7.99999 18.16 9.83999 19.89 12.8C19.96 12.92 20.08 13 20.22 13H21.48C21.89 13 22.09 12.69 21.96 12.43Z",fill:r||o.palette.ux.secondary.wMain})}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_3496_34902",children:jsxRuntime.jsx("rect",{width:e,height:e,fill:o.palette.ux.background.w10})})})]})};var Z=({size:e=24,fill:r=""})=>{let o=chunk4XH33OL7_js.ua();return jsxRuntime.jsxs(chunk4XH33OL7_js.Na,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsxRuntime.jsx("g",{clipPath:"url(#clip0_3496_34944)",children:jsxRuntime.jsx("path",{d:"M13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM12.001 6C7.41597 6 3.94897 8.608 2.04097 12.428C1.90997 12.69 2.10997 13 2.40197 13H3.77397C3.91497 13 4.04397 12.923 4.11497 12.801C5.83797 9.837 8.47897 8 12.001 8C15.523 8 18.164 9.838 19.888 12.802C19.958 12.923 20.083 13 20.223 13H21.476C21.892 13 22.091 12.689 21.96 12.426C20.052 8.607 16.585 6 12.001 6ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162Z",fill:r||o.palette.ux.secondary.wMain})}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_3496_34944",children:jsxRuntime.jsx("rect",{width:e,height:e,fill:o.palette.ux.background.w10})})})]})};var $="-",z="**********",B=(e,r)=>{let o=r.value;lodash.isEmpty(lodash.toString(o))?e.onChange(void 0):e.onChange(o);},ee=e=>e.options?.format==="password"||e.format==="password",oe=(e,r,o=false)=>o&&e.maxLength?r.length:e.maxLength,q=function(e,r,o){let i=r?r(e):e,{disabled:t,label:g,name:f,readonly:n,required:h,schema:a,value:m}=i,y=i["x-custom-error"]??"",S=n?"":y||a.description,s=ee(a),[d,c]=react.useState(false),x=react.useMemo(()=>n&&s&&!m&&o?.(a,i),[s,i,n,a,o,m]),F=react.useMemo(()=>{let l=m??"";return n?s?x?l=$:l=d?l:z:l=l||$:a.const&&(l=a.const),l},[m,n,a.const,s,d,x]),b=react.useMemo(()=>{if(s&&!x)return [jsxRuntime.jsx(chunkAOKITPX2_js.b,{variant:"icon",onClick:()=>c(!d),dataQa:d?"showPasswordButton":"hidePasswordButton",children:d?jsxRuntime.jsx(_,{}):jsxRuntime.jsx(Z,{})},d?"eyeIcon":"hideEyeIcon")]},[s,d,x]),C=oe(a,F,n);return jsxRuntime.jsxs(chunk4XH33OL7_js.Ic,{sx:{display:s?"grid":"block",gridTemplateColumns:"1fr auto",alignItems:"flex-end",overflow:"hidden"},children:[C&&C>100?jsxRuntime.jsx(chunkTSSPQLS6_js.o,{name:f,label:g,onChange:l=>B(i,l),value:F,readOnly:n,required:h&&!n,disabled:t,width:"100%",maxLength:C+1,hasErrors:!!y,helperText:S,placeholder:a.placeholder??"",dataQa:`${g}-form-textArea`}):jsxRuntime.jsx(chunkUFDVHFXE_js.d,{type:s&&!d?"password":"text",label:g,name:f,onChange:l=>B(i,l),value:F,readOnly:n,required:h&&!n,disabled:t,endAdornment:n?void 0:b,hasErrors:!!y,helperText:S,placeholder:a.placeholder??"",dataQa:`${g}-form-textField`}),n&&b?jsxRuntime.jsx(chunk4XH33OL7_js.Ic,{ml:1,children:b}):null]})},re=function(e,r){let o=r?r(e):e,{disabled:i,id:t,label:g,name:f,options:n,readonly:h,required:a,schema:m,title:y,value:S}=o,s=o["x-custom-error"]??"",d=h?"":s||m.description;return n.enumOptions!==void 0?jsxRuntime.jsx(chunk4XH33OL7_js.Ic,{mb:o.id.includes("oneof")?2:0,children:jsxRuntime.jsx(chunkTSSPQLS6_js.n,{label:g,name:f,onChange:c=>B(o,c),value:S,readOnly:h,required:a&&!h,disabled:i,title:y,id:t,hasErrors:!!s,helperText:d,dataQa:`${t}-form-select`,children:n.enumOptions.map(c=>jsxRuntime.jsx(chunk4XH33OL7_js.yf,{value:c.value,children:c.label},c.label))})}):jsxRuntime.jsx(jsxRuntime.Fragment,{})},te=function(e,r){let o=r?r(e):e,{disabled:i,label:t,name:g,readonly:f,required:n,schema:h,value:a}=o,m=o["x-custom-error"]??"",y=f?"":m||h.description;return jsxRuntime.jsx(chunkTSSPQLS6_js.l,{name:g,label:t,onChange:S=>o.onChange(S.value),readOnly:f,required:n&&!f,disabled:i,checked:a,hasErrors:!!m,helperText:y,dataQa:`${t}-form-checkbox`})};function ie(e,r){let o=r?r(e):e,{description:i,id:t}=o;return i==="x-custom-hidden"?null:jsxRuntime.jsx(chunkTSSPQLS6_js.m,{id:t,children:i})}function ne(e,r){let o=r?r(e):e,{id:i,title:t}=o;return t==="x-custom-hidden"?null:jsxRuntime.jsx(chunkTSSPQLS6_js.m,{id:i,variant:"h5",children:t})}var j=(e,r)=>({DescriptionFieldTemplate:o=>ie(o,e),TitleFieldTemplate:o=>ne(o,r)}),N=(e,r)=>({CheckboxWidget:o=>te(o,e),SelectWidget:o=>re(o,e),TextWidget:o=>q(o,e,r),PasswordWidget:o=>q(o,e,r)});var ce=chunk4XH33OL7_js.wa(mui.Form)(({theme:e})=>({".solaceJsonSchemaForm":{maxWidth:"585px",".MuiTypography-root":{padding:e.spacing(3,0),"&.MuiTypography-caption":{display:"none"}},".MuiFormControl-root":{".MuiGrid-root":{padding:0,margin:"0 16px 0 0 !important"},".form-group.field":{paddingBottom:e.spacing(2),"&.field-error ul":{display:"none"},".MuiBox-root":{"label .MuiFormLabel-asterisk":{display:"none"},"label[for] .MuiFormLabel-asterisk":{display:"inline"}}},".form-group.field-array":{".MuiPaper-root":{boxShadow:"none",border:`1px solid ${e.palette.ux.secondary.w20}`,padding:0,margin:e.spacing(1,0,0,0)},".MuiTypography-root":{padding:e.spacing(1,0)},".form-group.field":{paddingBottom:e.spacing(2),"&.field-object":{paddingBottom:0}}}}}})),me=e=>{let r;return e?.length>0&&(e.includes("*")||e.push("*"),r=e),r},J=(e,r,o)=>{if(!o)return;let i=o.properties;if(i)for(let t in i)r[t]={"ui:hideError":true},e("property",t,i[t])?r[t]["ui:widget"]="hidden":e("description",t,i[t])&&(r[t]["ui:description"]="x-custom-hidden"),i[t]&&typeof i[t]=="object"&&(r[t]||(r[t]={}),J(e,r[t],i[t]));else if(typeof o=="object")for(let t in o)J(e,r,o[t]);};function ue({formItem:e,formData:r={},formOptions:o={},readOnly:i=false,disabled:t=false,formRef:g,liveValidate:f=true,onChange:n,transformDescription:h,transformError:a,transformWidget:m,transformTitle:y,ajvClass:S}){let s=e.schema,{order:d,isHidden:c,shouldShowEmptyValueForSensitiveField:x,tagName:F}=o,b=validatorAjv8.customizeValidator({AjvClass:S??de__default.default}),C={"ui:classNames":"solaceJsonSchemaForm"};C["ui:order"]=me(d),c&&(c("submitButton")&&(C["ui:submitButtonOptions"]={norender:true}),c("title")&&(C["ui:options"]={label:false}),J(c,C,s));function l(u){let P=m?.(u)??{...u};return u.rawErrors&&u.rawErrors.length>0&&(P["x-custom-error"]=Array.from(new Set(u.rawErrors)).join(", ")),P}function H(u){return a?u.map(P=>a?.(P)??P):u}function Q(u){n?.(u.formData,u.errors);}return jsxRuntime.jsx(ce,{tagName:F,idPrefix:e.id,schema:s,uiSchema:C,validator:b,widgets:N(l,x),templates:j(h,y),formData:r,onChange:Q,readonly:i,disabled:t,liveValidate:f,showErrorList:false,transformErrors:H,"data-qa":e.id,ref:g},e.id)}var ge=ue;exports.SolaceJsonSchemaForm=ge;//# sourceMappingURL=json-schema-form.js.map
1
+ 'use strict';var chunkSKQ7JGO5_js=require('./chunk-SKQ7JGO5.js'),chunkPYADJP2I_js=require('./chunk-PYADJP2I.js'),chunkSXQRCXMP_js=require('./chunk-SXQRCXMP.js');require('./chunk-SWGQVSXQ.js'),require('./chunk-YQTPPT5K.js');var chunkV45EFIXB_js=require('./chunk-V45EFIXB.js'),mui=require('@rjsf/mui'),lodash=require('lodash'),react=require('react'),jsxRuntime=require('react/jsx-runtime'),validatorAjv8=require('@rjsf/validator-ajv8'),de=require('ajv/dist/2020');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var de__default=/*#__PURE__*/_interopDefault(de);var _=({size:e=24,fill:r=""})=>{let o=chunkV45EFIXB_js.ua();return jsxRuntime.jsxs(chunkV45EFIXB_js.Na,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsxRuntime.jsx("g",{clipPath:"url(#clip0_3496_34902)",children:jsxRuntime.jsx("path",{d:"M16.34 12.28C15.94 10.78 14.73 9.55999 13.22 9.15999C12.74 9.02999 12.26 8.97999 11.8 9.00999L16.49 13.7C16.52 13.24 16.47 12.76 16.34 12.28ZM15.82 15.85L8.62999 8.65999L7.10999 7.13999L3.69999 3.72999C3.54999 3.57999 3.28999 3.57999 3.13999 3.72999L2.28999 4.58999C2.13999 4.73999 2.13999 4.99999 2.28999 5.14999L5.37999 8.23999C3.99999 9.32999 2.86999 10.76 2.03999 12.43C1.90999 12.69 2.10999 13 2.39999 13H3.76999C3.90999 13 4.03999 12.92 4.10999 12.8C4.84999 11.54 5.75999 10.49 6.82999 9.68999L8.21999 11.08C7.56999 12.09 7.30999 13.38 7.65999 14.72C8.05999 16.22 9.27999 17.44 10.78 17.84C12.12 18.2 13.41 17.93 14.42 17.28L19.46 22.32C19.61 22.47 19.87 22.47 20.02 22.32L20.87 21.47C21.02 21.32 21.02 21.06 20.87 20.91L15.82 15.85ZM21.96 12.43C20.05 8.60999 16.59 5.99999 12 5.99999C11 5.99999 10.05 6.12999 9.15999 6.36999L10.87 8.06999C11.23 8.01999 11.61 7.99999 12 7.99999C15.52 7.99999 18.16 9.83999 19.89 12.8C19.96 12.92 20.08 13 20.22 13H21.48C21.89 13 22.09 12.69 21.96 12.43Z",fill:r||o.palette.ux.secondary.wMain})}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_3496_34902",children:jsxRuntime.jsx("rect",{width:e,height:e,fill:o.palette.ux.background.w10})})})]})};var Z=({size:e=24,fill:r=""})=>{let o=chunkV45EFIXB_js.ua();return jsxRuntime.jsxs(chunkV45EFIXB_js.Na,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsxRuntime.jsx("g",{clipPath:"url(#clip0_3496_34944)",children:jsxRuntime.jsx("path",{d:"M13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM12.001 6C7.41597 6 3.94897 8.608 2.04097 12.428C1.90997 12.69 2.10997 13 2.40197 13H3.77397C3.91497 13 4.04397 12.923 4.11497 12.801C5.83797 9.837 8.47897 8 12.001 8C15.523 8 18.164 9.838 19.888 12.802C19.958 12.923 20.083 13 20.223 13H21.476C21.892 13 22.091 12.689 21.96 12.426C20.052 8.607 16.585 6 12.001 6ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162Z",fill:r||o.palette.ux.secondary.wMain})}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_3496_34944",children:jsxRuntime.jsx("rect",{width:e,height:e,fill:o.palette.ux.background.w10})})})]})};var $="-",z="**********",B=(e,r)=>{let o=r.value;lodash.isEmpty(lodash.toString(o))?e.onChange(void 0):e.onChange(o);},ee=e=>e.options?.format==="password"||e.format==="password",oe=(e,r,o=false)=>o&&e.maxLength?r.length:e.maxLength,q=function(e,r,o){let i=r?r(e):e,{disabled:t,label:g,name:f,readonly:n,required:h,schema:a,value:m}=i,y=i["x-custom-error"]??"",S=n?"":y||a.description,s=ee(a),[d,c]=react.useState(false),x=react.useMemo(()=>n&&s&&!m&&o?.(a,i),[s,i,n,a,o,m]),F=react.useMemo(()=>{let l=m??"";return n?s?x?l=$:l=d?l:z:l=l||$:a.const&&(l=a.const),l},[m,n,a.const,s,d,x]),b=react.useMemo(()=>{if(s&&!x)return [jsxRuntime.jsx(chunkPYADJP2I_js.b,{variant:"icon",onClick:()=>c(!d),dataQa:d?"showPasswordButton":"hidePasswordButton",children:d?jsxRuntime.jsx(_,{}):jsxRuntime.jsx(Z,{})},d?"eyeIcon":"hideEyeIcon")]},[s,d,x]),C=oe(a,F,n);return jsxRuntime.jsxs(chunkV45EFIXB_js.Ic,{sx:{display:s?"grid":"block",gridTemplateColumns:"1fr auto",alignItems:"flex-end",overflow:"hidden"},children:[C&&C>100?jsxRuntime.jsx(chunkSKQ7JGO5_js.o,{name:f,label:g,onChange:l=>B(i,l),value:F,readOnly:n,required:h&&!n,disabled:t,width:"100%",maxLength:C+1,hasErrors:!!y,helperText:S,placeholder:a.placeholder??"",dataQa:`${g}-form-textArea`}):jsxRuntime.jsx(chunkSXQRCXMP_js.d,{type:s&&!d?"password":"text",label:g,name:f,onChange:l=>B(i,l),value:F,readOnly:n,required:h&&!n,disabled:t,endAdornment:n?void 0:b,hasErrors:!!y,helperText:S,placeholder:a.placeholder??"",dataQa:`${g}-form-textField`}),n&&b?jsxRuntime.jsx(chunkV45EFIXB_js.Ic,{ml:1,children:b}):null]})},re=function(e,r){let o=r?r(e):e,{disabled:i,id:t,label:g,name:f,options:n,readonly:h,required:a,schema:m,title:y,value:S}=o,s=o["x-custom-error"]??"",d=h?"":s||m.description;return n.enumOptions!==void 0?jsxRuntime.jsx(chunkV45EFIXB_js.Ic,{mb:o.id.includes("oneof")?2:0,children:jsxRuntime.jsx(chunkSKQ7JGO5_js.n,{label:g,name:f,onChange:c=>B(o,c),value:S,readOnly:h,required:a&&!h,disabled:i,title:y,id:t,hasErrors:!!s,helperText:d,dataQa:`${t}-form-select`,children:n.enumOptions.map(c=>jsxRuntime.jsx(chunkV45EFIXB_js.yf,{value:c.value,children:c.label},c.label))})}):jsxRuntime.jsx(jsxRuntime.Fragment,{})},te=function(e,r){let o=r?r(e):e,{disabled:i,label:t,name:g,readonly:f,required:n,schema:h,value:a}=o,m=o["x-custom-error"]??"",y=f?"":m||h.description;return jsxRuntime.jsx(chunkSKQ7JGO5_js.l,{name:g,label:t,onChange:S=>o.onChange(S.value),readOnly:f,required:n&&!f,disabled:i,checked:a,hasErrors:!!m,helperText:y,dataQa:`${t}-form-checkbox`})};function ie(e,r){let o=r?r(e):e,{description:i,id:t}=o;return i==="x-custom-hidden"?null:jsxRuntime.jsx(chunkSKQ7JGO5_js.m,{id:t,children:i})}function ne(e,r){let o=r?r(e):e,{id:i,title:t}=o;return t==="x-custom-hidden"?null:jsxRuntime.jsx(chunkSKQ7JGO5_js.m,{id:i,variant:"h5",children:t})}var j=(e,r)=>({DescriptionFieldTemplate:o=>ie(o,e),TitleFieldTemplate:o=>ne(o,r)}),N=(e,r)=>({CheckboxWidget:o=>te(o,e),SelectWidget:o=>re(o,e),TextWidget:o=>q(o,e,r),PasswordWidget:o=>q(o,e,r)});var ce=chunkV45EFIXB_js.wa(mui.Form)(({theme:e})=>({".solaceJsonSchemaForm":{maxWidth:"585px",".MuiTypography-root":{padding:e.spacing(3,0),"&.MuiTypography-caption":{display:"none"}},".MuiFormControl-root":{".MuiGrid-root":{padding:0,margin:"0 16px 0 0 !important"},".form-group.field":{paddingBottom:e.spacing(2),"&.field-error ul":{display:"none"},".MuiBox-root":{"label .MuiFormLabel-asterisk":{display:"none"},"label[for] .MuiFormLabel-asterisk":{display:"inline"}}},".form-group.field-array":{".MuiPaper-root":{boxShadow:"none",border:`1px solid ${e.palette.ux.secondary.w20}`,padding:0,margin:e.spacing(1,0,0,0)},".MuiTypography-root":{padding:e.spacing(1,0)},".form-group.field":{paddingBottom:e.spacing(2),"&.field-object":{paddingBottom:0}}}}}})),me=e=>{let r;return e?.length>0&&(e.includes("*")||e.push("*"),r=e),r},J=(e,r,o)=>{if(!o)return;let i=o.properties;if(i)for(let t in i)r[t]={"ui:hideError":true},e("property",t,i[t])?r[t]["ui:widget"]="hidden":e("description",t,i[t])&&(r[t]["ui:description"]="x-custom-hidden"),i[t]&&typeof i[t]=="object"&&(r[t]||(r[t]={}),J(e,r[t],i[t]));else if(typeof o=="object")for(let t in o)J(e,r,o[t]);};function ue({formItem:e,formData:r={},formOptions:o={},readOnly:i=false,disabled:t=false,formRef:g,liveValidate:f=true,onChange:n,transformDescription:h,transformError:a,transformWidget:m,transformTitle:y,ajvClass:S}){let s=e.schema,{order:d,isHidden:c,shouldShowEmptyValueForSensitiveField:x,tagName:F}=o,b=validatorAjv8.customizeValidator({AjvClass:S??de__default.default}),C={"ui:classNames":"solaceJsonSchemaForm"};C["ui:order"]=me(d),c&&(c("submitButton")&&(C["ui:submitButtonOptions"]={norender:true}),c("title")&&(C["ui:options"]={label:false}),J(c,C,s));function l(u){let P=m?.(u)??{...u};return u.rawErrors&&u.rawErrors.length>0&&(P["x-custom-error"]=Array.from(new Set(u.rawErrors)).join(", ")),P}function H(u){return a?u.map(P=>a?.(P)??P):u}function Q(u){n?.(u.formData,u.errors);}return jsxRuntime.jsx(ce,{tagName:F,idPrefix:e.id,schema:s,uiSchema:C,validator:b,widgets:N(l,x),templates:j(h,y),formData:r,onChange:Q,readonly:i,disabled:t,liveValidate:f,showErrorList:false,transformErrors:H,"data-qa":e.id,ref:g},e.id)}var ge=ue;exports.SolaceJsonSchemaForm=ge;//# sourceMappingURL=json-schema-form.js.map
2
2
  //# sourceMappingURL=json-schema-form.js.map
@@ -1,2 +1,2 @@
1
- import {m,o,n,l}from'./chunk-2RTZL4CF.modern.mjs';import {b}from'./chunk-HLXBN2OE.modern.mjs';import {d}from'./chunk-QV564WAK.modern.mjs';import'./chunk-ULYCLLUO.modern.mjs';import'./chunk-ROSPS5NM.modern.mjs';import {wa,Ic,yf,ua,Na}from'./chunk-IHSXSGCC.modern.mjs';import {Form}from'@rjsf/mui';import {isEmpty,toString}from'lodash';import {useState,useMemo}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {customizeValidator}from'@rjsf/validator-ajv8';import de from'ajv/dist/2020';var _=({size:e=24,fill:r=""})=>{let o=ua();return jsxs(Na,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsx("g",{clipPath:"url(#clip0_3496_34902)",children:jsx("path",{d:"M16.34 12.28C15.94 10.78 14.73 9.55999 13.22 9.15999C12.74 9.02999 12.26 8.97999 11.8 9.00999L16.49 13.7C16.52 13.24 16.47 12.76 16.34 12.28ZM15.82 15.85L8.62999 8.65999L7.10999 7.13999L3.69999 3.72999C3.54999 3.57999 3.28999 3.57999 3.13999 3.72999L2.28999 4.58999C2.13999 4.73999 2.13999 4.99999 2.28999 5.14999L5.37999 8.23999C3.99999 9.32999 2.86999 10.76 2.03999 12.43C1.90999 12.69 2.10999 13 2.39999 13H3.76999C3.90999 13 4.03999 12.92 4.10999 12.8C4.84999 11.54 5.75999 10.49 6.82999 9.68999L8.21999 11.08C7.56999 12.09 7.30999 13.38 7.65999 14.72C8.05999 16.22 9.27999 17.44 10.78 17.84C12.12 18.2 13.41 17.93 14.42 17.28L19.46 22.32C19.61 22.47 19.87 22.47 20.02 22.32L20.87 21.47C21.02 21.32 21.02 21.06 20.87 20.91L15.82 15.85ZM21.96 12.43C20.05 8.60999 16.59 5.99999 12 5.99999C11 5.99999 10.05 6.12999 9.15999 6.36999L10.87 8.06999C11.23 8.01999 11.61 7.99999 12 7.99999C15.52 7.99999 18.16 9.83999 19.89 12.8C19.96 12.92 20.08 13 20.22 13H21.48C21.89 13 22.09 12.69 21.96 12.43Z",fill:r||o.palette.ux.secondary.wMain})}),jsx("defs",{children:jsx("clipPath",{id:"clip0_3496_34902",children:jsx("rect",{width:e,height:e,fill:o.palette.ux.background.w10})})})]})};var Z=({size:e=24,fill:r=""})=>{let o=ua();return jsxs(Na,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsx("g",{clipPath:"url(#clip0_3496_34944)",children:jsx("path",{d:"M13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM12.001 6C7.41597 6 3.94897 8.608 2.04097 12.428C1.90997 12.69 2.10997 13 2.40197 13H3.77397C3.91497 13 4.04397 12.923 4.11497 12.801C5.83797 9.837 8.47897 8 12.001 8C15.523 8 18.164 9.838 19.888 12.802C19.958 12.923 20.083 13 20.223 13H21.476C21.892 13 22.091 12.689 21.96 12.426C20.052 8.607 16.585 6 12.001 6ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162Z",fill:r||o.palette.ux.secondary.wMain})}),jsx("defs",{children:jsx("clipPath",{id:"clip0_3496_34944",children:jsx("rect",{width:e,height:e,fill:o.palette.ux.background.w10})})})]})};var $="-",z="**********",B=(e,r)=>{let o=r.value;isEmpty(toString(o))?e.onChange(void 0):e.onChange(o);},ee=e=>e.options?.format==="password"||e.format==="password",oe=(e,r,o=false)=>o&&e.maxLength?r.length:e.maxLength,q=function(e,r,o$1){let i=r?r(e):e,{disabled:t,label:g,name:f,readonly:n,required:h,schema:a,value:m}=i,y=i["x-custom-error"]??"",S=n?"":y||a.description,s=ee(a),[d$1,c]=useState(false),x=useMemo(()=>n&&s&&!m&&o$1?.(a,i),[s,i,n,a,o$1,m]),F=useMemo(()=>{let l=m??"";return n?s?x?l=$:l=d$1?l:z:l=l||$:a.const&&(l=a.const),l},[m,n,a.const,s,d$1,x]),b$1=useMemo(()=>{if(s&&!x)return [jsx(b,{variant:"icon",onClick:()=>c(!d$1),dataQa:d$1?"showPasswordButton":"hidePasswordButton",children:d$1?jsx(_,{}):jsx(Z,{})},d$1?"eyeIcon":"hideEyeIcon")]},[s,d$1,x]),C=oe(a,F,n);return jsxs(Ic,{sx:{display:s?"grid":"block",gridTemplateColumns:"1fr auto",alignItems:"flex-end",overflow:"hidden"},children:[C&&C>100?jsx(o,{name:f,label:g,onChange:l=>B(i,l),value:F,readOnly:n,required:h&&!n,disabled:t,width:"100%",maxLength:C+1,hasErrors:!!y,helperText:S,placeholder:a.placeholder??"",dataQa:`${g}-form-textArea`}):jsx(d,{type:s&&!d$1?"password":"text",label:g,name:f,onChange:l=>B(i,l),value:F,readOnly:n,required:h&&!n,disabled:t,endAdornment:n?void 0:b$1,hasErrors:!!y,helperText:S,placeholder:a.placeholder??"",dataQa:`${g}-form-textField`}),n&&b$1?jsx(Ic,{ml:1,children:b$1}):null]})},re=function(e,r){let o=r?r(e):e,{disabled:i,id:t,label:g,name:f,options:n$1,readonly:h,required:a,schema:m,title:y,value:S}=o,s=o["x-custom-error"]??"",d=h?"":s||m.description;return n$1.enumOptions!==void 0?jsx(Ic,{mb:o.id.includes("oneof")?2:0,children:jsx(n,{label:g,name:f,onChange:c=>B(o,c),value:S,readOnly:h,required:a&&!h,disabled:i,title:y,id:t,hasErrors:!!s,helperText:d,dataQa:`${t}-form-select`,children:n$1.enumOptions.map(c=>jsx(yf,{value:c.value,children:c.label},c.label))})}):jsx(Fragment,{})},te=function(e,r){let o=r?r(e):e,{disabled:i,label:t,name:g,readonly:f,required:n,schema:h,value:a}=o,m=o["x-custom-error"]??"",y=f?"":m||h.description;return jsx(l,{name:g,label:t,onChange:S=>o.onChange(S.value),readOnly:f,required:n&&!f,disabled:i,checked:a,hasErrors:!!m,helperText:y,dataQa:`${t}-form-checkbox`})};function ie(e,r){let o=r?r(e):e,{description:i,id:t}=o;return i==="x-custom-hidden"?null:jsx(m,{id:t,children:i})}function ne(e,r){let o=r?r(e):e,{id:i,title:t}=o;return t==="x-custom-hidden"?null:jsx(m,{id:i,variant:"h5",children:t})}var j=(e,r)=>({DescriptionFieldTemplate:o=>ie(o,e),TitleFieldTemplate:o=>ne(o,r)}),N=(e,r)=>({CheckboxWidget:o=>te(o,e),SelectWidget:o=>re(o,e),TextWidget:o=>q(o,e,r),PasswordWidget:o=>q(o,e,r)});var ce=wa(Form)(({theme:e})=>({".solaceJsonSchemaForm":{maxWidth:"585px",".MuiTypography-root":{padding:e.spacing(3,0),"&.MuiTypography-caption":{display:"none"}},".MuiFormControl-root":{".MuiGrid-root":{padding:0,margin:"0 16px 0 0 !important"},".form-group.field":{paddingBottom:e.spacing(2),"&.field-error ul":{display:"none"},".MuiBox-root":{"label .MuiFormLabel-asterisk":{display:"none"},"label[for] .MuiFormLabel-asterisk":{display:"inline"}}},".form-group.field-array":{".MuiPaper-root":{boxShadow:"none",border:`1px solid ${e.palette.ux.secondary.w20}`,padding:0,margin:e.spacing(1,0,0,0)},".MuiTypography-root":{padding:e.spacing(1,0)},".form-group.field":{paddingBottom:e.spacing(2),"&.field-object":{paddingBottom:0}}}}}})),me=e=>{let r;return e?.length>0&&(e.includes("*")||e.push("*"),r=e),r},J=(e,r,o)=>{if(!o)return;let i=o.properties;if(i)for(let t in i)r[t]={"ui:hideError":true},e("property",t,i[t])?r[t]["ui:widget"]="hidden":e("description",t,i[t])&&(r[t]["ui:description"]="x-custom-hidden"),i[t]&&typeof i[t]=="object"&&(r[t]||(r[t]={}),J(e,r[t],i[t]));else if(typeof o=="object")for(let t in o)J(e,r,o[t]);};function ue({formItem:e,formData:r={},formOptions:o={},readOnly:i=false,disabled:t=false,formRef:g,liveValidate:f=true,onChange:n,transformDescription:h,transformError:a,transformWidget:m,transformTitle:y,ajvClass:S}){let s=e.schema,{order:d,isHidden:c,shouldShowEmptyValueForSensitiveField:x,tagName:F}=o,b=customizeValidator({AjvClass:S??de}),C={"ui:classNames":"solaceJsonSchemaForm"};C["ui:order"]=me(d),c&&(c("submitButton")&&(C["ui:submitButtonOptions"]={norender:true}),c("title")&&(C["ui:options"]={label:false}),J(c,C,s));function l(u){let P=m?.(u)??{...u};return u.rawErrors&&u.rawErrors.length>0&&(P["x-custom-error"]=Array.from(new Set(u.rawErrors)).join(", ")),P}function H(u){return a?u.map(P=>a?.(P)??P):u}function Q(u){n?.(u.formData,u.errors);}return jsx(ce,{tagName:F,idPrefix:e.id,schema:s,uiSchema:C,validator:b,widgets:N(l,x),templates:j(h,y),formData:r,onChange:Q,readonly:i,disabled:t,liveValidate:f,showErrorList:false,transformErrors:H,"data-qa":e.id,ref:g},e.id)}var ge=ue;export{ge as SolaceJsonSchemaForm};//# sourceMappingURL=json-schema-form.modern.mjs.map
1
+ import {m,o,n,l}from'./chunk-HQH2WKJP.modern.mjs';import {b}from'./chunk-LGBO373S.modern.mjs';import {d}from'./chunk-VYHLNTMX.modern.mjs';import'./chunk-54TEARQI.modern.mjs';import'./chunk-QKQRCYG4.modern.mjs';import {wa,Ic,yf,ua,Na}from'./chunk-I7OJ5H4U.modern.mjs';import {Form}from'@rjsf/mui';import {isEmpty,toString}from'lodash';import {useState,useMemo}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {customizeValidator}from'@rjsf/validator-ajv8';import de from'ajv/dist/2020';var _=({size:e=24,fill:r=""})=>{let o=ua();return jsxs(Na,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsx("g",{clipPath:"url(#clip0_3496_34902)",children:jsx("path",{d:"M16.34 12.28C15.94 10.78 14.73 9.55999 13.22 9.15999C12.74 9.02999 12.26 8.97999 11.8 9.00999L16.49 13.7C16.52 13.24 16.47 12.76 16.34 12.28ZM15.82 15.85L8.62999 8.65999L7.10999 7.13999L3.69999 3.72999C3.54999 3.57999 3.28999 3.57999 3.13999 3.72999L2.28999 4.58999C2.13999 4.73999 2.13999 4.99999 2.28999 5.14999L5.37999 8.23999C3.99999 9.32999 2.86999 10.76 2.03999 12.43C1.90999 12.69 2.10999 13 2.39999 13H3.76999C3.90999 13 4.03999 12.92 4.10999 12.8C4.84999 11.54 5.75999 10.49 6.82999 9.68999L8.21999 11.08C7.56999 12.09 7.30999 13.38 7.65999 14.72C8.05999 16.22 9.27999 17.44 10.78 17.84C12.12 18.2 13.41 17.93 14.42 17.28L19.46 22.32C19.61 22.47 19.87 22.47 20.02 22.32L20.87 21.47C21.02 21.32 21.02 21.06 20.87 20.91L15.82 15.85ZM21.96 12.43C20.05 8.60999 16.59 5.99999 12 5.99999C11 5.99999 10.05 6.12999 9.15999 6.36999L10.87 8.06999C11.23 8.01999 11.61 7.99999 12 7.99999C15.52 7.99999 18.16 9.83999 19.89 12.8C19.96 12.92 20.08 13 20.22 13H21.48C21.89 13 22.09 12.69 21.96 12.43Z",fill:r||o.palette.ux.secondary.wMain})}),jsx("defs",{children:jsx("clipPath",{id:"clip0_3496_34902",children:jsx("rect",{width:e,height:e,fill:o.palette.ux.background.w10})})})]})};var Z=({size:e=24,fill:r=""})=>{let o=ua();return jsxs(Na,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsx("g",{clipPath:"url(#clip0_3496_34944)",children:jsx("path",{d:"M13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM12.001 6C7.41597 6 3.94897 8.608 2.04097 12.428C1.90997 12.69 2.10997 13 2.40197 13H3.77397C3.91497 13 4.04397 12.923 4.11497 12.801C5.83797 9.837 8.47897 8 12.001 8C15.523 8 18.164 9.838 19.888 12.802C19.958 12.923 20.083 13 20.223 13H21.476C21.892 13 22.091 12.689 21.96 12.426C20.052 8.607 16.585 6 12.001 6ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162ZM13.224 9.162C9.80697 8.253 6.75497 11.305 7.66397 14.722C8.06297 16.223 9.27797 17.438 10.779 17.837C14.196 18.746 17.248 15.694 16.339 12.277C15.939 10.776 14.725 9.562 13.224 9.162Z",fill:r||o.palette.ux.secondary.wMain})}),jsx("defs",{children:jsx("clipPath",{id:"clip0_3496_34944",children:jsx("rect",{width:e,height:e,fill:o.palette.ux.background.w10})})})]})};var $="-",z="**********",B=(e,r)=>{let o=r.value;isEmpty(toString(o))?e.onChange(void 0):e.onChange(o);},ee=e=>e.options?.format==="password"||e.format==="password",oe=(e,r,o=false)=>o&&e.maxLength?r.length:e.maxLength,q=function(e,r,o$1){let i=r?r(e):e,{disabled:t,label:g,name:f,readonly:n,required:h,schema:a,value:m}=i,y=i["x-custom-error"]??"",S=n?"":y||a.description,s=ee(a),[d$1,c]=useState(false),x=useMemo(()=>n&&s&&!m&&o$1?.(a,i),[s,i,n,a,o$1,m]),F=useMemo(()=>{let l=m??"";return n?s?x?l=$:l=d$1?l:z:l=l||$:a.const&&(l=a.const),l},[m,n,a.const,s,d$1,x]),b$1=useMemo(()=>{if(s&&!x)return [jsx(b,{variant:"icon",onClick:()=>c(!d$1),dataQa:d$1?"showPasswordButton":"hidePasswordButton",children:d$1?jsx(_,{}):jsx(Z,{})},d$1?"eyeIcon":"hideEyeIcon")]},[s,d$1,x]),C=oe(a,F,n);return jsxs(Ic,{sx:{display:s?"grid":"block",gridTemplateColumns:"1fr auto",alignItems:"flex-end",overflow:"hidden"},children:[C&&C>100?jsx(o,{name:f,label:g,onChange:l=>B(i,l),value:F,readOnly:n,required:h&&!n,disabled:t,width:"100%",maxLength:C+1,hasErrors:!!y,helperText:S,placeholder:a.placeholder??"",dataQa:`${g}-form-textArea`}):jsx(d,{type:s&&!d$1?"password":"text",label:g,name:f,onChange:l=>B(i,l),value:F,readOnly:n,required:h&&!n,disabled:t,endAdornment:n?void 0:b$1,hasErrors:!!y,helperText:S,placeholder:a.placeholder??"",dataQa:`${g}-form-textField`}),n&&b$1?jsx(Ic,{ml:1,children:b$1}):null]})},re=function(e,r){let o=r?r(e):e,{disabled:i,id:t,label:g,name:f,options:n$1,readonly:h,required:a,schema:m,title:y,value:S}=o,s=o["x-custom-error"]??"",d=h?"":s||m.description;return n$1.enumOptions!==void 0?jsx(Ic,{mb:o.id.includes("oneof")?2:0,children:jsx(n,{label:g,name:f,onChange:c=>B(o,c),value:S,readOnly:h,required:a&&!h,disabled:i,title:y,id:t,hasErrors:!!s,helperText:d,dataQa:`${t}-form-select`,children:n$1.enumOptions.map(c=>jsx(yf,{value:c.value,children:c.label},c.label))})}):jsx(Fragment,{})},te=function(e,r){let o=r?r(e):e,{disabled:i,label:t,name:g,readonly:f,required:n,schema:h,value:a}=o,m=o["x-custom-error"]??"",y=f?"":m||h.description;return jsx(l,{name:g,label:t,onChange:S=>o.onChange(S.value),readOnly:f,required:n&&!f,disabled:i,checked:a,hasErrors:!!m,helperText:y,dataQa:`${t}-form-checkbox`})};function ie(e,r){let o=r?r(e):e,{description:i,id:t}=o;return i==="x-custom-hidden"?null:jsx(m,{id:t,children:i})}function ne(e,r){let o=r?r(e):e,{id:i,title:t}=o;return t==="x-custom-hidden"?null:jsx(m,{id:i,variant:"h5",children:t})}var j=(e,r)=>({DescriptionFieldTemplate:o=>ie(o,e),TitleFieldTemplate:o=>ne(o,r)}),N=(e,r)=>({CheckboxWidget:o=>te(o,e),SelectWidget:o=>re(o,e),TextWidget:o=>q(o,e,r),PasswordWidget:o=>q(o,e,r)});var ce=wa(Form)(({theme:e})=>({".solaceJsonSchemaForm":{maxWidth:"585px",".MuiTypography-root":{padding:e.spacing(3,0),"&.MuiTypography-caption":{display:"none"}},".MuiFormControl-root":{".MuiGrid-root":{padding:0,margin:"0 16px 0 0 !important"},".form-group.field":{paddingBottom:e.spacing(2),"&.field-error ul":{display:"none"},".MuiBox-root":{"label .MuiFormLabel-asterisk":{display:"none"},"label[for] .MuiFormLabel-asterisk":{display:"inline"}}},".form-group.field-array":{".MuiPaper-root":{boxShadow:"none",border:`1px solid ${e.palette.ux.secondary.w20}`,padding:0,margin:e.spacing(1,0,0,0)},".MuiTypography-root":{padding:e.spacing(1,0)},".form-group.field":{paddingBottom:e.spacing(2),"&.field-object":{paddingBottom:0}}}}}})),me=e=>{let r;return e?.length>0&&(e.includes("*")||e.push("*"),r=e),r},J=(e,r,o)=>{if(!o)return;let i=o.properties;if(i)for(let t in i)r[t]={"ui:hideError":true},e("property",t,i[t])?r[t]["ui:widget"]="hidden":e("description",t,i[t])&&(r[t]["ui:description"]="x-custom-hidden"),i[t]&&typeof i[t]=="object"&&(r[t]||(r[t]={}),J(e,r[t],i[t]));else if(typeof o=="object")for(let t in o)J(e,r,o[t]);};function ue({formItem:e,formData:r={},formOptions:o={},readOnly:i=false,disabled:t=false,formRef:g,liveValidate:f=true,onChange:n,transformDescription:h,transformError:a,transformWidget:m,transformTitle:y,ajvClass:S}){let s=e.schema,{order:d,isHidden:c,shouldShowEmptyValueForSensitiveField:x,tagName:F}=o,b=customizeValidator({AjvClass:S??de}),C={"ui:classNames":"solaceJsonSchemaForm"};C["ui:order"]=me(d),c&&(c("submitButton")&&(C["ui:submitButtonOptions"]={norender:true}),c("title")&&(C["ui:options"]={label:false}),J(c,C,s));function l(u){let P=m?.(u)??{...u};return u.rawErrors&&u.rawErrors.length>0&&(P["x-custom-error"]=Array.from(new Set(u.rawErrors)).join(", ")),P}function H(u){return a?u.map(P=>a?.(P)??P):u}function Q(u){n?.(u.formData,u.errors);}return jsx(ce,{tagName:F,idPrefix:e.id,schema:s,uiSchema:C,validator:b,widgets:N(l,x),templates:j(h,y),formData:r,onChange:Q,readonly:i,disabled:t,liveValidate:f,showErrorList:false,transformErrors:H,"data-qa":e.id,ref:g},e.id)}var ge=ue;export{ge as SolaceJsonSchemaForm};//# sourceMappingURL=json-schema-form.modern.mjs.map
2
2
  //# sourceMappingURL=json-schema-form.modern.mjs.map
package/dist/textDiff.js CHANGED
@@ -1,3 +1,3 @@
1
- 'use strict';var chunkGDZZVHFP_js=require('./chunk-GDZZVHFP.js'),chunk4XH33OL7_js=require('./chunk-4XH33OL7.js'),T=require('diff'),y=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var T__namespace=/*#__PURE__*/_interopNamespace(T);var y__default=/*#__PURE__*/_interopDefault(y);var A=chunk4XH33OL7_js.wa("div")({display:"flex",flexDirection:"column",width:"100%"}),I=chunk4XH33OL7_js.wa("div")({display:"flex",width:"100%"}),S=chunk4XH33OL7_js.wa("div")(({theme:e})=>({flex:1,minWidth:0,padding:e.spacing(1,2,.5,0)})),C=chunk4XH33OL7_js.wa("div")(({theme:e})=>({border:`1px solid ${e.palette.ux.secondary.w40}`,borderRadius:e.shape.borderRadius,fontFamily:"monospace",fontSize:"14px",overflow:"hidden"})),R=chunk4XH33OL7_js.wa("div")({display:"flex",width:"100%"}),N=chunk4XH33OL7_js.wa("div")({flex:1,minWidth:0}),L=chunk4XH33OL7_js.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=chunk4XH33OL7_js.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=chunk4XH33OL7_js.wa("div")(({theme:e})=>({padding:e.spacing(0,1),whiteSpace:"pre-wrap",overflow:"hidden",wordWrap:"break-word",flex:1})),H=chunk4XH33OL7_js.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="No content to compare",noDifferencesText:o="No Differences",hideWhenNoDifferences:$=false}=e,h=y__default.default.useMemo(()=>{let t=T__namespace.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__default.default.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 jsxRuntime.jsxs(L,{lineType:"empty",children:[jsxRuntime.jsx(k,{children:"\xA0"}),jsxRuntime.jsx(v,{children:"\xA0"})]},`${r}-empty-${p}`);let s=t.isInsert?"insert":t.isDelete?"delete":"normal";return jsxRuntime.jsxs(L,{lineType:s,children:[jsxRuntime.jsx(k,{children:m||""}),jsxRuntime.jsx(v,{children:t.content})]},`${r}-${m||p}`)};return !l&&!d?jsxRuntime.jsx(C,{id:`code-diff-${n}`,children:jsxRuntime.jsx(H,{children:a})}):$&&x.every(t=>t.isNormal)?jsxRuntime.jsx(C,{id:`code-diff-${n}`,children:jsxRuntime.jsx(H,{children:o})}):jsxRuntime.jsxs(A,{children:[(c||D)&&jsxRuntime.jsxs(I,{children:[jsxRuntime.jsx(S,{children:c&&jsxRuntime.jsx(chunkGDZZVHFP_js.a,{id:`diff-text1Header-${n}`,children:c})}),jsxRuntime.jsx(S,{children:D&&jsxRuntime.jsx(chunkGDZZVHFP_js.a,{id:`diff-text2Header-${n}`,children:D})})]}),jsxRuntime.jsx(C,{id:`code-diff-${n}`,children:jsxRuntime.jsxs(R,{children:[jsxRuntime.jsx(N,{children:x.map((t,r)=>w(t,"old",r))}),jsxRuntime.jsx(N,{children:x.map((t,r)=>w(t,"new",r))})]})})]})}exports.SolaceTextDiff=P;//# sourceMappingURL=textDiff.js.map
1
+ 'use strict';var chunkYQTPPT5K_js=require('./chunk-YQTPPT5K.js'),chunkV45EFIXB_js=require('./chunk-V45EFIXB.js'),T=require('diff'),y=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var T__namespace=/*#__PURE__*/_interopNamespace(T);var y__default=/*#__PURE__*/_interopDefault(y);var A=chunkV45EFIXB_js.wa("div")({display:"flex",flexDirection:"column",width:"100%"}),I=chunkV45EFIXB_js.wa("div")({display:"flex",width:"100%"}),S=chunkV45EFIXB_js.wa("div")(({theme:e})=>({flex:1,minWidth:0,padding:e.spacing(1,2,.5,0)})),C=chunkV45EFIXB_js.wa("div")(({theme:e})=>({border:`1px solid ${e.palette.ux.secondary.w40}`,borderRadius:e.shape.borderRadius,fontFamily:"monospace",fontSize:"14px",overflow:"hidden"})),R=chunkV45EFIXB_js.wa("div")({display:"flex",width:"100%"}),N=chunkV45EFIXB_js.wa("div")({flex:1,minWidth:0}),L=chunkV45EFIXB_js.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=chunkV45EFIXB_js.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=chunkV45EFIXB_js.wa("div")(({theme:e})=>({padding:e.spacing(0,1),whiteSpace:"pre-wrap",overflow:"hidden",wordWrap:"break-word",flex:1})),H=chunkV45EFIXB_js.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="No content to compare",noDifferencesText:o="No Differences",hideWhenNoDifferences:$=false}=e,h=y__default.default.useMemo(()=>{let t=T__namespace.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__default.default.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 jsxRuntime.jsxs(L,{lineType:"empty",children:[jsxRuntime.jsx(k,{children:"\xA0"}),jsxRuntime.jsx(v,{children:"\xA0"})]},`${r}-empty-${p}`);let s=t.isInsert?"insert":t.isDelete?"delete":"normal";return jsxRuntime.jsxs(L,{lineType:s,children:[jsxRuntime.jsx(k,{children:m||""}),jsxRuntime.jsx(v,{children:t.content})]},`${r}-${m||p}`)};return !l&&!d?jsxRuntime.jsx(C,{id:`code-diff-${n}`,children:jsxRuntime.jsx(H,{children:a})}):$&&x.every(t=>t.isNormal)?jsxRuntime.jsx(C,{id:`code-diff-${n}`,children:jsxRuntime.jsx(H,{children:o})}):jsxRuntime.jsxs(A,{children:[(c||D)&&jsxRuntime.jsxs(I,{children:[jsxRuntime.jsx(S,{children:c&&jsxRuntime.jsx(chunkYQTPPT5K_js.a,{id:`diff-text1Header-${n}`,children:c})}),jsxRuntime.jsx(S,{children:D&&jsxRuntime.jsx(chunkYQTPPT5K_js.a,{id:`diff-text2Header-${n}`,children:D})})]}),jsxRuntime.jsx(C,{id:`code-diff-${n}`,children:jsxRuntime.jsxs(R,{children:[jsxRuntime.jsx(N,{children:x.map((t,r)=>w(t,"old",r))}),jsxRuntime.jsx(N,{children:x.map((t,r)=>w(t,"new",r))})]})})]})}exports.SolaceTextDiff=P;//# sourceMappingURL=textDiff.js.map
3
3
  //# sourceMappingURL=textDiff.js.map
@@ -1,3 +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(`
1
+ import {a}from'./chunk-QKQRCYG4.modern.mjs';import {wa}from'./chunk-I7OJ5H4U.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
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
3
  //# sourceMappingURL=textDiff.modern.mjs.map
@@ -13,64 +13,74 @@
13
13
  * node migrate-imports.js ./storybook/src
14
14
  */
15
15
 
16
- const fs = require('fs');
17
- const path = require('path');
16
+ const fs = require("fs");
17
+ const path = require("path");
18
18
 
19
19
  // Map of component names to their new entry points
20
20
  const componentMigrations = {
21
21
  // Date Picker components
22
- 'SolaceDatePicker': '@SolaceDev/maas-react-components/datepicker',
23
- 'SolaceDatePickerProps': '@SolaceDev/maas-react-components/datepicker',
24
- 'SolaceDatePickerVariant': '@SolaceDev/maas-react-components/datepicker',
22
+ SolaceDatePicker: "@SolaceDev/maas-react-components/datepicker",
23
+ SolaceDatePickerProps: "@SolaceDev/maas-react-components/datepicker",
24
+ SolaceDatePickerVariant: "@SolaceDev/maas-react-components/datepicker",
25
25
 
26
26
  // Chart components
27
- 'SolaceDonutChart': '@SolaceDev/maas-react-components/charts',
27
+ SolaceDonutChart: "@SolaceDev/maas-react-components/charts",
28
28
 
29
29
  // Code Editor components
30
- 'SolaceCodeEditor': '@SolaceDev/maas-react-components/code-editor',
30
+ SolaceCodeEditor: "@SolaceDev/maas-react-components/code-editor",
31
31
 
32
32
  // JSON Schema Form components
33
- 'SolaceJsonSchemaForm': '@SolaceDev/maas-react-components/json-schema-form',
34
- 'SolaceJsonSchemaFormProps': '@SolaceDev/maas-react-components/json-schema-form',
33
+ SolaceJsonSchemaForm: "@SolaceDev/maas-react-components/json-schema-form",
34
+ SolaceJsonSchemaFormProps: "@SolaceDev/maas-react-components/json-schema-form",
35
35
 
36
36
  // Drag and Drop components
37
- 'SolaceAttributeValuePairForm': '@SolaceDev/maas-react-components/drag-drop',
37
+ SolaceAttributeValuePairForm: "@SolaceDev/maas-react-components/drag-drop",
38
38
 
39
39
  // Text Diff components
40
- 'SolaceTextDiff': '@SolaceDev/maas-react-components/textDiff',
41
- 'SolaceTextDiffProps': '@SolaceDev/maas-react-components/textDiff',
40
+ SolaceTextDiff: "@SolaceDev/maas-react-components/textDiff",
41
+ SolaceTextDiffProps: "@SolaceDev/maas-react-components/textDiff"
42
42
  };
43
43
 
44
44
  // Map of entry points to their required peer dependencies with exact versions
45
45
  const peerDependencies = {
46
- '@SolaceDev/maas-react-components/datepicker': {
47
- packages: ['@mui/x-date-pickers@7.29.4', 'moment@2.30.1', 'moment-timezone@0.5.48'],
48
- installCmd: 'npm install @mui/x-date-pickers@7.29.4 moment@2.30.1 moment-timezone@0.5.48'
46
+ "@SolaceDev/maas-react-components/datepicker": {
47
+ packages: ["@mui/x-date-pickers@7.29.4", "moment@2.30.1", "moment-timezone@0.5.48"],
48
+ installCmd: "npm install @mui/x-date-pickers@7.29.4 moment@2.30.1 moment-timezone@0.5.48"
49
49
  },
50
- '@SolaceDev/maas-react-components/charts': {
51
- packages: ['recharts@3.6.0'],
52
- installCmd: 'npm install recharts@3.6.0'
50
+ "@SolaceDev/maas-react-components/charts": {
51
+ packages: ["recharts@3.6.0"],
52
+ installCmd: "npm install recharts@3.6.0"
53
53
  },
54
- '@SolaceDev/maas-react-components/code-editor': {
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'
54
+ "@SolaceDev/maas-react-components/code-editor": {
55
+ packages: [
56
+ "@uiw/react-codemirror@4.25.1",
57
+ "@codemirror/lang-json@6.0.2",
58
+ "@codemirror/lang-xml@6.1.0",
59
+ "@codemirror/lang-yaml@6.1.2",
60
+ "@codemirror/language@6.11.3",
61
+ "@codemirror/view@6.38.1",
62
+ "@codemirror/state@6.5.4",
63
+ "@lezer/highlight@1.2.1"
64
+ ],
65
+ installCmd:
66
+ "npm install @uiw/react-codemirror@4.25.1 @codemirror/lang-json@6.0.2 @codemirror/lang-xml@6.1.0 @codemirror/lang-yaml@6.1.2 @codemirror/language@6.11.3 @codemirror/view@6.38.1 @codemirror/state@6.5.4 @lezer/highlight@1.2.1"
57
67
  },
58
- '@SolaceDev/maas-react-components/json-schema-form': {
59
- packages: ['@rjsf/core@5.24.13', '@rjsf/mui@5.24.13', '@rjsf/utils@5.24.13', '@rjsf/validator-ajv8@5.24.13'],
60
- installCmd: 'npm install @rjsf/core@5.24.13 @rjsf/mui@5.24.13 @rjsf/utils@5.24.13 @rjsf/validator-ajv8@5.24.13'
68
+ "@SolaceDev/maas-react-components/json-schema-form": {
69
+ packages: ["@rjsf/core@5.24.13", "@rjsf/mui@5.24.13", "@rjsf/utils@5.24.13", "@rjsf/validator-ajv8@5.24.13"],
70
+ installCmd: "npm install @rjsf/core@5.24.13 @rjsf/mui@5.24.13 @rjsf/utils@5.24.13 @rjsf/validator-ajv8@5.24.13"
61
71
  },
62
- '@SolaceDev/maas-react-components/drag-drop': {
63
- packages: ['@hello-pangea/dnd@16.6.0'],
64
- installCmd: 'npm install @hello-pangea/dnd@16.6.0'
72
+ "@SolaceDev/maas-react-components/drag-drop": {
73
+ packages: ["@hello-pangea/dnd@16.6.0"],
74
+ installCmd: "npm install @hello-pangea/dnd@16.6.0"
65
75
  },
66
- '@SolaceDev/maas-react-components/textDiff': {
67
- packages: ['diff@8.0.2'],
68
- installCmd: 'npm install diff@8.0.2'
76
+ "@SolaceDev/maas-react-components/textDiff": {
77
+ packages: ["diff@8.0.2"],
78
+ installCmd: "npm install diff@8.0.2"
69
79
  }
70
80
  };
71
81
 
72
82
  function migrateFile(filePath, usedEntryPoints) {
73
- let content = fs.readFileSync(filePath, 'utf8');
83
+ let content = fs.readFileSync(filePath, "utf8");
74
84
  let modified = false;
75
85
 
76
86
  // Find all import statements from @SolaceDev/maas-react-components (main package only, not sub-paths)
@@ -87,19 +97,19 @@ function migrateFile(filePath, usedEntryPoints) {
87
97
  const remainingComponents = [];
88
98
  const importsToRemove = [];
89
99
 
90
- matches.forEach(match => {
100
+ matches.forEach((match) => {
91
101
  const fullImport = match[0];
92
102
  const componentsList = match[1];
93
103
 
94
104
  // Parse the components from the import
95
105
  const components = componentsList
96
- .split(',')
97
- .map(c => c.trim())
98
- .filter(c => c.length > 0);
106
+ .split(",")
107
+ .map((c) => c.trim())
108
+ .filter((c) => c.length > 0);
99
109
 
100
- components.forEach(component => {
110
+ components.forEach((component) => {
101
111
  // Handle type imports
102
- const isTypeImport = component.startsWith('type ');
112
+ const isTypeImport = component.startsWith("type ");
103
113
  const componentName = isTypeImport ? component.substring(5).trim() : component;
104
114
 
105
115
  const newEntryPoint = componentMigrations[componentName];
@@ -126,22 +136,22 @@ function migrateFile(filePath, usedEntryPoints) {
126
136
  }
127
137
 
128
138
  // Remove all old imports that had components to migrate
129
- importsToRemove.forEach(importStatement => {
130
- content = content.replace(importStatement, '');
139
+ importsToRemove.forEach((importStatement) => {
140
+ content = content.replace(importStatement, "");
131
141
  });
132
142
 
133
143
  // Build new import statements
134
- let newImportStatements = '';
144
+ let newImportStatements = "";
135
145
 
136
146
  // Add remaining components to main import (deduplicate)
137
147
  if (remainingComponents.length > 0) {
138
148
  const uniqueRemaining = [...new Set(remainingComponents)];
139
- newImportStatements += `import { ${uniqueRemaining.join(', ')} } from '@SolaceDev/maas-react-components';\n`;
149
+ newImportStatements += `import { ${uniqueRemaining.join(", ")} } from '@SolaceDev/maas-react-components';\n`;
140
150
  }
141
151
 
142
152
  // Add new entry point imports
143
153
  Object.entries(newImports).forEach(([entryPoint, components]) => {
144
- newImportStatements += `import { ${components.join(', ')} } from '${entryPoint}';\n`;
154
+ newImportStatements += `import { ${components.join(", ")} } from '${entryPoint}';\n`;
145
155
  });
146
156
 
147
157
  // Insert new imports where the first old import was
@@ -152,30 +162,30 @@ function migrateFile(filePath, usedEntryPoints) {
152
162
  content = content.slice(0, insertPos) + newImportStatements + content.slice(insertPos);
153
163
  } else {
154
164
  // No imports found, add at the beginning (after any leading comments/whitespace)
155
- const afterComments = content.match(/^\s*(\/\*[\s\S]*?\*\/\s*)?(\/\/.*\n\s*)*/) || [''];
165
+ const afterComments = content.match(/^\s*(\/\*[\s\S]*?\*\/\s*)?(\/\/.*\n\s*)*/) || [""];
156
166
  const insertPos = afterComments[0].length;
157
- content = content.slice(0, insertPos) + newImportStatements + '\n' + content.slice(insertPos);
167
+ content = content.slice(0, insertPos) + newImportStatements + "\n" + content.slice(insertPos);
158
168
  }
159
169
 
160
170
  // Clean up multiple consecutive newlines
161
- content = content.replace(/\n{3,}/g, '\n\n');
171
+ content = content.replace(/\n{3,}/g, "\n\n");
162
172
 
163
- fs.writeFileSync(filePath, content, 'utf8');
173
+ fs.writeFileSync(filePath, content, "utf8");
164
174
  return true;
165
175
  }
166
176
 
167
177
  function walkDirectory(dir, callback) {
168
178
  const files = fs.readdirSync(dir);
169
179
 
170
- files.forEach(file => {
180
+ files.forEach((file) => {
171
181
  const filePath = path.join(dir, file);
172
182
  const stat = fs.statSync(filePath);
173
183
 
174
184
  if (stat.isDirectory()) {
175
- if (file !== 'node_modules' && file !== '.git' && file !== 'dist') {
185
+ if (file !== "node_modules" && file !== ".git" && file !== "dist") {
176
186
  walkDirectory(filePath, callback);
177
187
  }
178
- } else if (file.endsWith('.ts') || file.endsWith('.tsx') || file.endsWith('.js') || file.endsWith('.jsx')) {
188
+ } else if (file.endsWith(".ts") || file.endsWith(".tsx") || file.endsWith(".js") || file.endsWith(".jsx")) {
179
189
  callback(filePath);
180
190
  }
181
191
  });
@@ -184,14 +194,14 @@ function walkDirectory(dir, callback) {
184
194
  // Main
185
195
  const targetDir = process.argv[2];
186
196
 
187
- if (!targetDir || targetDir === '--help' || targetDir === '-h') {
188
- console.log('Usage: node migrate-imports.js <directory>');
189
- console.log('');
190
- console.log('Migrates imports from v16 to v17 format');
191
- console.log('');
192
- console.log('Example:');
193
- console.log(' node migrate-imports.js ./src');
194
- console.log(' npx @SolaceDev/maas-react-components migrate-imports ./src');
197
+ if (!targetDir || targetDir === "--help" || targetDir === "-h") {
198
+ console.log("Usage: node migrate-imports.js <directory>");
199
+ console.log("");
200
+ console.log("Migrates imports from v16 to v17 format");
201
+ console.log("");
202
+ console.log("Example:");
203
+ console.log(" node migrate-imports.js ./src");
204
+ console.log(" npx @SolaceDev/maas-react-components migrate-imports ./src");
195
205
  process.exit(targetDir ? 0 : 1);
196
206
  }
197
207
 
@@ -201,7 +211,7 @@ if (!fs.existsSync(targetDir)) {
201
211
  }
202
212
 
203
213
  console.log(`Migrating imports in: ${targetDir}`);
204
- console.log('');
214
+ console.log("");
205
215
 
206
216
  let filesModified = 0;
207
217
  let filesScanned = 0;
@@ -215,43 +225,43 @@ walkDirectory(targetDir, (filePath) => {
215
225
  }
216
226
  });
217
227
 
218
- console.log('');
228
+ console.log("");
219
229
  console.log(`Migration complete!`);
220
230
  console.log(`Files scanned: ${filesScanned}`);
221
231
  console.log(`Files modified: ${filesModified}`);
222
232
 
223
233
  if (filesModified > 0 && usedEntryPoints.size > 0) {
224
- console.log('');
225
- console.log('📦 Required peer dependencies');
226
- console.log('');
227
- console.log('Based on the components you\'re using, you need to install:');
228
- console.log('');
234
+ console.log("");
235
+ console.log("📦 Required peer dependencies");
236
+ console.log("");
237
+ console.log("Based on the components you're using, you need to install:");
238
+ console.log("");
229
239
 
230
240
  // Collect all packages that need to be installed
231
241
  const allPackages = new Set();
232
242
  const installCommands = [];
233
243
 
234
- usedEntryPoints.forEach(entryPoint => {
244
+ usedEntryPoints.forEach((entryPoint) => {
235
245
  const deps = peerDependencies[entryPoint];
236
246
  if (deps) {
237
- deps.packages.forEach(pkg => allPackages.add(pkg));
247
+ deps.packages.forEach((pkg) => allPackages.add(pkg));
238
248
  installCommands.push(deps.installCmd);
239
249
  }
240
250
  });
241
251
 
242
252
  // Show a single combined install command
243
253
  if (allPackages.size > 0) {
244
- console.log(`npm install ${Array.from(allPackages).join(' ')}`);
245
- console.log('');
246
- console.log('Or install individually:');
247
- installCommands.forEach(cmd => {
254
+ console.log(`npm install ${Array.from(allPackages).join(" ")}`);
255
+ console.log("");
256
+ console.log("Or install individually:");
257
+ installCommands.forEach((cmd) => {
248
258
  console.log(` ${cmd}`);
249
259
  });
250
- console.log('');
260
+ console.log("");
251
261
  }
252
262
 
253
- console.log('Next steps:');
254
- console.log('1. Review the changes in your code');
255
- console.log('2. Run the install command above');
256
- console.log('3. Test your application');
263
+ console.log("Next steps:");
264
+ console.log("1. Review the changes in your code");
265
+ console.log("2. Run the install command above");
266
+ console.log("3. Test your application");
257
267
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solace-ui-components",
3
- "version": "18.0.0",
3
+ "version": "18.0.2",
4
4
  "description": "React component library designed for Solace.",
5
5
  "author": "Solace",
6
6
  "license": "Apache-2.0",
@@ -45,13 +45,17 @@
45
45
  },
46
46
  "./package.json": "./package.json"
47
47
  },
48
- "sideEffects": false,
48
+ "sideEffects": [
49
+ "./src/resources/theme.ts",
50
+ "./dist/**/theme.*"
51
+ ],
49
52
  "engines": {
50
53
  "node": ">=14"
51
54
  },
52
55
  "peerDependencies": {
53
56
  "@codemirror/lang-json": "^6.0.2",
54
57
  "@codemirror/lang-xml": "^6.1.0",
58
+ "@codemirror/lang-yaml": "^6.1.2",
55
59
  "@codemirror/language": "^6.11.3",
56
60
  "@codemirror/state": "^6.0.0",
57
61
  "@codemirror/view": "^6.38.1",
@@ -82,6 +86,9 @@
82
86
  "@codemirror/lang-xml": {
83
87
  "optional": true
84
88
  },
89
+ "@codemirror/lang-yaml": {
90
+ "optional": true
91
+ },
85
92
  "@codemirror/language": {
86
93
  "optional": true
87
94
  },
@@ -144,6 +151,7 @@
144
151
  "@codemirror/commands": "^6.10.2",
145
152
  "@codemirror/lang-json": "^6.0.2",
146
153
  "@codemirror/lang-xml": "^6.1.0",
154
+ "@codemirror/lang-yaml": "^6.1.2",
147
155
  "@codemirror/language": "^6.11.3",
148
156
  "@codemirror/state": "^6.5.4",
149
157
  "@codemirror/view": "^6.38.1",
@@ -233,11 +241,10 @@
233
241
  "build": "tsup",
234
242
  "build:dev": "tsup --watch --no-dts --env.NODE_ENV development",
235
243
  "start": "./scripts/start.sh",
236
- "test": "cross-env CI=1 react-scripts test --env=jsdom",
244
+ "test": "pnpm --filter storybook run test",
237
245
  "test:build": "run-s build",
238
246
  "test:lint": "eslint .",
239
- "test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
240
- "test:watch": "react-scripts test --env=jsdom",
247
+ "test:watch": "pnpm --filter storybook run dev",
241
248
  "types": "tsc",
242
249
  "prettier:fix": "prettier --write .",
243
250
  "lint:fix": "eslint ./src --fix",
@@ -1,2 +0,0 @@
1
- 'use strict';var chunk4XH33OL7_js=require('./chunk-4XH33OL7.js'),jsxRuntime=require('react/jsx-runtime');function f({id:r,htmlForId:t,required:n=false,disabled:b=false,large:s=false,bold:d=false,readOnly:i=false,noWrap:c=false,children:p}){let e=chunk4XH33OL7_js.ua();return jsxRuntime.jsx(chunk4XH33OL7_js.le,{id:r,htmlFor:t,required:n,disabled:b,className:chunk4XH33OL7_js.D({"bold-label":d,"read-only":i}),sx:{display:"block",fontSize:s?e.typography.subtitle1:e.typography.body1,whiteSpace:c?"nowrap":"normal"},children:p})}var y=f;exports.a=y;//# sourceMappingURL=chunk-GDZZVHFP.js.map
2
- //# sourceMappingURL=chunk-GDZZVHFP.js.map