solace-ui-components 18.0.1 → 18.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/charts.js +1 -1
- package/dist/charts.modern.mjs +1 -1
- package/dist/{chunk-ULYCLLUO.modern.mjs → chunk-54TEARQI.modern.mjs} +2 -2
- package/dist/{chunk-ULYCLLUO.modern.mjs.map → chunk-54TEARQI.modern.mjs.map} +1 -1
- package/dist/{chunk-2RTZL4CF.modern.mjs → chunk-HQH2WKJP.modern.mjs} +3 -3
- package/dist/{chunk-2RTZL4CF.modern.mjs.map → chunk-HQH2WKJP.modern.mjs.map} +1 -1
- package/dist/{chunk-IHSXSGCC.modern.mjs → chunk-I7OJ5H4U.modern.mjs} +2 -2
- package/dist/{chunk-IHSXSGCC.modern.mjs.map → chunk-I7OJ5H4U.modern.mjs.map} +1 -1
- package/dist/{chunk-HLXBN2OE.modern.mjs → chunk-LGBO373S.modern.mjs} +2 -2
- package/dist/{chunk-HLXBN2OE.modern.mjs.map → chunk-LGBO373S.modern.mjs.map} +1 -1
- package/dist/{chunk-AOKITPX2.js → chunk-PYADJP2I.js} +2 -2
- package/dist/{chunk-AOKITPX2.js.map → chunk-PYADJP2I.js.map} +1 -1
- package/dist/{chunk-ROSPS5NM.modern.mjs → chunk-QKQRCYG4.modern.mjs} +2 -2
- package/dist/{chunk-ROSPS5NM.modern.mjs.map → chunk-QKQRCYG4.modern.mjs.map} +1 -1
- package/dist/{chunk-TSSPQLS6.js → chunk-SKQ7JGO5.js} +3 -3
- package/dist/{chunk-TSSPQLS6.js.map → chunk-SKQ7JGO5.js.map} +1 -1
- package/dist/{chunk-7SKICMGL.js → chunk-SWGQVSXQ.js} +2 -2
- package/dist/{chunk-7SKICMGL.js.map → chunk-SWGQVSXQ.js.map} +1 -1
- package/dist/{chunk-UFDVHFXE.js → chunk-SXQRCXMP.js} +2 -2
- package/dist/{chunk-UFDVHFXE.js.map → chunk-SXQRCXMP.js.map} +1 -1
- package/dist/{chunk-4XH33OL7.js → chunk-V45EFIXB.js} +2 -2
- package/dist/{chunk-4XH33OL7.js.map → chunk-V45EFIXB.js.map} +1 -1
- package/dist/{chunk-QV564WAK.modern.mjs → chunk-VYHLNTMX.modern.mjs} +2 -2
- package/dist/{chunk-QV564WAK.modern.mjs.map → chunk-VYHLNTMX.modern.mjs.map} +1 -1
- package/dist/chunk-YQTPPT5K.js +2 -0
- package/dist/{chunk-GDZZVHFP.js.map → chunk-YQTPPT5K.js.map} +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/code-editor.modern.mjs +1 -1
- package/dist/datepicker.js +1 -1
- package/dist/datepicker.modern.mjs +1 -1
- package/dist/drag-drop.js +1 -1
- package/dist/drag-drop.modern.mjs +1 -1
- package/dist/index.js +58 -58
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +55 -55
- package/dist/index.modern.mjs.map +1 -1
- package/dist/json-schema-form.js +1 -1
- package/dist/json-schema-form.modern.mjs +1 -1
- package/dist/textDiff.js +2 -2
- package/dist/textDiff.modern.mjs +1 -1
- package/package.json +7 -5
- package/dist/chunk-GDZZVHFP.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {c,g,e,b}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {c,g,e,b}from'./chunk-54TEARQI.modern.mjs';import {a}from'./chunk-QKQRCYG4.modern.mjs';import {wa,le,D,Ic,ua,Gb,Ie,_h}from'./chunk-I7OJ5H4U.modern.mjs';import {jsx,jsxs}from'react/jsx-runtime';function ie({id:e,htmlForId:n,required:i=false,disabled:t=false,readOnly:l=false,noWrap:s=false,children:p}){return jsx(le,{id:e,htmlFor:n,required:i,disabled:t,sx:{display:"block",whiteSpace:s?"nowrap":"normal"},className:D({"read-only":l}),children:p})}var k=ie;var q={maxLength:255,menuItemHeight:38,menuItemHeightMultiline:58,GridListItemHeight:53,DEFAULT_NUM_OF_MENUITEM_DISPLAYED:9,closeButtonAriaLabel:"Close",actionMenuAriaLabel:"More Actions",clearButtonAriaLabel:"Clear"};var ae=wa("div",{shouldForwardProp:e=>e!=="inlineLabel"})(({theme:e,inlineLabel:n})=>({display:"flex",flexDirection:"column",flexGrow:1,maxWidth:"100%",paddingLeft:n?"36px":"0px","&.hasWarnings":{"fieldset.MuiOutlinedInput-notchedOutline, fieldset.MuiInputBase-inputMultiline":{borderColor:`${e.palette.ux.warning.w100}`}}}));function de({id:e$1,label:n,stackLabel:i,large:t,bold:l,required:s,disabled:p,readOnly:f,inlineLabel:u,centerInlineLabel:c$1,helperText:b,errorText:r,warningText:m,children:g$1,sx:h}){return jsxs(Ic,{display:"flex",flexDirection:u?"row":"column",justifyContent:"space-between",alignItems:c$1?"flex-start":"",sx:h,children:[i&&n&&jsx("div",{style:{marginTop:c$1?"5.5px":""},children:jsx(a,{id:`${e$1}-label`,htmlForId:`${e$1}`,required:s,disabled:p,large:t,bold:l,readOnly:f,children:n})}),!i&&n&&jsx("div",{style:{marginTop:c$1?"5.5px":""},children:jsx(k,{id:`${e$1}-label`,htmlForId:`${e$1}`,required:s,disabled:p,readOnly:f,noWrap:u,children:n})}),jsxs(ae,{inlineLabel:u,className:m?"hasWarnings":"",children:[g$1,b&&!r&&!m&&jsx(c,{children:b}),m&&!r&&jsx(g,{children:m}),r&&jsx(e,{children:r})]})]})}var N=de;function se({id:e,name:n,label:i,value:t,helperText:l,placeholder:s,maxLength:p=q.maxLength,type:f="text",size:u=50,title:c,autoFocus:b$1=false,hasErrors:r=false,hasWarnings:m=false,required:g=false,inlineLabel:h=false,customIcon:o,disabled:F=false,readOnly:x=false,onChange:T,onBlur:O,onKeyDown:K,onKeyUp:U,onFocus:_,dataQa:E,dataTags:z,fullWidth:G=false,width:Y,endAdornment:I,minWidth:V,inputRef:Z}){let Q=ua(),P=o&&o.position==="end"?jsx(Gb,{onClick:o.handleClick,children:o.icon}):null,j=P||I?{endAdornment:jsxs(Ie,{position:"end",children:[I,P]})}:{},ee=o&&o.position==="start"?{startAdornment:jsx(Ie,{position:o.position,children:jsx(Gb,{onClick:o.handleClick,children:o.icon})})}:{},ne={sx:{height:Q.spacing(4)},disabled:F,required:g},te=L=>{T&&T({name:n,value:L.target.value});},S=()=>e||n,oe=wa("div")(({theme:L})=>({...L.mixins.formComponent_ReadOnlyToolTipContainer.container})),le=()=>x?jsx(oe,{children:jsx(b,{variant:"overflow",title:typeof t<"u"&&t!==null?t+"":"",dataQa:E,children:typeof t<"u"&&t!==null?t+"":""})}):jsx(_h,{id:`${S()}`,name:n,inputProps:{maxLength:p,size:u,"data-qa":E,"data-tags":z,"data-testid":E,"data-lpignore":true,readOnly:x,"aria-describedby":l?`${S()}-textfield-helper-text`:"","aria-labelledby":i?`${S()}-label`:"","aria-readonly":x,role:"textbox",title:c,min:0},inputRef:Z,type:f,error:r,autoComplete:`dummy-field-${n}`,autoFocus:b$1,InputProps:{...ne,...j,...ee},margin:"dense",placeholder:s,value:t,onChange:te,onBlur:O,onKeyDown:K,onKeyUp:U,onFocus:_,fullWidth:G,sx:{minWidth:V}});return jsx(N,{id:S(),label:i,helperText:l,errorText:r?l:void 0,warningText:m?l:void 0,disabled:F,readOnly:x,required:g,inlineLabel:h,centerInlineLabel:h,sx:{width:Y},children:le()})}var Me=se;export{k as a,N as b,q as c,Me as d};//# sourceMappingURL=chunk-VYHLNTMX.modern.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-VYHLNTMX.modern.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/SolaceLabel.tsx","../src/constants.ts","../src/components/form/FormChildBase.tsx","../src/components/form/SolaceTextField.tsx"],"names":["SolaceLabel","id","htmlForId","required","disabled","readOnly","noWrap","children","jsx","FormLabel_default","clsx_default","SolaceLabel_default","constants","ChildrenContainer","styled_default","prop","theme","inlineLabel","FormChildBase","label","stackLabel","large","bold","centerInlineLabel","helperText","errorText","warningText","sx","jsxs","Box_default","SolaceStackLabel_default","HelperText_default","WarningText_default","ErrorText_default","FormChildBase_default","SolaceTextField","name","value","placeholder","maxLength","type","size","title","autoFocus","hasErrors","hasWarnings","customIcon","onChange","onBlur","onKeyDown","onKeyUp","onFocus","dataQa","dataTags","fullWidth","width","endAdornment","minWidth","inputRef","useTheme","endIconProps","IconButton_default","inputEndAdornment","InputAdornment_default","inputStartAdornment","defaultInputProps","handleChange","event","getId","TooltipContainer","textField","SolaceToolTip_default","TextField_default","SolaceTextField_default"],"mappings":"wMAkDA,SAASA,EAAAA,CAAY,CACpB,GAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,EAAW,KAAA,CACX,QAAA,CAAAC,EAAW,KAAA,CACX,QAAA,CAAAC,EAAW,KAAA,CACX,MAAA,CAAAC,CAAAA,CAAS,KAAA,CACT,SAAAC,CACD,CAAA,CAAkC,CACjC,OACCC,IAACC,EAAAA,CAAA,CACA,EAAA,CAAIR,CAAAA,CACJ,QAASC,CAAAA,CACT,QAAA,CAAUC,EACV,QAAA,CAAUC,CAAAA,CACV,GAAI,CACH,OAAA,CAAS,OAAA,CACT,UAAA,CAAYE,EAAS,QAAA,CAAW,QACjC,CAAA,CACA,SAAA,CAAWI,EAAK,CAAE,WAAA,CAAaL,CAAS,CAAC,EAExC,QAAA,CAAAE,CAAAA,CACF,CAEF,CAEA,IAAOI,EAAQX,GC5DR,IAAMY,CAAAA,CAAY,CACxB,UAAW,GAAA,CACX,cAAA,CAAgB,EAAA,CAChB,uBAAA,CAAyB,GACzB,kBAAA,CAAoB,EAAA,CACpB,iCAAA,CAAmC,CAAA,CACnC,qBAAsB,OAAA,CACtB,mBAAA,CAAqB,eACrB,oBAAA,CAAsB,OACvB,ECIA,IAAMC,EAAAA,CAAoBC,EAAAA,CAAO,KAAA,CAAO,CACvC,iBAAA,CAAoBC,CAAAA,EAASA,CAAAA,GAAS,aACvC,CAAC,CAAA,CAA0B,CAAC,CAAE,KAAA,CAAAC,CAAAA,CAAO,YAAAC,CAA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mBjD,CAAAA,CAAQ,CAAA,EAAGiD,CAAAA,EAAO,SAAW,EAAA,CAChD,eAAA,CAAiB/D,CAAAA,CACjB,IAAA,CAAM,UACN,KAAA,CAAOqC,CAAAA,CACP,IAAK,CACN,CAAA,CACA,SAAUgB,CAAAA,CACV,IAAA,CAAMlB,CAAAA,CACN,KAAA,CAAOI,EACP,YAAA,CAAc,CAAA,YAAA,EAAeR,CAAI,CAAA,CAAA,CACjC,UAAWO,GAAAA,CACX,UAAA,CAAY,CAAE,GAAGsB,GAAmB,GAAGH,CAAAA,CAAmB,GAAGE,EAAoB,CAAA,CACjF,OAAO,OAAA,CACP,WAAA,CAAa1B,CAAAA,CACb,KAAA,CAAOD,EACP,QAAA,CAAU6B,EAAAA,CACV,MAAA,CAAQlB,CAAAA,CACR,UAAWC,CAAAA,CACX,OAAA,CAASC,CAAAA,CACT,OAAA,CAASC,EACT,SAAA,CAAWG,CAAAA,CACX,GAAI,CAAE,QAAA,CAAUG,CAAS,CAAA,CAC1B,CAAA,CAKH,OACCjD,GAAAA,CAAC0B,EAAA,CACA,EAAA,CAAIkC,CAAAA,EAAM,CACV,MAAOjD,CAAAA,CACP,UAAA,CAAYK,CAAAA,CACZ,SAAA,CAAWoB,EAAYpB,CAAAA,CAAa,MAAA,CACpC,YAAaqB,CAAAA,CAAcrB,CAAAA,CAAa,OACxC,QAAA,CAAUpB,CAAAA,CACV,QAAA,CAAUC,CAAAA,CACV,SAAUF,CAAAA,CACV,WAAA,CAAac,CAAAA,CACb,iBAAA,CAAmBA,EACnB,EAAA,CAAI,CAAE,KAAA,CAAAsC,CAAM,EAEX,QAAA,CAAAe,EAAAA,GACF,CAEF,KAEOG,EAAAA,CAAQtC","file":"chunk-QV564WAK.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 { FormLabel } from \"@mui/material\";\nimport clsx from \"clsx\";\n\nexport interface SolaceLabelProps {\n\t/**\n\t * Unique identifier of the label\n\t */\n\tid: string;\n\t/**\n\t * identifier used for specifying which form element this label is bound to\n\t */\n\thtmlForId?: string;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired?: boolean;\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Boolean flag for readOnly labels, changes font color to 55% black\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Boolean flag to suppress line breaks (text wrapping) within the label\n\t */\n\tnoWrap?: boolean;\n\t/**\n\t *\n\t */\n\tchildren?: React.ReactNode;\n}\n\nfunction SolaceLabel({\n\tid,\n\thtmlForId,\n\trequired = false,\n\tdisabled = false,\n\treadOnly = false,\n\tnoWrap = false,\n\tchildren\n}: SolaceLabelProps): JSX.Element {\n\treturn (\n\t\t<FormLabel\n\t\t\tid={id}\n\t\t\thtmlFor={htmlForId}\n\t\t\trequired={required}\n\t\t\tdisabled={disabled}\n\t\t\tsx={{\n\t\t\t\tdisplay: \"block\",\n\t\t\t\twhiteSpace: noWrap ? \"nowrap\" : \"normal\"\n\t\t\t}}\n\t\t\tclassName={clsx({ \"read-only\": readOnly })}\n\t\t>\n\t\t\t{children}\n\t\t</FormLabel>\n\t);\n}\n\nexport default SolaceLabel;\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\nexport const constants = {\n\tmaxLength: 255,\n\tmenuItemHeight: 38,\n\tmenuItemHeightMultiline: 58,\n\tGridListItemHeight: 53,\n\tDEFAULT_NUM_OF_MENUITEM_DISPLAYED: 9,\n\tcloseButtonAriaLabel: \"Close\",\n\tactionMenuAriaLabel: \"More Actions\",\n\tclearButtonAriaLabel: \"Clear\"\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 { Box, styled } from \"@mui/material\";\nimport SolaceLabel from \"./SolaceLabel\";\nimport SolaceStackLabel from \"./SolaceStackLabel\";\nimport HelperText from \"./HelperText\";\nimport ErrorText from \"./ErrorText\";\nimport WarningText from \"./WarningText\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { SX } from \"../../types/sx\";\n\ninterface ChildrenContainerProps {\n\tinlineLabel: boolean;\n}\n\nconst ChildrenContainer = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"inlineLabel\"\n})<ChildrenContainerProps>(({ theme, inlineLabel }) => ({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tflexGrow: 1,\n\tmaxWidth: \"100%\",\n\tpaddingLeft: inlineLabel ? \"36px\" : \"0px\",\n\t\"&.hasWarnings\": {\n\t\t\"fieldset.MuiOutlinedInput-notchedOutline, fieldset.MuiInputBase-inputMultiline\": {\n\t\t\tborderColor: `${theme.palette.ux.warning.w100}`\n\t\t}\n\t}\n}));\n\nexport interface FormChildBaseProps extends SolaceComponentProps {\n\t/**\n\t * Unique identifier ... if `id` is not specified, `name` value will be used in order to make `label` and `helperText` accessible for screen readers\n\t */\n\tid: string;\n\t/**\n\t * the label content to display on the screen\n\t */\n\tlabel?: string | JSX.Element;\n\t/**\n\t * Boolean flag to allow labels to be rendered as SolaceStackLabel component, which provides more props, such as large, bold\n\t */\n\tstackLabel?: boolean;\n\t/**\n\t * Boolean flag to allow StackSolaceLabel component to be rendered with larger font size of 16px (default to 14px)\n\t */\n\tlarge?: boolean;\n\t/**\n\t * Boolean flag to allow StackSolaceLabel component to be rendered with font weight of medium (default to regular)\n\t */\n\tbold?: boolean;\n\t/**\n\t * The value of the `input` element, required for controlled component\n\t */\n\tvalue?: string;\n\t/**\n\t * Content to display as supportive/explanatory text\n\t */\n\thelperText?: string | JSX.Element;\n\t/**\n\t * HelperText when the `input` in error state\n\t */\n\terrorText?: string | JSX.Element;\n\t/**\n\t * HelperText when the `input` in warning state\n\t */\n\twarningText?: string | JSX.Element;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired: boolean;\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled: boolean;\n\t/**\n\t * Boolean flag to set the `input` in a read-only state\n\t */\n\treadOnly: boolean;\n\t/**\n\t * Display the label horizontally\n\t */\n\tinlineLabel: boolean;\n\t/**\n\t * Center align the inline label, this will e used only for single line field label\n\t */\n\tcenterInlineLabel?: boolean;\n\n\tchildren: JSX.Element;\n\t/**\n\t * The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.\n\t */\n\tsx?: SX;\n}\n\nfunction FormChildBase({\n\tid,\n\tlabel,\n\tstackLabel,\n\tlarge,\n\tbold,\n\trequired,\n\tdisabled,\n\treadOnly,\n\tinlineLabel,\n\tcenterInlineLabel,\n\thelperText,\n\terrorText,\n\twarningText,\n\tchildren,\n\tsx\n}: FormChildBaseProps): JSX.Element {\n\treturn (\n\t\t<Box\n\t\t\tdisplay=\"flex\"\n\t\t\tflexDirection={inlineLabel ? \"row\" : \"column\"}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\talignItems={centerInlineLabel ? \"flex-start\" : \"\"}\n\t\t\tsx={sx}\n\t\t>\n\t\t\t{stackLabel && label && (\n\t\t\t\t<div style={{ marginTop: centerInlineLabel ? \"5.5px\" : \"\" }}>\n\t\t\t\t\t<SolaceStackLabel\n\t\t\t\t\t\tid={`${id}-label`}\n\t\t\t\t\t\thtmlForId={`${id}`}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tlarge={large}\n\t\t\t\t\t\tbold={bold}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</SolaceStackLabel>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{!stackLabel && label && (\n\t\t\t\t<div style={{ marginTop: centerInlineLabel ? \"5.5px\" : \"\" }}>\n\t\t\t\t\t<SolaceLabel\n\t\t\t\t\t\tid={`${id}-label`}\n\t\t\t\t\t\thtmlForId={`${id}`}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\tnoWrap={inlineLabel}\n\t\t\t\t\t>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</SolaceLabel>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<ChildrenContainer inlineLabel={inlineLabel} className={warningText ? \"hasWarnings\" : \"\"}>\n\t\t\t\t{children}\n\t\t\t\t{helperText && !errorText && !warningText && <HelperText>{helperText}</HelperText>}\n\t\t\t\t{warningText && !errorText && <WarningText>{warningText}</WarningText>}\n\t\t\t\t{errorText && <ErrorText>{errorText}</ErrorText>}\n\t\t\t</ChildrenContainer>\n\t\t</Box>\n\t);\n}\n\nexport default FormChildBase;\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 { InputAdornment, IconButton, TextField, useTheme } from \"@mui/material\";\nimport React from \"react\";\nimport { constants } from \"../../constants\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport FormChildBase from \"./FormChildBase\";\nimport SolaceTooltip from \"../SolaceToolTip\";\nimport { styled } from \"@mui/material\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\nexport interface SolaceTextFieldChangeEvent {\n\tname: string;\n\tvalue: string;\n}\n\nexport interface SolaceTextFieldProps extends SolaceComponentProps {\n\t/**\n\t * Unique identifier ... if `id` is not specified, `name` value will be used in order to make `label` and `helperText` accessible for screen readers\n\t */\n\tid?: string;\n\t/**\n\t * Name attribute to assign to the `input` element\n\t */\n\tname: string;\n\t/**\n\t * the label content to display on the screen\n\t */\n\tlabel?: string | JSX.Element;\n\t/**\n\t * The value of the `input` element, required for controlled component\n\t */\n\tvalue?: string | number;\n\t/**\n\t * Content to display as supportive/explanitory text\n\t */\n\thelperText?: string | JSX.Element;\n\t/**\n\t * Short hint displayed in the `input` before user enters a value\n\t */\n\tplaceholder?: string;\n\t/**\n\t * The maximum number of characters which can be typed as the `input` value\n\t */\n\tmaxLength?: number;\n\t/**\n\t * The type of `input` element to render\n\t */\n\ttype?: \"text\" | \"number\" | \"password\" | \"email\" | \"url\";\n\t/**\n\t * The size/width of the `input` measured in characters\n\t */\n\tsize?: number;\n\t/**\n\t * The text to display as the tooltip hint\n\t */\n\ttitle?: string;\n\t/**\n\t * Boolean flag to control whether the `input` element is focused during first mount\n\t */\n\tautoFocus?: boolean;\n\t/**\n\t * Boolean flag to mark the `input` in error state\n\t */\n\thasErrors?: boolean;\n\t/**\n\t * Boolean flag to mark the `input` in warn state\n\t */\n\thasWarnings?: boolean;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired?: boolean;\n\t/**\n\t * Boolean flag to control whether to stack the label on top of the `input` element (false) or place them inline to one another (true)\n\t */\n\tinlineLabel?: boolean;\n\t/**\n\t * Allows custom icon to be set at the beginning/end of the field.\n\t */\n\tcustomIcon?: {\n\t\ticon: React.ReactNode;\n\t\tposition: \"end\" | \"start\";\n\t\thandleClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n\t};\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Boolean flag to set the `input` in a read-only state\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Callback function to trigger whenever the value of the `input` is changed\n\t */\n\tonChange?: (event: SolaceTextFieldChangeEvent) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` loses focus\n\t */\n\tonBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` receives key down event\n\t */\n\tonKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` receives key up event\n\t */\n\tonKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` is focused\n\t */\n\tonFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\t/**\n\t * Custom Width of the component.\n\t */\n\twidth?: string;\n\t/**\n\t * If true, the input will take up the full width of its container.\n\t */\n\tfullWidth?: boolean;\n\t/**\n\t * optional prop to pass an array of icon or button at the end of textfield\n\t */\n\tendAdornment?: (React.ReactNode | JSX.Element)[];\n\t/**\n\t * minimum width of the component\n\t */\n\tminWidth?: string;\n\t/**\n\t * pass a ref to the input element.\n\t */\n\tinputRef?: (input: HTMLInputElement) => void;\n}\n\nfunction SolaceTextField({\n\tid,\n\tname,\n\tlabel,\n\tvalue,\n\thelperText,\n\tplaceholder,\n\tmaxLength = constants.maxLength,\n\ttype = \"text\",\n\tsize = 50,\n\ttitle,\n\tautoFocus = false,\n\thasErrors = false,\n\thasWarnings = false,\n\trequired = false,\n\tinlineLabel = false,\n\tcustomIcon,\n\tdisabled = false,\n\treadOnly = false,\n\tonChange,\n\tonBlur,\n\tonKeyDown,\n\tonKeyUp,\n\tonFocus,\n\tdataQa,\n\tdataTags,\n\tfullWidth = false,\n\twidth,\n\tendAdornment,\n\tminWidth,\n\tinputRef\n}: SolaceTextFieldProps): JSX.Element {\n\tconst theme = useTheme();\n\n\tconst endIconProps =\n\t\tcustomIcon && customIcon.position === \"end\" ? (\n\t\t\t<IconButton onClick={customIcon.handleClick}>{customIcon.icon}</IconButton>\n\t\t) : null;\n\n\tconst inputEndAdornment =\n\t\tendIconProps || endAdornment\n\t\t\t? {\n\t\t\t\t\tendAdornment: (\n\t\t\t\t\t\t<InputAdornment position=\"end\">\n\t\t\t\t\t\t\t{endAdornment}\n\t\t\t\t\t\t\t{endIconProps}\n\t\t\t\t\t\t</InputAdornment>\n\t\t\t\t\t)\n\t\t\t }\n\t\t\t: {};\n\tconst inputStartAdornment =\n\t\tcustomIcon && customIcon.position === \"start\"\n\t\t\t? {\n\t\t\t\t\tstartAdornment: (\n\t\t\t\t\t\t<InputAdornment position={customIcon.position}>\n\t\t\t\t\t\t\t<IconButton onClick={customIcon.handleClick}>{customIcon.icon}</IconButton>\n\t\t\t\t\t\t</InputAdornment>\n\t\t\t\t\t)\n\t\t\t }\n\t\t\t: {};\n\n\tconst defaultInputProps = {\n\t\tsx: { height: theme.spacing(4) },\n\t\tdisabled: disabled,\n\t\trequired: required\n\t};\n\n\tconst handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n\t\tif (onChange) {\n\t\t\tonChange({\n\t\t\t\tname: name,\n\t\t\t\tvalue: event.target.value\n\t\t\t});\n\t\t}\n\t};\n\n\tconst getId = () => {\n\t\treturn id ? id : name;\n\t};\n\n\tconst TooltipContainer = styled(\"div\")(({ theme }) => ({\n\t\t...(theme.mixins.formComponent_ReadOnlyToolTipContainer.container as CSSProperties)\n\t}));\n\n\tconst textField = () => {\n\t\t/* read-only behaviour */\n\t\tif (readOnly) {\n\t\t\treturn (\n\t\t\t\t<TooltipContainer>\n\t\t\t\t\t<SolaceTooltip\n\t\t\t\t\t\tvariant=\"overflow\"\n\t\t\t\t\t\ttitle={typeof value !== \"undefined\" && value !== null ? value + \"\" : \"\"}\n\t\t\t\t\t\tdataQa={dataQa}\n\t\t\t\t\t>\n\t\t\t\t\t\t{typeof value !== \"undefined\" && value !== null ? value + \"\" : \"\"}\n\t\t\t\t\t</SolaceTooltip>\n\t\t\t\t</TooltipContainer>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<TextField\n\t\t\t\t\tid={`${getId()}`}\n\t\t\t\t\tname={name}\n\t\t\t\t\tinputProps={{\n\t\t\t\t\t\tmaxLength: maxLength,\n\t\t\t\t\t\tsize: size,\n\t\t\t\t\t\t\"data-qa\": dataQa,\n\t\t\t\t\t\t\"data-tags\": dataTags,\n\t\t\t\t\t\t\"data-testid\": dataQa,\n\t\t\t\t\t\t\"data-lpignore\": true,\n\t\t\t\t\t\treadOnly: readOnly,\n\t\t\t\t\t\t\"aria-describedby\": helperText ? `${getId()}-textfield-helper-text` : \"\",\n\t\t\t\t\t\t\"aria-labelledby\": label ? `${getId()}-label` : \"\",\n\t\t\t\t\t\t\"aria-readonly\": readOnly,\n\t\t\t\t\t\trole: \"textbox\",\n\t\t\t\t\t\ttitle: title,\n\t\t\t\t\t\tmin: 0\n\t\t\t\t\t}}\n\t\t\t\t\tinputRef={inputRef}\n\t\t\t\t\ttype={type}\n\t\t\t\t\terror={hasErrors}\n\t\t\t\t\tautoComplete={`dummy-field-${name}`}\n\t\t\t\t\tautoFocus={autoFocus}\n\t\t\t\t\tInputProps={{ ...defaultInputProps, ...inputEndAdornment, ...inputStartAdornment }}\n\t\t\t\t\tmargin=\"dense\"\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tfullWidth={fullWidth}\n\t\t\t\t\tsx={{ minWidth: minWidth }}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t};\n\n\treturn (\n\t\t<FormChildBase\n\t\t\tid={getId()}\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terrorText={hasErrors ? helperText : undefined}\n\t\t\twarningText={hasWarnings ? helperText : undefined}\n\t\t\tdisabled={disabled}\n\t\t\treadOnly={readOnly}\n\t\t\trequired={required}\n\t\t\tinlineLabel={inlineLabel}\n\t\t\tcenterInlineLabel={inlineLabel}\n\t\t\tsx={{ width }}\n\t\t>\n\t\t\t{textField()}\n\t\t</FormChildBase>\n\t);\n}\n\nexport default SolaceTextField;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/form/SolaceLabel.tsx","../src/constants.ts","../src/components/form/FormChildBase.tsx","../src/components/form/SolaceTextField.tsx"],"names":["SolaceLabel","id","htmlForId","required","disabled","readOnly","noWrap","children","jsx","FormLabel_default","clsx_default","SolaceLabel_default","constants","ChildrenContainer","styled_default","prop","theme","inlineLabel","FormChildBase","label","stackLabel","large","bold","centerInlineLabel","helperText","errorText","warningText","sx","jsxs","Box_default","SolaceStackLabel_default","HelperText_default","WarningText_default","ErrorText_default","FormChildBase_default","SolaceTextField","name","value","placeholder","maxLength","type","size","title","autoFocus","hasErrors","hasWarnings","customIcon","onChange","onBlur","onKeyDown","onKeyUp","onFocus","dataQa","dataTags","fullWidth","width","endAdornment","minWidth","inputRef","useTheme","endIconProps","IconButton_default","inputEndAdornment","InputAdornment_default","inputStartAdornment","defaultInputProps","handleChange","event","getId","TooltipContainer","textField","SolaceToolTip_default","TextField_default","SolaceTextField_default"],"mappings":"wMAkDA,SAASA,EAAAA,CAAY,CACpB,GAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,EAAW,KAAA,CACX,QAAA,CAAAC,EAAW,KAAA,CACX,QAAA,CAAAC,EAAW,KAAA,CACX,MAAA,CAAAC,CAAAA,CAAS,KAAA,CACT,SAAAC,CACD,CAAA,CAAkC,CACjC,OACCC,IAACC,EAAAA,CAAA,CACA,EAAA,CAAIR,CAAAA,CACJ,QAASC,CAAAA,CACT,QAAA,CAAUC,EACV,QAAA,CAAUC,CAAAA,CACV,GAAI,CACH,OAAA,CAAS,OAAA,CACT,UAAA,CAAYE,EAAS,QAAA,CAAW,QACjC,CAAA,CACA,SAAA,CAAWI,EAAK,CAAE,WAAA,CAAaL,CAAS,CAAC,EAExC,QAAA,CAAAE,CAAAA,CACF,CAEF,CAEA,IAAOI,EAAQX,GC5DR,IAAMY,CAAAA,CAAY,CACxB,UAAW,GAAA,CACX,cAAA,CAAgB,EAAA,CAChB,uBAAA,CAAyB,GACzB,kBAAA,CAAoB,EAAA,CACpB,iCAAA,CAAmC,CAAA,CACnC,qBAAsB,OAAA,CACtB,mBAAA,CAAqB,eACrB,oBAAA,CAAsB,OACvB,ECIA,IAAMC,EAAAA,CAAoBC,EAAAA,CAAO,KAAA,CAAO,CACvC,iBAAA,CAAoBC,CAAAA,EAASA,CAAAA,GAAS,aACvC,CAAC,CAAA,CAA0B,CAAC,CAAE,KAAA,CAAAC,CAAAA,CAAO,YAAAC,CAAY,CAAA,IAAO,CACvD,OAAA,CAAS,OACT,aAAA,CAAe,QAAA,CACf,QAAA,CAAU,CAAA,CACV,SAAU,MAAA,CACV,WAAA,CAAaA,CAAAA,CAAc,MAAA,CAAS,MACpC,eAAA,CAAiB,CAChB,iFAAkF,CACjF,WAAA,CAAa,GAAGD,CAAAA,CAAM,OAAA,CA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,EACP,YAAA,CAAc,CAAA,YAAA,EAAeR,CAAI,CAAA,CAAA,CACjC,UAAWO,GAAAA,CACX,UAAA,CAAY,CAAE,GAAGsB,GAAmB,GAAGH,CAAAA,CAAmB,GAAGE,EAAoB,CAAA,CACjF,OAAO,OAAA,CACP,WAAA,CAAa1B,CAAAA,CACb,KAAA,CAAOD,EACP,QAAA,CAAU6B,EAAAA,CACV,MAAA,CAAQlB,CAAAA,CACR,UAAWC,CAAAA,CACX,OAAA,CAASC,CAAAA,CACT,OAAA,CAASC,EACT,SAAA,CAAWG,CAAAA,CACX,GAAI,CAAE,QAAA,CAAUG,CAAS,CAAA,CAC1B,CAAA,CAKH,OACCjD,GAAAA,CAAC0B,EAAA,CACA,EAAA,CAAIkC,CAAAA,EAAM,CACV,MAAOjD,CAAAA,CACP,UAAA,CAAYK,CAAAA,CACZ,SAAA,CAAWoB,EAAYpB,CAAAA,CAAa,MAAA,CACpC,YAAaqB,CAAAA,CAAcrB,CAAAA,CAAa,OACxC,QAAA,CAAUpB,CAAAA,CACV,QAAA,CAAUC,CAAAA,CACV,SAAUF,CAAAA,CACV,WAAA,CAAac,CAAAA,CACb,iBAAA,CAAmBA,EACnB,EAAA,CAAI,CAAE,KAAA,CAAAsC,CAAM,EAEX,QAAA,CAAAe,EAAAA,GACF,CAEF,KAEOG,EAAAA,CAAQtC","file":"chunk-VYHLNTMX.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 { FormLabel } from \"@mui/material\";\nimport clsx from \"clsx\";\n\nexport interface SolaceLabelProps {\n\t/**\n\t * Unique identifier of the label\n\t */\n\tid: string;\n\t/**\n\t * identifier used for specifying which form element this label is bound to\n\t */\n\thtmlForId?: string;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired?: boolean;\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Boolean flag for readOnly labels, changes font color to 55% black\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Boolean flag to suppress line breaks (text wrapping) within the label\n\t */\n\tnoWrap?: boolean;\n\t/**\n\t *\n\t */\n\tchildren?: React.ReactNode;\n}\n\nfunction SolaceLabel({\n\tid,\n\thtmlForId,\n\trequired = false,\n\tdisabled = false,\n\treadOnly = false,\n\tnoWrap = false,\n\tchildren\n}: SolaceLabelProps): JSX.Element {\n\treturn (\n\t\t<FormLabel\n\t\t\tid={id}\n\t\t\thtmlFor={htmlForId}\n\t\t\trequired={required}\n\t\t\tdisabled={disabled}\n\t\t\tsx={{\n\t\t\t\tdisplay: \"block\",\n\t\t\t\twhiteSpace: noWrap ? \"nowrap\" : \"normal\"\n\t\t\t}}\n\t\t\tclassName={clsx({ \"read-only\": readOnly })}\n\t\t>\n\t\t\t{children}\n\t\t</FormLabel>\n\t);\n}\n\nexport default SolaceLabel;\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\nexport const constants = {\n\tmaxLength: 255,\n\tmenuItemHeight: 38,\n\tmenuItemHeightMultiline: 58,\n\tGridListItemHeight: 53,\n\tDEFAULT_NUM_OF_MENUITEM_DISPLAYED: 9,\n\tcloseButtonAriaLabel: \"Close\",\n\tactionMenuAriaLabel: \"More Actions\",\n\tclearButtonAriaLabel: \"Clear\"\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 { Box, styled } from \"@mui/material\";\nimport SolaceLabel from \"./SolaceLabel\";\nimport SolaceStackLabel from \"./SolaceStackLabel\";\nimport HelperText from \"./HelperText\";\nimport ErrorText from \"./ErrorText\";\nimport WarningText from \"./WarningText\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { SX } from \"../../types/sx\";\n\ninterface ChildrenContainerProps {\n\tinlineLabel: boolean;\n}\n\nconst ChildrenContainer = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"inlineLabel\"\n})<ChildrenContainerProps>(({ theme, inlineLabel }) => ({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tflexGrow: 1,\n\tmaxWidth: \"100%\",\n\tpaddingLeft: inlineLabel ? \"36px\" : \"0px\",\n\t\"&.hasWarnings\": {\n\t\t\"fieldset.MuiOutlinedInput-notchedOutline, fieldset.MuiInputBase-inputMultiline\": {\n\t\t\tborderColor: `${theme.palette.ux.warning.w100}`\n\t\t}\n\t}\n}));\n\nexport interface FormChildBaseProps extends SolaceComponentProps {\n\t/**\n\t * Unique identifier ... if `id` is not specified, `name` value will be used in order to make `label` and `helperText` accessible for screen readers\n\t */\n\tid: string;\n\t/**\n\t * the label content to display on the screen\n\t */\n\tlabel?: string | JSX.Element;\n\t/**\n\t * Boolean flag to allow labels to be rendered as SolaceStackLabel component, which provides more props, such as large, bold\n\t */\n\tstackLabel?: boolean;\n\t/**\n\t * Boolean flag to allow StackSolaceLabel component to be rendered with larger font size of 16px (default to 14px)\n\t */\n\tlarge?: boolean;\n\t/**\n\t * Boolean flag to allow StackSolaceLabel component to be rendered with font weight of medium (default to regular)\n\t */\n\tbold?: boolean;\n\t/**\n\t * The value of the `input` element, required for controlled component\n\t */\n\tvalue?: string;\n\t/**\n\t * Content to display as supportive/explanatory text\n\t */\n\thelperText?: string | JSX.Element;\n\t/**\n\t * HelperText when the `input` in error state\n\t */\n\terrorText?: string | JSX.Element;\n\t/**\n\t * HelperText when the `input` in warning state\n\t */\n\twarningText?: string | JSX.Element;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired: boolean;\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled: boolean;\n\t/**\n\t * Boolean flag to set the `input` in a read-only state\n\t */\n\treadOnly: boolean;\n\t/**\n\t * Display the label horizontally\n\t */\n\tinlineLabel: boolean;\n\t/**\n\t * Center align the inline label, this will e used only for single line field label\n\t */\n\tcenterInlineLabel?: boolean;\n\n\tchildren: JSX.Element;\n\t/**\n\t * The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.\n\t */\n\tsx?: SX;\n}\n\nfunction FormChildBase({\n\tid,\n\tlabel,\n\tstackLabel,\n\tlarge,\n\tbold,\n\trequired,\n\tdisabled,\n\treadOnly,\n\tinlineLabel,\n\tcenterInlineLabel,\n\thelperText,\n\terrorText,\n\twarningText,\n\tchildren,\n\tsx\n}: FormChildBaseProps): JSX.Element {\n\treturn (\n\t\t<Box\n\t\t\tdisplay=\"flex\"\n\t\t\tflexDirection={inlineLabel ? \"row\" : \"column\"}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\talignItems={centerInlineLabel ? \"flex-start\" : \"\"}\n\t\t\tsx={sx}\n\t\t>\n\t\t\t{stackLabel && label && (\n\t\t\t\t<div style={{ marginTop: centerInlineLabel ? \"5.5px\" : \"\" }}>\n\t\t\t\t\t<SolaceStackLabel\n\t\t\t\t\t\tid={`${id}-label`}\n\t\t\t\t\t\thtmlForId={`${id}`}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tlarge={large}\n\t\t\t\t\t\tbold={bold}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</SolaceStackLabel>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{!stackLabel && label && (\n\t\t\t\t<div style={{ marginTop: centerInlineLabel ? \"5.5px\" : \"\" }}>\n\t\t\t\t\t<SolaceLabel\n\t\t\t\t\t\tid={`${id}-label`}\n\t\t\t\t\t\thtmlForId={`${id}`}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\tnoWrap={inlineLabel}\n\t\t\t\t\t>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</SolaceLabel>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<ChildrenContainer inlineLabel={inlineLabel} className={warningText ? \"hasWarnings\" : \"\"}>\n\t\t\t\t{children}\n\t\t\t\t{helperText && !errorText && !warningText && <HelperText>{helperText}</HelperText>}\n\t\t\t\t{warningText && !errorText && <WarningText>{warningText}</WarningText>}\n\t\t\t\t{errorText && <ErrorText>{errorText}</ErrorText>}\n\t\t\t</ChildrenContainer>\n\t\t</Box>\n\t);\n}\n\nexport default FormChildBase;\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 { InputAdornment, IconButton, TextField, useTheme } from \"@mui/material\";\nimport React from \"react\";\nimport { constants } from \"../../constants\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport FormChildBase from \"./FormChildBase\";\nimport SolaceTooltip from \"../SolaceToolTip\";\nimport { styled } from \"@mui/material\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\nexport interface SolaceTextFieldChangeEvent {\n\tname: string;\n\tvalue: string;\n}\n\nexport interface SolaceTextFieldProps extends SolaceComponentProps {\n\t/**\n\t * Unique identifier ... if `id` is not specified, `name` value will be used in order to make `label` and `helperText` accessible for screen readers\n\t */\n\tid?: string;\n\t/**\n\t * Name attribute to assign to the `input` element\n\t */\n\tname: string;\n\t/**\n\t * the label content to display on the screen\n\t */\n\tlabel?: string | JSX.Element;\n\t/**\n\t * The value of the `input` element, required for controlled component\n\t */\n\tvalue?: string | number;\n\t/**\n\t * Content to display as supportive/explanitory text\n\t */\n\thelperText?: string | JSX.Element;\n\t/**\n\t * Short hint displayed in the `input` before user enters a value\n\t */\n\tplaceholder?: string;\n\t/**\n\t * The maximum number of characters which can be typed as the `input` value\n\t */\n\tmaxLength?: number;\n\t/**\n\t * The type of `input` element to render\n\t */\n\ttype?: \"text\" | \"number\" | \"password\" | \"email\" | \"url\";\n\t/**\n\t * The size/width of the `input` measured in characters\n\t */\n\tsize?: number;\n\t/**\n\t * The text to display as the tooltip hint\n\t */\n\ttitle?: string;\n\t/**\n\t * Boolean flag to control whether the `input` element is focused during first mount\n\t */\n\tautoFocus?: boolean;\n\t/**\n\t * Boolean flag to mark the `input` in error state\n\t */\n\thasErrors?: boolean;\n\t/**\n\t * Boolean flag to mark the `input` in warn state\n\t */\n\thasWarnings?: boolean;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired?: boolean;\n\t/**\n\t * Boolean flag to control whether to stack the label on top of the `input` element (false) or place them inline to one another (true)\n\t */\n\tinlineLabel?: boolean;\n\t/**\n\t * Allows custom icon to be set at the beginning/end of the field.\n\t */\n\tcustomIcon?: {\n\t\ticon: React.ReactNode;\n\t\tposition: \"end\" | \"start\";\n\t\thandleClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n\t};\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Boolean flag to set the `input` in a read-only state\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Callback function to trigger whenever the value of the `input` is changed\n\t */\n\tonChange?: (event: SolaceTextFieldChangeEvent) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` loses focus\n\t */\n\tonBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` receives key down event\n\t */\n\tonKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` receives key up event\n\t */\n\tonKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` is focused\n\t */\n\tonFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\t/**\n\t * Custom Width of the component.\n\t */\n\twidth?: string;\n\t/**\n\t * If true, the input will take up the full width of its container.\n\t */\n\tfullWidth?: boolean;\n\t/**\n\t * optional prop to pass an array of icon or button at the end of textfield\n\t */\n\tendAdornment?: (React.ReactNode | JSX.Element)[];\n\t/**\n\t * minimum width of the component\n\t */\n\tminWidth?: string;\n\t/**\n\t * pass a ref to the input element.\n\t */\n\tinputRef?: (input: HTMLInputElement) => void;\n}\n\nfunction SolaceTextField({\n\tid,\n\tname,\n\tlabel,\n\tvalue,\n\thelperText,\n\tplaceholder,\n\tmaxLength = constants.maxLength,\n\ttype = \"text\",\n\tsize = 50,\n\ttitle,\n\tautoFocus = false,\n\thasErrors = false,\n\thasWarnings = false,\n\trequired = false,\n\tinlineLabel = false,\n\tcustomIcon,\n\tdisabled = false,\n\treadOnly = false,\n\tonChange,\n\tonBlur,\n\tonKeyDown,\n\tonKeyUp,\n\tonFocus,\n\tdataQa,\n\tdataTags,\n\tfullWidth = false,\n\twidth,\n\tendAdornment,\n\tminWidth,\n\tinputRef\n}: SolaceTextFieldProps): JSX.Element {\n\tconst theme = useTheme();\n\n\tconst endIconProps =\n\t\tcustomIcon && customIcon.position === \"end\" ? (\n\t\t\t<IconButton onClick={customIcon.handleClick}>{customIcon.icon}</IconButton>\n\t\t) : null;\n\n\tconst inputEndAdornment =\n\t\tendIconProps || endAdornment\n\t\t\t? {\n\t\t\t\t\tendAdornment: (\n\t\t\t\t\t\t<InputAdornment position=\"end\">\n\t\t\t\t\t\t\t{endAdornment}\n\t\t\t\t\t\t\t{endIconProps}\n\t\t\t\t\t\t</InputAdornment>\n\t\t\t\t\t)\n\t\t\t }\n\t\t\t: {};\n\tconst inputStartAdornment =\n\t\tcustomIcon && customIcon.position === \"start\"\n\t\t\t? {\n\t\t\t\t\tstartAdornment: (\n\t\t\t\t\t\t<InputAdornment position={customIcon.position}>\n\t\t\t\t\t\t\t<IconButton onClick={customIcon.handleClick}>{customIcon.icon}</IconButton>\n\t\t\t\t\t\t</InputAdornment>\n\t\t\t\t\t)\n\t\t\t }\n\t\t\t: {};\n\n\tconst defaultInputProps = {\n\t\tsx: { height: theme.spacing(4) },\n\t\tdisabled: disabled,\n\t\trequired: required\n\t};\n\n\tconst handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n\t\tif (onChange) {\n\t\t\tonChange({\n\t\t\t\tname: name,\n\t\t\t\tvalue: event.target.value\n\t\t\t});\n\t\t}\n\t};\n\n\tconst getId = () => {\n\t\treturn id ? id : name;\n\t};\n\n\tconst TooltipContainer = styled(\"div\")(({ theme }) => ({\n\t\t...(theme.mixins.formComponent_ReadOnlyToolTipContainer.container as CSSProperties)\n\t}));\n\n\tconst textField = () => {\n\t\t/* read-only behaviour */\n\t\tif (readOnly) {\n\t\t\treturn (\n\t\t\t\t<TooltipContainer>\n\t\t\t\t\t<SolaceTooltip\n\t\t\t\t\t\tvariant=\"overflow\"\n\t\t\t\t\t\ttitle={typeof value !== \"undefined\" && value !== null ? value + \"\" : \"\"}\n\t\t\t\t\t\tdataQa={dataQa}\n\t\t\t\t\t>\n\t\t\t\t\t\t{typeof value !== \"undefined\" && value !== null ? value + \"\" : \"\"}\n\t\t\t\t\t</SolaceTooltip>\n\t\t\t\t</TooltipContainer>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<TextField\n\t\t\t\t\tid={`${getId()}`}\n\t\t\t\t\tname={name}\n\t\t\t\t\tinputProps={{\n\t\t\t\t\t\tmaxLength: maxLength,\n\t\t\t\t\t\tsize: size,\n\t\t\t\t\t\t\"data-qa\": dataQa,\n\t\t\t\t\t\t\"data-tags\": dataTags,\n\t\t\t\t\t\t\"data-testid\": dataQa,\n\t\t\t\t\t\t\"data-lpignore\": true,\n\t\t\t\t\t\treadOnly: readOnly,\n\t\t\t\t\t\t\"aria-describedby\": helperText ? `${getId()}-textfield-helper-text` : \"\",\n\t\t\t\t\t\t\"aria-labelledby\": label ? `${getId()}-label` : \"\",\n\t\t\t\t\t\t\"aria-readonly\": readOnly,\n\t\t\t\t\t\trole: \"textbox\",\n\t\t\t\t\t\ttitle: title,\n\t\t\t\t\t\tmin: 0\n\t\t\t\t\t}}\n\t\t\t\t\tinputRef={inputRef}\n\t\t\t\t\ttype={type}\n\t\t\t\t\terror={hasErrors}\n\t\t\t\t\tautoComplete={`dummy-field-${name}`}\n\t\t\t\t\tautoFocus={autoFocus}\n\t\t\t\t\tInputProps={{ ...defaultInputProps, ...inputEndAdornment, ...inputStartAdornment }}\n\t\t\t\t\tmargin=\"dense\"\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tfullWidth={fullWidth}\n\t\t\t\t\tsx={{ minWidth: minWidth }}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t};\n\n\treturn (\n\t\t<FormChildBase\n\t\t\tid={getId()}\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terrorText={hasErrors ? helperText : undefined}\n\t\t\twarningText={hasWarnings ? helperText : undefined}\n\t\t\tdisabled={disabled}\n\t\t\treadOnly={readOnly}\n\t\t\trequired={required}\n\t\t\tinlineLabel={inlineLabel}\n\t\t\tcenterInlineLabel={inlineLabel}\n\t\t\tsx={{ width }}\n\t\t>\n\t\t\t{textField()}\n\t\t</FormChildBase>\n\t);\n}\n\nexport default SolaceTextField;\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkV45EFIXB_js=require('./chunk-V45EFIXB.js'),jsxRuntime=require('react/jsx-runtime');function f({id:r,htmlForId:t,required:n=false,disabled:b=false,large:s=false,bold:d=false,readOnly:i=false,noWrap:c=false,children:p}){let e=chunkV45EFIXB_js.ua();return jsxRuntime.jsx(chunkV45EFIXB_js.le,{id:r,htmlFor:t,required:n,disabled:b,className:chunkV45EFIXB_js.D({"bold-label":d,"read-only":i}),sx:{display:"block",fontSize:s?e.typography.subtitle1:e.typography.body1,whiteSpace:c?"nowrap":"normal"},children:p})}var y=f;exports.a=y;//# sourceMappingURL=chunk-YQTPPT5K.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-YQTPPT5K.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/SolaceStackLabel.tsx"],"names":["SolaceStackLabel","id","htmlForId","required","disabled","large","bold","readOnly","noWrap","children","theme","useTheme","jsx","FormLabel_default","clsx_default","SolaceStackLabel_default"],"mappings":"yGA0DA,SAASA,CAAAA,CAAiB,CACzB,GAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,EAAW,KAAA,CACX,QAAA,CAAAC,CAAAA,CAAW,KAAA,CACX,MAAAC,CAAAA,CAAQ,KAAA,CACR,IAAA,CAAAC,CAAAA,CAAO,MACP,QAAA,CAAAC,CAAAA,CAAW,KAAA,CACX,MAAA,CAAAC,EAAS,KAAA,CACT,QAAA,CAAAC,CACD,CAAA,CAAuC,CACtC,IAAMC,CAAAA,CAAQC,qBAAS,CACvB,OACCC,eAACC,mBAAAA,CAAA,CACA,EAAA,CAAIZ,CAAAA,CACJ,QAASC,CAAAA,CACT,QAAA,CAAUC,CAAAA,CACV,QAAA,CAAUC,EACV,SAAA,CAAWU,kBAAAA,CAAK,CAAE,YAAA,CAAcR,EAAM,WAAA,CAAaC,CAAS,CAAC,CAAA,CAC7D,GAAI,CACH,OAAA,CAAS,OAAA,CACT,QAAA,CAAUF,EAAQK,CAAAA,CAAM,UAAA,CAAW,SAAA,CAAYA,CAAAA,CAAM,WAAW,KAAA,CAChE,UAAA,CAAYF,CAAAA,CAAS,QAAA,CAAW,QACjC,CAAA,CAEC,QAAA,CAAAC,EACF,CAEF,KAEOM,CAAAA,CAAQf","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/components/form/SolaceStackLabel.tsx"],"names":["SolaceStackLabel","id","htmlForId","required","disabled","large","bold","readOnly","noWrap","children","theme","useTheme","jsx","FormLabel_default","clsx_default","SolaceStackLabel_default"],"mappings":"yGA0DA,SAASA,CAAAA,CAAiB,CACzB,GAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,EAAW,KAAA,CACX,QAAA,CAAAC,CAAAA,CAAW,KAAA,CACX,MAAAC,CAAAA,CAAQ,KAAA,CACR,IAAA,CAAAC,CAAAA,CAAO,MACP,QAAA,CAAAC,CAAAA,CAAW,KAAA,CACX,MAAA,CAAAC,EAAS,KAAA,CACT,QAAA,CAAAC,CACD,CAAA,CAAuC,CACtC,IAAMC,CAAAA,CAAQC,qBAAS,CACvB,OACCC,eAACC,mBAAAA,CAAA,CACA,EAAA,CAAIZ,CAAAA,CACJ,QAASC,CAAAA,CACT,QAAA,CAAUC,CAAAA,CACV,QAAA,CAAUC,EACV,SAAA,CAAWU,kBAAAA,CAAK,CAAE,YAAA,CAAcR,EAAM,WAAA,CAAaC,CAAS,CAAC,CAAA,CAC7D,GAAI,CACH,OAAA,CAAS,OAAA,CACT,QAAA,CAAUF,EAAQK,CAAAA,CAAM,UAAA,CAAW,SAAA,CAAYA,CAAAA,CAAM,WAAW,KAAA,CAChE,UAAA,CAAYF,CAAAA,CAAS,QAAA,CAAW,QACjC,CAAA,CAEC,QAAA,CAAAC,EACF,CAEF,KAEOM,CAAAA,CAAQf","file":"chunk-YQTPPT5K.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 { FormLabel, useTheme } from \"@mui/material\";\nimport clsx from \"clsx\";\n\nexport interface SolaceStackLabelProps {\n\t/**\n\t * Unique identifier of the label\n\t */\n\tid: string;\n\t/**\n\t * identifier used for specifying which form element this label is bound to\n\t */\n\thtmlForId?: string;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired?: boolean;\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Boolean flag for readOnly labels, changes font color to 55% black\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Boolean flag to allow font size of 16px (default to 14px)\n\t */\n\tlarge?: boolean;\n\t/**\n\t * Boolean flag to allow font weight of medium (default to regular)\n\t */\n\tbold?: boolean;\n\t/**\n\t * Boolean flag to suppress line breaks (text wrapping) within the label\n\t */\n\tnoWrap?: boolean;\n\t/**\n\t *\n\t */\n\tchildren?: React.ReactNode;\n}\n\nfunction SolaceStackLabel({\n\tid,\n\thtmlForId,\n\trequired = false,\n\tdisabled = false,\n\tlarge = false,\n\tbold = false,\n\treadOnly = false,\n\tnoWrap = false,\n\tchildren\n}: SolaceStackLabelProps): JSX.Element {\n\tconst theme = useTheme();\n\treturn (\n\t\t<FormLabel\n\t\t\tid={id}\n\t\t\thtmlFor={htmlForId}\n\t\t\trequired={required}\n\t\t\tdisabled={disabled}\n\t\t\tclassName={clsx({ \"bold-label\": bold, \"read-only\": readOnly })}\n\t\t\tsx={{\n\t\t\t\tdisplay: \"block\",\n\t\t\t\tfontSize: large ? theme.typography.subtitle1 : theme.typography.body1,\n\t\t\t\twhiteSpace: noWrap ? \"nowrap\" : \"normal\"\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</FormLabel>\n\t);\n}\n\nexport default SolaceStackLabel;\n"]}
|
package/dist/code-editor.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkPYADJP2I_js=require('./chunk-PYADJP2I.js'),chunkSWGQVSXQ_js=require('./chunk-SWGQVSXQ.js'),chunkV45EFIXB_js=require('./chunk-V45EFIXB.js'),react=require('react'),R=require('@uiw/react-codemirror'),view=require('@codemirror/view'),commands=require('@codemirror/commands'),language=require('@codemirror/language'),highlight=require('@lezer/highlight'),langJson=require('@codemirror/lang-json'),langXml=require('@codemirror/lang-xml'),langYaml=require('@codemirror/lang-yaml'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var R__default=/*#__PURE__*/_interopDefault(R);function T(o){let e="rgb(119, 0, 136)",a=language.HighlightStyle.define([{tag:highlight.tags.string,color:o.palette.error.w100},{tag:highlight.tags.special(highlight.tags.string),color:o.palette.error.w100},{tag:highlight.tags.character,color:o.palette.error.w100},{tag:highlight.tags.regexp,color:o.palette.error.w100},{tag:highlight.tags.number,color:o.palette.success.w100},{tag:highlight.tags.integer,color:o.palette.success.w100},{tag:highlight.tags.float,color:o.palette.success.w100},{tag:highlight.tags.bool,color:o.palette.info.w100},{tag:highlight.tags.null,color:o.palette.info.w100},{tag:highlight.tags.atom,color:o.palette.info.w100},{tag:highlight.tags.propertyName,color:o.palette.secondary.text.wMain},{tag:highlight.tags.attributeName,color:o.palette.info.w100},{tag:highlight.tags.attributeValue,color:o.palette.error.w100},{tag:highlight.tags.tagName,color:o.palette.success.w100},{tag:highlight.tags.angleBracket,color:o.palette.success.w100},{tag:highlight.tags.keyword,color:e},{tag:highlight.tags.definitionKeyword,color:e},{tag:highlight.tags.modifier,color:e},{tag:highlight.tags.controlKeyword,color:e},{tag:highlight.tags.operator,color:o.palette.secondary.text.wMain},{tag:highlight.tags.punctuation,color:o.palette.secondary.text.wMain},{tag:highlight.tags.bracket,color:o.palette.secondary.text.wMain},{tag:highlight.tags.brace,color:o.palette.secondary.text.wMain},{tag:highlight.tags.paren,color:o.palette.secondary.text.wMain},{tag:highlight.tags.comment,color:o.palette.secondary.w70,fontStyle:"italic"},{tag:highlight.tags.lineComment,color:o.palette.secondary.w70,fontStyle:"italic"},{tag:highlight.tags.blockComment,color:o.palette.secondary.w70,fontStyle:"italic"},{tag:highlight.tags.typeName,color:e},{tag:highlight.tags.className,color:o.palette.secondary.text.wMain},{tag:highlight.tags.namespace,color:o.palette.secondary.text.wMain},{tag:highlight.tags.variableName,color:o.palette.secondary.text.wMain},{tag:highlight.tags.function(highlight.tags.variableName),color:o.palette.secondary.text.wMain},{tag:highlight.tags.definition(highlight.tags.variableName),color:o.palette.secondary.text.wMain},{tag:highlight.tags.name,color:o.palette.secondary.text.wMain}]),i=view.EditorView.theme({"&":{fontSize:`${chunkV45EFIXB_js.ni.sm}px`,fontFamily:"Consolas, 'Liberation Mono', Menlo, Courier, monospace",lineHeight:"normal"},".cm-content":{padding:"4px 2px",lineHeight:"normal"},".cm-focused":{outline:"none"},".cm-gutters":{backgroundColor:o.palette.background.w20,borderRight:`1px solid ${o.palette.secondary.w40}`,color:o.palette.secondary.text.wMain,fontSize:`${chunkV45EFIXB_js.ni.sm}px`,lineHeight:"normal"},".cm-activeLineGutter":{backgroundColor:"transparent"},".cm-cursor":{borderLeftColor:o.palette.secondary.wMain},".cm-selectionBackground":{backgroundColor:`${o.palette.brand.wMain}30`},"&.cm-focused .cm-selectionBackground":{backgroundColor:`${o.palette.brand.wMain}30`},".cm-matchingBracket":{color:o.palette.success.w100,backgroundColor:"transparent",fontWeight:"bold"}});return [language.syntaxHighlighting(a),i]}var oo=language.StreamLanguage.define({name:"protobuf",token(o){return o.match(/message|service|rpc|enum|option|import|package/)?"keyword":o.match(/int32|int64|uint32|uint64|sint32|sint64|bool|string|bytes|float|double/)?"type":o.match(/"[^"]*"/)?"string":o.match(/\d+/)?"number":(o.next(),null)}}),_=o=>{switch(o){case "json":return langJson.json();case "xml":return langXml.xml();case "yaml":return langYaml.yaml();case "protobuf":return oo;default:return langJson.json()}};var to=({size:o,fill:e})=>jsxRuntime.jsx(chunkV45EFIXB_js.Na,{sx:{width:`${o}px`,height:`${o}px`,fill:"none"},viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M3.25 21C3.11193 21 3 20.8881 3 20.75V15.25C3 15.1119 3.11193 15 3.25 15H5V17.6L9.32322 13.2768C9.42085 13.1791 9.57915 13.1791 9.67678 13.2768L10.7232 14.3232C10.8209 14.4209 10.8209 14.5791 10.7232 14.6768L6.4 19H8.75C8.88807 19 9 19.1119 9 19.25V20.75C9 20.8881 8.88807 21 8.75 21H3.25ZM14.6768 10.7232C14.5791 10.8209 14.4209 10.8209 14.3232 10.7232L13.8 10.2L13.2768 9.67678C13.1791 9.57915 13.1791 9.42085 13.2768 9.32322L17.6 5H15.25C15.1119 5 15 4.88807 15 4.75V3.25C15 3.11193 15.1119 3 15.25 3H20.75C20.8881 3 21 3.11193 21 3.25V8.75C21 8.88807 20.8881 9 20.75 9H19.25C19.1119 9 19 8.88807 19 8.75V6.4L14.6768 10.7232Z",fill:e})}),J=to;var eo=({size:o,fill:e})=>jsxRuntime.jsxs(chunkV45EFIXB_js.Na,{sx:{width:`${o}px`,height:`${o}px`,fill:"none"},viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M11.25 13C11.388 13 11.5 13.1119 11.5 13.25L11.5 18.75C11.5 18.8881 11.388 19 11.25 19H9.74996C9.61189 19 9.49996 18.8881 9.49996 18.75L9.49996 16.4L5.07674 20.8232C4.97911 20.9209 4.82082 20.9209 4.72319 20.8232L3.67674 19.7768C3.57911 19.6791 3.57911 19.5209 3.67674 19.4232L8.09996 15H5.74996C5.61189 15 5.49996 14.8881 5.49996 14.75L5.49996 13.25C5.49996 13.1119 5.61189 13 5.74996 13H11.25Z",fill:e}),jsxRuntime.jsx("path",{d:"M19.8231 3.27678C19.9207 3.17914 20.079 3.17914 20.1766 3.27678L21.2231 4.32322C21.3207 4.42085 21.3207 4.57914 21.2231 4.67678L16.3999 9.5H18.7499C18.8879 9.5 18.9999 9.61193 18.9999 9.75V11.25C18.9999 11.3881 18.8879 11.5 18.7499 11.5H13.2499C13.1118 11.5 12.9999 11.3881 12.9999 11.25L12.9999 5.75C12.9999 5.61193 13.1118 5.5 13.2499 5.5L14.7499 5.5C14.8879 5.5 14.9999 5.61193 14.9999 5.75V8.1L19.8231 3.27678Z",fill:e})]}),Z=eo;var io=chunkV45EFIXB_js.wa("div")(({theme:o})=>({...o.mixins.formComponent_CodeEditor.OuterWrapper})),co=chunkV45EFIXB_js.wa("div")(({theme:o})=>({...o.mixins.formComponent_CodeEditor.InnerWrapper})),j=chunkV45EFIXB_js.wa("div")(({theme:o,customHeight:e})=>({...o.mixins.formComponent_CodeEditor.EditorWrapper,...e&&{height:`${e} !important`,"& .cm-theme":{height:`${e} !important`},"& .cm-editor":{height:`${e} !important`},"& .cm-editor .cm-scroller":{maxHeight:`${e} !important`}}})),so=chunkV45EFIXB_js.wa("div")(({theme:o})=>({...o.mixins.formComponent_CodeEditor.IconWrapper})),z=(o,e,a)=>e?jsxRuntime.jsx(chunkSWGQVSXQ_js.e,{children:o}):a?jsxRuntime.jsx(chunkSWGQVSXQ_js.g,{children:o}):jsxRuntime.jsx(chunkSWGQVSXQ_js.c,{children:o});function mo({mode:o="json",value:e,readOnly:a=false,expandable:i=false,fullScreen:m=false,helperText:c="",hasErrors:C=false,hasWarnings:x=false,height:s,onChange:y}){let b=chunkV45EFIXB_js.ua(),S=chunkV45EFIXB_js.qi(),[w,E]=react.useState(e||""),[n,L]=react.useState(m||false);react.useEffect(()=>{e!==void 0&&E(e);},[e]),react.useEffect(()=>{L(m);},[m]);let h=react.useMemo(()=>T(S),[S]),k=react.useMemo(()=>[_(o),view.EditorView.lineWrapping,view.keymap.of(commands.defaultKeymap)],[o]),v=I=>{E(I),y&&y(null,null,I);},p=s?typeof s=="number"?`${s}px`:s:"300px",H=()=>{L(!n);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i&&jsxRuntime.jsx(io,{className:n?"codeEditor-expanded--backdrop":"",children:jsxRuntime.jsxs(co,{className:n?"codeEditor-expanded--main":"",children:[jsxRuntime.jsx(so,{className:n?"codeEditor-expanded--icon":"codeEditor-collapsed--icon",children:n?jsxRuntime.jsx(chunkPYADJP2I_js.b,{variant:"icon",dataQa:"buttonCollapseCodeEditor",onClick:H,title:"Collapse",children:jsxRuntime.jsx(Z,{fill:b.palette.ux.secondary.wMain,size:24})}):jsxRuntime.jsx(chunkPYADJP2I_js.b,{variant:"icon",dataQa:"buttonExpandCodeEditor",onClick:H,title:"Expand",children:jsxRuntime.jsx(J,{fill:b.palette.ux.secondary.wMain,size:24})})}),jsxRuntime.jsx(j,{customHeight:p,className:`${n?"":"codeEditor-border"} ${a?"codeEditor-readonly":""}`,children:jsxRuntime.jsx(R__default.default,{value:w,onChange:v,extensions:k,theme:h,height:p,editable:!a,basicSetup:{lineNumbers:true,foldGutter:true,bracketMatching:true,closeBrackets:true,autocompletion:true,rectangularSelection:false,highlightSelectionMatches:false,searchKeymap:true}})}),c&&z(c,C,x)]})}),!i&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(j,{customHeight:p,className:`${n?"":"codeEditor-border"} ${a?"codeEditor-readonly":""}`,children:jsxRuntime.jsx(R__default.default,{value:w,onChange:v,extensions:k,theme:h,editable:!a,basicSetup:{lineNumbers:true,foldGutter:true,bracketMatching:true,closeBrackets:true,autocompletion:true,rectangularSelection:false,highlightSelectionMatches:false,searchKeymap:true}})}),c&&z(c,C,x)]})]})}var po=mo;
|
|
2
2
|
exports.SolaceCodeEditor=po;//# sourceMappingURL=code-editor.js.map
|
|
3
3
|
//# sourceMappingURL=code-editor.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-LGBO373S.modern.mjs';import {e,g,c}from'./chunk-54TEARQI.modern.mjs';import {wa,ua,qi,ni,Na}from'./chunk-I7OJ5H4U.modern.mjs';import {useState,useEffect,useMemo}from'react';import R from'@uiw/react-codemirror';import {EditorView,keymap}from'@codemirror/view';import {defaultKeymap}from'@codemirror/commands';import {StreamLanguage,HighlightStyle,syntaxHighlighting}from'@codemirror/language';import {tags}from'@lezer/highlight';import {json}from'@codemirror/lang-json';import {xml}from'@codemirror/lang-xml';import {yaml}from'@codemirror/lang-yaml';import {jsxs,Fragment,jsx}from'react/jsx-runtime';function T(o){let e="rgb(119, 0, 136)",a=HighlightStyle.define([{tag:tags.string,color:o.palette.error.w100},{tag:tags.special(tags.string),color:o.palette.error.w100},{tag:tags.character,color:o.palette.error.w100},{tag:tags.regexp,color:o.palette.error.w100},{tag:tags.number,color:o.palette.success.w100},{tag:tags.integer,color:o.palette.success.w100},{tag:tags.float,color:o.palette.success.w100},{tag:tags.bool,color:o.palette.info.w100},{tag:tags.null,color:o.palette.info.w100},{tag:tags.atom,color:o.palette.info.w100},{tag:tags.propertyName,color:o.palette.secondary.text.wMain},{tag:tags.attributeName,color:o.palette.info.w100},{tag:tags.attributeValue,color:o.palette.error.w100},{tag:tags.tagName,color:o.palette.success.w100},{tag:tags.angleBracket,color:o.palette.success.w100},{tag:tags.keyword,color:e},{tag:tags.definitionKeyword,color:e},{tag:tags.modifier,color:e},{tag:tags.controlKeyword,color:e},{tag:tags.operator,color:o.palette.secondary.text.wMain},{tag:tags.punctuation,color:o.palette.secondary.text.wMain},{tag:tags.bracket,color:o.palette.secondary.text.wMain},{tag:tags.brace,color:o.palette.secondary.text.wMain},{tag:tags.paren,color:o.palette.secondary.text.wMain},{tag:tags.comment,color:o.palette.secondary.w70,fontStyle:"italic"},{tag:tags.lineComment,color:o.palette.secondary.w70,fontStyle:"italic"},{tag:tags.blockComment,color:o.palette.secondary.w70,fontStyle:"italic"},{tag:tags.typeName,color:e},{tag:tags.className,color:o.palette.secondary.text.wMain},{tag:tags.namespace,color:o.palette.secondary.text.wMain},{tag:tags.variableName,color:o.palette.secondary.text.wMain},{tag:tags.function(tags.variableName),color:o.palette.secondary.text.wMain},{tag:tags.definition(tags.variableName),color:o.palette.secondary.text.wMain},{tag:tags.name,color:o.palette.secondary.text.wMain}]),i=EditorView.theme({"&":{fontSize:`${ni.sm}px`,fontFamily:"Consolas, 'Liberation Mono', Menlo, Courier, monospace",lineHeight:"normal"},".cm-content":{padding:"4px 2px",lineHeight:"normal"},".cm-focused":{outline:"none"},".cm-gutters":{backgroundColor:o.palette.background.w20,borderRight:`1px solid ${o.palette.secondary.w40}`,color:o.palette.secondary.text.wMain,fontSize:`${ni.sm}px`,lineHeight:"normal"},".cm-activeLineGutter":{backgroundColor:"transparent"},".cm-cursor":{borderLeftColor:o.palette.secondary.wMain},".cm-selectionBackground":{backgroundColor:`${o.palette.brand.wMain}30`},"&.cm-focused .cm-selectionBackground":{backgroundColor:`${o.palette.brand.wMain}30`},".cm-matchingBracket":{color:o.palette.success.w100,backgroundColor:"transparent",fontWeight:"bold"}});return [syntaxHighlighting(a),i]}var oo=StreamLanguage.define({name:"protobuf",token(o){return o.match(/message|service|rpc|enum|option|import|package/)?"keyword":o.match(/int32|int64|uint32|uint64|sint32|sint64|bool|string|bytes|float|double/)?"type":o.match(/"[^"]*"/)?"string":o.match(/\d+/)?"number":(o.next(),null)}}),_=o=>{switch(o){case "json":return json();case "xml":return xml();case "yaml":return yaml();case "protobuf":return oo;default:return json()}};var to=({size:o,fill:e})=>jsx(Na,{sx:{width:`${o}px`,height:`${o}px`,fill:"none"},viewBox:"0 0 24 24",children:jsx("path",{d:"M3.25 21C3.11193 21 3 20.8881 3 20.75V15.25C3 15.1119 3.11193 15 3.25 15H5V17.6L9.32322 13.2768C9.42085 13.1791 9.57915 13.1791 9.67678 13.2768L10.7232 14.3232C10.8209 14.4209 10.8209 14.5791 10.7232 14.6768L6.4 19H8.75C8.88807 19 9 19.1119 9 19.25V20.75C9 20.8881 8.88807 21 8.75 21H3.25ZM14.6768 10.7232C14.5791 10.8209 14.4209 10.8209 14.3232 10.7232L13.8 10.2L13.2768 9.67678C13.1791 9.57915 13.1791 9.42085 13.2768 9.32322L17.6 5H15.25C15.1119 5 15 4.88807 15 4.75V3.25C15 3.11193 15.1119 3 15.25 3H20.75C20.8881 3 21 3.11193 21 3.25V8.75C21 8.88807 20.8881 9 20.75 9H19.25C19.1119 9 19 8.88807 19 8.75V6.4L14.6768 10.7232Z",fill:e})}),J=to;var eo=({size:o,fill:e})=>jsxs(Na,{sx:{width:`${o}px`,height:`${o}px`,fill:"none"},viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M11.25 13C11.388 13 11.5 13.1119 11.5 13.25L11.5 18.75C11.5 18.8881 11.388 19 11.25 19H9.74996C9.61189 19 9.49996 18.8881 9.49996 18.75L9.49996 16.4L5.07674 20.8232C4.97911 20.9209 4.82082 20.9209 4.72319 20.8232L3.67674 19.7768C3.57911 19.6791 3.57911 19.5209 3.67674 19.4232L8.09996 15H5.74996C5.61189 15 5.49996 14.8881 5.49996 14.75L5.49996 13.25C5.49996 13.1119 5.61189 13 5.74996 13H11.25Z",fill:e}),jsx("path",{d:"M19.8231 3.27678C19.9207 3.17914 20.079 3.17914 20.1766 3.27678L21.2231 4.32322C21.3207 4.42085 21.3207 4.57914 21.2231 4.67678L16.3999 9.5H18.7499C18.8879 9.5 18.9999 9.61193 18.9999 9.75V11.25C18.9999 11.3881 18.8879 11.5 18.7499 11.5H13.2499C13.1118 11.5 12.9999 11.3881 12.9999 11.25L12.9999 5.75C12.9999 5.61193 13.1118 5.5 13.2499 5.5L14.7499 5.5C14.8879 5.5 14.9999 5.61193 14.9999 5.75V8.1L19.8231 3.27678Z",fill:e})]}),Z=eo;var io=wa("div")(({theme:o})=>({...o.mixins.formComponent_CodeEditor.OuterWrapper})),co=wa("div")(({theme:o})=>({...o.mixins.formComponent_CodeEditor.InnerWrapper})),j=wa("div")(({theme:o,customHeight:e})=>({...o.mixins.formComponent_CodeEditor.EditorWrapper,...e&&{height:`${e} !important`,"& .cm-theme":{height:`${e} !important`},"& .cm-editor":{height:`${e} !important`},"& .cm-editor .cm-scroller":{maxHeight:`${e} !important`}}})),so=wa("div")(({theme:o})=>({...o.mixins.formComponent_CodeEditor.IconWrapper})),z=(o,e$1,a)=>e$1?jsx(e,{children:o}):a?jsx(g,{children:o}):jsx(c,{children:o});function mo({mode:o="json",value:e,readOnly:a=false,expandable:i=false,fullScreen:m=false,helperText:c="",hasErrors:C=false,hasWarnings:x=false,height:s,onChange:y}){let b$1=ua(),S=qi(),[w,E]=useState(e||""),[n,L]=useState(m||false);useEffect(()=>{e!==void 0&&E(e);},[e]),useEffect(()=>{L(m);},[m]);let h=useMemo(()=>T(S),[S]),k=useMemo(()=>[_(o),EditorView.lineWrapping,keymap.of(defaultKeymap)],[o]),v=I=>{E(I),y&&y(null,null,I);},p=s?typeof s=="number"?`${s}px`:s:"300px",H=()=>{L(!n);};return jsxs(Fragment,{children:[i&&jsx(io,{className:n?"codeEditor-expanded--backdrop":"",children:jsxs(co,{className:n?"codeEditor-expanded--main":"",children:[jsx(so,{className:n?"codeEditor-expanded--icon":"codeEditor-collapsed--icon",children:n?jsx(b,{variant:"icon",dataQa:"buttonCollapseCodeEditor",onClick:H,title:"Collapse",children:jsx(Z,{fill:b$1.palette.ux.secondary.wMain,size:24})}):jsx(b,{variant:"icon",dataQa:"buttonExpandCodeEditor",onClick:H,title:"Expand",children:jsx(J,{fill:b$1.palette.ux.secondary.wMain,size:24})})}),jsx(j,{customHeight:p,className:`${n?"":"codeEditor-border"} ${a?"codeEditor-readonly":""}`,children:jsx(R,{value:w,onChange:v,extensions:k,theme:h,height:p,editable:!a,basicSetup:{lineNumbers:true,foldGutter:true,bracketMatching:true,closeBrackets:true,autocompletion:true,rectangularSelection:false,highlightSelectionMatches:false,searchKeymap:true}})}),c&&z(c,C,x)]})}),!i&&jsxs(Fragment,{children:[jsx(j,{customHeight:p,className:`${n?"":"codeEditor-border"} ${a?"codeEditor-readonly":""}`,children:jsx(R,{value:w,onChange:v,extensions:k,theme:h,editable:!a,basicSetup:{lineNumbers:true,foldGutter:true,bracketMatching:true,closeBrackets:true,autocompletion:true,rectangularSelection:false,highlightSelectionMatches:false,searchKeymap:true}})}),c&&z(c,C,x)]})]})}var po=mo;
|
|
2
2
|
export{po as SolaceCodeEditor};//# sourceMappingURL=code-editor.modern.mjs.map
|
|
3
3
|
//# sourceMappingURL=code-editor.modern.mjs.map
|
package/dist/datepicker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkDKWU3WVA_js=require('./chunk-DKWU3WVA.js'),
|
|
1
|
+
'use strict';var chunkDKWU3WVA_js=require('./chunk-DKWU3WVA.js'),chunkV45EFIXB_js=require('./chunk-V45EFIXB.js'),DatePicker=require('@mui/x-date-pickers/DatePicker'),LocalizationProvider=require('@mui/x-date-pickers/LocalizationProvider'),AdapterMoment=require('@mui/x-date-pickers/AdapterMoment'),d=require('moment-timezone'),react=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var d__default=/*#__PURE__*/_interopDefault(d);var i=(r,n)=>r?n?d__default.default.tz(r,n):d__default.default(r):null;function h({id:r,name:n,value:s=null,onChange:a,onClear:m,dataQa:p,variant:D="yearMonthDay",disabled:M=false,timezone:t=void 0,disableFuture:x=false,disablePast:k=false,onMonthChange:u,isDateAvailable:l,loading:v=false}){let[C,f]=react.useState(i(s,t)),{views:O,openTo:R,format:T}=chunkDKWU3WVA_js.b[D];react.useEffect(()=>{f(i(s,t));},[s,t]);let w=e=>{if(f(e),a&&e){let o=i(e.format(),t);a(o?o.toISOString():null);}else a&&a(null);},A=e=>{if(u){let o=e.clone().startOf("month").hour(12);u(o.toISOString());}},I=e=>{if(!l)return false;let o=i(e.format(),t),F=o?o.toISOString():e.toISOString();return !l(F)},c=chunkV45EFIXB_js.ua().palette.ux.accent.n2.wMain,y={".MuiPickersCalendarHeader-switchViewButton:focus-visible":{border:`1px solid ${c}`,padding:"3px",borderRadius:"3px"},".MuiPickersArrowSwitcher-button:focus-visible":{border:`1px solid ${c}`,padding:"3px",borderRadius:"3px"},".MuiPickersDay-root:focus-visible":{border:`1px solid ${c}`,borderRadius:"50%"}};return jsxRuntime.jsx(LocalizationProvider.LocalizationProvider,{dateAdapter:AdapterMoment.AdapterMoment,dateLibInstance:d__default.default,children:jsxRuntime.jsx(DatePicker.DatePicker,{className:"SolaceDatePicker",value:C,onChange:w,onMonthChange:A,shouldDisableDate:l?I:void 0,loading:v,"data-qa":p,slotProps:{field:{clearable:true,onClear:()=>m&&m()},popper:{sx:y},textField:{inputProps:{"data-qa":p,id:r,name:n}}},disabled:M,views:O,openTo:R,format:T,disableFuture:x,disablePast:k,timezone:t??"system"})})}Object.defineProperty(exports,"SolaceDatePickerVariant",{enumerable:true,get:function(){return chunkDKWU3WVA_js.a}});exports.SolaceDatePicker=h;//# sourceMappingURL=datepicker.js.map
|
|
2
2
|
//# sourceMappingURL=datepicker.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b}from'./chunk-NWTC7FRW.modern.mjs';export{a as SolaceDatePickerVariant}from'./chunk-NWTC7FRW.modern.mjs';import {ua}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-NWTC7FRW.modern.mjs';export{a as SolaceDatePickerVariant}from'./chunk-NWTC7FRW.modern.mjs';import {ua}from'./chunk-I7OJ5H4U.modern.mjs';import {DatePicker}from'@mui/x-date-pickers/DatePicker';import {LocalizationProvider}from'@mui/x-date-pickers/LocalizationProvider';import {AdapterMoment}from'@mui/x-date-pickers/AdapterMoment';import d from'moment-timezone';import {useState,useEffect}from'react';import {jsx}from'react/jsx-runtime';var i=(r,n)=>r?n?d.tz(r,n):d(r):null;function h({id:r,name:n,value:s=null,onChange:a,onClear:m,dataQa:p,variant:D="yearMonthDay",disabled:M=false,timezone:t=void 0,disableFuture:x=false,disablePast:k=false,onMonthChange:u,isDateAvailable:l,loading:v=false}){let[C,f]=useState(i(s,t)),{views:O,openTo:R,format:T}=b[D];useEffect(()=>{f(i(s,t));},[s,t]);let w=e=>{if(f(e),a&&e){let o=i(e.format(),t);a(o?o.toISOString():null);}else a&&a(null);},A=e=>{if(u){let o=e.clone().startOf("month").hour(12);u(o.toISOString());}},I=e=>{if(!l)return false;let o=i(e.format(),t),F=o?o.toISOString():e.toISOString();return !l(F)},c=ua().palette.ux.accent.n2.wMain,y={".MuiPickersCalendarHeader-switchViewButton:focus-visible":{border:`1px solid ${c}`,padding:"3px",borderRadius:"3px"},".MuiPickersArrowSwitcher-button:focus-visible":{border:`1px solid ${c}`,padding:"3px",borderRadius:"3px"},".MuiPickersDay-root:focus-visible":{border:`1px solid ${c}`,borderRadius:"50%"}};return jsx(LocalizationProvider,{dateAdapter:AdapterMoment,dateLibInstance:d,children:jsx(DatePicker,{className:"SolaceDatePicker",value:C,onChange:w,onMonthChange:A,shouldDisableDate:l?I:void 0,loading:v,"data-qa":p,slotProps:{field:{clearable:true,onClear:()=>m&&m()},popper:{sx:y},textField:{inputProps:{"data-qa":p,id:r,name:n}}},disabled:M,views:O,openTo:R,format:T,disableFuture:x,disablePast:k,timezone:t??"system"})})}export{h as SolaceDatePicker};//# sourceMappingURL=datepicker.modern.mjs.map
|
|
2
2
|
//# sourceMappingURL=datepicker.modern.mjs.map
|
package/dist/drag-drop.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkUFDVHFXE_js=require('./chunk-UFDVHFXE.js'),chunk7SKICMGL_js=require('./chunk-7SKICMGL.js');require('./chunk-GDZZVHFP.js');var chunk4XH33OL7_js=require('./chunk-4XH33OL7.js'),be=require('react'),dnd=require('@hello-pangea/dnd'),jsxRuntime=require('react/jsx-runtime'),reactVirtuoso=require('react-virtuoso');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var be__default=/*#__PURE__*/_interopDefault(be);var re=({fill:e,opacity:r})=>jsxRuntime.jsx(chunk4XH33OL7_js.Na,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("g",{transform:"translate(5,3)",children:jsxRuntime.jsx("path",{d:"M9.5 0H4.5L3.5 1H0.401C0.179 1 0 1.179 0 1.401V2.599C0 2.821 0.179 3 0.401 3H13.599C13.821 3 14 2.821 14 2.599V1.401C14 1.179 13.821 1 13.599 1H10.5L9.5 0ZM10.875 6L10.118 16H3.882L3.125 6H10.875ZM12.59 4H1.39C1.159 4 0.982 4.196 1 4.426L2 17.634C2.016 17.841 2.193 18 2.4 18H11.6C11.807 18 11.984 17.841 12 17.635L13 4.427C13.018 4.196 12.82 4 12.59 4Z",fill:e,opacity:r})})});var te=({fill:e,opacity:r})=>jsxRuntime.jsx(chunk4XH33OL7_js.Na,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("g",{transform:"translate(7,4)",children:jsxRuntime.jsx("path",{d:"M4 14C4 15.1 3.1 16 2 16C0.9 16 0 15.1 0 14C0 12.9 0.9 12 2 12C3.1 12 4 12.9 4 14ZM2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6ZM2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0ZM8 4C9.1 4 10 3.1 10 2C10 0.9 9.1 0 8 0C6.9 0 6 0.9 6 2C6 3.1 6.9 4 8 4ZM8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6ZM8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12Z",fill:e,fillOpacity:r})})});var pe=(e,r,a,l)=>{let p="";return r!==null&&a!==null&&(r&&a+1===l||!r&&a===l)&&(p=`1px solid ${e.palette.ux.accent.n2.wMain}`),p},ce=chunk4XH33OL7_js.wa("div",{shouldForwardProp:e=>e!=="isDragging"&&e!=="dropOverIndex"&&e!=="dropFromTop"&&e!=="readOnly"&&e!=="disableReorder"})(({theme:e,isDragging:r,dropOverIndex:a,index:l,dropFromTop:p,readOnly:s,disableReorder:b})=>({...e.mixins.formComponent_AVPItem.container,backgroundColor:r?e.palette.ux.brand.w10:"inherit",borderTop:pe(e,p,a,l),gridTemplateColumns:s?"0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px":b?"0px 1fr 8px 1fr 40px":"32px 1fr 8px 1fr 40px"})),me=chunk4XH33OL7_js.wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPItem.inputWrapperForKey})),de=chunk4XH33OL7_js.wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPItem.inputWrapperForValue})),ge=chunk4XH33OL7_js.wa("div",{shouldForwardProp:e=>e!=="ghostItem"&&e!=="isDragging"&&e!=="readOnly"})(({theme:e,ghostItem:r,isDragging:a,readOnly:l})=>({...e.mixins.formComponent_AVPItem.moveButton,cursor:r?"default":a?"move":"pointer",display:l?"none":"inherit"})),fe=chunk4XH33OL7_js.wa("div",{shouldForwardProp:e=>e!=="ghostItem"&&e!=="cursor"&&e!=="background"&&e!=="readOnly"})(({theme:e,ghostItem:r,cursor:a,background:l,readOnly:p})=>({...e.mixins.formComponent_AVPItem.deleteButton,cursor:a,display:p?"none":"inherit",height:"fit-content",":hover":{backgroundColor:l,svg:{path:{fill:r?e.palette.ux.secondary.w40:e.palette.ux.deprecated.primary.wMain}}},paddingBottom:e.spacing(.5),marginLeft:e.spacing(1)})),oe=chunk4XH33OL7_js.wa("div")(({theme:e})=>({paddingTop:"7px",color:e.palette.ux.secondary.text.wMain}));var U=({id:e,index:r,avpKey:a,avpValue:l,dataTags:p,ghostItem:s=false,onDelete:b,onChange:v,onKeyUp:C,onBlur:F,keyErrorText:M,valueErrorText:E,dropOverIndex:w,dropFromTop:T,readOnly:u,emptyFieldDisplayValue:S="",disableReorder:h=false})=>{let f=chunk4XH33OL7_js.ua();return jsxRuntime.jsx(dnd.Draggable,{draggableId:e,index:r,isDragDisabled:s||h,children:(x,c)=>jsxRuntime.jsxs(ce,{ref:x.innerRef,...x.draggableProps,isDragging:c.isDragging,dropOverIndex:w,dropFromTop:T,index:r,readOnly:!!u,disableReorder:h,children:[!h&&jsxRuntime.jsx(ge,{...x.dragHandleProps,isDragging:c.isDragging,ghostItem:s,readOnly:!!u,"data-qa":`avpMove-${r}`,children:jsxRuntime.jsx(te,{fill:s?f.palette.ux.secondary.w40:f.palette.ux.secondary.wMain,opacity:1})}),jsxRuntime.jsxs(me,{children:[!a&&l&&u&&jsxRuntime.jsx(oe,{"data-qa":`avpKey-${r}`,children:S}),(a||!a&&!u)&&jsxRuntime.jsx(chunkUFDVHFXE_js.d,{name:"key",dataQa:`avpKey-${r}`,dataTags:p,value:a,onChange:i=>v(i,r),onKeyUp:C,onBlur:i=>F(i,r),hasErrors:s?false:!!M,helperText:s?"":M,readOnly:u})]}),jsxRuntime.jsxs(de,{children:[a&&!l&&u&&jsxRuntime.jsx(oe,{"data-qa":`avpValue-${r}`,children:S}),(l||!l&&!u)&&jsxRuntime.jsx(chunkUFDVHFXE_js.d,{name:"value",dataQa:`avpValue-${r}`,dataTags:p,value:l,onChange:i=>v(i,r),onKeyUp:C,onBlur:i=>F(i,r),hasErrors:s?false:!!E,helperText:s?"":E,readOnly:u})]}),jsxRuntime.jsx(fe,{onClick:i=>b(i,r),tabIndex:0,ghostItem:s,cursor:s?"default":"pointer",background:s?"inherit":f.palette.ux.secondary.w10,readOnly:!!u,"data-qa":`avpDelete-${r}`,children:jsxRuntime.jsx(re,{fill:s?f.palette.ux.secondary.w40:f.palette.ux.secondary.wMain,opacity:1})})]})})};var Se=chunk4XH33OL7_js.wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPForm.container})),he=chunk4XH33OL7_js.wa("div")(({theme:e,readOnly:r,disableReorder:a,hasScrollBar:l})=>({...e.mixins.formComponent_AVPForm.labelWrapper,gridTemplateColumns:r?`0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px${l?" 16px":""}`:a?`0px 1fr 8px 1fr 32px${l?" 16px":""}`:`32px 1fr 8px 1fr 32px${l?" 16px":""}`})),ae=chunk4XH33OL7_js.wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPForm.listWrapper})),Ve=(e,r,a)=>{let l=Array.from(e),[p]=l.splice(r,1);return l.splice(a,0,p),l},ne=(e,r)=>e[r].key===""&&e[r].value==="";var Ie=(e,r,a)=>{e==="ArrowUp"&&r-1>0?a[r-2].select():e==="ArrowDown"&&r+2<a.length?a[r+2].select():e==="Enter"&&r+2<a.length&&(r%2===0?a[r+2].select():r%2===1&&a[r+1].select());},le=be__default.default.forwardRef((e,r)=>{let a=e.context?.headerRef,l=e.context?.virtualizedAvpListOption,p=e.style;return jsxRuntime.jsx(ae,{...e,ref:r,style:{...p,width:l?.height&&a.current?a.current.offsetWidth-16:"100%"}})});le.displayName="List";var Ae=({id:e,name:r,readOnly:a,labelForKeys:l="Name",labelForValues:p="DisplayName",avpList:s=[],onAVPListUpdate:b,avpKeyValidationCallback:v,avpValueValidationCallback:C,enableRequiredKeyFieldIndicator:F,enableRequiredValueFieldIndicator:M,emptyFieldDisplayValue:E="",keyRequired:w=true,keyIsRequiredMessage:T="Required",helperText:u="",hasErrors:S=false,hasWarnings:h=false,disableReorder:f=false,avpListMaxHeight:x,virtualizedAvpListOption:c})=>{let[i,V]=be.useState(s),[N,R]=be.useState(null),[_,B]=be.useState(null),D=be.useRef(null);be.useEffect(()=>{let n=[...s];n.push({key:"",value:""}),V(n);},[s]);let I=be.useCallback(n=>{V(n),b&&ne(n,n.length-1)&&b(n.slice(0,-1)),R(null),B(null);},[b]),ie=n=>{if(!n.destination||n.destination.index===n.source.index||n.destination.index===i.length-1)return;let t=Ve(i,n.source.index,n.destination.index);V(t),b&&ne(t,t.length-1)&&b(t.slice(0,-1)),R(null),B(null);},se=n=>{let t=n.source.index,o=n?.destination?.index??null,m=o,y=null;t!==null&&o!==null&&(t>o?y=false:t<o&&(y=true)),R(m),B(y);},J=be.useCallback((n,t)=>{let o=n.name,m=n.value,y=[...i];y[t][o]=m,o&&y.length-1===t&&y.push({key:"",value:""}),V(y),I(y);},[i,I]),L=be.useCallback(n=>n===i.length-1,[i.length]),X=be.useCallback((n,t)=>{if(n.type==="click"&&!L(t)&&i.length>1){let o=[...i];o.splice(t,1),V(o),I(o);}},[i,I,L]),Q=be.useCallback(n=>{let t=document.querySelectorAll("[data-tags='avpInput']"),o=document.activeElement;for(let m=0;m<t.length;m++)t[m].getAttribute("data-qa")===o?.getAttribute("data-qa")&&Ie(n.key,m,t);},[]),Y=be.useCallback((n,t)=>{let o=[...i];if(o[t].key=o[t].key.trim(),o[t].value=o[t].value.trim(),n.target.getAttribute("name")==="key"&&v){let m=v(n.target.value,o.slice(0,-1));m?o[t].keyErrorText=m:delete o[t].keyErrorText;}if(n.target.getAttribute("name")==="value"&&C){let m=C(n.target.value,o.slice(0,-1));m?o[t].valueErrorText=m:delete o[t].valueErrorText;}w&&!o[t].key?o[t].keyErrorText=T:o[t].keyErrorText===T&&delete o[t].keyErrorText,V(o),I(o);},[i,w,v,C,T,I]);return jsxRuntime.jsxs(dnd.DragDropContext,{onDragEnd:ie,onDragUpdate:se,children:[jsxRuntime.jsx(dnd.Droppable,{droppableId:e??r,isDropDisabled:!!f||!!a,children:n=>jsxRuntime.jsxs(Se,{ref:n.innerRef,...n.droppableProps,children:[jsxRuntime.jsxs(he,{ref:D,readOnly:!!a,disableReorder:!!f,hasScrollBar:!!x||!!c?.height,children:[jsxRuntime.jsx(chunkUFDVHFXE_js.a,{id:"avpLabelForKeys",required:F,children:l}),jsxRuntime.jsx(chunkUFDVHFXE_js.a,{id:"avpLabelForValues",required:M,children:p})]}),c&&D.current&&jsxRuntime.jsx(reactVirtuoso.Virtuoso,{context:{headerRef:D,virtualizedAvpListOption:c},style:{height:c.height?c.height:"auto",minHeight:c.minHeight?c.minHeight:40},useWindowScroll:c.useWindowScrolling,increaseViewportBy:c.increaseViewportBy,components:{List:le},initialTopMostItemIndex:c.initialTopMostItemIndex??0,data:i,itemContent:(t,o)=>jsxRuntime.jsx(U,{id:`${t}`,index:t,avpKey:o.key,avpValue:o.value,dataTags:"avpInput",onChange:J,onDelete:X,onKeyUp:Q,ghostItem:L(t),onBlur:Y,keyErrorText:o.keyErrorText,valueErrorText:o.valueErrorText,dropOverIndex:N,dropFromTop:_,readOnly:a,emptyFieldDisplayValue:E,disableReorder:f},`${t}`)}),!c&&D.current&&jsxRuntime.jsx("div",{style:x?{maxHeight:x,overflowY:"auto"}:void 0,children:jsxRuntime.jsx(ae,{style:{width:x?D.current.offsetWidth-16:"100%"},children:i.map((t,o)=>jsxRuntime.jsx(U,{id:`${o}`,index:o,avpKey:t.key,avpValue:t.value,dataTags:"avpInput",onChange:J,onDelete:X,onKeyUp:Q,ghostItem:L(o),onBlur:Y,keyErrorText:t.keyErrorText,valueErrorText:t.valueErrorText,dropOverIndex:N,dropFromTop:_,readOnly:a,emptyFieldDisplayValue:E,disableReorder:f},`${o}`))})}),n.placeholder]})}),u&&jsxRuntime.jsxs("div",{style:{paddingLeft:"16px"},children:[u&&!h&&!S&&jsxRuntime.jsx(chunk7SKICMGL_js.c,{children:u}),u&&!S&&h&&jsxRuntime.jsx(chunk7SKICMGL_js.g,{children:u}),u&&S&&jsxRuntime.jsx(chunk7SKICMGL_js.e,{children:u})]})]})},Ee=Ae;exports.SolaceAttributeValuePairForm=Ee;//# sourceMappingURL=drag-drop.js.map
|
|
1
|
+
'use strict';var chunkSXQRCXMP_js=require('./chunk-SXQRCXMP.js'),chunkSWGQVSXQ_js=require('./chunk-SWGQVSXQ.js');require('./chunk-YQTPPT5K.js');var chunkV45EFIXB_js=require('./chunk-V45EFIXB.js'),be=require('react'),dnd=require('@hello-pangea/dnd'),jsxRuntime=require('react/jsx-runtime'),reactVirtuoso=require('react-virtuoso');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var be__default=/*#__PURE__*/_interopDefault(be);var re=({fill:e,opacity:r})=>jsxRuntime.jsx(chunkV45EFIXB_js.Na,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("g",{transform:"translate(5,3)",children:jsxRuntime.jsx("path",{d:"M9.5 0H4.5L3.5 1H0.401C0.179 1 0 1.179 0 1.401V2.599C0 2.821 0.179 3 0.401 3H13.599C13.821 3 14 2.821 14 2.599V1.401C14 1.179 13.821 1 13.599 1H10.5L9.5 0ZM10.875 6L10.118 16H3.882L3.125 6H10.875ZM12.59 4H1.39C1.159 4 0.982 4.196 1 4.426L2 17.634C2.016 17.841 2.193 18 2.4 18H11.6C11.807 18 11.984 17.841 12 17.635L13 4.427C13.018 4.196 12.82 4 12.59 4Z",fill:e,opacity:r})})});var te=({fill:e,opacity:r})=>jsxRuntime.jsx(chunkV45EFIXB_js.Na,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("g",{transform:"translate(7,4)",children:jsxRuntime.jsx("path",{d:"M4 14C4 15.1 3.1 16 2 16C0.9 16 0 15.1 0 14C0 12.9 0.9 12 2 12C3.1 12 4 12.9 4 14ZM2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6ZM2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0ZM8 4C9.1 4 10 3.1 10 2C10 0.9 9.1 0 8 0C6.9 0 6 0.9 6 2C6 3.1 6.9 4 8 4ZM8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6ZM8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12Z",fill:e,fillOpacity:r})})});var pe=(e,r,a,l)=>{let p="";return r!==null&&a!==null&&(r&&a+1===l||!r&&a===l)&&(p=`1px solid ${e.palette.ux.accent.n2.wMain}`),p},ce=chunkV45EFIXB_js.wa("div",{shouldForwardProp:e=>e!=="isDragging"&&e!=="dropOverIndex"&&e!=="dropFromTop"&&e!=="readOnly"&&e!=="disableReorder"})(({theme:e,isDragging:r,dropOverIndex:a,index:l,dropFromTop:p,readOnly:s,disableReorder:b})=>({...e.mixins.formComponent_AVPItem.container,backgroundColor:r?e.palette.ux.brand.w10:"inherit",borderTop:pe(e,p,a,l),gridTemplateColumns:s?"0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px":b?"0px 1fr 8px 1fr 40px":"32px 1fr 8px 1fr 40px"})),me=chunkV45EFIXB_js.wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPItem.inputWrapperForKey})),de=chunkV45EFIXB_js.wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPItem.inputWrapperForValue})),ge=chunkV45EFIXB_js.wa("div",{shouldForwardProp:e=>e!=="ghostItem"&&e!=="isDragging"&&e!=="readOnly"})(({theme:e,ghostItem:r,isDragging:a,readOnly:l})=>({...e.mixins.formComponent_AVPItem.moveButton,cursor:r?"default":a?"move":"pointer",display:l?"none":"inherit"})),fe=chunkV45EFIXB_js.wa("div",{shouldForwardProp:e=>e!=="ghostItem"&&e!=="cursor"&&e!=="background"&&e!=="readOnly"})(({theme:e,ghostItem:r,cursor:a,background:l,readOnly:p})=>({...e.mixins.formComponent_AVPItem.deleteButton,cursor:a,display:p?"none":"inherit",height:"fit-content",":hover":{backgroundColor:l,svg:{path:{fill:r?e.palette.ux.secondary.w40:e.palette.ux.deprecated.primary.wMain}}},paddingBottom:e.spacing(.5),marginLeft:e.spacing(1)})),oe=chunkV45EFIXB_js.wa("div")(({theme:e})=>({paddingTop:"7px",color:e.palette.ux.secondary.text.wMain}));var U=({id:e,index:r,avpKey:a,avpValue:l,dataTags:p,ghostItem:s=false,onDelete:b,onChange:v,onKeyUp:C,onBlur:F,keyErrorText:M,valueErrorText:E,dropOverIndex:w,dropFromTop:T,readOnly:u,emptyFieldDisplayValue:S="",disableReorder:h=false})=>{let f=chunkV45EFIXB_js.ua();return jsxRuntime.jsx(dnd.Draggable,{draggableId:e,index:r,isDragDisabled:s||h,children:(x,c)=>jsxRuntime.jsxs(ce,{ref:x.innerRef,...x.draggableProps,isDragging:c.isDragging,dropOverIndex:w,dropFromTop:T,index:r,readOnly:!!u,disableReorder:h,children:[!h&&jsxRuntime.jsx(ge,{...x.dragHandleProps,isDragging:c.isDragging,ghostItem:s,readOnly:!!u,"data-qa":`avpMove-${r}`,children:jsxRuntime.jsx(te,{fill:s?f.palette.ux.secondary.w40:f.palette.ux.secondary.wMain,opacity:1})}),jsxRuntime.jsxs(me,{children:[!a&&l&&u&&jsxRuntime.jsx(oe,{"data-qa":`avpKey-${r}`,children:S}),(a||!a&&!u)&&jsxRuntime.jsx(chunkSXQRCXMP_js.d,{name:"key",dataQa:`avpKey-${r}`,dataTags:p,value:a,onChange:i=>v(i,r),onKeyUp:C,onBlur:i=>F(i,r),hasErrors:s?false:!!M,helperText:s?"":M,readOnly:u})]}),jsxRuntime.jsxs(de,{children:[a&&!l&&u&&jsxRuntime.jsx(oe,{"data-qa":`avpValue-${r}`,children:S}),(l||!l&&!u)&&jsxRuntime.jsx(chunkSXQRCXMP_js.d,{name:"value",dataQa:`avpValue-${r}`,dataTags:p,value:l,onChange:i=>v(i,r),onKeyUp:C,onBlur:i=>F(i,r),hasErrors:s?false:!!E,helperText:s?"":E,readOnly:u})]}),jsxRuntime.jsx(fe,{onClick:i=>b(i,r),tabIndex:0,ghostItem:s,cursor:s?"default":"pointer",background:s?"inherit":f.palette.ux.secondary.w10,readOnly:!!u,"data-qa":`avpDelete-${r}`,children:jsxRuntime.jsx(re,{fill:s?f.palette.ux.secondary.w40:f.palette.ux.secondary.wMain,opacity:1})})]})})};var Se=chunkV45EFIXB_js.wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPForm.container})),he=chunkV45EFIXB_js.wa("div")(({theme:e,readOnly:r,disableReorder:a,hasScrollBar:l})=>({...e.mixins.formComponent_AVPForm.labelWrapper,gridTemplateColumns:r?`0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px${l?" 16px":""}`:a?`0px 1fr 8px 1fr 32px${l?" 16px":""}`:`32px 1fr 8px 1fr 32px${l?" 16px":""}`})),ae=chunkV45EFIXB_js.wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPForm.listWrapper})),Ve=(e,r,a)=>{let l=Array.from(e),[p]=l.splice(r,1);return l.splice(a,0,p),l},ne=(e,r)=>e[r].key===""&&e[r].value==="";var Ie=(e,r,a)=>{e==="ArrowUp"&&r-1>0?a[r-2].select():e==="ArrowDown"&&r+2<a.length?a[r+2].select():e==="Enter"&&r+2<a.length&&(r%2===0?a[r+2].select():r%2===1&&a[r+1].select());},le=be__default.default.forwardRef((e,r)=>{let a=e.context?.headerRef,l=e.context?.virtualizedAvpListOption,p=e.style;return jsxRuntime.jsx(ae,{...e,ref:r,style:{...p,width:l?.height&&a.current?a.current.offsetWidth-16:"100%"}})});le.displayName="List";var Ae=({id:e,name:r,readOnly:a,labelForKeys:l="Name",labelForValues:p="DisplayName",avpList:s=[],onAVPListUpdate:b,avpKeyValidationCallback:v,avpValueValidationCallback:C,enableRequiredKeyFieldIndicator:F,enableRequiredValueFieldIndicator:M,emptyFieldDisplayValue:E="",keyRequired:w=true,keyIsRequiredMessage:T="Required",helperText:u="",hasErrors:S=false,hasWarnings:h=false,disableReorder:f=false,avpListMaxHeight:x,virtualizedAvpListOption:c})=>{let[i,V]=be.useState(s),[N,R]=be.useState(null),[_,B]=be.useState(null),D=be.useRef(null);be.useEffect(()=>{let n=[...s];n.push({key:"",value:""}),V(n);},[s]);let I=be.useCallback(n=>{V(n),b&&ne(n,n.length-1)&&b(n.slice(0,-1)),R(null),B(null);},[b]),ie=n=>{if(!n.destination||n.destination.index===n.source.index||n.destination.index===i.length-1)return;let t=Ve(i,n.source.index,n.destination.index);V(t),b&&ne(t,t.length-1)&&b(t.slice(0,-1)),R(null),B(null);},se=n=>{let t=n.source.index,o=n?.destination?.index??null,m=o,y=null;t!==null&&o!==null&&(t>o?y=false:t<o&&(y=true)),R(m),B(y);},J=be.useCallback((n,t)=>{let o=n.name,m=n.value,y=[...i];y[t][o]=m,o&&y.length-1===t&&y.push({key:"",value:""}),V(y),I(y);},[i,I]),L=be.useCallback(n=>n===i.length-1,[i.length]),X=be.useCallback((n,t)=>{if(n.type==="click"&&!L(t)&&i.length>1){let o=[...i];o.splice(t,1),V(o),I(o);}},[i,I,L]),Q=be.useCallback(n=>{let t=document.querySelectorAll("[data-tags='avpInput']"),o=document.activeElement;for(let m=0;m<t.length;m++)t[m].getAttribute("data-qa")===o?.getAttribute("data-qa")&&Ie(n.key,m,t);},[]),Y=be.useCallback((n,t)=>{let o=[...i];if(o[t].key=o[t].key.trim(),o[t].value=o[t].value.trim(),n.target.getAttribute("name")==="key"&&v){let m=v(n.target.value,o.slice(0,-1));m?o[t].keyErrorText=m:delete o[t].keyErrorText;}if(n.target.getAttribute("name")==="value"&&C){let m=C(n.target.value,o.slice(0,-1));m?o[t].valueErrorText=m:delete o[t].valueErrorText;}w&&!o[t].key?o[t].keyErrorText=T:o[t].keyErrorText===T&&delete o[t].keyErrorText,V(o),I(o);},[i,w,v,C,T,I]);return jsxRuntime.jsxs(dnd.DragDropContext,{onDragEnd:ie,onDragUpdate:se,children:[jsxRuntime.jsx(dnd.Droppable,{droppableId:e??r,isDropDisabled:!!f||!!a,children:n=>jsxRuntime.jsxs(Se,{ref:n.innerRef,...n.droppableProps,children:[jsxRuntime.jsxs(he,{ref:D,readOnly:!!a,disableReorder:!!f,hasScrollBar:!!x||!!c?.height,children:[jsxRuntime.jsx(chunkSXQRCXMP_js.a,{id:"avpLabelForKeys",required:F,children:l}),jsxRuntime.jsx(chunkSXQRCXMP_js.a,{id:"avpLabelForValues",required:M,children:p})]}),c&&D.current&&jsxRuntime.jsx(reactVirtuoso.Virtuoso,{context:{headerRef:D,virtualizedAvpListOption:c},style:{height:c.height?c.height:"auto",minHeight:c.minHeight?c.minHeight:40},useWindowScroll:c.useWindowScrolling,increaseViewportBy:c.increaseViewportBy,components:{List:le},initialTopMostItemIndex:c.initialTopMostItemIndex??0,data:i,itemContent:(t,o)=>jsxRuntime.jsx(U,{id:`${t}`,index:t,avpKey:o.key,avpValue:o.value,dataTags:"avpInput",onChange:J,onDelete:X,onKeyUp:Q,ghostItem:L(t),onBlur:Y,keyErrorText:o.keyErrorText,valueErrorText:o.valueErrorText,dropOverIndex:N,dropFromTop:_,readOnly:a,emptyFieldDisplayValue:E,disableReorder:f},`${t}`)}),!c&&D.current&&jsxRuntime.jsx("div",{style:x?{maxHeight:x,overflowY:"auto"}:void 0,children:jsxRuntime.jsx(ae,{style:{width:x?D.current.offsetWidth-16:"100%"},children:i.map((t,o)=>jsxRuntime.jsx(U,{id:`${o}`,index:o,avpKey:t.key,avpValue:t.value,dataTags:"avpInput",onChange:J,onDelete:X,onKeyUp:Q,ghostItem:L(o),onBlur:Y,keyErrorText:t.keyErrorText,valueErrorText:t.valueErrorText,dropOverIndex:N,dropFromTop:_,readOnly:a,emptyFieldDisplayValue:E,disableReorder:f},`${o}`))})}),n.placeholder]})}),u&&jsxRuntime.jsxs("div",{style:{paddingLeft:"16px"},children:[u&&!h&&!S&&jsxRuntime.jsx(chunkSWGQVSXQ_js.c,{children:u}),u&&!S&&h&&jsxRuntime.jsx(chunkSWGQVSXQ_js.g,{children:u}),u&&S&&jsxRuntime.jsx(chunkSWGQVSXQ_js.e,{children:u})]})]})},Ee=Ae;exports.SolaceAttributeValuePairForm=Ee;//# sourceMappingURL=drag-drop.js.map
|
|
2
2
|
//# sourceMappingURL=drag-drop.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a,d}from'./chunk-
|
|
1
|
+
import {a,d}from'./chunk-VYHLNTMX.modern.mjs';import {c,g,e}from'./chunk-54TEARQI.modern.mjs';import'./chunk-QKQRCYG4.modern.mjs';import {wa,ua,Na}from'./chunk-I7OJ5H4U.modern.mjs';import be,{useState,useRef,useEffect,useCallback}from'react';import {DragDropContext,Droppable,Draggable}from'@hello-pangea/dnd';import {jsx,jsxs}from'react/jsx-runtime';import {Virtuoso}from'react-virtuoso';var re=({fill:e,opacity:r})=>jsx(Na,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:jsx("g",{transform:"translate(5,3)",children:jsx("path",{d:"M9.5 0H4.5L3.5 1H0.401C0.179 1 0 1.179 0 1.401V2.599C0 2.821 0.179 3 0.401 3H13.599C13.821 3 14 2.821 14 2.599V1.401C14 1.179 13.821 1 13.599 1H10.5L9.5 0ZM10.875 6L10.118 16H3.882L3.125 6H10.875ZM12.59 4H1.39C1.159 4 0.982 4.196 1 4.426L2 17.634C2.016 17.841 2.193 18 2.4 18H11.6C11.807 18 11.984 17.841 12 17.635L13 4.427C13.018 4.196 12.82 4 12.59 4Z",fill:e,opacity:r})})});var te=({fill:e,opacity:r})=>jsx(Na,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:jsx("g",{transform:"translate(7,4)",children:jsx("path",{d:"M4 14C4 15.1 3.1 16 2 16C0.9 16 0 15.1 0 14C0 12.9 0.9 12 2 12C3.1 12 4 12.9 4 14ZM2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6ZM2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0ZM8 4C9.1 4 10 3.1 10 2C10 0.9 9.1 0 8 0C6.9 0 6 0.9 6 2C6 3.1 6.9 4 8 4ZM8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6ZM8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12Z",fill:e,fillOpacity:r})})});var pe=(e,r,a,l)=>{let p="";return r!==null&&a!==null&&(r&&a+1===l||!r&&a===l)&&(p=`1px solid ${e.palette.ux.accent.n2.wMain}`),p},ce=wa("div",{shouldForwardProp:e=>e!=="isDragging"&&e!=="dropOverIndex"&&e!=="dropFromTop"&&e!=="readOnly"&&e!=="disableReorder"})(({theme:e,isDragging:r,dropOverIndex:a,index:l,dropFromTop:p,readOnly:s,disableReorder:b})=>({...e.mixins.formComponent_AVPItem.container,backgroundColor:r?e.palette.ux.brand.w10:"inherit",borderTop:pe(e,p,a,l),gridTemplateColumns:s?"0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px":b?"0px 1fr 8px 1fr 40px":"32px 1fr 8px 1fr 40px"})),me=wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPItem.inputWrapperForKey})),de=wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPItem.inputWrapperForValue})),ge=wa("div",{shouldForwardProp:e=>e!=="ghostItem"&&e!=="isDragging"&&e!=="readOnly"})(({theme:e,ghostItem:r,isDragging:a,readOnly:l})=>({...e.mixins.formComponent_AVPItem.moveButton,cursor:r?"default":a?"move":"pointer",display:l?"none":"inherit"})),fe=wa("div",{shouldForwardProp:e=>e!=="ghostItem"&&e!=="cursor"&&e!=="background"&&e!=="readOnly"})(({theme:e,ghostItem:r,cursor:a,background:l,readOnly:p})=>({...e.mixins.formComponent_AVPItem.deleteButton,cursor:a,display:p?"none":"inherit",height:"fit-content",":hover":{backgroundColor:l,svg:{path:{fill:r?e.palette.ux.secondary.w40:e.palette.ux.deprecated.primary.wMain}}},paddingBottom:e.spacing(.5),marginLeft:e.spacing(1)})),oe=wa("div")(({theme:e})=>({paddingTop:"7px",color:e.palette.ux.secondary.text.wMain}));var U=({id:e,index:r,avpKey:a,avpValue:l,dataTags:p,ghostItem:s=false,onDelete:b,onChange:v,onKeyUp:C,onBlur:F,keyErrorText:M,valueErrorText:E,dropOverIndex:w,dropFromTop:T,readOnly:u,emptyFieldDisplayValue:S="",disableReorder:h=false})=>{let f=ua();return jsx(Draggable,{draggableId:e,index:r,isDragDisabled:s||h,children:(x,c)=>jsxs(ce,{ref:x.innerRef,...x.draggableProps,isDragging:c.isDragging,dropOverIndex:w,dropFromTop:T,index:r,readOnly:!!u,disableReorder:h,children:[!h&&jsx(ge,{...x.dragHandleProps,isDragging:c.isDragging,ghostItem:s,readOnly:!!u,"data-qa":`avpMove-${r}`,children:jsx(te,{fill:s?f.palette.ux.secondary.w40:f.palette.ux.secondary.wMain,opacity:1})}),jsxs(me,{children:[!a&&l&&u&&jsx(oe,{"data-qa":`avpKey-${r}`,children:S}),(a||!a&&!u)&&jsx(d,{name:"key",dataQa:`avpKey-${r}`,dataTags:p,value:a,onChange:i=>v(i,r),onKeyUp:C,onBlur:i=>F(i,r),hasErrors:s?false:!!M,helperText:s?"":M,readOnly:u})]}),jsxs(de,{children:[a&&!l&&u&&jsx(oe,{"data-qa":`avpValue-${r}`,children:S}),(l||!l&&!u)&&jsx(d,{name:"value",dataQa:`avpValue-${r}`,dataTags:p,value:l,onChange:i=>v(i,r),onKeyUp:C,onBlur:i=>F(i,r),hasErrors:s?false:!!E,helperText:s?"":E,readOnly:u})]}),jsx(fe,{onClick:i=>b(i,r),tabIndex:0,ghostItem:s,cursor:s?"default":"pointer",background:s?"inherit":f.palette.ux.secondary.w10,readOnly:!!u,"data-qa":`avpDelete-${r}`,children:jsx(re,{fill:s?f.palette.ux.secondary.w40:f.palette.ux.secondary.wMain,opacity:1})})]})})};var Se=wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPForm.container})),he=wa("div")(({theme:e,readOnly:r,disableReorder:a,hasScrollBar:l})=>({...e.mixins.formComponent_AVPForm.labelWrapper,gridTemplateColumns:r?`0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px${l?" 16px":""}`:a?`0px 1fr 8px 1fr 32px${l?" 16px":""}`:`32px 1fr 8px 1fr 32px${l?" 16px":""}`})),ae=wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPForm.listWrapper})),Ve=(e,r,a)=>{let l=Array.from(e),[p]=l.splice(r,1);return l.splice(a,0,p),l},ne=(e,r)=>e[r].key===""&&e[r].value==="";var Ie=(e,r,a)=>{e==="ArrowUp"&&r-1>0?a[r-2].select():e==="ArrowDown"&&r+2<a.length?a[r+2].select():e==="Enter"&&r+2<a.length&&(r%2===0?a[r+2].select():r%2===1&&a[r+1].select());},le=be.forwardRef((e,r)=>{let a=e.context?.headerRef,l=e.context?.virtualizedAvpListOption,p=e.style;return jsx(ae,{...e,ref:r,style:{...p,width:l?.height&&a.current?a.current.offsetWidth-16:"100%"}})});le.displayName="List";var Ae=({id:e$1,name:r,readOnly:a$1,labelForKeys:l="Name",labelForValues:p="DisplayName",avpList:s=[],onAVPListUpdate:b,avpKeyValidationCallback:v,avpValueValidationCallback:C,enableRequiredKeyFieldIndicator:F,enableRequiredValueFieldIndicator:M,emptyFieldDisplayValue:E="",keyRequired:w=true,keyIsRequiredMessage:T="Required",helperText:u="",hasErrors:S=false,hasWarnings:h=false,disableReorder:f=false,avpListMaxHeight:x,virtualizedAvpListOption:c$1})=>{let[i,V]=useState(s),[N,R]=useState(null),[_,B]=useState(null),D=useRef(null);useEffect(()=>{let n=[...s];n.push({key:"",value:""}),V(n);},[s]);let I=useCallback(n=>{V(n),b&&ne(n,n.length-1)&&b(n.slice(0,-1)),R(null),B(null);},[b]),ie=n=>{if(!n.destination||n.destination.index===n.source.index||n.destination.index===i.length-1)return;let t=Ve(i,n.source.index,n.destination.index);V(t),b&&ne(t,t.length-1)&&b(t.slice(0,-1)),R(null),B(null);},se=n=>{let t=n.source.index,o=n?.destination?.index??null,m=o,y=null;t!==null&&o!==null&&(t>o?y=false:t<o&&(y=true)),R(m),B(y);},J=useCallback((n,t)=>{let o=n.name,m=n.value,y=[...i];y[t][o]=m,o&&y.length-1===t&&y.push({key:"",value:""}),V(y),I(y);},[i,I]),L=useCallback(n=>n===i.length-1,[i.length]),X=useCallback((n,t)=>{if(n.type==="click"&&!L(t)&&i.length>1){let o=[...i];o.splice(t,1),V(o),I(o);}},[i,I,L]),Q=useCallback(n=>{let t=document.querySelectorAll("[data-tags='avpInput']"),o=document.activeElement;for(let m=0;m<t.length;m++)t[m].getAttribute("data-qa")===o?.getAttribute("data-qa")&&Ie(n.key,m,t);},[]),Y=useCallback((n,t)=>{let o=[...i];if(o[t].key=o[t].key.trim(),o[t].value=o[t].value.trim(),n.target.getAttribute("name")==="key"&&v){let m=v(n.target.value,o.slice(0,-1));m?o[t].keyErrorText=m:delete o[t].keyErrorText;}if(n.target.getAttribute("name")==="value"&&C){let m=C(n.target.value,o.slice(0,-1));m?o[t].valueErrorText=m:delete o[t].valueErrorText;}w&&!o[t].key?o[t].keyErrorText=T:o[t].keyErrorText===T&&delete o[t].keyErrorText,V(o),I(o);},[i,w,v,C,T,I]);return jsxs(DragDropContext,{onDragEnd:ie,onDragUpdate:se,children:[jsx(Droppable,{droppableId:e$1??r,isDropDisabled:!!f||!!a$1,children:n=>jsxs(Se,{ref:n.innerRef,...n.droppableProps,children:[jsxs(he,{ref:D,readOnly:!!a$1,disableReorder:!!f,hasScrollBar:!!x||!!c$1?.height,children:[jsx(a,{id:"avpLabelForKeys",required:F,children:l}),jsx(a,{id:"avpLabelForValues",required:M,children:p})]}),c$1&&D.current&&jsx(Virtuoso,{context:{headerRef:D,virtualizedAvpListOption:c$1},style:{height:c$1.height?c$1.height:"auto",minHeight:c$1.minHeight?c$1.minHeight:40},useWindowScroll:c$1.useWindowScrolling,increaseViewportBy:c$1.increaseViewportBy,components:{List:le},initialTopMostItemIndex:c$1.initialTopMostItemIndex??0,data:i,itemContent:(t,o)=>jsx(U,{id:`${t}`,index:t,avpKey:o.key,avpValue:o.value,dataTags:"avpInput",onChange:J,onDelete:X,onKeyUp:Q,ghostItem:L(t),onBlur:Y,keyErrorText:o.keyErrorText,valueErrorText:o.valueErrorText,dropOverIndex:N,dropFromTop:_,readOnly:a$1,emptyFieldDisplayValue:E,disableReorder:f},`${t}`)}),!c$1&&D.current&&jsx("div",{style:x?{maxHeight:x,overflowY:"auto"}:void 0,children:jsx(ae,{style:{width:x?D.current.offsetWidth-16:"100%"},children:i.map((t,o)=>jsx(U,{id:`${o}`,index:o,avpKey:t.key,avpValue:t.value,dataTags:"avpInput",onChange:J,onDelete:X,onKeyUp:Q,ghostItem:L(o),onBlur:Y,keyErrorText:t.keyErrorText,valueErrorText:t.valueErrorText,dropOverIndex:N,dropFromTop:_,readOnly:a$1,emptyFieldDisplayValue:E,disableReorder:f},`${o}`))})}),n.placeholder]})}),u&&jsxs("div",{style:{paddingLeft:"16px"},children:[u&&!h&&!S&&jsx(c,{children:u}),u&&!S&&h&&jsx(g,{children:u}),u&&S&&jsx(e,{children:u})]})]})},Ee=Ae;export{Ee as SolaceAttributeValuePairForm};//# sourceMappingURL=drag-drop.modern.mjs.map
|
|
2
2
|
//# sourceMappingURL=drag-drop.modern.mjs.map
|