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
@@ -1,2 +1,2 @@
1
- 'use strict';var chunk6GFRKOAD_js=require('./chunk-6GFRKOAD.js'),chunkKQ4FCALU_js=require('./chunk-KQ4FCALU.js'),chunkUKAGR4YU_js=require('./chunk-UKAGR4YU.js');require('./chunk-3NKPHQNZ.js');var chunk3R3N5YG6_js=require('./chunk-3R3N5YG6.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=chunk3R3N5YG6_js.sa();return jsxRuntime.jsxs(chunk3R3N5YG6_js.La,{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=chunk3R3N5YG6_js.sa();return jsxRuntime.jsxs(chunk3R3N5YG6_js.La,{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(chunkKQ4FCALU_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(chunk3R3N5YG6_js.Gc,{sx:{display:s?"grid":"block",gridTemplateColumns:"1fr auto",alignItems:"flex-end",overflow:"hidden"},children:[C&&C>100?jsxRuntime.jsx(chunk6GFRKOAD_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(chunkUKAGR4YU_js.e,{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(chunk3R3N5YG6_js.Gc,{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(chunk3R3N5YG6_js.Gc,{mb:o.id.includes("oneof")?2:0,children:jsxRuntime.jsx(chunk6GFRKOAD_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(chunk3R3N5YG6_js.wf,{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(chunk6GFRKOAD_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(chunk6GFRKOAD_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(chunk6GFRKOAD_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=chunk3R3N5YG6_js.ua(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 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
2
2
  //# sourceMappingURL=json-schema-form.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/icons/VisibilityShowIcon.tsx","../src/resources/icons/VisibilityHideIcon.tsx","../src/components/jsonschemaform/jsonSchemaFormUtils.tsx","../src/components/jsonschemaform/SolaceJsonSchemaForm.tsx"],"names":["VisibilityShowIcon","size","fill","theme","useTheme","jsxs","SvgIcon_default","jsx","VisibilityHideIcon","EMPTY_VALUE","SENSITIVE_FIELD_VALUE","onChangeTrigger","props","e","value","isEmpty","toString","isPasswordField","schema","getMaxLength","readonly","CustomTextWidget","widgetProps","transformWidgetProps","shouldShowEmptyValueForSensitiveField","disabled","label","name","required","errorMessage","helperMessage","isSensitiveField","showSensitiveField","setShowSensitiveField","useState","shouldShowEmptyValue","useMemo","fieldValue","sensitiveFieldToggle","SolaceButton_default","maxLength","Box_default","SolaceTextArea_default","SolaceTextField_default","CustomSelectWidget","id","options","title","SolaceSelect_default","option","MenuItem_default","Fragment","CustomCheckboxWidget","SolaceCheckBox_default","CustomDescriptionFieldTemplate","templateProps","transformTemplateProps","description","SolaceTypography","CustomTitleFieldTemplate","getTemplates","transformDescriptionProps","transformTitleProps","getWidgets","CustomForm","styled_default","Form","getOrder","order","uiOrder","hideProperties","isHidden","uiSchema","properties","property","SolaceJsonSchemaForm","formItem","formData","formOptions","readOnly","formRef","liveValidate","onChange","transformDescription","transformError","transformWidget","transformTitle","ajvClass","tagName","customValidator","customizeValidator","Ajv2020","newProps","transformErrors","errors","error","handleOnChange","data","SolaceJsonSchemaForm_default"],"mappings":"iiBAkBO,IAAMA,CAAAA,CAAqB,CAAC,CAAE,KAAAC,CAAAA,CAAO,EAAA,CAAI,IAAA,CAAAC,CAAAA,CAAO,EAAG,CAAA,GAAmB,CAC5E,IAAMC,CAAAA,CAAQC,qBAAS,CACvB,OACCC,eAAAA,CAACC,mBAAAA,CAAA,CAAQ,EAAA,CAAI,CAAE,KAAA,CAAO,CAAA,EAAGL,CAAI,CAAA,EAAA,CAAA,CAAM,MAAA,CAAQ,CAAA,EAAGA,CAAI,IAAK,CAAA,CAAG,OAAA,CAAQ,WAAA,CACjE,QAAA,CAAA,CAAAM,eAAC,GAAA,CAAA,CAAE,QAAA,CAAS,wBAAA,CACX,QAAA,CAAAA,eAAC,MAAA,CAAA,CACA,CAAA,CAAE,m+BAAA,CACF,IAAA,CAAML,GAAQC,CAAAA,CAAM,OAAA,CAAQ,EAAA,CAAG,SAAA,CAAU,MAC1C,CAAA,CACD,CAAA,CACAI,eAAC,MAAA,CAAA,CACA,QAAA,CAAAA,eAAC,UAAA,CAAA,CAAS,EAAA,CAAG,kBAAA,CACZ,QAAA,CAAAA,eAAC,MAAA,CAAA,CAAK,KAAA,CAAON,CAAAA,CAAM,MAAA,CAAQA,EAAM,IAAA,CAAME,CAAAA,CAAM,OAAA,CAAQ,EAAA,CAAG,WAAW,GAAA,CAAK,CAAA,CACzE,CAAA,CACD,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,MAAA,CAAQ1D,CAAAA,CACR,QAAA,CAAUsD,EACV,SAAA,CAAWiB,CAAAA,CACX,OAAA,CAAS1B,CAAAA,CAAWxC,EAAsBC,CAAqC,CAAA,CAC/E,SAAA,CAAWoC,CAAAA,CAAauB,EAAsBG,CAAc,CAAA,CAC5D,QAAA,CAAUT,CAAAA,CACV,SAAUmB,CAAAA,CACV,QAAA,CAAUjB,CAAAA,CACV,QAAA,CAAUtD,EACV,YAAA,CAAcwD,CAAAA,CACd,aAAA,CAAe,KAAA,CACf,gBAAiBY,CAAAA,CACjB,SAAA,CAASjB,CAAAA,CAAS,EAAA,CAClB,IAAKI,CAAAA,CAAAA,CAfAJ,CAAAA,CAAS,EAgBf,CAEF,KAEOsB,EAAAA,CAAQvB","file":"json-schema-form.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 { SvgIcon, useTheme } from \"@mui/material\";\n\nexport const VisibilityShowIcon = ({ size = 24, fill = \"\" }): JSX.Element => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<SvgIcon sx={{ width: `${size}px`, height: `${size}px` }} viewBox=\"0 0 24 24\">\n\t\t\t<g clipPath=\"url(#clip0_3496_34902)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill || theme.palette.ux.secondary.wMain}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_3496_34902\">\n\t\t\t\t\t<rect width={size} height={size} fill={theme.palette.ux.background.w10} />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</SvgIcon>\n\t);\n};\n","/*\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 { SvgIcon, useTheme } from \"@mui/material\";\n\nexport const VisibilityHideIcon = ({ size = 24, fill = \"\" }): JSX.Element => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<SvgIcon sx={{ width: `${size}px`, height: `${size}px` }} viewBox=\"0 0 24 24\">\n\t\t\t<g clipPath=\"url(#clip0_3496_34944)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill || theme.palette.ux.secondary.wMain}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_3496_34944\">\n\t\t\t\t\t<rect width={size} height={size} fill={theme.palette.ux.background.w10} />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</SvgIcon>\n\t);\n};\n","/*\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 { DescriptionFieldProps, RegistryWidgetsType, RJSFSchema, TitleFieldProps, WidgetProps } from \"@rjsf/utils\";\nimport { isEmpty, toString } from \"lodash\";\nimport { useMemo, useState } from \"react\";\nimport SolaceButton from \"../form/SolaceButton\";\nimport SolaceCheckBox from \"../form/SolaceCheckBox\";\nimport SolaceSelect from \"../form/SolaceSelect\";\nimport SolaceTextArea from \"../form/SolaceTextArea\";\nimport SolaceTextField from \"../form/SolaceTextField\";\nimport SolaceTypography from \"../SolaceTypography\";\nimport { VisibilityShowIcon } from \"../../resources/icons/VisibilityShowIcon\";\nimport { VisibilityHideIcon } from \"../../resources/icons/VisibilityHideIcon\";\nimport { Box, MenuItem } from \"@mui/material\";\n\nexport enum CustomProperty {\n\terror = \"x-custom-error\",\n\thidden = \"x-custom-hidden\"\n}\n\nconst EMPTY_VALUE = \"-\";\nconst SENSITIVE_FIELD_VALUE = \"**********\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst onChangeTrigger = (props: any, e: any) => {\n\tconst value = e.value;\n\n\tif (isEmpty(toString(value))) {\n\t\tprops.onChange(undefined);\n\t} else {\n\t\tprops.onChange(value);\n\t}\n};\n\nconst isPasswordField = (schema: RJSFSchema) => {\n\treturn schema.options?.format === \"password\" || schema.format === \"password\";\n};\nconst getMaxLength = (schema: RJSFSchema, value: string, readonly = false) => {\n\t// if readonly and maxLength is set, use the length of the data to reduce empty space\n\tif (readonly) {\n\t\treturn schema.maxLength ? value.length : schema.maxLength;\n\t}\n\n\treturn schema.maxLength;\n};\n\nconst CustomTextWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps,\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, label, name, readonly, required, schema, value } = props;\n\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\tconst isSensitiveField = isPasswordField(schema);\n\n\t// state\n\tconst [showSensitiveField, setShowSensitiveField] = useState(false);\n\n\tconst shouldShowEmptyValue = useMemo(() => {\n\t\treturn readonly && isSensitiveField && !value && shouldShowEmptyValueForSensitiveField?.(schema, props);\n\t}, [isSensitiveField, props, readonly, schema, shouldShowEmptyValueForSensitiveField, value]);\n\n\tconst fieldValue = useMemo(() => {\n\t\tlet fieldValue = value ?? \"\";\n\n\t\tif (readonly) {\n\t\t\tif (isSensitiveField) {\n\t\t\t\tif (shouldShowEmptyValue) {\n\t\t\t\t\tfieldValue = EMPTY_VALUE;\n\t\t\t\t} else {\n\t\t\t\t\tfieldValue = showSensitiveField ? fieldValue : SENSITIVE_FIELD_VALUE;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfieldValue = fieldValue || EMPTY_VALUE;\n\t\t\t}\n\t\t} else if (schema.const) {\n\t\t\tfieldValue = schema.const;\n\t\t}\n\n\t\treturn fieldValue;\n\t}, [value, readonly, schema.const, isSensitiveField, showSensitiveField, shouldShowEmptyValue]);\n\n\tconst sensitiveFieldToggle = useMemo(() => {\n\t\tif (isSensitiveField && !shouldShowEmptyValue) {\n\t\t\treturn [\n\t\t\t\t<SolaceButton\n\t\t\t\t\tkey={showSensitiveField ? \"eyeIcon\" : \"hideEyeIcon\"}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\tonClick={() => setShowSensitiveField(!showSensitiveField)}\n\t\t\t\t\tdataQa={showSensitiveField ? \"showPasswordButton\" : \"hidePasswordButton\"}\n\t\t\t\t>\n\t\t\t\t\t{showSensitiveField ? <VisibilityShowIcon /> : <VisibilityHideIcon />}\n\t\t\t\t</SolaceButton>\n\t\t\t];\n\t\t}\n\n\t\treturn undefined;\n\t}, [isSensitiveField, showSensitiveField, shouldShowEmptyValue]);\n\n\tconst maxLength = getMaxLength(schema, fieldValue, readonly);\n\treturn (\n\t\t<Box\n\t\t\tsx={{\n\t\t\t\tdisplay: isSensitiveField ? \"grid\" : \"block\",\n\t\t\t\tgridTemplateColumns: \"1fr auto\",\n\t\t\t\talignItems: \"flex-end\",\n\t\t\t\toverflow: \"hidden\"\n\t\t\t}}\n\t\t>\n\t\t\t{maxLength && maxLength > 100 ? (\n\t\t\t\t<SolaceTextArea\n\t\t\t\t\tname={name}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\t\tvalue={fieldValue}\n\t\t\t\t\treadOnly={readonly}\n\t\t\t\t\trequired={required && !readonly}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\tmaxLength={maxLength + 1} // add one to the maxLength to display error message to user\n\t\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\t\thelperText={helperMessage}\n\t\t\t\t\tplaceholder={schema.placeholder ?? \"\"}\n\t\t\t\t\tdataQa={`${label}-form-textArea`}\n\t\t\t\t></SolaceTextArea>\n\t\t\t) : (\n\t\t\t\t<SolaceTextField\n\t\t\t\t\ttype={isSensitiveField && !showSensitiveField ? \"password\" : \"text\"}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tname={name}\n\t\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\t\tvalue={fieldValue}\n\t\t\t\t\treadOnly={readonly}\n\t\t\t\t\trequired={required && !readonly}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tendAdornment={!readonly ? sensitiveFieldToggle : undefined}\n\t\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\t\thelperText={helperMessage}\n\t\t\t\t\tplaceholder={schema.placeholder ?? \"\"}\n\t\t\t\t\tdataQa={`${label}-form-textField`}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{readonly && sensitiveFieldToggle ? <Box ml={1}>{sensitiveFieldToggle}</Box> : null}\n\t\t</Box>\n\t);\n};\n\nconst CustomSelectWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, id, label, name, options, readonly, required, schema, title, value } = props;\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\n\treturn options.enumOptions !== undefined ? (\n\t\t<Box mb={props.id.includes(\"oneof\") ? 2 : 0}>\n\t\t\t<SolaceSelect\n\t\t\t\tlabel={label}\n\t\t\t\tname={name}\n\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\tvalue={value}\n\t\t\t\treadOnly={readonly}\n\t\t\t\trequired={required && !readonly}\n\t\t\t\tdisabled={disabled}\n\t\t\t\ttitle={title}\n\t\t\t\tid={id}\n\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\thelperText={helperMessage}\n\t\t\t\tdataQa={`${id}-form-select`}\n\t\t\t>\n\t\t\t\t{options.enumOptions.map((option) => (\n\t\t\t\t\t<MenuItem value={option.value} key={option.label}>\n\t\t\t\t\t\t{option.label}\n\t\t\t\t\t</MenuItem>\n\t\t\t\t))}\n\t\t\t</SolaceSelect>\n\t\t</Box>\n\t) : (\n\t\t<></>\n\t);\n};\n\nconst CustomCheckboxWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, label, name, readonly, required, schema, value } = props;\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\n\treturn (\n\t\t<SolaceCheckBox\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tonChange={(e) => props.onChange(e.value)}\n\t\t\treadOnly={readonly}\n\t\t\trequired={required && !readonly}\n\t\t\tdisabled={disabled}\n\t\t\tchecked={value}\n\t\t\thasErrors={!!errorMessage}\n\t\t\thelperText={helperMessage}\n\t\t\tdataQa={`${label}-form-checkbox`}\n\t\t/>\n\t);\n};\n\nfunction CustomDescriptionFieldTemplate(\n\ttemplateProps: DescriptionFieldProps,\n\ttransformTemplateProps?: (props: DescriptionFieldProps) => DescriptionFieldProps\n) {\n\tconst props = transformTemplateProps ? transformTemplateProps(templateProps) : templateProps;\n\tconst { description, id } = props;\n\n\treturn description === CustomProperty.hidden ? null : <SolaceTypography id={id}>{description}</SolaceTypography>;\n}\n\nfunction CustomTitleFieldTemplate(\n\ttemplateProps: TitleFieldProps,\n\ttransformTemplateProps?: (props: TitleFieldProps) => TitleFieldProps\n) {\n\tconst props = transformTemplateProps ? transformTemplateProps(templateProps) : templateProps;\n\tconst { id, title } = props;\n\n\treturn title === CustomProperty.hidden ? null : (\n\t\t<SolaceTypography id={id} variant=\"h5\">\n\t\t\t{title}\n\t\t</SolaceTypography>\n\t);\n}\n\nexport const getTemplates = (\n\ttransformDescriptionProps?: (props: DescriptionFieldProps) => DescriptionFieldProps,\n\ttransformTitleProps?: (props: TitleFieldProps) => TitleFieldProps\n) => {\n\treturn {\n\t\tDescriptionFieldTemplate: (props: DescriptionFieldProps) =>\n\t\t\tCustomDescriptionFieldTemplate(props, transformDescriptionProps),\n\t\tTitleFieldTemplate: (props: TitleFieldProps) => CustomTitleFieldTemplate(props, transformTitleProps)\n\t};\n};\n\nexport const getWidgets = (\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps,\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean\n): RegistryWidgetsType => {\n\treturn {\n\t\tCheckboxWidget: (props: WidgetProps) => CustomCheckboxWidget(props, transformWidgetProps),\n\t\tSelectWidget: (props: WidgetProps) => CustomSelectWidget(props, transformWidgetProps),\n\t\tTextWidget: (props: WidgetProps) =>\n\t\t\tCustomTextWidget(props, transformWidgetProps, shouldShowEmptyValueForSensitiveField),\n\t\tPasswordWidget: (props: WidgetProps) =>\n\t\t\tCustomTextWidget(props, transformWidgetProps, shouldShowEmptyValueForSensitiveField)\n\t};\n};\n","/*\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\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Form } from \"@rjsf/mui\";\nimport { CustomProperty, getTemplates, getWidgets } from \"./jsonSchemaFormUtils\";\nimport { RJSFSchema, UiSchema, WidgetProps } from \"@rjsf/utils\";\nimport { customizeValidator } from \"@rjsf/validator-ajv8\";\nimport Ajv2020 from \"ajv/dist/2020\";\nimport { styled } from \"@mui/material\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { ElementType } from \"react\";\nimport Ajv from \"ajv\";\n// Custom templates removed - using RJSF v5 stable which should work properly\n\nenum FormFieldType {\n\tdescription = \"description\",\n\tproperty = \"property\",\n\tsubmitButton = \"submitButton\",\n\ttitle = \"title\"\n}\ninterface FormItem {\n\tid: string; // unique id for the form\n\tschema: unknown; // must be castable to RJSFSchema\n}\ninterface FormOptions {\n\torder?: string[];\n\tisHidden?: (fieldType: FormFieldType, propertyName?: string, data?: any) => boolean;\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean;\n\ttagName?: ElementType<any> | undefined;\n}\n\n/**\n * Custom form component to override Form styles built into rjsf\n */\nconst CustomForm = styled(Form)(({ theme }) => ({\n\t\".solaceJsonSchemaForm\": {\n\t\tmaxWidth: \"585px\",\n\t\t\".MuiTypography-root\": {\n\t\t\tpadding: theme.spacing(3, 0), // form titles\n\n\t\t\t\"&.MuiTypography-caption\": {\n\t\t\t\tdisplay: \"none\" // hide form captions\n\t\t\t}\n\t\t},\n\t\t\".MuiFormControl-root\": {\n\t\t\t\".MuiGrid-root\": {\n\t\t\t\tpadding: 0,\n\t\t\t\tmargin: `0 16px 0 0 !important` // override rjsf element margin styles\n\t\t\t},\n\t\t\t\".form-group.field\": {\n\t\t\t\tpaddingBottom: theme.spacing(2), // form fields\n\n\t\t\t\t\"&.field-error ul\": {\n\t\t\t\t\tdisplay: \"none\" // hide error list\n\t\t\t\t},\n\n\t\t\t\t\".MuiBox-root\": {\n\t\t\t\t\t\"label .MuiFormLabel-asterisk\": {\n\t\t\t\t\t\tdisplay: \"none\"\n\t\t\t\t\t},\n\t\t\t\t\t\"label[for] .MuiFormLabel-asterisk\": {\n\t\t\t\t\t\tdisplay: \"inline\" // display only first asterisk on label for input\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\".form-group.field-array\": {\n\t\t\t\t// override rjsf array styles\n\t\t\t\t\".MuiPaper-root\": {\n\t\t\t\t\tboxShadow: \"none\",\n\t\t\t\t\tborder: `1px solid ${theme.palette.ux.secondary.w20}`,\n\t\t\t\t\tpadding: 0,\n\t\t\t\t\tmargin: theme.spacing(1, 0, 0, 0)\n\t\t\t\t},\n\t\t\t\t\".MuiTypography-root\": {\n\t\t\t\t\tpadding: theme.spacing(1, 0)\n\t\t\t\t},\n\t\t\t\t\".form-group.field\": {\n\t\t\t\t\tpaddingBottom: theme.spacing(2),\n\t\t\t\t\t\"&.field-object\": {\n\t\t\t\t\t\tpaddingBottom: 0\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}));\n\n/**\n * Returns the order of the form items ensuring there is an asterisk to include all fields\n */\nconst getOrder = (order: any) => {\n\tlet uiOrder;\n\n\tif (order?.length > 0) {\n\t\tif (!order.includes(\"*\")) {\n\t\t\torder.push(\"*\");\n\t\t}\n\n\t\tuiOrder = order;\n\t}\n\n\treturn uiOrder;\n};\n\n/**\n * Recursively hides properties based on the isHidden function\n */\n// eslint-disable-next-line sonarjs/cognitive-complexity\nconst hideProperties = (isHidden: any, uiSchema: UiSchema, schema: any) => {\n\tif (!schema) {\n\t\treturn;\n\t}\n\n\tconst properties = schema.properties;\n\n\tif (properties) {\n\t\tfor (const property in properties) {\n\t\t\t// hide all errors - errors are displayed with custom widgets\n\t\t\tuiSchema[property] = { \"ui:hideError\": true };\n\t\t\tif (isHidden(FormFieldType.property, property, properties[property])) {\n\t\t\t\t// hide rjsf property widget\n\t\t\t\tuiSchema[property][\"ui:widget\"] = \"hidden\";\n\t\t\t} else if (isHidden(FormFieldType.description, property, properties[property])) {\n\t\t\t\t// hide rjsf property description via custom handling - descriptions are displayed with custom widgets\n\t\t\t\tuiSchema[property][\"ui:description\"] = CustomProperty.hidden;\n\t\t\t}\n\t\t\t// Recursively process nested properties\n\t\t\tif (properties[property] && typeof properties[property] === \"object\") {\n\t\t\t\tif (!uiSchema[property]) {\n\t\t\t\t\tuiSchema[property] = {};\n\t\t\t\t}\n\t\t\t\thideProperties(isHidden, uiSchema[property], properties[property]);\n\t\t\t}\n\t\t}\n\t} else if (typeof schema === \"object\") {\n\t\tfor (const property in schema) {\n\t\t\thideProperties(isHidden, uiSchema, schema[property]);\n\t\t}\n\t}\n};\n\nexport interface SolaceJsonSchemaFormProps extends SolaceComponentProps {\n\t/*\n\t * The form item to render with an id and schema.\n\t *\n\t * id: string; // unique id for the form\n\t * schema: unknown; // must be castable to RJSFSchema\n\t */\n\tformItem: FormItem;\n\t/**\n\t * The form data to render in the form.\n\t */\n\tformData?: Record<string, unknown>;\n\t/**\n\t * The form options to customize the form, including:\n\t *\n\t * order?: string[]; // ordered property keys for display\n\t * isHidden?: () => boolean; // function to determine if field should be hidden,\n\t * shouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean; // function to determine if empty sensitive fields should show empty value instead of sensitive field toggle in readonly mode,\n\t * tagName?: ElementType<any> | undefined; // tag name (eg. \"div\") to replace \"form\" and support embedding in other forms\n\t */\n\tformOptions?: FormOptions;\n\t/*\n\t * Whether the form is read-only.\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Whether the form is disabled.\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Can be used in trigger form validation manually\n\t * e.g. formRef.current.validateForm()\n\t */\n\tformRef?: any;\n\t/**\n\t * Whether to validate the form data live\n\t */\n\tliveValidate?: boolean;\n\t/**\n\t * Callback function when the form data changes.\n\t */\n\tonChange?: (formData: any, formErrors: any[]) => void;\n\t/**\n\t * Function to transform the description widget props.\n\t */\n\ttransformDescription?: (props: any) => any;\n\t/**\n\t * Function to transform the error message.\n\t */\n\ttransformError?: (error: { name: string; message: string }) => any;\n\t/**\n\t * Function to transform the widget props.\n\t */\n\ttransformWidget?: (props: any) => any;\n\t/**\n\t * Function to transform the title widget props.\n\t */\n\ttransformTitle?: (props: any) => any;\n\t/**\n\t * Custom Ajv to use for the form, default to Ajv2020.\n\t */\n\tajvClass?: typeof Ajv;\n}\n\nfunction SolaceJsonSchemaForm({\n\tformItem,\n\tformData = {},\n\tformOptions = {},\n\treadOnly = false,\n\tdisabled = false,\n\tformRef,\n\tliveValidate = true,\n\tonChange,\n\ttransformDescription,\n\ttransformError,\n\ttransformWidget,\n\ttransformTitle,\n\tajvClass\n}: Readonly<SolaceJsonSchemaFormProps>) {\n\tconst schema = formItem.schema as RJSFSchema;\n\tconst { order, isHidden, shouldShowEmptyValueForSensitiveField, tagName } = formOptions;\n\tconst customValidator = customizeValidator({ AjvClass: ajvClass ?? Ajv2020 });\n\n\t/**\n\t * Build the uiSchema to support:\n\t * - overriding default styles\n\t * - ordering form items\n\t * - hiding widgets/properties\n\t */\n\tconst uiSchema: UiSchema = {\n\t\t\"ui:classNames\": \"solaceJsonSchemaForm\"\n\t};\n\n\tuiSchema[\"ui:order\"] = getOrder(order);\n\n\tif (isHidden) {\n\t\tif (isHidden(FormFieldType.submitButton)) {\n\t\t\tuiSchema[\"ui:submitButtonOptions\"] = { norender: true };\n\t\t}\n\n\t\tif (isHidden(FormFieldType.title)) {\n\t\t\tuiSchema[\"ui:options\"] = { label: false };\n\t\t}\n\n\t\thideProperties(isHidden, uiSchema, schema);\n\t}\n\n\t/**\n\t * Returns the transformed widget props with the first error message set as a custom error message for display\n\t */\n\tfunction transformWidgetProps(props: any) {\n\t\tconst newProps = transformWidget?.(props) ?? { ...props };\n\t\tconst hasErrors = props.rawErrors && props.rawErrors.length > 0;\n\n\t\tif (hasErrors) {\n\t\t\tnewProps[CustomProperty.error] = Array.from(new Set(props.rawErrors)).join(\", \");\n\t\t}\n\n\t\treturn newProps;\n\t}\n\n\t/**\n\t * Returns all errors, transformed by the provided function if it exists\n\t */\n\tfunction transformErrors(errors: any[]) {\n\t\tif (!transformError) {\n\t\t\treturn errors;\n\t\t}\n\n\t\treturn errors.map((error) => {\n\t\t\treturn transformError?.(error) ?? error;\n\t\t});\n\t}\n\n\tfunction handleOnChange(data: any) {\n\t\tonChange?.(data.formData, data.errors);\n\t}\n\n\t// Using RJSF v5.24.13 stable - no custom templates needed\n\n\treturn (\n\t\t<CustomForm\n\t\t\ttagName={tagName}\n\t\t\tkey={formItem.id}\n\t\t\tidPrefix={formItem.id}\n\t\t\tschema={schema}\n\t\t\tuiSchema={uiSchema}\n\t\t\tvalidator={customValidator}\n\t\t\twidgets={getWidgets(transformWidgetProps, shouldShowEmptyValueForSensitiveField)}\n\t\t\ttemplates={getTemplates(transformDescription, transformTitle)}\n\t\t\tformData={formData}\n\t\t\tonChange={handleOnChange}\n\t\t\treadonly={readOnly}\n\t\t\tdisabled={disabled}\n\t\t\tliveValidate={liveValidate}\n\t\t\tshowErrorList={false}\n\t\t\ttransformErrors={transformErrors}\n\t\t\tdata-qa={formItem.id}\n\t\t\tref={formRef}\n\t\t/>\n\t);\n}\n\nexport default SolaceJsonSchemaForm;\n"]}
1
+ {"version":3,"sources":["../src/resources/icons/VisibilityShowIcon.tsx","../src/resources/icons/VisibilityHideIcon.tsx","../src/components/jsonschemaform/jsonSchemaFormUtils.tsx","../src/components/jsonschemaform/SolaceJsonSchemaForm.tsx"],"names":["VisibilityShowIcon","size","fill","theme","useTheme","jsxs","SvgIcon_default","jsx","VisibilityHideIcon","EMPTY_VALUE","SENSITIVE_FIELD_VALUE","onChangeTrigger","props","e","value","isEmpty","toString","isPasswordField","schema","getMaxLength","readonly","CustomTextWidget","widgetProps","transformWidgetProps","shouldShowEmptyValueForSensitiveField","disabled","label","name","required","errorMessage","helperMessage","isSensitiveField","showSensitiveField","setShowSensitiveField","useState","shouldShowEmptyValue","useMemo","fieldValue","sensitiveFieldToggle","SolaceButton_default","maxLength","Box_default","SolaceTextArea_default","SolaceTextField_default","CustomSelectWidget","id","options","title","SolaceSelect_default","option","MenuItem_default","Fragment","CustomCheckboxWidget","SolaceCheckBox_default","CustomDescriptionFieldTemplate","templateProps","transformTemplateProps","description","SolaceTypography","CustomTitleFieldTemplate","getTemplates","transformDescriptionProps","transformTitleProps","getWidgets","CustomForm","styled_default","Form","getOrder","order","uiOrder","hideProperties","isHidden","uiSchema","properties","property","SolaceJsonSchemaForm","formItem","formData","formOptions","readOnly","formRef","liveValidate","onChange","transformDescription","transformError","transformWidget","transformTitle","ajvClass","tagName","customValidator","customizeValidator","Ajv2020","newProps","transformErrors","errors","error","handleOnChange","data","SolaceJsonSchemaForm_default"],"mappings":"gkBAkBO,IAAMA,CAAAA,CAAqB,CAAC,CAAE,KAAAC,CAAAA,CAAO,EA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EAAAA,CAAQvB","file":"json-schema-form.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 { SvgIcon, useTheme } from \"@mui/material\";\n\nexport const VisibilityShowIcon = ({ size = 24, fill = \"\" }): JSX.Element => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<SvgIcon sx={{ width: `${size}px`, height: `${size}px` }} viewBox=\"0 0 24 24\">\n\t\t\t<g clipPath=\"url(#clip0_3496_34902)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill || theme.palette.ux.secondary.wMain}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_3496_34902\">\n\t\t\t\t\t<rect width={size} height={size} fill={theme.palette.ux.background.w10} />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</SvgIcon>\n\t);\n};\n","/*\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 { SvgIcon, useTheme } from \"@mui/material\";\n\nexport const VisibilityHideIcon = ({ size = 24, fill = \"\" }): JSX.Element => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<SvgIcon sx={{ width: `${size}px`, height: `${size}px` }} viewBox=\"0 0 24 24\">\n\t\t\t<g clipPath=\"url(#clip0_3496_34944)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill || theme.palette.ux.secondary.wMain}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_3496_34944\">\n\t\t\t\t\t<rect width={size} height={size} fill={theme.palette.ux.background.w10} />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</SvgIcon>\n\t);\n};\n","/*\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 { DescriptionFieldProps, RegistryWidgetsType, RJSFSchema, TitleFieldProps, WidgetProps } from \"@rjsf/utils\";\nimport { isEmpty, toString } from \"lodash\";\nimport { useMemo, useState } from \"react\";\nimport SolaceButton from \"../form/SolaceButton\";\nimport SolaceCheckBox from \"../form/SolaceCheckBox\";\nimport SolaceSelect from \"../form/SolaceSelect\";\nimport SolaceTextArea from \"../form/SolaceTextArea\";\nimport SolaceTextField from \"../form/SolaceTextField\";\nimport SolaceTypography from \"../SolaceTypography\";\nimport { VisibilityShowIcon } from \"../../resources/icons/VisibilityShowIcon\";\nimport { VisibilityHideIcon } from \"../../resources/icons/VisibilityHideIcon\";\nimport { Box, MenuItem } from \"@mui/material\";\n\nexport enum CustomProperty {\n\terror = \"x-custom-error\",\n\thidden = \"x-custom-hidden\"\n}\n\nconst EMPTY_VALUE = \"-\";\nconst SENSITIVE_FIELD_VALUE = \"**********\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst onChangeTrigger = (props: any, e: any) => {\n\tconst value = e.value;\n\n\tif (isEmpty(toString(value))) {\n\t\tprops.onChange(undefined);\n\t} else {\n\t\tprops.onChange(value);\n\t}\n};\n\nconst isPasswordField = (schema: RJSFSchema) => {\n\treturn schema.options?.format === \"password\" || schema.format === \"password\";\n};\nconst getMaxLength = (schema: RJSFSchema, value: string, readonly = false) => {\n\t// if readonly and maxLength is set, use the length of the data to reduce empty space\n\tif (readonly) {\n\t\treturn schema.maxLength ? value.length : schema.maxLength;\n\t}\n\n\treturn schema.maxLength;\n};\n\nconst CustomTextWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps,\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, label, name, readonly, required, schema, value } = props;\n\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\tconst isSensitiveField = isPasswordField(schema);\n\n\t// state\n\tconst [showSensitiveField, setShowSensitiveField] = useState(false);\n\n\tconst shouldShowEmptyValue = useMemo(() => {\n\t\treturn readonly && isSensitiveField && !value && shouldShowEmptyValueForSensitiveField?.(schema, props);\n\t}, [isSensitiveField, props, readonly, schema, shouldShowEmptyValueForSensitiveField, value]);\n\n\tconst fieldValue = useMemo(() => {\n\t\tlet fieldValue = value ?? \"\";\n\n\t\tif (readonly) {\n\t\t\tif (isSensitiveField) {\n\t\t\t\tif (shouldShowEmptyValue) {\n\t\t\t\t\tfieldValue = EMPTY_VALUE;\n\t\t\t\t} else {\n\t\t\t\t\tfieldValue = showSensitiveField ? fieldValue : SENSITIVE_FIELD_VALUE;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfieldValue = fieldValue || EMPTY_VALUE;\n\t\t\t}\n\t\t} else if (schema.const) {\n\t\t\tfieldValue = schema.const;\n\t\t}\n\n\t\treturn fieldValue;\n\t}, [value, readonly, schema.const, isSensitiveField, showSensitiveField, shouldShowEmptyValue]);\n\n\tconst sensitiveFieldToggle = useMemo(() => {\n\t\tif (isSensitiveField && !shouldShowEmptyValue) {\n\t\t\treturn [\n\t\t\t\t<SolaceButton\n\t\t\t\t\tkey={showSensitiveField ? \"eyeIcon\" : \"hideEyeIcon\"}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\tonClick={() => setShowSensitiveField(!showSensitiveField)}\n\t\t\t\t\tdataQa={showSensitiveField ? \"showPasswordButton\" : \"hidePasswordButton\"}\n\t\t\t\t>\n\t\t\t\t\t{showSensitiveField ? <VisibilityShowIcon /> : <VisibilityHideIcon />}\n\t\t\t\t</SolaceButton>\n\t\t\t];\n\t\t}\n\n\t\treturn undefined;\n\t}, [isSensitiveField, showSensitiveField, shouldShowEmptyValue]);\n\n\tconst maxLength = getMaxLength(schema, fieldValue, readonly);\n\treturn (\n\t\t<Box\n\t\t\tsx={{\n\t\t\t\tdisplay: isSensitiveField ? \"grid\" : \"block\",\n\t\t\t\tgridTemplateColumns: \"1fr auto\",\n\t\t\t\talignItems: \"flex-end\",\n\t\t\t\toverflow: \"hidden\"\n\t\t\t}}\n\t\t>\n\t\t\t{maxLength && maxLength > 100 ? (\n\t\t\t\t<SolaceTextArea\n\t\t\t\t\tname={name}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\t\tvalue={fieldValue}\n\t\t\t\t\treadOnly={readonly}\n\t\t\t\t\trequired={required && !readonly}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\tmaxLength={maxLength + 1} // add one to the maxLength to display error message to user\n\t\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\t\thelperText={helperMessage}\n\t\t\t\t\tplaceholder={schema.placeholder ?? \"\"}\n\t\t\t\t\tdataQa={`${label}-form-textArea`}\n\t\t\t\t></SolaceTextArea>\n\t\t\t) : (\n\t\t\t\t<SolaceTextField\n\t\t\t\t\ttype={isSensitiveField && !showSensitiveField ? \"password\" : \"text\"}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tname={name}\n\t\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\t\tvalue={fieldValue}\n\t\t\t\t\treadOnly={readonly}\n\t\t\t\t\trequired={required && !readonly}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tendAdornment={!readonly ? sensitiveFieldToggle : undefined}\n\t\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\t\thelperText={helperMessage}\n\t\t\t\t\tplaceholder={schema.placeholder ?? \"\"}\n\t\t\t\t\tdataQa={`${label}-form-textField`}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{readonly && sensitiveFieldToggle ? <Box ml={1}>{sensitiveFieldToggle}</Box> : null}\n\t\t</Box>\n\t);\n};\n\nconst CustomSelectWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, id, label, name, options, readonly, required, schema, title, value } = props;\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\n\treturn options.enumOptions !== undefined ? (\n\t\t<Box mb={props.id.includes(\"oneof\") ? 2 : 0}>\n\t\t\t<SolaceSelect\n\t\t\t\tlabel={label}\n\t\t\t\tname={name}\n\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\tvalue={value}\n\t\t\t\treadOnly={readonly}\n\t\t\t\trequired={required && !readonly}\n\t\t\t\tdisabled={disabled}\n\t\t\t\ttitle={title}\n\t\t\t\tid={id}\n\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\thelperText={helperMessage}\n\t\t\t\tdataQa={`${id}-form-select`}\n\t\t\t>\n\t\t\t\t{options.enumOptions.map((option) => (\n\t\t\t\t\t<MenuItem value={option.value} key={option.label}>\n\t\t\t\t\t\t{option.label}\n\t\t\t\t\t</MenuItem>\n\t\t\t\t))}\n\t\t\t</SolaceSelect>\n\t\t</Box>\n\t) : (\n\t\t<></>\n\t);\n};\n\nconst CustomCheckboxWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, label, name, readonly, required, schema, value } = props;\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\n\treturn (\n\t\t<SolaceCheckBox\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tonChange={(e) => props.onChange(e.value)}\n\t\t\treadOnly={readonly}\n\t\t\trequired={required && !readonly}\n\t\t\tdisabled={disabled}\n\t\t\tchecked={value}\n\t\t\thasErrors={!!errorMessage}\n\t\t\thelperText={helperMessage}\n\t\t\tdataQa={`${label}-form-checkbox`}\n\t\t/>\n\t);\n};\n\nfunction CustomDescriptionFieldTemplate(\n\ttemplateProps: DescriptionFieldProps,\n\ttransformTemplateProps?: (props: DescriptionFieldProps) => DescriptionFieldProps\n) {\n\tconst props = transformTemplateProps ? transformTemplateProps(templateProps) : templateProps;\n\tconst { description, id } = props;\n\n\treturn description === CustomProperty.hidden ? null : <SolaceTypography id={id}>{description}</SolaceTypography>;\n}\n\nfunction CustomTitleFieldTemplate(\n\ttemplateProps: TitleFieldProps,\n\ttransformTemplateProps?: (props: TitleFieldProps) => TitleFieldProps\n) {\n\tconst props = transformTemplateProps ? transformTemplateProps(templateProps) : templateProps;\n\tconst { id, title } = props;\n\n\treturn title === CustomProperty.hidden ? null : (\n\t\t<SolaceTypography id={id} variant=\"h5\">\n\t\t\t{title}\n\t\t</SolaceTypography>\n\t);\n}\n\nexport const getTemplates = (\n\ttransformDescriptionProps?: (props: DescriptionFieldProps) => DescriptionFieldProps,\n\ttransformTitleProps?: (props: TitleFieldProps) => TitleFieldProps\n) => {\n\treturn {\n\t\tDescriptionFieldTemplate: (props: DescriptionFieldProps) =>\n\t\t\tCustomDescriptionFieldTemplate(props, transformDescriptionProps),\n\t\tTitleFieldTemplate: (props: TitleFieldProps) => CustomTitleFieldTemplate(props, transformTitleProps)\n\t};\n};\n\nexport const getWidgets = (\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps,\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean\n): RegistryWidgetsType => {\n\treturn {\n\t\tCheckboxWidget: (props: WidgetProps) => CustomCheckboxWidget(props, transformWidgetProps),\n\t\tSelectWidget: (props: WidgetProps) => CustomSelectWidget(props, transformWidgetProps),\n\t\tTextWidget: (props: WidgetProps) =>\n\t\t\tCustomTextWidget(props, transformWidgetProps, shouldShowEmptyValueForSensitiveField),\n\t\tPasswordWidget: (props: WidgetProps) =>\n\t\t\tCustomTextWidget(props, transformWidgetProps, shouldShowEmptyValueForSensitiveField)\n\t};\n};\n","/*\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\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Form } from \"@rjsf/mui\";\nimport { CustomProperty, getTemplates, getWidgets } from \"./jsonSchemaFormUtils\";\nimport { RJSFSchema, UiSchema, WidgetProps } from \"@rjsf/utils\";\nimport { customizeValidator } from \"@rjsf/validator-ajv8\";\nimport Ajv2020 from \"ajv/dist/2020\";\nimport { styled } from \"@mui/material\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { ElementType } from \"react\";\nimport Ajv from \"ajv\";\n// Custom templates removed - using RJSF v5 stable which should work properly\n\nenum FormFieldType {\n\tdescription = \"description\",\n\tproperty = \"property\",\n\tsubmitButton = \"submitButton\",\n\ttitle = \"title\"\n}\ninterface FormItem {\n\tid: string; // unique id for the form\n\tschema: unknown; // must be castable to RJSFSchema\n}\ninterface FormOptions {\n\torder?: string[];\n\tisHidden?: (fieldType: FormFieldType, propertyName?: string, data?: any) => boolean;\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean;\n\ttagName?: ElementType<any> | undefined;\n}\n\n/**\n * Custom form component to override Form styles built into rjsf\n */\nconst CustomForm = styled(Form)(({ theme }) => ({\n\t\".solaceJsonSchemaForm\": {\n\t\tmaxWidth: \"585px\",\n\t\t\".MuiTypography-root\": {\n\t\t\tpadding: theme.spacing(3, 0), // form titles\n\n\t\t\t\"&.MuiTypography-caption\": {\n\t\t\t\tdisplay: \"none\" // hide form captions\n\t\t\t}\n\t\t},\n\t\t\".MuiFormControl-root\": {\n\t\t\t\".MuiGrid-root\": {\n\t\t\t\tpadding: 0,\n\t\t\t\tmargin: `0 16px 0 0 !important` // override rjsf element margin styles\n\t\t\t},\n\t\t\t\".form-group.field\": {\n\t\t\t\tpaddingBottom: theme.spacing(2), // form fields\n\n\t\t\t\t\"&.field-error ul\": {\n\t\t\t\t\tdisplay: \"none\" // hide error list\n\t\t\t\t},\n\n\t\t\t\t\".MuiBox-root\": {\n\t\t\t\t\t\"label .MuiFormLabel-asterisk\": {\n\t\t\t\t\t\tdisplay: \"none\"\n\t\t\t\t\t},\n\t\t\t\t\t\"label[for] .MuiFormLabel-asterisk\": {\n\t\t\t\t\t\tdisplay: \"inline\" // display only first asterisk on label for input\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\".form-group.field-array\": {\n\t\t\t\t// override rjsf array styles\n\t\t\t\t\".MuiPaper-root\": {\n\t\t\t\t\tboxShadow: \"none\",\n\t\t\t\t\tborder: `1px solid ${theme.palette.ux.secondary.w20}`,\n\t\t\t\t\tpadding: 0,\n\t\t\t\t\tmargin: theme.spacing(1, 0, 0, 0)\n\t\t\t\t},\n\t\t\t\t\".MuiTypography-root\": {\n\t\t\t\t\tpadding: theme.spacing(1, 0)\n\t\t\t\t},\n\t\t\t\t\".form-group.field\": {\n\t\t\t\t\tpaddingBottom: theme.spacing(2),\n\t\t\t\t\t\"&.field-object\": {\n\t\t\t\t\t\tpaddingBottom: 0\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}));\n\n/**\n * Returns the order of the form items ensuring there is an asterisk to include all fields\n */\nconst getOrder = (order: any) => {\n\tlet uiOrder;\n\n\tif (order?.length > 0) {\n\t\tif (!order.includes(\"*\")) {\n\t\t\torder.push(\"*\");\n\t\t}\n\n\t\tuiOrder = order;\n\t}\n\n\treturn uiOrder;\n};\n\n/**\n * Recursively hides properties based on the isHidden function\n */\n// eslint-disable-next-line sonarjs/cognitive-complexity\nconst hideProperties = (isHidden: any, uiSchema: UiSchema, schema: any) => {\n\tif (!schema) {\n\t\treturn;\n\t}\n\n\tconst properties = schema.properties;\n\n\tif (properties) {\n\t\tfor (const property in properties) {\n\t\t\t// hide all errors - errors are displayed with custom widgets\n\t\t\tuiSchema[property] = { \"ui:hideError\": true };\n\t\t\tif (isHidden(FormFieldType.property, property, properties[property])) {\n\t\t\t\t// hide rjsf property widget\n\t\t\t\tuiSchema[property][\"ui:widget\"] = \"hidden\";\n\t\t\t} else if (isHidden(FormFieldType.description, property, properties[property])) {\n\t\t\t\t// hide rjsf property description via custom handling - descriptions are displayed with custom widgets\n\t\t\t\tuiSchema[property][\"ui:description\"] = CustomProperty.hidden;\n\t\t\t}\n\t\t\t// Recursively process nested properties\n\t\t\tif (properties[property] && typeof properties[property] === \"object\") {\n\t\t\t\tif (!uiSchema[property]) {\n\t\t\t\t\tuiSchema[property] = {};\n\t\t\t\t}\n\t\t\t\thideProperties(isHidden, uiSchema[property], properties[property]);\n\t\t\t}\n\t\t}\n\t} else if (typeof schema === \"object\") {\n\t\tfor (const property in schema) {\n\t\t\thideProperties(isHidden, uiSchema, schema[property]);\n\t\t}\n\t}\n};\n\nexport interface SolaceJsonSchemaFormProps extends SolaceComponentProps {\n\t/*\n\t * The form item to render with an id and schema.\n\t *\n\t * id: string; // unique id for the form\n\t * schema: unknown; // must be castable to RJSFSchema\n\t */\n\tformItem: FormItem;\n\t/**\n\t * The form data to render in the form.\n\t */\n\tformData?: Record<string, unknown>;\n\t/**\n\t * The form options to customize the form, including:\n\t *\n\t * order?: string[]; // ordered property keys for display\n\t * isHidden?: () => boolean; // function to determine if field should be hidden,\n\t * shouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean; // function to determine if empty sensitive fields should show empty value instead of sensitive field toggle in readonly mode,\n\t * tagName?: ElementType<any> | undefined; // tag name (eg. \"div\") to replace \"form\" and support embedding in other forms\n\t */\n\tformOptions?: FormOptions;\n\t/*\n\t * Whether the form is read-only.\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Whether the form is disabled.\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Can be used in trigger form validation manually\n\t * e.g. formRef.current.validateForm()\n\t */\n\tformRef?: any;\n\t/**\n\t * Whether to validate the form data live\n\t */\n\tliveValidate?: boolean;\n\t/**\n\t * Callback function when the form data changes.\n\t */\n\tonChange?: (formData: any, formErrors: any[]) => void;\n\t/**\n\t * Function to transform the description widget props.\n\t */\n\ttransformDescription?: (props: any) => any;\n\t/**\n\t * Function to transform the error message.\n\t */\n\ttransformError?: (error: { name: string; message: string }) => any;\n\t/**\n\t * Function to transform the widget props.\n\t */\n\ttransformWidget?: (props: any) => any;\n\t/**\n\t * Function to transform the title widget props.\n\t */\n\ttransformTitle?: (props: any) => any;\n\t/**\n\t * Custom Ajv to use for the form, default to Ajv2020.\n\t */\n\tajvClass?: typeof Ajv;\n}\n\nfunction SolaceJsonSchemaForm({\n\tformItem,\n\tformData = {},\n\tformOptions = {},\n\treadOnly = false,\n\tdisabled = false,\n\tformRef,\n\tliveValidate = true,\n\tonChange,\n\ttransformDescription,\n\ttransformError,\n\ttransformWidget,\n\ttransformTitle,\n\tajvClass\n}: Readonly<SolaceJsonSchemaFormProps>) {\n\tconst schema = formItem.schema as RJSFSchema;\n\tconst { order, isHidden, shouldShowEmptyValueForSensitiveField, tagName } = formOptions;\n\tconst customValidator = customizeValidator({ AjvClass: ajvClass ?? Ajv2020 });\n\n\t/**\n\t * Build the uiSchema to support:\n\t * - overriding default styles\n\t * - ordering form items\n\t * - hiding widgets/properties\n\t */\n\tconst uiSchema: UiSchema = {\n\t\t\"ui:classNames\": \"solaceJsonSchemaForm\"\n\t};\n\n\tuiSchema[\"ui:order\"] = getOrder(order);\n\n\tif (isHidden) {\n\t\tif (isHidden(FormFieldType.submitButton)) {\n\t\t\tuiSchema[\"ui:submitButtonOptions\"] = { norender: true };\n\t\t}\n\n\t\tif (isHidden(FormFieldType.title)) {\n\t\t\tuiSchema[\"ui:options\"] = { label: false };\n\t\t}\n\n\t\thideProperties(isHidden, uiSchema, schema);\n\t}\n\n\t/**\n\t * Returns the transformed widget props with the first error message set as a custom error message for display\n\t */\n\tfunction transformWidgetProps(props: any) {\n\t\tconst newProps = transformWidget?.(props) ?? { ...props };\n\t\tconst hasErrors = props.rawErrors && props.rawErrors.length > 0;\n\n\t\tif (hasErrors) {\n\t\t\tnewProps[CustomProperty.error] = Array.from(new Set(props.rawErrors)).join(\", \");\n\t\t}\n\n\t\treturn newProps;\n\t}\n\n\t/**\n\t * Returns all errors, transformed by the provided function if it exists\n\t */\n\tfunction transformErrors(errors: any[]) {\n\t\tif (!transformError) {\n\t\t\treturn errors;\n\t\t}\n\n\t\treturn errors.map((error) => {\n\t\t\treturn transformError?.(error) ?? error;\n\t\t});\n\t}\n\n\tfunction handleOnChange(data: any) {\n\t\tonChange?.(data.formData, data.errors);\n\t}\n\n\t// Using RJSF v5.24.13 stable - no custom templates needed\n\n\treturn (\n\t\t<CustomForm\n\t\t\ttagName={tagName}\n\t\t\tkey={formItem.id}\n\t\t\tidPrefix={formItem.id}\n\t\t\tschema={schema}\n\t\t\tuiSchema={uiSchema}\n\t\t\tvalidator={customValidator}\n\t\t\twidgets={getWidgets(transformWidgetProps, shouldShowEmptyValueForSensitiveField)}\n\t\t\ttemplates={getTemplates(transformDescription, transformTitle)}\n\t\t\tformData={formData}\n\t\t\tonChange={handleOnChange}\n\t\t\treadonly={readOnly}\n\t\t\tdisabled={disabled}\n\t\t\tliveValidate={liveValidate}\n\t\t\tshowErrorList={false}\n\t\t\ttransformErrors={transformErrors}\n\t\t\tdata-qa={formItem.id}\n\t\t\tref={formRef}\n\t\t/>\n\t);\n}\n\nexport default SolaceJsonSchemaForm;\n"]}
@@ -1,2 +1,2 @@
1
- import {m,o,n,l}from'./chunk-C2UC34ZQ.modern.mjs';import {b}from'./chunk-BRCNJ6YU.modern.mjs';import {e}from'./chunk-O6RZQMKZ.modern.mjs';import'./chunk-OIYJ7CVG.modern.mjs';import {ua,Gc,wf,sa,La}from'./chunk-GQTRWH6F.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=sa();return jsxs(La,{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=sa();return jsxs(La,{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$1,r,o$1){let i=r?r(e$1):e$1,{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]=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?l:z:l=l||$:a.const&&(l=a.const),l},[m,n,a.const,s,d,x]),b$1=useMemo(()=>{if(s&&!x)return [jsx(b,{variant:"icon",onClick:()=>c(!d),dataQa:d?"showPasswordButton":"hidePasswordButton",children:d?jsx(_,{}):jsx(Z,{})},d?"eyeIcon":"hideEyeIcon")]},[s,d,x]),C=oe(a,F,n);return jsxs(Gc,{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(e,{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$1,hasErrors:!!y,helperText:S,placeholder:a.placeholder??"",dataQa:`${g}-form-textField`}),n&&b$1?jsx(Gc,{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(Gc,{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(wf,{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=ua(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-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
2
2
  //# sourceMappingURL=json-schema-form.modern.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/icons/VisibilityShowIcon.tsx","../src/resources/icons/VisibilityHideIcon.tsx","../src/components/jsonschemaform/jsonSchemaFormUtils.tsx","../src/components/jsonschemaform/SolaceJsonSchemaForm.tsx"],"names":["VisibilityShowIcon","size","fill","theme","useTheme","jsxs","SvgIcon_default","jsx","VisibilityHideIcon","EMPTY_VALUE","SENSITIVE_FIELD_VALUE","onChangeTrigger","props","e","value","isEmpty","toString","isPasswordField","schema","getMaxLength","readonly","CustomTextWidget","widgetProps","transformWidgetProps","shouldShowEmptyValueForSensitiveField","disabled","label","name","required","errorMessage","helperMessage","isSensitiveField","showSensitiveField","setShowSensitiveField","useState","shouldShowEmptyValue","useMemo","fieldValue","sensitiveFieldToggle","SolaceButton_default","maxLength","Box_default","SolaceTextArea_default","SolaceTextField_default","CustomSelectWidget","id","options","title","SolaceSelect_default","option","MenuItem_default","Fragment","CustomCheckboxWidget","SolaceCheckBox_default","CustomDescriptionFieldTemplate","templateProps","transformTemplateProps","description","SolaceTypography","CustomTitleFieldTemplate","getTemplates","transformDescriptionProps","transformTitleProps","getWidgets","CustomForm","styled_default","Form","getOrder","order","uiOrder","hideProperties","isHidden","uiSchema","properties","property","SolaceJsonSchemaForm","formItem","formData","formOptions","readOnly","formRef","liveValidate","onChange","transformDescription","transformError","transformWidget","transformTitle","ajvClass","tagName","customValidator","customizeValidator","Ajv2020","newProps","transformErrors","errors","error","handleOnChange","data","SolaceJsonSchemaForm_default"],"mappings":"qdAkBO,IAAMA,CAAAA,CAAqB,CAAC,CAAE,KAAAC,CAAAA,CAAO,EAAA,CAAI,IAAA,CAAAC,CAAAA,CAAO,EAAG,CAAA,GAAmB,CAC5E,IAAMC,CAAAA,CAAQC,IAAS,CACvB,OACCC,IAAAA,CAACC,EAAAA,CAAA,CAAQ,EAAA,CAAI,CAAE,KAAA,CAAO,CAAA,EAAGL,CAAI,CAAA,EAAA,CAAA,CAAM,MAAA,CAAQ,CAAA,EAAGA,CAAI,IAAK,CAAA,CAAG,OAAA,CAAQ,WAAA,CACjE,QAAA,CAAA,CAAAM,IAAC,GAAA,CAAA,CAAE,QAAA,CAAS,wBAAA,CACX,QAAA,CAAAA,IAAC,MAAA,CAAA,CACA,CAAA,CAAE,m+BAAA,CACF,IAAA,CAAML,GAAQC,CAAAA,CAAM,OAAA,CAAQ,EAAA,CAAG,SAAA,CAAU,MAC1C,CAAA,CACD,CAAA,CACAI,IAAC,MAAA,CAAA,CACA,QAAA,CAAAA,IAAC,UAAA,CAAA,CAAS,EAAA,CAAG,kBAAA,CACZ,QAAA,CAAAA,IAAC,MAAA,CAAA,CAAK,KAAA,CAAON,CAAAA,CAAM,MAAA,CAAQA,EAAM,IAAA,CAAME,CAAAA,CAAM,OAAA,CAAQ,EAAA,CAAG,WAAW,GAAA,CAAK,CAAA,CACzE,CAAA,CACD,CAAA,CAAA,CACD,CAEF,CAAA,CCjBO,IAAMK,CAAAA,CAAqB,CAAC,CAAE,IAAA,CAAAP,CAAAA,CAAO,EAAA,CAAI,KAAAC,CAAAA,CAAO,EAAG,CAAA,GAAmB,CAC5E,IAAMC,CAAAA,CA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AA,CAAUT,CAAAA,CACV,SAAUmB,CAAAA,CACV,QAAA,CAAUjB,CAAAA,CACV,QAAA,CAAUtD,EACV,YAAA,CAAcwD,CAAAA,CACd,aAAA,CAAe,KAAA,CACf,gBAAiBY,CAAAA,CACjB,SAAA,CAASjB,CAAAA,CAAS,EAAA,CAClB,IAAKI,CAAAA,CAAAA,CAfAJ,CAAAA,CAAS,EAgBf,CAEF,KAEOsB,EAAAA,CAAQvB","file":"json-schema-form.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 { SvgIcon, useTheme } from \"@mui/material\";\n\nexport const VisibilityShowIcon = ({ size = 24, fill = \"\" }): JSX.Element => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<SvgIcon sx={{ width: `${size}px`, height: `${size}px` }} viewBox=\"0 0 24 24\">\n\t\t\t<g clipPath=\"url(#clip0_3496_34902)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill || theme.palette.ux.secondary.wMain}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_3496_34902\">\n\t\t\t\t\t<rect width={size} height={size} fill={theme.palette.ux.background.w10} />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</SvgIcon>\n\t);\n};\n","/*\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 { SvgIcon, useTheme } from \"@mui/material\";\n\nexport const VisibilityHideIcon = ({ size = 24, fill = \"\" }): JSX.Element => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<SvgIcon sx={{ width: `${size}px`, height: `${size}px` }} viewBox=\"0 0 24 24\">\n\t\t\t<g clipPath=\"url(#clip0_3496_34944)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill || theme.palette.ux.secondary.wMain}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_3496_34944\">\n\t\t\t\t\t<rect width={size} height={size} fill={theme.palette.ux.background.w10} />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</SvgIcon>\n\t);\n};\n","/*\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 { DescriptionFieldProps, RegistryWidgetsType, RJSFSchema, TitleFieldProps, WidgetProps } from \"@rjsf/utils\";\nimport { isEmpty, toString } from \"lodash\";\nimport { useMemo, useState } from \"react\";\nimport SolaceButton from \"../form/SolaceButton\";\nimport SolaceCheckBox from \"../form/SolaceCheckBox\";\nimport SolaceSelect from \"../form/SolaceSelect\";\nimport SolaceTextArea from \"../form/SolaceTextArea\";\nimport SolaceTextField from \"../form/SolaceTextField\";\nimport SolaceTypography from \"../SolaceTypography\";\nimport { VisibilityShowIcon } from \"../../resources/icons/VisibilityShowIcon\";\nimport { VisibilityHideIcon } from \"../../resources/icons/VisibilityHideIcon\";\nimport { Box, MenuItem } from \"@mui/material\";\n\nexport enum CustomProperty {\n\terror = \"x-custom-error\",\n\thidden = \"x-custom-hidden\"\n}\n\nconst EMPTY_VALUE = \"-\";\nconst SENSITIVE_FIELD_VALUE = \"**********\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst onChangeTrigger = (props: any, e: any) => {\n\tconst value = e.value;\n\n\tif (isEmpty(toString(value))) {\n\t\tprops.onChange(undefined);\n\t} else {\n\t\tprops.onChange(value);\n\t}\n};\n\nconst isPasswordField = (schema: RJSFSchema) => {\n\treturn schema.options?.format === \"password\" || schema.format === \"password\";\n};\nconst getMaxLength = (schema: RJSFSchema, value: string, readonly = false) => {\n\t// if readonly and maxLength is set, use the length of the data to reduce empty space\n\tif (readonly) {\n\t\treturn schema.maxLength ? value.length : schema.maxLength;\n\t}\n\n\treturn schema.maxLength;\n};\n\nconst CustomTextWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps,\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, label, name, readonly, required, schema, value } = props;\n\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\tconst isSensitiveField = isPasswordField(schema);\n\n\t// state\n\tconst [showSensitiveField, setShowSensitiveField] = useState(false);\n\n\tconst shouldShowEmptyValue = useMemo(() => {\n\t\treturn readonly && isSensitiveField && !value && shouldShowEmptyValueForSensitiveField?.(schema, props);\n\t}, [isSensitiveField, props, readonly, schema, shouldShowEmptyValueForSensitiveField, value]);\n\n\tconst fieldValue = useMemo(() => {\n\t\tlet fieldValue = value ?? \"\";\n\n\t\tif (readonly) {\n\t\t\tif (isSensitiveField) {\n\t\t\t\tif (shouldShowEmptyValue) {\n\t\t\t\t\tfieldValue = EMPTY_VALUE;\n\t\t\t\t} else {\n\t\t\t\t\tfieldValue = showSensitiveField ? fieldValue : SENSITIVE_FIELD_VALUE;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfieldValue = fieldValue || EMPTY_VALUE;\n\t\t\t}\n\t\t} else if (schema.const) {\n\t\t\tfieldValue = schema.const;\n\t\t}\n\n\t\treturn fieldValue;\n\t}, [value, readonly, schema.const, isSensitiveField, showSensitiveField, shouldShowEmptyValue]);\n\n\tconst sensitiveFieldToggle = useMemo(() => {\n\t\tif (isSensitiveField && !shouldShowEmptyValue) {\n\t\t\treturn [\n\t\t\t\t<SolaceButton\n\t\t\t\t\tkey={showSensitiveField ? \"eyeIcon\" : \"hideEyeIcon\"}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\tonClick={() => setShowSensitiveField(!showSensitiveField)}\n\t\t\t\t\tdataQa={showSensitiveField ? \"showPasswordButton\" : \"hidePasswordButton\"}\n\t\t\t\t>\n\t\t\t\t\t{showSensitiveField ? <VisibilityShowIcon /> : <VisibilityHideIcon />}\n\t\t\t\t</SolaceButton>\n\t\t\t];\n\t\t}\n\n\t\treturn undefined;\n\t}, [isSensitiveField, showSensitiveField, shouldShowEmptyValue]);\n\n\tconst maxLength = getMaxLength(schema, fieldValue, readonly);\n\treturn (\n\t\t<Box\n\t\t\tsx={{\n\t\t\t\tdisplay: isSensitiveField ? \"grid\" : \"block\",\n\t\t\t\tgridTemplateColumns: \"1fr auto\",\n\t\t\t\talignItems: \"flex-end\",\n\t\t\t\toverflow: \"hidden\"\n\t\t\t}}\n\t\t>\n\t\t\t{maxLength && maxLength > 100 ? (\n\t\t\t\t<SolaceTextArea\n\t\t\t\t\tname={name}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\t\tvalue={fieldValue}\n\t\t\t\t\treadOnly={readonly}\n\t\t\t\t\trequired={required && !readonly}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\tmaxLength={maxLength + 1} // add one to the maxLength to display error message to user\n\t\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\t\thelperText={helperMessage}\n\t\t\t\t\tplaceholder={schema.placeholder ?? \"\"}\n\t\t\t\t\tdataQa={`${label}-form-textArea`}\n\t\t\t\t></SolaceTextArea>\n\t\t\t) : (\n\t\t\t\t<SolaceTextField\n\t\t\t\t\ttype={isSensitiveField && !showSensitiveField ? \"password\" : \"text\"}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tname={name}\n\t\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\t\tvalue={fieldValue}\n\t\t\t\t\treadOnly={readonly}\n\t\t\t\t\trequired={required && !readonly}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tendAdornment={!readonly ? sensitiveFieldToggle : undefined}\n\t\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\t\thelperText={helperMessage}\n\t\t\t\t\tplaceholder={schema.placeholder ?? \"\"}\n\t\t\t\t\tdataQa={`${label}-form-textField`}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{readonly && sensitiveFieldToggle ? <Box ml={1}>{sensitiveFieldToggle}</Box> : null}\n\t\t</Box>\n\t);\n};\n\nconst CustomSelectWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, id, label, name, options, readonly, required, schema, title, value } = props;\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\n\treturn options.enumOptions !== undefined ? (\n\t\t<Box mb={props.id.includes(\"oneof\") ? 2 : 0}>\n\t\t\t<SolaceSelect\n\t\t\t\tlabel={label}\n\t\t\t\tname={name}\n\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\tvalue={value}\n\t\t\t\treadOnly={readonly}\n\t\t\t\trequired={required && !readonly}\n\t\t\t\tdisabled={disabled}\n\t\t\t\ttitle={title}\n\t\t\t\tid={id}\n\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\thelperText={helperMessage}\n\t\t\t\tdataQa={`${id}-form-select`}\n\t\t\t>\n\t\t\t\t{options.enumOptions.map((option) => (\n\t\t\t\t\t<MenuItem value={option.value} key={option.label}>\n\t\t\t\t\t\t{option.label}\n\t\t\t\t\t</MenuItem>\n\t\t\t\t))}\n\t\t\t</SolaceSelect>\n\t\t</Box>\n\t) : (\n\t\t<></>\n\t);\n};\n\nconst CustomCheckboxWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, label, name, readonly, required, schema, value } = props;\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\n\treturn (\n\t\t<SolaceCheckBox\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tonChange={(e) => props.onChange(e.value)}\n\t\t\treadOnly={readonly}\n\t\t\trequired={required && !readonly}\n\t\t\tdisabled={disabled}\n\t\t\tchecked={value}\n\t\t\thasErrors={!!errorMessage}\n\t\t\thelperText={helperMessage}\n\t\t\tdataQa={`${label}-form-checkbox`}\n\t\t/>\n\t);\n};\n\nfunction CustomDescriptionFieldTemplate(\n\ttemplateProps: DescriptionFieldProps,\n\ttransformTemplateProps?: (props: DescriptionFieldProps) => DescriptionFieldProps\n) {\n\tconst props = transformTemplateProps ? transformTemplateProps(templateProps) : templateProps;\n\tconst { description, id } = props;\n\n\treturn description === CustomProperty.hidden ? null : <SolaceTypography id={id}>{description}</SolaceTypography>;\n}\n\nfunction CustomTitleFieldTemplate(\n\ttemplateProps: TitleFieldProps,\n\ttransformTemplateProps?: (props: TitleFieldProps) => TitleFieldProps\n) {\n\tconst props = transformTemplateProps ? transformTemplateProps(templateProps) : templateProps;\n\tconst { id, title } = props;\n\n\treturn title === CustomProperty.hidden ? null : (\n\t\t<SolaceTypography id={id} variant=\"h5\">\n\t\t\t{title}\n\t\t</SolaceTypography>\n\t);\n}\n\nexport const getTemplates = (\n\ttransformDescriptionProps?: (props: DescriptionFieldProps) => DescriptionFieldProps,\n\ttransformTitleProps?: (props: TitleFieldProps) => TitleFieldProps\n) => {\n\treturn {\n\t\tDescriptionFieldTemplate: (props: DescriptionFieldProps) =>\n\t\t\tCustomDescriptionFieldTemplate(props, transformDescriptionProps),\n\t\tTitleFieldTemplate: (props: TitleFieldProps) => CustomTitleFieldTemplate(props, transformTitleProps)\n\t};\n};\n\nexport const getWidgets = (\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps,\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean\n): RegistryWidgetsType => {\n\treturn {\n\t\tCheckboxWidget: (props: WidgetProps) => CustomCheckboxWidget(props, transformWidgetProps),\n\t\tSelectWidget: (props: WidgetProps) => CustomSelectWidget(props, transformWidgetProps),\n\t\tTextWidget: (props: WidgetProps) =>\n\t\t\tCustomTextWidget(props, transformWidgetProps, shouldShowEmptyValueForSensitiveField),\n\t\tPasswordWidget: (props: WidgetProps) =>\n\t\t\tCustomTextWidget(props, transformWidgetProps, shouldShowEmptyValueForSensitiveField)\n\t};\n};\n","/*\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\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Form } from \"@rjsf/mui\";\nimport { CustomProperty, getTemplates, getWidgets } from \"./jsonSchemaFormUtils\";\nimport { RJSFSchema, UiSchema, WidgetProps } from \"@rjsf/utils\";\nimport { customizeValidator } from \"@rjsf/validator-ajv8\";\nimport Ajv2020 from \"ajv/dist/2020\";\nimport { styled } from \"@mui/material\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { ElementType } from \"react\";\nimport Ajv from \"ajv\";\n// Custom templates removed - using RJSF v5 stable which should work properly\n\nenum FormFieldType {\n\tdescription = \"description\",\n\tproperty = \"property\",\n\tsubmitButton = \"submitButton\",\n\ttitle = \"title\"\n}\ninterface FormItem {\n\tid: string; // unique id for the form\n\tschema: unknown; // must be castable to RJSFSchema\n}\ninterface FormOptions {\n\torder?: string[];\n\tisHidden?: (fieldType: FormFieldType, propertyName?: string, data?: any) => boolean;\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean;\n\ttagName?: ElementType<any> | undefined;\n}\n\n/**\n * Custom form component to override Form styles built into rjsf\n */\nconst CustomForm = styled(Form)(({ theme }) => ({\n\t\".solaceJsonSchemaForm\": {\n\t\tmaxWidth: \"585px\",\n\t\t\".MuiTypography-root\": {\n\t\t\tpadding: theme.spacing(3, 0), // form titles\n\n\t\t\t\"&.MuiTypography-caption\": {\n\t\t\t\tdisplay: \"none\" // hide form captions\n\t\t\t}\n\t\t},\n\t\t\".MuiFormControl-root\": {\n\t\t\t\".MuiGrid-root\": {\n\t\t\t\tpadding: 0,\n\t\t\t\tmargin: `0 16px 0 0 !important` // override rjsf element margin styles\n\t\t\t},\n\t\t\t\".form-group.field\": {\n\t\t\t\tpaddingBottom: theme.spacing(2), // form fields\n\n\t\t\t\t\"&.field-error ul\": {\n\t\t\t\t\tdisplay: \"none\" // hide error list\n\t\t\t\t},\n\n\t\t\t\t\".MuiBox-root\": {\n\t\t\t\t\t\"label .MuiFormLabel-asterisk\": {\n\t\t\t\t\t\tdisplay: \"none\"\n\t\t\t\t\t},\n\t\t\t\t\t\"label[for] .MuiFormLabel-asterisk\": {\n\t\t\t\t\t\tdisplay: \"inline\" // display only first asterisk on label for input\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\".form-group.field-array\": {\n\t\t\t\t// override rjsf array styles\n\t\t\t\t\".MuiPaper-root\": {\n\t\t\t\t\tboxShadow: \"none\",\n\t\t\t\t\tborder: `1px solid ${theme.palette.ux.secondary.w20}`,\n\t\t\t\t\tpadding: 0,\n\t\t\t\t\tmargin: theme.spacing(1, 0, 0, 0)\n\t\t\t\t},\n\t\t\t\t\".MuiTypography-root\": {\n\t\t\t\t\tpadding: theme.spacing(1, 0)\n\t\t\t\t},\n\t\t\t\t\".form-group.field\": {\n\t\t\t\t\tpaddingBottom: theme.spacing(2),\n\t\t\t\t\t\"&.field-object\": {\n\t\t\t\t\t\tpaddingBottom: 0\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}));\n\n/**\n * Returns the order of the form items ensuring there is an asterisk to include all fields\n */\nconst getOrder = (order: any) => {\n\tlet uiOrder;\n\n\tif (order?.length > 0) {\n\t\tif (!order.includes(\"*\")) {\n\t\t\torder.push(\"*\");\n\t\t}\n\n\t\tuiOrder = order;\n\t}\n\n\treturn uiOrder;\n};\n\n/**\n * Recursively hides properties based on the isHidden function\n */\n// eslint-disable-next-line sonarjs/cognitive-complexity\nconst hideProperties = (isHidden: any, uiSchema: UiSchema, schema: any) => {\n\tif (!schema) {\n\t\treturn;\n\t}\n\n\tconst properties = schema.properties;\n\n\tif (properties) {\n\t\tfor (const property in properties) {\n\t\t\t// hide all errors - errors are displayed with custom widgets\n\t\t\tuiSchema[property] = { \"ui:hideError\": true };\n\t\t\tif (isHidden(FormFieldType.property, property, properties[property])) {\n\t\t\t\t// hide rjsf property widget\n\t\t\t\tuiSchema[property][\"ui:widget\"] = \"hidden\";\n\t\t\t} else if (isHidden(FormFieldType.description, property, properties[property])) {\n\t\t\t\t// hide rjsf property description via custom handling - descriptions are displayed with custom widgets\n\t\t\t\tuiSchema[property][\"ui:description\"] = CustomProperty.hidden;\n\t\t\t}\n\t\t\t// Recursively process nested properties\n\t\t\tif (properties[property] && typeof properties[property] === \"object\") {\n\t\t\t\tif (!uiSchema[property]) {\n\t\t\t\t\tuiSchema[property] = {};\n\t\t\t\t}\n\t\t\t\thideProperties(isHidden, uiSchema[property], properties[property]);\n\t\t\t}\n\t\t}\n\t} else if (typeof schema === \"object\") {\n\t\tfor (const property in schema) {\n\t\t\thideProperties(isHidden, uiSchema, schema[property]);\n\t\t}\n\t}\n};\n\nexport interface SolaceJsonSchemaFormProps extends SolaceComponentProps {\n\t/*\n\t * The form item to render with an id and schema.\n\t *\n\t * id: string; // unique id for the form\n\t * schema: unknown; // must be castable to RJSFSchema\n\t */\n\tformItem: FormItem;\n\t/**\n\t * The form data to render in the form.\n\t */\n\tformData?: Record<string, unknown>;\n\t/**\n\t * The form options to customize the form, including:\n\t *\n\t * order?: string[]; // ordered property keys for display\n\t * isHidden?: () => boolean; // function to determine if field should be hidden,\n\t * shouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean; // function to determine if empty sensitive fields should show empty value instead of sensitive field toggle in readonly mode,\n\t * tagName?: ElementType<any> | undefined; // tag name (eg. \"div\") to replace \"form\" and support embedding in other forms\n\t */\n\tformOptions?: FormOptions;\n\t/*\n\t * Whether the form is read-only.\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Whether the form is disabled.\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Can be used in trigger form validation manually\n\t * e.g. formRef.current.validateForm()\n\t */\n\tformRef?: any;\n\t/**\n\t * Whether to validate the form data live\n\t */\n\tliveValidate?: boolean;\n\t/**\n\t * Callback function when the form data changes.\n\t */\n\tonChange?: (formData: any, formErrors: any[]) => void;\n\t/**\n\t * Function to transform the description widget props.\n\t */\n\ttransformDescription?: (props: any) => any;\n\t/**\n\t * Function to transform the error message.\n\t */\n\ttransformError?: (error: { name: string; message: string }) => any;\n\t/**\n\t * Function to transform the widget props.\n\t */\n\ttransformWidget?: (props: any) => any;\n\t/**\n\t * Function to transform the title widget props.\n\t */\n\ttransformTitle?: (props: any) => any;\n\t/**\n\t * Custom Ajv to use for the form, default to Ajv2020.\n\t */\n\tajvClass?: typeof Ajv;\n}\n\nfunction SolaceJsonSchemaForm({\n\tformItem,\n\tformData = {},\n\tformOptions = {},\n\treadOnly = false,\n\tdisabled = false,\n\tformRef,\n\tliveValidate = true,\n\tonChange,\n\ttransformDescription,\n\ttransformError,\n\ttransformWidget,\n\ttransformTitle,\n\tajvClass\n}: Readonly<SolaceJsonSchemaFormProps>) {\n\tconst schema = formItem.schema as RJSFSchema;\n\tconst { order, isHidden, shouldShowEmptyValueForSensitiveField, tagName } = formOptions;\n\tconst customValidator = customizeValidator({ AjvClass: ajvClass ?? Ajv2020 });\n\n\t/**\n\t * Build the uiSchema to support:\n\t * - overriding default styles\n\t * - ordering form items\n\t * - hiding widgets/properties\n\t */\n\tconst uiSchema: UiSchema = {\n\t\t\"ui:classNames\": \"solaceJsonSchemaForm\"\n\t};\n\n\tuiSchema[\"ui:order\"] = getOrder(order);\n\n\tif (isHidden) {\n\t\tif (isHidden(FormFieldType.submitButton)) {\n\t\t\tuiSchema[\"ui:submitButtonOptions\"] = { norender: true };\n\t\t}\n\n\t\tif (isHidden(FormFieldType.title)) {\n\t\t\tuiSchema[\"ui:options\"] = { label: false };\n\t\t}\n\n\t\thideProperties(isHidden, uiSchema, schema);\n\t}\n\n\t/**\n\t * Returns the transformed widget props with the first error message set as a custom error message for display\n\t */\n\tfunction transformWidgetProps(props: any) {\n\t\tconst newProps = transformWidget?.(props) ?? { ...props };\n\t\tconst hasErrors = props.rawErrors && props.rawErrors.length > 0;\n\n\t\tif (hasErrors) {\n\t\t\tnewProps[CustomProperty.error] = Array.from(new Set(props.rawErrors)).join(\", \");\n\t\t}\n\n\t\treturn newProps;\n\t}\n\n\t/**\n\t * Returns all errors, transformed by the provided function if it exists\n\t */\n\tfunction transformErrors(errors: any[]) {\n\t\tif (!transformError) {\n\t\t\treturn errors;\n\t\t}\n\n\t\treturn errors.map((error) => {\n\t\t\treturn transformError?.(error) ?? error;\n\t\t});\n\t}\n\n\tfunction handleOnChange(data: any) {\n\t\tonChange?.(data.formData, data.errors);\n\t}\n\n\t// Using RJSF v5.24.13 stable - no custom templates needed\n\n\treturn (\n\t\t<CustomForm\n\t\t\ttagName={tagName}\n\t\t\tkey={formItem.id}\n\t\t\tidPrefix={formItem.id}\n\t\t\tschema={schema}\n\t\t\tuiSchema={uiSchema}\n\t\t\tvalidator={customValidator}\n\t\t\twidgets={getWidgets(transformWidgetProps, shouldShowEmptyValueForSensitiveField)}\n\t\t\ttemplates={getTemplates(transformDescription, transformTitle)}\n\t\t\tformData={formData}\n\t\t\tonChange={handleOnChange}\n\t\t\treadonly={readOnly}\n\t\t\tdisabled={disabled}\n\t\t\tliveValidate={liveValidate}\n\t\t\tshowErrorList={false}\n\t\t\ttransformErrors={transformErrors}\n\t\t\tdata-qa={formItem.id}\n\t\t\tref={formRef}\n\t\t/>\n\t);\n}\n\nexport default SolaceJsonSchemaForm;\n"]}
