solace-ui-components 18.0.4 → 18.0.8
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/README.md +1 -1
- package/dist/charts.d.mts +1 -1
- package/dist/charts.d.ts +1 -1
- package/dist/charts.js +1 -1
- package/dist/charts.modern.mjs +1 -1
- package/dist/{chunk-PYADJP2I.js → chunk-266AAHHO.js} +2 -2
- package/dist/{chunk-PYADJP2I.js.map → chunk-266AAHHO.js.map} +1 -1
- package/dist/chunk-AU2K45F2.js +4 -0
- package/dist/chunk-AU2K45F2.js.map +1 -0
- package/dist/{chunk-SWGQVSXQ.js → chunk-HHKIWPP5.js} +2 -2
- package/dist/{chunk-SWGQVSXQ.js.map → chunk-HHKIWPP5.js.map} +1 -1
- package/dist/chunk-IA5QZKDN.modern.mjs +2 -0
- package/dist/chunk-IA5QZKDN.modern.mjs.map +1 -0
- package/dist/chunk-IGOY34XU.js +2 -0
- package/dist/chunk-IGOY34XU.js.map +1 -0
- package/dist/{chunk-V45EFIXB.js → chunk-KALFXZNR.js} +84 -84
- package/dist/{chunk-V45EFIXB.js.map → chunk-KALFXZNR.js.map} +1 -1
- package/dist/{chunk-LGBO373S.modern.mjs → chunk-LWCJ2SGT.modern.mjs} +2 -2
- package/dist/{chunk-LGBO373S.modern.mjs.map → chunk-LWCJ2SGT.modern.mjs.map} +1 -1
- package/dist/chunk-N7ONHWWU.js +2 -0
- package/dist/{chunk-YQTPPT5K.js.map → chunk-N7ONHWWU.js.map} +1 -1
- package/dist/chunk-NANSEALM.modern.mjs +4 -0
- package/dist/chunk-NANSEALM.modern.mjs.map +1 -0
- package/dist/{chunk-I7OJ5H4U.modern.mjs → chunk-PWYVYHTJ.modern.mjs} +84 -84
- package/dist/{chunk-I7OJ5H4U.modern.mjs.map → chunk-PWYVYHTJ.modern.mjs.map} +1 -1
- package/dist/{chunk-54TEARQI.modern.mjs → chunk-Q6DR3MQK.modern.mjs} +2 -2
- package/dist/{chunk-54TEARQI.modern.mjs.map → chunk-Q6DR3MQK.modern.mjs.map} +1 -1
- package/dist/{chunk-QKQRCYG4.modern.mjs → chunk-X4JIJBMX.modern.mjs} +2 -2
- package/dist/{chunk-QKQRCYG4.modern.mjs.map → chunk-X4JIJBMX.modern.mjs.map} +1 -1
- package/dist/code-editor.d.mts +1 -1
- package/dist/code-editor.d.ts +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/code-editor.modern.mjs +1 -1
- package/dist/datepicker.d.mts +1 -1
- package/dist/datepicker.d.ts +1 -1
- package/dist/datepicker.js +1 -1
- package/dist/datepicker.modern.mjs +1 -1
- package/dist/drag-drop.d.mts +1 -1
- package/dist/drag-drop.d.ts +1 -1
- package/dist/drag-drop.js +1 -1
- package/dist/drag-drop.js.map +1 -1
- package/dist/drag-drop.modern.mjs +1 -1
- package/dist/drag-drop.modern.mjs.map +1 -1
- package/dist/index.d.mts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +52 -52
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +50 -50
- package/dist/index.modern.mjs.map +1 -1
- package/dist/json-schema-form.d.mts +1 -1
- package/dist/json-schema-form.d.ts +1 -1
- package/dist/json-schema-form.js +1 -1
- package/dist/json-schema-form.modern.mjs +1 -1
- package/dist/textDiff.d.mts +1 -1
- package/dist/textDiff.d.ts +1 -1
- package/dist/textDiff.js +2 -2
- package/dist/textDiff.modern.mjs +1 -1
- package/dist/{theme-BbmSlrwX.d.ts → theme-CrhIVJVV.d.mts} +9 -0
- package/dist/{theme-BbmSlrwX.d.mts → theme-CrhIVJVV.d.ts} +9 -0
- package/package.json +1 -1
- package/dist/chunk-HQH2WKJP.modern.mjs +0 -4
- package/dist/chunk-HQH2WKJP.modern.mjs.map +0 -1
- package/dist/chunk-SKQ7JGO5.js +0 -4
- package/dist/chunk-SKQ7JGO5.js.map +0 -1
- package/dist/chunk-SXQRCXMP.js +0 -2
- package/dist/chunk-SXQRCXMP.js.map +0 -1
- package/dist/chunk-VYHLNTMX.modern.mjs +0 -2
- package/dist/chunk-VYHLNTMX.modern.mjs.map +0 -1
- package/dist/chunk-YQTPPT5K.js +0 -2
package/dist/drag-drop.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resources/icons/DeleteIcon.tsx","../src/resources/icons/MoveIcon.tsx","../src/components/form/SolaceAttributeValuePair.tsx","../src/components/form/SolaceAttributeValuePairForm.tsx"],"names":["DeleteIcon","fill","opacity","jsx","SvgIcon_default","MoveIcon","displayDropLine","theme","dropFromTop","dropOverIndex","index","dropLine","SolaceAVPContainer","styled_default","prop","isDragging","readOnly","disableReorder","SolaceAVPInputForKey","SolaceAVPInputForValue","SolaceAVPMoveButton","ghostItem","SolaceAVPDeleteButton","cursor","background","ValueWrapper","SolaceAttributeValuePair","id","avpKey","avpValue","dataTags","onDelete","onChange","onKeyUp","onBlur","keyErrorText","valueErrorText","emptyFieldDisplayValue","useTheme","Draggable","provided","snapshot","jsxs","SolaceTextField_default","e","SolaceAVPFormContainer","SolaceAVPFormLabel","hasScrollBar","SolaceAVPListContainer","reorderList","list","startIndex","endIndex","result","removed","ghostItemAtIndex","handleNavigateAVPList","key","enumList","List","React","props","ref","headerRef","virtualizedAvpListOption","style","SolaceAttributeValuePairForm","name","labelForKeys","labelForValues","avpList","onAVPListUpdate","avpKeyValidationCallback","avpValueValidationCallback","enableRequiredKeyFieldIndicator","enableRequiredValueFieldIndicator","keyRequired","keyIsRequiredMessage","helperText","hasErrors","hasWarnings","avpListMaxHeight","currentAVPList","setCurrentAVPList","useState","setDropOverIndex","setDropFromTop","useRef","useEffect","handleListUpdate","useCallback","handleDragEnd","reorderedList","handleDragUpdate","update","sourceIndex","destinationIndex","handleInputChange","event","eventName","value","handleDeleteItem","handleKeyUp","inputEleList","focusedEle","i","handleInputOnBlur","error","DragDropContext","Droppable","SolaceLabel_default","Virtuoso","item","HelperText_default","WarningText_default","ErrorText_default","SolaceAttributeValuePairForm_default"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,CAAA,CACCsC,CAAAA,EACApC,gBAAC,KAAA,CAAA,CAAI,KAAA,CAAO,CAAE,WAAA,CAAa,MAAO,CAAA,CAChC,UAAAoC,CAAAA,EAAc,CAACE,CAAAA,EAAe,CAACD,CAAAA,EAAa5E,cAAAA,CAAC8G,mBAAA,CAAY,QAAA,CAAAnC,CAAAA,CAAW,CAAA,CACpEA,CAAAA,EAAc,CAACC,GAAaC,CAAAA,EAAe7E,cAAAA,CAAC+G,kBAAAA,CAAA,CAAa,QAAA,CAAApC,CAAAA,CAAW,EACpEA,CAAAA,EAAcC,CAAAA,EAAa5E,cAAAA,CAACgH,kBAAAA,CAAA,CAAW,QAAA,CAAArC,EAAW,CAAA,CAAA,CACpD,CAAA,CAAA,CAEF,CAEF,CAAA,CAEOsC,EAAAA,CAAQlD","file":"drag-drop.js","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SvgIcon } from \"@mui/material\";\n\nexport interface DeleteIconProps {\n\tfill?: string;\n\topacity?: number;\n}\n\nexport const DeleteIcon = ({ fill, opacity }: DeleteIconProps): JSX.Element => {\n\treturn (\n\t\t<SvgIcon width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n\t\t\t<g transform=\"translate(5,3)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill}\n\t\t\t\t\topacity={opacity}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t</SvgIcon>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SvgIcon } from \"@mui/material\";\n\nexport interface MoveIconProps {\n\tfill?: string;\n\topacity?: number;\n}\n\nexport const MoveIcon = ({ fill, opacity }: MoveIconProps): JSX.Element => {\n\treturn (\n\t\t<SvgIcon width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n\t\t\t<g transform=\"translate(7,4)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill}\n\t\t\t\t\tfillOpacity={opacity}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t</SvgIcon>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport SolaceTextField, { SolaceTextFieldChangeEvent } from \"./SolaceTextField\";\nimport { styled, Theme, useTheme } from \"@mui/material\";\nimport { Draggable } from \"@hello-pangea/dnd\";\nimport { DeleteIcon } from \"../../resources/icons/DeleteIcon\";\nimport { MoveIcon } from \"../../resources/icons/MoveIcon\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\ninterface SolaceAVPContainerProps {\n\tisDragging: boolean;\n\tdropOverIndex: number | null;\n\tdropFromTop: boolean | null;\n\tindex: number;\n\treadOnly: boolean;\n\tdisableReorder?: boolean;\n}\n\ninterface SolaceAVPMoveButtonProps {\n\tisDragging: boolean;\n\tghostItem: boolean;\n\treadOnly: boolean;\n}\ninterface SolaceAVPDeleteButtonProps {\n\tghostItem: boolean;\n\tcursor: string;\n\tbackground: string;\n\treadOnly: boolean;\n}\n\n// conditionally display a drop line as a visual indicator for droppable position\nconst displayDropLine = (\n\ttheme: Theme,\n\tdropFromTop: boolean | null,\n\tdropOverIndex: number | null,\n\tindex: number\n): string => {\n\tlet dropLine = \"\";\n\tif (\n\t\tdropFromTop !== null &&\n\t\tdropOverIndex !== null &&\n\t\t((dropFromTop && dropOverIndex + 1 === index) || (!dropFromTop && dropOverIndex === index))\n\t) {\n\t\tdropLine = `1px solid ${theme.palette.ux.accent.n2.wMain}`;\n\t}\n\treturn dropLine;\n};\n\nconst SolaceAVPContainer = styled(\"div\", {\n\tshouldForwardProp: (prop) =>\n\t\tprop !== \"isDragging\" &&\n\t\tprop !== \"dropOverIndex\" &&\n\t\tprop !== \"dropFromTop\" &&\n\t\tprop !== \"readOnly\" &&\n\t\tprop !== \"disableReorder\"\n})<SolaceAVPContainerProps>(({ theme, isDragging, dropOverIndex, index, dropFromTop, readOnly, disableReorder }) => ({\n\t...(theme.mixins.formComponent_AVPItem.container as CSSProperties),\n\tbackgroundColor: isDragging ? theme.palette.ux.brand.w10 : \"inherit\",\n\tborderTop: displayDropLine(theme, dropFromTop, dropOverIndex, index),\n\tgridTemplateColumns: readOnly\n\t\t? \"0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px\"\n\t\t: disableReorder\n\t\t ? \"0px 1fr 8px 1fr 40px\"\n\t\t : \"32px 1fr 8px 1fr 40px\"\n}));\nconst SolaceAVPInputForKey = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPItem.inputWrapperForKey as CSSProperties)\n}));\nconst SolaceAVPInputForValue = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPItem.inputWrapperForValue as CSSProperties)\n}));\n\nconst SolaceAVPMoveButton = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"ghostItem\" && prop !== \"isDragging\" && prop !== \"readOnly\"\n})<SolaceAVPMoveButtonProps>(({ theme, ghostItem, isDragging, readOnly }) => ({\n\t...(theme.mixins.formComponent_AVPItem.moveButton as CSSProperties),\n\tcursor: ghostItem ? \"default\" : isDragging ? \"move\" : \"pointer\",\n\tdisplay: readOnly ? \"none\" : \"inherit\"\n}));\n\nconst SolaceAVPDeleteButton = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"ghostItem\" && prop !== \"cursor\" && prop !== \"background\" && prop !== \"readOnly\"\n})<SolaceAVPDeleteButtonProps>(({ theme, ghostItem, cursor, background, readOnly }) => ({\n\t...(theme.mixins.formComponent_AVPItem.deleteButton as CSSProperties),\n\tcursor: cursor,\n\tdisplay: readOnly ? \"none\" : \"inherit\",\n\theight: \"fit-content\",\n\t\":hover\": {\n\t\tbackgroundColor: background,\n\t\tsvg: {\n\t\t\tpath: {\n\t\t\t\tfill: ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.deprecated.primary.wMain\n\t\t\t}\n\t\t}\n\t},\n\tpaddingBottom: theme.spacing(0.5),\n\tmarginLeft: theme.spacing(1)\n}));\n\nconst ValueWrapper = styled(\"div\")(({ theme }) => ({\n\tpaddingTop: \"7px\",\n\tcolor: theme.palette.ux.secondary.text.wMain\n}));\n\nexport enum valueInputTypes {\n\ttextfield = \"textfield\",\n\tselect = \"select\",\n\tautocomplete = \"autocomplete\"\n}\n\nexport interface SolaceAttributeValuePairProps {\n\t/**\n\t * unique id for each Attribute Value Pair (AVP) item\n\t */\n\tid: string;\n\t/**\n\t * index for each Attribute Value Pair (AVP) item in the list, used to updated the list in response to delete and onchange events\n\t */\n\tindex: number;\n\t/**\n\t * key for Attribute Value Pair (AVP)\n\t */\n\tavpKey: string;\n\t/**\n\t * value for Attribute Value Pair (AVP)\n\t */\n\tavpValue: string;\n\t/**\n\t *\n\t */\n\tdataTags: string;\n\t/**\n\t * TODO: implementation required\n\t * specifies the type of the value providing component: types can be input, select etc. component, default to SolaceTextField if no type provided\n\t */\n\ttype?: valueInputTypes;\n\t/**\n\t * specifies whether the Attribute Value Pair (AVP) component is rendered in ghost state\n\t */\n\tghostItem: boolean;\n\t/**\n\t * callback for delete action\n\t */\n\tonDelete: (event: React.MouseEvent<HTMLElement>, index: number) => void;\n\t/**\n\t * callback for input onchange event\n\t */\n\tonChange: (event: SolaceTextFieldChangeEvent, index: number) => void;\n\t/**\n\t * callback for keyup event\n\t */\n\tonKeyUp: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * callback for onblur event\n\t */\n\tonBlur: (event: React.FocusEvent<HTMLInputElement>, index: number) => void;\n\t/**\n\t * validation error on an AVP value input value\n\t */\n\tkeyErrorText?: string;\n\t/**\n\t * validation error on an AVP value input value\n\t */\n\tvalueErrorText?: string;\n\t/**\n\t * An optional string to be displayed when an AVP key or value is empty when set to read-only.\n\t */\n\temptyFieldDisplayValue?: string;\n\t/**\n\t * index of the element that is being dragged over with\n\t * the index is updated on dragging\n\t */\n\tdropOverIndex: number | null;\n\t/**\n\t * dropping over state with three possible values:\n\t * true: dropping from top to bottom\n\t * false: dropping from bottom to top\n\t * null: dropping back to the same position or outside of the droppable container\n\t */\n\tdropFromTop: boolean | null;\n\t/**\n\t * read only flag\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Boolean flag to disable re-ordering of items\n\t */\n\tdisableReorder?: boolean;\n}\n\nexport const SolaceAttributeValuePair = ({\n\tid,\n\tindex,\n\tavpKey,\n\tavpValue,\n\tdataTags,\n\tghostItem = false,\n\tonDelete,\n\tonChange,\n\tonKeyUp,\n\tonBlur,\n\tkeyErrorText,\n\tvalueErrorText,\n\tdropOverIndex,\n\tdropFromTop,\n\treadOnly,\n\temptyFieldDisplayValue = \"\",\n\tdisableReorder = false\n}: SolaceAttributeValuePairProps) => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<Draggable draggableId={id} index={index} isDragDisabled={ghostItem || disableReorder}>\n\t\t\t{\n\t\t\t\t// TODO: Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed\n\t\t\t\t// eslint-disable-next-line sonarjs/cognitive-complexity\n\t\t\t\t(provided, snapshot) => (\n\t\t\t\t\t<SolaceAVPContainer\n\t\t\t\t\t\tref={provided.innerRef}\n\t\t\t\t\t\t{...provided.draggableProps}\n\t\t\t\t\t\tisDragging={snapshot.isDragging}\n\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t>\n\t\t\t\t\t\t{!disableReorder && (\n\t\t\t\t\t\t\t<SolaceAVPMoveButton\n\t\t\t\t\t\t\t\t{...provided.dragHandleProps}\n\t\t\t\t\t\t\t\tisDragging={snapshot.isDragging}\n\t\t\t\t\t\t\t\tghostItem={ghostItem}\n\t\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\t\tdata-qa={`avpMove-${index}`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<MoveIcon\n\t\t\t\t\t\t\t\t\tfill={ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.secondary.wMain}\n\t\t\t\t\t\t\t\t\topacity={1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</SolaceAVPMoveButton>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<SolaceAVPInputForKey>\n\t\t\t\t\t\t\t{!avpKey && avpValue && readOnly && (\n\t\t\t\t\t\t\t\t<ValueWrapper data-qa={`avpKey-${index}`}>{emptyFieldDisplayValue}</ValueWrapper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{(avpKey || (!avpKey && !readOnly)) && (\n\t\t\t\t\t\t\t\t<SolaceTextField\n\t\t\t\t\t\t\t\t\tname=\"key\"\n\t\t\t\t\t\t\t\t\tdataQa={`avpKey-${index}`}\n\t\t\t\t\t\t\t\t\tdataTags={dataTags}\n\t\t\t\t\t\t\t\t\tvalue={avpKey}\n\t\t\t\t\t\t\t\t\tonChange={(e) => onChange(e, index)}\n\t\t\t\t\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\t\t\t\t\tonBlur={(e) => onBlur(e, index)}\n\t\t\t\t\t\t\t\t\thasErrors={ghostItem ? false : !!keyErrorText}\n\t\t\t\t\t\t\t\t\thelperText={ghostItem ? \"\" : keyErrorText}\n\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</SolaceAVPInputForKey>\n\n\t\t\t\t\t\t<SolaceAVPInputForValue>\n\t\t\t\t\t\t\t{avpKey && !avpValue && readOnly && (\n\t\t\t\t\t\t\t\t<ValueWrapper data-qa={`avpValue-${index}`}>{emptyFieldDisplayValue}</ValueWrapper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{(avpValue || (!avpValue && !readOnly)) && (\n\t\t\t\t\t\t\t\t<SolaceTextField\n\t\t\t\t\t\t\t\t\tname=\"value\"\n\t\t\t\t\t\t\t\t\tdataQa={`avpValue-${index}`}\n\t\t\t\t\t\t\t\t\tdataTags={dataTags}\n\t\t\t\t\t\t\t\t\tvalue={avpValue}\n\t\t\t\t\t\t\t\t\tonChange={(e) => onChange(e, index)}\n\t\t\t\t\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\t\t\t\t\tonBlur={(e) => onBlur(e, index)}\n\t\t\t\t\t\t\t\t\thasErrors={ghostItem ? false : !!valueErrorText}\n\t\t\t\t\t\t\t\t\thelperText={ghostItem ? \"\" : valueErrorText}\n\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</SolaceAVPInputForValue>\n\n\t\t\t\t\t\t<SolaceAVPDeleteButton\n\t\t\t\t\t\t\tonClick={(e) => onDelete(e, index)}\n\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\tghostItem={ghostItem}\n\t\t\t\t\t\t\tcursor={ghostItem ? \"default\" : \"pointer\"}\n\t\t\t\t\t\t\tbackground={ghostItem ? \"inherit\" : theme.palette.ux.secondary.w10}\n\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\tdata-qa={`avpDelete-${index}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<DeleteIcon\n\t\t\t\t\t\t\t\tfill={ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.secondary.wMain}\n\t\t\t\t\t\t\t\topacity={1}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</SolaceAVPDeleteButton>\n\t\t\t\t\t</SolaceAVPContainer>\n\t\t\t\t)\n\t\t\t}\n\t\t</Draggable>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useState, useCallback, useEffect, useRef } from \"react\";\nimport { styled } from \"@mui/material\";\nimport { DragDropContext, Droppable, OnDragEndResponder, OnDragUpdateResponder } from \"@hello-pangea/dnd\";\nimport SolaceLabel from \"./SolaceLabel\";\nimport { SolaceAttributeValuePair, valueInputTypes } from \"./SolaceAttributeValuePair\";\nimport HelperText from \"./HelperText\";\nimport ErrorText from \"./ErrorText\";\nimport WarningText from \"./WarningText\";\nimport { CSSProperties } from \"@mui/styled-engine\";\nimport { SolaceTextFieldChangeEvent } from \"./SolaceTextField\";\nimport { Virtuoso } from \"react-virtuoso\";\n\ninterface SolaceAVPFormLabelProps {\n\treadOnly: boolean;\n\tdisableReorder?: boolean;\n\thasScrollBar?: boolean;\n}\n\nexport interface VirtualizeAvpListOptions {\n\tminHeight?: number | string;\n\theight?: number | string;\n\tuseWindowScrolling?: boolean;\n\tincreaseViewportBy?:\n\t\t| number\n\t\t| {\n\t\t\t\ttop: number;\n\t\t\t\tbottom: number;\n\t\t };\n\tinitialTopMostItemIndex?: number;\n}\n\nexport interface AVPItem {\n\tid?: string;\n\tkey: string;\n\tvalue: string;\n\tkeyErrorText?: string;\n\tvalueErrorText?: string;\n}\n\nconst SolaceAVPFormContainer = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPForm.container as CSSProperties)\n}));\n\n// If hasScrollBar is true, the label wrapper will have an additional 16px padding to accommodate the scrollbar in the content area\nconst SolaceAVPFormLabel = styled(\"div\")<SolaceAVPFormLabelProps>(\n\t({ theme, readOnly, disableReorder, hasScrollBar }) => ({\n\t\t...(theme.mixins.formComponent_AVPForm.labelWrapper as CSSProperties),\n\t\tgridTemplateColumns: readOnly\n\t\t\t? `0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px${hasScrollBar ? \" 16px\" : \"\"}`\n\t\t\t: disableReorder\n\t\t\t ? `0px 1fr 8px 1fr 32px${hasScrollBar ? \" 16px\" : \"\"}`\n\t\t\t : `32px 1fr 8px 1fr 32px${hasScrollBar ? \" 16px\" : \"\"}`\n\t})\n);\nconst SolaceAVPListContainer = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPForm.listWrapper as CSSProperties)\n}));\n\nconst reorderList = (list: Array<AVPItem>, startIndex: number, endIndex: number): Array<AVPItem> => {\n\tconst result = Array.from(list);\n\tconst [removed] = result.splice(startIndex, 1);\n\tresult.splice(endIndex, 0, removed);\n\n\treturn result;\n};\n\nconst ghostItemAtIndex = (list: Array<AVPItem>, index: number) => {\n\treturn list[index][\"key\"] === \"\" && list[index][\"value\"] === \"\";\n};\n\nenum AVPNavigationKeys {\n\tDown = \"ArrowDown\",\n\tUp = \"ArrowUp\",\n\tNextLine = \"Enter\"\n}\n\n// the navigation logic assumes there are two columns per row for the enum list\nconst handleNavigateAVPList = (key: string, index: number, enumList: NodeListOf<Element>): void => {\n\tif (key === AVPNavigationKeys.Up && index - 1 > 0) {\n\t\t(enumList[index - 2] as HTMLInputElement).select();\n\t} else if (key === AVPNavigationKeys.Down && index + 2 < enumList.length) {\n\t\t(enumList[index + 2] as HTMLInputElement).select();\n\t} else if (key === AVPNavigationKeys.NextLine && index + 2 < enumList.length) {\n\t\tif (index % 2 === 0) {\n\t\t\t(enumList[index + 2] as HTMLInputElement).select();\n\t\t} else if (index % 2 === 1) {\n\t\t\t(enumList[index + 1] as HTMLInputElement).select();\n\t\t}\n\t}\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst List = React.forwardRef<HTMLDivElement>((props: any, ref) => {\n\tconst headerRef = props[\"context\"]?.headerRef;\n\tconst virtualizedAvpListOption = props[\"context\"]?.virtualizedAvpListOption;\n\tconst style = props[\"style\"];\n\n\treturn (\n\t\t<SolaceAVPListContainer\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t\tstyle={{\n\t\t\t\t...style,\n\t\t\t\twidth: virtualizedAvpListOption?.height && headerRef.current ? headerRef.current.offsetWidth - 16 : \"100%\"\n\t\t\t}}\n\t\t/>\n\t);\n});\n\nList.displayName = \"List\";\n\nexport interface SolaceAttributeValuePairFormProps {\n\t/**\n\t * Unique identifier, if `id` is not specified, `name` value will be used\n\t */\n\tid?: string;\n\t/**\n\t * Name attribute to assign to the AVP form\n\t */\n\tname: string;\n\t/**\n\t * read only flag\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * label for the key column\n\t */\n\tlabelForKeys?: string | JSX.Element;\n\t/**\n\t * label for the value column\n\t */\n\tlabelForValues?: string | JSX.Element;\n\t/**\n\t * TODO: implementation required\n\t * specifies the type of the value providing component: types can be input, select etc. component, default to SolaceTextField if no type provided\n\t */\n\ttype?: valueInputTypes;\n\t/**\n\t * initial AVP list of key/value pairs, it can be an empty array e.g.[]\n\t */\n\tavpList?: Array<AVPItem>;\n\t/**\n\t * callback function that returns the current AVP list\n\t */\n\tonAVPListUpdate?: (list: Array<AVPItem>) => void;\n\t/**\n\t * validate individual AVP values, the function is triggered onBlur event\n\t */\n\tavpKeyValidationCallback?: (input: string, values: Array<AVPItem>) => string;\n\t/**\n\t * validate individual AVP values, the function is triggered onBlur event\n\t */\n\tavpValueValidationCallback?: (input: string, values: Array<AVPItem>) => string;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not `input` for key field is mandatory\n\t */\n\tenableRequiredKeyFieldIndicator?: boolean;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not `input` for value field is mandatory\n\t */\n\tenableRequiredValueFieldIndicator?: boolean;\n\t/**\n\t * An optional string to be displayed when an AVP key or value is empty when set to read-only.\n\t */\n\temptyFieldDisplayValue?: string;\n\t/**\n\t *\n\t * This boolean allows user to toggle whether keys are mandatory or not (i.e. if set to false, you can have a value without an associated key)\n\t */\n\tkeyRequired?: boolean;\n\t/**\n\t * String message to display if an AVP value is specified without an associated key (unless allowedKeyToBeEmpty is true, then no validation check done)\n\t */\n\tkeyIsRequiredMessage?: string;\n\t/**\n\t * Content to display as supportive/explanitory text\n\t */\n\thelperText?: string | JSX.Element;\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 to disable re-ordering of items\n\t */\n\tdisableReorder?: boolean;\n\t/**\n\t * AVP values maximum height if virtualizedAvpListOption is not set\n\t */\n\tavpListMaxHeight?: string;\n\t/**\n\t * If option is set, only render part of a large data set to fill the viewport\n\t */\n\tvirtualizedAvpListOption?: VirtualizeAvpListOptions;\n}\n\nconst SolaceAttributeValuePairForm = ({\n\tid,\n\tname,\n\treadOnly,\n\tlabelForKeys = \"Name\",\n\tlabelForValues = \"DisplayName\",\n\tavpList = [],\n\tonAVPListUpdate,\n\tavpKeyValidationCallback,\n\tavpValueValidationCallback,\n\tenableRequiredKeyFieldIndicator,\n\tenableRequiredValueFieldIndicator,\n\temptyFieldDisplayValue = \"\",\n\tkeyRequired = true, // by default, key is considered mandatory for every AVP (i.e. you can have a key with no value, but you cannot have a value with no key)\n\tkeyIsRequiredMessage = \"Required\",\n\thelperText = \"\",\n\thasErrors = false,\n\thasWarnings = false,\n\tdisableReorder = false,\n\tavpListMaxHeight,\n\tvirtualizedAvpListOption\n}: SolaceAttributeValuePairFormProps): JSX.Element => {\n\tconst [currentAVPList, setCurrentAVPList] = useState(avpList);\n\tconst [dropOverIndex, setDropOverIndex] = useState<number | null>(null);\n\tconst [dropFromTop, setDropFromTop] = useState<boolean | null>(null);\n\tconst headerRef = useRef<HTMLDivElement>(null);\n\n\t// Add new entry on avp list update\n\tuseEffect(() => {\n\t\tconst list = [...avpList];\n\t\tlist.push({ key: \"\", value: \"\" });\n\t\tsetCurrentAVPList(list);\n\t}, [avpList]);\n\n\tconst handleListUpdate = useCallback(\n\t\t(list: Array<AVPItem>) => {\n\t\t\tsetCurrentAVPList(list);\n\t\t\tif (onAVPListUpdate && ghostItemAtIndex(list, list.length - 1)) onAVPListUpdate(list.slice(0, -1));\n\t\t\tsetDropOverIndex(null); // reset drop over index on drag end\n\t\t\tsetDropFromTop(null); // reset drop over direction on drag end\n\t\t},\n\t\t[onAVPListUpdate]\n\t);\n\n\t// All the things to do when a drag action ended\n\tconst handleDragEnd: OnDragEndResponder = (result) => {\n\t\t/**\n\t\t * No changes on the following conditions:\n\t\t * 1. Drag outside of the list\n\t\t * 2. Drag & Drop on the same item\n\t\t * 3. Drag & Drop on the last item e.g. ghost item\n\t\t */\n\t\tif (\n\t\t\t!result.destination ||\n\t\t\tresult.destination.index === result.source.index ||\n\t\t\tresult.destination.index === currentAVPList.length - 1\n\t\t)\n\t\t\treturn;\n\n\t\tconst reorderedList = reorderList(currentAVPList, result.source.index, result.destination.index);\n\n\t\tsetCurrentAVPList(reorderedList);\n\n\t\tif (onAVPListUpdate && ghostItemAtIndex(reorderedList, reorderedList.length - 1))\n\t\t\tonAVPListUpdate(reorderedList.slice(0, -1));\n\n\t\tsetDropOverIndex(null); // reset drop over index on drag end\n\t\tsetDropFromTop(null); // reset drop over direction on drag end\n\t};\n\n\t/**\n\t * update drop over index & direction on drag update\n\t * this allows to apply visual indicators to UI elements based on dragging behaviors\n\t */\n\tconst handleDragUpdate: OnDragUpdateResponder | undefined = (update) => {\n\t\tconst sourceIndex: number | null = update.source.index;\n\t\tconst destinationIndex: number | null = update?.destination?.index ?? null;\n\t\tconst dropOverIndex: number | null = destinationIndex;\n\t\tlet dropFromTop: boolean | null = null;\n\t\tif (sourceIndex !== null && destinationIndex !== null) {\n\t\t\tif (sourceIndex > destinationIndex) {\n\t\t\t\tdropFromTop = false;\n\t\t\t} else if (sourceIndex < destinationIndex) {\n\t\t\t\tdropFromTop = true;\n\t\t\t}\n\t\t}\n\t\tsetDropOverIndex(dropOverIndex);\n\t\tsetDropFromTop(dropFromTop);\n\t};\n\n\tconst handleInputChange = useCallback(\n\t\t(event: SolaceTextFieldChangeEvent, index: number) => {\n\t\t\tconst eventName: string = event.name;\n\t\t\tconst value: string = event.value;\n\n\t\t\tconst list = [...currentAVPList];\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t(list[index] as any)[eventName] = value;\n\n\t\t\t// add a new row at the end of the list upon input changes\n\t\t\tif (eventName && list.length - 1 === index) {\n\t\t\t\tlist.push({ key: \"\", value: \"\" });\n\t\t\t}\n\t\t\tsetCurrentAVPList(list);\n\t\t\thandleListUpdate(list);\n\t\t},\n\t\t[currentAVPList, handleListUpdate]\n\t);\n\n\t// determine whether an enum item is a ghost item\n\tconst ghostItem = useCallback(\n\t\t(index: number): boolean => index === currentAVPList.length - 1,\n\t\t[currentAVPList.length]\n\t);\n\n\tconst handleDeleteItem = useCallback(\n\t\t(event: React.MouseEvent<HTMLElement>, index: number) => {\n\t\t\tif (event.type === \"click\" && !ghostItem(index) && currentAVPList.length > 1) {\n\t\t\t\tconst list = [...currentAVPList];\n\t\t\t\tlist.splice(index, 1);\n\t\t\t\tsetCurrentAVPList(list);\n\t\t\t\thandleListUpdate(list);\n\t\t\t}\n\t\t},\n\t\t[currentAVPList, handleListUpdate, ghostItem]\n\t);\n\n\tconst handleKeyUp = useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n\t\tconst inputEleList = document.querySelectorAll(\"[data-tags='avpInput']\");\n\t\tconst focusedEle = document.activeElement;\n\n\t\tfor (let i = 0; i < inputEleList.length; i++) {\n\t\t\tif (inputEleList[i].getAttribute(\"data-qa\") === focusedEle?.getAttribute(\"data-qa\")) {\n\t\t\t\thandleNavigateAVPList(event.key, i, inputEleList);\n\t\t\t}\n\t\t}\n\t}, []);\n\n\tconst handleInputOnBlur = useCallback(\n\t\t(event: React.FocusEvent<HTMLInputElement>, index: number) => {\n\t\t\tconst list = [...currentAVPList];\n\n\t\t\tlist[index][\"key\"] = list[index][\"key\"].trim();\n\t\t\tlist[index][\"value\"] = list[index][\"value\"].trim();\n\n\t\t\t// Check if the key field is valid if key validation callback is provided\n\t\t\tif (event.target.getAttribute(\"name\") === \"key\" && avpKeyValidationCallback) {\n\t\t\t\tconst error = avpKeyValidationCallback(event.target.value, list.slice(0, -1));\n\n\t\t\t\tif (error) {\n\t\t\t\t\tlist[index][\"keyErrorText\"] = error;\n\t\t\t\t} else {\n\t\t\t\t\tdelete list[index][\"keyErrorText\"];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if the value field is valid if value callback is provided\n\t\t\tif (event.target.getAttribute(\"name\") === \"value\" && avpValueValidationCallback) {\n\t\t\t\tconst error = avpValueValidationCallback(event.target.value, list.slice(0, -1));\n\n\t\t\t\tif (error) {\n\t\t\t\t\tlist[index][\"valueErrorText\"] = error;\n\t\t\t\t} else {\n\t\t\t\t\tdelete list[index][\"valueErrorText\"];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if the key field is empty\n\t\t\tif (keyRequired && !list[index][\"key\"]) {\n\t\t\t\tlist[index][\"keyErrorText\"] = keyIsRequiredMessage;\n\t\t\t} else if (list[index][\"keyErrorText\"] === keyIsRequiredMessage) {\n\t\t\t\tdelete list[index][\"keyErrorText\"];\n\t\t\t}\n\n\t\t\tsetCurrentAVPList(list);\n\t\t\thandleListUpdate(list);\n\t\t},\n\t\t[\n\t\t\tcurrentAVPList,\n\t\t\tkeyRequired,\n\t\t\tavpKeyValidationCallback,\n\t\t\tavpValueValidationCallback,\n\t\t\tkeyIsRequiredMessage,\n\t\t\thandleListUpdate\n\t\t]\n\t);\n\n\treturn (\n\t\t<DragDropContext onDragEnd={handleDragEnd} onDragUpdate={handleDragUpdate}>\n\t\t\t<Droppable droppableId={id ?? name} isDropDisabled={!!disableReorder || !!readOnly}>\n\t\t\t\t{(provided) => (\n\t\t\t\t\t<SolaceAVPFormContainer ref={provided.innerRef} {...provided.droppableProps}>\n\t\t\t\t\t\t<SolaceAVPFormLabel\n\t\t\t\t\t\t\tref={headerRef}\n\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\tdisableReorder={!!disableReorder}\n\t\t\t\t\t\t\thasScrollBar={!!avpListMaxHeight || !!virtualizedAvpListOption?.height}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SolaceLabel id=\"avpLabelForKeys\" required={enableRequiredKeyFieldIndicator}>\n\t\t\t\t\t\t\t\t{labelForKeys}\n\t\t\t\t\t\t\t</SolaceLabel>\n\t\t\t\t\t\t\t<SolaceLabel id=\"avpLabelForValues\" required={enableRequiredValueFieldIndicator}>\n\t\t\t\t\t\t\t\t{labelForValues}\n\t\t\t\t\t\t\t</SolaceLabel>\n\t\t\t\t\t\t</SolaceAVPFormLabel>\n\t\t\t\t\t\t{virtualizedAvpListOption && headerRef.current && (\n\t\t\t\t\t\t\t<Virtuoso\n\t\t\t\t\t\t\t\tcontext={{ headerRef, virtualizedAvpListOption }}\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\theight: virtualizedAvpListOption.height ? virtualizedAvpListOption.height : \"auto\",\n\t\t\t\t\t\t\t\t\tminHeight: virtualizedAvpListOption.minHeight ? virtualizedAvpListOption.minHeight : 40\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tuseWindowScroll={virtualizedAvpListOption.useWindowScrolling}\n\t\t\t\t\t\t\t\tincreaseViewportBy={virtualizedAvpListOption.increaseViewportBy}\n\t\t\t\t\t\t\t\tcomponents={{ List }}\n\t\t\t\t\t\t\t\tinitialTopMostItemIndex={virtualizedAvpListOption.initialTopMostItemIndex ?? 0}\n\t\t\t\t\t\t\t\tdata={currentAVPList}\n\t\t\t\t\t\t\t\titemContent={(index, item) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<SolaceAttributeValuePair\n\t\t\t\t\t\t\t\t\t\t\tkey={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\tid={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\tavpKey={item.key}\n\t\t\t\t\t\t\t\t\t\t\tavpValue={item.value}\n\t\t\t\t\t\t\t\t\t\t\tdataTags=\"avpInput\"\n\t\t\t\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\t\t\t\tonDelete={handleDeleteItem}\n\t\t\t\t\t\t\t\t\t\t\tonKeyUp={handleKeyUp}\n\t\t\t\t\t\t\t\t\t\t\tghostItem={ghostItem(index)}\n\t\t\t\t\t\t\t\t\t\t\tonBlur={handleInputOnBlur}\n\t\t\t\t\t\t\t\t\t\t\tkeyErrorText={item.keyErrorText}\n\t\t\t\t\t\t\t\t\t\t\tvalueErrorText={item.valueErrorText}\n\t\t\t\t\t\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t\t\t\temptyFieldDisplayValue={emptyFieldDisplayValue}\n\t\t\t\t\t\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!virtualizedAvpListOption && headerRef.current && (\n\t\t\t\t\t\t\t<div style={avpListMaxHeight ? { maxHeight: avpListMaxHeight, overflowY: \"auto\" } : undefined}>\n\t\t\t\t\t\t\t\t<SolaceAVPListContainer\n\t\t\t\t\t\t\t\t\tstyle={{ width: avpListMaxHeight ? headerRef.current.offsetWidth - 16 : \"100%\" }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{currentAVPList.map((item, index) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<SolaceAttributeValuePair\n\t\t\t\t\t\t\t\t\t\t\t\tkey={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\tid={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\t\tavpKey={item.key}\n\t\t\t\t\t\t\t\t\t\t\t\tavpValue={item.value}\n\t\t\t\t\t\t\t\t\t\t\t\tdataTags=\"avpInput\"\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\t\t\t\t\tonDelete={handleDeleteItem}\n\t\t\t\t\t\t\t\t\t\t\t\tonKeyUp={handleKeyUp}\n\t\t\t\t\t\t\t\t\t\t\t\tghostItem={ghostItem(index)}\n\t\t\t\t\t\t\t\t\t\t\t\tonBlur={handleInputOnBlur}\n\t\t\t\t\t\t\t\t\t\t\t\tkeyErrorText={item.keyErrorText}\n\t\t\t\t\t\t\t\t\t\t\t\tvalueErrorText={item.valueErrorText}\n\t\t\t\t\t\t\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\t\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t\t\t\t\temptyFieldDisplayValue={emptyFieldDisplayValue}\n\t\t\t\t\t\t\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</SolaceAVPListContainer>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{provided.placeholder}\n\t\t\t\t\t</SolaceAVPFormContainer>\n\t\t\t\t)}\n\t\t\t</Droppable>\n\t\t\t{helperText && (\n\t\t\t\t<div style={{ paddingLeft: \"16px\" }}>\n\t\t\t\t\t{helperText && !hasWarnings && !hasErrors && <HelperText>{helperText}</HelperText>}\n\t\t\t\t\t{helperText && !hasErrors && hasWarnings && <WarningText>{helperText}</WarningText>}\n\t\t\t\t\t{helperText && hasErrors && <ErrorText>{helperText}</ErrorText>}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</DragDropContext>\n\t);\n};\n\nexport default SolaceAttributeValuePairForm;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/resources/icons/DeleteIcon.tsx","../src/resources/icons/MoveIcon.tsx","../src/components/form/SolaceAttributeValuePair.tsx","../src/components/form/SolaceAttributeValuePairForm.tsx"],"names":["DeleteIcon","fill","opacity","jsx","SvgIcon_default","MoveIcon","displayDropLine","theme","dropFromTop","dropOverIndex","index","dropLine","SolaceAVPContainer","styled_default","prop","isDragging","readOnly","disableReorder","SolaceAVPInputForKey","SolaceAVPInputForValue","SolaceAVPMoveButton","ghostItem","SolaceAVPDeleteButton","cursor","background","ValueWrapper","SolaceAttributeValuePair","id","avpKey","avpValue","dataTags","onDelete","onChange","onKeyUp","onBlur","keyErrorText","valueErrorText","emptyFieldDisplayValue","useTheme","Draggable","provided","snapshot","jsxs","SolaceTextField_default","e","SolaceAVPFormContainer","SolaceAVPFormLabel","hasScrollBar","SolaceAVPListContainer","reorderList","list","startIndex","endIndex","result","removed","ghostItemAtIndex","handleNavigateAVPList","key","enumList","List","React","props","ref","headerRef","virtualizedAvpListOption","style","SolaceAttributeValuePairForm","name","labelForKeys","labelForValues","avpList","onAVPListUpdate","avpKeyValidationCallback","avpValueValidationCallback","enableRequiredKeyFieldIndicator","enableRequiredValueFieldIndicator","keyRequired","keyIsRequiredMessage","helperText","hasErrors","hasWarnings","avpListMaxHeight","currentAVPList","setCurrentAVPList","useState","setDropOverIndex","setDropFromTop","useRef","useEffect","handleListUpdate","useCallback","handleDragEnd","reorderedList","handleDragUpdate","update","sourceIndex","destinationIndex","handleInputChange","event","eventName","value","handleDeleteItem","handleKeyUp","inputEleList","focusedEle","i","handleInputOnBlur","error","DragDropContext","Droppable","SolaceLabel_default","Virtuoso","item","HelperText_default","WarningText_default","ErrorText_default","SolaceAttributeValuePairForm_default"],"mappings":"2bAuBO,IAAMA,EAAAA,CAAa,CAAC,CAAE,IAAA,CAAAC,CAAAA,CAAM,OAAA,CAAAC,CAAQ,CAAA,GAEzCC,eAACC,mBAAAA,CAAA,CAAQ,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,IAAA,CAAK,QAAQ,WAAA,CAAY,IAAA,CAAK,MAAA,CACxD,QAAA,CAAAD,cAAAA,CAAC,GAAA,CAAA,CAAE,UAAU,gBAAA,CACZ,QAAA,CAAAA,cAAAA,CAAC,MAAA,CAAA,CACA,CAAA,CAAE,mWAAA,CACF,KAAMF,CAAAA,CACN,OAAA,CAASC,EACV,CAAA,CACD,CAAA,CACD,ECVK,IAAMG,EAAAA,CAAW,CAAC,CAAE,IAAA,CAAAJ,CAAAA,CAAM,OAAA,CAAAC,CAAQ,CAAA,GAEvCC,cAAAA,CAACC,oBAAA,CAAQ,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,IAAA,CAAK,OAAA,CAAQ,YAAY,IAAA,CAAK,MAAA,CACxD,QAAA,CAAAD,cAAAA,CAAC,GAAA,CAAA,CAAE,SAAA,CAAU,iBACZ,QAAA,CAAAA,cAAAA,CAAC,MAAA,CAAA,CACA,CAAA,CAAE,ycAAA,CACF,IAAA,CAAMF,EACN,WAAA,CAAaC,CAAAA,CACd,CAAA,CACD,CAAA,CACD,CAAA,CCaF,IAAMI,EAAAA,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ACuB,EAAA,CAEA,EAAA,CAAI,CAAA,EAAGhB,CAAK,CAAA,CAAA,CACZ,KAAA,CAAOA,EACP,MAAA,CAAQsG,CAAAA,CAAK,GAAA,CACb,QAAA,CAAUA,CAAAA,CAAK,KAAA,CACf,SAAS,UAAA,CACT,QAAA,CAAUf,CAAAA,CACV,QAAA,CAAUI,CAAAA,CACV,OAAA,CAASC,EACT,SAAA,CAAWjF,CAAAA,CAAUX,CAAK,CAAA,CAC1B,MAAA,CAAQgG,CAAAA,CACR,aAAcM,CAAAA,CAAK,YAAA,CACnB,cAAA,CAAgBA,CAAAA,CAAK,cAAA,CACrB,aAAA,CAAevG,EACf,WAAA,CAAaD,CAAAA,CACb,QAAA,CAAUQ,CAAAA,CACV,sBAAA,CAAwBqB,CAAAA,CACxB,eAAgBpB,CAAAA,CAAAA,CAjBX,CAAA,EAAGP,CAAK,CAAA,CAkBd,CAED,CAAA,CACF,EACD,CAAA,CAEA8B,CAAAA,CAAS,WAAA,CAAA,CACX,CAAA,CAEF,CAAA,CACCsC,CAAAA,EACApC,gBAAC,KAAA,CAAA,CAAI,KAAA,CAAO,CAAE,WAAA,CAAa,MAAO,CAAA,CAChC,UAAAoC,CAAAA,EAAc,CAACE,CAAAA,EAAe,CAACD,CAAAA,EAAa5E,cAAAA,CAAC8G,mBAAA,CAAY,QAAA,CAAAnC,CAAAA,CAAW,CAAA,CACpEA,CAAAA,EAAc,CAACC,GAAaC,CAAAA,EAAe7E,cAAAA,CAAC+G,kBAAAA,CAAA,CAAa,QAAA,CAAApC,CAAAA,CAAW,EACpEA,CAAAA,EAAcC,CAAAA,EAAa5E,cAAAA,CAACgH,kBAAAA,CAAA,CAAW,QAAA,CAAArC,EAAW,CAAA,CAAA,CACpD,CAAA,CAAA,CAEF,CAEF,CAAA,CAEOsC,EAAAA,CAAQlD","file":"drag-drop.js","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SvgIcon } from \"@mui/material\";\n\nexport interface DeleteIconProps {\n\tfill?: string;\n\topacity?: number;\n}\n\nexport const DeleteIcon = ({ fill, opacity }: DeleteIconProps): JSX.Element => {\n\treturn (\n\t\t<SvgIcon width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n\t\t\t<g transform=\"translate(5,3)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill}\n\t\t\t\t\topacity={opacity}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t</SvgIcon>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SvgIcon } from \"@mui/material\";\n\nexport interface MoveIconProps {\n\tfill?: string;\n\topacity?: number;\n}\n\nexport const MoveIcon = ({ fill, opacity }: MoveIconProps): JSX.Element => {\n\treturn (\n\t\t<SvgIcon width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n\t\t\t<g transform=\"translate(7,4)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill}\n\t\t\t\t\tfillOpacity={opacity}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t</SvgIcon>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport SolaceTextField, { SolaceTextFieldChangeEvent } from \"./SolaceTextField\";\nimport { styled, Theme, useTheme } from \"@mui/material\";\nimport { Draggable } from \"@hello-pangea/dnd\";\nimport { DeleteIcon } from \"../../resources/icons/DeleteIcon\";\nimport { MoveIcon } from \"../../resources/icons/MoveIcon\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\ninterface SolaceAVPContainerProps {\n\tisDragging: boolean;\n\tdropOverIndex: number | null;\n\tdropFromTop: boolean | null;\n\tindex: number;\n\treadOnly: boolean;\n\tdisableReorder?: boolean;\n}\n\ninterface SolaceAVPMoveButtonProps {\n\tisDragging: boolean;\n\tghostItem: boolean;\n\treadOnly: boolean;\n}\ninterface SolaceAVPDeleteButtonProps {\n\tghostItem: boolean;\n\tcursor: string;\n\tbackground: string;\n\treadOnly: boolean;\n}\n\n// conditionally display a drop line as a visual indicator for droppable position\nconst displayDropLine = (\n\ttheme: Theme,\n\tdropFromTop: boolean | null,\n\tdropOverIndex: number | null,\n\tindex: number\n): string => {\n\tlet dropLine = \"\";\n\tif (\n\t\tdropFromTop !== null &&\n\t\tdropOverIndex !== null &&\n\t\t((dropFromTop && dropOverIndex + 1 === index) || (!dropFromTop && dropOverIndex === index))\n\t) {\n\t\tdropLine = `1px solid ${theme.palette.ux.accent.n2.wMain}`;\n\t}\n\treturn dropLine;\n};\n\nconst SolaceAVPContainer = styled(\"div\", {\n\tshouldForwardProp: (prop) =>\n\t\tprop !== \"isDragging\" &&\n\t\tprop !== \"dropOverIndex\" &&\n\t\tprop !== \"dropFromTop\" &&\n\t\tprop !== \"readOnly\" &&\n\t\tprop !== \"disableReorder\"\n})<SolaceAVPContainerProps>(({ theme, isDragging, dropOverIndex, index, dropFromTop, readOnly, disableReorder }) => ({\n\t...(theme.mixins.formComponent_AVPItem.container as CSSProperties),\n\tbackgroundColor: isDragging ? theme.palette.ux.brand.w10 : \"inherit\",\n\tborderTop: displayDropLine(theme, dropFromTop, dropOverIndex, index),\n\tgridTemplateColumns: readOnly\n\t\t? \"0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px\"\n\t\t: disableReorder\n\t\t\t? \"0px 1fr 8px 1fr 40px\"\n\t\t\t: \"32px 1fr 8px 1fr 40px\"\n}));\nconst SolaceAVPInputForKey = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPItem.inputWrapperForKey as CSSProperties)\n}));\nconst SolaceAVPInputForValue = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPItem.inputWrapperForValue as CSSProperties)\n}));\n\nconst SolaceAVPMoveButton = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"ghostItem\" && prop !== \"isDragging\" && prop !== \"readOnly\"\n})<SolaceAVPMoveButtonProps>(({ theme, ghostItem, isDragging, readOnly }) => ({\n\t...(theme.mixins.formComponent_AVPItem.moveButton as CSSProperties),\n\tcursor: ghostItem ? \"default\" : isDragging ? \"move\" : \"pointer\",\n\tdisplay: readOnly ? \"none\" : \"inherit\"\n}));\n\nconst SolaceAVPDeleteButton = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"ghostItem\" && prop !== \"cursor\" && prop !== \"background\" && prop !== \"readOnly\"\n})<SolaceAVPDeleteButtonProps>(({ theme, ghostItem, cursor, background, readOnly }) => ({\n\t...(theme.mixins.formComponent_AVPItem.deleteButton as CSSProperties),\n\tcursor: cursor,\n\tdisplay: readOnly ? \"none\" : \"inherit\",\n\theight: \"fit-content\",\n\t\":hover\": {\n\t\tbackgroundColor: background,\n\t\tsvg: {\n\t\t\tpath: {\n\t\t\t\tfill: ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.deprecated.primary.wMain\n\t\t\t}\n\t\t}\n\t},\n\tpaddingBottom: theme.spacing(0.5),\n\tmarginLeft: theme.spacing(1)\n}));\n\nconst ValueWrapper = styled(\"div\")(({ theme }) => ({\n\tpaddingTop: \"7px\",\n\tcolor: theme.palette.ux.secondary.text.wMain\n}));\n\nexport enum valueInputTypes {\n\ttextfield = \"textfield\",\n\tselect = \"select\",\n\tautocomplete = \"autocomplete\"\n}\n\nexport interface SolaceAttributeValuePairProps {\n\t/**\n\t * unique id for each Attribute Value Pair (AVP) item\n\t */\n\tid: string;\n\t/**\n\t * index for each Attribute Value Pair (AVP) item in the list, used to updated the list in response to delete and onchange events\n\t */\n\tindex: number;\n\t/**\n\t * key for Attribute Value Pair (AVP)\n\t */\n\tavpKey: string;\n\t/**\n\t * value for Attribute Value Pair (AVP)\n\t */\n\tavpValue: string;\n\t/**\n\t *\n\t */\n\tdataTags: string;\n\t/**\n\t * TODO: implementation required\n\t * specifies the type of the value providing component: types can be input, select etc. component, default to SolaceTextField if no type provided\n\t */\n\ttype?: valueInputTypes;\n\t/**\n\t * specifies whether the Attribute Value Pair (AVP) component is rendered in ghost state\n\t */\n\tghostItem: boolean;\n\t/**\n\t * callback for delete action\n\t */\n\tonDelete: (event: React.MouseEvent<HTMLElement>, index: number) => void;\n\t/**\n\t * callback for input onchange event\n\t */\n\tonChange: (event: SolaceTextFieldChangeEvent, index: number) => void;\n\t/**\n\t * callback for keyup event\n\t */\n\tonKeyUp: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * callback for onblur event\n\t */\n\tonBlur: (event: React.FocusEvent<HTMLInputElement>, index: number) => void;\n\t/**\n\t * validation error on an AVP value input value\n\t */\n\tkeyErrorText?: string;\n\t/**\n\t * validation error on an AVP value input value\n\t */\n\tvalueErrorText?: string;\n\t/**\n\t * An optional string to be displayed when an AVP key or value is empty when set to read-only.\n\t */\n\temptyFieldDisplayValue?: string;\n\t/**\n\t * index of the element that is being dragged over with\n\t * the index is updated on dragging\n\t */\n\tdropOverIndex: number | null;\n\t/**\n\t * dropping over state with three possible values:\n\t * true: dropping from top to bottom\n\t * false: dropping from bottom to top\n\t * null: dropping back to the same position or outside of the droppable container\n\t */\n\tdropFromTop: boolean | null;\n\t/**\n\t * read only flag\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Boolean flag to disable re-ordering of items\n\t */\n\tdisableReorder?: boolean;\n}\n\nexport const SolaceAttributeValuePair = ({\n\tid,\n\tindex,\n\tavpKey,\n\tavpValue,\n\tdataTags,\n\tghostItem = false,\n\tonDelete,\n\tonChange,\n\tonKeyUp,\n\tonBlur,\n\tkeyErrorText,\n\tvalueErrorText,\n\tdropOverIndex,\n\tdropFromTop,\n\treadOnly,\n\temptyFieldDisplayValue = \"\",\n\tdisableReorder = false\n}: SolaceAttributeValuePairProps) => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<Draggable draggableId={id} index={index} isDragDisabled={ghostItem || disableReorder}>\n\t\t\t{\n\t\t\t\t// TODO: Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed\n\t\t\t\t// eslint-disable-next-line sonarjs/cognitive-complexity\n\t\t\t\t(provided, snapshot) => (\n\t\t\t\t\t<SolaceAVPContainer\n\t\t\t\t\t\tref={provided.innerRef}\n\t\t\t\t\t\t{...provided.draggableProps}\n\t\t\t\t\t\tisDragging={snapshot.isDragging}\n\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t>\n\t\t\t\t\t\t{!disableReorder && (\n\t\t\t\t\t\t\t<SolaceAVPMoveButton\n\t\t\t\t\t\t\t\t{...provided.dragHandleProps}\n\t\t\t\t\t\t\t\tisDragging={snapshot.isDragging}\n\t\t\t\t\t\t\t\tghostItem={ghostItem}\n\t\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\t\tdata-qa={`avpMove-${index}`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<MoveIcon\n\t\t\t\t\t\t\t\t\tfill={ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.secondary.wMain}\n\t\t\t\t\t\t\t\t\topacity={1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</SolaceAVPMoveButton>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<SolaceAVPInputForKey>\n\t\t\t\t\t\t\t{!avpKey && avpValue && readOnly && (\n\t\t\t\t\t\t\t\t<ValueWrapper data-qa={`avpKey-${index}`}>{emptyFieldDisplayValue}</ValueWrapper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{(avpKey || (!avpKey && !readOnly)) && (\n\t\t\t\t\t\t\t\t<SolaceTextField\n\t\t\t\t\t\t\t\t\tname=\"key\"\n\t\t\t\t\t\t\t\t\tdataQa={`avpKey-${index}`}\n\t\t\t\t\t\t\t\t\tdataTags={dataTags}\n\t\t\t\t\t\t\t\t\tvalue={avpKey}\n\t\t\t\t\t\t\t\t\tonChange={(e) => onChange(e, index)}\n\t\t\t\t\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\t\t\t\t\tonBlur={(e) => onBlur(e, index)}\n\t\t\t\t\t\t\t\t\thasErrors={ghostItem ? false : !!keyErrorText}\n\t\t\t\t\t\t\t\t\thelperText={ghostItem ? \"\" : keyErrorText}\n\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</SolaceAVPInputForKey>\n\n\t\t\t\t\t\t<SolaceAVPInputForValue>\n\t\t\t\t\t\t\t{avpKey && !avpValue && readOnly && (\n\t\t\t\t\t\t\t\t<ValueWrapper data-qa={`avpValue-${index}`}>{emptyFieldDisplayValue}</ValueWrapper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{(avpValue || (!avpValue && !readOnly)) && (\n\t\t\t\t\t\t\t\t<SolaceTextField\n\t\t\t\t\t\t\t\t\tname=\"value\"\n\t\t\t\t\t\t\t\t\tdataQa={`avpValue-${index}`}\n\t\t\t\t\t\t\t\t\tdataTags={dataTags}\n\t\t\t\t\t\t\t\t\tvalue={avpValue}\n\t\t\t\t\t\t\t\t\tonChange={(e) => onChange(e, index)}\n\t\t\t\t\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\t\t\t\t\tonBlur={(e) => onBlur(e, index)}\n\t\t\t\t\t\t\t\t\thasErrors={ghostItem ? false : !!valueErrorText}\n\t\t\t\t\t\t\t\t\thelperText={ghostItem ? \"\" : valueErrorText}\n\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</SolaceAVPInputForValue>\n\n\t\t\t\t\t\t<SolaceAVPDeleteButton\n\t\t\t\t\t\t\tonClick={(e) => onDelete(e, index)}\n\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t(e.currentTarget as HTMLElement).click();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\taria-label=\"Delete row\"\n\t\t\t\t\t\t\tghostItem={ghostItem}\n\t\t\t\t\t\t\tcursor={ghostItem ? \"default\" : \"pointer\"}\n\t\t\t\t\t\t\tbackground={ghostItem ? \"inherit\" : theme.palette.ux.secondary.w10}\n\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\tdata-qa={`avpDelete-${index}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<DeleteIcon\n\t\t\t\t\t\t\t\tfill={ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.secondary.wMain}\n\t\t\t\t\t\t\t\topacity={1}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</SolaceAVPDeleteButton>\n\t\t\t\t\t</SolaceAVPContainer>\n\t\t\t\t)\n\t\t\t}\n\t\t</Draggable>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useState, useCallback, useEffect, useRef } from \"react\";\nimport { styled } from \"@mui/material\";\nimport { DragDropContext, Droppable, OnDragEndResponder, OnDragUpdateResponder } from \"@hello-pangea/dnd\";\nimport SolaceLabel from \"./SolaceLabel\";\nimport { SolaceAttributeValuePair, valueInputTypes } from \"./SolaceAttributeValuePair\";\nimport HelperText from \"./HelperText\";\nimport ErrorText from \"./ErrorText\";\nimport WarningText from \"./WarningText\";\nimport { CSSProperties } from \"@mui/styled-engine\";\nimport { SolaceTextFieldChangeEvent } from \"./SolaceTextField\";\nimport { Virtuoso } from \"react-virtuoso\";\n\ninterface SolaceAVPFormLabelProps {\n\treadOnly: boolean;\n\tdisableReorder?: boolean;\n\thasScrollBar?: boolean;\n}\n\nexport interface VirtualizeAvpListOptions {\n\tminHeight?: number | string;\n\theight?: number | string;\n\tuseWindowScrolling?: boolean;\n\tincreaseViewportBy?:\n\t\t| number\n\t\t| {\n\t\t\t\ttop: number;\n\t\t\t\tbottom: number;\n\t\t };\n\tinitialTopMostItemIndex?: number;\n}\n\nexport interface AVPItem {\n\tid?: string;\n\tkey: string;\n\tvalue: string;\n\tkeyErrorText?: string;\n\tvalueErrorText?: string;\n}\n\nconst SolaceAVPFormContainer = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPForm.container as CSSProperties)\n}));\n\n// If hasScrollBar is true, the label wrapper will have an additional 16px padding to accommodate the scrollbar in the content area\nconst SolaceAVPFormLabel = styled(\"div\")<SolaceAVPFormLabelProps>(\n\t({ theme, readOnly, disableReorder, hasScrollBar }) => ({\n\t\t...(theme.mixins.formComponent_AVPForm.labelWrapper as CSSProperties),\n\t\tgridTemplateColumns: readOnly\n\t\t\t? `0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px${hasScrollBar ? \" 16px\" : \"\"}`\n\t\t\t: disableReorder\n\t\t\t ? `0px 1fr 8px 1fr 32px${hasScrollBar ? \" 16px\" : \"\"}`\n\t\t\t : `32px 1fr 8px 1fr 32px${hasScrollBar ? \" 16px\" : \"\"}`\n\t})\n);\nconst SolaceAVPListContainer = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPForm.listWrapper as CSSProperties)\n}));\n\nconst reorderList = (list: Array<AVPItem>, startIndex: number, endIndex: number): Array<AVPItem> => {\n\tconst result = Array.from(list);\n\tconst [removed] = result.splice(startIndex, 1);\n\tresult.splice(endIndex, 0, removed);\n\n\treturn result;\n};\n\nconst ghostItemAtIndex = (list: Array<AVPItem>, index: number) => {\n\treturn list[index][\"key\"] === \"\" && list[index][\"value\"] === \"\";\n};\n\nenum AVPNavigationKeys {\n\tDown = \"ArrowDown\",\n\tUp = \"ArrowUp\",\n\tNextLine = \"Enter\"\n}\n\n// the navigation logic assumes there are two columns per row for the enum list\nconst handleNavigateAVPList = (key: string, index: number, enumList: NodeListOf<Element>): void => {\n\tif (key === AVPNavigationKeys.Up && index - 1 > 0) {\n\t\t(enumList[index - 2] as HTMLInputElement).select();\n\t} else if (key === AVPNavigationKeys.Down && index + 2 < enumList.length) {\n\t\t(enumList[index + 2] as HTMLInputElement).select();\n\t} else if (key === AVPNavigationKeys.NextLine && index + 2 < enumList.length) {\n\t\tif (index % 2 === 0) {\n\t\t\t(enumList[index + 2] as HTMLInputElement).select();\n\t\t} else if (index % 2 === 1) {\n\t\t\t(enumList[index + 1] as HTMLInputElement).select();\n\t\t}\n\t}\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst List = React.forwardRef<HTMLDivElement>((props: any, ref) => {\n\tconst headerRef = props[\"context\"]?.headerRef;\n\tconst virtualizedAvpListOption = props[\"context\"]?.virtualizedAvpListOption;\n\tconst style = props[\"style\"];\n\n\treturn (\n\t\t<SolaceAVPListContainer\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t\tstyle={{\n\t\t\t\t...style,\n\t\t\t\twidth: virtualizedAvpListOption?.height && headerRef.current ? headerRef.current.offsetWidth - 16 : \"100%\"\n\t\t\t}}\n\t\t/>\n\t);\n});\n\nList.displayName = \"List\";\n\nexport interface SolaceAttributeValuePairFormProps {\n\t/**\n\t * Unique identifier, if `id` is not specified, `name` value will be used\n\t */\n\tid?: string;\n\t/**\n\t * Name attribute to assign to the AVP form\n\t */\n\tname: string;\n\t/**\n\t * read only flag\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * label for the key column\n\t */\n\tlabelForKeys?: string | JSX.Element;\n\t/**\n\t * label for the value column\n\t */\n\tlabelForValues?: string | JSX.Element;\n\t/**\n\t * TODO: implementation required\n\t * specifies the type of the value providing component: types can be input, select etc. component, default to SolaceTextField if no type provided\n\t */\n\ttype?: valueInputTypes;\n\t/**\n\t * initial AVP list of key/value pairs, it can be an empty array e.g.[]\n\t */\n\tavpList?: Array<AVPItem>;\n\t/**\n\t * callback function that returns the current AVP list\n\t */\n\tonAVPListUpdate?: (list: Array<AVPItem>) => void;\n\t/**\n\t * validate individual AVP values, the function is triggered onBlur event\n\t */\n\tavpKeyValidationCallback?: (input: string, values: Array<AVPItem>) => string;\n\t/**\n\t * validate individual AVP values, the function is triggered onBlur event\n\t */\n\tavpValueValidationCallback?: (input: string, values: Array<AVPItem>) => string;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not `input` for key field is mandatory\n\t */\n\tenableRequiredKeyFieldIndicator?: boolean;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not `input` for value field is mandatory\n\t */\n\tenableRequiredValueFieldIndicator?: boolean;\n\t/**\n\t * An optional string to be displayed when an AVP key or value is empty when set to read-only.\n\t */\n\temptyFieldDisplayValue?: string;\n\t/**\n\t *\n\t * This boolean allows user to toggle whether keys are mandatory or not (i.e. if set to false, you can have a value without an associated key)\n\t */\n\tkeyRequired?: boolean;\n\t/**\n\t * String message to display if an AVP value is specified without an associated key (unless allowedKeyToBeEmpty is true, then no validation check done)\n\t */\n\tkeyIsRequiredMessage?: string;\n\t/**\n\t * Content to display as supportive/explanitory text\n\t */\n\thelperText?: string | JSX.Element;\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 to disable re-ordering of items\n\t */\n\tdisableReorder?: boolean;\n\t/**\n\t * AVP values maximum height if virtualizedAvpListOption is not set\n\t */\n\tavpListMaxHeight?: string;\n\t/**\n\t * If option is set, only render part of a large data set to fill the viewport\n\t */\n\tvirtualizedAvpListOption?: VirtualizeAvpListOptions;\n}\n\nconst SolaceAttributeValuePairForm = ({\n\tid,\n\tname,\n\treadOnly,\n\tlabelForKeys = \"Name\",\n\tlabelForValues = \"DisplayName\",\n\tavpList = [],\n\tonAVPListUpdate,\n\tavpKeyValidationCallback,\n\tavpValueValidationCallback,\n\tenableRequiredKeyFieldIndicator,\n\tenableRequiredValueFieldIndicator,\n\temptyFieldDisplayValue = \"\",\n\tkeyRequired = true, // by default, key is considered mandatory for every AVP (i.e. you can have a key with no value, but you cannot have a value with no key)\n\tkeyIsRequiredMessage = \"Required\",\n\thelperText = \"\",\n\thasErrors = false,\n\thasWarnings = false,\n\tdisableReorder = false,\n\tavpListMaxHeight,\n\tvirtualizedAvpListOption\n}: SolaceAttributeValuePairFormProps): JSX.Element => {\n\tconst [currentAVPList, setCurrentAVPList] = useState(avpList);\n\tconst [dropOverIndex, setDropOverIndex] = useState<number | null>(null);\n\tconst [dropFromTop, setDropFromTop] = useState<boolean | null>(null);\n\tconst headerRef = useRef<HTMLDivElement>(null);\n\n\t// Add new entry on avp list update\n\tuseEffect(() => {\n\t\tconst list = [...avpList];\n\t\tlist.push({ key: \"\", value: \"\" });\n\t\tsetCurrentAVPList(list);\n\t}, [avpList]);\n\n\tconst handleListUpdate = useCallback(\n\t\t(list: Array<AVPItem>) => {\n\t\t\tsetCurrentAVPList(list);\n\t\t\tif (onAVPListUpdate && ghostItemAtIndex(list, list.length - 1)) onAVPListUpdate(list.slice(0, -1));\n\t\t\tsetDropOverIndex(null); // reset drop over index on drag end\n\t\t\tsetDropFromTop(null); // reset drop over direction on drag end\n\t\t},\n\t\t[onAVPListUpdate]\n\t);\n\n\t// All the things to do when a drag action ended\n\tconst handleDragEnd: OnDragEndResponder = (result) => {\n\t\t/**\n\t\t * No changes on the following conditions:\n\t\t * 1. Drag outside of the list\n\t\t * 2. Drag & Drop on the same item\n\t\t * 3. Drag & Drop on the last item e.g. ghost item\n\t\t */\n\t\tif (\n\t\t\t!result.destination ||\n\t\t\tresult.destination.index === result.source.index ||\n\t\t\tresult.destination.index === currentAVPList.length - 1\n\t\t)\n\t\t\treturn;\n\n\t\tconst reorderedList = reorderList(currentAVPList, result.source.index, result.destination.index);\n\n\t\tsetCurrentAVPList(reorderedList);\n\n\t\tif (onAVPListUpdate && ghostItemAtIndex(reorderedList, reorderedList.length - 1))\n\t\t\tonAVPListUpdate(reorderedList.slice(0, -1));\n\n\t\tsetDropOverIndex(null); // reset drop over index on drag end\n\t\tsetDropFromTop(null); // reset drop over direction on drag end\n\t};\n\n\t/**\n\t * update drop over index & direction on drag update\n\t * this allows to apply visual indicators to UI elements based on dragging behaviors\n\t */\n\tconst handleDragUpdate: OnDragUpdateResponder | undefined = (update) => {\n\t\tconst sourceIndex: number | null = update.source.index;\n\t\tconst destinationIndex: number | null = update?.destination?.index ?? null;\n\t\tconst dropOverIndex: number | null = destinationIndex;\n\t\tlet dropFromTop: boolean | null = null;\n\t\tif (sourceIndex !== null && destinationIndex !== null) {\n\t\t\tif (sourceIndex > destinationIndex) {\n\t\t\t\tdropFromTop = false;\n\t\t\t} else if (sourceIndex < destinationIndex) {\n\t\t\t\tdropFromTop = true;\n\t\t\t}\n\t\t}\n\t\tsetDropOverIndex(dropOverIndex);\n\t\tsetDropFromTop(dropFromTop);\n\t};\n\n\tconst handleInputChange = useCallback(\n\t\t(event: SolaceTextFieldChangeEvent, index: number) => {\n\t\t\tconst eventName: string = event.name;\n\t\t\tconst value: string = event.value;\n\n\t\t\tconst list = [...currentAVPList];\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t(list[index] as any)[eventName] = value;\n\n\t\t\t// add a new row at the end of the list upon input changes\n\t\t\tif (eventName && list.length - 1 === index) {\n\t\t\t\tlist.push({ key: \"\", value: \"\" });\n\t\t\t}\n\t\t\tsetCurrentAVPList(list);\n\t\t\thandleListUpdate(list);\n\t\t},\n\t\t[currentAVPList, handleListUpdate]\n\t);\n\n\t// determine whether an enum item is a ghost item\n\tconst ghostItem = useCallback(\n\t\t(index: number): boolean => index === currentAVPList.length - 1,\n\t\t[currentAVPList.length]\n\t);\n\n\tconst handleDeleteItem = useCallback(\n\t\t(event: React.MouseEvent<HTMLElement>, index: number) => {\n\t\t\tif (event.type === \"click\" && !ghostItem(index) && currentAVPList.length > 1) {\n\t\t\t\tconst list = [...currentAVPList];\n\t\t\t\tlist.splice(index, 1);\n\t\t\t\tsetCurrentAVPList(list);\n\t\t\t\thandleListUpdate(list);\n\t\t\t}\n\t\t},\n\t\t[currentAVPList, handleListUpdate, ghostItem]\n\t);\n\n\tconst handleKeyUp = useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n\t\tconst inputEleList = document.querySelectorAll(\"[data-tags='avpInput']\");\n\t\tconst focusedEle = document.activeElement;\n\n\t\tfor (let i = 0; i < inputEleList.length; i++) {\n\t\t\tif (inputEleList[i].getAttribute(\"data-qa\") === focusedEle?.getAttribute(\"data-qa\")) {\n\t\t\t\thandleNavigateAVPList(event.key, i, inputEleList);\n\t\t\t}\n\t\t}\n\t}, []);\n\n\tconst handleInputOnBlur = useCallback(\n\t\t(event: React.FocusEvent<HTMLInputElement>, index: number) => {\n\t\t\tconst list = [...currentAVPList];\n\n\t\t\tlist[index][\"key\"] = list[index][\"key\"].trim();\n\t\t\tlist[index][\"value\"] = list[index][\"value\"].trim();\n\n\t\t\t// Check if the key field is valid if key validation callback is provided\n\t\t\tif (event.target.getAttribute(\"name\") === \"key\" && avpKeyValidationCallback) {\n\t\t\t\tconst error = avpKeyValidationCallback(event.target.value, list.slice(0, -1));\n\n\t\t\t\tif (error) {\n\t\t\t\t\tlist[index][\"keyErrorText\"] = error;\n\t\t\t\t} else {\n\t\t\t\t\tdelete list[index][\"keyErrorText\"];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if the value field is valid if value callback is provided\n\t\t\tif (event.target.getAttribute(\"name\") === \"value\" && avpValueValidationCallback) {\n\t\t\t\tconst error = avpValueValidationCallback(event.target.value, list.slice(0, -1));\n\n\t\t\t\tif (error) {\n\t\t\t\t\tlist[index][\"valueErrorText\"] = error;\n\t\t\t\t} else {\n\t\t\t\t\tdelete list[index][\"valueErrorText\"];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if the key field is empty\n\t\t\tif (keyRequired && !list[index][\"key\"]) {\n\t\t\t\tlist[index][\"keyErrorText\"] = keyIsRequiredMessage;\n\t\t\t} else if (list[index][\"keyErrorText\"] === keyIsRequiredMessage) {\n\t\t\t\tdelete list[index][\"keyErrorText\"];\n\t\t\t}\n\n\t\t\tsetCurrentAVPList(list);\n\t\t\thandleListUpdate(list);\n\t\t},\n\t\t[\n\t\t\tcurrentAVPList,\n\t\t\tkeyRequired,\n\t\t\tavpKeyValidationCallback,\n\t\t\tavpValueValidationCallback,\n\t\t\tkeyIsRequiredMessage,\n\t\t\thandleListUpdate\n\t\t]\n\t);\n\n\treturn (\n\t\t<DragDropContext onDragEnd={handleDragEnd} onDragUpdate={handleDragUpdate}>\n\t\t\t<Droppable droppableId={id ?? name} isDropDisabled={!!disableReorder || !!readOnly}>\n\t\t\t\t{(provided) => (\n\t\t\t\t\t<SolaceAVPFormContainer ref={provided.innerRef} {...provided.droppableProps}>\n\t\t\t\t\t\t<SolaceAVPFormLabel\n\t\t\t\t\t\t\tref={headerRef}\n\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\tdisableReorder={!!disableReorder}\n\t\t\t\t\t\t\thasScrollBar={!!avpListMaxHeight || !!virtualizedAvpListOption?.height}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SolaceLabel id=\"avpLabelForKeys\" required={enableRequiredKeyFieldIndicator}>\n\t\t\t\t\t\t\t\t{labelForKeys}\n\t\t\t\t\t\t\t</SolaceLabel>\n\t\t\t\t\t\t\t<SolaceLabel id=\"avpLabelForValues\" required={enableRequiredValueFieldIndicator}>\n\t\t\t\t\t\t\t\t{labelForValues}\n\t\t\t\t\t\t\t</SolaceLabel>\n\t\t\t\t\t\t</SolaceAVPFormLabel>\n\t\t\t\t\t\t{virtualizedAvpListOption && headerRef.current && (\n\t\t\t\t\t\t\t<Virtuoso\n\t\t\t\t\t\t\t\tcontext={{ headerRef, virtualizedAvpListOption }}\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\theight: virtualizedAvpListOption.height ? virtualizedAvpListOption.height : \"auto\",\n\t\t\t\t\t\t\t\t\tminHeight: virtualizedAvpListOption.minHeight ? virtualizedAvpListOption.minHeight : 40\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tuseWindowScroll={virtualizedAvpListOption.useWindowScrolling}\n\t\t\t\t\t\t\t\tincreaseViewportBy={virtualizedAvpListOption.increaseViewportBy}\n\t\t\t\t\t\t\t\tcomponents={{ List }}\n\t\t\t\t\t\t\t\tinitialTopMostItemIndex={virtualizedAvpListOption.initialTopMostItemIndex ?? 0}\n\t\t\t\t\t\t\t\tdata={currentAVPList}\n\t\t\t\t\t\t\t\titemContent={(index, item) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<SolaceAttributeValuePair\n\t\t\t\t\t\t\t\t\t\t\tkey={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\tid={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\tavpKey={item.key}\n\t\t\t\t\t\t\t\t\t\t\tavpValue={item.value}\n\t\t\t\t\t\t\t\t\t\t\tdataTags=\"avpInput\"\n\t\t\t\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\t\t\t\tonDelete={handleDeleteItem}\n\t\t\t\t\t\t\t\t\t\t\tonKeyUp={handleKeyUp}\n\t\t\t\t\t\t\t\t\t\t\tghostItem={ghostItem(index)}\n\t\t\t\t\t\t\t\t\t\t\tonBlur={handleInputOnBlur}\n\t\t\t\t\t\t\t\t\t\t\tkeyErrorText={item.keyErrorText}\n\t\t\t\t\t\t\t\t\t\t\tvalueErrorText={item.valueErrorText}\n\t\t\t\t\t\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t\t\t\temptyFieldDisplayValue={emptyFieldDisplayValue}\n\t\t\t\t\t\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!virtualizedAvpListOption && headerRef.current && (\n\t\t\t\t\t\t\t<div style={avpListMaxHeight ? { maxHeight: avpListMaxHeight, overflowY: \"auto\" } : undefined}>\n\t\t\t\t\t\t\t\t<SolaceAVPListContainer\n\t\t\t\t\t\t\t\t\tstyle={{ width: avpListMaxHeight ? headerRef.current.offsetWidth - 16 : \"100%\" }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{currentAVPList.map((item, index) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<SolaceAttributeValuePair\n\t\t\t\t\t\t\t\t\t\t\t\tkey={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\tid={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\t\tavpKey={item.key}\n\t\t\t\t\t\t\t\t\t\t\t\tavpValue={item.value}\n\t\t\t\t\t\t\t\t\t\t\t\tdataTags=\"avpInput\"\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\t\t\t\t\tonDelete={handleDeleteItem}\n\t\t\t\t\t\t\t\t\t\t\t\tonKeyUp={handleKeyUp}\n\t\t\t\t\t\t\t\t\t\t\t\tghostItem={ghostItem(index)}\n\t\t\t\t\t\t\t\t\t\t\t\tonBlur={handleInputOnBlur}\n\t\t\t\t\t\t\t\t\t\t\t\tkeyErrorText={item.keyErrorText}\n\t\t\t\t\t\t\t\t\t\t\t\tvalueErrorText={item.valueErrorText}\n\t\t\t\t\t\t\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\t\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t\t\t\t\temptyFieldDisplayValue={emptyFieldDisplayValue}\n\t\t\t\t\t\t\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</SolaceAVPListContainer>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{provided.placeholder}\n\t\t\t\t\t</SolaceAVPFormContainer>\n\t\t\t\t)}\n\t\t\t</Droppable>\n\t\t\t{helperText && (\n\t\t\t\t<div style={{ paddingLeft: \"16px\" }}>\n\t\t\t\t\t{helperText && !hasWarnings && !hasErrors && <HelperText>{helperText}</HelperText>}\n\t\t\t\t\t{helperText && !hasErrors && hasWarnings && <WarningText>{helperText}</WarningText>}\n\t\t\t\t\t{helperText && hasErrors && <ErrorText>{helperText}</ErrorText>}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</DragDropContext>\n\t);\n};\n\nexport default SolaceAttributeValuePairForm;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a,d}from'./chunk-
|
|
1
|
+
import {a,d}from'./chunk-IA5QZKDN.modern.mjs';import {c,g,e}from'./chunk-Q6DR3MQK.modern.mjs';import'./chunk-X4JIJBMX.modern.mjs';import {wa,ua,Na}from'./chunk-PWYVYHTJ.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,i)=>{let p="";return r!==null&&a!==null&&(r&&a+1===i||!r&&a===i)&&(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:i,dropFromTop:p,readOnly:s,disableReorder:b})=>({...e.mixins.formComponent_AVPItem.container,backgroundColor:r?e.palette.ux.brand.w10:"inherit",borderTop:pe(e,p,a,i),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:i})=>({...e.mixins.formComponent_AVPItem.moveButton,cursor:r?"default":a?"move":"pointer",display:i?"none":"inherit"})),fe=wa("div",{shouldForwardProp:e=>e!=="ghostItem"&&e!=="cursor"&&e!=="background"&&e!=="readOnly"})(({theme:e,ghostItem:r,cursor:a,background:i,readOnly:p})=>({...e.mixins.formComponent_AVPItem.deleteButton,cursor:a,display:p?"none":"inherit",height:"fit-content",":hover":{backgroundColor:i,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:i,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&&i&&u&&jsx(oe,{"data-qa":`avpKey-${r}`,children:S}),(a||!a&&!u)&&jsx(d,{name:"key",dataQa:`avpKey-${r}`,dataTags:p,value:a,onChange:l=>v(l,r),onKeyUp:C,onBlur:l=>F(l,r),hasErrors:s?false:!!M,helperText:s?"":M,readOnly:u})]}),jsxs(de,{children:[a&&!i&&u&&jsx(oe,{"data-qa":`avpValue-${r}`,children:S}),(i||!i&&!u)&&jsx(d,{name:"value",dataQa:`avpValue-${r}`,dataTags:p,value:i,onChange:l=>v(l,r),onKeyUp:C,onBlur:l=>F(l,r),hasErrors:s?false:!!E,helperText:s?"":E,readOnly:u})]}),jsx(fe,{onClick:l=>b(l,r),onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),l.currentTarget.click());},tabIndex:0,role:"button","aria-label":"Delete row",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:i})=>({...e.mixins.formComponent_AVPForm.labelWrapper,gridTemplateColumns:r?`0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px${i?" 16px":""}`:a?`0px 1fr 8px 1fr 32px${i?" 16px":""}`:`32px 1fr 8px 1fr 32px${i?" 16px":""}`})),ae=wa("div")(({theme:e})=>({...e.mixins.formComponent_AVPForm.listWrapper})),Ve=(e,r,a)=>{let i=Array.from(e),[p]=i.splice(r,1);return i.splice(a,0,p),i},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,i=e.context?.virtualizedAvpListOption,p=e.style;return jsx(ae,{...e,ref:r,style:{...p,width:i?.height&&a.current?a.current.offsetWidth-16:"100%"}})});le.displayName="List";var Ae=({id:e$1,name:r,readOnly:a$1,labelForKeys:i="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[l,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===l.length-1)return;let t=Ve(l,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=[...l];y[t][o]=m,o&&y.length-1===t&&y.push({key:"",value:""}),V(y),I(y);},[l,I]),k=useCallback(n=>n===l.length-1,[l.length]),X=useCallback((n,t)=>{if(n.type==="click"&&!k(t)&&l.length>1){let o=[...l];o.splice(t,1),V(o),I(o);}},[l,I,k]),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=[...l];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);},[l,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:i}),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:l,itemContent:(t,o)=>jsx(U,{id:`${t}`,index:t,avpKey:o.key,avpValue:o.value,dataTags:"avpInput",onChange:J,onDelete:X,onKeyUp:Q,ghostItem:k(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:l.map((t,o)=>jsx(U,{id:`${o}`,index:o,avpKey:t.key,avpValue:t.value,dataTags:"avpInput",onChange:J,onDelete:X,onKeyUp:Q,ghostItem:k(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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resources/icons/DeleteIcon.tsx","../src/resources/icons/MoveIcon.tsx","../src/components/form/SolaceAttributeValuePair.tsx","../src/components/form/SolaceAttributeValuePairForm.tsx"],"names":["DeleteIcon","fill","opacity","jsx","SvgIcon_default","MoveIcon","displayDropLine","theme","dropFromTop","dropOverIndex","index","dropLine","SolaceAVPContainer","styled_default","prop","isDragging","readOnly","disableReorder","SolaceAVPInputForKey","SolaceAVPInputForValue","SolaceAVPMoveButton","ghostItem","SolaceAVPDeleteButton","cursor","background","ValueWrapper","SolaceAttributeValuePair","id","avpKey","avpValue","dataTags","onDelete","onChange","onKeyUp","onBlur","keyErrorText","valueErrorText","emptyFieldDisplayValue","useTheme","Draggable","provided","snapshot","jsxs","SolaceTextField_default","e","SolaceAVPFormContainer","SolaceAVPFormLabel","hasScrollBar","SolaceAVPListContainer","reorderList","list","startIndex","endIndex","result","removed","ghostItemAtIndex","handleNavigateAVPList","key","enumList","List","React","props","ref","headerRef","virtualizedAvpListOption","style","SolaceAttributeValuePairForm","name","labelForKeys","labelForValues","avpList","onAVPListUpdate","avpKeyValidationCallback","avpValueValidationCallback","enableRequiredKeyFieldIndicator","enableRequiredValueFieldIndicator","keyRequired","keyIsRequiredMessage","helperText","hasErrors","hasWarnings","avpListMaxHeight","currentAVPList","setCurrentAVPList","useState","setDropOverIndex","setDropFromTop","useRef","useEffect","handleListUpdate","useCallback","handleDragEnd","reorderedList","handleDragUpdate","update","sourceIndex","destinationIndex","handleInputChange","event","eventName","value","handleDeleteItem","handleKeyUp","inputEleList","focusedEle","i","handleInputOnBlur","error","DragDropContext","Droppable","SolaceLabel_default","Virtuoso","item","HelperText_default","WarningText_default","ErrorText_default","SolaceAttributeValuePairForm_default"],"mappings":"qYAuBO,IAAMA,EAAAA,CAAa,CAAC,CAAE,IAAA,CAAAC,EAAM,OAAA,CAAAC,CAAQ,IAEzCC,GAAAA,CAACC,EAAAA,CAAA,CAAQ,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,KAAK,OAAA,CAAQ,WAAA,CAAY,IAAA,CAAK,MAAA,CACxD,QAAA,CAAAD,GAAAA,CAAC,KAAE,SAAA,CAAU,gBAAA,CACZ,QAAA,CAAAA,GAAAA,CAAC,MAAA,CAAA,CACA,CAAA,CAAE,oWACF,IAAA,CAAMF,CA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AACgH,CAAAA,CAAA,CAAW,QAAA,CAAArC,EAAW,CAAA,CAAA,CACpD,CAAA,CAAA,CAEF,CAEF,CAAA,CAEOsC,EAAAA,CAAQlD","file":"drag-drop.modern.mjs","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SvgIcon } from \"@mui/material\";\n\nexport interface DeleteIconProps {\n\tfill?: string;\n\topacity?: number;\n}\n\nexport const DeleteIcon = ({ fill, opacity }: DeleteIconProps): JSX.Element => {\n\treturn (\n\t\t<SvgIcon width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n\t\t\t<g transform=\"translate(5,3)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill}\n\t\t\t\t\topacity={opacity}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t</SvgIcon>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SvgIcon } from \"@mui/material\";\n\nexport interface MoveIconProps {\n\tfill?: string;\n\topacity?: number;\n}\n\nexport const MoveIcon = ({ fill, opacity }: MoveIconProps): JSX.Element => {\n\treturn (\n\t\t<SvgIcon width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n\t\t\t<g transform=\"translate(7,4)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill}\n\t\t\t\t\tfillOpacity={opacity}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t</SvgIcon>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport SolaceTextField, { SolaceTextFieldChangeEvent } from \"./SolaceTextField\";\nimport { styled, Theme, useTheme } from \"@mui/material\";\nimport { Draggable } from \"@hello-pangea/dnd\";\nimport { DeleteIcon } from \"../../resources/icons/DeleteIcon\";\nimport { MoveIcon } from \"../../resources/icons/MoveIcon\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\ninterface SolaceAVPContainerProps {\n\tisDragging: boolean;\n\tdropOverIndex: number | null;\n\tdropFromTop: boolean | null;\n\tindex: number;\n\treadOnly: boolean;\n\tdisableReorder?: boolean;\n}\n\ninterface SolaceAVPMoveButtonProps {\n\tisDragging: boolean;\n\tghostItem: boolean;\n\treadOnly: boolean;\n}\ninterface SolaceAVPDeleteButtonProps {\n\tghostItem: boolean;\n\tcursor: string;\n\tbackground: string;\n\treadOnly: boolean;\n}\n\n// conditionally display a drop line as a visual indicator for droppable position\nconst displayDropLine = (\n\ttheme: Theme,\n\tdropFromTop: boolean | null,\n\tdropOverIndex: number | null,\n\tindex: number\n): string => {\n\tlet dropLine = \"\";\n\tif (\n\t\tdropFromTop !== null &&\n\t\tdropOverIndex !== null &&\n\t\t((dropFromTop && dropOverIndex + 1 === index) || (!dropFromTop && dropOverIndex === index))\n\t) {\n\t\tdropLine = `1px solid ${theme.palette.ux.accent.n2.wMain}`;\n\t}\n\treturn dropLine;\n};\n\nconst SolaceAVPContainer = styled(\"div\", {\n\tshouldForwardProp: (prop) =>\n\t\tprop !== \"isDragging\" &&\n\t\tprop !== \"dropOverIndex\" &&\n\t\tprop !== \"dropFromTop\" &&\n\t\tprop !== \"readOnly\" &&\n\t\tprop !== \"disableReorder\"\n})<SolaceAVPContainerProps>(({ theme, isDragging, dropOverIndex, index, dropFromTop, readOnly, disableReorder }) => ({\n\t...(theme.mixins.formComponent_AVPItem.container as CSSProperties),\n\tbackgroundColor: isDragging ? theme.palette.ux.brand.w10 : \"inherit\",\n\tborderTop: displayDropLine(theme, dropFromTop, dropOverIndex, index),\n\tgridTemplateColumns: readOnly\n\t\t? \"0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px\"\n\t\t: disableReorder\n\t\t ? \"0px 1fr 8px 1fr 40px\"\n\t\t : \"32px 1fr 8px 1fr 40px\"\n}));\nconst SolaceAVPInputForKey = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPItem.inputWrapperForKey as CSSProperties)\n}));\nconst SolaceAVPInputForValue = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPItem.inputWrapperForValue as CSSProperties)\n}));\n\nconst SolaceAVPMoveButton = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"ghostItem\" && prop !== \"isDragging\" && prop !== \"readOnly\"\n})<SolaceAVPMoveButtonProps>(({ theme, ghostItem, isDragging, readOnly }) => ({\n\t...(theme.mixins.formComponent_AVPItem.moveButton as CSSProperties),\n\tcursor: ghostItem ? \"default\" : isDragging ? \"move\" : \"pointer\",\n\tdisplay: readOnly ? \"none\" : \"inherit\"\n}));\n\nconst SolaceAVPDeleteButton = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"ghostItem\" && prop !== \"cursor\" && prop !== \"background\" && prop !== \"readOnly\"\n})<SolaceAVPDeleteButtonProps>(({ theme, ghostItem, cursor, background, readOnly }) => ({\n\t...(theme.mixins.formComponent_AVPItem.deleteButton as CSSProperties),\n\tcursor: cursor,\n\tdisplay: readOnly ? \"none\" : \"inherit\",\n\theight: \"fit-content\",\n\t\":hover\": {\n\t\tbackgroundColor: background,\n\t\tsvg: {\n\t\t\tpath: {\n\t\t\t\tfill: ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.deprecated.primary.wMain\n\t\t\t}\n\t\t}\n\t},\n\tpaddingBottom: theme.spacing(0.5),\n\tmarginLeft: theme.spacing(1)\n}));\n\nconst ValueWrapper = styled(\"div\")(({ theme }) => ({\n\tpaddingTop: \"7px\",\n\tcolor: theme.palette.ux.secondary.text.wMain\n}));\n\nexport enum valueInputTypes {\n\ttextfield = \"textfield\",\n\tselect = \"select\",\n\tautocomplete = \"autocomplete\"\n}\n\nexport interface SolaceAttributeValuePairProps {\n\t/**\n\t * unique id for each Attribute Value Pair (AVP) item\n\t */\n\tid: string;\n\t/**\n\t * index for each Attribute Value Pair (AVP) item in the list, used to updated the list in response to delete and onchange events\n\t */\n\tindex: number;\n\t/**\n\t * key for Attribute Value Pair (AVP)\n\t */\n\tavpKey: string;\n\t/**\n\t * value for Attribute Value Pair (AVP)\n\t */\n\tavpValue: string;\n\t/**\n\t *\n\t */\n\tdataTags: string;\n\t/**\n\t * TODO: implementation required\n\t * specifies the type of the value providing component: types can be input, select etc. component, default to SolaceTextField if no type provided\n\t */\n\ttype?: valueInputTypes;\n\t/**\n\t * specifies whether the Attribute Value Pair (AVP) component is rendered in ghost state\n\t */\n\tghostItem: boolean;\n\t/**\n\t * callback for delete action\n\t */\n\tonDelete: (event: React.MouseEvent<HTMLElement>, index: number) => void;\n\t/**\n\t * callback for input onchange event\n\t */\n\tonChange: (event: SolaceTextFieldChangeEvent, index: number) => void;\n\t/**\n\t * callback for keyup event\n\t */\n\tonKeyUp: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * callback for onblur event\n\t */\n\tonBlur: (event: React.FocusEvent<HTMLInputElement>, index: number) => void;\n\t/**\n\t * validation error on an AVP value input value\n\t */\n\tkeyErrorText?: string;\n\t/**\n\t * validation error on an AVP value input value\n\t */\n\tvalueErrorText?: string;\n\t/**\n\t * An optional string to be displayed when an AVP key or value is empty when set to read-only.\n\t */\n\temptyFieldDisplayValue?: string;\n\t/**\n\t * index of the element that is being dragged over with\n\t * the index is updated on dragging\n\t */\n\tdropOverIndex: number | null;\n\t/**\n\t * dropping over state with three possible values:\n\t * true: dropping from top to bottom\n\t * false: dropping from bottom to top\n\t * null: dropping back to the same position or outside of the droppable container\n\t */\n\tdropFromTop: boolean | null;\n\t/**\n\t * read only flag\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Boolean flag to disable re-ordering of items\n\t */\n\tdisableReorder?: boolean;\n}\n\nexport const SolaceAttributeValuePair = ({\n\tid,\n\tindex,\n\tavpKey,\n\tavpValue,\n\tdataTags,\n\tghostItem = false,\n\tonDelete,\n\tonChange,\n\tonKeyUp,\n\tonBlur,\n\tkeyErrorText,\n\tvalueErrorText,\n\tdropOverIndex,\n\tdropFromTop,\n\treadOnly,\n\temptyFieldDisplayValue = \"\",\n\tdisableReorder = false\n}: SolaceAttributeValuePairProps) => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<Draggable draggableId={id} index={index} isDragDisabled={ghostItem || disableReorder}>\n\t\t\t{\n\t\t\t\t// TODO: Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed\n\t\t\t\t// eslint-disable-next-line sonarjs/cognitive-complexity\n\t\t\t\t(provided, snapshot) => (\n\t\t\t\t\t<SolaceAVPContainer\n\t\t\t\t\t\tref={provided.innerRef}\n\t\t\t\t\t\t{...provided.draggableProps}\n\t\t\t\t\t\tisDragging={snapshot.isDragging}\n\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t>\n\t\t\t\t\t\t{!disableReorder && (\n\t\t\t\t\t\t\t<SolaceAVPMoveButton\n\t\t\t\t\t\t\t\t{...provided.dragHandleProps}\n\t\t\t\t\t\t\t\tisDragging={snapshot.isDragging}\n\t\t\t\t\t\t\t\tghostItem={ghostItem}\n\t\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\t\tdata-qa={`avpMove-${index}`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<MoveIcon\n\t\t\t\t\t\t\t\t\tfill={ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.secondary.wMain}\n\t\t\t\t\t\t\t\t\topacity={1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</SolaceAVPMoveButton>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<SolaceAVPInputForKey>\n\t\t\t\t\t\t\t{!avpKey && avpValue && readOnly && (\n\t\t\t\t\t\t\t\t<ValueWrapper data-qa={`avpKey-${index}`}>{emptyFieldDisplayValue}</ValueWrapper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{(avpKey || (!avpKey && !readOnly)) && (\n\t\t\t\t\t\t\t\t<SolaceTextField\n\t\t\t\t\t\t\t\t\tname=\"key\"\n\t\t\t\t\t\t\t\t\tdataQa={`avpKey-${index}`}\n\t\t\t\t\t\t\t\t\tdataTags={dataTags}\n\t\t\t\t\t\t\t\t\tvalue={avpKey}\n\t\t\t\t\t\t\t\t\tonChange={(e) => onChange(e, index)}\n\t\t\t\t\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\t\t\t\t\tonBlur={(e) => onBlur(e, index)}\n\t\t\t\t\t\t\t\t\thasErrors={ghostItem ? false : !!keyErrorText}\n\t\t\t\t\t\t\t\t\thelperText={ghostItem ? \"\" : keyErrorText}\n\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</SolaceAVPInputForKey>\n\n\t\t\t\t\t\t<SolaceAVPInputForValue>\n\t\t\t\t\t\t\t{avpKey && !avpValue && readOnly && (\n\t\t\t\t\t\t\t\t<ValueWrapper data-qa={`avpValue-${index}`}>{emptyFieldDisplayValue}</ValueWrapper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{(avpValue || (!avpValue && !readOnly)) && (\n\t\t\t\t\t\t\t\t<SolaceTextField\n\t\t\t\t\t\t\t\t\tname=\"value\"\n\t\t\t\t\t\t\t\t\tdataQa={`avpValue-${index}`}\n\t\t\t\t\t\t\t\t\tdataTags={dataTags}\n\t\t\t\t\t\t\t\t\tvalue={avpValue}\n\t\t\t\t\t\t\t\t\tonChange={(e) => onChange(e, index)}\n\t\t\t\t\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\t\t\t\t\tonBlur={(e) => onBlur(e, index)}\n\t\t\t\t\t\t\t\t\thasErrors={ghostItem ? false : !!valueErrorText}\n\t\t\t\t\t\t\t\t\thelperText={ghostItem ? \"\" : valueErrorText}\n\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</SolaceAVPInputForValue>\n\n\t\t\t\t\t\t<SolaceAVPDeleteButton\n\t\t\t\t\t\t\tonClick={(e) => onDelete(e, index)}\n\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\tghostItem={ghostItem}\n\t\t\t\t\t\t\tcursor={ghostItem ? \"default\" : \"pointer\"}\n\t\t\t\t\t\t\tbackground={ghostItem ? \"inherit\" : theme.palette.ux.secondary.w10}\n\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\tdata-qa={`avpDelete-${index}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<DeleteIcon\n\t\t\t\t\t\t\t\tfill={ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.secondary.wMain}\n\t\t\t\t\t\t\t\topacity={1}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</SolaceAVPDeleteButton>\n\t\t\t\t\t</SolaceAVPContainer>\n\t\t\t\t)\n\t\t\t}\n\t\t</Draggable>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useState, useCallback, useEffect, useRef } from \"react\";\nimport { styled } from \"@mui/material\";\nimport { DragDropContext, Droppable, OnDragEndResponder, OnDragUpdateResponder } from \"@hello-pangea/dnd\";\nimport SolaceLabel from \"./SolaceLabel\";\nimport { SolaceAttributeValuePair, valueInputTypes } from \"./SolaceAttributeValuePair\";\nimport HelperText from \"./HelperText\";\nimport ErrorText from \"./ErrorText\";\nimport WarningText from \"./WarningText\";\nimport { CSSProperties } from \"@mui/styled-engine\";\nimport { SolaceTextFieldChangeEvent } from \"./SolaceTextField\";\nimport { Virtuoso } from \"react-virtuoso\";\n\ninterface SolaceAVPFormLabelProps {\n\treadOnly: boolean;\n\tdisableReorder?: boolean;\n\thasScrollBar?: boolean;\n}\n\nexport interface VirtualizeAvpListOptions {\n\tminHeight?: number | string;\n\theight?: number | string;\n\tuseWindowScrolling?: boolean;\n\tincreaseViewportBy?:\n\t\t| number\n\t\t| {\n\t\t\t\ttop: number;\n\t\t\t\tbottom: number;\n\t\t };\n\tinitialTopMostItemIndex?: number;\n}\n\nexport interface AVPItem {\n\tid?: string;\n\tkey: string;\n\tvalue: string;\n\tkeyErrorText?: string;\n\tvalueErrorText?: string;\n}\n\nconst SolaceAVPFormContainer = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPForm.container as CSSProperties)\n}));\n\n// If hasScrollBar is true, the label wrapper will have an additional 16px padding to accommodate the scrollbar in the content area\nconst SolaceAVPFormLabel = styled(\"div\")<SolaceAVPFormLabelProps>(\n\t({ theme, readOnly, disableReorder, hasScrollBar }) => ({\n\t\t...(theme.mixins.formComponent_AVPForm.labelWrapper as CSSProperties),\n\t\tgridTemplateColumns: readOnly\n\t\t\t? `0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px${hasScrollBar ? \" 16px\" : \"\"}`\n\t\t\t: disableReorder\n\t\t\t ? `0px 1fr 8px 1fr 32px${hasScrollBar ? \" 16px\" : \"\"}`\n\t\t\t : `32px 1fr 8px 1fr 32px${hasScrollBar ? \" 16px\" : \"\"}`\n\t})\n);\nconst SolaceAVPListContainer = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPForm.listWrapper as CSSProperties)\n}));\n\nconst reorderList = (list: Array<AVPItem>, startIndex: number, endIndex: number): Array<AVPItem> => {\n\tconst result = Array.from(list);\n\tconst [removed] = result.splice(startIndex, 1);\n\tresult.splice(endIndex, 0, removed);\n\n\treturn result;\n};\n\nconst ghostItemAtIndex = (list: Array<AVPItem>, index: number) => {\n\treturn list[index][\"key\"] === \"\" && list[index][\"value\"] === \"\";\n};\n\nenum AVPNavigationKeys {\n\tDown = \"ArrowDown\",\n\tUp = \"ArrowUp\",\n\tNextLine = \"Enter\"\n}\n\n// the navigation logic assumes there are two columns per row for the enum list\nconst handleNavigateAVPList = (key: string, index: number, enumList: NodeListOf<Element>): void => {\n\tif (key === AVPNavigationKeys.Up && index - 1 > 0) {\n\t\t(enumList[index - 2] as HTMLInputElement).select();\n\t} else if (key === AVPNavigationKeys.Down && index + 2 < enumList.length) {\n\t\t(enumList[index + 2] as HTMLInputElement).select();\n\t} else if (key === AVPNavigationKeys.NextLine && index + 2 < enumList.length) {\n\t\tif (index % 2 === 0) {\n\t\t\t(enumList[index + 2] as HTMLInputElement).select();\n\t\t} else if (index % 2 === 1) {\n\t\t\t(enumList[index + 1] as HTMLInputElement).select();\n\t\t}\n\t}\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst List = React.forwardRef<HTMLDivElement>((props: any, ref) => {\n\tconst headerRef = props[\"context\"]?.headerRef;\n\tconst virtualizedAvpListOption = props[\"context\"]?.virtualizedAvpListOption;\n\tconst style = props[\"style\"];\n\n\treturn (\n\t\t<SolaceAVPListContainer\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t\tstyle={{\n\t\t\t\t...style,\n\t\t\t\twidth: virtualizedAvpListOption?.height && headerRef.current ? headerRef.current.offsetWidth - 16 : \"100%\"\n\t\t\t}}\n\t\t/>\n\t);\n});\n\nList.displayName = \"List\";\n\nexport interface SolaceAttributeValuePairFormProps {\n\t/**\n\t * Unique identifier, if `id` is not specified, `name` value will be used\n\t */\n\tid?: string;\n\t/**\n\t * Name attribute to assign to the AVP form\n\t */\n\tname: string;\n\t/**\n\t * read only flag\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * label for the key column\n\t */\n\tlabelForKeys?: string | JSX.Element;\n\t/**\n\t * label for the value column\n\t */\n\tlabelForValues?: string | JSX.Element;\n\t/**\n\t * TODO: implementation required\n\t * specifies the type of the value providing component: types can be input, select etc. component, default to SolaceTextField if no type provided\n\t */\n\ttype?: valueInputTypes;\n\t/**\n\t * initial AVP list of key/value pairs, it can be an empty array e.g.[]\n\t */\n\tavpList?: Array<AVPItem>;\n\t/**\n\t * callback function that returns the current AVP list\n\t */\n\tonAVPListUpdate?: (list: Array<AVPItem>) => void;\n\t/**\n\t * validate individual AVP values, the function is triggered onBlur event\n\t */\n\tavpKeyValidationCallback?: (input: string, values: Array<AVPItem>) => string;\n\t/**\n\t * validate individual AVP values, the function is triggered onBlur event\n\t */\n\tavpValueValidationCallback?: (input: string, values: Array<AVPItem>) => string;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not `input` for key field is mandatory\n\t */\n\tenableRequiredKeyFieldIndicator?: boolean;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not `input` for value field is mandatory\n\t */\n\tenableRequiredValueFieldIndicator?: boolean;\n\t/**\n\t * An optional string to be displayed when an AVP key or value is empty when set to read-only.\n\t */\n\temptyFieldDisplayValue?: string;\n\t/**\n\t *\n\t * This boolean allows user to toggle whether keys are mandatory or not (i.e. if set to false, you can have a value without an associated key)\n\t */\n\tkeyRequired?: boolean;\n\t/**\n\t * String message to display if an AVP value is specified without an associated key (unless allowedKeyToBeEmpty is true, then no validation check done)\n\t */\n\tkeyIsRequiredMessage?: string;\n\t/**\n\t * Content to display as supportive/explanitory text\n\t */\n\thelperText?: string | JSX.Element;\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 to disable re-ordering of items\n\t */\n\tdisableReorder?: boolean;\n\t/**\n\t * AVP values maximum height if virtualizedAvpListOption is not set\n\t */\n\tavpListMaxHeight?: string;\n\t/**\n\t * If option is set, only render part of a large data set to fill the viewport\n\t */\n\tvirtualizedAvpListOption?: VirtualizeAvpListOptions;\n}\n\nconst SolaceAttributeValuePairForm = ({\n\tid,\n\tname,\n\treadOnly,\n\tlabelForKeys = \"Name\",\n\tlabelForValues = \"DisplayName\",\n\tavpList = [],\n\tonAVPListUpdate,\n\tavpKeyValidationCallback,\n\tavpValueValidationCallback,\n\tenableRequiredKeyFieldIndicator,\n\tenableRequiredValueFieldIndicator,\n\temptyFieldDisplayValue = \"\",\n\tkeyRequired = true, // by default, key is considered mandatory for every AVP (i.e. you can have a key with no value, but you cannot have a value with no key)\n\tkeyIsRequiredMessage = \"Required\",\n\thelperText = \"\",\n\thasErrors = false,\n\thasWarnings = false,\n\tdisableReorder = false,\n\tavpListMaxHeight,\n\tvirtualizedAvpListOption\n}: SolaceAttributeValuePairFormProps): JSX.Element => {\n\tconst [currentAVPList, setCurrentAVPList] = useState(avpList);\n\tconst [dropOverIndex, setDropOverIndex] = useState<number | null>(null);\n\tconst [dropFromTop, setDropFromTop] = useState<boolean | null>(null);\n\tconst headerRef = useRef<HTMLDivElement>(null);\n\n\t// Add new entry on avp list update\n\tuseEffect(() => {\n\t\tconst list = [...avpList];\n\t\tlist.push({ key: \"\", value: \"\" });\n\t\tsetCurrentAVPList(list);\n\t}, [avpList]);\n\n\tconst handleListUpdate = useCallback(\n\t\t(list: Array<AVPItem>) => {\n\t\t\tsetCurrentAVPList(list);\n\t\t\tif (onAVPListUpdate && ghostItemAtIndex(list, list.length - 1)) onAVPListUpdate(list.slice(0, -1));\n\t\t\tsetDropOverIndex(null); // reset drop over index on drag end\n\t\t\tsetDropFromTop(null); // reset drop over direction on drag end\n\t\t},\n\t\t[onAVPListUpdate]\n\t);\n\n\t// All the things to do when a drag action ended\n\tconst handleDragEnd: OnDragEndResponder = (result) => {\n\t\t/**\n\t\t * No changes on the following conditions:\n\t\t * 1. Drag outside of the list\n\t\t * 2. Drag & Drop on the same item\n\t\t * 3. Drag & Drop on the last item e.g. ghost item\n\t\t */\n\t\tif (\n\t\t\t!result.destination ||\n\t\t\tresult.destination.index === result.source.index ||\n\t\t\tresult.destination.index === currentAVPList.length - 1\n\t\t)\n\t\t\treturn;\n\n\t\tconst reorderedList = reorderList(currentAVPList, result.source.index, result.destination.index);\n\n\t\tsetCurrentAVPList(reorderedList);\n\n\t\tif (onAVPListUpdate && ghostItemAtIndex(reorderedList, reorderedList.length - 1))\n\t\t\tonAVPListUpdate(reorderedList.slice(0, -1));\n\n\t\tsetDropOverIndex(null); // reset drop over index on drag end\n\t\tsetDropFromTop(null); // reset drop over direction on drag end\n\t};\n\n\t/**\n\t * update drop over index & direction on drag update\n\t * this allows to apply visual indicators to UI elements based on dragging behaviors\n\t */\n\tconst handleDragUpdate: OnDragUpdateResponder | undefined = (update) => {\n\t\tconst sourceIndex: number | null = update.source.index;\n\t\tconst destinationIndex: number | null = update?.destination?.index ?? null;\n\t\tconst dropOverIndex: number | null = destinationIndex;\n\t\tlet dropFromTop: boolean | null = null;\n\t\tif (sourceIndex !== null && destinationIndex !== null) {\n\t\t\tif (sourceIndex > destinationIndex) {\n\t\t\t\tdropFromTop = false;\n\t\t\t} else if (sourceIndex < destinationIndex) {\n\t\t\t\tdropFromTop = true;\n\t\t\t}\n\t\t}\n\t\tsetDropOverIndex(dropOverIndex);\n\t\tsetDropFromTop(dropFromTop);\n\t};\n\n\tconst handleInputChange = useCallback(\n\t\t(event: SolaceTextFieldChangeEvent, index: number) => {\n\t\t\tconst eventName: string = event.name;\n\t\t\tconst value: string = event.value;\n\n\t\t\tconst list = [...currentAVPList];\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t(list[index] as any)[eventName] = value;\n\n\t\t\t// add a new row at the end of the list upon input changes\n\t\t\tif (eventName && list.length - 1 === index) {\n\t\t\t\tlist.push({ key: \"\", value: \"\" });\n\t\t\t}\n\t\t\tsetCurrentAVPList(list);\n\t\t\thandleListUpdate(list);\n\t\t},\n\t\t[currentAVPList, handleListUpdate]\n\t);\n\n\t// determine whether an enum item is a ghost item\n\tconst ghostItem = useCallback(\n\t\t(index: number): boolean => index === currentAVPList.length - 1,\n\t\t[currentAVPList.length]\n\t);\n\n\tconst handleDeleteItem = useCallback(\n\t\t(event: React.MouseEvent<HTMLElement>, index: number) => {\n\t\t\tif (event.type === \"click\" && !ghostItem(index) && currentAVPList.length > 1) {\n\t\t\t\tconst list = [...currentAVPList];\n\t\t\t\tlist.splice(index, 1);\n\t\t\t\tsetCurrentAVPList(list);\n\t\t\t\thandleListUpdate(list);\n\t\t\t}\n\t\t},\n\t\t[currentAVPList, handleListUpdate, ghostItem]\n\t);\n\n\tconst handleKeyUp = useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n\t\tconst inputEleList = document.querySelectorAll(\"[data-tags='avpInput']\");\n\t\tconst focusedEle = document.activeElement;\n\n\t\tfor (let i = 0; i < inputEleList.length; i++) {\n\t\t\tif (inputEleList[i].getAttribute(\"data-qa\") === focusedEle?.getAttribute(\"data-qa\")) {\n\t\t\t\thandleNavigateAVPList(event.key, i, inputEleList);\n\t\t\t}\n\t\t}\n\t}, []);\n\n\tconst handleInputOnBlur = useCallback(\n\t\t(event: React.FocusEvent<HTMLInputElement>, index: number) => {\n\t\t\tconst list = [...currentAVPList];\n\n\t\t\tlist[index][\"key\"] = list[index][\"key\"].trim();\n\t\t\tlist[index][\"value\"] = list[index][\"value\"].trim();\n\n\t\t\t// Check if the key field is valid if key validation callback is provided\n\t\t\tif (event.target.getAttribute(\"name\") === \"key\" && avpKeyValidationCallback) {\n\t\t\t\tconst error = avpKeyValidationCallback(event.target.value, list.slice(0, -1));\n\n\t\t\t\tif (error) {\n\t\t\t\t\tlist[index][\"keyErrorText\"] = error;\n\t\t\t\t} else {\n\t\t\t\t\tdelete list[index][\"keyErrorText\"];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if the value field is valid if value callback is provided\n\t\t\tif (event.target.getAttribute(\"name\") === \"value\" && avpValueValidationCallback) {\n\t\t\t\tconst error = avpValueValidationCallback(event.target.value, list.slice(0, -1));\n\n\t\t\t\tif (error) {\n\t\t\t\t\tlist[index][\"valueErrorText\"] = error;\n\t\t\t\t} else {\n\t\t\t\t\tdelete list[index][\"valueErrorText\"];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if the key field is empty\n\t\t\tif (keyRequired && !list[index][\"key\"]) {\n\t\t\t\tlist[index][\"keyErrorText\"] = keyIsRequiredMessage;\n\t\t\t} else if (list[index][\"keyErrorText\"] === keyIsRequiredMessage) {\n\t\t\t\tdelete list[index][\"keyErrorText\"];\n\t\t\t}\n\n\t\t\tsetCurrentAVPList(list);\n\t\t\thandleListUpdate(list);\n\t\t},\n\t\t[\n\t\t\tcurrentAVPList,\n\t\t\tkeyRequired,\n\t\t\tavpKeyValidationCallback,\n\t\t\tavpValueValidationCallback,\n\t\t\tkeyIsRequiredMessage,\n\t\t\thandleListUpdate\n\t\t]\n\t);\n\n\treturn (\n\t\t<DragDropContext onDragEnd={handleDragEnd} onDragUpdate={handleDragUpdate}>\n\t\t\t<Droppable droppableId={id ?? name} isDropDisabled={!!disableReorder || !!readOnly}>\n\t\t\t\t{(provided) => (\n\t\t\t\t\t<SolaceAVPFormContainer ref={provided.innerRef} {...provided.droppableProps}>\n\t\t\t\t\t\t<SolaceAVPFormLabel\n\t\t\t\t\t\t\tref={headerRef}\n\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\tdisableReorder={!!disableReorder}\n\t\t\t\t\t\t\thasScrollBar={!!avpListMaxHeight || !!virtualizedAvpListOption?.height}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SolaceLabel id=\"avpLabelForKeys\" required={enableRequiredKeyFieldIndicator}>\n\t\t\t\t\t\t\t\t{labelForKeys}\n\t\t\t\t\t\t\t</SolaceLabel>\n\t\t\t\t\t\t\t<SolaceLabel id=\"avpLabelForValues\" required={enableRequiredValueFieldIndicator}>\n\t\t\t\t\t\t\t\t{labelForValues}\n\t\t\t\t\t\t\t</SolaceLabel>\n\t\t\t\t\t\t</SolaceAVPFormLabel>\n\t\t\t\t\t\t{virtualizedAvpListOption && headerRef.current && (\n\t\t\t\t\t\t\t<Virtuoso\n\t\t\t\t\t\t\t\tcontext={{ headerRef, virtualizedAvpListOption }}\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\theight: virtualizedAvpListOption.height ? virtualizedAvpListOption.height : \"auto\",\n\t\t\t\t\t\t\t\t\tminHeight: virtualizedAvpListOption.minHeight ? virtualizedAvpListOption.minHeight : 40\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tuseWindowScroll={virtualizedAvpListOption.useWindowScrolling}\n\t\t\t\t\t\t\t\tincreaseViewportBy={virtualizedAvpListOption.increaseViewportBy}\n\t\t\t\t\t\t\t\tcomponents={{ List }}\n\t\t\t\t\t\t\t\tinitialTopMostItemIndex={virtualizedAvpListOption.initialTopMostItemIndex ?? 0}\n\t\t\t\t\t\t\t\tdata={currentAVPList}\n\t\t\t\t\t\t\t\titemContent={(index, item) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<SolaceAttributeValuePair\n\t\t\t\t\t\t\t\t\t\t\tkey={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\tid={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\tavpKey={item.key}\n\t\t\t\t\t\t\t\t\t\t\tavpValue={item.value}\n\t\t\t\t\t\t\t\t\t\t\tdataTags=\"avpInput\"\n\t\t\t\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\t\t\t\tonDelete={handleDeleteItem}\n\t\t\t\t\t\t\t\t\t\t\tonKeyUp={handleKeyUp}\n\t\t\t\t\t\t\t\t\t\t\tghostItem={ghostItem(index)}\n\t\t\t\t\t\t\t\t\t\t\tonBlur={handleInputOnBlur}\n\t\t\t\t\t\t\t\t\t\t\tkeyErrorText={item.keyErrorText}\n\t\t\t\t\t\t\t\t\t\t\tvalueErrorText={item.valueErrorText}\n\t\t\t\t\t\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t\t\t\temptyFieldDisplayValue={emptyFieldDisplayValue}\n\t\t\t\t\t\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!virtualizedAvpListOption && headerRef.current && (\n\t\t\t\t\t\t\t<div style={avpListMaxHeight ? { maxHeight: avpListMaxHeight, overflowY: \"auto\" } : undefined}>\n\t\t\t\t\t\t\t\t<SolaceAVPListContainer\n\t\t\t\t\t\t\t\t\tstyle={{ width: avpListMaxHeight ? headerRef.current.offsetWidth - 16 : \"100%\" }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{currentAVPList.map((item, index) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<SolaceAttributeValuePair\n\t\t\t\t\t\t\t\t\t\t\t\tkey={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\tid={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\t\tavpKey={item.key}\n\t\t\t\t\t\t\t\t\t\t\t\tavpValue={item.value}\n\t\t\t\t\t\t\t\t\t\t\t\tdataTags=\"avpInput\"\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\t\t\t\t\tonDelete={handleDeleteItem}\n\t\t\t\t\t\t\t\t\t\t\t\tonKeyUp={handleKeyUp}\n\t\t\t\t\t\t\t\t\t\t\t\tghostItem={ghostItem(index)}\n\t\t\t\t\t\t\t\t\t\t\t\tonBlur={handleInputOnBlur}\n\t\t\t\t\t\t\t\t\t\t\t\tkeyErrorText={item.keyErrorText}\n\t\t\t\t\t\t\t\t\t\t\t\tvalueErrorText={item.valueErrorText}\n\t\t\t\t\t\t\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\t\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t\t\t\t\temptyFieldDisplayValue={emptyFieldDisplayValue}\n\t\t\t\t\t\t\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</SolaceAVPListContainer>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{provided.placeholder}\n\t\t\t\t\t</SolaceAVPFormContainer>\n\t\t\t\t)}\n\t\t\t</Droppable>\n\t\t\t{helperText && (\n\t\t\t\t<div style={{ paddingLeft: \"16px\" }}>\n\t\t\t\t\t{helperText && !hasWarnings && !hasErrors && <HelperText>{helperText}</HelperText>}\n\t\t\t\t\t{helperText && !hasErrors && hasWarnings && <WarningText>{helperText}</WarningText>}\n\t\t\t\t\t{helperText && hasErrors && <ErrorText>{helperText}</ErrorText>}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</DragDropContext>\n\t);\n};\n\nexport default SolaceAttributeValuePairForm;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/resources/icons/DeleteIcon.tsx","../src/resources/icons/MoveIcon.tsx","../src/components/form/SolaceAttributeValuePair.tsx","../src/components/form/SolaceAttributeValuePairForm.tsx"],"names":["DeleteIcon","fill","opacity","jsx","SvgIcon_default","MoveIcon","displayDropLine","theme","dropFromTop","dropOverIndex","index","dropLine","SolaceAVPContainer","styled_default","prop","isDragging","readOnly","disableReorder","SolaceAVPInputForKey","SolaceAVPInputForValue","SolaceAVPMoveButton","ghostItem","SolaceAVPDeleteButton","cursor","background","ValueWrapper","SolaceAttributeValuePair","id","avpKey","avpValue","dataTags","onDelete","onChange","onKeyUp","onBlur","keyErrorText","valueErrorText","emptyFieldDisplayValue","useTheme","Draggable","provided","snapshot","jsxs","SolaceTextField_default","e","SolaceAVPFormContainer","SolaceAVPFormLabel","hasScrollBar","SolaceAVPListContainer","reorderList","list","startIndex","endIndex","result","removed","ghostItemAtIndex","handleNavigateAVPList","key","enumList","List","React","props","ref","headerRef","virtualizedAvpListOption","style","SolaceAttributeValuePairForm","name","labelForKeys","labelForValues","avpList","onAVPListUpdate","avpKeyValidationCallback","avpValueValidationCallback","enableRequiredKeyFieldIndicator","enableRequiredValueFieldIndicator","keyRequired","keyIsRequiredMessage","helperText","hasErrors","hasWarnings","avpListMaxHeight","currentAVPList","setCurrentAVPList","useState","setDropOverIndex","setDropFromTop","useRef","useEffect","handleListUpdate","useCallback","handleDragEnd","reorderedList","handleDragUpdate","update","sourceIndex","destinationIndex","handleInputChange","event","eventName","value","handleDeleteItem","handleKeyUp","inputEleList","focusedEle","i","handleInputOnBlur","error","DragDropContext","Droppable","SolaceLabel_default","Virtuoso","item","HelperText_default","WarningText_default","ErrorText_default","SolaceAttributeValuePairForm_default"],"mappings":"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,EACf,WAAA,CAAaD,CAAAA,CACb,QAAA,CAAUQ,GAAAA,CACV,sBAAA,CAAwBqB,CAAAA,CACxB,eAAgBpB,CAAAA,CAAAA,CAjBX,CAAA,EAAGP,CAAK,CAAA,CAkBd,CAED,CAAA,CACF,EACD,CAAA,CAEA8B,CAAAA,CAAS,WAAA,CAAA,CACX,CAAA,CAEF,CAAA,CACCsC,CAAAA,EACApC,KAAC,KAAA,CAAA,CAAI,KAAA,CAAO,CAAE,WAAA,CAAa,MAAO,CAAA,CAChC,UAAAoC,CAAAA,EAAc,CAACE,CAAAA,EAAe,CAACD,CAAAA,EAAa5E,GAAAA,CAAC8G,EAAA,CAAY,QAAA,CAAAnC,CAAAA,CAAW,CAAA,CACpEA,CAAAA,EAAc,CAACC,GAAaC,CAAAA,EAAe7E,GAAAA,CAAC+G,CAAAA,CAAA,CAAa,QAAA,CAAApC,CAAAA,CAAW,EACpEA,CAAAA,EAAcC,CAAAA,EAAa5E,GAAAA,CAACgH,CAAAA,CAAA,CAAW,QAAA,CAAArC,EAAW,CAAA,CAAA,CACpD,CAAA,CAAA,CAEF,CAEF,CAAA,CAEOsC,EAAAA,CAAQlD","file":"drag-drop.modern.mjs","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SvgIcon } from \"@mui/material\";\n\nexport interface DeleteIconProps {\n\tfill?: string;\n\topacity?: number;\n}\n\nexport const DeleteIcon = ({ fill, opacity }: DeleteIconProps): JSX.Element => {\n\treturn (\n\t\t<SvgIcon width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n\t\t\t<g transform=\"translate(5,3)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill}\n\t\t\t\t\topacity={opacity}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t</SvgIcon>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SvgIcon } from \"@mui/material\";\n\nexport interface MoveIconProps {\n\tfill?: string;\n\topacity?: number;\n}\n\nexport const MoveIcon = ({ fill, opacity }: MoveIconProps): JSX.Element => {\n\treturn (\n\t\t<SvgIcon width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n\t\t\t<g transform=\"translate(7,4)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill={fill}\n\t\t\t\t\tfillOpacity={opacity}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t</SvgIcon>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport SolaceTextField, { SolaceTextFieldChangeEvent } from \"./SolaceTextField\";\nimport { styled, Theme, useTheme } from \"@mui/material\";\nimport { Draggable } from \"@hello-pangea/dnd\";\nimport { DeleteIcon } from \"../../resources/icons/DeleteIcon\";\nimport { MoveIcon } from \"../../resources/icons/MoveIcon\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\ninterface SolaceAVPContainerProps {\n\tisDragging: boolean;\n\tdropOverIndex: number | null;\n\tdropFromTop: boolean | null;\n\tindex: number;\n\treadOnly: boolean;\n\tdisableReorder?: boolean;\n}\n\ninterface SolaceAVPMoveButtonProps {\n\tisDragging: boolean;\n\tghostItem: boolean;\n\treadOnly: boolean;\n}\ninterface SolaceAVPDeleteButtonProps {\n\tghostItem: boolean;\n\tcursor: string;\n\tbackground: string;\n\treadOnly: boolean;\n}\n\n// conditionally display a drop line as a visual indicator for droppable position\nconst displayDropLine = (\n\ttheme: Theme,\n\tdropFromTop: boolean | null,\n\tdropOverIndex: number | null,\n\tindex: number\n): string => {\n\tlet dropLine = \"\";\n\tif (\n\t\tdropFromTop !== null &&\n\t\tdropOverIndex !== null &&\n\t\t((dropFromTop && dropOverIndex + 1 === index) || (!dropFromTop && dropOverIndex === index))\n\t) {\n\t\tdropLine = `1px solid ${theme.palette.ux.accent.n2.wMain}`;\n\t}\n\treturn dropLine;\n};\n\nconst SolaceAVPContainer = styled(\"div\", {\n\tshouldForwardProp: (prop) =>\n\t\tprop !== \"isDragging\" &&\n\t\tprop !== \"dropOverIndex\" &&\n\t\tprop !== \"dropFromTop\" &&\n\t\tprop !== \"readOnly\" &&\n\t\tprop !== \"disableReorder\"\n})<SolaceAVPContainerProps>(({ theme, isDragging, dropOverIndex, index, dropFromTop, readOnly, disableReorder }) => ({\n\t...(theme.mixins.formComponent_AVPItem.container as CSSProperties),\n\tbackgroundColor: isDragging ? theme.palette.ux.brand.w10 : \"inherit\",\n\tborderTop: displayDropLine(theme, dropFromTop, dropOverIndex, index),\n\tgridTemplateColumns: readOnly\n\t\t? \"0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px\"\n\t\t: disableReorder\n\t\t\t? \"0px 1fr 8px 1fr 40px\"\n\t\t\t: \"32px 1fr 8px 1fr 40px\"\n}));\nconst SolaceAVPInputForKey = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPItem.inputWrapperForKey as CSSProperties)\n}));\nconst SolaceAVPInputForValue = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPItem.inputWrapperForValue as CSSProperties)\n}));\n\nconst SolaceAVPMoveButton = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"ghostItem\" && prop !== \"isDragging\" && prop !== \"readOnly\"\n})<SolaceAVPMoveButtonProps>(({ theme, ghostItem, isDragging, readOnly }) => ({\n\t...(theme.mixins.formComponent_AVPItem.moveButton as CSSProperties),\n\tcursor: ghostItem ? \"default\" : isDragging ? \"move\" : \"pointer\",\n\tdisplay: readOnly ? \"none\" : \"inherit\"\n}));\n\nconst SolaceAVPDeleteButton = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"ghostItem\" && prop !== \"cursor\" && prop !== \"background\" && prop !== \"readOnly\"\n})<SolaceAVPDeleteButtonProps>(({ theme, ghostItem, cursor, background, readOnly }) => ({\n\t...(theme.mixins.formComponent_AVPItem.deleteButton as CSSProperties),\n\tcursor: cursor,\n\tdisplay: readOnly ? \"none\" : \"inherit\",\n\theight: \"fit-content\",\n\t\":hover\": {\n\t\tbackgroundColor: background,\n\t\tsvg: {\n\t\t\tpath: {\n\t\t\t\tfill: ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.deprecated.primary.wMain\n\t\t\t}\n\t\t}\n\t},\n\tpaddingBottom: theme.spacing(0.5),\n\tmarginLeft: theme.spacing(1)\n}));\n\nconst ValueWrapper = styled(\"div\")(({ theme }) => ({\n\tpaddingTop: \"7px\",\n\tcolor: theme.palette.ux.secondary.text.wMain\n}));\n\nexport enum valueInputTypes {\n\ttextfield = \"textfield\",\n\tselect = \"select\",\n\tautocomplete = \"autocomplete\"\n}\n\nexport interface SolaceAttributeValuePairProps {\n\t/**\n\t * unique id for each Attribute Value Pair (AVP) item\n\t */\n\tid: string;\n\t/**\n\t * index for each Attribute Value Pair (AVP) item in the list, used to updated the list in response to delete and onchange events\n\t */\n\tindex: number;\n\t/**\n\t * key for Attribute Value Pair (AVP)\n\t */\n\tavpKey: string;\n\t/**\n\t * value for Attribute Value Pair (AVP)\n\t */\n\tavpValue: string;\n\t/**\n\t *\n\t */\n\tdataTags: string;\n\t/**\n\t * TODO: implementation required\n\t * specifies the type of the value providing component: types can be input, select etc. component, default to SolaceTextField if no type provided\n\t */\n\ttype?: valueInputTypes;\n\t/**\n\t * specifies whether the Attribute Value Pair (AVP) component is rendered in ghost state\n\t */\n\tghostItem: boolean;\n\t/**\n\t * callback for delete action\n\t */\n\tonDelete: (event: React.MouseEvent<HTMLElement>, index: number) => void;\n\t/**\n\t * callback for input onchange event\n\t */\n\tonChange: (event: SolaceTextFieldChangeEvent, index: number) => void;\n\t/**\n\t * callback for keyup event\n\t */\n\tonKeyUp: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * callback for onblur event\n\t */\n\tonBlur: (event: React.FocusEvent<HTMLInputElement>, index: number) => void;\n\t/**\n\t * validation error on an AVP value input value\n\t */\n\tkeyErrorText?: string;\n\t/**\n\t * validation error on an AVP value input value\n\t */\n\tvalueErrorText?: string;\n\t/**\n\t * An optional string to be displayed when an AVP key or value is empty when set to read-only.\n\t */\n\temptyFieldDisplayValue?: string;\n\t/**\n\t * index of the element that is being dragged over with\n\t * the index is updated on dragging\n\t */\n\tdropOverIndex: number | null;\n\t/**\n\t * dropping over state with three possible values:\n\t * true: dropping from top to bottom\n\t * false: dropping from bottom to top\n\t * null: dropping back to the same position or outside of the droppable container\n\t */\n\tdropFromTop: boolean | null;\n\t/**\n\t * read only flag\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Boolean flag to disable re-ordering of items\n\t */\n\tdisableReorder?: boolean;\n}\n\nexport const SolaceAttributeValuePair = ({\n\tid,\n\tindex,\n\tavpKey,\n\tavpValue,\n\tdataTags,\n\tghostItem = false,\n\tonDelete,\n\tonChange,\n\tonKeyUp,\n\tonBlur,\n\tkeyErrorText,\n\tvalueErrorText,\n\tdropOverIndex,\n\tdropFromTop,\n\treadOnly,\n\temptyFieldDisplayValue = \"\",\n\tdisableReorder = false\n}: SolaceAttributeValuePairProps) => {\n\tconst theme = useTheme();\n\treturn (\n\t\t<Draggable draggableId={id} index={index} isDragDisabled={ghostItem || disableReorder}>\n\t\t\t{\n\t\t\t\t// TODO: Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed\n\t\t\t\t// eslint-disable-next-line sonarjs/cognitive-complexity\n\t\t\t\t(provided, snapshot) => (\n\t\t\t\t\t<SolaceAVPContainer\n\t\t\t\t\t\tref={provided.innerRef}\n\t\t\t\t\t\t{...provided.draggableProps}\n\t\t\t\t\t\tisDragging={snapshot.isDragging}\n\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t>\n\t\t\t\t\t\t{!disableReorder && (\n\t\t\t\t\t\t\t<SolaceAVPMoveButton\n\t\t\t\t\t\t\t\t{...provided.dragHandleProps}\n\t\t\t\t\t\t\t\tisDragging={snapshot.isDragging}\n\t\t\t\t\t\t\t\tghostItem={ghostItem}\n\t\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\t\tdata-qa={`avpMove-${index}`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<MoveIcon\n\t\t\t\t\t\t\t\t\tfill={ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.secondary.wMain}\n\t\t\t\t\t\t\t\t\topacity={1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</SolaceAVPMoveButton>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<SolaceAVPInputForKey>\n\t\t\t\t\t\t\t{!avpKey && avpValue && readOnly && (\n\t\t\t\t\t\t\t\t<ValueWrapper data-qa={`avpKey-${index}`}>{emptyFieldDisplayValue}</ValueWrapper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{(avpKey || (!avpKey && !readOnly)) && (\n\t\t\t\t\t\t\t\t<SolaceTextField\n\t\t\t\t\t\t\t\t\tname=\"key\"\n\t\t\t\t\t\t\t\t\tdataQa={`avpKey-${index}`}\n\t\t\t\t\t\t\t\t\tdataTags={dataTags}\n\t\t\t\t\t\t\t\t\tvalue={avpKey}\n\t\t\t\t\t\t\t\t\tonChange={(e) => onChange(e, index)}\n\t\t\t\t\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\t\t\t\t\tonBlur={(e) => onBlur(e, index)}\n\t\t\t\t\t\t\t\t\thasErrors={ghostItem ? false : !!keyErrorText}\n\t\t\t\t\t\t\t\t\thelperText={ghostItem ? \"\" : keyErrorText}\n\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</SolaceAVPInputForKey>\n\n\t\t\t\t\t\t<SolaceAVPInputForValue>\n\t\t\t\t\t\t\t{avpKey && !avpValue && readOnly && (\n\t\t\t\t\t\t\t\t<ValueWrapper data-qa={`avpValue-${index}`}>{emptyFieldDisplayValue}</ValueWrapper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{(avpValue || (!avpValue && !readOnly)) && (\n\t\t\t\t\t\t\t\t<SolaceTextField\n\t\t\t\t\t\t\t\t\tname=\"value\"\n\t\t\t\t\t\t\t\t\tdataQa={`avpValue-${index}`}\n\t\t\t\t\t\t\t\t\tdataTags={dataTags}\n\t\t\t\t\t\t\t\t\tvalue={avpValue}\n\t\t\t\t\t\t\t\t\tonChange={(e) => onChange(e, index)}\n\t\t\t\t\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\t\t\t\t\tonBlur={(e) => onBlur(e, index)}\n\t\t\t\t\t\t\t\t\thasErrors={ghostItem ? false : !!valueErrorText}\n\t\t\t\t\t\t\t\t\thelperText={ghostItem ? \"\" : valueErrorText}\n\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</SolaceAVPInputForValue>\n\n\t\t\t\t\t\t<SolaceAVPDeleteButton\n\t\t\t\t\t\t\tonClick={(e) => onDelete(e, index)}\n\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t(e.currentTarget as HTMLElement).click();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\taria-label=\"Delete row\"\n\t\t\t\t\t\t\tghostItem={ghostItem}\n\t\t\t\t\t\t\tcursor={ghostItem ? \"default\" : \"pointer\"}\n\t\t\t\t\t\t\tbackground={ghostItem ? \"inherit\" : theme.palette.ux.secondary.w10}\n\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\tdata-qa={`avpDelete-${index}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<DeleteIcon\n\t\t\t\t\t\t\t\tfill={ghostItem ? theme.palette.ux.secondary.w40 : theme.palette.ux.secondary.wMain}\n\t\t\t\t\t\t\t\topacity={1}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</SolaceAVPDeleteButton>\n\t\t\t\t\t</SolaceAVPContainer>\n\t\t\t\t)\n\t\t\t}\n\t\t</Draggable>\n\t);\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useState, useCallback, useEffect, useRef } from \"react\";\nimport { styled } from \"@mui/material\";\nimport { DragDropContext, Droppable, OnDragEndResponder, OnDragUpdateResponder } from \"@hello-pangea/dnd\";\nimport SolaceLabel from \"./SolaceLabel\";\nimport { SolaceAttributeValuePair, valueInputTypes } from \"./SolaceAttributeValuePair\";\nimport HelperText from \"./HelperText\";\nimport ErrorText from \"./ErrorText\";\nimport WarningText from \"./WarningText\";\nimport { CSSProperties } from \"@mui/styled-engine\";\nimport { SolaceTextFieldChangeEvent } from \"./SolaceTextField\";\nimport { Virtuoso } from \"react-virtuoso\";\n\ninterface SolaceAVPFormLabelProps {\n\treadOnly: boolean;\n\tdisableReorder?: boolean;\n\thasScrollBar?: boolean;\n}\n\nexport interface VirtualizeAvpListOptions {\n\tminHeight?: number | string;\n\theight?: number | string;\n\tuseWindowScrolling?: boolean;\n\tincreaseViewportBy?:\n\t\t| number\n\t\t| {\n\t\t\t\ttop: number;\n\t\t\t\tbottom: number;\n\t\t };\n\tinitialTopMostItemIndex?: number;\n}\n\nexport interface AVPItem {\n\tid?: string;\n\tkey: string;\n\tvalue: string;\n\tkeyErrorText?: string;\n\tvalueErrorText?: string;\n}\n\nconst SolaceAVPFormContainer = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPForm.container as CSSProperties)\n}));\n\n// If hasScrollBar is true, the label wrapper will have an additional 16px padding to accommodate the scrollbar in the content area\nconst SolaceAVPFormLabel = styled(\"div\")<SolaceAVPFormLabelProps>(\n\t({ theme, readOnly, disableReorder, hasScrollBar }) => ({\n\t\t...(theme.mixins.formComponent_AVPForm.labelWrapper as CSSProperties),\n\t\tgridTemplateColumns: readOnly\n\t\t\t? `0px minmax(0, 1fr) 8px minmax(0, 1fr) 0px${hasScrollBar ? \" 16px\" : \"\"}`\n\t\t\t: disableReorder\n\t\t\t ? `0px 1fr 8px 1fr 32px${hasScrollBar ? \" 16px\" : \"\"}`\n\t\t\t : `32px 1fr 8px 1fr 32px${hasScrollBar ? \" 16px\" : \"\"}`\n\t})\n);\nconst SolaceAVPListContainer = styled(\"div\")(({ theme }) => ({\n\t...(theme.mixins.formComponent_AVPForm.listWrapper as CSSProperties)\n}));\n\nconst reorderList = (list: Array<AVPItem>, startIndex: number, endIndex: number): Array<AVPItem> => {\n\tconst result = Array.from(list);\n\tconst [removed] = result.splice(startIndex, 1);\n\tresult.splice(endIndex, 0, removed);\n\n\treturn result;\n};\n\nconst ghostItemAtIndex = (list: Array<AVPItem>, index: number) => {\n\treturn list[index][\"key\"] === \"\" && list[index][\"value\"] === \"\";\n};\n\nenum AVPNavigationKeys {\n\tDown = \"ArrowDown\",\n\tUp = \"ArrowUp\",\n\tNextLine = \"Enter\"\n}\n\n// the navigation logic assumes there are two columns per row for the enum list\nconst handleNavigateAVPList = (key: string, index: number, enumList: NodeListOf<Element>): void => {\n\tif (key === AVPNavigationKeys.Up && index - 1 > 0) {\n\t\t(enumList[index - 2] as HTMLInputElement).select();\n\t} else if (key === AVPNavigationKeys.Down && index + 2 < enumList.length) {\n\t\t(enumList[index + 2] as HTMLInputElement).select();\n\t} else if (key === AVPNavigationKeys.NextLine && index + 2 < enumList.length) {\n\t\tif (index % 2 === 0) {\n\t\t\t(enumList[index + 2] as HTMLInputElement).select();\n\t\t} else if (index % 2 === 1) {\n\t\t\t(enumList[index + 1] as HTMLInputElement).select();\n\t\t}\n\t}\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst List = React.forwardRef<HTMLDivElement>((props: any, ref) => {\n\tconst headerRef = props[\"context\"]?.headerRef;\n\tconst virtualizedAvpListOption = props[\"context\"]?.virtualizedAvpListOption;\n\tconst style = props[\"style\"];\n\n\treturn (\n\t\t<SolaceAVPListContainer\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t\tstyle={{\n\t\t\t\t...style,\n\t\t\t\twidth: virtualizedAvpListOption?.height && headerRef.current ? headerRef.current.offsetWidth - 16 : \"100%\"\n\t\t\t}}\n\t\t/>\n\t);\n});\n\nList.displayName = \"List\";\n\nexport interface SolaceAttributeValuePairFormProps {\n\t/**\n\t * Unique identifier, if `id` is not specified, `name` value will be used\n\t */\n\tid?: string;\n\t/**\n\t * Name attribute to assign to the AVP form\n\t */\n\tname: string;\n\t/**\n\t * read only flag\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * label for the key column\n\t */\n\tlabelForKeys?: string | JSX.Element;\n\t/**\n\t * label for the value column\n\t */\n\tlabelForValues?: string | JSX.Element;\n\t/**\n\t * TODO: implementation required\n\t * specifies the type of the value providing component: types can be input, select etc. component, default to SolaceTextField if no type provided\n\t */\n\ttype?: valueInputTypes;\n\t/**\n\t * initial AVP list of key/value pairs, it can be an empty array e.g.[]\n\t */\n\tavpList?: Array<AVPItem>;\n\t/**\n\t * callback function that returns the current AVP list\n\t */\n\tonAVPListUpdate?: (list: Array<AVPItem>) => void;\n\t/**\n\t * validate individual AVP values, the function is triggered onBlur event\n\t */\n\tavpKeyValidationCallback?: (input: string, values: Array<AVPItem>) => string;\n\t/**\n\t * validate individual AVP values, the function is triggered onBlur event\n\t */\n\tavpValueValidationCallback?: (input: string, values: Array<AVPItem>) => string;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not `input` for key field is mandatory\n\t */\n\tenableRequiredKeyFieldIndicator?: boolean;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not `input` for value field is mandatory\n\t */\n\tenableRequiredValueFieldIndicator?: boolean;\n\t/**\n\t * An optional string to be displayed when an AVP key or value is empty when set to read-only.\n\t */\n\temptyFieldDisplayValue?: string;\n\t/**\n\t *\n\t * This boolean allows user to toggle whether keys are mandatory or not (i.e. if set to false, you can have a value without an associated key)\n\t */\n\tkeyRequired?: boolean;\n\t/**\n\t * String message to display if an AVP value is specified without an associated key (unless allowedKeyToBeEmpty is true, then no validation check done)\n\t */\n\tkeyIsRequiredMessage?: string;\n\t/**\n\t * Content to display as supportive/explanitory text\n\t */\n\thelperText?: string | JSX.Element;\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 to disable re-ordering of items\n\t */\n\tdisableReorder?: boolean;\n\t/**\n\t * AVP values maximum height if virtualizedAvpListOption is not set\n\t */\n\tavpListMaxHeight?: string;\n\t/**\n\t * If option is set, only render part of a large data set to fill the viewport\n\t */\n\tvirtualizedAvpListOption?: VirtualizeAvpListOptions;\n}\n\nconst SolaceAttributeValuePairForm = ({\n\tid,\n\tname,\n\treadOnly,\n\tlabelForKeys = \"Name\",\n\tlabelForValues = \"DisplayName\",\n\tavpList = [],\n\tonAVPListUpdate,\n\tavpKeyValidationCallback,\n\tavpValueValidationCallback,\n\tenableRequiredKeyFieldIndicator,\n\tenableRequiredValueFieldIndicator,\n\temptyFieldDisplayValue = \"\",\n\tkeyRequired = true, // by default, key is considered mandatory for every AVP (i.e. you can have a key with no value, but you cannot have a value with no key)\n\tkeyIsRequiredMessage = \"Required\",\n\thelperText = \"\",\n\thasErrors = false,\n\thasWarnings = false,\n\tdisableReorder = false,\n\tavpListMaxHeight,\n\tvirtualizedAvpListOption\n}: SolaceAttributeValuePairFormProps): JSX.Element => {\n\tconst [currentAVPList, setCurrentAVPList] = useState(avpList);\n\tconst [dropOverIndex, setDropOverIndex] = useState<number | null>(null);\n\tconst [dropFromTop, setDropFromTop] = useState<boolean | null>(null);\n\tconst headerRef = useRef<HTMLDivElement>(null);\n\n\t// Add new entry on avp list update\n\tuseEffect(() => {\n\t\tconst list = [...avpList];\n\t\tlist.push({ key: \"\", value: \"\" });\n\t\tsetCurrentAVPList(list);\n\t}, [avpList]);\n\n\tconst handleListUpdate = useCallback(\n\t\t(list: Array<AVPItem>) => {\n\t\t\tsetCurrentAVPList(list);\n\t\t\tif (onAVPListUpdate && ghostItemAtIndex(list, list.length - 1)) onAVPListUpdate(list.slice(0, -1));\n\t\t\tsetDropOverIndex(null); // reset drop over index on drag end\n\t\t\tsetDropFromTop(null); // reset drop over direction on drag end\n\t\t},\n\t\t[onAVPListUpdate]\n\t);\n\n\t// All the things to do when a drag action ended\n\tconst handleDragEnd: OnDragEndResponder = (result) => {\n\t\t/**\n\t\t * No changes on the following conditions:\n\t\t * 1. Drag outside of the list\n\t\t * 2. Drag & Drop on the same item\n\t\t * 3. Drag & Drop on the last item e.g. ghost item\n\t\t */\n\t\tif (\n\t\t\t!result.destination ||\n\t\t\tresult.destination.index === result.source.index ||\n\t\t\tresult.destination.index === currentAVPList.length - 1\n\t\t)\n\t\t\treturn;\n\n\t\tconst reorderedList = reorderList(currentAVPList, result.source.index, result.destination.index);\n\n\t\tsetCurrentAVPList(reorderedList);\n\n\t\tif (onAVPListUpdate && ghostItemAtIndex(reorderedList, reorderedList.length - 1))\n\t\t\tonAVPListUpdate(reorderedList.slice(0, -1));\n\n\t\tsetDropOverIndex(null); // reset drop over index on drag end\n\t\tsetDropFromTop(null); // reset drop over direction on drag end\n\t};\n\n\t/**\n\t * update drop over index & direction on drag update\n\t * this allows to apply visual indicators to UI elements based on dragging behaviors\n\t */\n\tconst handleDragUpdate: OnDragUpdateResponder | undefined = (update) => {\n\t\tconst sourceIndex: number | null = update.source.index;\n\t\tconst destinationIndex: number | null = update?.destination?.index ?? null;\n\t\tconst dropOverIndex: number | null = destinationIndex;\n\t\tlet dropFromTop: boolean | null = null;\n\t\tif (sourceIndex !== null && destinationIndex !== null) {\n\t\t\tif (sourceIndex > destinationIndex) {\n\t\t\t\tdropFromTop = false;\n\t\t\t} else if (sourceIndex < destinationIndex) {\n\t\t\t\tdropFromTop = true;\n\t\t\t}\n\t\t}\n\t\tsetDropOverIndex(dropOverIndex);\n\t\tsetDropFromTop(dropFromTop);\n\t};\n\n\tconst handleInputChange = useCallback(\n\t\t(event: SolaceTextFieldChangeEvent, index: number) => {\n\t\t\tconst eventName: string = event.name;\n\t\t\tconst value: string = event.value;\n\n\t\t\tconst list = [...currentAVPList];\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t(list[index] as any)[eventName] = value;\n\n\t\t\t// add a new row at the end of the list upon input changes\n\t\t\tif (eventName && list.length - 1 === index) {\n\t\t\t\tlist.push({ key: \"\", value: \"\" });\n\t\t\t}\n\t\t\tsetCurrentAVPList(list);\n\t\t\thandleListUpdate(list);\n\t\t},\n\t\t[currentAVPList, handleListUpdate]\n\t);\n\n\t// determine whether an enum item is a ghost item\n\tconst ghostItem = useCallback(\n\t\t(index: number): boolean => index === currentAVPList.length - 1,\n\t\t[currentAVPList.length]\n\t);\n\n\tconst handleDeleteItem = useCallback(\n\t\t(event: React.MouseEvent<HTMLElement>, index: number) => {\n\t\t\tif (event.type === \"click\" && !ghostItem(index) && currentAVPList.length > 1) {\n\t\t\t\tconst list = [...currentAVPList];\n\t\t\t\tlist.splice(index, 1);\n\t\t\t\tsetCurrentAVPList(list);\n\t\t\t\thandleListUpdate(list);\n\t\t\t}\n\t\t},\n\t\t[currentAVPList, handleListUpdate, ghostItem]\n\t);\n\n\tconst handleKeyUp = useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n\t\tconst inputEleList = document.querySelectorAll(\"[data-tags='avpInput']\");\n\t\tconst focusedEle = document.activeElement;\n\n\t\tfor (let i = 0; i < inputEleList.length; i++) {\n\t\t\tif (inputEleList[i].getAttribute(\"data-qa\") === focusedEle?.getAttribute(\"data-qa\")) {\n\t\t\t\thandleNavigateAVPList(event.key, i, inputEleList);\n\t\t\t}\n\t\t}\n\t}, []);\n\n\tconst handleInputOnBlur = useCallback(\n\t\t(event: React.FocusEvent<HTMLInputElement>, index: number) => {\n\t\t\tconst list = [...currentAVPList];\n\n\t\t\tlist[index][\"key\"] = list[index][\"key\"].trim();\n\t\t\tlist[index][\"value\"] = list[index][\"value\"].trim();\n\n\t\t\t// Check if the key field is valid if key validation callback is provided\n\t\t\tif (event.target.getAttribute(\"name\") === \"key\" && avpKeyValidationCallback) {\n\t\t\t\tconst error = avpKeyValidationCallback(event.target.value, list.slice(0, -1));\n\n\t\t\t\tif (error) {\n\t\t\t\t\tlist[index][\"keyErrorText\"] = error;\n\t\t\t\t} else {\n\t\t\t\t\tdelete list[index][\"keyErrorText\"];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if the value field is valid if value callback is provided\n\t\t\tif (event.target.getAttribute(\"name\") === \"value\" && avpValueValidationCallback) {\n\t\t\t\tconst error = avpValueValidationCallback(event.target.value, list.slice(0, -1));\n\n\t\t\t\tif (error) {\n\t\t\t\t\tlist[index][\"valueErrorText\"] = error;\n\t\t\t\t} else {\n\t\t\t\t\tdelete list[index][\"valueErrorText\"];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if the key field is empty\n\t\t\tif (keyRequired && !list[index][\"key\"]) {\n\t\t\t\tlist[index][\"keyErrorText\"] = keyIsRequiredMessage;\n\t\t\t} else if (list[index][\"keyErrorText\"] === keyIsRequiredMessage) {\n\t\t\t\tdelete list[index][\"keyErrorText\"];\n\t\t\t}\n\n\t\t\tsetCurrentAVPList(list);\n\t\t\thandleListUpdate(list);\n\t\t},\n\t\t[\n\t\t\tcurrentAVPList,\n\t\t\tkeyRequired,\n\t\t\tavpKeyValidationCallback,\n\t\t\tavpValueValidationCallback,\n\t\t\tkeyIsRequiredMessage,\n\t\t\thandleListUpdate\n\t\t]\n\t);\n\n\treturn (\n\t\t<DragDropContext onDragEnd={handleDragEnd} onDragUpdate={handleDragUpdate}>\n\t\t\t<Droppable droppableId={id ?? name} isDropDisabled={!!disableReorder || !!readOnly}>\n\t\t\t\t{(provided) => (\n\t\t\t\t\t<SolaceAVPFormContainer ref={provided.innerRef} {...provided.droppableProps}>\n\t\t\t\t\t\t<SolaceAVPFormLabel\n\t\t\t\t\t\t\tref={headerRef}\n\t\t\t\t\t\t\treadOnly={!!readOnly}\n\t\t\t\t\t\t\tdisableReorder={!!disableReorder}\n\t\t\t\t\t\t\thasScrollBar={!!avpListMaxHeight || !!virtualizedAvpListOption?.height}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SolaceLabel id=\"avpLabelForKeys\" required={enableRequiredKeyFieldIndicator}>\n\t\t\t\t\t\t\t\t{labelForKeys}\n\t\t\t\t\t\t\t</SolaceLabel>\n\t\t\t\t\t\t\t<SolaceLabel id=\"avpLabelForValues\" required={enableRequiredValueFieldIndicator}>\n\t\t\t\t\t\t\t\t{labelForValues}\n\t\t\t\t\t\t\t</SolaceLabel>\n\t\t\t\t\t\t</SolaceAVPFormLabel>\n\t\t\t\t\t\t{virtualizedAvpListOption && headerRef.current && (\n\t\t\t\t\t\t\t<Virtuoso\n\t\t\t\t\t\t\t\tcontext={{ headerRef, virtualizedAvpListOption }}\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\theight: virtualizedAvpListOption.height ? virtualizedAvpListOption.height : \"auto\",\n\t\t\t\t\t\t\t\t\tminHeight: virtualizedAvpListOption.minHeight ? virtualizedAvpListOption.minHeight : 40\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tuseWindowScroll={virtualizedAvpListOption.useWindowScrolling}\n\t\t\t\t\t\t\t\tincreaseViewportBy={virtualizedAvpListOption.increaseViewportBy}\n\t\t\t\t\t\t\t\tcomponents={{ List }}\n\t\t\t\t\t\t\t\tinitialTopMostItemIndex={virtualizedAvpListOption.initialTopMostItemIndex ?? 0}\n\t\t\t\t\t\t\t\tdata={currentAVPList}\n\t\t\t\t\t\t\t\titemContent={(index, item) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<SolaceAttributeValuePair\n\t\t\t\t\t\t\t\t\t\t\tkey={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\tid={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\tavpKey={item.key}\n\t\t\t\t\t\t\t\t\t\t\tavpValue={item.value}\n\t\t\t\t\t\t\t\t\t\t\tdataTags=\"avpInput\"\n\t\t\t\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\t\t\t\tonDelete={handleDeleteItem}\n\t\t\t\t\t\t\t\t\t\t\tonKeyUp={handleKeyUp}\n\t\t\t\t\t\t\t\t\t\t\tghostItem={ghostItem(index)}\n\t\t\t\t\t\t\t\t\t\t\tonBlur={handleInputOnBlur}\n\t\t\t\t\t\t\t\t\t\t\tkeyErrorText={item.keyErrorText}\n\t\t\t\t\t\t\t\t\t\t\tvalueErrorText={item.valueErrorText}\n\t\t\t\t\t\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t\t\t\temptyFieldDisplayValue={emptyFieldDisplayValue}\n\t\t\t\t\t\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!virtualizedAvpListOption && headerRef.current && (\n\t\t\t\t\t\t\t<div style={avpListMaxHeight ? { maxHeight: avpListMaxHeight, overflowY: \"auto\" } : undefined}>\n\t\t\t\t\t\t\t\t<SolaceAVPListContainer\n\t\t\t\t\t\t\t\t\tstyle={{ width: avpListMaxHeight ? headerRef.current.offsetWidth - 16 : \"100%\" }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{currentAVPList.map((item, index) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<SolaceAttributeValuePair\n\t\t\t\t\t\t\t\t\t\t\t\tkey={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\tid={`${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\t\tavpKey={item.key}\n\t\t\t\t\t\t\t\t\t\t\t\tavpValue={item.value}\n\t\t\t\t\t\t\t\t\t\t\t\tdataTags=\"avpInput\"\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\t\t\t\t\tonDelete={handleDeleteItem}\n\t\t\t\t\t\t\t\t\t\t\t\tonKeyUp={handleKeyUp}\n\t\t\t\t\t\t\t\t\t\t\t\tghostItem={ghostItem(index)}\n\t\t\t\t\t\t\t\t\t\t\t\tonBlur={handleInputOnBlur}\n\t\t\t\t\t\t\t\t\t\t\t\tkeyErrorText={item.keyErrorText}\n\t\t\t\t\t\t\t\t\t\t\t\tvalueErrorText={item.valueErrorText}\n\t\t\t\t\t\t\t\t\t\t\t\tdropOverIndex={dropOverIndex}\n\t\t\t\t\t\t\t\t\t\t\t\tdropFromTop={dropFromTop}\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\t\t\t\t\t\temptyFieldDisplayValue={emptyFieldDisplayValue}\n\t\t\t\t\t\t\t\t\t\t\t\tdisableReorder={disableReorder}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</SolaceAVPListContainer>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{provided.placeholder}\n\t\t\t\t\t</SolaceAVPFormContainer>\n\t\t\t\t)}\n\t\t\t</Droppable>\n\t\t\t{helperText && (\n\t\t\t\t<div style={{ paddingLeft: \"16px\" }}>\n\t\t\t\t\t{helperText && !hasWarnings && !hasErrors && <HelperText>{helperText}</HelperText>}\n\t\t\t\t\t{helperText && !hasErrors && hasWarnings && <WarningText>{helperText}</WarningText>}\n\t\t\t\t\t{helperText && hasErrors && <ErrorText>{helperText}</ErrorText>}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</DragDropContext>\n\t);\n};\n\nexport default SolaceAttributeValuePairForm;\n"]}
|