1
+ {"version":3,"sources":["../src/resources/icons/VisibilityShowIcon.tsx","../src/resources/icons/VisibilityHideIcon.tsx","../src/components/jsonschemaform/jsonSchemaFormUtils.tsx","../src/components/jsonschemaform/SolaceJsonSchemaForm.tsx"],"names":["VisibilityShowIcon","size","fill","theme","useTheme","jsxs","SvgIcon_default","jsx","VisibilityHideIcon","EMPTY_VALUE","SENSITIVE_FIELD_VALUE","onChangeTrigger","props","e","value","isEmpty","toString","isPasswordField","schema","getMaxLength","readonly","CustomTextWidget","widgetProps","transformWidgetProps","shouldShowEmptyValueForSensitiveField","disabled","label","name","required","errorMessage","helperMessage","isSensitiveField","showSensitiveField","setShowSensitiveField","useState","shouldShowEmptyValue","useMemo","fieldValue","sensitiveFieldToggle","SolaceButton_default","maxLength","Box_default","SolaceTextArea_default","SolaceTextField_default","CustomSelectWidget","id","options","title","SolaceSelect_default","option","MenuItem_default","Fragment","CustomCheckboxWidget","SolaceCheckBox_default","CustomDescriptionFieldTemplate","templateProps","transformTemplateProps","description","SolaceTypography","CustomTitleFieldTemplate","getTemplates","transformDescriptionProps","transformTitleProps","getWidgets","CustomForm","styled_default","Form","getOrder","order","uiOrder","hideProperties","isHidden","uiSchema","properties","property","SolaceJsonSchemaForm","formItem","formData","formOptions","readOnly","formRef","liveValidate","onChange","transformDescription","transformError","transformWidget","transformTitle","ajvClass","tagName","customValidator","customizeValidator","Ajv2020","newProps","transformErrors","errors","error","handleOnChange","data","SolaceJsonSchemaForm_default"],"mappings":"yfAkBO,IAAMA,CAAAA,CAAqB,CAAC,CAAE,KAAAC,CAAAA,CAAO,EAAA,CAAI,IAAA,CAAAC,CAAAA,CAAO,EAAG,CAAA,GAAmB,CAC5E,IAAMC,CAAAA,CAAQC,IAAS,CACvB,OACCC,IAAAA,CAACC,EAAAA,CAAA,CAAQ,EAAA,CAAI,CAAE,KAAA,CAAO,CAAA,EAAGL,CAAI,CA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EAAaA,CAAAA,CAAM,SAAA,CAAU,OAAS,CAAA,GAG7DgF,CAAAA,CAAAA,gBAA6B,CAAA,CAAI,KAAA,CAAM,KAAK,IAAI,GAAA,CAAIhF,EAAM,SAAS,CAAC,EAAE,IAAA,CAAK,IAAI,CAAA,CAAA,CAGzEgF,CACR,CAKA,SAASC,CAAAA,CAAgBC,CAAAA,CAAe,CACvC,OAAKV,CAAAA,CAIEU,CAAAA,CAAO,GAAA,CAAKC,CAAAA,EACXX,IAAiBW,CAAK,CAAA,EAAKA,CAClC,CAAA,CALOD,CAMT,CAEA,SAASE,CAAAA,CAAeC,CAAAA,CAAW,CAClCf,CAAAA,GAAWe,CAAAA,CAAK,QAAA,CAAUA,CAAAA,CAAK,MAAM,EACtC,CAIA,OACC1F,GAAAA,CAACyD,GAAA,CACA,OAAA,CAASwB,CAAAA,CAET,QAAA,CAAUZ,EAAS,EAAA,CACnB,MAAA,CAAQ1D,CAAAA,CACR,QAAA,CAAUsD,EACV,SAAA,CAAWiB,CAAAA,CACX,OAAA,CAAS1B,CAAAA,CAAWxC,EAAsBC,CAAqC,CAAA,CAC/E,SAAA,CAAWoC,CAAAA,CAAauB,EAAsBG,CAAc,CAAA,CAC5D,QAAA,CAAUT,CAAAA,CACV,SAAUmB,CAAAA,CACV,QAAA,CAAUjB,CAAAA,CACV,QAAA,CAAUtD,EACV,YAAA,CAAcwD,CAAAA,CACd,aAAA,CAAe,KAAA,CACf,gBAAiBY,CAAAA,CACjB,SAAA,CAASjB,CAAAA,CAAS,EAAA,CAClB,IAAKI,CAAAA,CAAAA,CAfAJ,CAAAA,CAAS,EAgBf,CAEF,KAEOsB,EAAAA,CAAQvB","file":"json-schema-form.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 { SvgIcon, useTheme } from \"@mui/material\";\n\nexport const VisibilityShowIcon = ({ size = 24, fill = \"\" }): JSX.Element => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<SvgIcon sx={{ width: `${size}px`, height: `${size}px` }} viewBox=\"0 0 24 24\">\n\t\t\t<g clipPath=\"url(#clip0_3496_34902)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill || theme.palette.ux.secondary.wMain}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_3496_34902\">\n\t\t\t\t\t<rect width={size} height={size} fill={theme.palette.ux.background.w10} />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</SvgIcon>\n\t);\n};\n","/*\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 { SvgIcon, useTheme } from \"@mui/material\";\n\nexport const VisibilityHideIcon = ({ size = 24, fill = \"\" }): JSX.Element => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<SvgIcon sx={{ width: `${size}px`, height: `${size}px` }} viewBox=\"0 0 24 24\">\n\t\t\t<g clipPath=\"url(#clip0_3496_34944)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill || theme.palette.ux.secondary.wMain}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_3496_34944\">\n\t\t\t\t\t<rect width={size} height={size} fill={theme.palette.ux.background.w10} />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</SvgIcon>\n\t);\n};\n","/*\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 { DescriptionFieldProps, RegistryWidgetsType, RJSFSchema, TitleFieldProps, WidgetProps } from \"@rjsf/utils\";\nimport { isEmpty, toString } from \"lodash\";\nimport { useMemo, useState } from \"react\";\nimport SolaceButton from \"../form/SolaceButton\";\nimport SolaceCheckBox from \"../form/SolaceCheckBox\";\nimport SolaceSelect from \"../form/SolaceSelect\";\nimport SolaceTextArea from \"../form/SolaceTextArea\";\nimport SolaceTextField from \"../form/SolaceTextField\";\nimport SolaceTypography from \"../SolaceTypography\";\nimport { VisibilityShowIcon } from \"../../resources/icons/VisibilityShowIcon\";\nimport { VisibilityHideIcon } from \"../../resources/icons/VisibilityHideIcon\";\nimport { Box, MenuItem } from \"@mui/material\";\n\nexport enum CustomProperty {\n\terror = \"x-custom-error\",\n\thidden = \"x-custom-hidden\"\n}\n\nconst EMPTY_VALUE = \"-\";\nconst SENSITIVE_FIELD_VALUE = \"**********\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst onChangeTrigger = (props: any, e: any) => {\n\tconst value = e.value;\n\n\tif (isEmpty(toString(value))) {\n\t\tprops.onChange(undefined);\n\t} else {\n\t\tprops.onChange(value);\n\t}\n};\n\nconst isPasswordField = (schema: RJSFSchema) => {\n\treturn schema.options?.format === \"password\" || schema.format === \"password\";\n};\nconst getMaxLength = (schema: RJSFSchema, value: string, readonly = false) => {\n\t// if readonly and maxLength is set, use the length of the data to reduce empty space\n\tif (readonly) {\n\t\treturn schema.maxLength ? value.length : schema.maxLength;\n\t}\n\n\treturn schema.maxLength;\n};\n\nconst CustomTextWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps,\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, label, name, readonly, required, schema, value } = props;\n\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\tconst isSensitiveField = isPasswordField(schema);\n\n\t// state\n\tconst [showSensitiveField, setShowSensitiveField] = useState(false);\n\n\tconst shouldShowEmptyValue = useMemo(() => {\n\t\treturn readonly && isSensitiveField && !value && shouldShowEmptyValueForSensitiveField?.(schema, props);\n\t}, [isSensitiveField, props, readonly, schema, shouldShowEmptyValueForSensitiveField, value]);\n\n\tconst fieldValue = useMemo(() => {\n\t\tlet fieldValue = value ?? \"\";\n\n\t\tif (readonly) {\n\t\t\tif (isSensitiveField) {\n\t\t\t\tif (shouldShowEmptyValue) {\n\t\t\t\t\tfieldValue = EMPTY_VALUE;\n\t\t\t\t} else {\n\t\t\t\t\tfieldValue = showSensitiveField ? fieldValue : SENSITIVE_FIELD_VALUE;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfieldValue = fieldValue || EMPTY_VALUE;\n\t\t\t}\n\t\t} else if (schema.const) {\n\t\t\tfieldValue = schema.const;\n\t\t}\n\n\t\treturn fieldValue;\n\t}, [value, readonly, schema.const, isSensitiveField, showSensitiveField, shouldShowEmptyValue]);\n\n\tconst sensitiveFieldToggle = useMemo(() => {\n\t\tif (isSensitiveField && !shouldShowEmptyValue) {\n\t\t\treturn [\n\t\t\t\t<SolaceButton\n\t\t\t\t\tkey={showSensitiveField ? \"eyeIcon\" : \"hideEyeIcon\"}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\tonClick={() => setShowSensitiveField(!showSensitiveField)}\n\t\t\t\t\tdataQa={showSensitiveField ? \"showPasswordButton\" : \"hidePasswordButton\"}\n\t\t\t\t>\n\t\t\t\t\t{showSensitiveField ? <VisibilityShowIcon /> : <VisibilityHideIcon />}\n\t\t\t\t</SolaceButton>\n\t\t\t];\n\t\t}\n\n\t\treturn undefined;\n\t}, [isSensitiveField, showSensitiveField, shouldShowEmptyValue]);\n\n\tconst maxLength = getMaxLength(schema, fieldValue, readonly);\n\treturn (\n\t\t<Box\n\t\t\tsx={{\n\t\t\t\tdisplay: isSensitiveField ? \"grid\" : \"block\",\n\t\t\t\tgridTemplateColumns: \"1fr auto\",\n\t\t\t\talignItems: \"flex-end\",\n\t\t\t\toverflow: \"hidden\"\n\t\t\t}}\n\t\t>\n\t\t\t{maxLength && maxLength > 100 ? (\n\t\t\t\t<SolaceTextArea\n\t\t\t\t\tname={name}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\t\tvalue={fieldValue}\n\t\t\t\t\treadOnly={readonly}\n\t\t\t\t\trequired={required && !readonly}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\tmaxLength={maxLength + 1} // add one to the maxLength to display error message to user\n\t\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\t\thelperText={helperMessage}\n\t\t\t\t\tplaceholder={schema.placeholder ?? \"\"}\n\t\t\t\t\tdataQa={`${label}-form-textArea`}\n\t\t\t\t></SolaceTextArea>\n\t\t\t) : (\n\t\t\t\t<SolaceTextField\n\t\t\t\t\ttype={isSensitiveField && !showSensitiveField ? \"password\" : \"text\"}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tname={name}\n\t\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\t\tvalue={fieldValue}\n\t\t\t\t\treadOnly={readonly}\n\t\t\t\t\trequired={required && !readonly}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tendAdornment={!readonly ? sensitiveFieldToggle : undefined}\n\t\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\t\thelperText={helperMessage}\n\t\t\t\t\tplaceholder={schema.placeholder ?? \"\"}\n\t\t\t\t\tdataQa={`${label}-form-textField`}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{readonly && sensitiveFieldToggle ? <Box ml={1}>{sensitiveFieldToggle}</Box> : null}\n\t\t</Box>\n\t);\n};\n\nconst CustomSelectWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, id, label, name, options, readonly, required, schema, title, value } = props;\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\n\treturn options.enumOptions !== undefined ? (\n\t\t<Box mb={props.id.includes(\"oneof\") ? 2 : 0}>\n\t\t\t<SolaceSelect\n\t\t\t\tlabel={label}\n\t\t\t\tname={name}\n\t\t\t\tonChange={(e) => onChangeTrigger(props, e)}\n\t\t\t\tvalue={value}\n\t\t\t\treadOnly={readonly}\n\t\t\t\trequired={required && !readonly}\n\t\t\t\tdisabled={disabled}\n\t\t\t\ttitle={title}\n\t\t\t\tid={id}\n\t\t\t\thasErrors={!!errorMessage}\n\t\t\t\thelperText={helperMessage}\n\t\t\t\tdataQa={`${id}-form-select`}\n\t\t\t>\n\t\t\t\t{options.enumOptions.map((option) => (\n\t\t\t\t\t<MenuItem value={option.value} key={option.label}>\n\t\t\t\t\t\t{option.label}\n\t\t\t\t\t</MenuItem>\n\t\t\t\t))}\n\t\t\t</SolaceSelect>\n\t\t</Box>\n\t) : (\n\t\t<></>\n\t);\n};\n\nconst CustomCheckboxWidget = function (\n\twidgetProps: WidgetProps,\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps\n) {\n\tconst props = transformWidgetProps ? transformWidgetProps(widgetProps) : widgetProps;\n\tconst { disabled, label, name, readonly, required, schema, value } = props;\n\tconst errorMessage = props[CustomProperty.error] ?? \"\";\n\tconst helperMessage = readonly ? \"\" : errorMessage || schema.description;\n\n\treturn (\n\t\t<SolaceCheckBox\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tonChange={(e) => props.onChange(e.value)}\n\t\t\treadOnly={readonly}\n\t\t\trequired={required && !readonly}\n\t\t\tdisabled={disabled}\n\t\t\tchecked={value}\n\t\t\thasErrors={!!errorMessage}\n\t\t\thelperText={helperMessage}\n\t\t\tdataQa={`${label}-form-checkbox`}\n\t\t/>\n\t);\n};\n\nfunction CustomDescriptionFieldTemplate(\n\ttemplateProps: DescriptionFieldProps,\n\ttransformTemplateProps?: (props: DescriptionFieldProps) => DescriptionFieldProps\n) {\n\tconst props = transformTemplateProps ? transformTemplateProps(templateProps) : templateProps;\n\tconst { description, id } = props;\n\n\treturn description === CustomProperty.hidden ? null : <SolaceTypography id={id}>{description}</SolaceTypography>;\n}\n\nfunction CustomTitleFieldTemplate(\n\ttemplateProps: TitleFieldProps,\n\ttransformTemplateProps?: (props: TitleFieldProps) => TitleFieldProps\n) {\n\tconst props = transformTemplateProps ? transformTemplateProps(templateProps) : templateProps;\n\tconst { id, title } = props;\n\n\treturn title === CustomProperty.hidden ? null : (\n\t\t<SolaceTypography id={id} variant=\"h5\">\n\t\t\t{title}\n\t\t</SolaceTypography>\n\t);\n}\n\nexport const getTemplates = (\n\ttransformDescriptionProps?: (props: DescriptionFieldProps) => DescriptionFieldProps,\n\ttransformTitleProps?: (props: TitleFieldProps) => TitleFieldProps\n) => {\n\treturn {\n\t\tDescriptionFieldTemplate: (props: DescriptionFieldProps) =>\n\t\t\tCustomDescriptionFieldTemplate(props, transformDescriptionProps),\n\t\tTitleFieldTemplate: (props: TitleFieldProps) => CustomTitleFieldTemplate(props, transformTitleProps)\n\t};\n};\n\nexport const getWidgets = (\n\ttransformWidgetProps?: (props: WidgetProps) => WidgetProps,\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean\n): RegistryWidgetsType => {\n\treturn {\n\t\tCheckboxWidget: (props: WidgetProps) => CustomCheckboxWidget(props, transformWidgetProps),\n\t\tSelectWidget: (props: WidgetProps) => CustomSelectWidget(props, transformWidgetProps),\n\t\tTextWidget: (props: WidgetProps) =>\n\t\t\tCustomTextWidget(props, transformWidgetProps, shouldShowEmptyValueForSensitiveField),\n\t\tPasswordWidget: (props: WidgetProps) =>\n\t\t\tCustomTextWidget(props, transformWidgetProps, shouldShowEmptyValueForSensitiveField)\n\t};\n};\n","/*\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\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Form } from \"@rjsf/mui\";\nimport { CustomProperty, getTemplates, getWidgets } from \"./jsonSchemaFormUtils\";\nimport { RJSFSchema, UiSchema, WidgetProps } from \"@rjsf/utils\";\nimport { customizeValidator } from \"@rjsf/validator-ajv8\";\nimport Ajv2020 from \"ajv/dist/2020\";\nimport { styled } from \"@mui/material\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { ElementType } from \"react\";\nimport Ajv from \"ajv\";\n// Custom templates removed - using RJSF v5 stable which should work properly\n\nenum FormFieldType {\n\tdescription = \"description\",\n\tproperty = \"property\",\n\tsubmitButton = \"submitButton\",\n\ttitle = \"title\"\n}\ninterface FormItem {\n\tid: string; // unique id for the form\n\tschema: unknown; // must be castable to RJSFSchema\n}\ninterface FormOptions {\n\torder?: string[];\n\tisHidden?: (fieldType: FormFieldType, propertyName?: string, data?: any) => boolean;\n\tshouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean;\n\ttagName?: ElementType<any> | undefined;\n}\n\n/**\n * Custom form component to override Form styles built into rjsf\n */\nconst CustomForm = styled(Form)(({ theme }) => ({\n\t\".solaceJsonSchemaForm\": {\n\t\tmaxWidth: \"585px\",\n\t\t\".MuiTypography-root\": {\n\t\t\tpadding: theme.spacing(3, 0), // form titles\n\n\t\t\t\"&.MuiTypography-caption\": {\n\t\t\t\tdisplay: \"none\" // hide form captions\n\t\t\t}\n\t\t},\n\t\t\".MuiFormControl-root\": {\n\t\t\t\".MuiGrid-root\": {\n\t\t\t\tpadding: 0,\n\t\t\t\tmargin: `0 16px 0 0 !important` // override rjsf element margin styles\n\t\t\t},\n\t\t\t\".form-group.field\": {\n\t\t\t\tpaddingBottom: theme.spacing(2), // form fields\n\n\t\t\t\t\"&.field-error ul\": {\n\t\t\t\t\tdisplay: \"none\" // hide error list\n\t\t\t\t},\n\n\t\t\t\t\".MuiBox-root\": {\n\t\t\t\t\t\"label .MuiFormLabel-asterisk\": {\n\t\t\t\t\t\tdisplay: \"none\"\n\t\t\t\t\t},\n\t\t\t\t\t\"label[for] .MuiFormLabel-asterisk\": {\n\t\t\t\t\t\tdisplay: \"inline\" // display only first asterisk on label for input\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\".form-group.field-array\": {\n\t\t\t\t// override rjsf array styles\n\t\t\t\t\".MuiPaper-root\": {\n\t\t\t\t\tboxShadow: \"none\",\n\t\t\t\t\tborder: `1px solid ${theme.palette.ux.secondary.w20}`,\n\t\t\t\t\tpadding: 0,\n\t\t\t\t\tmargin: theme.spacing(1, 0, 0, 0)\n\t\t\t\t},\n\t\t\t\t\".MuiTypography-root\": {\n\t\t\t\t\tpadding: theme.spacing(1, 0)\n\t\t\t\t},\n\t\t\t\t\".form-group.field\": {\n\t\t\t\t\tpaddingBottom: theme.spacing(2),\n\t\t\t\t\t\"&.field-object\": {\n\t\t\t\t\t\tpaddingBottom: 0\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}));\n\n/**\n * Returns the order of the form items ensuring there is an asterisk to include all fields\n */\nconst getOrder = (order: any) => {\n\tlet uiOrder;\n\n\tif (order?.length > 0) {\n\t\tif (!order.includes(\"*\")) {\n\t\t\torder.push(\"*\");\n\t\t}\n\n\t\tuiOrder = order;\n\t}\n\n\treturn uiOrder;\n};\n\n/**\n * Recursively hides properties based on the isHidden function\n */\n// eslint-disable-next-line sonarjs/cognitive-complexity\nconst hideProperties = (isHidden: any, uiSchema: UiSchema, schema: any) => {\n\tif (!schema) {\n\t\treturn;\n\t}\n\n\tconst properties = schema.properties;\n\n\tif (properties) {\n\t\tfor (const property in properties) {\n\t\t\t// hide all errors - errors are displayed with custom widgets\n\t\t\tuiSchema[property] = { \"ui:hideError\": true };\n\t\t\tif (isHidden(FormFieldType.property, property, properties[property])) {\n\t\t\t\t// hide rjsf property widget\n\t\t\t\tuiSchema[property][\"ui:widget\"] = \"hidden\";\n\t\t\t} else if (isHidden(FormFieldType.description, property, properties[property])) {\n\t\t\t\t// hide rjsf property description via custom handling - descriptions are displayed with custom widgets\n\t\t\t\tuiSchema[property][\"ui:description\"] = CustomProperty.hidden;\n\t\t\t}\n\t\t\t// Recursively process nested properties\n\t\t\tif (properties[property] && typeof properties[property] === \"object\") {\n\t\t\t\tif (!uiSchema[property]) {\n\t\t\t\t\tuiSchema[property] = {};\n\t\t\t\t}\n\t\t\t\thideProperties(isHidden, uiSchema[property], properties[property]);\n\t\t\t}\n\t\t}\n\t} else if (typeof schema === \"object\") {\n\t\tfor (const property in schema) {\n\t\t\thideProperties(isHidden, uiSchema, schema[property]);\n\t\t}\n\t}\n};\n\nexport interface SolaceJsonSchemaFormProps extends SolaceComponentProps {\n\t/*\n\t * The form item to render with an id and schema.\n\t *\n\t * id: string; // unique id for the form\n\t * schema: unknown; // must be castable to RJSFSchema\n\t */\n\tformItem: FormItem;\n\t/**\n\t * The form data to render in the form.\n\t */\n\tformData?: Record<string, unknown>;\n\t/**\n\t * The form options to customize the form, including:\n\t *\n\t * order?: string[]; // ordered property keys for display\n\t * isHidden?: () => boolean; // function to determine if field should be hidden,\n\t * shouldShowEmptyValueForSensitiveField?: (schema: RJSFSchema, props: WidgetProps) => boolean; // function to determine if empty sensitive fields should show empty value instead of sensitive field toggle in readonly mode,\n\t * tagName?: ElementType<any> | undefined; // tag name (eg. \"div\") to replace \"form\" and support embedding in other forms\n\t */\n\tformOptions?: FormOptions;\n\t/*\n\t * Whether the form is read-only.\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Whether the form is disabled.\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Can be used in trigger form validation manually\n\t * e.g. formRef.current.validateForm()\n\t */\n\tformRef?: any;\n\t/**\n\t * Whether to validate the form data live\n\t */\n\tliveValidate?: boolean;\n\t/**\n\t * Callback function when the form data changes.\n\t */\n\tonChange?: (formData: any, formErrors: any[]) => void;\n\t/**\n\t * Function to transform the description widget props.\n\t */\n\ttransformDescription?: (props: any) => any;\n\t/**\n\t * Function to transform the error message.\n\t */\n\ttransformError?: (error: { name: string; message: string }) => any;\n\t/**\n\t * Function to transform the widget props.\n\t */\n\ttransformWidget?: (props: any) => any;\n\t/**\n\t * Function to transform the title widget props.\n\t */\n\ttransformTitle?: (props: any) => any;\n\t/**\n\t * Custom Ajv to use for the form, default to Ajv2020.\n\t */\n\tajvClass?: typeof Ajv;\n}\n\nfunction SolaceJsonSchemaForm({\n\tformItem,\n\tformData = {},\n\tformOptions = {},\n\treadOnly = false,\n\tdisabled = false,\n\tformRef,\n\tliveValidate = true,\n\tonChange,\n\ttransformDescription,\n\ttransformError,\n\ttransformWidget,\n\ttransformTitle,\n\tajvClass\n}: Readonly<SolaceJsonSchemaFormProps>) {\n\tconst schema = formItem.schema as RJSFSchema;\n\tconst { order, isHidden, shouldShowEmptyValueForSensitiveField, tagName } = formOptions;\n\tconst customValidator = customizeValidator({ AjvClass: ajvClass ?? Ajv2020 });\n\n\t/**\n\t * Build the uiSchema to support:\n\t * - overriding default styles\n\t * - ordering form items\n\t * - hiding widgets/properties\n\t */\n\tconst uiSchema: UiSchema = {\n\t\t\"ui:classNames\": \"solaceJsonSchemaForm\"\n\t};\n\n\tuiSchema[\"ui:order\"] = getOrder(order);\n\n\tif (isHidden) {\n\t\tif (isHidden(FormFieldType.submitButton)) {\n\t\t\tuiSchema[\"ui:submitButtonOptions\"] = { norender: true };\n\t\t}\n\n\t\tif (isHidden(FormFieldType.title)) {\n\t\t\tuiSchema[\"ui:options\"] = { label: false };\n\t\t}\n\n\t\thideProperties(isHidden, uiSchema, schema);\n\t}\n\n\t/**\n\t * Returns the transformed widget props with the first error message set as a custom error message for display\n\t */\n\tfunction transformWidgetProps(props: any) {\n\t\tconst newProps = transformWidget?.(props) ?? { ...props };\n\t\tconst hasErrors = props.rawErrors && props.rawErrors.length > 0;\n\n\t\tif (hasErrors) {\n\t\t\tnewProps[CustomProperty.error] = Array.from(new Set(props.rawErrors)).join(\", \");\n\t\t}\n\n\t\treturn newProps;\n\t}\n\n\t/**\n\t * Returns all errors, transformed by the provided function if it exists\n\t */\n\tfunction transformErrors(errors: any[]) {\n\t\tif (!transformError) {\n\t\t\treturn errors;\n\t\t}\n\n\t\treturn errors.map((error) => {\n\t\t\treturn transformError?.(error) ?? error;\n\t\t});\n\t}\n\n\tfunction handleOnChange(data: any) {\n\t\tonChange?.(data.formData, data.errors);\n\t}\n\n\t// Using RJSF v5.24.13 stable - no custom templates needed\n\n\treturn (\n\t\t<CustomForm\n\t\t\ttagName={tagName}\n\t\t\tkey={formItem.id}\n\t\t\tidPrefix={formItem.id}\n\t\t\tschema={schema}\n\t\t\tuiSchema={uiSchema}\n\t\t\tvalidator={customValidator}\n\t\t\twidgets={getWidgets(transformWidgetProps, shouldShowEmptyValueForSensitiveField)}\n\t\t\ttemplates={getTemplates(transformDescription, transformTitle)}\n\t\t\tformData={formData}\n\t\t\tonChange={handleOnChange}\n\t\t\treadonly={readOnly}\n\t\t\tdisabled={disabled}\n\t\t\tliveValidate={liveValidate}\n\t\t\tshowErrorList={false}\n\t\t\ttransformErrors={transformErrors}\n\t\t\tdata-qa={formItem.id}\n\t\t\tref={formRef}\n\t\t/>\n\t);\n}\n\nexport default SolaceJsonSchemaForm;\n"]}
@@ -0,0 +1,44 @@
1
+ import './theme-BbmSlrwX.mjs';
2
+ import { S as SolaceComponentProps } from './SolaceComponentProps-B8ee8pk3.mjs';
3
+ import '@mui/material';
4
+
5
+ interface SolaceTextDiffProps extends SolaceComponentProps {
6
+ /**
7
+ * unique identifier
8
+ */
9
+ id: string;
10
+ /**
11
+ * Text 1 for comparison
12
+ */
13
+ text1: string;
14
+ /**
15
+ * Text 2 for comparison
16
+ */
17
+ text2: string;
18
+ /**
19
+ * Header content to display above the old text pane.
20
+ */
21
+ text1Header?: string | JSX.Element;
22
+ /**
23
+ * Header content to display above the new text pane.
24
+ */
25
+ text2Header?: string | JSX.Element;
26
+ /**
27
+ * Text to display when there is no content to compare.
28
+ * @default 'No content to compare'
29
+ */
30
+ noContentText?: string;
31
+ /**
32
+ * Text to display when there are no differences.
33
+ * @default 'No Differences'
34
+ */
35
+ noDifferencesText?: string;
36
+ /**
37
+ * Whether to hide the diff and show the noDifferencesText when there are no differences.
38
+ * @default false
39
+ */
40
+ hideWhenNoDifferences?: boolean;
41
+ }
42
+ declare function SolaceTextDiff(props: SolaceTextDiffProps): JSX.Element;
43
+
44
+ export { SolaceTextDiff, type SolaceTextDiffProps };
@@ -0,0 +1,44 @@
1
+ import './theme-BbmSlrwX.js';
2
+ import { S as SolaceComponentProps } from './SolaceComponentProps-B8ee8pk3.js';
3
+ import '@mui/material';
4
+
5
+ interface SolaceTextDiffProps extends SolaceComponentProps {
6
+ /**
7
+ * unique identifier
8
+ */
9
+ id: string;
10
+ /**
11
+ * Text 1 for comparison
12
+ */
13
+ text1: string;
14
+ /**
15
+ * Text 2 for comparison
16
+ */
17
+ text2: string;
18
+ /**
19
+ * Header content to display above the old text pane.
20
+ */
21
+ text1Header?: string | JSX.Element;
22
+ /**
23
+ * Header content to display above the new text pane.
24
+ */
25
+ text2Header?: string | JSX.Element;
26
+ /**
27
+ * Text to display when there is no content to compare.
28
+ * @default 'No content to compare'
29
+ */
30
+ noContentText?: string;
31
+ /**
32
+ * Text to display when there are no differences.
33
+ * @default 'No Differences'
34
+ */
35
+ noDifferencesText?: string;
36
+ /**
37
+ * Whether to hide the diff and show the noDifferencesText when there are no differences.
38
+ * @default false
39
+ */
40
+ hideWhenNoDifferences?: boolean;
41
+ }
42
+ declare function SolaceTextDiff(props: SolaceTextDiffProps): JSX.Element;
43
+
44
+ export { SolaceTextDiff, type SolaceTextDiffProps };
@@ -0,0 +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
3
+ //# sourceMappingURL=textDiff.js.map