@reltio/remotes 1.4.1621 → 1.4.1623

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/1039.js +1 -1
  2. package/1146.js +1 -1
  3. package/1148.js +1 -1
  4. package/1334.js +1 -1
  5. package/1425.js +1 -1
  6. package/1572.js +1 -1
  7. package/1572.js.map +1 -1
  8. package/1664.js +1 -1
  9. package/1707.js +1 -1
  10. package/1790.js +1 -1
  11. package/1840.js +1 -1
  12. package/1925.js +1 -1
  13. package/1925.js.map +1 -1
  14. package/2049.js +1 -1
  15. package/2066.js +1 -1
  16. package/2066.js.map +1 -1
  17. package/2201.js +1 -1
  18. package/2400.js +1 -1
  19. package/2400.js.map +1 -1
  20. package/2404.js +1 -1
  21. package/2404.js.map +1 -1
  22. package/2463.js +1 -1
  23. package/2641.js +1 -1
  24. package/2641.js.map +1 -1
  25. package/3096.js +1 -1
  26. package/3348.js +1 -1
  27. package/3358.js +1 -1
  28. package/3358.js.map +1 -1
  29. package/3373.js +1 -1
  30. package/3381.js +1 -1
  31. package/3383.js +1 -1
  32. package/3463.js +1 -1
  33. package/3469.js +1 -1
  34. package/3538.js +1 -1
  35. package/3538.js.map +1 -1
  36. package/356.js +1 -1
  37. package/3875.js +1 -1
  38. package/3902.js +1 -1
  39. package/3902.js.map +1 -1
  40. package/3926.js +1 -1
  41. package/3926.js.map +1 -1
  42. package/415.js +1 -1
  43. package/4212.js +1 -1
  44. package/4390.js +1 -1
  45. package/4481.js +1 -1
  46. package/4703.js +1 -1
  47. package/4780.js +1 -1
  48. package/4806.js +1 -1
  49. package/4838.js +1 -1
  50. package/50.js +1 -1
  51. package/5034.js +1 -1
  52. package/5039.js +1 -1
  53. package/5053.js +1 -1
  54. package/5108.js +1 -1
  55. package/5163.js +1 -1
  56. package/5163.js.map +1 -1
  57. package/5617.js +1 -1
  58. package/6020.js +1 -1
  59. package/6173.js +1 -1
  60. package/6228.js +1 -1
  61. package/6280.js +1 -1
  62. package/6287.js +1 -1
  63. package/6531.js +1 -1
  64. package/6606.js +1 -1
  65. package/6606.js.map +1 -1
  66. package/6799.js +1 -1
  67. package/6844.js +1 -1
  68. package/6853.js +1 -1
  69. package/6860.js +1 -1
  70. package/6903.js +1 -1
  71. package/7340.js +1 -1
  72. package/735.js +1 -1
  73. package/7422.js +1 -1
  74. package/7626.js +1 -1
  75. package/764.js +1 -1
  76. package/7896.js +1 -1
  77. package/8168.js +1 -1
  78. package/820.js +1 -1
  79. package/8207.js +1 -1
  80. package/8322.js +1 -1
  81. package/8481.js +2 -0
  82. package/8481.js.map +1 -0
  83. package/8565.js +1 -1
  84. package/8741.js +1 -1
  85. package/9016.js +1 -1
  86. package/9028.js +1 -1
  87. package/9028.js.map +1 -1
  88. package/9283.js +1 -1
  89. package/9309.js +1 -1
  90. package/9328.js +1 -1
  91. package/9387.js +1 -1
  92. package/9719.js +1 -1
  93. package/9736.js +1 -1
  94. package/9861.js +1 -1
  95. package/987.js +1 -1
  96. package/99.js +1 -1
  97. package/9945.js +2 -0
  98. package/9945.js.map +1 -0
  99. package/9960.js +1 -1
  100. package/main.js +1 -1
  101. package/package.json +1 -1
  102. package/remoteEntry.js +1 -1
  103. package/remoteEntry.js.map +1 -1
  104. package/3727.js +0 -2
  105. package/3727.js.map +0 -1
  106. package/673.js +0 -2
  107. package/673.js.map +0 -1
package/2641.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"2641.js","mappings":"wrBAEO,MAAMA,GAAYC,E,SAAAA,aAAYC,IAAD,CAChCC,OAAQ,CACJC,WAAY,SACZC,SAAU,OACVC,WAAY,OACZC,cAAe,EACfC,QAAS,oBACT,2BAA4B,CACxBC,KAAMP,EAAMQ,QAAQC,QAAQC,KAC5BC,YAAa,IAGrBC,WAAY,CACR,2BAA4B,CACxBL,KAAMP,EAAMQ,QAAQC,QAAQC,KAC5BC,YAAa,IAGrBE,UAAW,CACPC,WAAY,EACZC,YAAa,MACbC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,EAAAA,IAAAA,IAAiBA,EAAAA,IAAAA,IAAiB7B,EAAcC,EAC3F,MAAO,CACHtsB,MAAO,CAACmuB,iBAAkBX,EAAoBS,GAAYG,UAAWpuB,GACrEiB,MAAQ,GAAEmH,KAAO6O,IACjBoV,YAAAA,EACAC,UAAAA,MAIR,OAAOe,EACF3b,IAAIqc,EAAgBG,EAAAA,IAAAA,KACpBG,OAAOf,EAAa5b,IAAIqc,EAAgBG,EAAAA,IAAAA,OACxCxc,KACG4c,EAAAA,EAAAA,QAAO,CACHtuB,MAAO,IAAmC,IAAlC,iBAACmuB,EAAD,UAAmBC,GAAe,EACtC,OAAOD,EACDZ,EAAUY,GAAoB,EACzB,GAAEA,MAAqBC,KACxBD,EACJC,MAIjB7a,KAAKqa,KAEd,CAAC3pB,IAoBDE,iBAjBoBM,EAAAA,EAAAA,cACpB,CAACb,EAAiBC,IAAsBF,IACpC,MAAOyE,EAAK6O,GAAatT,EAAS1C,MAAMstB,MAAM,KAE9C,MAAO,CAACrc,MADM+E,IAAciX,EAAAA,IAAAA,GAAgBtqB,EAAkBC,GAAkB0a,MAAKiQ,EAAAA,EAAAA,QAAO,MAAOpmB,IACrF6O,UAAAA,KAElB,IAYA7S,eATkBK,EAAAA,EAAAA,cAClB,CAACd,EAAUW,IACPA,EAAsBia,MAAKiQ,EAAAA,EAAAA,QAAO,QAAU,GAAE7qB,EAASiB,gBAAgBjB,EAASsT,eACpF,O,8CCpDD,MAAMwX,EAAqC,CAACC,EAAIztB,KACnD,MAAM0tB,GAAgBpnB,EAAAA,EAAAA,SAAO,IAC7B1C,EAAAA,EAAAA,YAAU,KACF5D,IAAU0tB,EAAc9mB,UACxB8mB,EAAc9mB,SAAU,EACxB6mB,OAEL,CAACA,EAAIztB","sources":["webpack://@reltio/remotes/../components/src/components/ActionButton/styles.ts","webpack://@reltio/remotes/../components/src/components/ActionButton/ActionButton.tsx","webpack://@reltio/remotes/../components/src/components/BasicView/styles.ts","webpack://@reltio/remotes/../components/src/components/BasicView/BasicView.tsx","webpack://@reltio/remotes/../components/src/components/ConfirmationDialog/styles.ts","webpack://@reltio/remotes/../components/src/components/ConfirmationDialog/ConfirmationDialog.tsx","webpack://@reltio/remotes/../components/src/components/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.js","webpack://@reltio/remotes/../components/src/components/FacetViewHeader/styles.ts","webpack://@reltio/remotes/../components/src/components/FacetViewHeader/FacetViewHeader.tsx","webpack://@reltio/remotes/../components/src/components/HierarchyNodeTitle/styles.ts","webpack://@reltio/remotes/../components/src/components/HierarchyNodeTitle/HierarchyNodeTitle.tsx","webpack://@reltio/remotes/../components/src/components/HierarchyNodeTitle/hooks/useEntityDetails.ts","webpack://@reltio/remotes/../components/src/components/Link/styles.js","webpack://@reltio/remotes/../components/src/components/Link/Link.tsx","webpack://@reltio/remotes/../components/src/components/LoadingSpinner/SpinnerSmall.gif.tsx","webpack://@reltio/remotes/../components/src/components/LoadingSpinner/LoadingSpinner.tsx","webpack://@reltio/remotes/../components/src/components/ProfileCard/ProfileCardContent/styles.ts","webpack://@reltio/remotes/../components/src/components/ProfileCard/ProfileCardContent/ProfileCardContent.tsx","webpack://@reltio/remotes/../components/src/components/ProfileCard/ProfileCardPlaceholder/styles.ts","webpack://@reltio/remotes/../components/src/components/ProfileCard/ProfileCardPlaceholder/ProfileCardPlaceholder.tsx","webpack://@reltio/remotes/../components/src/components/ProfileCard/styles.ts","webpack://@reltio/remotes/../components/src/components/ProfileCard/ProfileCard.tsx","webpack://@reltio/remotes/../components/src/components/ProfileResizablePanes/styles.ts","webpack://@reltio/remotes/../components/src/components/ProfileResizablePanes/ProfileResizablePanes.tsx","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/classnames.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/treeNodeStyle.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/tree-node.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/node-renderer-default.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/tree-placeholder.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/placeholderRendererDefaultStyle.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/placeholder-renderer-default.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/memoized-tree-data-utils.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/dnd-manager.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/react-sortable-tree.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/generic-utils.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/reactSortableTreeStyles.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/index.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/default-handlers.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/tree-data-utils.js","webpack://@reltio/remotes/../components/src/components/SelectorWithOnlyOptionAutoSelect/styles.js","webpack://@reltio/remotes/../components/src/components/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.js","webpack://@reltio/remotes/../components/src/components/SideIconPanel/styles.ts","webpack://@reltio/remotes/../components/src/components/SideIconPanel/SideButtonsPanel.tsx","webpack://@reltio/remotes/../components/src/components/SidePanel/styles.ts","webpack://@reltio/remotes/../components/src/components/SidePanel/SidePanel.tsx","webpack://@reltio/remotes/../components/src/components/attributes/readMode/AttributesView/styles.ts","webpack://@reltio/remotes/../components/src/components/attributes/readMode/AttributesView/index.ts","webpack://@reltio/remotes/../components/src/components/attributes/readMode/AttributesView/AttributesView.tsx","webpack://@reltio/remotes/../components/src/components/attributes/editMode/AttributesView/styles.ts","webpack://@reltio/remotes/../components/src/components/attributes/editMode/AttributesView/AttributesView.tsx","webpack://@reltio/remotes/../components/src/components/attributes/editMode/AttributesView/index.ts","webpack://@reltio/remotes/../components/src/components/attributes/AttributesView/AttributesView.tsx","webpack://@reltio/remotes/../components/src/components/attributes/AttributesView/index.ts","webpack://@reltio/remotes/../components/src/components/attributes/editMode/RelationTypeSelector/components/styles.js","webpack://@reltio/remotes/../components/src/components/attributes/editMode/RelationTypeSelector/components/RelationOption.js","webpack://@reltio/remotes/../components/src/components/attributes/editMode/RelationTypeSelector/RelationTypeSelector.js","webpack://@reltio/remotes/../components/src/contexts/PageRequestsAbortingContext/index.ts","webpack://@reltio/remotes/../components/src/contexts/PerspectivesSettingsContext/index.ts","webpack://@reltio/remotes/../components/src/hooks/useRelationTypeSelector.js","webpack://@reltio/remotes/../components/src/hooks/useRunOnceAfterValueInitialization.js"],"sourcesContent":["import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles((theme) => ({\n button: {\n whiteSpace: 'nowrap',\n fontSize: '14px',\n lineHeight: '16px',\n letterSpacing: 0,\n padding: '9px 16px 9px 12px',\n '& svg g path, & svg path': {\n fill: theme.palette.primary.main,\n fillOpacity: 1\n }\n },\n iconButton: {\n '& svg g path, & svg path': {\n fill: theme.palette.primary.main,\n fillOpacity: 1\n }\n },\n startIcon: {\n marginLeft: 0,\n marginRight: '8px',\n width: '18px',\n height: '18px',\n alignItems: 'center'\n },\n overflowStyle: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n },\n menuIcon: {\n marginRight: '12px'\n },\n menuItem: {\n minHeight: '28px',\n padding: '2px 16px 2px 12px'\n },\n menuText: {\n color: theme.palette.text.primary,\n fontSize: '13px',\n lineHeight: '15px',\n letterSpacing: 0\n }\n}));\n","import React, {forwardRef} from 'react';\nimport classnames from 'classnames';\nimport Button from '@mui/material/Button';\nimport MenuItem from '@mui/material/MenuItem';\nimport Typography from '@mui/material/Typography';\n\nimport {useStyles} from './styles';\nimport {noop} from '../../core';\nimport ExpandedValueTooltip from '../ExpandedValueTooltip/ExpandedValueTooltip';\nimport {SmallIconButtonWithTooltip} from '../SmallIconButton';\n\nexport enum ActionButtonMode {\n iconButton = 'iconButton',\n button = 'button',\n menuItem = 'menuItem'\n}\n\nexport type Props = {\n className?: string;\n disabled?: boolean;\n icon: React.ElementType;\n label: string;\n mode: ActionButtonMode;\n onClick: () => void;\n onMenuClose?: () => void;\n};\n\nexport const ActionButton = forwardRef<HTMLLIElement, Props>(\n (\n {\n className,\n mode = ActionButtonMode.iconButton,\n label,\n disabled,\n icon: Icon,\n onClick = noop,\n onMenuClose = noop,\n ...otherProps\n }: Props,\n ref: React.Ref<HTMLLIElement>\n ) => {\n const styles = useStyles();\n\n const getButtonView = () => {\n switch (mode) {\n case 'iconButton': {\n return (\n <SmallIconButtonWithTooltip\n disabled={disabled}\n className={classnames(styles.iconButton, className)}\n size=\"S\"\n tooltipTitle={label}\n onClick={onClick}\n icon={Icon}\n showForDisabled\n {...otherProps}\n />\n );\n }\n case 'button': {\n return (\n <Button\n className={classnames(styles.button, className)}\n disabled={disabled}\n startIcon={<Icon />}\n onClick={onClick}\n color=\"primary\"\n classes={{startIcon: styles.startIcon}}\n {...otherProps}\n >\n <ExpandedValueTooltip value={label}>\n <div className={styles.overflowStyle}>{label}</div>\n </ExpandedValueTooltip>\n </Button>\n );\n }\n case 'menuItem': {\n const handleClick = () => {\n onMenuClose();\n onClick();\n };\n return (\n <MenuItem\n classes={{root: styles.menuItem}}\n onClick={handleClick}\n disabled={disabled}\n ref={ref}\n {...otherProps}\n >\n <>\n <Icon className={styles.menuIcon} />\n <Typography classes={{root: styles.menuText}}>{label}</Typography>\n </>\n </MenuItem>\n );\n }\n }\n };\n\n return getButtonView();\n }\n);\n\nActionButton.displayName = 'ActionButton';\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles((theme) => ({\n basicViewPaper: {\n display: 'flex',\n flexDirection: 'column',\n ...theme.basicView\n }\n}));\n","import React, {forwardRef} from 'react';\nimport Paper, {PaperProps} from '@mui/material/Paper';\nimport {useStyles} from './styles';\n\nconst BasicView = forwardRef(\n ({children, className, ...otherProps}: PaperProps, ref: React.RefObject<HTMLDivElement>) => {\n const styles = useStyles();\n return (\n <Paper ref={ref} className={className} classes={{root: styles.basicViewPaper}} {...otherProps}>\n {children}\n </Paper>\n );\n }\n);\n\nBasicView.displayName = 'BasicView';\n\nexport default BasicView;\n","import {makeStyles} from '@mui/styles';\n\nconst useStyles = makeStyles({\n paper: {\n minHeight: '180px'\n },\n title: {\n padding: '16px 16px 10px 16px',\n fontSize: '20px',\n fontWeight: 500,\n letterSpacing: '0.25px',\n lineHeight: '24px'\n },\n content: {\n padding: '0 16px'\n },\n contentText: {\n marginBottom: 0,\n fontSize: '16px',\n letterSpacing: '0.15px',\n lineHeight: '24px'\n },\n actionButtons: {\n display: 'flex',\n paddingTop: '4px',\n fontSize: '14px',\n fontWeight: 500,\n letterSpacing: 0,\n lineHeight: '16px',\n '& > div': {\n marginLeft: 'auto'\n }\n },\n discardButton: {\n marginRight: '8px'\n }\n});\n\nexport {useStyles};\n","import React from 'react';\nimport i18n from 'ui-i18n';\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogContentText from '@mui/material/DialogContentText';\nimport DialogTitle from '@mui/material/DialogTitle';\n\nimport {useStyles} from './styles';\n\nexport type Props = {\n open: boolean;\n title: React.ReactNode;\n content: React.ReactNode;\n cancelCaption?: string;\n discardCaption?: string;\n saveCaption?: string;\n disabledSave?: boolean;\n onCancel?: () => void;\n onDiscard?: () => void;\n onSave: () => void;\n};\n\nconst ConfirmationDialog = ({\n open,\n title,\n content,\n onCancel,\n cancelCaption = i18n.text('Cancel'),\n onDiscard,\n discardCaption = '',\n onSave,\n saveCaption = i18n.text('Save'),\n disabledSave = false\n}: Props) => {\n const styles = useStyles();\n\n return (\n <Dialog open={open} onClose={onCancel} classes={{paperScrollPaper: styles.paper}}>\n <DialogTitle classes={{root: styles.title}}>{title}</DialogTitle>\n <DialogContent classes={{root: styles.content}}>\n <DialogContentText classes={{root: styles.contentText}}>{content}</DialogContentText>\n </DialogContent>\n <DialogActions className={styles.actionButtons} disableSpacing>\n {onCancel && <Button onClick={onCancel}>{cancelCaption}</Button>}\n <div>\n {onDiscard && (\n <Button onClick={onDiscard} classes={{root: styles.discardButton}}>\n {discardCaption}\n </Button>\n )}\n <Button onClick={onSave} color=\"primary\" disabled={disabledSave} autoFocus>\n {saveCaption}\n </Button>\n </div>\n </DialogActions>\n </Dialog>\n );\n};\n\nexport default ConfirmationDialog;\n","import React, {useMemo, useCallback, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport {ConnectionRelationType, RelationTypeType} from '@reltio/mdm-sdk';\nimport {identity, pipe} from 'ramda';\nimport {useRelationTypeSelector} from '../../hooks';\nimport RelationTypeSelector from '../attributes/editMode/RelationTypeSelector/RelationTypeSelector';\n\nconst ConnectionRelationTypeSelector = ({\n relation = {},\n inRelationTypes = [],\n outRelationTypes = [],\n onChange = identity,\n applyFirstByDefault = false,\n reversedContextLabels = false,\n ...otherProps\n}) => {\n const {getRelationTypesOptions, fromEditorValue, toEditorValue} = useRelationTypeSelector({reversedContextLabels});\n\n const relationsTypesOptions = useMemo(\n () => getRelationTypesOptions(inRelationTypes, outRelationTypes),\n [getRelationTypesOptions, inRelationTypes, outRelationTypes]\n );\n\n const handleChange = useCallback(pipe(fromEditorValue(inRelationTypes, outRelationTypes), onChange), [\n fromEditorValue,\n inRelationTypes,\n outRelationTypes,\n onChange\n ]);\n\n const hasValue = !!relation.relationType;\n\n useEffect(() => {\n if (applyFirstByDefault && relationsTypesOptions.length && !hasValue) {\n handleChange(relationsTypesOptions[0]);\n }\n }, [relationsTypesOptions, applyFirstByDefault, handleChange, hasValue]);\n\n return (\n <RelationTypeSelector\n value={toEditorValue(relation, relationsTypesOptions)}\n options={relationsTypesOptions}\n onChange={handleChange}\n {...otherProps}\n />\n );\n};\n\nConnectionRelationTypeSelector.propTypes = {\n className: PropTypes.string,\n relation: ConnectionRelationType,\n inRelationTypes: PropTypes.arrayOf(RelationTypeType),\n outRelationTypes: PropTypes.arrayOf(RelationTypeType),\n applyFirstByDefault: PropTypes.bool,\n reversedContextLabels: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nexport default ConnectionRelationTypeSelector;\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n container: {\n padding: '0 16px',\n minHeight: '48px',\n '.react-draggable &': {\n paddingTop: '4px'\n }\n },\n title: {\n fontSize: '16px',\n lineHeight: '19px',\n justifyContent: 'flex-start'\n }\n});\n","import React from 'react';\nimport classnames from 'classnames';\nimport BasicViewHeader from '../BasicViewHeader/BasicViewHeader';\nimport {useStyles} from './styles';\n\ntype Props = {\n className?: string;\n title: string;\n children?: React.ReactNode;\n};\n\nconst FacetViewHeader = ({className, title, children}: Props) => {\n const styles = useStyles();\n return (\n <BasicViewHeader title={title} classes={{root: classnames(styles.container, className), title: styles.title}}>\n {children}\n </BasicViewHeader>\n );\n};\n\nexport default FacetViewHeader;\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles((theme) => ({\n link: {\n cursor: 'pointer',\n color: theme.palette.primary.main,\n lineHeight: '15px',\n wordBreak: 'break-word'\n },\n selected: {\n fontWeight: 'bold'\n },\n popper: {\n maxWidth: '345px',\n minWidth: '200px',\n boxShadow: '0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)',\n backgroundColor: 'white',\n borderRadius: '2px'\n }\n}));\n","import React, {useCallback, useContext} from 'react';\nimport classnames from 'classnames';\nimport {useSelector, useDispatch} from 'react-redux';\nimport mdm, {ui} from '@reltio/mdm-module';\nimport Link from '../Link/Link';\nimport Popper from '../Popper/Popper';\nimport ProfileCard from '../ProfileCard/ProfileCard';\nimport {UrlGeneratorsContext} from '../../contexts';\nimport {useEntityDetails} from './hooks/useEntityDetails';\nimport {useStyles} from './styles';\n\ntype NodeTitleProps = {\n title: string;\n entityUri: string;\n viewId: string;\n isSelected?: boolean;\n anchorEl?: HTMLElement;\n withEntityDetails?: boolean;\n};\n\nexport const HierarchyNodeTitle = ({\n title,\n isSelected,\n entityUri,\n viewId,\n anchorEl,\n withEntityDetails = true\n}: NodeTitleProps) => {\n const styles = useStyles();\n const dispatch = useDispatch();\n const uiPath = useSelector(mdm.selectors.getUIPath);\n const {generateEntityUrl} = useContext(UrlGeneratorsContext);\n\n const {isLoading, entityDetails, showEntityDetails, hideEntityDetails} = useEntityDetails(entityUri);\n\n const link = generateEntityUrl({uiPath, uri: entityUri});\n const showPopper = Boolean(anchorEl) && (Boolean(entityDetails) || isLoading);\n\n const handleClick = useCallback(() => {\n dispatch(ui.actions.openEntity({uri: entityUri, viewId}));\n }, [dispatch, entityUri, viewId]);\n\n return (\n <>\n <span\n data-reltio-id=\"reltio-hierarchy-node-title\"\n className={classnames(styles.link, {[styles.selected]: isSelected})}\n onMouseEnter={withEntityDetails ? showEntityDetails : undefined}\n onMouseLeave={withEntityDetails ? hideEntityDetails : undefined}\n >\n <Link to={link} onClick={handleClick}>\n {title}\n </Link>\n </span>\n <Popper anchorEl={anchorEl} className={styles.popper} open={showPopper} modal={false} placement=\"top-start\">\n <ProfileCard entity={entityDetails} variant={isLoading ? 'loading' : 'normal'} />\n </Popper>\n </>\n );\n};\n","import {useState, useCallback, useRef, useEffect} from 'react';\nimport {getEntity} from '@reltio/mdm-sdk';\nimport {useSafePromise} from '../../../hooks/useSafePromise';\n\nexport const useEntityDetails = (entityUri: string) => {\n const [entityDetails, setEntityDetails] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n const timerId = useRef(null);\n const safePromise = useSafePromise();\n\n const cancelRequest = useCallback(() => safePromise(Promise.resolve()), [safePromise]);\n\n const showEntityDetails = useCallback(() => {\n timerId.current = setTimeout(() => {\n setIsLoading(true);\n safePromise(getEntity(entityUri))\n .then(setEntityDetails)\n .finally(() => setIsLoading(false));\n }, 1000);\n }, [entityUri, safePromise]);\n\n const hideEntityDetails = useCallback(() => {\n cancelRequest();\n clearTimeout(timerId.current);\n setIsLoading(false);\n setEntityDetails(null);\n }, [cancelRequest]);\n\n useEffect(() => {\n return () => clearTimeout(timerId.current);\n }, []);\n\n return {\n isLoading,\n entityDetails,\n showEntityDetails,\n hideEntityDetails\n };\n};\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n link: {\n textDecoration: 'inherit',\n color: 'inherit',\n '&:visited': {\n textDecoration: 'inherit',\n color: 'inherit'\n }\n }\n});\n","import React, {ReactNode} from 'react';\nimport {useStyles} from './styles';\n\ntype LinkProps = {\n to?: string;\n children?: ReactNode;\n onClick?: () => void;\n};\nconst Link = ({to, children, onClick}: LinkProps) => {\n const styles = useStyles();\n return (\n <a\n href={to}\n onClick={(e) => {\n if (onClick) {\n onClick();\n e.stopPropagation();\n e.preventDefault();\n }\n }}\n className={styles.link}\n >\n {children}\n </a>\n );\n};\n\nexport default Link;\n","export const SpinnerSmall =\n 'R0lGODlhFQALAKIAAP///8Hf75vL5Van0wB4v////wAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAFACwAAAIAFQAHAAADLFi6zPSQFEGpGhgXkrEUQShc1bB1wxcGYzGUZ6eKJGVy8lS1aJxJjaAiAkkAACH5BAkKAAUALAAAAwAUAAUAAAMiWLFbJRC6QakCODjBxIzDlW3dB4UBBmhPWQygwrCR9FZDAgAh+QQJCgAFACwIAAMADAAFAAADFBiqVfIvgBmaWHeC6rCklrdw0JMAACH5BAkKAAUALAAAAgAUAAcAAAMkSLpU/vCRQWmLLmg967hYAIxBV4GRSJoWlo1A6X1usXGMUkcJACH5BAkKAAUALAAAAgAOAAcAAAMdWLpF/qSMORudcYg97M2b0BHXAHIelV0pxizQkwAAOw==';\n","import React from 'react';\nimport {gif2Url} from '@reltio/mdm-sdk';\nimport {SpinnerSmall} from './SpinnerSmall.gif';\n\ntype Props = {\n className?: string;\n};\n\nexport const LoadingSpinner = ({className}: Props) => {\n return <img className={className} alt=\"loading\" src={gif2Url(SpinnerSmall)} />;\n};\n\nexport default LoadingSpinner;\n","import {makeStyles} from '@mui/styles';\n\nconst useStyles = makeStyles((theme) => ({\n image: {\n width: '40px',\n height: '40px'\n },\n info: {\n marginLeft: '12px',\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column'\n },\n label: {\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n fontWeight: 400,\n fontSize: '13px',\n lineHeight: '15px',\n color: theme.palette.primary.main\n },\n secondaryLabel: {\n marginTop: '4px',\n fontWeight: 400,\n fontSize: '10px',\n lineHeight: '12px',\n color: theme.palette.text.secondary,\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n link: {\n textDecoration: 'none'\n },\n thirdRow: {\n display: 'flex',\n overflow: 'hidden',\n alignItems: 'center',\n marginTop: 'auto',\n paddingTop: '4px'\n },\n entityId: {\n display: 'flex',\n overflow: 'hidden',\n alignItems: 'baseline',\n whiteSpace: 'nowrap',\n fontWeight: 400,\n fontSize: '12px',\n lineHeight: '16px'\n },\n entityIdLabel: {\n color: theme.palette.text.secondary\n },\n entityIdValue: {\n marginLeft: '8px',\n color: theme.palette.text.primary,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n '&[aria-describedby]': {\n cursor: 'pointer',\n '&:hover': {\n textDecoration: 'underline'\n }\n }\n }\n}));\n\nexport default useStyles;\n","import React, {useCallback} from 'react';\nimport i18n from 'ui-i18n';\nimport classnames from 'classnames';\nimport {Entity, getEntityId, getEntityUriForLink, getLabel} from '@reltio/mdm-sdk';\nimport EntityAvatar from '../../EntityAvatar/EntityAvatar';\nimport EntityUriLink from '../../EntityUriLink/EntityUriLink';\nimport ExpandedValueTooltip from '../../ExpandedValueTooltip/ExpandedValueTooltip';\nimport EntityTypeBadge from '../../EntityTypeBadge/EntityTypeBadge';\nimport useStyles from './styles';\n\ntype Props = {\n entity: Entity;\n classes?: {\n label?: string;\n secondaryLabel?: string;\n };\n};\n\nexport const ProfileCardContent = ({entity, classes = {}}: Props) => {\n const styles = useStyles();\n const {secondaryLabel: secondaryLabelClass, label: labelClass} = classes;\n const label = getLabel(entity.label);\n const {secondaryLabel} = entity;\n const handleCopyEntityIdToClipboard = useCallback(() => {\n navigator.clipboard.writeText(getEntityId(entity));\n }, [entity]);\n\n return (\n <>\n <EntityAvatar entity={entity} imageClassName={styles.image} />\n <div className={styles.info}>\n <EntityUriLink value={getEntityUriForLink(entity)} className={styles.link}>\n <ExpandedValueTooltip value={label} placement=\"top\" showOnExceededHeight={true}>\n <div className={classnames(styles.label, labelClass)}>{label}</div>\n </ExpandedValueTooltip>\n </EntityUriLink>\n\n {secondaryLabel && (\n <ExpandedValueTooltip value={secondaryLabel} placement=\"top\" showOnExceededHeight={true}>\n <div className={classnames(styles.secondaryLabel, secondaryLabelClass)}>{secondaryLabel}</div>\n </ExpandedValueTooltip>\n )}\n <div className={styles.thirdRow}>\n <EntityTypeBadge entity={entity} size=\"medium\" />\n <div className={styles.entityId} onClick={handleCopyEntityIdToClipboard}>\n <div className={styles.entityIdLabel}>{i18n.text('ID:')}</div>\n <ExpandedValueTooltip value={`Copy to clipboard ${getEntityId(entity)}`} placement=\"top\">\n <div className={styles.entityIdValue}>{getEntityId(entity)}</div>\n </ExpandedValueTooltip>\n </div>\n </div>\n </div>\n </>\n );\n};\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n '@keyframes keyframes-wave': {\n '0%': {\n transform: 'translateX(-100%)'\n },\n '60%': {\n transform: 'translateX(100%)'\n },\n '100%': {\n transform: 'translateX(100%)'\n }\n },\n wave: {\n overflow: 'hidden',\n position: 'relative',\n '&:after': {\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n content: '\"\"',\n position: 'absolute',\n animation: '$keyframes-wave 1.6s linear 0.5s infinite',\n transform: 'translateX(-100%)',\n background: 'linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.04), transparent);'\n }\n },\n avatar: {\n flex: 'none',\n width: '40px',\n height: '40px',\n borderRadius: '50%',\n backgroundColor: 'rgba(0, 0, 0, 0.11)'\n },\n info: {\n marginLeft: '12px',\n flex: 'auto'\n },\n label: {\n width: '40%',\n height: '15px',\n borderRadius: '2px',\n backgroundColor: 'rgba(0, 0, 0, 0.11)'\n },\n secondaryLabel: {\n marginTop: '4px',\n width: '100%',\n height: '12px',\n borderRadius: '2px',\n backgroundColor: 'rgba(0, 0, 0, 0.11)'\n },\n thirdRow: {\n marginTop: '4px',\n width: '60%',\n height: '24px',\n borderRadius: '2px',\n backgroundColor: 'rgba(0, 0, 0, 0.11)'\n }\n});\n","import React from 'react';\nimport classnames from 'classnames';\nimport {useStyles} from './styles';\n\nexport const ProfileCardPlaceholder = () => {\n const styles = useStyles();\n return (\n <>\n <div className={classnames(styles.avatar, styles.wave)} />\n <div className={styles.info}>\n <div className={classnames(styles.label, styles.wave)} />\n <div className={classnames(styles.secondaryLabel, styles.wave)} />\n <div className={classnames(styles.thirdRow, styles.wave)} />\n </div>\n </>\n );\n};\n","import {makeStyles} from '@mui/styles';\n\nconst useStyles = makeStyles({\n container: {\n display: 'flex',\n padding: '16px',\n overflow: 'hidden'\n }\n});\n\nexport default useStyles;\n","import React, {memo} from 'react';\nimport classnames from 'classnames';\nimport {Entity} from '@reltio/mdm-sdk';\nimport {ProfileCardContent} from './ProfileCardContent/ProfileCardContent';\nimport {ProfileCardPlaceholder} from './ProfileCardPlaceholder/ProfileCardPlaceholder';\nimport useStyles from './styles';\n\ntype Props = {\n entity: Entity;\n classes?: {\n label?: string;\n secondaryLabel?: string;\n container?: string;\n };\n variant?: 'loading' | 'normal';\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst ProfileCard = ({entity, classes = {}, variant = 'normal', ...otherProps}: Props) => {\n const styles = useStyles();\n const {container: containerClass} = classes;\n return (\n <div className={classnames(styles.container, containerClass)} {...otherProps}>\n {variant === 'normal' ? (\n <ProfileCardContent entity={entity} classes={classes} />\n ) : (\n <ProfileCardPlaceholder />\n )}\n </div>\n );\n};\n\nexport default memo(ProfileCard);\n","import {makeStyles} from '@mui/styles';\n\nconst useStyles = makeStyles(() => ({\n resizablePanesWrapper: {\n flexGrow: 1,\n height: '100%',\n marginRight: '1px'\n },\n pane: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n display: 'flex',\n flexDirection: 'column',\n overflow: 'hidden'\n }\n}));\n\nexport {useStyles};\n","import React, {useCallback, cloneElement} from 'react';\nimport {ResizablePanes} from '../ResizablePanes/ResizablePanes';\nimport {SideButtonsPanel} from '../SideIconPanel/SideButtonsPanel';\nimport {usePerspectivesSettings} from '../../contexts';\nimport {isNil} from 'ramda';\n\nimport {useStyles} from './styles';\nimport {RightPanelTab} from '../../types';\n\nconst DEFAULT_R_PANE_SIZE = 480;\nconst MIN_R_PANE_SIZE = 320;\nconst MAX_R_PANE_SIZE = 640;\n\ntype Props = {\n perspectiveId: string;\n children: [React.ReactElement, React.ReactElement];\n buttonsProps: Array<RightPanelTab['buttonProps']>;\n disabled?: boolean;\n defaultTab?: number;\n};\n\nexport const ProfileResizablePanes = ({perspectiveId, children, buttonsProps, disabled, defaultTab}: Props) => {\n const styles = useStyles();\n\n const {perspectiveSettings, updatePerspectiveSettings} = usePerspectivesSettings(perspectiveId);\n const {width = DEFAULT_R_PANE_SIZE} = perspectiveSettings || {};\n const active = defaultTab || perspectiveSettings?.active;\n const isSidePanelOpen = !isNil(active) && !disabled;\n\n const handleUpdateSettings = useCallback(\n (newSetting) => {\n updatePerspectiveSettings(newSetting);\n },\n [updatePerspectiveSettings]\n );\n\n const toggleActive = useCallback(\n (newId: number) => {\n const newActive = active === newId ? null : newId;\n handleUpdateSettings({active: newActive});\n },\n [active, handleUpdateSettings]\n );\n\n const resetActive = useCallback((): void => {\n handleUpdateSettings({active: null});\n }, [handleUpdateSettings]);\n\n const handlePaneSizeChange = useCallback(\n ({size}) => {\n handleUpdateSettings({width: size});\n },\n [handleUpdateSettings]\n );\n\n return (\n <>\n <ResizablePanes\n className={styles.resizablePanesWrapper}\n primary=\"second\"\n orientation=\"vertical\"\n size={isSidePanelOpen ? width : 0}\n minSize={MIN_R_PANE_SIZE}\n maxSize={MAX_R_PANE_SIZE}\n allowResize={isSidePanelOpen}\n onChange={handlePaneSizeChange}\n debounceInterval={2500}\n >\n <div className={styles.pane}>{children[0]}</div>\n <div className={styles.pane}>{cloneElement(children[1], {active, onClose: resetActive})}</div>\n </ResizablePanes>\n <SideButtonsPanel\n disabled={disabled}\n buttonsProps={buttonsProps}\n onButtonClick={toggleActive}\n activeIndexId={active}\n />\n </>\n );\n};\n\nProfileResizablePanes.displayName = 'ProfileResizablePanes';\n","// very simple className utility for creating a classname string...\n// Falsy arguments are ignored:\n//\n// const active = true\n// const className = classnames(\n// \"class1\",\n// !active && \"class2\",\n// active && \"class3\"\n// ); // returns -> class1 class3\";\n//\nexport default function classnames(...classes) {\n // Use Boolean constructor as a filter callback\n // Allows for loose type truthy/falsey checks\n // Boolean(\"\") === false;\n // Boolean(false) === false;\n // Boolean(undefined) === false;\n // Boolean(null) === false;\n // Boolean(0) === false;\n // Boolean(\"classname\") === true;\n return classes.filter(Boolean).join(' ');\n}\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles(() => ({\n '@global .rst__node': {\n minWidth: '100%',\n whiteSpace: 'nowrap',\n position: 'relative',\n textAlign: 'left'\n },\n\n '@global .rst__node.rst__rtl': {\n textAlign: 'right'\n },\n\n '@global .rst__nodeContent': {\n position: 'absolute',\n top: 0,\n bottom: 0\n },\n\n /* ==========================================================================\n Scaffold\n \n Line-overlaid blocks used for showing the tree structure\n ========================================================================== */\n '@global .rst__lineBlock, .rst__absoluteLineBlock': {\n height: '100%',\n position: 'relative',\n display: 'inline-block'\n },\n\n '@global .rst__absoluteLineBlock': {\n position: 'absolute',\n top: 0\n },\n\n '@global .rst__lineHalfHorizontalRight::before, .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after':\n {\n position: 'absolute',\n content: '',\n backgroundColor: 'black'\n },\n\n /**\n * +-----+\n * | |\n * | +--+\n * | |\n * +-----+\n */\n '@global .rst__lineHalfHorizontalRight::before': {\n height: '1px',\n top: '50%',\n right: 0,\n width: '50%'\n },\n\n '@global .rst__rtl.rst__lineHalfHorizontalRight::before': {\n left: 0,\n right: 'initial'\n },\n\n /**\n * +--+--+\n * | | |\n * | | |\n * | | |\n * +--+--+\n */\n '@global .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after': {\n width: '1px',\n left: '50%',\n top: 0,\n height: '100%'\n },\n\n /**\n * +--+--+\n * | | |\n * | | |\n * | | |\n * +--+--+\n */\n '@global .rst__rtl.rst__lineFullVertical::after, .rst__rtl.rst__lineHalfVerticalTop::after, .rst__rtl.rst__lineHalfVerticalBottom::after':\n {\n right: '50%',\n left: 'initial'\n },\n\n /**\n * +-----+\n * | | |\n * | + |\n * | |\n * +-----+\n */\n '@global .rst__lineHalfVerticalTop::after': {\n height: '50%'\n },\n\n /**\n * +-----+\n * | |\n * | + |\n * | | |\n * +-----+\n */\n '@global .rst__lineHalfVerticalBottom::after': {\n top: 'auto',\n bottom: 0,\n height: '50%'\n },\n\n /* Highlight line for pointing to dragged row destination\n ========================================================================== */\n /**\n * +--+--+\n * | | |\n * | | |\n * | | |\n * +--+--+\n */\n '@global .rst__highlightLineVertical': {\n zIndex: 3\n },\n '@global .rst__highlightLineVertical::before': {\n position: 'absolute',\n content: '',\n backgroundColor: '#36c2f6',\n width: '8px',\n marginLeft: '-4px',\n left: '50%',\n top: 0,\n height: '100%'\n },\n\n '@global .rst__rtl.rst__highlightLineVertical::before': {\n marginLeft: 'initial',\n marginRight: '-4px',\n left: 'initial',\n right: '50%'\n },\n\n '@keyframes arrow-pulse': {\n '0%': {\n transform: 'translate(0, 0)',\n opacity: 0\n },\n '30%': {\n transform: 'translate(0, 300%)',\n opacity: 1\n },\n '70%': {\n transform: 'translate(0, 700%)',\n opacity: 1\n },\n '100%': {\n transform: 'translate(0, 1000%)',\n opacity: 0\n }\n },\n '@global .rst__highlightLineVertical::after': {\n content: '',\n position: 'absolute',\n height: 0,\n marginLeft: '-4px',\n left: '50%',\n top: 0,\n borderLeft: '4px solid transparent',\n borderRight: '4px solid transparent',\n borderTop: '4px solid white',\n animation: 'arrow-pulse 1s infinite linear both'\n },\n\n '@global .rst__rtl.rst__highlightLineVertical::after': {\n marginLeft: 'initial',\n marginRight: '-4px',\n right: '50%',\n left: 'initial'\n },\n\n /**\n * +-----+\n * | |\n * | +--+\n * | | |\n * +--+--+\n */\n '@global .rst__highlightTopLeftCorner::before': {\n zIndex: 3,\n content: '',\n position: 'absolute',\n borderTop: 'solid 8px #36c2f6',\n borderLeft: 'solid 8px #36c2f6',\n boxSizing: 'border-box',\n height: 'calc(50% + 4px)',\n top: '50%',\n marginTop: '-4px',\n right: 0,\n width: 'calc(50% + 4px)'\n },\n\n '@global .rst__rtl.rst__highlightTopLeftCorner::before': {\n borderRight: 'solid 8px #36c2f6',\n borderLeft: 'none',\n left: 0,\n right: 'initial'\n },\n\n /**\n * +--+--+\n * | | |\n * | | |\n * | +->|\n * +-----+\n */\n '@global .rst__highlightBottomLeftCorner': {\n zIndex: 3\n },\n '@global .rst__highlightBottomLeftCorner::before': {\n content: '',\n position: 'absolute',\n borderBottom: 'solid 8px #36c2f6',\n borderLeft: 'solid 8px #36c2f6',\n boxSizing: 'border-box',\n height: 'calc(100% + 4px)',\n top: 0,\n right: '12px',\n width: 'calc(50% - 8px)'\n },\n\n '@global .rst__rtl.rst__highlightBottomLeftCorner::before': {\n borderRight: 'solid 8px #36c2f6',\n borderLeft: 'none',\n left: '12px',\n right: 'initial'\n },\n\n '@global .rst__highlightBottomLeftCorner::after': {\n content: '',\n position: 'absolute',\n height: 0,\n right: 0,\n top: '100%',\n marginTop: '-12px',\n borderTop: '12px solid transparent',\n borderBottom: '12px solid transparent',\n borderLeft: '12px solid #36c2f6'\n },\n\n '@global .rst__rtl.rst__highlightBottomLeftCorner::after': {\n left: 0,\n right: 'initial',\n borderRight: '12px solid #36c2f6',\n borderLeft: 'none'\n }\n}));\n","import React, {Children, cloneElement} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from './utils/classnames';\nimport {useStyles} from './treeNodeStyle';\n\nconst TreeNode = ({\n children,\n listIndex,\n swapFrom,\n swapLength,\n swapDepth,\n scaffoldBlockPxWidth,\n lowerSiblingCounts,\n connectDropTarget,\n isOver,\n draggedNode,\n canDrop,\n treeIndex,\n /* eslint-disable */\n treeId, // Delete from otherProps\n getPrevRow, // Delete from otherProps\n node, // Delete from otherProps\n path, // Delete from otherProps\n /* eslint-enable */\n rowDirection,\n ...otherProps\n}) => {\n useStyles();\n const rowDirectionClass = rowDirection === 'rtl' ? 'rst__rtl' : null;\n\n // Construct the scaffold representing the structure of the tree\n const scaffoldBlockCount = lowerSiblingCounts.length;\n const scaffold = [];\n lowerSiblingCounts.forEach((lowerSiblingCount, i) => {\n let lineClass = '';\n if (lowerSiblingCount > 0) {\n // At this level in the tree, the nodes had sibling nodes further down\n\n if (listIndex === 0) {\n // Top-left corner of the tree\n // +-----+\n // | |\n // | +--+\n // | | |\n // +--+--+\n lineClass = 'rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom';\n } else if (i === scaffoldBlockCount - 1) {\n // Last scaffold block in the row, right before the row content\n // +--+--+\n // | | |\n // | +--+\n // | | |\n // +--+--+\n lineClass = 'rst__lineHalfHorizontalRight rst__lineFullVertical';\n } else {\n // Simply connecting the line extending down to the next sibling on this level\n // +--+--+\n // | | |\n // | | |\n // | | |\n // +--+--+\n lineClass = 'rst__lineFullVertical';\n }\n } else if (listIndex === 0) {\n // Top-left corner of the tree, but has no siblings\n // +-----+\n // | |\n // | +--+\n // | |\n // +-----+\n lineClass = 'rst__lineHalfHorizontalRight';\n } else if (i === scaffoldBlockCount - 1) {\n // The last or only node in this level of the tree\n // +--+--+\n // | | |\n // | +--+\n // | |\n // +-----+\n lineClass = 'rst__lineHalfVerticalTop rst__lineHalfHorizontalRight';\n }\n\n scaffold.push(\n <div\n key={`pre_${1 + i}`}\n style={{width: scaffoldBlockPxWidth}}\n className={classnames('rst__lineBlock', lineClass, rowDirectionClass)}\n />\n );\n\n if (treeIndex !== listIndex && i === swapDepth) {\n // This row has been shifted, and is at the depth of\n // the line pointing to the new destination\n let highlightLineClass = '';\n\n if (listIndex === swapFrom + swapLength - 1) {\n // This block is on the bottom (target) line\n // This block points at the target block (where the row will go when released)\n highlightLineClass = 'rst__highlightBottomLeftCorner';\n } else if (treeIndex === swapFrom) {\n // This block is on the top (source) line\n highlightLineClass = 'rst__highlightTopLeftCorner';\n } else {\n // This block is between the bottom and top\n highlightLineClass = 'rst__highlightLineVertical';\n }\n\n let style;\n if (rowDirection === 'rtl') {\n style = {\n width: scaffoldBlockPxWidth,\n right: scaffoldBlockPxWidth * i\n };\n } else {\n // Default ltr\n style = {\n width: scaffoldBlockPxWidth,\n left: scaffoldBlockPxWidth * i\n };\n }\n\n scaffold.push(\n <div\n // eslint-disable-next-line react/no-array-index-key\n key={i}\n style={style}\n className={classnames('rst__absoluteLineBlock', highlightLineClass, rowDirectionClass)}\n />\n );\n }\n });\n\n let style;\n if (rowDirection === 'rtl') {\n style = {right: scaffoldBlockPxWidth * scaffoldBlockCount};\n } else {\n // Default ltr\n style = {left: scaffoldBlockPxWidth * scaffoldBlockCount};\n }\n\n return connectDropTarget(\n <div {...otherProps} className={classnames('rst__node', rowDirectionClass)}>\n {scaffold}\n\n <div className=\"rst__nodeContent\" style={style}>\n {Children.map(children, (child) =>\n cloneElement(child, {\n isOver,\n canDrop,\n draggedNode\n })\n )}\n </div>\n </div>\n );\n};\n\nTreeNode.defaultProps = {\n swapFrom: null,\n swapDepth: null,\n swapLength: null,\n canDrop: false,\n draggedNode: null,\n rowDirection: 'ltr'\n};\n\nTreeNode.propTypes = {\n treeIndex: PropTypes.number.isRequired,\n treeId: PropTypes.string.isRequired,\n swapFrom: PropTypes.number,\n swapDepth: PropTypes.number,\n swapLength: PropTypes.number,\n scaffoldBlockPxWidth: PropTypes.number.isRequired,\n lowerSiblingCounts: PropTypes.arrayOf(PropTypes.number).isRequired,\n\n listIndex: PropTypes.number.isRequired,\n children: PropTypes.node.isRequired,\n\n // Drop target\n connectDropTarget: PropTypes.func.isRequired,\n isOver: PropTypes.bool.isRequired,\n canDrop: PropTypes.bool,\n draggedNode: PropTypes.shape({}),\n\n // used in dndManager\n getPrevRow: PropTypes.func.isRequired,\n node: PropTypes.shape({}).isRequired,\n path: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])).isRequired,\n\n // rtl support\n rowDirection: PropTypes.string\n};\n\nexport default TreeNode;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isDescendant} from './utils/tree-data-utils';\nimport classnames from './utils/classnames';\n//import {useStyles} from './nodeRendererDefaultStyle';\n\nconst NodeRendererDefault = ({\n scaffoldBlockPxWidth,\n toggleChildrenVisibility,\n connectDragPreview,\n connectDragSource,\n isDragging,\n canDrop,\n canDrag,\n node,\n title,\n subtitle,\n draggedNode,\n path,\n treeIndex,\n isSearchMatch,\n isSearchFocus,\n buttons,\n className,\n style,\n didDrop,\n /* eslint-disable */\n treeId,\n isOver, // Not needed, but preserved for other renderers\n parentNode, // Needed for dndManager\n /* eslint-enable */\n rowDirection,\n ...otherProps\n}) => {\n //useStyles();\n const nodeTitle = title || node.title;\n const nodeSubtitle = subtitle || node.subtitle;\n const rowDirectionClass = rowDirection === 'rtl' ? 'rst__rtl' : null;\n\n let handle;\n if (canDrag) {\n if (typeof node.children === 'function' && node.expanded) {\n // Show a loading symbol on the handle when the children are expanded\n // and yet still defined by a function (a callback to fetch the children)\n handle = (\n <div className=\"rst__loadingHandle\">\n <div className=\"rst__loadingCircle\">\n {[...new Array(12)].map((_, index) => (\n <div\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n className={classnames('rst__loadingCirclePoint', rowDirectionClass)}\n />\n ))}\n </div>\n </div>\n );\n } else {\n // Show the handle used to initiate a drag-and-drop\n handle = connectDragSource(<div className=\"rst__moveHandle\" />, {\n dropEffect: 'copy'\n });\n }\n }\n\n const isDraggedDescendant = draggedNode && isDescendant(draggedNode, node);\n const isLandingPadActive = !didDrop && isDragging;\n\n let buttonStyle = {left: -0.5 * scaffoldBlockPxWidth};\n if (rowDirection === 'rtl') {\n buttonStyle = {right: -0.5 * scaffoldBlockPxWidth};\n }\n\n return (\n <div style={{height: '100%'}} {...otherProps}>\n {toggleChildrenVisibility &&\n node.children &&\n (node.children.length > 0 || typeof node.children === 'function') && (\n <div>\n <button\n type=\"button\"\n aria-label={node.expanded ? 'Collapse' : 'Expand'}\n className={classnames(\n node.expanded ? 'rst__collapseButton' : 'rst__expandButton',\n rowDirectionClass\n )}\n style={buttonStyle}\n onClick={() =>\n toggleChildrenVisibility({\n node,\n path,\n treeIndex\n })\n }\n />\n\n {node.expanded && !isDragging && (\n <div\n style={{width: scaffoldBlockPxWidth}}\n className={classnames('rst__lineChildren', rowDirectionClass)}\n />\n )}\n </div>\n )}\n\n <div className={classnames('rst__rowWrapper', rowDirectionClass)}>\n {/* Set the row preview to be used during drag and drop */}\n {connectDragPreview(\n <div\n className={classnames(\n 'rst__row',\n isLandingPadActive && 'rst__rowLandingPad',\n isLandingPadActive && !canDrop && 'rst__rowCancelPad',\n isSearchMatch && 'rst__rowSearchMatch',\n isSearchFocus && 'rst__rowSearchFocus',\n rowDirectionClass,\n className\n )}\n style={{\n opacity: isDraggedDescendant ? 0.5 : 1,\n ...style\n }}\n >\n {handle}\n\n <div\n className={classnames(\n 'rst__rowContents',\n !canDrag && 'rst__rowContentsDragDisabled',\n rowDirectionClass\n )}\n >\n <div className={classnames('rst__rowLabel', rowDirectionClass)}>\n <span\n className={classnames(\n 'rst__rowTitle',\n node.subtitle && 'rst__rowTitleWithSubtitle'\n )}\n >\n {typeof nodeTitle === 'function'\n ? nodeTitle({\n node,\n path,\n treeIndex\n })\n : nodeTitle}\n </span>\n\n {nodeSubtitle && (\n <span className=\"rst__rowSubtitle\">\n {typeof nodeSubtitle === 'function'\n ? nodeSubtitle({\n node,\n path,\n treeIndex\n })\n : nodeSubtitle}\n </span>\n )}\n </div>\n\n <div className=\"rst__rowToolbar\">\n {buttons.map((btn, index) => (\n <div\n key={index} // eslint-disable-line react/no-array-index-key\n className=\"rst__toolbarButton\"\n >\n {btn}\n </div>\n ))}\n </div>\n </div>\n </div>\n )}\n </div>\n </div>\n );\n};\n\nNodeRendererDefault.defaultProps = {\n isSearchMatch: false,\n isSearchFocus: false,\n canDrag: false,\n toggleChildrenVisibility: null,\n buttons: [],\n className: '',\n style: {},\n parentNode: null,\n draggedNode: null,\n canDrop: false,\n title: null,\n subtitle: null,\n rowDirection: 'ltr'\n};\n\nNodeRendererDefault.propTypes = {\n node: PropTypes.shape({}).isRequired,\n title: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n subtitle: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n path: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])).isRequired,\n treeIndex: PropTypes.number.isRequired,\n treeId: PropTypes.string.isRequired,\n isSearchMatch: PropTypes.bool,\n isSearchFocus: PropTypes.bool,\n canDrag: PropTypes.bool,\n scaffoldBlockPxWidth: PropTypes.number.isRequired,\n toggleChildrenVisibility: PropTypes.func,\n buttons: PropTypes.arrayOf(PropTypes.node),\n className: PropTypes.string,\n style: PropTypes.shape({}),\n\n // Drag and drop API functions\n // Drag source\n connectDragPreview: PropTypes.func.isRequired,\n connectDragSource: PropTypes.func.isRequired,\n parentNode: PropTypes.shape({}), // Needed for dndManager\n isDragging: PropTypes.bool.isRequired,\n didDrop: PropTypes.bool.isRequired,\n draggedNode: PropTypes.shape({}),\n // Drop target\n isOver: PropTypes.bool.isRequired,\n canDrop: PropTypes.bool,\n\n // rtl support\n rowDirection: PropTypes.string\n};\n\nexport default NodeRendererDefault;\n","import React, {Children, cloneElement, Component} from 'react';\nimport PropTypes from 'prop-types';\n\nclass TreePlaceholder extends Component {\n render() {\n // eslint-disable-next-line no-unused-vars\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {children, connectDropTarget, treeId, drop, ...otherProps} = this.props;\n return connectDropTarget(\n <div>\n {Children.map(children, (child) =>\n cloneElement(child, {\n ...otherProps\n })\n )}\n </div>\n );\n }\n}\n\nTreePlaceholder.defaultProps = {\n canDrop: false,\n draggedNode: null\n};\n\nTreePlaceholder.propTypes = {\n children: PropTypes.node.isRequired,\n\n // Drop target\n connectDropTarget: PropTypes.func.isRequired,\n isOver: PropTypes.bool.isRequired,\n canDrop: PropTypes.bool,\n draggedNode: PropTypes.shape({}),\n treeId: PropTypes.string.isRequired,\n drop: PropTypes.func.isRequired\n};\n\nexport default TreePlaceholder;\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles(() => ({\n '@global .rst__placeholder': {\n position: 'relative',\n height: '68px',\n maxWidth: '300px',\n padding: '10px'\n },\n '@global .rst__placeholder, .rst__placeholder > *': {\n boxSizing: 'border-box'\n },\n '@global .rst__placeholder::before': {\n border: '3px dashed #d9d9d9',\n content: '',\n position: 'absolute',\n top: '5px',\n right: '5px',\n bottom: '5px',\n left: '5px',\n zIndex: -1\n },\n\n /**\n * The outline of where the element will go if dropped, displayed while dragging\n */\n '@global .rst__placeholderLandingPad, .rst__placeholderCancelPad': {\n border: 'none !important',\n boxShadow: 'none !important',\n outline: 'none !important'\n },\n '@global .rst__placeholderLandingPad *, .rst__placeholderCancelPad *': {\n opacity: '0 !important'\n },\n '@global .rst__placeholderLandingPad::before, .rst__placeholderCancelPad::before': {\n backgroundColor: 'lightblue',\n borderColor: 'white'\n },\n\n /**\n * Alternate appearance of the landing pad when the dragged location is invalid\n */\n '@global .rst__placeholderCancelPad::before': {\n backgroundColor: '#e6a8ad'\n }\n}));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from './utils/classnames';\nimport {useStyles} from './placeholderRendererDefaultStyle';\n\nconst PlaceholderRendererDefault = ({isOver, canDrop}) => {\n useStyles();\n return (\n <div\n className={classnames(\n 'rst__placeholder',\n canDrop && 'rst__placeholderLandingPad',\n canDrop && !isOver && 'rst__placeholderCancelPad'\n )}\n />\n );\n};\n\nPlaceholderRendererDefault.defaultProps = {\n isOver: false,\n canDrop: false\n};\n\nPlaceholderRendererDefault.propTypes = {\n isOver: PropTypes.bool,\n canDrop: PropTypes.bool\n};\n\nexport default PlaceholderRendererDefault;\n","import {insertNode, getDescendantCount, getFlatDataFromTree} from './tree-data-utils';\n\nconst memoize = (f) => {\n let savedArgsArray = [];\n let savedKeysArray = [];\n let savedResult = null;\n\n return (args) => {\n const keysArray = Object.keys(args).sort();\n const argsArray = keysArray.map((key) => args[key]);\n\n // If the arguments for the last insert operation are different than this time,\n // recalculate the result\n if (\n argsArray.length !== savedArgsArray.length ||\n argsArray.some((arg, index) => arg !== savedArgsArray[index]) ||\n keysArray.some((key, index) => key !== savedKeysArray[index])\n ) {\n savedArgsArray = argsArray;\n savedKeysArray = keysArray;\n savedResult = f(args);\n }\n\n return savedResult;\n };\n};\n\nexport const memoizedInsertNode = memoize(insertNode);\nexport const memoizedGetFlatDataFromTree = memoize(getFlatDataFromTree);\nexport const memoizedGetDescendantCount = memoize(getDescendantCount);\n","import {DragSource as dragSource, DropTarget as dropTarget} from 'react-dnd';\nimport {findDOMNode} from 'react-dom';\nimport {equals} from 'ramda';\nimport {getDepth} from './tree-data-utils';\nimport {memoizedInsertNode} from './memoized-tree-data-utils';\n\nexport default class DndManager {\n constructor(treeRef) {\n this.treeRef = treeRef;\n this.resetDragVariables();\n }\n\n get startDrag() {\n return this.treeRef.startDrag;\n }\n\n get dragHover() {\n return this.treeRef.dragHover;\n }\n\n get endDrag() {\n return this.treeRef.endDrag;\n }\n\n get drop() {\n return this.treeRef.drop;\n }\n\n get treeId() {\n return this.treeRef.treeId;\n }\n\n get dndType() {\n return this.treeRef.dndType;\n }\n\n get treeData() {\n return this.treeRef.state.draggingTreeData || this.treeRef.props.treeData;\n }\n\n get getNodeKey() {\n return this.treeRef.props.getNodeKey;\n }\n\n get customCanDrop() {\n return this.treeRef.props.canDrop;\n }\n\n get maxDepth() {\n return this.treeRef.props.maxDepth;\n }\n\n resetDragVariables() {\n this.lastDropTargetNode = null;\n this.lastDropTargetDepth = null;\n this.hoverProps = null;\n this.lastCanDropResult = null;\n this.lastCanDropProps = null;\n this.shouldSkipMoreFrames = false;\n this.rafId = null;\n }\n getTargetDepth(dropTargetProps, monitor, component) {\n let dropTargetDepth = 0;\n\n const rowAbove = dropTargetProps.getPrevRow();\n if (rowAbove) {\n let {path} = rowAbove;\n const aboveNodeCannotHaveChildren = !this.treeRef.canNodeHaveChildren(rowAbove.node);\n if (aboveNodeCannotHaveChildren) {\n path = path.slice(0, path.length - 1);\n }\n\n // Limit the length of the path to the deepest possible\n dropTargetDepth = Math.min(path.length, dropTargetProps.path.length);\n }\n\n let blocksOffset;\n let dragSourceInitialDepth = (monitor.getItem().path || []).length;\n\n // When adding node from external source\n if (monitor.getItem().treeId !== this.treeId) {\n // Ignore the tree depth of the source, if it had any to begin with\n dragSourceInitialDepth = 0;\n\n if (component) {\n const relativePosition = findDOMNode(component).getBoundingClientRect(); // eslint-disable-line react/no-find-dom-node\n const leftShift = monitor.getSourceClientOffset().x - relativePosition.left;\n blocksOffset = Math.round(leftShift / dropTargetProps.scaffoldBlockPxWidth);\n } else {\n blocksOffset = dropTargetProps.path.length;\n }\n } else {\n // handle row direction support\n const direction = dropTargetProps.rowDirection === 'rtl' ? -1 : 1;\n\n blocksOffset = Math.round(\n (direction * monitor.getDifferenceFromInitialOffset().x) / dropTargetProps.scaffoldBlockPxWidth\n );\n }\n\n let targetDepth = Math.min(dropTargetDepth, Math.max(0, dragSourceInitialDepth + blocksOffset - 1));\n\n // If a maxDepth is defined, constrain the target depth\n if (typeof this.maxDepth !== 'undefined' && this.maxDepth !== null) {\n const draggedNode = monitor.getItem().node;\n const draggedChildDepth = getDepth(draggedNode);\n\n targetDepth = Math.max(0, Math.min(targetDepth, this.maxDepth - draggedChildDepth - 1));\n }\n\n return targetDepth;\n }\n\n canDrop(dropTargetProps, monitor) {\n if (!monitor.isOver()) {\n return false;\n }\n\n const rowAbove = dropTargetProps.getPrevRow();\n const abovePath = rowAbove ? rowAbove.path : [];\n const aboveNode = rowAbove ? rowAbove.node : {};\n const blocksOffset = Math.round(\n monitor.getDifferenceFromInitialOffset().x / dropTargetProps.scaffoldBlockPxWidth\n );\n const newCanDropProps = {\n nodeId: dropTargetProps.node.nodeId !== undefined ? dropTargetProps.node.nodeId : dropTargetProps.node,\n rowAbove,\n abovePath,\n aboveNodeId: aboveNode.nodeId !== undefined ? aboveNode.nodeId : aboveNode,\n blocksOffset\n };\n if (equals(this.lastCanDropProps, newCanDropProps)) {\n return this.lastCanDropResult;\n }\n this.lastCanDropProps = newCanDropProps;\n const targetDepth = this.getTargetDepth(dropTargetProps, monitor, null);\n\n // Cannot drop if we're adding to the children of the row above and\n // the row above is a function\n if (targetDepth >= abovePath.length && typeof aboveNode.children === 'function') {\n return (this.lastCanDropResult = false);\n }\n\n if (typeof this.customCanDrop === 'function') {\n const {node} = monitor.getItem();\n const addedResult = memoizedInsertNode({\n treeData: this.treeData,\n newNode: node,\n depth: targetDepth,\n getNodeKey: this.getNodeKey,\n minimumTreeIndex: dropTargetProps.listIndex,\n expandParent: true\n });\n\n return (this.lastCanDropResult = this.customCanDrop({\n node,\n prevPath: monitor.getItem().path,\n prevParent: monitor.getItem().parentNode,\n prevTreeIndex: monitor.getItem().treeIndex, // Equals -1 when dragged from external tree\n nextPath: addedResult.path,\n nextParent: addedResult.parentNode,\n nextTreeIndex: addedResult.treeIndex\n }));\n }\n return (this.lastCanDropResult = true);\n }\n\n wrapSource(el) {\n const nodeDragSource = {\n beginDrag: (props) => {\n this.startDrag(props);\n\n return {\n node: props.node,\n parentNode: props.parentNode,\n path: props.path,\n treeIndex: props.treeIndex,\n treeId: props.treeId\n };\n },\n\n endDrag: (props, monitor) => {\n if (this.rafId) {\n cancelAnimationFrame(this.rafId);\n }\n this.endDrag(monitor.getDropResult());\n this.resetDragVariables();\n },\n\n isDragging: (props, monitor) => {\n const dropTargetNode = monitor.getItem().node;\n const draggedNode = props.node;\n\n return draggedNode === dropTargetNode;\n }\n };\n\n function nodeDragSourcePropInjection(connect, monitor) {\n return {\n connectDragSource: connect.dragSource(),\n connectDragPreview: connect.dragPreview(),\n isDragging: monitor.isDragging(),\n didDrop: monitor.didDrop()\n };\n }\n\n return dragSource(this.dndType, nodeDragSource, nodeDragSourcePropInjection)(el);\n }\n hoverHandler = () => {\n if (this.hoverProps === null) {\n return;\n }\n const {dropTargetProps, monitor, component} = this.hoverProps;\n\n const item = monitor.getItem();\n if (!item) {\n return;\n }\n const targetDepth = this.getTargetDepth(dropTargetProps, monitor, component);\n const draggedNode = item.node;\n const needsRedraw =\n dropTargetProps.node !== this.lastDropTargetNode || targetDepth !== this.lastDropTargetDepth;\n\n if (!needsRedraw) {\n return;\n }\n this.lastDropTargetNode = dropTargetProps.node;\n this.lastDropTargetDepth = targetDepth;\n\n this.dragHover({\n node: draggedNode,\n path: item.path,\n minimumTreeIndex: dropTargetProps.listIndex,\n depth: targetDepth\n });\n\n this.hoverProps = null;\n };\n\n deferredCallHoverHandler = () => {\n if (this.shouldSkipMoreFrames) {\n this.shouldSkipMoreFrames = false;\n this.rafId = requestAnimationFrame(this.deferredCallHoverHandler);\n return;\n }\n this.rafId = null;\n this.hoverHandler();\n };\n\n wrapTarget(el) {\n const nodeDropTarget = {\n drop: (dropTargetProps, monitor, component) => {\n if (this.rafId) {\n cancelAnimationFrame(this.rafId);\n }\n const result = {\n node: monitor.getItem().node,\n path: monitor.getItem().path,\n treeIndex: monitor.getItem().treeIndex,\n treeId: this.treeId,\n minimumTreeIndex: dropTargetProps.treeIndex,\n depth: this.getTargetDepth(dropTargetProps, monitor, component)\n };\n this.lastDropTargetNode = null;\n this.drop(result);\n\n return result;\n },\n\n hover: (dropTargetProps, monitor, component) => {\n if (this.rafId) {\n this.shouldSkipMoreFrames = true;\n return;\n }\n this.shouldSkipMoreFrames = false;\n this.hoverProps = {\n dropTargetProps,\n monitor,\n component\n };\n this.rafId = requestAnimationFrame(this.deferredCallHoverHandler);\n },\n\n canDrop: this.canDrop.bind(this)\n };\n\n function nodeDropTargetPropInjection(connect, monitor) {\n const dragged = monitor.getItem();\n return {\n connectDropTarget: connect.dropTarget(),\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop(),\n draggedNode: dragged ? dragged.node : null\n };\n }\n\n return dropTarget(this.dndType, nodeDropTarget, nodeDropTargetPropInjection)(el);\n }\n\n wrapPlaceholder(el) {\n const placeholderDropTarget = {\n drop: (dropTargetProps, monitor) => {\n const {node, path, treeIndex} = monitor.getItem();\n const result = {\n node,\n path,\n treeIndex,\n treeId: this.treeId,\n minimumTreeIndex: 0,\n depth: 0\n };\n\n this.drop(result);\n\n return result;\n }\n };\n\n function placeholderPropInjection(connect, monitor) {\n const dragged = monitor.getItem();\n return {\n connectDropTarget: connect.dropTarget(),\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop(),\n draggedNode: dragged ? dragged.node : null\n };\n }\n\n return dropTarget(this.dndType, placeholderDropTarget, placeholderPropInjection)(el);\n }\n}\n","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport {AutoSizer, List} from 'react-virtualized';\nimport {equals, append, when, always, gt, uniqWith, eqBy, pipe} from 'ramda';\nimport withScrolling, {\n createScrollingComponent,\n createVerticalStrength,\n createHorizontalStrength\n} from 'frontend-collective-react-dnd-scrollzone';\nimport {DndContext} from 'react-dnd';\nimport {polyfill} from 'react-lifecycles-compat';\nimport withStyles from '@mui/styles/withStyles';\nimport {DragAndDrop} from '../DragAndDrop/DragAndDrop';\nimport TreeNode from './tree-node';\nimport NodeRendererDefault from './node-renderer-default';\nimport TreePlaceholder from './tree-placeholder';\nimport PlaceholderRendererDefault from './placeholder-renderer-default';\nimport {walk, changeNodeAtPath, removeNode, insertNode, find, toggleExpandedForAll} from './utils/tree-data-utils';\nimport {\n memoizedInsertNode,\n memoizedGetFlatDataFromTree,\n memoizedGetDescendantCount\n} from './utils/memoized-tree-data-utils';\nimport {slideRows} from './utils/generic-utils';\nimport {defaultGetNodeKey, defaultSearchMethod} from './utils/default-handlers';\nimport DndManager from './utils/dnd-manager';\nimport classnames from './utils/classnames';\nimport {styles} from './reactSortableTreeStyles';\n\nlet treeIdCounter = 1;\n\nconst mergeTheme = (props) => {\n const merged = {\n ...props,\n style: {...props.theme.style, ...props.style},\n innerStyle: {...props.theme.innerStyle, ...props.innerStyle},\n reactVirtualizedListProps: {\n ...props.theme.reactVirtualizedListProps,\n ...props.reactVirtualizedListProps\n }\n };\n\n const overridableDefaults = {\n nodeContentRenderer: NodeRendererDefault,\n placeholderRenderer: PlaceholderRendererDefault,\n rowHeight: 62,\n scaffoldBlockPxWidth: 44,\n slideRegionSize: 100,\n treeNodeRenderer: TreeNode\n };\n Object.keys(overridableDefaults).forEach((propKey) => {\n // If prop has been specified, do not change it\n // If prop is specified in theme, use the theme setting\n // If all else fails, fall back to the default\n if (props[propKey] === null) {\n merged[propKey] =\n typeof props.theme[propKey] !== 'undefined' ? props.theme[propKey] : overridableDefaults[propKey];\n }\n });\n\n return merged;\n};\n\nclass ReactSortableTree extends Component {\n constructor(props) {\n super(props);\n\n const {dndType, nodeContentRenderer, treeNodeRenderer, isVirtualized, slideRegionSize} = mergeTheme(props);\n\n this.dndManager = new DndManager(this);\n\n // Wrapping classes for use with react-dnd\n this.treeId = `rst__${treeIdCounter}`;\n treeIdCounter += 1;\n this.dndType = dndType || this.treeId;\n this.nodeContentRenderer = this.dndManager.wrapSource(nodeContentRenderer);\n this.treePlaceholderRenderer = this.dndManager.wrapPlaceholder(TreePlaceholder);\n this.treeNodeRenderer = this.dndManager.wrapTarget(treeNodeRenderer);\n\n // Prepare scroll-on-drag options for this list\n if (isVirtualized) {\n this.scrollZoneVirtualList = (createScrollingComponent || withScrolling)(List);\n this.vStrength = createVerticalStrength(slideRegionSize);\n this.hStrength = createHorizontalStrength(slideRegionSize);\n }\n\n this.state = {\n draggingTreeData: null,\n draggedNode: null,\n draggedMinimumTreeIndex: null,\n draggedDepth: null,\n searchMatches: [],\n searchFocusTreeIndex: null,\n dragging: false,\n draggingExpandedPaths: [],\n ignoreOneTreeUpdate: false,\n\n // props that need to be used in gDSFP or static functions will be stored here\n instanceProps: {\n treeData: this.props.treeData || [],\n searchQuery: null,\n searchFocusOffset: null,\n ignoreTreeChanges: false\n }\n };\n\n this.toggleChildrenVisibility = this.toggleChildrenVisibility.bind(this);\n this.moveNode = this.moveNode.bind(this);\n this.startDrag = this.startDrag.bind(this);\n this.dragHover = this.dragHover.bind(this);\n this.endDrag = this.endDrag.bind(this);\n this.drop = this.drop.bind(this);\n this.handleDndMonitorChange = this.handleDndMonitorChange.bind(this);\n }\n\n componentDidMount() {\n ReactSortableTree.loadLazyChildren(this.props);\n const stateUpdate = ReactSortableTree.search(this.props, this.state, true, true, false);\n this.setState(stateUpdate);\n\n // Hook into react-dnd state changes to detect when the drag ends\n // TODO: This is very brittle, so it needs to be replaced if react-dnd\n // offers a more official way to detect when a drag ends\n this.clearMonitorSubscription = this.props.dragDropManager\n .getMonitor()\n .subscribeToStateChange(this.handleDndMonitorChange);\n }\n\n static getDerivedStateFromProps(nextProps, prevState) {\n const {instanceProps} = prevState;\n const newState = {};\n\n if (!equals(instanceProps.searchQuery, nextProps.searchQuery)) {\n Object.assign(newState, ReactSortableTree.search(nextProps, prevState, true, true, false));\n } else if (instanceProps.searchFocusOffset !== nextProps.searchFocusOffset) {\n Object.assign(newState, ReactSortableTree.search(nextProps, prevState, true, true, true));\n }\n\n instanceProps.searchQuery = nextProps.searchQuery;\n instanceProps.searchFocusOffset = nextProps.searchFocusOffset;\n newState.instanceProps = instanceProps;\n\n return newState;\n }\n\n // listen to dragging\n componentDidUpdate(prevProps, prevState) {\n // if it is not the same then call the onDragStateChanged\n if (this.state.dragging !== prevState.dragging) {\n if (this.props.onDragStateChanged) {\n this.props.onDragStateChanged({\n isDragging: this.state.dragging,\n draggedNode: this.state.draggedNode\n });\n }\n }\n if (this.state.dragging) {\n const isTreeDataEqual = equals(this.props.treeData, prevProps.treeData);\n if (!isTreeDataEqual) {\n const {treeData: draggingTreeData} = removeNode({\n treeData: this.props.treeData,\n path: prevState.draggedPath,\n getNodeKey: this.props.getNodeKey\n });\n\n this.setState(({draggingExpandedPaths}) => ({\n draggingTreeData: draggingExpandedPaths.reduce((treeData, path) => {\n let newTree;\n try {\n newTree = changeNodeAtPath({\n treeData,\n path,\n newNode: ({node}) => ({...node, expanded: true}),\n getNodeKey: this.props.getNodeKey\n });\n } catch (e) {\n newTree = treeData;\n }\n return newTree;\n }, draggingTreeData)\n }));\n } else if (this.state.draggingTreeData && prevState.draggingTreeData !== this.state.draggingTreeData) {\n walk({\n treeData: this.state.draggingTreeData,\n getNodeKey: this.props.getNodeKey,\n callback: ({node, path, lowerSiblingCounts, treeIndex}) => {\n if (node.pending && node.expanded) {\n this.props.onLazyLoadChildren({\n node,\n path,\n lowerSiblingCounts,\n treeIndex\n });\n }\n }\n });\n }\n } else if (this.props.treeData !== prevProps.treeData) {\n const isTreeDataEqual = equals(this.props.treeData, prevProps.treeData);\n const {ignoreOneTreeUpdate, instanceProps} = this.state;\n const newState = {};\n if (!isTreeDataEqual) {\n if (ignoreOneTreeUpdate) {\n newState.ignoreOneTreeUpdate = false;\n } else {\n newState.searchFocusTreeIndex = null;\n ReactSortableTree.loadLazyChildren(this.props);\n Object.assign(newState, ReactSortableTree.search(this.props, this.state, false, false, false));\n }\n\n newState.draggingTreeData = null;\n newState.draggedNode = null;\n newState.draggedMinimumTreeIndex = null;\n newState.draggedDepth = null;\n newState.dragging = false;\n newState.draggingExpandedPaths = [];\n newState.instanceProps = {...instanceProps, treeData: this.props.treeData};\n\n this.setState(newState);\n }\n }\n }\n\n componentWillUnmount() {\n this.clearMonitorSubscription();\n }\n\n getRows(treeData) {\n return memoizedGetFlatDataFromTree({\n ignoreCollapsed: true,\n getNodeKey: this.props.getNodeKey,\n treeData\n });\n }\n\n handleDndMonitorChange() {\n const monitor = this.props.dragDropManager.getMonitor();\n // If the drag ends and the tree is still in a mid-drag state,\n // it means that the drag was canceled or the dragSource dropped\n // elsewhere, and we should reset the state of this tree\n if (!monitor.isDragging() && this.state.draggingTreeData) {\n this.endDrag();\n }\n }\n\n toggleChildrenVisibility({node: targetNode, path}) {\n const {instanceProps} = this.state;\n\n const treeData = changeNodeAtPath({\n treeData: instanceProps.treeData,\n path,\n newNode: ({node}) => ({...node, expanded: !node.expanded}),\n getNodeKey: this.props.getNodeKey\n });\n\n this.props.onChange(treeData);\n\n this.props.onVisibilityToggle({\n treeData,\n node: targetNode,\n expanded: !targetNode.expanded,\n path\n });\n }\n\n moveNode({node, path: prevPath, treeIndex: prevTreeIndex, depth, minimumTreeIndex}) {\n const {\n treeData,\n treeIndex,\n path,\n parentNode: nextParentNode\n } = insertNode({\n treeData: this.state.draggingTreeData,\n newNode: node,\n depth,\n minimumTreeIndex,\n expandParent: true,\n getNodeKey: this.props.getNodeKey\n });\n this.setState(\n {\n draggingTreeData: null,\n draggedNode: null,\n draggedMinimumTreeIndex: null,\n draggedDepth: null,\n dragging: false,\n draggingExpandedPaths: []\n },\n () => {\n this.props.onChange(treeData);\n\n this.props.onMoveNode({\n treeData,\n node,\n treeIndex,\n path,\n nextPath: path,\n nextTreeIndex: treeIndex,\n prevPath,\n prevTreeIndex,\n nextParentNode\n });\n }\n );\n }\n\n // returns the new state after search\n static search(props, state, seekIndex, expand, singleSearch) {\n const {\n onChange,\n getNodeKey,\n searchFinishCallback,\n searchQuery,\n searchMethod,\n searchFocusOffset,\n onlyExpandSearchedNodes\n } = props;\n\n const {instanceProps} = state;\n\n // Skip search if no conditions are specified\n if (!searchQuery && !searchMethod) {\n if (searchFinishCallback) {\n searchFinishCallback([]);\n }\n\n return {searchMatches: []};\n }\n\n const newState = {};\n\n // if onlyExpandSearchedNodes collapse the tree and search\n const {treeData: expandedTreeData, matches: searchMatches} = find({\n getNodeKey,\n treeData: onlyExpandSearchedNodes\n ? toggleExpandedForAll({\n treeData: instanceProps.treeData,\n expanded: false\n })\n : instanceProps.treeData,\n searchQuery,\n searchMethod: searchMethod || defaultSearchMethod,\n searchFocusOffset,\n expandAllMatchPaths: expand && !singleSearch,\n expandFocusMatchPaths: !!expand\n });\n\n // Update the tree with data leaving all paths leading to matching nodes open\n if (expand) {\n newState.ignoreOneTreeUpdate = true; // Prevents infinite loop\n onChange(expandedTreeData);\n }\n\n if (searchFinishCallback) {\n searchFinishCallback(searchMatches);\n }\n\n let searchFocusTreeIndex = null;\n if (seekIndex && searchFocusOffset !== null && searchFocusOffset < searchMatches.length) {\n searchFocusTreeIndex = searchMatches[searchFocusOffset].treeIndex;\n }\n\n newState.searchMatches = searchMatches;\n newState.searchFocusTreeIndex = searchFocusTreeIndex;\n\n return newState;\n }\n\n startDrag({path}) {\n this.setState((prevState) => {\n const {\n treeData: draggingTreeData,\n node: draggedNode,\n treeIndex: draggedMinimumTreeIndex\n } = removeNode({\n treeData: prevState.instanceProps.treeData,\n path,\n getNodeKey: this.props.getNodeKey\n });\n\n return {\n draggingTreeData,\n draggedNode,\n draggedDepth: path.length - 1,\n draggedMinimumTreeIndex,\n draggedPath: path,\n dragging: true\n };\n });\n }\n\n dragHover({node: draggedNode, depth: draggedDepth, minimumTreeIndex: draggedMinimumTreeIndex}) {\n // Ignore this hover if it is at the same position as the last hover\n if (\n this.state.draggedDepth === draggedDepth &&\n this.state.draggedMinimumTreeIndex === draggedMinimumTreeIndex\n ) {\n return;\n }\n this.setState(({draggingTreeData, instanceProps, draggingExpandedPaths}) => {\n // Fall back to the tree data if something is being dragged in from\n // an external element\n const newDraggingTreeData = draggingTreeData || instanceProps.treeData;\n\n const addedResult = memoizedInsertNode({\n treeData: newDraggingTreeData,\n newNode: draggedNode,\n depth: draggedDepth,\n minimumTreeIndex: draggedMinimumTreeIndex,\n expandParent: true,\n getNodeKey: this.props.getNodeKey\n });\n\n const rows = this.getRows(addedResult.treeData);\n const expandedParentPath = rows[addedResult.treeIndex].path;\n const nodePath = expandedParentPath.slice(0, -1);\n\n const newDraggingExpandedPaths = pipe(\n when(always(gt(nodePath.length, 0)), append(nodePath)),\n uniqWith(eqBy(String))\n )(draggingExpandedPaths);\n return {\n draggedNode,\n draggedDepth,\n draggedMinimumTreeIndex,\n draggingTreeData: changeNodeAtPath({\n treeData: newDraggingTreeData,\n path: nodePath,\n newNode: ({node}) => ({...node, expanded: true}),\n getNodeKey: this.props.getNodeKey\n }),\n // reset the scroll focus so it doesn't jump back\n // to a search result while dragging\n searchFocusTreeIndex: null,\n dragging: true,\n draggingExpandedPaths: newDraggingExpandedPaths\n };\n });\n }\n\n endDrag(dropResult) {\n const {instanceProps} = this.state;\n\n const resetTree = () =>\n this.setState({\n draggingTreeData: null,\n draggedNode: null,\n draggedMinimumTreeIndex: null,\n draggedDepth: null,\n dragging: false\n });\n\n // Drop was cancelled\n if (!dropResult) {\n resetTree();\n } else if (dropResult.treeId !== this.treeId) {\n // The node was dropped in an external drop target or tree\n const {node, path, treeIndex} = dropResult;\n let shouldCopy = this.props.shouldCopyOnOutsideDrop;\n if (typeof shouldCopy === 'function') {\n shouldCopy = shouldCopy({\n node,\n prevTreeIndex: treeIndex,\n prevPath: path\n });\n }\n\n let treeData = this.state.draggingTreeData || instanceProps.treeData;\n\n // If copying is enabled, a drop outside leaves behind a copy in the\n // source tree\n if (shouldCopy) {\n treeData = changeNodeAtPath({\n treeData: instanceProps.treeData, // use treeData unaltered by the drag operation\n path,\n newNode: ({node: copyNode}) => ({...copyNode}), // create a shallow copy of the node\n getNodeKey: this.props.getNodeKey\n });\n }\n\n this.props.onChange(treeData);\n\n this.props.onMoveNode({\n treeData,\n node,\n treeIndex: null,\n path: null,\n nextPath: null,\n nextTreeIndex: null,\n prevPath: path,\n prevTreeIndex: treeIndex\n });\n }\n }\n\n drop(dropResult) {\n this.moveNode(dropResult);\n }\n\n canNodeHaveChildren(node) {\n const {canNodeHaveChildren} = this.props;\n if (canNodeHaveChildren) {\n return canNodeHaveChildren(node);\n }\n return true;\n }\n\n // Load any children in the tree that are given by a function\n // calls the onChange callback on the new treeData\n static loadLazyChildren(props) {\n walk({\n treeData: props.treeData,\n getNodeKey: props.getNodeKey,\n callback: ({node, path, lowerSiblingCounts, treeIndex}) => {\n // If the node has children defined by a function, and is either expanded\n // or set to load even before expansion, run the function.\n if (node.pending && (node.expanded || props.loadCollapsedLazyChildren)) {\n // Call the children fetching function\n props.onLazyLoadChildren({\n node,\n path,\n lowerSiblingCounts,\n treeIndex,\n\n // Provide a helper to append the new data when it is received\n done: (childrenArray) =>\n props.onChange(\n changeNodeAtPath({\n treeData: props.treeData,\n path,\n newNode: ({node: oldNode}) =>\n // Only replace the old node if it's the one we set off to find children\n // for in the first place\n oldNode === node\n ? {\n ...oldNode,\n children: childrenArray\n }\n : oldNode,\n getNodeKey: props.getNodeKey\n }),\n true\n )\n });\n }\n }\n });\n }\n\n renderRow(row, {listIndex, style, getPrevRow, matchKeys, swapFrom, swapDepth, swapLength}) {\n const {node, parentNode, path, lowerSiblingCounts, treeIndex} = row;\n\n const {canDrag, generateNodeProps, scaffoldBlockPxWidth, searchFocusOffset, rowDirection} = mergeTheme(\n this.props\n );\n const TreeNodeRenderer = this.treeNodeRenderer;\n const NodeContentRenderer = this.nodeContentRenderer;\n const nodeKey = path[path.length - 1];\n const isSearchMatch = nodeKey in matchKeys;\n const isSearchFocus = isSearchMatch && matchKeys[nodeKey] === searchFocusOffset;\n const callbackParams = {\n node,\n parentNode,\n path,\n lowerSiblingCounts,\n treeIndex,\n isSearchMatch,\n isSearchFocus\n };\n const nodeProps = !generateNodeProps ? {} : generateNodeProps(callbackParams);\n const rowCanDrag = typeof canDrag !== 'function' ? canDrag : canDrag(callbackParams);\n\n const sharedProps = {\n treeIndex,\n scaffoldBlockPxWidth,\n node,\n path,\n treeId: this.treeId,\n rowDirection\n };\n\n return (\n <TreeNodeRenderer\n style={style}\n key={nodeKey}\n listIndex={listIndex}\n getPrevRow={getPrevRow}\n lowerSiblingCounts={lowerSiblingCounts}\n swapFrom={swapFrom}\n swapLength={swapLength}\n swapDepth={swapDepth}\n {...sharedProps}\n >\n <NodeContentRenderer\n parentNode={parentNode}\n isSearchMatch={isSearchMatch}\n isSearchFocus={isSearchFocus}\n canDrag={rowCanDrag}\n toggleChildrenVisibility={this.toggleChildrenVisibility}\n {...sharedProps}\n {...nodeProps}\n />\n </TreeNodeRenderer>\n );\n }\n\n render() {\n const {\n dragDropManager,\n style,\n className,\n innerStyle,\n rowHeight,\n isVirtualized,\n placeholderRenderer,\n reactVirtualizedListProps,\n getNodeKey,\n rowDirection\n } = mergeTheme(this.props);\n const {searchMatches, searchFocusTreeIndex, draggedNode, draggedDepth, draggedMinimumTreeIndex} = this.state;\n\n const treeData = this.state.draggingTreeData || this.props.treeData;\n const rowDirectionClass = rowDirection === 'rtl' ? 'rst__rtl' : null;\n\n let rows;\n let swapFrom = null;\n let swapLength = null;\n if (draggedNode && draggedMinimumTreeIndex !== null) {\n const addedResult = memoizedInsertNode({\n treeData,\n newNode: draggedNode,\n depth: draggedDepth,\n minimumTreeIndex: draggedMinimumTreeIndex,\n expandParent: true,\n getNodeKey\n });\n\n const swapTo = draggedMinimumTreeIndex;\n swapFrom = addedResult.treeIndex;\n swapLength = 1 + memoizedGetDescendantCount({node: draggedNode});\n rows = slideRows(this.getRows(addedResult.treeData), swapFrom, swapTo, swapLength);\n } else {\n rows = this.getRows(treeData);\n }\n\n // Get indices for rows that match the search conditions\n const matchKeys = {};\n searchMatches.forEach(({path}, i) => {\n matchKeys[path[path.length - 1]] = i;\n });\n\n // Seek to the focused search result if there is one specified\n const scrollToInfo = searchFocusTreeIndex !== null ? {scrollToIndex: searchFocusTreeIndex} : {};\n\n let containerStyle = style;\n let list;\n if (rows.length < 1) {\n const Placeholder = this.treePlaceholderRenderer;\n const PlaceholderContent = placeholderRenderer;\n list = (\n <Placeholder treeId={this.treeId} drop={this.drop}>\n <PlaceholderContent />\n </Placeholder>\n );\n } else if (isVirtualized) {\n containerStyle = {height: '100%', ...containerStyle};\n\n const ScrollZoneVirtualList = this.scrollZoneVirtualList;\n // Render list with react-virtualized\n list = (\n <AutoSizer>\n {({height, width}) => (\n <ScrollZoneVirtualList\n {...scrollToInfo}\n dragDropManager={dragDropManager}\n verticalStrength={this.vStrength}\n horizontalStrength={this.hStrength}\n speed={30}\n scrollToAlignment=\"start\"\n className={this.props.classes.rst__virtualScrollOverride}\n width={width}\n onScroll={({scrollTop}) => {\n this.scrollTop = scrollTop;\n }}\n height={height}\n style={innerStyle}\n rowCount={rows.length}\n estimatedRowSize={typeof rowHeight !== 'function' ? rowHeight : undefined}\n rowHeight={\n typeof rowHeight !== 'function'\n ? rowHeight\n : ({index}) =>\n rowHeight({\n index,\n treeIndex: index,\n node: rows[index].node,\n path: rows[index].path\n })\n }\n rowRenderer={({index, style: rowStyle}) =>\n this.renderRow(rows[index], {\n listIndex: index,\n style: rowStyle,\n getPrevRow: () => rows[index - 1] || null,\n matchKeys,\n swapFrom,\n swapDepth: draggedDepth,\n swapLength\n })\n }\n {...reactVirtualizedListProps}\n />\n )}\n </AutoSizer>\n );\n } else {\n // Render list without react-virtualized\n list = rows.map((row, index) =>\n this.renderRow(row, {\n listIndex: index,\n style: {\n height:\n typeof rowHeight !== 'function'\n ? rowHeight\n : rowHeight({\n index,\n treeIndex: index,\n node: row.node,\n path: row.path\n })\n },\n getPrevRow: () => rows[index - 1] || null,\n matchKeys,\n swapFrom,\n swapDepth: draggedDepth,\n swapLength\n })\n );\n }\n\n return (\n <div className={classnames('rst__tree', className, rowDirectionClass)} style={containerStyle}>\n {list}\n </div>\n );\n }\n}\n\nReactSortableTree.propTypes = {\n classes: PropTypes.object,\n dragDropManager: PropTypes.shape({\n getMonitor: PropTypes.func\n }).isRequired,\n\n // Tree data in the following format:\n // [{title: 'main', subtitle: 'sub'}, { title: 'value2', expanded: true, children: [{ title: 'value3') }] }]\n // `title` is the primary label for the node\n // `subtitle` is a secondary label for the node\n // `expanded` shows children of the node if true, or hides them if false. Defaults to false.\n // `children` is an array of child nodes belonging to the node.\n treeData: PropTypes.arrayOf(PropTypes.object).isRequired,\n\n // Style applied to the container wrapping the tree (style defaults to {height: '100%'})\n style: PropTypes.shape({}),\n\n // Class name for the container wrapping the tree\n className: PropTypes.string,\n\n // Style applied to the inner, scrollable container (for padding, etc.)\n innerStyle: PropTypes.shape({}),\n\n // Used by react-virtualized\n // Either a fixed row height (number) or a function that returns the\n // height of a row given its index: `({ index: number }): number`\n rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),\n\n // Size in px of the region near the edges that initiates scrolling on dragover\n slideRegionSize: PropTypes.number,\n\n // Custom properties to hand to the react-virtualized list\n // https://github.com/bvaughn/react-virtualized/blob/master/docs/List.md#prop-types\n reactVirtualizedListProps: PropTypes.shape({}),\n\n // The width of the blocks containing the lines representing the structure of the tree.\n scaffoldBlockPxWidth: PropTypes.number,\n\n // Maximum depth nodes can be inserted at. Defaults to infinite.\n maxDepth: PropTypes.number,\n\n // The method used to search nodes.\n // Defaults to a function that uses the `searchQuery` string to search for nodes with\n // matching `title` or `subtitle` values.\n // NOTE: Changing `searchMethod` will not update the search, but changing the `searchQuery` will.\n searchMethod: PropTypes.func,\n\n // Used by the `searchMethod` to highlight and scroll to matched nodes.\n // Should be a string for the default `searchMethod`, but can be anything when using a custom search.\n searchQuery: PropTypes.any, // eslint-disable-line react/forbid-prop-types\n\n // Outline the <`searchFocusOffset`>th node and scroll to it.\n searchFocusOffset: PropTypes.number,\n\n // Get the nodes that match the search criteria. Used for counting total matches, etc.\n searchFinishCallback: PropTypes.func,\n\n // Generate an object with additional props to be passed to the node renderer.\n // Use this for adding buttons via the `buttons` key,\n // or additional `style` / `className` settings.\n generateNodeProps: PropTypes.func,\n\n // Set to false to disable virtualization.\n // NOTE: Auto-scrolling while dragging, and scrolling to the `searchFocusOffset` will be disabled.\n isVirtualized: PropTypes.bool,\n\n treeNodeRenderer: PropTypes.func,\n\n // Override the default component for rendering nodes (but keep the scaffolding generator)\n // This is an advanced option for complete customization of the appearance.\n // It is best to copy the component in `node-renderer-default.js` to use as a base, and customize as needed.\n nodeContentRenderer: PropTypes.func,\n\n // Override the default component for rendering an empty tree\n // This is an advanced option for complete customization of the appearance.\n // It is best to copy the component in `placeholder-renderer-default.js` to use as a base,\n // and customize as needed.\n placeholderRenderer: PropTypes.func,\n\n theme: PropTypes.shape({\n style: PropTypes.shape({}),\n innerStyle: PropTypes.shape({}),\n reactVirtualizedListProps: PropTypes.shape({}),\n scaffoldBlockPxWidth: PropTypes.number,\n slideRegionSize: PropTypes.number,\n rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),\n treeNodeRenderer: PropTypes.func,\n nodeContentRenderer: PropTypes.func,\n placeholderRenderer: PropTypes.func\n }),\n\n // Determine the unique key used to identify each node and\n // generate the `path` array passed in callbacks.\n // By default, returns the index in the tree (omitting hidden nodes).\n getNodeKey: PropTypes.func,\n\n // Called whenever tree data changed.\n // Just like with React input elements, you have to update your\n // own component's data to see the changes reflected.\n onChange: PropTypes.func.isRequired,\n\n // Called after node move operation.\n onMoveNode: PropTypes.func,\n\n // Determine whether a node can be dragged. Set to false to disable dragging on all nodes.\n canDrag: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n\n // Determine whether a node can be dropped based on its path and parents'.\n canDrop: PropTypes.func,\n\n // Determine whether a node can have children\n canNodeHaveChildren: PropTypes.func,\n\n // When true, or a callback returning true, dropping nodes to react-dnd\n // drop targets outside of this tree will not remove them from this tree\n shouldCopyOnOutsideDrop: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n\n // Called after children nodes collapsed or expanded.\n onVisibilityToggle: PropTypes.func,\n\n dndType: PropTypes.string,\n\n // Called to track between dropped and dragging\n onDragStateChanged: PropTypes.func,\n\n // Specify that nodes that do not match search will be collapsed\n onlyExpandSearchedNodes: PropTypes.bool,\n\n // rtl support\n rowDirection: PropTypes.string,\n\n onLazyLoadChildren: PropTypes.func,\n ignoreTreeChanges: PropTypes.bool\n};\n\nReactSortableTree.defaultProps = {\n canDrag: true,\n canDrop: null,\n canNodeHaveChildren: () => true,\n className: '',\n dndType: null,\n generateNodeProps: null,\n getNodeKey: defaultGetNodeKey,\n innerStyle: {},\n isVirtualized: true,\n maxDepth: null,\n treeNodeRenderer: null,\n nodeContentRenderer: null,\n onMoveNode: () => {},\n onVisibilityToggle: () => {},\n placeholderRenderer: null,\n reactVirtualizedListProps: {},\n rowHeight: null,\n scaffoldBlockPxWidth: null,\n searchFinishCallback: null,\n searchFocusOffset: null,\n searchMethod: null,\n searchQuery: null,\n shouldCopyOnOutsideDrop: false,\n slideRegionSize: null,\n style: {},\n theme: {},\n onDragStateChanged: () => {},\n onlyExpandSearchedNodes: false,\n rowDirection: 'ltr',\n onLazyLoadChildren: () => {},\n ignoreTreeChanges: false\n};\n\npolyfill(ReactSortableTree);\n\nconst StyledReactSortableTree = withStyles(styles)(ReactSortableTree);\n\nconst SortableTreeWithoutDndContext = (props) => (\n <DndContext.Consumer>\n {({dragDropManager}) =>\n dragDropManager === undefined ? null : (\n <StyledReactSortableTree {...props} dragDropManager={dragDropManager} />\n )\n }\n </DndContext.Consumer>\n);\n\nconst SortableTree = (props) => {\n return (\n <DragAndDrop>\n <SortableTreeWithoutDndContext {...props} />\n </DragAndDrop>\n );\n};\n\n// Export the tree component without the react-dnd DragDropContext,\n// for when component is used with other components using react-dnd.\n// see: https://github.com/gaearon/react-dnd/issues/186\nexport {SortableTreeWithoutDndContext};\n\nexport default SortableTree;\n","/* eslint-disable import/prefer-default-export */\n\nexport function slideRows(rows, fromIndex, toIndex, count = 1) {\n const rowsWithoutMoved = [...rows.slice(0, fromIndex), ...rows.slice(fromIndex + count)];\n\n return [\n ...rowsWithoutMoved.slice(0, toIndex),\n ...rows.slice(fromIndex, fromIndex + count),\n ...rowsWithoutMoved.slice(toIndex)\n ];\n}\n","export const styles = () => ({\n /* import styles from react-virtualized/styles.css */\n\n /* Grid default theme */\n '@global .ReactVirtualized__Grid__innerScrollContainer': {\n overflow: 'visible !important' // override base style\n },\n\n '@global .ReactVirtualized__Grid': {\n outline: 'none' //override base style,\n },\n\n /* List default theme */\n '@global .ReactVirtualized__List': {},\n\n // New styles\n rst__virtualScrollOverride: {\n overflow: 'auto !important'\n },\n\n '@global .rst__rtl .ReactVirtualized__Grid__innerScrollContainer': {\n direction: 'rtl'\n }\n});\n","import SortableTree, {SortableTreeWithoutDndContext} from './react-sortable-tree';\n\nexport * from './utils/default-handlers';\nexport * from './utils/tree-data-utils';\nexport default SortableTree;\n\n// Export the tree component without the react-dnd DragDropContext,\n// for when component is used with other components using react-dnd.\n// see: https://github.com/gaearon/react-dnd/issues/186\nexport {SortableTreeWithoutDndContext};\n","export function defaultGetNodeKey({treeIndex}) {\n return treeIndex;\n}\n\n// Cheap hack to get the text of a react object\nfunction getReactElementText(parent) {\n if (typeof parent === 'string') {\n return parent;\n }\n\n if (\n parent === null ||\n typeof parent !== 'object' ||\n !parent.props ||\n !parent.props.children ||\n (typeof parent.props.children !== 'string' && typeof parent.props.children !== 'object')\n ) {\n return '';\n }\n\n if (typeof parent.props.children === 'string') {\n return parent.props.children;\n }\n\n return parent.props.children.map((child) => getReactElementText(child)).join('');\n}\n\n// Search for a query string inside a node property\nfunction stringSearch(key, searchQuery, node, path, treeIndex) {\n if (typeof node[key] === 'function') {\n // Search within text after calling its function to generate the text\n return String(node[key]({node, path, treeIndex})).indexOf(searchQuery) > -1;\n }\n if (typeof node[key] === 'object') {\n // Search within text inside react elements\n return getReactElementText(node[key]).indexOf(searchQuery) > -1;\n }\n\n // Search within string\n return node[key] && String(node[key]).indexOf(searchQuery) > -1;\n}\n\nexport function defaultSearchMethod({node, path, treeIndex, searchQuery}) {\n return (\n stringSearch('title', searchQuery, node, path, treeIndex) ||\n stringSearch('subtitle', searchQuery, node, path, treeIndex)\n );\n}\n\nexport default {defaultSearchMethod, defaultGetNodeKey};\n","/**\n * Performs a depth-first traversal over all of the node descendants,\n * incrementing currentIndex by 1 for each\n */\nfunction getNodeDataAtTreeIndexOrNextIndex({\n targetIndex,\n node,\n currentIndex,\n getNodeKey,\n path = [],\n lowerSiblingCounts = [],\n ignoreCollapsed = true,\n isPseudoRoot = false\n}) {\n // The pseudo-root is not considered in the path\n const selfPath = !isPseudoRoot ? [...path, getNodeKey({node, treeIndex: currentIndex})] : [];\n\n // Return target node when found\n if (currentIndex === targetIndex) {\n return {\n node,\n lowerSiblingCounts,\n path: selfPath\n };\n }\n\n // Add one and continue for nodes with no children or hidden children\n if (!node.children || (ignoreCollapsed && node.expanded !== true)) {\n return {nextIndex: currentIndex + 1};\n }\n\n // Iterate over each child and their descendants and return the\n // target node if childIndex reaches the targetIndex\n let childIndex = currentIndex + 1;\n const childCount = node.children.length;\n for (let i = 0; i < childCount; i += 1) {\n const result = getNodeDataAtTreeIndexOrNextIndex({\n ignoreCollapsed,\n getNodeKey,\n targetIndex,\n node: node.children[i],\n currentIndex: childIndex,\n lowerSiblingCounts: [...lowerSiblingCounts, childCount - i - 1],\n path: selfPath\n });\n\n if (result.node) {\n return result;\n }\n\n childIndex = result.nextIndex;\n }\n\n // If the target node is not found, return the farthest traversed index\n return {nextIndex: childIndex};\n}\n\nexport function getDescendantCount({node, ignoreCollapsed = true}) {\n return (\n getNodeDataAtTreeIndexOrNextIndex({\n getNodeKey: () => {},\n ignoreCollapsed,\n node,\n currentIndex: 0,\n targetIndex: -1\n }).nextIndex - 1\n );\n}\n\n/**\n * Walk all descendants of the given node, depth-first\n *\n * @param {Object} args - Function parameters\n * @param {function} args.callback - Function to call on each node\n * @param {function} args.getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean} args.ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n * @param {boolean=} args.isPseudoRoot - If true, this node has no real data, and only serves\n * as the parent of all the nodes in the tree\n * @param {Object} args.node - A tree node\n * @param {Object=} args.parentNode - The parent node of `node`\n * @param {number} args.currentIndex - The treeIndex of `node`\n * @param {number[]|string[]} args.path - Array of keys leading up to node to be changed\n * @param {number[]} args.lowerSiblingCounts - An array containing the count of siblings beneath the\n * previous nodes in this path\n *\n * @return {number|false} nextIndex - Index of the next sibling of `node`,\n * or false if the walk should be terminated\n */\nfunction walkDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n isPseudoRoot = false,\n node,\n parentNode = null,\n currentIndex,\n path = [],\n lowerSiblingCounts = []\n}) {\n // The pseudo-root is not considered in the path\n const selfPath = isPseudoRoot ? [] : [...path, getNodeKey({node, treeIndex: currentIndex})];\n const selfInfo = isPseudoRoot\n ? null\n : {\n node,\n parentNode,\n path: selfPath,\n lowerSiblingCounts,\n treeIndex: currentIndex\n };\n\n if (!isPseudoRoot) {\n const callbackResult = callback(selfInfo);\n\n // Cut walk short if the callback returned false\n if (callbackResult === false) {\n return false;\n }\n }\n\n // Return self on nodes with no children or hidden children\n if (!node.children || (node.expanded !== true && ignoreCollapsed && !isPseudoRoot)) {\n return currentIndex;\n }\n\n // Get all descendants\n let childIndex = currentIndex;\n const childCount = node.children.length;\n if (typeof node.children !== 'function') {\n for (let i = 0; i < childCount; i += 1) {\n childIndex = walkDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n node: node.children[i],\n parentNode: isPseudoRoot ? null : node,\n currentIndex: childIndex + 1,\n lowerSiblingCounts: [...lowerSiblingCounts, childCount - i - 1],\n path: selfPath\n });\n\n // Cut walk short if the callback returned false\n if (childIndex === false) {\n return false;\n }\n }\n }\n\n return childIndex;\n}\n\n/**\n * Perform a change on the given node and all its descendants, traversing the tree depth-first\n *\n * @param {Object} args - Function parameters\n * @param {function} args.callback - Function to call on each node\n * @param {function} args.getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean} args.ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n * @param {boolean=} args.isPseudoRoot - If true, this node has no real data, and only serves\n * as the parent of all the nodes in the tree\n * @param {Object} args.node - A tree node\n * @param {Object=} args.parentNode - The parent node of `node`\n * @param {number} args.currentIndex - The treeIndex of `node`\n * @param {number[]|string[]} args.path - Array of keys leading up to node to be changed\n * @param {number[]} args.lowerSiblingCounts - An array containing the count of siblings beneath the\n * previous nodes in this path\n *\n * @return {number|false} nextIndex - Index of the next sibling of `node`,\n * or false if the walk should be terminated\n */\nfunction mapDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n isPseudoRoot = false,\n node,\n parentNode = null,\n currentIndex,\n path = [],\n lowerSiblingCounts = []\n}) {\n const nextNode = {...node};\n\n // The pseudo-root is not considered in the path\n const selfPath = isPseudoRoot ? [] : [...path, getNodeKey({node: nextNode, treeIndex: currentIndex})];\n const selfInfo = {\n node: nextNode,\n parentNode,\n path: selfPath,\n lowerSiblingCounts,\n treeIndex: currentIndex\n };\n\n // Return self on nodes with no children or hidden children\n if (!nextNode.children || (nextNode.expanded !== true && ignoreCollapsed && !isPseudoRoot)) {\n return {\n treeIndex: currentIndex,\n node: callback(selfInfo)\n };\n }\n\n // Get all descendants\n let childIndex = currentIndex;\n const childCount = nextNode.children.length;\n if (typeof nextNode.children !== 'function') {\n nextNode.children = nextNode.children.map((child, i) => {\n const mapResult = mapDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n node: child,\n parentNode: isPseudoRoot ? null : nextNode,\n currentIndex: childIndex + 1,\n lowerSiblingCounts: [...lowerSiblingCounts, childCount - i - 1],\n path: selfPath\n });\n childIndex = mapResult.treeIndex;\n\n return mapResult.node;\n });\n }\n\n return {\n node: callback(selfInfo),\n treeIndex: childIndex\n };\n}\n\n/**\n * Count all the visible (expanded) descendants in the tree data.\n *\n * @param {!Object[]} treeData - Tree data\n *\n * @return {number} count\n */\nexport function getVisibleNodeCount({treeData}) {\n const traverse = (node) => {\n if (!node.children || node.expanded !== true || typeof node.children === 'function') {\n return 1;\n }\n\n return 1 + node.children.reduce((total, currentNode) => total + traverse(currentNode), 0);\n };\n\n return treeData.reduce((total, currentNode) => total + traverse(currentNode), 0);\n}\n\n/**\n * Get the <targetIndex>th visible node in the tree data.\n *\n * @param {!Object[]} treeData - Tree data\n * @param {!number} targetIndex - The index of the node to search for\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n *\n * @return {{\n * node: Object,\n * path: []string|[]number,\n * lowerSiblingCounts: []number\n * }|null} node - The node at targetIndex, or null if not found\n */\nexport function getVisibleNodeInfoAtIndex({treeData, index: targetIndex, getNodeKey}) {\n if (!treeData || treeData.length < 1) {\n return null;\n }\n\n // Call the tree traversal with a pseudo-root node\n const result = getNodeDataAtTreeIndexOrNextIndex({\n targetIndex,\n getNodeKey,\n node: {\n children: treeData,\n expanded: true\n },\n currentIndex: -1,\n path: [],\n lowerSiblingCounts: [],\n isPseudoRoot: true\n });\n\n if (result.node) {\n return result;\n }\n\n return null;\n}\n\n/**\n * Walk descendants depth-first and call a callback on each\n *\n * @param {!Object[]} treeData - Tree data\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {function} callback - Function to call on each node\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return void\n */\nexport function walk({treeData, getNodeKey, callback, ignoreCollapsed = true}) {\n if (!treeData || treeData.length < 1) {\n return;\n }\n\n walkDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n isPseudoRoot: true,\n node: {children: treeData},\n currentIndex: -1,\n path: [],\n lowerSiblingCounts: []\n });\n}\n\n/**\n * Perform a depth-first transversal of the descendants and\n * make a change to every node in the tree\n *\n * @param {!Object[]} treeData - Tree data\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {function} callback - Function to call on each node\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {Object[]} changedTreeData - The changed tree data\n */\nexport function map({treeData, getNodeKey, callback, ignoreCollapsed = true}) {\n if (!treeData || treeData.length < 1) {\n return [];\n }\n\n return mapDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n isPseudoRoot: true,\n node: {children: treeData},\n currentIndex: -1,\n path: [],\n lowerSiblingCounts: []\n }).node.children;\n}\n\n/**\n * Expand or close every node in the tree\n *\n * @param {!Object[]} treeData - Tree data\n * @param {?boolean} expanded - Whether the node is expanded or not\n *\n * @return {Object[]} changedTreeData - The changed tree data\n */\nexport function toggleExpandedForAll({treeData, expanded = true}) {\n return map({\n treeData,\n callback: ({node}) => ({...node, expanded}),\n getNodeKey: ({treeIndex}) => treeIndex,\n ignoreCollapsed: false\n });\n}\n\nexport const RESULT_MISS_ERROR_MESSAGE = 'No node found at the given path.';\n\n/**\n * Replaces node at path with object, or callback-defined object\n *\n * @param {!Object[]} treeData\n * @param {number[]|string[]} path - Array of keys leading up to node to be changed\n * @param {function|any} newNode - Node to replace the node at the path with, or a function producing the new node\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {Object[]} changedTreeData - The changed tree data\n */\nexport function changeNodeAtPath({treeData, path, newNode, getNodeKey, ignoreCollapsed = true}) {\n const RESULT_MISS = 'RESULT_MISS';\n const traverse = ({isPseudoRoot = false, node, currentTreeIndex, pathIndex}) => {\n if (!isPseudoRoot && getNodeKey({node, treeIndex: currentTreeIndex}) !== path[pathIndex]) {\n return RESULT_MISS;\n }\n\n if (pathIndex >= path.length - 1) {\n // If this is the final location in the path, return its changed form\n return typeof newNode === 'function' ? newNode({node, treeIndex: currentTreeIndex}) : newNode;\n }\n if (!node.children) {\n // If this node is part of the path, but has no children, return the unchanged node\n throw new Error('Path referenced children of node with no children.');\n }\n\n let nextTreeIndex = currentTreeIndex + 1;\n for (let i = 0; i < node.children.length; i += 1) {\n const result = traverse({\n node: node.children[i],\n currentTreeIndex: nextTreeIndex,\n pathIndex: pathIndex + 1\n });\n\n // If the result went down the correct path\n if (result !== RESULT_MISS) {\n if (result) {\n // If the result was truthy (in this case, an object),\n // pass it to the next level of recursion up\n return {\n ...node,\n children: [...node.children.slice(0, i), result, ...node.children.slice(i + 1)]\n };\n }\n // If the result was falsy (returned from the newNode function), then\n // delete the node from the array.\n return {\n ...node,\n children: [...node.children.slice(0, i), ...node.children.slice(i + 1)]\n };\n }\n\n nextTreeIndex += 1 + getDescendantCount({node: node.children[i], ignoreCollapsed});\n }\n\n return RESULT_MISS;\n };\n\n // Use a pseudo-root node in the beginning traversal\n const result = traverse({\n node: {children: treeData},\n currentTreeIndex: -1,\n pathIndex: -1,\n isPseudoRoot: true\n });\n\n if (result === RESULT_MISS) {\n throw new Error(RESULT_MISS_ERROR_MESSAGE);\n }\n\n return result.children;\n}\n\n/**\n * Removes the node at the specified path and returns the resulting treeData.\n *\n * @param {!Object[]} treeData\n * @param {number[]|string[]} path - Array of keys leading up to node to be deleted\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {Object[]} changedTreeData - The tree data with the node removed\n */\nexport function removeNodeAtPath({treeData, path, getNodeKey, ignoreCollapsed = true}) {\n return changeNodeAtPath({\n treeData,\n path,\n getNodeKey,\n ignoreCollapsed,\n newNode: null // Delete the node\n });\n}\n\n/**\n * Removes the node at the specified path and returns the resulting treeData.\n *\n * @param {!Object[]} treeData\n * @param {number[]|string[]} path - Array of keys leading up to node to be deleted\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {Object} result\n * @return {Object[]} result.treeData - The tree data with the node removed\n * @return {Object} result.node - The node that was removed\n * @return {number} result.treeIndex - The previous treeIndex of the removed node\n */\nexport function removeNode({treeData, path, getNodeKey, ignoreCollapsed = true}) {\n let removedNode = null;\n let removedTreeIndex = null;\n const nextTreeData = changeNodeAtPath({\n treeData,\n path,\n getNodeKey,\n ignoreCollapsed,\n newNode: ({node, treeIndex}) => {\n // Store the target node and delete it from the tree\n removedNode = node;\n removedTreeIndex = treeIndex;\n\n return null;\n }\n });\n\n return {\n treeData: nextTreeData,\n node: removedNode,\n treeIndex: removedTreeIndex\n };\n}\n\n/**\n * Gets the node at the specified path\n *\n * @param {!Object[]} treeData\n * @param {number[]|string[]} path - Array of keys leading up to node to be deleted\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {Object|null} nodeInfo - The node info at the given path, or null if not found\n */\nexport function getNodeAtPath({treeData, path, getNodeKey, ignoreCollapsed = true}) {\n let foundNodeInfo = null;\n\n try {\n changeNodeAtPath({\n treeData,\n path,\n getNodeKey,\n ignoreCollapsed,\n newNode: ({node, treeIndex}) => {\n foundNodeInfo = {node, treeIndex};\n return node;\n }\n });\n } catch (err) {\n // Ignore the error -- the null return will be explanation enough\n }\n\n return foundNodeInfo;\n}\n\n/**\n * Adds the node to the specified parent and returns the resulting treeData.\n *\n * @param {!Object[]} treeData\n * @param {!Object} newNode - The node to insert\n * @param {number|string} parentKey - The key of the to-be parentNode of the node\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n * @param {boolean=} expandParent - If true, expands the parentNode specified by parentPath\n * @param {boolean=} addAsFirstChild - If true, adds new node as first child of tree\n *\n * @return {Object} result\n * @return {Object[]} result.treeData - The updated tree data\n * @return {number} result.treeIndex - The tree index at which the node was inserted\n */\nexport function addNodeUnderParent({\n treeData,\n newNode,\n parentKey = null,\n getNodeKey,\n ignoreCollapsed = true,\n expandParent = false,\n addAsFirstChild = false\n}) {\n if (parentKey === null) {\n return addAsFirstChild\n ? {\n treeData: [newNode, ...(treeData || [])],\n treeIndex: 0\n }\n : {\n treeData: [...(treeData || []), newNode],\n treeIndex: (treeData || []).length\n };\n }\n\n let insertedTreeIndex = null;\n let hasBeenAdded = false;\n const changedTreeData = map({\n treeData,\n getNodeKey,\n ignoreCollapsed,\n callback: ({node, treeIndex, path}) => {\n const key = path ? path[path.length - 1] : null;\n // Return nodes that are not the parent as-is\n if (hasBeenAdded || key !== parentKey) {\n return node;\n }\n hasBeenAdded = true;\n\n const parentNode = {\n ...node\n };\n\n if (expandParent) {\n parentNode.expanded = true;\n }\n\n // If no children exist yet, just add the single newNode\n if (!parentNode.children) {\n insertedTreeIndex = treeIndex + 1;\n return {\n ...parentNode,\n children: [newNode]\n };\n }\n\n if (typeof parentNode.children === 'function') {\n throw new Error('Cannot add to children defined by a function');\n }\n\n let nextTreeIndex = treeIndex + 1;\n for (let i = 0; i < parentNode.children.length; i += 1) {\n nextTreeIndex += 1 + getDescendantCount({node: parentNode.children[i], ignoreCollapsed});\n }\n\n insertedTreeIndex = nextTreeIndex;\n\n const children = addAsFirstChild ? [newNode, ...parentNode.children] : [...parentNode.children, newNode];\n\n return {\n ...parentNode,\n children\n };\n }\n });\n\n if (!hasBeenAdded) {\n throw new Error('No node found with the given key.');\n }\n\n return {\n treeData: changedTreeData,\n treeIndex: insertedTreeIndex\n };\n}\n\nfunction addNodeAtDepthAndIndex({\n targetDepth,\n minimumTreeIndex,\n newNode,\n ignoreCollapsed,\n expandParent,\n isPseudoRoot = false,\n isLastChild,\n node,\n currentIndex,\n currentDepth,\n getNodeKey,\n path = []\n}) {\n const selfPath = (n) => (isPseudoRoot ? [] : [...path, getNodeKey({node: n, treeIndex: currentIndex})]);\n\n // If the current position is the only possible place to add, add it\n if (currentIndex >= minimumTreeIndex - 1 || (isLastChild && !(node.children && node.children.length))) {\n if (typeof node.children === 'function') {\n throw new Error('Cannot add to children defined by a function');\n } else {\n const extraNodeProps = expandParent ? {expanded: true} : {};\n const nextNode = {\n ...node,\n\n ...extraNodeProps,\n children: node.children ? [newNode, ...node.children] : [newNode]\n };\n\n return {\n node: nextNode,\n nextIndex: currentIndex + 2,\n insertedTreeIndex: currentIndex + 1,\n parentPath: selfPath(nextNode),\n parentNode: isPseudoRoot ? null : nextNode\n };\n }\n }\n\n // If this is the target depth for the insertion,\n // i.e., where the newNode can be added to the current node's children\n if (currentDepth >= targetDepth - 1) {\n // Skip over nodes with no children or hidden children\n if (\n !node.children ||\n typeof node.children === 'function' ||\n (node.expanded !== true && ignoreCollapsed && !isPseudoRoot)\n ) {\n return {node, nextIndex: currentIndex + 1};\n }\n\n // Scan over the children to see if there's a place among them that fulfills\n // the minimumTreeIndex requirement\n let childIndex = currentIndex + 1;\n let insertedTreeIndex = null;\n let insertIndex = null;\n for (let i = 0; i < node.children.length; i += 1) {\n // If a valid location is found, mark it as the insertion location and\n // break out of the loop\n if (childIndex >= minimumTreeIndex) {\n insertedTreeIndex = childIndex;\n insertIndex = i;\n break;\n }\n\n // Increment the index by the child itself plus the number of descendants it has\n childIndex += 1 + getDescendantCount({node: node.children[i], ignoreCollapsed});\n }\n\n // If no valid indices to add the node were found\n if (insertIndex === null) {\n // If the last position in this node's children is less than the minimum index\n // and there are more children on the level of this node, return without insertion\n if (childIndex < minimumTreeIndex && !isLastChild) {\n return {node, nextIndex: childIndex};\n }\n\n // Use the last position in the children array to insert the newNode\n insertedTreeIndex = childIndex;\n insertIndex = node.children.length;\n }\n\n // Insert the newNode at the insertIndex\n const nextNode = {\n ...node,\n children: [...node.children.slice(0, insertIndex), newNode, ...node.children.slice(insertIndex)]\n };\n\n // Return node with successful insert result\n return {\n node: nextNode,\n nextIndex: childIndex,\n insertedTreeIndex,\n parentPath: selfPath(nextNode),\n parentNode: isPseudoRoot ? null : nextNode\n };\n }\n\n // Skip over nodes with no children or hidden children\n if (\n !node.children ||\n typeof node.children === 'function' ||\n (node.expanded !== true && ignoreCollapsed && !isPseudoRoot)\n ) {\n return {node, nextIndex: currentIndex + 1};\n }\n\n // Get all descendants\n let insertedTreeIndex = null;\n let pathFragment = null;\n let parentNode = null;\n let childIndex = currentIndex + 1;\n let newChildren = node.children;\n if (typeof newChildren !== 'function') {\n newChildren = newChildren.map((child, i) => {\n if (insertedTreeIndex !== null) {\n return child;\n }\n\n const mapResult = addNodeAtDepthAndIndex({\n targetDepth,\n minimumTreeIndex,\n newNode,\n ignoreCollapsed,\n expandParent,\n isLastChild: isLastChild && i === newChildren.length - 1,\n node: child,\n currentIndex: childIndex,\n currentDepth: currentDepth + 1,\n getNodeKey,\n path: [] // Cannot determine the parent path until the children have been processed\n });\n\n if ('insertedTreeIndex' in mapResult) {\n ({insertedTreeIndex, parentNode, parentPath: pathFragment} = mapResult);\n }\n\n childIndex = mapResult.nextIndex;\n\n return mapResult.node;\n });\n }\n\n const nextNode = {...node, children: newChildren};\n const result = {\n node: nextNode,\n nextIndex: childIndex\n };\n\n if (insertedTreeIndex !== null) {\n result.insertedTreeIndex = insertedTreeIndex;\n result.parentPath = [...selfPath(nextNode), ...pathFragment];\n result.parentNode = parentNode;\n }\n\n return result;\n}\n\n/**\n * Insert a node into the tree at the given depth, after the minimum index\n *\n * @param {!Object[]} treeData - Tree data\n * @param {!number} depth - The depth to insert the node at (the first level of the array being depth 0)\n * @param {!number} minimumTreeIndex - The lowest possible treeIndex to insert the node at\n * @param {!Object} newNode - The node to insert into the tree\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n * @param {boolean=} expandParent - If true, expands the parent of the inserted node\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n *\n * @return {Object} result\n * @return {Object[]} result.treeData - The tree data with the node added\n * @return {number} result.treeIndex - The tree index at which the node was inserted\n * @return {number[]|string[]} result.path - Array of keys leading to the node location after insertion\n * @return {Object} result.parentNode - The parent node of the inserted node\n */\nexport function insertNode({\n treeData,\n depth: targetDepth,\n minimumTreeIndex,\n newNode,\n getNodeKey = () => {},\n ignoreCollapsed = true,\n expandParent = false\n}) {\n if (!treeData && targetDepth === 0) {\n return {\n treeData: [newNode],\n treeIndex: 0,\n path: [getNodeKey({node: newNode, treeIndex: 0})],\n parentNode: null\n };\n }\n\n const insertResult = addNodeAtDepthAndIndex({\n targetDepth,\n minimumTreeIndex,\n newNode,\n ignoreCollapsed,\n expandParent,\n getNodeKey,\n isPseudoRoot: true,\n isLastChild: true,\n node: {children: treeData},\n currentIndex: -1,\n currentDepth: -1\n });\n\n if (!('insertedTreeIndex' in insertResult)) {\n throw new Error('No suitable position found to insert.');\n }\n\n const treeIndex = insertResult.insertedTreeIndex;\n return {\n treeData: insertResult.node.children,\n treeIndex,\n path: [...insertResult.parentPath, getNodeKey({node: newNode, treeIndex})],\n parentNode: insertResult.parentNode\n };\n}\n\n/**\n * Get tree data flattened.\n *\n * @param {!Object[]} treeData - Tree data\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {{\n * node: Object,\n * path: []string|[]number,\n * lowerSiblingCounts: []number\n * }}[] nodes - The node array\n */\nexport function getFlatDataFromTree({treeData, getNodeKey, ignoreCollapsed = true}) {\n if (!treeData || treeData.length < 1) {\n return [];\n }\n\n const flattened = [];\n walk({\n treeData,\n getNodeKey,\n ignoreCollapsed,\n callback: (nodeInfo) => {\n flattened.push(nodeInfo);\n }\n });\n\n return flattened;\n}\n\n/**\n * Generate a tree structure from flat data.\n *\n * @param {!Object[]} flatData\n * @param {!function=} getKey - Function to get the key from the nodeData\n * @param {!function=} getParentKey - Function to get the parent key from the nodeData\n * @param {string|number=} rootKey - The value returned by `getParentKey` that corresponds to the root node.\n * For example, if your nodes have id 1-99, you might use rootKey = 0\n *\n * @return {Object[]} treeData - The flat data represented as a tree\n */\nexport function getTreeFromFlatData({\n flatData,\n getKey = (node) => node.id,\n getParentKey = (node) => node.parentId,\n rootKey = '0'\n}) {\n if (!flatData) {\n return [];\n }\n\n const childrenToParents = {};\n flatData.forEach((child) => {\n const parentKey = getParentKey(child);\n\n if (parentKey in childrenToParents) {\n childrenToParents[parentKey].push(child);\n } else {\n childrenToParents[parentKey] = [child];\n }\n });\n\n if (!(rootKey in childrenToParents)) {\n return [];\n }\n\n const trav = (parent) => {\n const parentKey = getKey(parent);\n if (parentKey in childrenToParents) {\n return {\n ...parent,\n children: childrenToParents[parentKey].map((child) => trav(child))\n };\n }\n\n return {...parent};\n };\n\n return childrenToParents[rootKey].map((child) => trav(child));\n}\n\n/**\n * Check if a node is a descendant of another node.\n *\n * @param {!Object} older - Potential ancestor of younger node\n * @param {!Object} younger - Potential descendant of older node\n *\n * @return {boolean}\n */\nexport function isDescendant(older, younger) {\n return (\n !!older.children &&\n typeof older.children !== 'function' &&\n older.children.some((child) => child === younger || isDescendant(child, younger))\n );\n}\n\n/**\n * Get the maximum depth of the children (the depth of the root node is 0).\n *\n * @param {!Object} node - Node in the tree\n * @param {?number} depth - The current depth\n *\n * @return {number} maxDepth - The deepest depth in the tree\n */\nexport function getDepth(node, depth = 0) {\n if (!node.children) {\n return depth;\n }\n\n if (typeof node.children === 'function') {\n return depth + 1;\n }\n\n return node.children.reduce((deepest, child) => Math.max(deepest, getDepth(child, depth + 1)), depth);\n}\n\n/**\n * Find nodes matching a search query in the tree,\n *\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {!Object[]} treeData - Tree data\n * @param {?string|number} searchQuery - Function returning a boolean to indicate whether the node is a match or not\n * @param {!function} searchMethod - Function returning a boolean to indicate whether the node is a match or not\n * @param {?number} searchFocusOffset - The offset of the match to focus on\n * (e.g., 0 focuses on the first match, 1 on the second)\n * @param {boolean=} expandAllMatchPaths - If true, expands the paths to any matched node\n * @param {boolean=} expandFocusMatchPaths - If true, expands the path to the focused node\n *\n * @return {Object[]} matches - An array of objects containing the matching `node`s, their `path`s and `treeIndex`s\n * @return {Object[]} treeData - The original tree data with all relevant nodes expanded.\n * If expandAllMatchPaths and expandFocusMatchPaths are both false,\n * it will be the same as the original tree data.\n */\nexport function find({\n getNodeKey,\n treeData,\n searchQuery,\n searchMethod,\n searchFocusOffset,\n expandAllMatchPaths = false,\n expandFocusMatchPaths = true\n}) {\n let matchCount = 0;\n const trav = ({isPseudoRoot = false, node, currentIndex, path = []}) => {\n let matches = [];\n let isSelfMatch = false;\n let hasFocusMatch = false;\n // The pseudo-root is not considered in the path\n const selfPath = isPseudoRoot ? [] : [...path, getNodeKey({node, treeIndex: currentIndex})];\n const extraInfo = isPseudoRoot\n ? null\n : {\n path: selfPath,\n treeIndex: currentIndex\n };\n\n // Nodes with with children that aren't lazy\n const hasChildren = node.children && typeof node.children !== 'function' && node.children.length > 0;\n\n // Examine the current node to see if it is a match\n if (!isPseudoRoot && searchMethod({...extraInfo, node, searchQuery})) {\n if (matchCount === searchFocusOffset) {\n hasFocusMatch = true;\n }\n\n // Keep track of the number of matching nodes, so we know when the searchFocusOffset\n // is reached\n matchCount += 1;\n\n // We cannot add this node to the matches right away, as it may be changed\n // during the search of the descendants. The entire node is used in\n // comparisons between nodes inside the `matches` and `treeData` results\n // of this method (`find`)\n isSelfMatch = true;\n }\n\n let childIndex = currentIndex;\n const newNode = {...node};\n if (hasChildren) {\n // Get all descendants\n newNode.children = newNode.children.map((child) => {\n const mapResult = trav({\n node: child,\n currentIndex: childIndex + 1,\n path: selfPath\n });\n\n // Ignore hidden nodes by only advancing the index counter to the returned treeIndex\n // if the child is expanded.\n //\n // The child could have been expanded from the start,\n // or expanded due to a matching node being found in its descendants\n if (mapResult.node.expanded) {\n childIndex = mapResult.treeIndex;\n } else {\n childIndex += 1;\n }\n\n if (mapResult.matches.length > 0 || mapResult.hasFocusMatch) {\n matches = [...matches, ...mapResult.matches];\n if (mapResult.hasFocusMatch) {\n hasFocusMatch = true;\n }\n\n // Expand the current node if it has descendants matching the search\n // and the settings are set to do so.\n if (\n (expandAllMatchPaths && mapResult.matches.length > 0) ||\n ((expandAllMatchPaths || expandFocusMatchPaths) && mapResult.hasFocusMatch)\n ) {\n newNode.expanded = true;\n }\n }\n\n return mapResult.node;\n });\n }\n\n // Cannot assign a treeIndex to hidden nodes\n if (!isPseudoRoot && !newNode.expanded) {\n matches = matches.map((match) => ({\n ...match,\n treeIndex: null\n }));\n }\n\n // Add this node to the matches if it fits the search criteria.\n // This is performed at the last minute so newNode can be sent in its final form.\n if (isSelfMatch) {\n matches = [{...extraInfo, node: newNode}, ...matches];\n }\n\n return {\n node: matches.length > 0 ? newNode : node,\n matches,\n hasFocusMatch,\n treeIndex: childIndex\n };\n };\n\n const result = trav({\n node: {children: treeData},\n isPseudoRoot: true,\n currentIndex: -1\n });\n\n return {\n matches: result.matches,\n treeData: result.node.children\n };\n}\n\nexport default {\n find,\n getDepth,\n isDescendant,\n getTreeFromFlatData,\n getFlatDataFromTree,\n insertNode,\n addNodeUnderParent,\n getNodeAtPath,\n removeNode,\n removeNodeAtPath,\n changeNodeAtPath,\n toggleExpandedForAll,\n map,\n walk,\n getVisibleNodeInfoAtIndex,\n getVisibleNodeCount,\n getDescendantCount\n};\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n onlyValue: {\n color: 'rgba(0,0,0,.6)',\n fontSize: '13px',\n fontWeight: 'normal',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden'\n },\n select: {\n fontSize: '13px',\n color: 'rgba(0,0,0,.6)',\n paddingLeft: '15px',\n '&&&': {\n paddingRight: '35px'\n }\n },\n selectMenu: {\n '& li': {\n fontSize: '13px',\n height: '32px'\n }\n },\n textField: {\n maxWidth: '100%'\n }\n});\n","import React, {useEffect} from 'react';\nimport PropTypes from 'prop-types';\n\nimport Typography from '@mui/material/Typography';\nimport {useStyles} from './styles';\nimport DropDownEditor from '../editors/DropDownEditor/DropDownEditor';\n\nconst SelectorWithOnlyOptionAutoSelect = ({value, onChange, options, classes = {}, emptyLabel}) => {\n const styles = useStyles();\n\n const [firstOption, ...moreOptions] = options;\n const hasOnlyOneOptionToSelect = moreOptions.length === 0;\n\n useEffect(() => {\n if (hasOnlyOneOptionToSelect && value !== firstOption.value) {\n onChange(firstOption.value);\n }\n }, [firstOption.value]); // eslint-disable-line\n\n const displayEmpty = !!emptyLabel;\n\n return (\n <div className={classes.root}>\n {hasOnlyOneOptionToSelect ? (\n <Typography className={classes.onlyValue || styles.onlyValue} variant={'h6'}>\n {firstOption.label}\n </Typography>\n ) : (\n <DropDownEditor\n displayEmpty={displayEmpty}\n disableUnderline={true}\n classes={{\n select: classes.select || styles.select\n }}\n TextFieldProps={{\n classes: {\n root: classes.textField || styles.textField\n }\n }}\n MenuProps={{\n classes: {\n list: classes.selectMenu || styles.selectMenu\n }\n }}\n value={value || ''}\n entries={displayEmpty ? [{value: '', label: emptyLabel}, ...options] : options}\n onChange={(value) => onChange(value || null)}\n />\n )}\n </div>\n );\n};\n\nSelectorWithOnlyOptionAutoSelect.propTypes = {\n value: PropTypes.string,\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n value: PropTypes.string,\n label: PropTypes.string\n })\n ),\n classes: PropTypes.shape({\n root: PropTypes.string,\n onlyValue: PropTypes.string,\n select: PropTypes.string,\n selectMenu: PropTypes.string,\n textField: PropTypes.string\n }),\n emptyLabel: PropTypes.string\n};\n\nexport default SelectorWithOnlyOptionAutoSelect;\n","import {alpha} from '@mui/material/styles';\n\nimport {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles((theme) => ({\n container: {\n display: 'flex',\n flexDirection: 'column',\n flexShrink: 0,\n width: '64px',\n paddingTop: '8px',\n backgroundColor: theme.palette.background.paper,\n boxShadow: '0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)'\n },\n active: {\n backgroundColor: alpha(theme.palette.primary.main, 0.12),\n color: theme.palette.primary.main,\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n height: '42px',\n width: '3px',\n backgroundColor: theme.palette.primary.main,\n left: '-8px',\n borderRadius: '0 6px 6px 0'\n }\n },\n buttonWrapper: {\n position: 'relative',\n width: '48px',\n height: '44px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '6px',\n margin: '2px 8px',\n color: theme.palette.text.secondary\n }\n}));\n","import React, {ElementType} from 'react';\nimport classnames from 'classnames';\nimport {IconButtonProps} from '@mui/material/IconButton';\nimport {SmallIconButtonWithTooltip} from '../SmallIconButton';\nimport {useStyles} from './styles';\n\ntype Props = {\n disabled: boolean;\n buttonsProps: Array<{\n icon: ElementType;\n tooltipTitle: string;\n id: number;\n }>;\n classes?: {active?: string; buttonWrapper?: string} & IconButtonProps['classes'];\n activeIndexId: number;\n className?: string;\n onButtonClick: (id: number) => void;\n};\n\nexport const SideButtonsPanel = ({\n disabled,\n buttonsProps,\n activeIndexId,\n className,\n onButtonClick,\n classes = {}\n}: Props) => {\n const styles = useStyles();\n const {active, buttonWrapper, ...iconButtonClasses} = classes;\n\n return (\n <div className={classnames(styles.container, className)}>\n {buttonsProps.map(({id, ...buttonProps}) => {\n return (\n <SmallIconButtonWithTooltip\n {...buttonProps}\n disabled={disabled}\n classes={iconButtonClasses}\n size=\"S\"\n key={id}\n className={classnames(\n {[classnames(styles.active, active)]: activeIndexId === id},\n styles.buttonWrapper,\n buttonWrapper\n )}\n onClick={() => onButtonClick(id)}\n data-reltio-id={`reltio-profile-right-side-button-${id}`}\n />\n );\n })}\n </div>\n );\n};\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles((theme) => ({\n contentWrapper: {\n display: 'flex',\n boxSizing: 'border-box',\n flex: 1,\n flexDirection: 'column',\n backgroundColor: theme.palette.background.paper,\n boxShadow: '0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)',\n transition: theme.transitions.create(['width'], {\n duration: theme.transitions.duration.enteringScreen\n })\n }\n}));\n","import React, {ReactNode, VFC} from 'react';\nimport {useStyles} from './styles';\n\ntype Props = {\n width?: number;\n open: boolean;\n children: ReactNode;\n};\n\nexport const SidePanel: VFC<Props> = ({width, open, children}) => {\n const styles = useStyles();\n return (\n <div\n className={styles.contentWrapper}\n data-reltio-id=\"side-panel\"\n style={{\n width: width ? `${open ? width : 0}px` : '100%'\n }}\n >\n {open && <>{children}</>}\n </div>\n );\n};\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n attributesContainer: {\n padding: '0 16px 16px 16px'\n },\n header: {\n marginBottom: '4px'\n },\n noCaption: {\n paddingTop: '16px'\n },\n noData: {\n fontSize: '13px',\n color: 'rgba(0,0,0,0.54)'\n }\n});\n","import {connect} from 'react-redux';\nimport mdmModule from '@reltio/mdm-module';\nimport {AttributesViewStateProps} from '../../types';\nimport AttributesView from './AttributesView';\n\nconst mapStateToProps = (state): AttributesViewStateProps => ({\n metadata: mdmModule.selectors.getMetadata(state)\n});\n\nexport {AttributesView};\n\nexport default connect(mapStateToProps)(AttributesView);\n","import React, {useMemo} from 'react';\nimport {useSelector} from 'react-redux';\nimport mdm from '@reltio/mdm-module';\nimport {Entity, getAttributesListForReadMode, isEmptyValue, PivotingAttribute} from '@reltio/mdm-sdk';\nimport classnames from 'classnames';\nimport i18n from 'ui-i18n';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport {PivotingAttributeContext} from '../../../../contexts';\nimport BasicView from '../../../BasicView/BasicView';\nimport FacetViewHeader from '../../../FacetViewHeader/FacetViewHeader';\nimport AttributesList from '../AttributesList';\nimport {AttributesViewProps} from '../../types';\nimport {getFilteredAttrTypes} from '../../helpers/attributesView';\nimport {useStyles} from './styles';\n\ntype Props = Omit<AttributesViewProps, 'mode'>;\n\nconst AttributesView = ({\n className,\n entity = {} as Entity,\n metadata,\n caption = '',\n excludeUris = [],\n includeUris = [],\n attributesCount = 16\n}: Props) => {\n const styles = useStyles();\n const pivotingAttributes: PivotingAttribute[] = useSelector(mdm.selectors.getPivotingAttributes);\n\n const filteredAttrTypes = useMemo(\n () => getFilteredAttrTypes(metadata, entity.type, includeUris, excludeUris),\n [excludeUris, includeUris, metadata, entity.type]\n );\n\n const attributesList = getAttributesListForReadMode(filteredAttrTypes, entity);\n\n const isShowAttributeList = attributesList.filter(({values}) => !isEmptyValue(values)).length > 0;\n\n return isShowAttributeList || !isEmptyValue(caption) ? (\n <PivotingAttributeContext.Provider value={pivotingAttributes}>\n <BasicView className={className}>\n {caption && <FacetViewHeader className={styles.header} title={caption} />}\n <Box className={classnames(styles.attributesContainer, {[styles.noCaption]: !caption})}>\n {isShowAttributeList ? (\n <AttributesList\n entity={entity}\n attrTypes={filteredAttrTypes}\n parentUri={entity.uri}\n drawLines={false}\n max={attributesCount}\n />\n ) : (\n <Typography className={styles.noData}>{i18n.text('No data found')}</Typography>\n )}\n </Box>\n </BasicView>\n </PivotingAttributeContext.Provider>\n ) : null;\n};\n\nexport default AttributesView;\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n attributesContainer: {\n overflow: 'hidden',\n padding: '0 16px 16px 16px'\n },\n header: {\n marginBottom: '4px'\n },\n noCaption: {\n paddingTop: '16px'\n }\n});\n","import React, {useCallback, useContext, useMemo} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport classnames from 'classnames';\nimport {pipe} from 'ramda';\nimport mdmModule, {profile} from '@reltio/mdm-module';\nimport {Entity, isTempUri, getPinnedAttributesForUser, AttributeItem} from '@reltio/mdm-sdk';\nimport Box from '@mui/material/Box';\nimport BasicView from '../../../BasicView/BasicView';\nimport FacetViewHeader from '../../../FacetViewHeader/FacetViewHeader';\nimport AttributesList from '../AttributesList';\nimport {ViewIdContext} from '../../../../contexts';\nimport {AttributesViewProps} from '../../types';\nimport {getFilteredAttrTypes} from '../../helpers/attributesView';\nimport {PinnedAttributesContext} from '../contexts/PinnedAttributesContext';\nimport {useStyles} from './styles';\n\ntype Props = Omit<AttributesViewProps, 'attributesCount'>;\n\nconst AttributesView = ({\n className,\n entity = {} as Entity,\n mode,\n metadata,\n caption = '',\n excludeUris = [],\n includeUris = [],\n pinnedAttributes\n}: Props) => {\n const styles = useStyles();\n const dispatch = useDispatch();\n const viewId = useContext(ViewIdContext);\n const userRoles = useSelector(mdmModule.selectors.getUserRoles);\n const pinnedAttributeUris = useMemo(\n () => getPinnedAttributesForUser(pinnedAttributes, userRoles),\n [pinnedAttributes, userRoles]\n );\n const modifiedEntity = useSelector(\n (state) => mdmModule.selectors.getModifiedEntity(state, entity.uri) || ({} as Entity)\n );\n\n const filteredAttrTypes = useMemo(\n () => getFilteredAttrTypes(metadata, modifiedEntity.type, includeUris, excludeUris),\n [excludeUris, includeUris, metadata, modifiedEntity.type]\n );\n\n const onAddAttributes = useCallback(\n (params: AttributeItem[]) =>\n pipe(profile.actions.addAttributes, dispatch)(params.map((param) => ({...param, viewId}))),\n [viewId, dispatch]\n );\n\n const onChangeAttribute = useCallback(\n (params: AttributeItem) => pipe(profile.actions.modifyAttribute, dispatch)({...params, viewId}),\n [viewId, dispatch]\n );\n\n const onDeleteAttribute = useCallback(\n (params: AttributeItem) => pipe(profile.actions.removeAttribute, dispatch)({...params, viewId}),\n [viewId, dispatch]\n );\n\n return (\n <BasicView className={className}>\n {caption && <FacetViewHeader className={styles.header} title={caption} />}\n <Box className={classnames(styles.attributesContainer, {[styles.noCaption]: !caption})}>\n <PinnedAttributesContext.Provider value={pinnedAttributeUris}>\n <AttributesList\n entity={modifiedEntity}\n attrTypes={filteredAttrTypes}\n parentUri={modifiedEntity.uri}\n drawLines={false}\n mode={mode}\n showEmptyEditors={isTempUri(modifiedEntity.uri)}\n crosswalks={modifiedEntity.crosswalks}\n onAddAttributes={onAddAttributes}\n onChangeAttribute={onChangeAttribute}\n onDeleteAttribute={onDeleteAttribute}\n />\n </PinnedAttributesContext.Provider>\n </Box>\n </BasicView>\n );\n};\n\nexport default AttributesView;\n","import {connect} from 'react-redux';\nimport mdmModule from '@reltio/mdm-module';\nimport {AttributesViewStateProps} from '../../types';\nimport AttributesView from './AttributesView';\n\nconst mapStateToProps = (state): AttributesViewStateProps => ({\n metadata: mdmModule.selectors.getMetadata(state)\n});\n\nexport {AttributesView};\n\nexport default connect(mapStateToProps)(AttributesView);\n","import React from 'react';\nimport {isViewMode, Mode} from '@reltio/mdm-sdk';\nimport {AttributesViewOwnProps} from '../types';\nimport ReadModeAttributesView from '../readMode/AttributesView';\nimport EditModeAttributesView from '../editMode/AttributesView';\nimport {EntityContext} from '../../../contexts';\n\nconst AttributesView = ({\n mode = Mode.Viewing,\n attributesCount,\n pinnedAttributes,\n entity,\n ...restProps\n}: AttributesViewOwnProps) => {\n return (\n <EntityContext.Provider value={entity}>\n {isViewMode(mode) ? (\n <ReadModeAttributesView attributesCount={attributesCount} entity={entity} {...restProps} />\n ) : (\n <EditModeAttributesView\n mode={mode}\n pinnedAttributes={pinnedAttributes}\n entity={entity}\n {...restProps}\n />\n )}\n </EntityContext.Provider>\n );\n};\n\nexport default AttributesView;\n","import {connect} from 'react-redux';\nimport mdm from '@reltio/mdm-module';\nimport {AttributesViewOwnProps} from '../types';\nimport AttributesView from './AttributesView';\n\ntype Props = Pick<AttributesViewOwnProps, 'entity' | 'mode'>;\n\nconst mapStateToProps = (state, ownProps: Props): Props => ({\n entity: ownProps.entity || mdm.selectors.getEntityWithDiff(state),\n mode: ownProps.mode || mdm.selectors.getMode(state)\n});\n\nexport {AttributesView};\n\nexport default connect(mapStateToProps)(AttributesView);\n","import {makeStyles} from '@mui/styles';\n\nconst iconsWidth = '68px';\n\nexport const useOptionStyles = makeStyles({\n container: {\n display: 'flex',\n alignItems: 'center',\n height: '32px',\n minHeight: '32px',\n padding: 0\n },\n text: {\n display: 'flex',\n width: `calc(100% - ${iconsWidth})`\n },\n textItem: {\n fontSize: '13px',\n lineHeight: '15px',\n marginRight: 10\n },\n primaryTextItem: {\n flex: '1 0',\n flexBasis: 0,\n maxWidth: '50%',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryTextItem: {\n flex: '1 0',\n flexBasis: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n icons: {\n transform: 'scale(0.5)',\n position: 'relative',\n flexShrink: 0,\n width: iconsWidth,\n bottom: '10px'\n },\n iconTop: {\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1\n },\n iconBottom: {\n position: 'absolute',\n top: 0,\n left: 26,\n zIndex: 0\n }\n});\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport MenuItem from '@mui/material/MenuItem';\nimport Typography from '@mui/material/Typography';\nimport {useOptionStyles} from './styles';\nimport EntityTypeIcon from '../../../../EntityTypeIcon/EntityTypeIcon';\nimport ExpandedValueTooltip from '../../../../ExpandedValueTooltip/ExpandedValueTooltip';\n\nconst RelationOption = ({innerRef, innerProps, selectOption, data}) => {\n const styles = useOptionStyles();\n const {value, label, startObject, endObject} = data;\n const secondaryLabel = startObject.objectType.label + ' \\u2194 ' + endObject.objectType.label;\n return (\n <MenuItem\n className={styles.container}\n ref={innerRef}\n key={value}\n onClick={() => selectOption({label, value, startObject, endObject})}\n {...innerProps}\n >\n <div className={styles.icons}>\n <EntityTypeIcon className={styles.iconTop} entityType={startObject.objectType} />\n <EntityTypeIcon className={styles.iconBottom} entityType={endObject.objectType} />\n </div>\n <div className={styles.text}>\n <ExpandedValueTooltip value={label}>\n <Typography className={classnames(styles.textItem, styles.primaryTextItem)}>{label}</Typography>\n </ExpandedValueTooltip>\n <ExpandedValueTooltip value={secondaryLabel}>\n <Typography color=\"textSecondary\" className={classnames(styles.textItem, styles.secondaryTextItem)}>\n {secondaryLabel}\n </Typography>\n </ExpandedValueTooltip>\n </div>\n </MenuItem>\n );\n};\n\nRelationOption.propTypes = {\n innerRef: PropTypes.oneOfType([\n PropTypes.oneOf([null]),\n PropTypes.func,\n PropTypes.shape({\n current: PropTypes.any.isRequired\n })\n ]),\n innerProps: PropTypes.object.isRequired,\n selectOption: PropTypes.func.isRequired,\n data: PropTypes.shape({\n value: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n startObject: PropTypes.object,\n endObject: PropTypes.object\n })\n};\n\nexport default RelationOption;\n","import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport i18n from 'ui-i18n';\nimport {identity, defaultTo} from 'ramda';\nimport RelationOption from './components/RelationOption';\nimport DropDownSelector from '../../../DropDownSelector/DropDownSelector';\n\nconst RelationTypeSelector = ({value = {}, options = [], onChange = identity, TextFieldProps, ...otherProps}) => {\n const textFieldProps = useMemo(\n () => ({\n ...defaultTo({}, TextFieldProps),\n ['data-reltio-id']: 'relation-type-selector'\n }),\n [TextFieldProps]\n );\n return (\n <DropDownSelector\n value={value}\n options={options}\n onChange={onChange}\n label={i18n.text('Select relationship type ')}\n components={{Option: RelationOption}}\n TextFieldProps={textFieldProps}\n {...otherProps}\n />\n );\n};\n\nconst ValueType = PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n startObject: PropTypes.object,\n endObject: PropTypes.object\n});\n\nRelationTypeSelector.propTypes = {\n value: ValueType,\n options: PropTypes.arrayOf(ValueType),\n onChange: PropTypes.func\n};\n\nexport default RelationTypeSelector;\n","import React from 'react';\n\nexport const PageRequestsAbortingContext = React.createContext<AbortSignal>(undefined);\n\nPageRequestsAbortingContext.displayName = 'PageRequestsAbortingContext';\n","import React, {useCallback, useContext} from 'react';\nimport {PerspectivesSettings, PerspectiveSettingItem} from '../../types';\n\ntype PerspectivesSettingsProps = {\n settings: PerspectivesSettings;\n onChange: (perspectiveId: string, newSetting: Partial<PerspectiveSettingItem>) => void;\n};\n\nexport const PerspectivesSettingsContext = React.createContext<PerspectivesSettingsProps>({\n settings: {},\n onChange: () => {}\n});\n\nPerspectivesSettingsContext.displayName = 'PerspectivesSettingsContext';\n\nexport const usePerspectivesSettings = (perspectiveId: string) => {\n const {settings, onChange} = useContext(PerspectivesSettingsContext) || {};\n const perspectiveSettings = settings?.[perspectiveId];\n\n const updatePerspectiveSettings = useCallback(\n (newSetting: Partial<PerspectiveSettingItem>) => {\n onChange(perspectiveId, newSetting);\n },\n [perspectiveId, onChange]\n );\n\n return {updatePerspectiveSettings, perspectiveSettings};\n};\n","import {useCallback} from 'react';\nimport {Directions, getDirectionalLabelFromObject} from '@reltio/mdm-sdk';\nimport {ascend, curry, evolve, pipe, prop, propEq, propOr, tap} from 'ramda';\n\nexport const useRelationTypeSelector = ({reversedContextLabels}) => {\n const getRelationTypesOptions = useCallback(\n (inRelations, outRelations) => {\n const labelsMap = {};\n const addLabelInMap = (label) => (labelsMap[label] = propOr(0, label, labelsMap) + 1);\n const getDirectionalLabel = pipe(getDirectionalLabelFromObject, tap(addLabelInMap));\n const byLabel = ascend(prop('label'));\n\n const prepareRelation = curry((direction, {uri, label, startObject, endObject}) => {\n const dirObject =\n direction === (reversedContextLabels ? Directions.OUT : Directions.IN) ? startObject : endObject;\n return {\n label: {directionalLabel: getDirectionalLabel(dirObject), typeLabel: label},\n value: `${uri},${direction}`,\n startObject,\n endObject\n };\n });\n\n return inRelations\n .map(prepareRelation(Directions.IN))\n .concat(outRelations.map(prepareRelation(Directions.OUT)))\n .map(\n evolve({\n label: ({directionalLabel, typeLabel}) => {\n return directionalLabel\n ? labelsMap[directionalLabel] > 1\n ? `${directionalLabel} (${typeLabel})`\n : directionalLabel\n : typeLabel;\n }\n })\n )\n .sort(byLabel);\n },\n [reversedContextLabels]\n );\n\n const fromEditorValue = useCallback(\n (inRelationTypes, outRelationTypes) => (relation) => {\n const [uri, direction] = relation.value.split(',');\n const type = (direction === Directions.IN ? inRelationTypes : outRelationTypes).find(propEq('uri', uri));\n return {type, direction};\n },\n []\n );\n\n const toEditorValue = useCallback(\n (relation, relationsTypesOptions) =>\n relationsTypesOptions.find(propEq('value', `${relation.relationType},${relation.direction}`)),\n []\n );\n\n return {\n getRelationTypesOptions,\n fromEditorValue,\n toEditorValue\n };\n};\n","import {useEffect, useRef} from 'react';\n\nexport const useRunOnceAfterValueInitialization = (cb, value) => {\n const isValueInited = useRef(false);\n useEffect(() => {\n if (value && !isValueInited.current) {\n isValueInited.current = true;\n cb();\n }\n }, [cb, value]);\n};\n"],"names":["useStyles","makeStyles","theme","button","whiteSpace","fontSize","lineHeight","letterSpacing","padding","fill","palette","primary","main","fillOpacity","iconButton","startIcon","marginLeft","marginRight","width","height","alignItems","overflowStyle","overflow","textOverflow","menuIcon","menuItem","minHeight","menuText","color","text","ActionButtonMode","ActionButton","forwardRef","ref","className","mode","label","disabled","icon","Icon","onClick","noop","onMenuClose","otherProps","styles","SmallIconButton","classnames","size","tooltipTitle","showForDisabled","Button","classes","ExpandedValueTooltip","value","handleClick","MenuItem","root","Typography","getButtonView","displayName","basicViewPaper","display","flexDirection","basicView","BasicView","children","Paper","paper","title","fontWeight","content","contentText","marginBottom","actionButtons","paddingTop","discardButton","open","onCancel","cancelCaption","i18n","onDiscard","discardCaption","onSave","saveCaption","disabledSave","Dialog","onClose","paperScrollPaper","DialogTitle","DialogContent","DialogContentText","DialogActions","disableSpacing","autoFocus","ConnectionRelationTypeSelector","relation","inRelationTypes","outRelationTypes","onChange","identity","applyFirstByDefault","reversedContextLabels","getRelationTypesOptions","fromEditorValue","toEditorValue","useRelationTypeSelector","relationsTypesOptions","useMemo","handleChange","useCallback","pipe","hasValue","relationType","useEffect","length","options","propTypes","PropTypes","ConnectionRelationType","RelationTypeType","container","justifyContent","BasicViewHeader","link","cursor","wordBreak","selected","popper","maxWidth","minWidth","boxShadow","backgroundColor","borderRadius","HierarchyNodeTitle","isSelected","entityUri","viewId","anchorEl","withEntityDetails","dispatch","useDispatch","uiPath","useSelector","mdm","generateEntityUrl","useContext","UrlGeneratorsContext","isLoading","entityDetails","showEntityDetails","hideEntityDetails","setEntityDetails","useState","setIsLoading","timerId","useRef","safePromise","useSafePromise","cancelRequest","Promise","resolve","current","setTimeout","getEntity","then","finally","clearTimeout","useEntityDetails","uri","showPopper","Boolean","ui","onMouseEnter","undefined","onMouseLeave","Link","to","Popper","modal","placement","ProfileCard","entity","variant","textDecoration","href","e","stopPropagation","preventDefault","alt","src","gif2Url","image","info","secondaryLabel","marginTop","secondary","thirdRow","entityId","entityIdLabel","entityIdValue","ProfileCardContent","secondaryLabelClass","labelClass","getLabel","handleCopyEntityIdToClipboard","navigator","clipboard","writeText","getEntityId","EntityAvatar","imageClassName","EntityUriLink","getEntityUriForLink","showOnExceededHeight","EntityTypeBadge","transform","wave","position","top","left","right","bottom","animation","background","avatar","flex","ProfileCardPlaceholder","memo","containerClass","resizablePanesWrapper","flexGrow","pane","DEFAULT_R_PANE_SIZE","ProfileResizablePanes","perspectiveId","buttonsProps","defaultTab","perspectiveSettings","updatePerspectiveSettings","usePerspectivesSettings","active","isSidePanelOpen","isNil","handleUpdateSettings","newSetting","toggleActive","newId","resetActive","handlePaneSizeChange","ResizablePanes","orientation","minSize","maxSize","allowResize","debounceInterval","cloneElement","SideButtonsPanel","onButtonClick","activeIndexId","filter","join","textAlign","zIndex","opacity","borderLeft","borderRight","borderTop","boxSizing","borderBottom","TreeNode","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection","rowDirectionClass","scaffoldBlockCount","scaffold","style","forEach","lowerSiblingCount","i","lineClass","push","key","highlightLineClass","Children","child","defaultProps","isRequired","NodeRendererDefault","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrag","subtitle","isSearchMatch","isSearchFocus","buttons","didDrop","parentNode","nodeTitle","nodeSubtitle","handle","expanded","Array","map","_","index","dropEffect","isDraggedDescendant","isDescendant","isLandingPadActive","buttonStyle","type","btn","TreePlaceholder","Component","render","this","props","drop","border","outline","borderColor","PlaceholderRendererDefault","memoize","f","savedArgsArray","savedKeysArray","savedResult","args","keysArray","Object","keys","sort","argsArray","some","arg","memoizedInsertNode","insertNode","memoizedGetFlatDataFromTree","getFlatDataFromTree","memoizedGetDescendantCount","getDescendantCount","DndManager","constructor","treeRef","hoverHandler","hoverProps","dropTargetProps","monitor","component","item","getItem","targetDepth","getTargetDepth","lastDropTargetNode","lastDropTargetDepth","dragHover","minimumTreeIndex","depth","deferredCallHoverHandler","shouldSkipMoreFrames","rafId","requestAnimationFrame","resetDragVariables","startDrag","endDrag","dndType","treeData","state","draggingTreeData","getNodeKey","customCanDrop","maxDepth","lastCanDropResult","lastCanDropProps","dropTargetDepth","rowAbove","canNodeHaveChildren","slice","Math","min","blocksOffset","dragSourceInitialDepth","relativePosition","findDOMNode","getBoundingClientRect","leftShift","getSourceClientOffset","x","round","direction","getDifferenceFromInitialOffset","max","draggedChildDepth","getDepth","abovePath","aboveNode","newCanDropProps","nodeId","aboveNodeId","equals","addedResult","newNode","expandParent","prevPath","prevParent","prevTreeIndex","nextPath","nextParent","nextTreeIndex","wrapSource","el","nodeDragSource","beginDrag","cancelAnimationFrame","getDropResult","dropTargetNode","dragSource","connect","dragPreview","wrapTarget","nodeDropTarget","result","hover","bind","dropTarget","dragged","wrapPlaceholder","placeholderDropTarget","treeIdCounter","mergeTheme","merged","innerStyle","reactVirtualizedListProps","overridableDefaults","nodeContentRenderer","placeholderRenderer","rowHeight","slideRegionSize","treeNodeRenderer","propKey","ReactSortableTree","super","isVirtualized","dndManager","treePlaceholderRenderer","scrollZoneVirtualList","createScrollingComponent","withScrolling","List","vStrength","createVerticalStrength","hStrength","createHorizontalStrength","draggedMinimumTreeIndex","draggedDepth","searchMatches","searchFocusTreeIndex","dragging","draggingExpandedPaths","ignoreOneTreeUpdate","instanceProps","searchQuery","searchFocusOffset","ignoreTreeChanges","moveNode","handleDndMonitorChange","componentDidMount","loadLazyChildren","stateUpdate","search","setState","clearMonitorSubscription","dragDropManager","getMonitor","subscribeToStateChange","nextProps","prevState","newState","assign","componentDidUpdate","prevProps","onDragStateChanged","walk","callback","pending","onLazyLoadChildren","removeNode","draggedPath","reduce","newTree","changeNodeAtPath","isTreeDataEqual","componentWillUnmount","getRows","ignoreCollapsed","targetNode","onVisibilityToggle","nextParentNode","onMoveNode","seekIndex","expand","singleSearch","searchFinishCallback","searchMethod","onlyExpandSearchedNodes","expandedTreeData","matches","find","toggleExpandedForAll","defaultSearchMethod","expandAllMatchPaths","expandFocusMatchPaths","newDraggingTreeData","nodePath","newDraggingExpandedPaths","when","always","gt","append","uniqWith","eqBy","String","dropResult","shouldCopy","shouldCopyOnOutsideDrop","copyNode","resetTree","loadCollapsedLazyChildren","done","childrenArray","oldNode","renderRow","row","matchKeys","generateNodeProps","TreeNodeRenderer","NodeContentRenderer","nodeKey","callbackParams","nodeProps","rowCanDrag","sharedProps","rows","swapTo","fromIndex","toIndex","count","rowsWithoutMoved","slideRows","scrollToInfo","scrollToIndex","list","containerStyle","Placeholder","PlaceholderContent","ScrollZoneVirtualList","verticalStrength","horizontalStrength","speed","scrollToAlignment","rst__virtualScrollOverride","onScroll","scrollTop","rowCount","estimatedRowSize","rowRenderer","rowStyle","defaultGetNodeKey","polyfill","StyledReactSortableTree","withStyles","SortableTreeWithoutDndContext","DndContext","DragAndDrop","getReactElementText","parent","stringSearch","indexOf","getNodeDataAtTreeIndexOrNextIndex","targetIndex","currentIndex","isPseudoRoot","selfPath","nextIndex","childIndex","childCount","walkDescendants","mapDescendants","nextNode","selfInfo","mapResult","RESULT_MISS","traverse","currentTreeIndex","pathIndex","Error","removedNode","removedTreeIndex","addNodeAtDepthAndIndex","isLastChild","currentDepth","n","insertedTreeIndex","parentPath","insertIndex","pathFragment","newChildren","insertResult","flattened","nodeInfo","older","younger","deepest","matchCount","trav","isSelfMatch","hasFocusMatch","extraInfo","hasChildren","match","getTreeFromFlatData","flatData","getKey","id","getParentKey","parentId","rootKey","childrenToParents","parentKey","addNodeUnderParent","addAsFirstChild","hasBeenAdded","changedTreeData","getNodeAtPath","foundNodeInfo","err","removeNodeAtPath","getVisibleNodeInfoAtIndex","getVisibleNodeCount","total","currentNode","onlyValue","select","paddingLeft","paddingRight","selectMenu","textField","SelectorWithOnlyOptionAutoSelect","emptyLabel","firstOption","moreOptions","hasOnlyOneOptionToSelect","displayEmpty","DropDownEditor","disableUnderline","TextFieldProps","MenuProps","entries","flexShrink","alpha","buttonWrapper","margin","iconButtonClasses","buttonProps","contentWrapper","transition","transitions","create","duration","enteringScreen","SidePanel","attributesContainer","header","noCaption","noData","metadata","mdmModule","caption","excludeUris","includeUris","attributesCount","pivotingAttributes","filteredAttrTypes","getFilteredAttrTypes","isShowAttributeList","getAttributesListForReadMode","values","isEmptyValue","PivotingAttributeContext","FacetViewHeader","Box","AttributesList","attrTypes","parentUri","drawLines","pinnedAttributes","ViewIdContext","userRoles","pinnedAttributeUris","getPinnedAttributesForUser","modifiedEntity","onAddAttributes","params","profile","param","onChangeAttribute","onDeleteAttribute","PinnedAttributesContext","showEmptyEditors","isTempUri","crosswalks","ownProps","Mode","restProps","EntityContext","isViewMode","useOptionStyles","textItem","primaryTextItem","flexBasis","secondaryTextItem","icons","iconTop","iconBottom","RelationOption","innerRef","innerProps","selectOption","data","startObject","endObject","objectType","EntityTypeIcon","entityType","RelationTypeSelector","textFieldProps","defaultTo","DropDownSelector","components","Option","ValueType","PageRequestsAbortingContext","React","PerspectivesSettingsContext","settings","inRelations","outRelations","labelsMap","getDirectionalLabel","getDirectionalLabelFromObject","tap","propOr","byLabel","ascend","prop","prepareRelation","curry","dirObject","Directions","directionalLabel","typeLabel","concat","evolve","split","propEq","useRunOnceAfterValueInitialization","cb","isValueInited"],"sourceRoot":""}
1
+ {"version":3,"file":"2641.js","mappings":"wrBAEO,MAAMA,GAAYC,E,SAAAA,aAAYC,IAAD,CAChCC,OAAQ,CACJC,WAAY,SACZC,SAAU,OACVC,WAAY,OACZC,cAAe,EACfC,QAAS,oBACT,2BAA4B,CACxBC,KAAMP,EAAMQ,QAAQC,QAAQC,KAC5BC,YAAa,IAGrBC,WAAY,CACR,2BAA4B,CACxBL,KAAMP,EAAMQ,QAAQC,QAAQC,KAC5BC,YAAa,IAGrBE,UAAW,CACPC,WAAY,EACZC,YAAa,MACbC,MAAO,OACPC,OAAQ,OACRC,WAAY,UAEhBC,cAAe,CACXC,SAAU,SACVlB,WAAY,SACZmB,aAAc,YAElBC,SAAU,CACNP,YAAa,QAEjBQ,SAAU,CACNC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B,MAAQ,GAAEmH,KAAO6O,IACjBoV,YAAAA,EACAC,UAAAA,MAIR,OAAOe,EACF3b,IAAIqc,EAAgBG,EAAAA,IAAAA,KACpBG,OAAOf,EAAa5b,IAAIqc,EAAgBG,EAAAA,IAAAA,OACxCxc,KACG4c,EAAAA,EAAAA,QAAO,CACHtuB,MAAO,IAAmC,IAAlC,iBAACmuB,EAAD,UAAmBC,GAAe,EACtC,OAAOD,EACDZ,EAAUY,GAAoB,EACzB,GAAEA,MAAqBC,KACxBD,EACJC,MAIjB7a,KAAKqa,KAEd,CAAC3pB,IAoBDE,iBAjBoBM,EAAAA,EAAAA,cACpB,CAACb,EAAiBC,IAAsBF,IACpC,MAAOyE,EAAK6O,GAAatT,EAAS1C,MAAMstB,MAAM,KAE9C,MAAO,CAACrc,MADM+E,IAAciX,EAAAA,IAAAA,GAAgBtqB,EAAkBC,GAAkB0a,MAAKiQ,EAAAA,EAAAA,QAAO,MAAOpmB,IACrF6O,UAAAA,KAElB,IAYA7S,eATkBK,EAAAA,EAAAA,cAClB,CAACd,EAAUW,IACPA,EAAsBia,MAAKiQ,EAAAA,EAAAA,QAAO,QAAU,GAAE7qB,EAASiB,gBAAgBjB,EAASsT,eACpF,O,8CCpDD,MAAMwX,EAAqC,CAACC,EAAIztB,KACnD,MAAM0tB,GAAgBpnB,EAAAA,EAAAA,SAAO,IAC7B1C,EAAAA,EAAAA,YAAU,KACF5D,IAAU0tB,EAAc9mB,UACxB8mB,EAAc9mB,SAAU,EACxB6mB,OAEL,CAACA,EAAIztB","sources":["webpack://@reltio/remotes/../components/src/components/ActionButton/styles.ts","webpack://@reltio/remotes/../components/src/components/ActionButton/ActionButton.tsx","webpack://@reltio/remotes/../components/src/components/BasicView/styles.ts","webpack://@reltio/remotes/../components/src/components/BasicView/BasicView.tsx","webpack://@reltio/remotes/../components/src/components/ConfirmationDialog/styles.ts","webpack://@reltio/remotes/../components/src/components/ConfirmationDialog/ConfirmationDialog.tsx","webpack://@reltio/remotes/../components/src/components/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.js","webpack://@reltio/remotes/../components/src/components/FacetViewHeader/styles.ts","webpack://@reltio/remotes/../components/src/components/FacetViewHeader/FacetViewHeader.tsx","webpack://@reltio/remotes/../components/src/components/HierarchyNodeTitle/styles.ts","webpack://@reltio/remotes/../components/src/components/HierarchyNodeTitle/HierarchyNodeTitle.tsx","webpack://@reltio/remotes/../components/src/components/HierarchyNodeTitle/hooks/useEntityDetails.ts","webpack://@reltio/remotes/../components/src/components/Link/styles.js","webpack://@reltio/remotes/../components/src/components/Link/Link.tsx","webpack://@reltio/remotes/../components/src/components/LoadingSpinner/SpinnerSmall.gif.tsx","webpack://@reltio/remotes/../components/src/components/LoadingSpinner/LoadingSpinner.tsx","webpack://@reltio/remotes/../components/src/components/ProfileCard/ProfileCardContent/styles.ts","webpack://@reltio/remotes/../components/src/components/ProfileCard/ProfileCardContent/ProfileCardContent.tsx","webpack://@reltio/remotes/../components/src/components/ProfileCard/ProfileCardPlaceholder/styles.ts","webpack://@reltio/remotes/../components/src/components/ProfileCard/ProfileCardPlaceholder/ProfileCardPlaceholder.tsx","webpack://@reltio/remotes/../components/src/components/ProfileCard/styles.ts","webpack://@reltio/remotes/../components/src/components/ProfileCard/ProfileCard.tsx","webpack://@reltio/remotes/../components/src/components/ProfileResizablePanes/styles.ts","webpack://@reltio/remotes/../components/src/components/ProfileResizablePanes/ProfileResizablePanes.tsx","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/classnames.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/treeNodeStyle.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/tree-node.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/node-renderer-default.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/tree-placeholder.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/placeholderRendererDefaultStyle.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/placeholder-renderer-default.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/memoized-tree-data-utils.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/dnd-manager.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/react-sortable-tree.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/generic-utils.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/reactSortableTreeStyles.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/index.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/default-handlers.js","webpack://@reltio/remotes/../components/src/components/ReactSortableTree/utils/tree-data-utils.js","webpack://@reltio/remotes/../components/src/components/SelectorWithOnlyOptionAutoSelect/styles.js","webpack://@reltio/remotes/../components/src/components/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.js","webpack://@reltio/remotes/../components/src/components/SideIconPanel/styles.ts","webpack://@reltio/remotes/../components/src/components/SideIconPanel/SideButtonsPanel.tsx","webpack://@reltio/remotes/../components/src/components/SidePanel/styles.ts","webpack://@reltio/remotes/../components/src/components/SidePanel/SidePanel.tsx","webpack://@reltio/remotes/../components/src/components/attributes/readMode/AttributesView/styles.ts","webpack://@reltio/remotes/../components/src/components/attributes/readMode/AttributesView/index.ts","webpack://@reltio/remotes/../components/src/components/attributes/readMode/AttributesView/AttributesView.tsx","webpack://@reltio/remotes/../components/src/components/attributes/editMode/AttributesView/styles.ts","webpack://@reltio/remotes/../components/src/components/attributes/editMode/AttributesView/AttributesView.tsx","webpack://@reltio/remotes/../components/src/components/attributes/editMode/AttributesView/index.ts","webpack://@reltio/remotes/../components/src/components/attributes/AttributesView/AttributesView.tsx","webpack://@reltio/remotes/../components/src/components/attributes/AttributesView/index.ts","webpack://@reltio/remotes/../components/src/components/attributes/editMode/RelationTypeSelector/components/styles.js","webpack://@reltio/remotes/../components/src/components/attributes/editMode/RelationTypeSelector/components/RelationOption.js","webpack://@reltio/remotes/../components/src/components/attributes/editMode/RelationTypeSelector/RelationTypeSelector.js","webpack://@reltio/remotes/../components/src/contexts/PageRequestsAbortingContext/index.ts","webpack://@reltio/remotes/../components/src/contexts/PerspectivesSettingsContext/index.ts","webpack://@reltio/remotes/../components/src/hooks/useRelationTypeSelector.js","webpack://@reltio/remotes/../components/src/hooks/useRunOnceAfterValueInitialization.js"],"sourcesContent":["import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles((theme) => ({\n button: {\n whiteSpace: 'nowrap',\n fontSize: '14px',\n lineHeight: '16px',\n letterSpacing: 0,\n padding: '9px 16px 9px 12px',\n '& svg g path, & svg path': {\n fill: theme.palette.primary.main,\n fillOpacity: 1\n }\n },\n iconButton: {\n '& svg g path, & svg path': {\n fill: theme.palette.primary.main,\n fillOpacity: 1\n }\n },\n startIcon: {\n marginLeft: 0,\n marginRight: '8px',\n width: '18px',\n height: '18px',\n alignItems: 'center'\n },\n overflowStyle: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n },\n menuIcon: {\n marginRight: '12px'\n },\n menuItem: {\n minHeight: '28px',\n padding: '2px 16px 2px 12px'\n },\n menuText: {\n color: theme.palette.text.primary,\n fontSize: '13px',\n lineHeight: '15px',\n letterSpacing: 0\n }\n}));\n","import React, {forwardRef} from 'react';\nimport classnames from 'classnames';\nimport Button from '@mui/material/Button';\nimport MenuItem from '@mui/material/MenuItem';\nimport Typography from '@mui/material/Typography';\n\nimport {useStyles} from './styles';\nimport {noop} from '../../core';\nimport ExpandedValueTooltip from '../ExpandedValueTooltip/ExpandedValueTooltip';\nimport {SmallIconButtonWithTooltip} from '../SmallIconButton';\n\nexport enum ActionButtonMode {\n iconButton = 'iconButton',\n button = 'button',\n menuItem = 'menuItem'\n}\n\nexport type Props = {\n className?: string;\n disabled?: boolean;\n icon: React.ElementType;\n label: string;\n mode: ActionButtonMode;\n onClick: () => void;\n onMenuClose?: () => void;\n};\n\nexport const ActionButton = forwardRef<HTMLLIElement, Props>(\n (\n {\n className,\n mode = ActionButtonMode.iconButton,\n label,\n disabled,\n icon: Icon,\n onClick = noop,\n onMenuClose = noop,\n ...otherProps\n }: Props,\n ref: React.Ref<HTMLLIElement>\n ) => {\n const styles = useStyles();\n\n const getButtonView = () => {\n switch (mode) {\n case 'iconButton': {\n return (\n <SmallIconButtonWithTooltip\n disabled={disabled}\n className={classnames(styles.iconButton, className)}\n size=\"S\"\n tooltipTitle={label}\n onClick={onClick}\n icon={Icon}\n showForDisabled\n {...otherProps}\n />\n );\n }\n case 'button': {\n return (\n <Button\n className={classnames(styles.button, className)}\n disabled={disabled}\n startIcon={<Icon />}\n onClick={onClick}\n color=\"primary\"\n classes={{startIcon: styles.startIcon}}\n {...otherProps}\n >\n <ExpandedValueTooltip value={label}>\n <div className={styles.overflowStyle}>{label}</div>\n </ExpandedValueTooltip>\n </Button>\n );\n }\n case 'menuItem': {\n const handleClick = () => {\n onMenuClose();\n onClick();\n };\n return (\n <MenuItem\n classes={{root: styles.menuItem}}\n onClick={handleClick}\n disabled={disabled}\n ref={ref}\n {...otherProps}\n >\n <>\n <Icon className={styles.menuIcon} />\n <Typography classes={{root: styles.menuText}}>{label}</Typography>\n </>\n </MenuItem>\n );\n }\n }\n };\n\n return getButtonView();\n }\n);\n\nActionButton.displayName = 'ActionButton';\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles((theme) => ({\n basicViewPaper: {\n display: 'flex',\n flexDirection: 'column',\n ...theme.basicView\n }\n}));\n","import React, {forwardRef} from 'react';\nimport Paper, {PaperProps} from '@mui/material/Paper';\nimport {useStyles} from './styles';\n\nconst BasicView = forwardRef(\n ({children, className, ...otherProps}: PaperProps, ref: React.RefObject<HTMLDivElement>) => {\n const styles = useStyles();\n return (\n <Paper ref={ref} className={className} classes={{root: styles.basicViewPaper}} {...otherProps}>\n {children}\n </Paper>\n );\n }\n);\n\nBasicView.displayName = 'BasicView';\n\nexport default BasicView;\n","import {makeStyles} from '@mui/styles';\n\nconst useStyles = makeStyles({\n paper: {\n minHeight: '180px'\n },\n title: {\n padding: '16px 16px 10px 16px',\n fontSize: '20px',\n fontWeight: 500,\n letterSpacing: '0.25px',\n lineHeight: '24px'\n },\n content: {\n padding: '0 16px'\n },\n contentText: {\n marginBottom: 0,\n fontSize: '16px',\n letterSpacing: '0.15px',\n lineHeight: '24px'\n },\n actionButtons: {\n display: 'flex',\n paddingTop: '4px',\n fontSize: '14px',\n fontWeight: 500,\n letterSpacing: 0,\n lineHeight: '16px',\n '& > div': {\n marginLeft: 'auto'\n }\n },\n discardButton: {\n marginRight: '8px'\n }\n});\n\nexport {useStyles};\n","import React from 'react';\nimport i18n from 'ui-i18n';\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogContentText from '@mui/material/DialogContentText';\nimport DialogTitle from '@mui/material/DialogTitle';\n\nimport {useStyles} from './styles';\n\nexport type Props = {\n open: boolean;\n title: React.ReactNode;\n content: React.ReactNode;\n cancelCaption?: string;\n discardCaption?: string;\n saveCaption?: string;\n disabledSave?: boolean;\n onCancel?: () => void;\n onDiscard?: () => void;\n onSave: () => void;\n};\n\nconst ConfirmationDialog = ({\n open,\n title,\n content,\n onCancel,\n cancelCaption = i18n.text('Cancel'),\n onDiscard,\n discardCaption = '',\n onSave,\n saveCaption = i18n.text('Save'),\n disabledSave = false\n}: Props) => {\n const styles = useStyles();\n\n return (\n <Dialog open={open} onClose={onCancel} classes={{paperScrollPaper: styles.paper}}>\n <DialogTitle classes={{root: styles.title}}>{title}</DialogTitle>\n <DialogContent classes={{root: styles.content}}>\n <DialogContentText classes={{root: styles.contentText}}>{content}</DialogContentText>\n </DialogContent>\n <DialogActions className={styles.actionButtons} disableSpacing>\n {onCancel && <Button onClick={onCancel}>{cancelCaption}</Button>}\n <div>\n {onDiscard && (\n <Button onClick={onDiscard} classes={{root: styles.discardButton}}>\n {discardCaption}\n </Button>\n )}\n <Button onClick={onSave} color=\"primary\" disabled={disabledSave} autoFocus>\n {saveCaption}\n </Button>\n </div>\n </DialogActions>\n </Dialog>\n );\n};\n\nexport default ConfirmationDialog;\n","import React, {useMemo, useCallback, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport {ConnectionRelationType, RelationTypeType} from '@reltio/mdm-sdk';\nimport {identity, pipe} from 'ramda';\nimport {useRelationTypeSelector} from '../../hooks';\nimport RelationTypeSelector from '../attributes/editMode/RelationTypeSelector/RelationTypeSelector';\n\nconst ConnectionRelationTypeSelector = ({\n relation = {},\n inRelationTypes = [],\n outRelationTypes = [],\n onChange = identity,\n applyFirstByDefault = false,\n reversedContextLabels = false,\n ...otherProps\n}) => {\n const {getRelationTypesOptions, fromEditorValue, toEditorValue} = useRelationTypeSelector({reversedContextLabels});\n\n const relationsTypesOptions = useMemo(\n () => getRelationTypesOptions(inRelationTypes, outRelationTypes),\n [getRelationTypesOptions, inRelationTypes, outRelationTypes]\n );\n\n const handleChange = useCallback(pipe(fromEditorValue(inRelationTypes, outRelationTypes), onChange), [\n fromEditorValue,\n inRelationTypes,\n outRelationTypes,\n onChange\n ]);\n\n const hasValue = !!relation.relationType;\n\n useEffect(() => {\n if (applyFirstByDefault && relationsTypesOptions.length && !hasValue) {\n handleChange(relationsTypesOptions[0]);\n }\n }, [relationsTypesOptions, applyFirstByDefault, handleChange, hasValue]);\n\n return (\n <RelationTypeSelector\n value={toEditorValue(relation, relationsTypesOptions)}\n options={relationsTypesOptions}\n onChange={handleChange}\n {...otherProps}\n />\n );\n};\n\nConnectionRelationTypeSelector.propTypes = {\n className: PropTypes.string,\n relation: ConnectionRelationType,\n inRelationTypes: PropTypes.arrayOf(RelationTypeType),\n outRelationTypes: PropTypes.arrayOf(RelationTypeType),\n applyFirstByDefault: PropTypes.bool,\n reversedContextLabels: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nexport default ConnectionRelationTypeSelector;\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n container: {\n padding: '0 16px',\n minHeight: '48px',\n '.react-draggable &': {\n paddingTop: '4px'\n }\n },\n title: {\n fontSize: '16px',\n lineHeight: '19px',\n justifyContent: 'flex-start'\n }\n});\n","import React from 'react';\nimport classnames from 'classnames';\nimport BasicViewHeader from '../BasicViewHeader/BasicViewHeader';\nimport {useStyles} from './styles';\n\ntype Props = {\n className?: string;\n title: string;\n children?: React.ReactNode;\n};\n\nconst FacetViewHeader = ({className, title, children}: Props) => {\n const styles = useStyles();\n return (\n <BasicViewHeader title={title} classes={{root: classnames(styles.container, className), title: styles.title}}>\n {children}\n </BasicViewHeader>\n );\n};\n\nexport default FacetViewHeader;\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles((theme) => ({\n link: {\n cursor: 'pointer',\n color: theme.palette.primary.main,\n lineHeight: '15px',\n wordBreak: 'break-word'\n },\n selected: {\n fontWeight: 'bold'\n },\n popper: {\n maxWidth: '345px',\n minWidth: '200px',\n boxShadow: '0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)',\n backgroundColor: 'white',\n borderRadius: '2px'\n }\n}));\n","import React, {useCallback, useContext} from 'react';\nimport classnames from 'classnames';\nimport {useSelector, useDispatch} from 'react-redux';\nimport mdm, {ui} from '@reltio/mdm-module';\nimport Link from '../Link/Link';\nimport Popper from '../Popper/Popper';\nimport ProfileCard from '../ProfileCard/ProfileCard';\nimport {UrlGeneratorsContext} from '../../contexts';\nimport {useEntityDetails} from './hooks/useEntityDetails';\nimport {useStyles} from './styles';\n\ntype NodeTitleProps = {\n title: string;\n entityUri: string;\n viewId: string;\n isSelected?: boolean;\n anchorEl?: HTMLElement;\n withEntityDetails?: boolean;\n};\n\nexport const HierarchyNodeTitle = ({\n title,\n isSelected,\n entityUri,\n viewId,\n anchorEl,\n withEntityDetails = true\n}: NodeTitleProps) => {\n const styles = useStyles();\n const dispatch = useDispatch();\n const uiPath = useSelector(mdm.selectors.getUIPath);\n const {generateEntityUrl} = useContext(UrlGeneratorsContext);\n\n const {isLoading, entityDetails, showEntityDetails, hideEntityDetails} = useEntityDetails(entityUri);\n\n const link = generateEntityUrl({uiPath, uri: entityUri});\n const showPopper = Boolean(anchorEl) && (Boolean(entityDetails) || isLoading);\n\n const handleClick = useCallback(() => {\n dispatch(ui.actions.openEntity({uri: entityUri, viewId}));\n }, [dispatch, entityUri, viewId]);\n\n return (\n <>\n <span\n data-reltio-id=\"reltio-hierarchy-node-title\"\n className={classnames(styles.link, {[styles.selected]: isSelected})}\n onMouseEnter={withEntityDetails ? showEntityDetails : undefined}\n onMouseLeave={withEntityDetails ? hideEntityDetails : undefined}\n >\n <Link to={link} onClick={handleClick}>\n {title}\n </Link>\n </span>\n <Popper anchorEl={anchorEl} className={styles.popper} open={showPopper} modal={false} placement=\"top-start\">\n <ProfileCard entity={entityDetails} variant={isLoading ? 'loading' : 'normal'} />\n </Popper>\n </>\n );\n};\n","import {useState, useCallback, useRef, useEffect} from 'react';\nimport {getEntity} from '@reltio/mdm-sdk';\nimport {useSafePromise} from '../../../hooks/useSafePromise';\n\nexport const useEntityDetails = (entityUri: string) => {\n const [entityDetails, setEntityDetails] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n const timerId = useRef(null);\n const safePromise = useSafePromise();\n\n const cancelRequest = useCallback(() => safePromise(Promise.resolve()), [safePromise]);\n\n const showEntityDetails = useCallback(() => {\n timerId.current = setTimeout(() => {\n setIsLoading(true);\n safePromise(getEntity(entityUri))\n .then(setEntityDetails)\n .finally(() => setIsLoading(false));\n }, 1000);\n }, [entityUri, safePromise]);\n\n const hideEntityDetails = useCallback(() => {\n cancelRequest();\n clearTimeout(timerId.current);\n setIsLoading(false);\n setEntityDetails(null);\n }, [cancelRequest]);\n\n useEffect(() => {\n return () => clearTimeout(timerId.current);\n }, []);\n\n return {\n isLoading,\n entityDetails,\n showEntityDetails,\n hideEntityDetails\n };\n};\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n link: {\n textDecoration: 'inherit',\n color: 'inherit',\n '&:visited': {\n textDecoration: 'inherit',\n color: 'inherit'\n }\n }\n});\n","import React, {ReactNode} from 'react';\nimport {useStyles} from './styles';\n\ntype LinkProps = {\n to?: string;\n children?: ReactNode;\n onClick?: () => void;\n};\nconst Link = ({to, children, onClick}: LinkProps) => {\n const styles = useStyles();\n return (\n <a\n href={to}\n onClick={(e) => {\n if (onClick) {\n onClick();\n e.stopPropagation();\n e.preventDefault();\n }\n }}\n className={styles.link}\n >\n {children}\n </a>\n );\n};\n\nexport default Link;\n","export const SpinnerSmall =\n 'R0lGODlhFQALAKIAAP///8Hf75vL5Van0wB4v////wAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAFACwAAAIAFQAHAAADLFi6zPSQFEGpGhgXkrEUQShc1bB1wxcGYzGUZ6eKJGVy8lS1aJxJjaAiAkkAACH5BAkKAAUALAAAAwAUAAUAAAMiWLFbJRC6QakCODjBxIzDlW3dB4UBBmhPWQygwrCR9FZDAgAh+QQJCgAFACwIAAMADAAFAAADFBiqVfIvgBmaWHeC6rCklrdw0JMAACH5BAkKAAUALAAAAgAUAAcAAAMkSLpU/vCRQWmLLmg967hYAIxBV4GRSJoWlo1A6X1usXGMUkcJACH5BAkKAAUALAAAAgAOAAcAAAMdWLpF/qSMORudcYg97M2b0BHXAHIelV0pxizQkwAAOw==';\n","import React from 'react';\nimport {gif2Url} from '@reltio/mdm-sdk';\nimport {SpinnerSmall} from './SpinnerSmall.gif';\n\ntype Props = {\n className?: string;\n};\n\nexport const LoadingSpinner = ({className}: Props) => {\n return <img className={className} alt=\"loading\" src={gif2Url(SpinnerSmall)} />;\n};\n\nexport default LoadingSpinner;\n","import {makeStyles} from '@mui/styles';\n\nconst useStyles = makeStyles((theme) => ({\n image: {\n width: '40px',\n height: '40px'\n },\n info: {\n marginLeft: '12px',\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column'\n },\n label: {\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n fontWeight: 400,\n fontSize: '13px',\n lineHeight: '15px',\n color: theme.palette.primary.main\n },\n secondaryLabel: {\n marginTop: '4px',\n fontWeight: 400,\n fontSize: '10px',\n lineHeight: '12px',\n color: theme.palette.text.secondary,\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n link: {\n textDecoration: 'none'\n },\n thirdRow: {\n display: 'flex',\n overflow: 'hidden',\n alignItems: 'center',\n marginTop: 'auto',\n paddingTop: '4px'\n },\n entityId: {\n display: 'flex',\n overflow: 'hidden',\n alignItems: 'baseline',\n whiteSpace: 'nowrap',\n fontWeight: 400,\n fontSize: '12px',\n lineHeight: '16px'\n },\n entityIdLabel: {\n color: theme.palette.text.secondary\n },\n entityIdValue: {\n marginLeft: '8px',\n color: theme.palette.text.primary,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n '&[aria-describedby]': {\n cursor: 'pointer',\n '&:hover': {\n textDecoration: 'underline'\n }\n }\n }\n}));\n\nexport default useStyles;\n","import React, {useCallback} from 'react';\nimport i18n from 'ui-i18n';\nimport classnames from 'classnames';\nimport {Entity, getEntityId, getEntityUriForLink, getLabel} from '@reltio/mdm-sdk';\nimport EntityAvatar from '../../EntityAvatar/EntityAvatar';\nimport EntityUriLink from '../../EntityUriLink/EntityUriLink';\nimport ExpandedValueTooltip from '../../ExpandedValueTooltip/ExpandedValueTooltip';\nimport EntityTypeBadge from '../../EntityTypeBadge/EntityTypeBadge';\nimport useStyles from './styles';\n\ntype Props = {\n entity: Entity;\n classes?: {\n label?: string;\n secondaryLabel?: string;\n };\n};\n\nexport const ProfileCardContent = ({entity, classes = {}}: Props) => {\n const styles = useStyles();\n const {secondaryLabel: secondaryLabelClass, label: labelClass} = classes;\n const label = getLabel(entity.label);\n const {secondaryLabel} = entity;\n const handleCopyEntityIdToClipboard = useCallback(() => {\n navigator.clipboard.writeText(getEntityId(entity));\n }, [entity]);\n\n return (\n <>\n <EntityAvatar entity={entity} imageClassName={styles.image} />\n <div className={styles.info}>\n <EntityUriLink value={getEntityUriForLink(entity)} className={styles.link}>\n <ExpandedValueTooltip value={label} placement=\"top\" showOnExceededHeight={true}>\n <div className={classnames(styles.label, labelClass)}>{label}</div>\n </ExpandedValueTooltip>\n </EntityUriLink>\n\n {secondaryLabel && (\n <ExpandedValueTooltip value={secondaryLabel} placement=\"top\" showOnExceededHeight={true}>\n <div className={classnames(styles.secondaryLabel, secondaryLabelClass)}>{secondaryLabel}</div>\n </ExpandedValueTooltip>\n )}\n <div className={styles.thirdRow}>\n <EntityTypeBadge entity={entity} size=\"medium\" />\n <div className={styles.entityId} onClick={handleCopyEntityIdToClipboard}>\n <div className={styles.entityIdLabel}>{i18n.text('ID:')}</div>\n <ExpandedValueTooltip value={`Copy to clipboard ${getEntityId(entity)}`} placement=\"top\">\n <div className={styles.entityIdValue}>{getEntityId(entity)}</div>\n </ExpandedValueTooltip>\n </div>\n </div>\n </div>\n </>\n );\n};\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n '@keyframes keyframes-wave': {\n '0%': {\n transform: 'translateX(-100%)'\n },\n '60%': {\n transform: 'translateX(100%)'\n },\n '100%': {\n transform: 'translateX(100%)'\n }\n },\n wave: {\n overflow: 'hidden',\n position: 'relative',\n '&:after': {\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n content: '\"\"',\n position: 'absolute',\n animation: '$keyframes-wave 1.6s linear 0.5s infinite',\n transform: 'translateX(-100%)',\n background: 'linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.04), transparent);'\n }\n },\n avatar: {\n flex: 'none',\n width: '40px',\n height: '40px',\n borderRadius: '50%',\n backgroundColor: 'rgba(0, 0, 0, 0.11)'\n },\n info: {\n marginLeft: '12px',\n flex: 'auto'\n },\n label: {\n width: '40%',\n height: '15px',\n borderRadius: '2px',\n backgroundColor: 'rgba(0, 0, 0, 0.11)'\n },\n secondaryLabel: {\n marginTop: '4px',\n width: '100%',\n height: '12px',\n borderRadius: '2px',\n backgroundColor: 'rgba(0, 0, 0, 0.11)'\n },\n thirdRow: {\n marginTop: '4px',\n width: '60%',\n height: '24px',\n borderRadius: '2px',\n backgroundColor: 'rgba(0, 0, 0, 0.11)'\n }\n});\n","import React from 'react';\nimport classnames from 'classnames';\nimport {useStyles} from './styles';\n\nexport const ProfileCardPlaceholder = () => {\n const styles = useStyles();\n return (\n <>\n <div className={classnames(styles.avatar, styles.wave)} />\n <div className={styles.info}>\n <div className={classnames(styles.label, styles.wave)} />\n <div className={classnames(styles.secondaryLabel, styles.wave)} />\n <div className={classnames(styles.thirdRow, styles.wave)} />\n </div>\n </>\n );\n};\n","import {makeStyles} from '@mui/styles';\n\nconst useStyles = makeStyles({\n container: {\n display: 'flex',\n padding: '16px',\n overflow: 'hidden'\n }\n});\n\nexport default useStyles;\n","import React, {memo} from 'react';\nimport classnames from 'classnames';\nimport {Entity} from '@reltio/mdm-sdk';\nimport {ProfileCardContent} from './ProfileCardContent/ProfileCardContent';\nimport {ProfileCardPlaceholder} from './ProfileCardPlaceholder/ProfileCardPlaceholder';\nimport useStyles from './styles';\n\ntype Props = {\n entity: Entity;\n classes?: {\n label?: string;\n secondaryLabel?: string;\n container?: string;\n };\n variant?: 'loading' | 'normal';\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst ProfileCard = ({entity, classes = {}, variant = 'normal', ...otherProps}: Props) => {\n const styles = useStyles();\n const {container: containerClass} = classes;\n return (\n <div className={classnames(styles.container, containerClass)} {...otherProps}>\n {variant === 'normal' ? (\n <ProfileCardContent entity={entity} classes={classes} />\n ) : (\n <ProfileCardPlaceholder />\n )}\n </div>\n );\n};\n\nexport default memo(ProfileCard);\n","import {makeStyles} from '@mui/styles';\n\nconst useStyles = makeStyles(() => ({\n resizablePanesWrapper: {\n flexGrow: 1,\n height: '100%',\n marginRight: '1px'\n },\n pane: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n display: 'flex',\n flexDirection: 'column',\n overflow: 'hidden'\n }\n}));\n\nexport {useStyles};\n","import React, {useCallback, cloneElement} from 'react';\nimport {ResizablePanes} from '../ResizablePanes/ResizablePanes';\nimport {SideButtonsPanel} from '../SideIconPanel/SideButtonsPanel';\nimport {usePerspectivesSettings} from '../../contexts';\nimport {isNil} from 'ramda';\n\nimport {useStyles} from './styles';\nimport {RightPanelTab} from '../../types';\n\nconst DEFAULT_R_PANE_SIZE = 480;\nconst MIN_R_PANE_SIZE = 320;\nconst MAX_R_PANE_SIZE = 640;\n\ntype Props = {\n perspectiveId: string;\n children: [React.ReactElement, React.ReactElement];\n buttonsProps: Array<RightPanelTab['buttonProps']>;\n disabled?: boolean;\n defaultTab?: number;\n};\n\nexport const ProfileResizablePanes = ({perspectiveId, children, buttonsProps, disabled, defaultTab}: Props) => {\n const styles = useStyles();\n\n const {perspectiveSettings, updatePerspectiveSettings} = usePerspectivesSettings(perspectiveId);\n const {width = DEFAULT_R_PANE_SIZE} = perspectiveSettings || {};\n const active = defaultTab || perspectiveSettings?.active;\n const isSidePanelOpen = !isNil(active) && !disabled;\n\n const handleUpdateSettings = useCallback(\n (newSetting) => {\n updatePerspectiveSettings(newSetting);\n },\n [updatePerspectiveSettings]\n );\n\n const toggleActive = useCallback(\n (newId: number) => {\n const newActive = active === newId ? null : newId;\n handleUpdateSettings({active: newActive});\n },\n [active, handleUpdateSettings]\n );\n\n const resetActive = useCallback((): void => {\n handleUpdateSettings({active: null});\n }, [handleUpdateSettings]);\n\n const handlePaneSizeChange = useCallback(\n ({size}) => {\n handleUpdateSettings({width: size});\n },\n [handleUpdateSettings]\n );\n\n return (\n <>\n <ResizablePanes\n className={styles.resizablePanesWrapper}\n primary=\"second\"\n orientation=\"vertical\"\n size={isSidePanelOpen ? width : 0}\n minSize={MIN_R_PANE_SIZE}\n maxSize={MAX_R_PANE_SIZE}\n allowResize={isSidePanelOpen}\n onChange={handlePaneSizeChange}\n debounceInterval={2500}\n >\n <div className={styles.pane}>{children[0]}</div>\n <div className={styles.pane}>{cloneElement(children[1], {active, onClose: resetActive})}</div>\n </ResizablePanes>\n <SideButtonsPanel\n disabled={disabled}\n buttonsProps={buttonsProps}\n onButtonClick={toggleActive}\n activeIndexId={active}\n />\n </>\n );\n};\n\nProfileResizablePanes.displayName = 'ProfileResizablePanes';\n","// very simple className utility for creating a classname string...\n// Falsy arguments are ignored:\n//\n// const active = true\n// const className = classnames(\n// \"class1\",\n// !active && \"class2\",\n// active && \"class3\"\n// ); // returns -> class1 class3\";\n//\nexport default function classnames(...classes) {\n // Use Boolean constructor as a filter callback\n // Allows for loose type truthy/falsey checks\n // Boolean(\"\") === false;\n // Boolean(false) === false;\n // Boolean(undefined) === false;\n // Boolean(null) === false;\n // Boolean(0) === false;\n // Boolean(\"classname\") === true;\n return classes.filter(Boolean).join(' ');\n}\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles(() => ({\n '@global .rst__node': {\n minWidth: '100%',\n whiteSpace: 'nowrap',\n position: 'relative',\n textAlign: 'left'\n },\n\n '@global .rst__node.rst__rtl': {\n textAlign: 'right'\n },\n\n '@global .rst__nodeContent': {\n position: 'absolute',\n top: 0,\n bottom: 0\n },\n\n /* ==========================================================================\n Scaffold\n \n Line-overlaid blocks used for showing the tree structure\n ========================================================================== */\n '@global .rst__lineBlock, .rst__absoluteLineBlock': {\n height: '100%',\n position: 'relative',\n display: 'inline-block'\n },\n\n '@global .rst__absoluteLineBlock': {\n position: 'absolute',\n top: 0\n },\n\n '@global .rst__lineHalfHorizontalRight::before, .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after':\n {\n position: 'absolute',\n content: '',\n backgroundColor: 'black'\n },\n\n /**\n * +-----+\n * | |\n * | +--+\n * | |\n * +-----+\n */\n '@global .rst__lineHalfHorizontalRight::before': {\n height: '1px',\n top: '50%',\n right: 0,\n width: '50%'\n },\n\n '@global .rst__rtl.rst__lineHalfHorizontalRight::before': {\n left: 0,\n right: 'initial'\n },\n\n /**\n * +--+--+\n * | | |\n * | | |\n * | | |\n * +--+--+\n */\n '@global .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after': {\n width: '1px',\n left: '50%',\n top: 0,\n height: '100%'\n },\n\n /**\n * +--+--+\n * | | |\n * | | |\n * | | |\n * +--+--+\n */\n '@global .rst__rtl.rst__lineFullVertical::after, .rst__rtl.rst__lineHalfVerticalTop::after, .rst__rtl.rst__lineHalfVerticalBottom::after':\n {\n right: '50%',\n left: 'initial'\n },\n\n /**\n * +-----+\n * | | |\n * | + |\n * | |\n * +-----+\n */\n '@global .rst__lineHalfVerticalTop::after': {\n height: '50%'\n },\n\n /**\n * +-----+\n * | |\n * | + |\n * | | |\n * +-----+\n */\n '@global .rst__lineHalfVerticalBottom::after': {\n top: 'auto',\n bottom: 0,\n height: '50%'\n },\n\n /* Highlight line for pointing to dragged row destination\n ========================================================================== */\n /**\n * +--+--+\n * | | |\n * | | |\n * | | |\n * +--+--+\n */\n '@global .rst__highlightLineVertical': {\n zIndex: 3\n },\n '@global .rst__highlightLineVertical::before': {\n position: 'absolute',\n content: '',\n backgroundColor: '#36c2f6',\n width: '8px',\n marginLeft: '-4px',\n left: '50%',\n top: 0,\n height: '100%'\n },\n\n '@global .rst__rtl.rst__highlightLineVertical::before': {\n marginLeft: 'initial',\n marginRight: '-4px',\n left: 'initial',\n right: '50%'\n },\n\n '@keyframes arrow-pulse': {\n '0%': {\n transform: 'translate(0, 0)',\n opacity: 0\n },\n '30%': {\n transform: 'translate(0, 300%)',\n opacity: 1\n },\n '70%': {\n transform: 'translate(0, 700%)',\n opacity: 1\n },\n '100%': {\n transform: 'translate(0, 1000%)',\n opacity: 0\n }\n },\n '@global .rst__highlightLineVertical::after': {\n content: '',\n position: 'absolute',\n height: 0,\n marginLeft: '-4px',\n left: '50%',\n top: 0,\n borderLeft: '4px solid transparent',\n borderRight: '4px solid transparent',\n borderTop: '4px solid white',\n animation: 'arrow-pulse 1s infinite linear both'\n },\n\n '@global .rst__rtl.rst__highlightLineVertical::after': {\n marginLeft: 'initial',\n marginRight: '-4px',\n right: '50%',\n left: 'initial'\n },\n\n /**\n * +-----+\n * | |\n * | +--+\n * | | |\n * +--+--+\n */\n '@global .rst__highlightTopLeftCorner::before': {\n zIndex: 3,\n content: '',\n position: 'absolute',\n borderTop: 'solid 8px #36c2f6',\n borderLeft: 'solid 8px #36c2f6',\n boxSizing: 'border-box',\n height: 'calc(50% + 4px)',\n top: '50%',\n marginTop: '-4px',\n right: 0,\n width: 'calc(50% + 4px)'\n },\n\n '@global .rst__rtl.rst__highlightTopLeftCorner::before': {\n borderRight: 'solid 8px #36c2f6',\n borderLeft: 'none',\n left: 0,\n right: 'initial'\n },\n\n /**\n * +--+--+\n * | | |\n * | | |\n * | +->|\n * +-----+\n */\n '@global .rst__highlightBottomLeftCorner': {\n zIndex: 3\n },\n '@global .rst__highlightBottomLeftCorner::before': {\n content: '',\n position: 'absolute',\n borderBottom: 'solid 8px #36c2f6',\n borderLeft: 'solid 8px #36c2f6',\n boxSizing: 'border-box',\n height: 'calc(100% + 4px)',\n top: 0,\n right: '12px',\n width: 'calc(50% - 8px)'\n },\n\n '@global .rst__rtl.rst__highlightBottomLeftCorner::before': {\n borderRight: 'solid 8px #36c2f6',\n borderLeft: 'none',\n left: '12px',\n right: 'initial'\n },\n\n '@global .rst__highlightBottomLeftCorner::after': {\n content: '',\n position: 'absolute',\n height: 0,\n right: 0,\n top: '100%',\n marginTop: '-12px',\n borderTop: '12px solid transparent',\n borderBottom: '12px solid transparent',\n borderLeft: '12px solid #36c2f6'\n },\n\n '@global .rst__rtl.rst__highlightBottomLeftCorner::after': {\n left: 0,\n right: 'initial',\n borderRight: '12px solid #36c2f6',\n borderLeft: 'none'\n }\n}));\n","import React, {Children, cloneElement} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from './utils/classnames';\nimport {useStyles} from './treeNodeStyle';\n\nconst TreeNode = ({\n children,\n listIndex,\n swapFrom,\n swapLength,\n swapDepth,\n scaffoldBlockPxWidth,\n lowerSiblingCounts,\n connectDropTarget,\n isOver,\n draggedNode,\n canDrop,\n treeIndex,\n /* eslint-disable */\n treeId, // Delete from otherProps\n getPrevRow, // Delete from otherProps\n node, // Delete from otherProps\n path, // Delete from otherProps\n /* eslint-enable */\n rowDirection,\n ...otherProps\n}) => {\n useStyles();\n const rowDirectionClass = rowDirection === 'rtl' ? 'rst__rtl' : null;\n\n // Construct the scaffold representing the structure of the tree\n const scaffoldBlockCount = lowerSiblingCounts.length;\n const scaffold = [];\n lowerSiblingCounts.forEach((lowerSiblingCount, i) => {\n let lineClass = '';\n if (lowerSiblingCount > 0) {\n // At this level in the tree, the nodes had sibling nodes further down\n\n if (listIndex === 0) {\n // Top-left corner of the tree\n // +-----+\n // | |\n // | +--+\n // | | |\n // +--+--+\n lineClass = 'rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom';\n } else if (i === scaffoldBlockCount - 1) {\n // Last scaffold block in the row, right before the row content\n // +--+--+\n // | | |\n // | +--+\n // | | |\n // +--+--+\n lineClass = 'rst__lineHalfHorizontalRight rst__lineFullVertical';\n } else {\n // Simply connecting the line extending down to the next sibling on this level\n // +--+--+\n // | | |\n // | | |\n // | | |\n // +--+--+\n lineClass = 'rst__lineFullVertical';\n }\n } else if (listIndex === 0) {\n // Top-left corner of the tree, but has no siblings\n // +-----+\n // | |\n // | +--+\n // | |\n // +-----+\n lineClass = 'rst__lineHalfHorizontalRight';\n } else if (i === scaffoldBlockCount - 1) {\n // The last or only node in this level of the tree\n // +--+--+\n // | | |\n // | +--+\n // | |\n // +-----+\n lineClass = 'rst__lineHalfVerticalTop rst__lineHalfHorizontalRight';\n }\n\n scaffold.push(\n <div\n key={`pre_${1 + i}`}\n style={{width: scaffoldBlockPxWidth}}\n className={classnames('rst__lineBlock', lineClass, rowDirectionClass)}\n />\n );\n\n if (treeIndex !== listIndex && i === swapDepth) {\n // This row has been shifted, and is at the depth of\n // the line pointing to the new destination\n let highlightLineClass = '';\n\n if (listIndex === swapFrom + swapLength - 1) {\n // This block is on the bottom (target) line\n // This block points at the target block (where the row will go when released)\n highlightLineClass = 'rst__highlightBottomLeftCorner';\n } else if (treeIndex === swapFrom) {\n // This block is on the top (source) line\n highlightLineClass = 'rst__highlightTopLeftCorner';\n } else {\n // This block is between the bottom and top\n highlightLineClass = 'rst__highlightLineVertical';\n }\n\n let style;\n if (rowDirection === 'rtl') {\n style = {\n width: scaffoldBlockPxWidth,\n right: scaffoldBlockPxWidth * i\n };\n } else {\n // Default ltr\n style = {\n width: scaffoldBlockPxWidth,\n left: scaffoldBlockPxWidth * i\n };\n }\n\n scaffold.push(\n <div\n // eslint-disable-next-line react/no-array-index-key\n key={i}\n style={style}\n className={classnames('rst__absoluteLineBlock', highlightLineClass, rowDirectionClass)}\n />\n );\n }\n });\n\n let style;\n if (rowDirection === 'rtl') {\n style = {right: scaffoldBlockPxWidth * scaffoldBlockCount};\n } else {\n // Default ltr\n style = {left: scaffoldBlockPxWidth * scaffoldBlockCount};\n }\n\n return connectDropTarget(\n <div {...otherProps} className={classnames('rst__node', rowDirectionClass)}>\n {scaffold}\n\n <div className=\"rst__nodeContent\" style={style}>\n {Children.map(children, (child) =>\n cloneElement(child, {\n isOver,\n canDrop,\n draggedNode\n })\n )}\n </div>\n </div>\n );\n};\n\nTreeNode.defaultProps = {\n swapFrom: null,\n swapDepth: null,\n swapLength: null,\n canDrop: false,\n draggedNode: null,\n rowDirection: 'ltr'\n};\n\nTreeNode.propTypes = {\n treeIndex: PropTypes.number.isRequired,\n treeId: PropTypes.string.isRequired,\n swapFrom: PropTypes.number,\n swapDepth: PropTypes.number,\n swapLength: PropTypes.number,\n scaffoldBlockPxWidth: PropTypes.number.isRequired,\n lowerSiblingCounts: PropTypes.arrayOf(PropTypes.number).isRequired,\n\n listIndex: PropTypes.number.isRequired,\n children: PropTypes.node.isRequired,\n\n // Drop target\n connectDropTarget: PropTypes.func.isRequired,\n isOver: PropTypes.bool.isRequired,\n canDrop: PropTypes.bool,\n draggedNode: PropTypes.shape({}),\n\n // used in dndManager\n getPrevRow: PropTypes.func.isRequired,\n node: PropTypes.shape({}).isRequired,\n path: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])).isRequired,\n\n // rtl support\n rowDirection: PropTypes.string\n};\n\nexport default TreeNode;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isDescendant} from './utils/tree-data-utils';\nimport classnames from './utils/classnames';\n//import {useStyles} from './nodeRendererDefaultStyle';\n\nconst NodeRendererDefault = ({\n scaffoldBlockPxWidth,\n toggleChildrenVisibility,\n connectDragPreview,\n connectDragSource,\n isDragging,\n canDrop,\n canDrag,\n node,\n title,\n subtitle,\n draggedNode,\n path,\n treeIndex,\n isSearchMatch,\n isSearchFocus,\n buttons,\n className,\n style,\n didDrop,\n /* eslint-disable */\n treeId,\n isOver, // Not needed, but preserved for other renderers\n parentNode, // Needed for dndManager\n /* eslint-enable */\n rowDirection,\n ...otherProps\n}) => {\n //useStyles();\n const nodeTitle = title || node.title;\n const nodeSubtitle = subtitle || node.subtitle;\n const rowDirectionClass = rowDirection === 'rtl' ? 'rst__rtl' : null;\n\n let handle;\n if (canDrag) {\n if (typeof node.children === 'function' && node.expanded) {\n // Show a loading symbol on the handle when the children are expanded\n // and yet still defined by a function (a callback to fetch the children)\n handle = (\n <div className=\"rst__loadingHandle\">\n <div className=\"rst__loadingCircle\">\n {[...new Array(12)].map((_, index) => (\n <div\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n className={classnames('rst__loadingCirclePoint', rowDirectionClass)}\n />\n ))}\n </div>\n </div>\n );\n } else {\n // Show the handle used to initiate a drag-and-drop\n handle = connectDragSource(<div className=\"rst__moveHandle\" />, {\n dropEffect: 'copy'\n });\n }\n }\n\n const isDraggedDescendant = draggedNode && isDescendant(draggedNode, node);\n const isLandingPadActive = !didDrop && isDragging;\n\n let buttonStyle = {left: -0.5 * scaffoldBlockPxWidth};\n if (rowDirection === 'rtl') {\n buttonStyle = {right: -0.5 * scaffoldBlockPxWidth};\n }\n\n return (\n <div style={{height: '100%'}} {...otherProps}>\n {toggleChildrenVisibility &&\n node.children &&\n (node.children.length > 0 || typeof node.children === 'function') && (\n <div>\n <button\n type=\"button\"\n aria-label={node.expanded ? 'Collapse' : 'Expand'}\n className={classnames(\n node.expanded ? 'rst__collapseButton' : 'rst__expandButton',\n rowDirectionClass\n )}\n style={buttonStyle}\n onClick={() =>\n toggleChildrenVisibility({\n node,\n path,\n treeIndex\n })\n }\n />\n\n {node.expanded && !isDragging && (\n <div\n style={{width: scaffoldBlockPxWidth}}\n className={classnames('rst__lineChildren', rowDirectionClass)}\n />\n )}\n </div>\n )}\n\n <div className={classnames('rst__rowWrapper', rowDirectionClass)}>\n {/* Set the row preview to be used during drag and drop */}\n {connectDragPreview(\n <div\n className={classnames(\n 'rst__row',\n isLandingPadActive && 'rst__rowLandingPad',\n isLandingPadActive && !canDrop && 'rst__rowCancelPad',\n isSearchMatch && 'rst__rowSearchMatch',\n isSearchFocus && 'rst__rowSearchFocus',\n rowDirectionClass,\n className\n )}\n style={{\n opacity: isDraggedDescendant ? 0.5 : 1,\n ...style\n }}\n >\n {handle}\n\n <div\n className={classnames(\n 'rst__rowContents',\n !canDrag && 'rst__rowContentsDragDisabled',\n rowDirectionClass\n )}\n >\n <div className={classnames('rst__rowLabel', rowDirectionClass)}>\n <span\n className={classnames(\n 'rst__rowTitle',\n node.subtitle && 'rst__rowTitleWithSubtitle'\n )}\n >\n {typeof nodeTitle === 'function'\n ? nodeTitle({\n node,\n path,\n treeIndex\n })\n : nodeTitle}\n </span>\n\n {nodeSubtitle && (\n <span className=\"rst__rowSubtitle\">\n {typeof nodeSubtitle === 'function'\n ? nodeSubtitle({\n node,\n path,\n treeIndex\n })\n : nodeSubtitle}\n </span>\n )}\n </div>\n\n <div className=\"rst__rowToolbar\">\n {buttons.map((btn, index) => (\n <div\n key={index} // eslint-disable-line react/no-array-index-key\n className=\"rst__toolbarButton\"\n >\n {btn}\n </div>\n ))}\n </div>\n </div>\n </div>\n )}\n </div>\n </div>\n );\n};\n\nNodeRendererDefault.defaultProps = {\n isSearchMatch: false,\n isSearchFocus: false,\n canDrag: false,\n toggleChildrenVisibility: null,\n buttons: [],\n className: '',\n style: {},\n parentNode: null,\n draggedNode: null,\n canDrop: false,\n title: null,\n subtitle: null,\n rowDirection: 'ltr'\n};\n\nNodeRendererDefault.propTypes = {\n node: PropTypes.shape({}).isRequired,\n title: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n subtitle: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n path: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])).isRequired,\n treeIndex: PropTypes.number.isRequired,\n treeId: PropTypes.string.isRequired,\n isSearchMatch: PropTypes.bool,\n isSearchFocus: PropTypes.bool,\n canDrag: PropTypes.bool,\n scaffoldBlockPxWidth: PropTypes.number.isRequired,\n toggleChildrenVisibility: PropTypes.func,\n buttons: PropTypes.arrayOf(PropTypes.node),\n className: PropTypes.string,\n style: PropTypes.shape({}),\n\n // Drag and drop API functions\n // Drag source\n connectDragPreview: PropTypes.func.isRequired,\n connectDragSource: PropTypes.func.isRequired,\n parentNode: PropTypes.shape({}), // Needed for dndManager\n isDragging: PropTypes.bool.isRequired,\n didDrop: PropTypes.bool.isRequired,\n draggedNode: PropTypes.shape({}),\n // Drop target\n isOver: PropTypes.bool.isRequired,\n canDrop: PropTypes.bool,\n\n // rtl support\n rowDirection: PropTypes.string\n};\n\nexport default NodeRendererDefault;\n","import React, {Children, cloneElement, Component} from 'react';\nimport PropTypes from 'prop-types';\n\nclass TreePlaceholder extends Component {\n render() {\n // eslint-disable-next-line no-unused-vars\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {children, connectDropTarget, treeId, drop, ...otherProps} = this.props;\n return connectDropTarget(\n <div>\n {Children.map(children, (child) =>\n cloneElement(child, {\n ...otherProps\n })\n )}\n </div>\n );\n }\n}\n\nTreePlaceholder.defaultProps = {\n canDrop: false,\n draggedNode: null\n};\n\nTreePlaceholder.propTypes = {\n children: PropTypes.node.isRequired,\n\n // Drop target\n connectDropTarget: PropTypes.func.isRequired,\n isOver: PropTypes.bool.isRequired,\n canDrop: PropTypes.bool,\n draggedNode: PropTypes.shape({}),\n treeId: PropTypes.string.isRequired,\n drop: PropTypes.func.isRequired\n};\n\nexport default TreePlaceholder;\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles(() => ({\n '@global .rst__placeholder': {\n position: 'relative',\n height: '68px',\n maxWidth: '300px',\n padding: '10px'\n },\n '@global .rst__placeholder, .rst__placeholder > *': {\n boxSizing: 'border-box'\n },\n '@global .rst__placeholder::before': {\n border: '3px dashed #d9d9d9',\n content: '',\n position: 'absolute',\n top: '5px',\n right: '5px',\n bottom: '5px',\n left: '5px',\n zIndex: -1\n },\n\n /**\n * The outline of where the element will go if dropped, displayed while dragging\n */\n '@global .rst__placeholderLandingPad, .rst__placeholderCancelPad': {\n border: 'none !important',\n boxShadow: 'none !important',\n outline: 'none !important'\n },\n '@global .rst__placeholderLandingPad *, .rst__placeholderCancelPad *': {\n opacity: '0 !important'\n },\n '@global .rst__placeholderLandingPad::before, .rst__placeholderCancelPad::before': {\n backgroundColor: 'lightblue',\n borderColor: 'white'\n },\n\n /**\n * Alternate appearance of the landing pad when the dragged location is invalid\n */\n '@global .rst__placeholderCancelPad::before': {\n backgroundColor: '#e6a8ad'\n }\n}));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from './utils/classnames';\nimport {useStyles} from './placeholderRendererDefaultStyle';\n\nconst PlaceholderRendererDefault = ({isOver, canDrop}) => {\n useStyles();\n return (\n <div\n className={classnames(\n 'rst__placeholder',\n canDrop && 'rst__placeholderLandingPad',\n canDrop && !isOver && 'rst__placeholderCancelPad'\n )}\n />\n );\n};\n\nPlaceholderRendererDefault.defaultProps = {\n isOver: false,\n canDrop: false\n};\n\nPlaceholderRendererDefault.propTypes = {\n isOver: PropTypes.bool,\n canDrop: PropTypes.bool\n};\n\nexport default PlaceholderRendererDefault;\n","import {insertNode, getDescendantCount, getFlatDataFromTree} from './tree-data-utils';\n\nconst memoize = (f) => {\n let savedArgsArray = [];\n let savedKeysArray = [];\n let savedResult = null;\n\n return (args) => {\n const keysArray = Object.keys(args).sort();\n const argsArray = keysArray.map((key) => args[key]);\n\n // If the arguments for the last insert operation are different than this time,\n // recalculate the result\n if (\n argsArray.length !== savedArgsArray.length ||\n argsArray.some((arg, index) => arg !== savedArgsArray[index]) ||\n keysArray.some((key, index) => key !== savedKeysArray[index])\n ) {\n savedArgsArray = argsArray;\n savedKeysArray = keysArray;\n savedResult = f(args);\n }\n\n return savedResult;\n };\n};\n\nexport const memoizedInsertNode = memoize(insertNode);\nexport const memoizedGetFlatDataFromTree = memoize(getFlatDataFromTree);\nexport const memoizedGetDescendantCount = memoize(getDescendantCount);\n","import {DragSource as dragSource, DropTarget as dropTarget} from 'react-dnd';\nimport {findDOMNode} from 'react-dom';\nimport {equals} from 'ramda';\nimport {getDepth} from './tree-data-utils';\nimport {memoizedInsertNode} from './memoized-tree-data-utils';\n\nexport default class DndManager {\n constructor(treeRef) {\n this.treeRef = treeRef;\n this.resetDragVariables();\n }\n\n get startDrag() {\n return this.treeRef.startDrag;\n }\n\n get dragHover() {\n return this.treeRef.dragHover;\n }\n\n get endDrag() {\n return this.treeRef.endDrag;\n }\n\n get drop() {\n return this.treeRef.drop;\n }\n\n get treeId() {\n return this.treeRef.treeId;\n }\n\n get dndType() {\n return this.treeRef.dndType;\n }\n\n get treeData() {\n return this.treeRef.state.draggingTreeData || this.treeRef.props.treeData;\n }\n\n get getNodeKey() {\n return this.treeRef.props.getNodeKey;\n }\n\n get customCanDrop() {\n return this.treeRef.props.canDrop;\n }\n\n get maxDepth() {\n return this.treeRef.props.maxDepth;\n }\n\n resetDragVariables() {\n this.lastDropTargetNode = null;\n this.lastDropTargetDepth = null;\n this.hoverProps = null;\n this.lastCanDropResult = null;\n this.lastCanDropProps = null;\n this.shouldSkipMoreFrames = false;\n this.rafId = null;\n }\n getTargetDepth(dropTargetProps, monitor, component) {\n let dropTargetDepth = 0;\n\n const rowAbove = dropTargetProps.getPrevRow();\n if (rowAbove) {\n let {path} = rowAbove;\n const aboveNodeCannotHaveChildren = !this.treeRef.canNodeHaveChildren(rowAbove.node);\n if (aboveNodeCannotHaveChildren) {\n path = path.slice(0, path.length - 1);\n }\n\n // Limit the length of the path to the deepest possible\n dropTargetDepth = Math.min(path.length, dropTargetProps.path.length);\n }\n\n let blocksOffset;\n let dragSourceInitialDepth = (monitor.getItem().path || []).length;\n\n // When adding node from external source\n if (monitor.getItem().treeId !== this.treeId) {\n // Ignore the tree depth of the source, if it had any to begin with\n dragSourceInitialDepth = 0;\n\n if (component) {\n const relativePosition = findDOMNode(component).getBoundingClientRect(); // eslint-disable-line react/no-find-dom-node\n const leftShift = monitor.getSourceClientOffset().x - relativePosition.left;\n blocksOffset = Math.round(leftShift / dropTargetProps.scaffoldBlockPxWidth);\n } else {\n blocksOffset = dropTargetProps.path.length;\n }\n } else {\n // handle row direction support\n const direction = dropTargetProps.rowDirection === 'rtl' ? -1 : 1;\n\n blocksOffset = Math.round(\n (direction * monitor.getDifferenceFromInitialOffset().x) / dropTargetProps.scaffoldBlockPxWidth\n );\n }\n\n let targetDepth = Math.min(dropTargetDepth, Math.max(0, dragSourceInitialDepth + blocksOffset - 1));\n\n // If a maxDepth is defined, constrain the target depth\n if (typeof this.maxDepth !== 'undefined' && this.maxDepth !== null) {\n const draggedNode = monitor.getItem().node;\n const draggedChildDepth = getDepth(draggedNode);\n\n targetDepth = Math.max(0, Math.min(targetDepth, this.maxDepth - draggedChildDepth - 1));\n }\n\n return targetDepth;\n }\n\n canDrop(dropTargetProps, monitor) {\n if (!monitor.isOver()) {\n return false;\n }\n\n const rowAbove = dropTargetProps.getPrevRow();\n const abovePath = rowAbove ? rowAbove.path : [];\n const aboveNode = rowAbove ? rowAbove.node : {};\n const blocksOffset = Math.round(\n monitor.getDifferenceFromInitialOffset().x / dropTargetProps.scaffoldBlockPxWidth\n );\n const newCanDropProps = {\n nodeId: dropTargetProps.node.nodeId !== undefined ? dropTargetProps.node.nodeId : dropTargetProps.node,\n rowAbove,\n abovePath,\n aboveNodeId: aboveNode.nodeId !== undefined ? aboveNode.nodeId : aboveNode,\n blocksOffset\n };\n if (equals(this.lastCanDropProps, newCanDropProps)) {\n return this.lastCanDropResult;\n }\n this.lastCanDropProps = newCanDropProps;\n const targetDepth = this.getTargetDepth(dropTargetProps, monitor, null);\n\n // Cannot drop if we're adding to the children of the row above and\n // the row above is a function\n if (targetDepth >= abovePath.length && typeof aboveNode.children === 'function') {\n return (this.lastCanDropResult = false);\n }\n\n if (typeof this.customCanDrop === 'function') {\n const {node} = monitor.getItem();\n const addedResult = memoizedInsertNode({\n treeData: this.treeData,\n newNode: node,\n depth: targetDepth,\n getNodeKey: this.getNodeKey,\n minimumTreeIndex: dropTargetProps.listIndex,\n expandParent: true\n });\n\n return (this.lastCanDropResult = this.customCanDrop({\n node,\n prevPath: monitor.getItem().path,\n prevParent: monitor.getItem().parentNode,\n prevTreeIndex: monitor.getItem().treeIndex, // Equals -1 when dragged from external tree\n nextPath: addedResult.path,\n nextParent: addedResult.parentNode,\n nextTreeIndex: addedResult.treeIndex\n }));\n }\n return (this.lastCanDropResult = true);\n }\n\n wrapSource(el) {\n const nodeDragSource = {\n beginDrag: (props) => {\n this.startDrag(props);\n\n return {\n node: props.node,\n parentNode: props.parentNode,\n path: props.path,\n treeIndex: props.treeIndex,\n treeId: props.treeId\n };\n },\n\n endDrag: (props, monitor) => {\n if (this.rafId) {\n cancelAnimationFrame(this.rafId);\n }\n this.endDrag(monitor.getDropResult());\n this.resetDragVariables();\n },\n\n isDragging: (props, monitor) => {\n const dropTargetNode = monitor.getItem().node;\n const draggedNode = props.node;\n\n return draggedNode === dropTargetNode;\n }\n };\n\n function nodeDragSourcePropInjection(connect, monitor) {\n return {\n connectDragSource: connect.dragSource(),\n connectDragPreview: connect.dragPreview(),\n isDragging: monitor.isDragging(),\n didDrop: monitor.didDrop()\n };\n }\n\n return dragSource(this.dndType, nodeDragSource, nodeDragSourcePropInjection)(el);\n }\n hoverHandler = () => {\n if (this.hoverProps === null) {\n return;\n }\n const {dropTargetProps, monitor, component} = this.hoverProps;\n\n const item = monitor.getItem();\n if (!item) {\n return;\n }\n const targetDepth = this.getTargetDepth(dropTargetProps, monitor, component);\n const draggedNode = item.node;\n const needsRedraw =\n dropTargetProps.node !== this.lastDropTargetNode || targetDepth !== this.lastDropTargetDepth;\n\n if (!needsRedraw) {\n return;\n }\n this.lastDropTargetNode = dropTargetProps.node;\n this.lastDropTargetDepth = targetDepth;\n\n this.dragHover({\n node: draggedNode,\n path: item.path,\n minimumTreeIndex: dropTargetProps.listIndex,\n depth: targetDepth\n });\n\n this.hoverProps = null;\n };\n\n deferredCallHoverHandler = () => {\n if (this.shouldSkipMoreFrames) {\n this.shouldSkipMoreFrames = false;\n this.rafId = requestAnimationFrame(this.deferredCallHoverHandler);\n return;\n }\n this.rafId = null;\n this.hoverHandler();\n };\n\n wrapTarget(el) {\n const nodeDropTarget = {\n drop: (dropTargetProps, monitor, component) => {\n if (this.rafId) {\n cancelAnimationFrame(this.rafId);\n }\n const result = {\n node: monitor.getItem().node,\n path: monitor.getItem().path,\n treeIndex: monitor.getItem().treeIndex,\n treeId: this.treeId,\n minimumTreeIndex: dropTargetProps.treeIndex,\n depth: this.getTargetDepth(dropTargetProps, monitor, component)\n };\n this.lastDropTargetNode = null;\n this.drop(result);\n\n return result;\n },\n\n hover: (dropTargetProps, monitor, component) => {\n if (this.rafId) {\n this.shouldSkipMoreFrames = true;\n return;\n }\n this.shouldSkipMoreFrames = false;\n this.hoverProps = {\n dropTargetProps,\n monitor,\n component\n };\n this.rafId = requestAnimationFrame(this.deferredCallHoverHandler);\n },\n\n canDrop: this.canDrop.bind(this)\n };\n\n function nodeDropTargetPropInjection(connect, monitor) {\n const dragged = monitor.getItem();\n return {\n connectDropTarget: connect.dropTarget(),\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop(),\n draggedNode: dragged ? dragged.node : null\n };\n }\n\n return dropTarget(this.dndType, nodeDropTarget, nodeDropTargetPropInjection)(el);\n }\n\n wrapPlaceholder(el) {\n const placeholderDropTarget = {\n drop: (dropTargetProps, monitor) => {\n const {node, path, treeIndex} = monitor.getItem();\n const result = {\n node,\n path,\n treeIndex,\n treeId: this.treeId,\n minimumTreeIndex: 0,\n depth: 0\n };\n\n this.drop(result);\n\n return result;\n }\n };\n\n function placeholderPropInjection(connect, monitor) {\n const dragged = monitor.getItem();\n return {\n connectDropTarget: connect.dropTarget(),\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop(),\n draggedNode: dragged ? dragged.node : null\n };\n }\n\n return dropTarget(this.dndType, placeholderDropTarget, placeholderPropInjection)(el);\n }\n}\n","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport {AutoSizer, List} from 'react-virtualized';\nimport {equals, append, when, always, gt, uniqWith, eqBy, pipe} from 'ramda';\nimport withScrolling, {\n createScrollingComponent,\n createVerticalStrength,\n createHorizontalStrength\n} from 'frontend-collective-react-dnd-scrollzone';\nimport {DndContext} from 'react-dnd';\nimport {polyfill} from 'react-lifecycles-compat';\nimport withStyles from '@mui/styles/withStyles';\nimport {DragAndDrop} from '../DragAndDrop/DragAndDrop';\nimport TreeNode from './tree-node';\nimport NodeRendererDefault from './node-renderer-default';\nimport TreePlaceholder from './tree-placeholder';\nimport PlaceholderRendererDefault from './placeholder-renderer-default';\nimport {walk, changeNodeAtPath, removeNode, insertNode, find, toggleExpandedForAll} from './utils/tree-data-utils';\nimport {\n memoizedInsertNode,\n memoizedGetFlatDataFromTree,\n memoizedGetDescendantCount\n} from './utils/memoized-tree-data-utils';\nimport {slideRows} from './utils/generic-utils';\nimport {defaultGetNodeKey, defaultSearchMethod} from './utils/default-handlers';\nimport DndManager from './utils/dnd-manager';\nimport classnames from './utils/classnames';\nimport {styles} from './reactSortableTreeStyles';\n\nlet treeIdCounter = 1;\n\nconst mergeTheme = (props) => {\n const merged = {\n ...props,\n style: {...props.theme.style, ...props.style},\n innerStyle: {...props.theme.innerStyle, ...props.innerStyle},\n reactVirtualizedListProps: {\n ...props.theme.reactVirtualizedListProps,\n ...props.reactVirtualizedListProps\n }\n };\n\n const overridableDefaults = {\n nodeContentRenderer: NodeRendererDefault,\n placeholderRenderer: PlaceholderRendererDefault,\n rowHeight: 62,\n scaffoldBlockPxWidth: 44,\n slideRegionSize: 100,\n treeNodeRenderer: TreeNode\n };\n Object.keys(overridableDefaults).forEach((propKey) => {\n // If prop has been specified, do not change it\n // If prop is specified in theme, use the theme setting\n // If all else fails, fall back to the default\n if (props[propKey] === null) {\n merged[propKey] =\n typeof props.theme[propKey] !== 'undefined' ? props.theme[propKey] : overridableDefaults[propKey];\n }\n });\n\n return merged;\n};\n\nclass ReactSortableTree extends Component {\n constructor(props) {\n super(props);\n\n const {dndType, nodeContentRenderer, treeNodeRenderer, isVirtualized, slideRegionSize} = mergeTheme(props);\n\n this.dndManager = new DndManager(this);\n\n // Wrapping classes for use with react-dnd\n this.treeId = `rst__${treeIdCounter}`;\n treeIdCounter += 1;\n this.dndType = dndType || this.treeId;\n this.nodeContentRenderer = this.dndManager.wrapSource(nodeContentRenderer);\n this.treePlaceholderRenderer = this.dndManager.wrapPlaceholder(TreePlaceholder);\n this.treeNodeRenderer = this.dndManager.wrapTarget(treeNodeRenderer);\n\n // Prepare scroll-on-drag options for this list\n if (isVirtualized) {\n this.scrollZoneVirtualList = (createScrollingComponent || withScrolling)(List);\n this.vStrength = createVerticalStrength(slideRegionSize);\n this.hStrength = createHorizontalStrength(slideRegionSize);\n }\n\n this.state = {\n draggingTreeData: null,\n draggedNode: null,\n draggedMinimumTreeIndex: null,\n draggedDepth: null,\n searchMatches: [],\n searchFocusTreeIndex: null,\n dragging: false,\n draggingExpandedPaths: [],\n ignoreOneTreeUpdate: false,\n\n // props that need to be used in gDSFP or static functions will be stored here\n instanceProps: {\n treeData: this.props.treeData || [],\n searchQuery: null,\n searchFocusOffset: null,\n ignoreTreeChanges: false\n }\n };\n\n this.toggleChildrenVisibility = this.toggleChildrenVisibility.bind(this);\n this.moveNode = this.moveNode.bind(this);\n this.startDrag = this.startDrag.bind(this);\n this.dragHover = this.dragHover.bind(this);\n this.endDrag = this.endDrag.bind(this);\n this.drop = this.drop.bind(this);\n this.handleDndMonitorChange = this.handleDndMonitorChange.bind(this);\n }\n\n componentDidMount() {\n ReactSortableTree.loadLazyChildren(this.props);\n const stateUpdate = ReactSortableTree.search(this.props, this.state, true, true, false);\n this.setState(stateUpdate);\n\n // Hook into react-dnd state changes to detect when the drag ends\n // TODO: This is very brittle, so it needs to be replaced if react-dnd\n // offers a more official way to detect when a drag ends\n this.clearMonitorSubscription = this.props.dragDropManager\n .getMonitor()\n .subscribeToStateChange(this.handleDndMonitorChange);\n }\n\n static getDerivedStateFromProps(nextProps, prevState) {\n const {instanceProps} = prevState;\n const newState = {};\n\n if (!equals(instanceProps.searchQuery, nextProps.searchQuery)) {\n Object.assign(newState, ReactSortableTree.search(nextProps, prevState, true, true, false));\n } else if (instanceProps.searchFocusOffset !== nextProps.searchFocusOffset) {\n Object.assign(newState, ReactSortableTree.search(nextProps, prevState, true, true, true));\n }\n\n instanceProps.searchQuery = nextProps.searchQuery;\n instanceProps.searchFocusOffset = nextProps.searchFocusOffset;\n newState.instanceProps = instanceProps;\n\n return newState;\n }\n\n // listen to dragging\n componentDidUpdate(prevProps, prevState) {\n // if it is not the same then call the onDragStateChanged\n if (this.state.dragging !== prevState.dragging) {\n if (this.props.onDragStateChanged) {\n this.props.onDragStateChanged({\n isDragging: this.state.dragging,\n draggedNode: this.state.draggedNode\n });\n }\n }\n if (this.state.dragging) {\n const isTreeDataEqual = equals(this.props.treeData, prevProps.treeData);\n if (!isTreeDataEqual) {\n const {treeData: draggingTreeData} = removeNode({\n treeData: this.props.treeData,\n path: prevState.draggedPath,\n getNodeKey: this.props.getNodeKey\n });\n\n this.setState(({draggingExpandedPaths}) => ({\n draggingTreeData: draggingExpandedPaths.reduce((treeData, path) => {\n let newTree;\n try {\n newTree = changeNodeAtPath({\n treeData,\n path,\n newNode: ({node}) => ({...node, expanded: true}),\n getNodeKey: this.props.getNodeKey\n });\n } catch (e) {\n newTree = treeData;\n }\n return newTree;\n }, draggingTreeData)\n }));\n } else if (this.state.draggingTreeData && prevState.draggingTreeData !== this.state.draggingTreeData) {\n walk({\n treeData: this.state.draggingTreeData,\n getNodeKey: this.props.getNodeKey,\n callback: ({node, path, lowerSiblingCounts, treeIndex}) => {\n if (node.pending && node.expanded) {\n this.props.onLazyLoadChildren({\n node,\n path,\n lowerSiblingCounts,\n treeIndex\n });\n }\n }\n });\n }\n } else if (this.props.treeData !== prevProps.treeData) {\n const isTreeDataEqual = equals(this.props.treeData, prevProps.treeData);\n const {ignoreOneTreeUpdate, instanceProps} = this.state;\n const newState = {};\n if (!isTreeDataEqual) {\n if (ignoreOneTreeUpdate) {\n newState.ignoreOneTreeUpdate = false;\n } else {\n newState.searchFocusTreeIndex = null;\n ReactSortableTree.loadLazyChildren(this.props);\n Object.assign(newState, ReactSortableTree.search(this.props, this.state, false, false, false));\n }\n\n newState.draggingTreeData = null;\n newState.draggedNode = null;\n newState.draggedMinimumTreeIndex = null;\n newState.draggedDepth = null;\n newState.dragging = false;\n newState.draggingExpandedPaths = [];\n newState.instanceProps = {...instanceProps, treeData: this.props.treeData};\n\n this.setState(newState);\n }\n }\n }\n\n componentWillUnmount() {\n this.clearMonitorSubscription();\n }\n\n getRows(treeData) {\n return memoizedGetFlatDataFromTree({\n ignoreCollapsed: true,\n getNodeKey: this.props.getNodeKey,\n treeData\n });\n }\n\n handleDndMonitorChange() {\n const monitor = this.props.dragDropManager.getMonitor();\n // If the drag ends and the tree is still in a mid-drag state,\n // it means that the drag was canceled or the dragSource dropped\n // elsewhere, and we should reset the state of this tree\n if (!monitor.isDragging() && this.state.draggingTreeData) {\n this.endDrag();\n }\n }\n\n toggleChildrenVisibility({node: targetNode, path}) {\n const {instanceProps} = this.state;\n\n const treeData = changeNodeAtPath({\n treeData: instanceProps.treeData,\n path,\n newNode: ({node}) => ({...node, expanded: !node.expanded}),\n getNodeKey: this.props.getNodeKey\n });\n\n this.props.onChange(treeData);\n\n this.props.onVisibilityToggle({\n treeData,\n node: targetNode,\n expanded: !targetNode.expanded,\n path\n });\n }\n\n moveNode({node, path: prevPath, treeIndex: prevTreeIndex, depth, minimumTreeIndex}) {\n const {\n treeData,\n treeIndex,\n path,\n parentNode: nextParentNode\n } = insertNode({\n treeData: this.state.draggingTreeData,\n newNode: node,\n depth,\n minimumTreeIndex,\n expandParent: true,\n getNodeKey: this.props.getNodeKey\n });\n this.setState(\n {\n draggingTreeData: null,\n draggedNode: null,\n draggedMinimumTreeIndex: null,\n draggedDepth: null,\n dragging: false,\n draggingExpandedPaths: []\n },\n () => {\n this.props.onChange(treeData);\n\n this.props.onMoveNode({\n treeData,\n node,\n treeIndex,\n path,\n nextPath: path,\n nextTreeIndex: treeIndex,\n prevPath,\n prevTreeIndex,\n nextParentNode\n });\n }\n );\n }\n\n // returns the new state after search\n static search(props, state, seekIndex, expand, singleSearch) {\n const {\n onChange,\n getNodeKey,\n searchFinishCallback,\n searchQuery,\n searchMethod,\n searchFocusOffset,\n onlyExpandSearchedNodes\n } = props;\n\n const {instanceProps} = state;\n\n // Skip search if no conditions are specified\n if (!searchQuery && !searchMethod) {\n if (searchFinishCallback) {\n searchFinishCallback([]);\n }\n\n return {searchMatches: []};\n }\n\n const newState = {};\n\n // if onlyExpandSearchedNodes collapse the tree and search\n const {treeData: expandedTreeData, matches: searchMatches} = find({\n getNodeKey,\n treeData: onlyExpandSearchedNodes\n ? toggleExpandedForAll({\n treeData: instanceProps.treeData,\n expanded: false\n })\n : instanceProps.treeData,\n searchQuery,\n searchMethod: searchMethod || defaultSearchMethod,\n searchFocusOffset,\n expandAllMatchPaths: expand && !singleSearch,\n expandFocusMatchPaths: !!expand\n });\n\n // Update the tree with data leaving all paths leading to matching nodes open\n if (expand) {\n newState.ignoreOneTreeUpdate = true; // Prevents infinite loop\n onChange(expandedTreeData);\n }\n\n if (searchFinishCallback) {\n searchFinishCallback(searchMatches);\n }\n\n let searchFocusTreeIndex = null;\n if (seekIndex && searchFocusOffset !== null && searchFocusOffset < searchMatches.length) {\n searchFocusTreeIndex = searchMatches[searchFocusOffset].treeIndex;\n }\n\n newState.searchMatches = searchMatches;\n newState.searchFocusTreeIndex = searchFocusTreeIndex;\n\n return newState;\n }\n\n startDrag({path}) {\n this.setState((prevState) => {\n const {\n treeData: draggingTreeData,\n node: draggedNode,\n treeIndex: draggedMinimumTreeIndex\n } = removeNode({\n treeData: prevState.instanceProps.treeData,\n path,\n getNodeKey: this.props.getNodeKey\n });\n\n return {\n draggingTreeData,\n draggedNode,\n draggedDepth: path.length - 1,\n draggedMinimumTreeIndex,\n draggedPath: path,\n dragging: true\n };\n });\n }\n\n dragHover({node: draggedNode, depth: draggedDepth, minimumTreeIndex: draggedMinimumTreeIndex}) {\n // Ignore this hover if it is at the same position as the last hover\n if (\n this.state.draggedDepth === draggedDepth &&\n this.state.draggedMinimumTreeIndex === draggedMinimumTreeIndex\n ) {\n return;\n }\n this.setState(({draggingTreeData, instanceProps, draggingExpandedPaths}) => {\n // Fall back to the tree data if something is being dragged in from\n // an external element\n const newDraggingTreeData = draggingTreeData || instanceProps.treeData;\n\n const addedResult = memoizedInsertNode({\n treeData: newDraggingTreeData,\n newNode: draggedNode,\n depth: draggedDepth,\n minimumTreeIndex: draggedMinimumTreeIndex,\n expandParent: true,\n getNodeKey: this.props.getNodeKey\n });\n\n const rows = this.getRows(addedResult.treeData);\n const expandedParentPath = rows[addedResult.treeIndex].path;\n const nodePath = expandedParentPath.slice(0, -1);\n\n const newDraggingExpandedPaths = pipe(\n when(always(gt(nodePath.length, 0)), append(nodePath)),\n uniqWith(eqBy(String))\n )(draggingExpandedPaths);\n return {\n draggedNode,\n draggedDepth,\n draggedMinimumTreeIndex,\n draggingTreeData: changeNodeAtPath({\n treeData: newDraggingTreeData,\n path: nodePath,\n newNode: ({node}) => ({...node, expanded: true}),\n getNodeKey: this.props.getNodeKey\n }),\n // reset the scroll focus so it doesn't jump back\n // to a search result while dragging\n searchFocusTreeIndex: null,\n dragging: true,\n draggingExpandedPaths: newDraggingExpandedPaths\n };\n });\n }\n\n endDrag(dropResult) {\n const {instanceProps} = this.state;\n\n const resetTree = () =>\n this.setState({\n draggingTreeData: null,\n draggedNode: null,\n draggedMinimumTreeIndex: null,\n draggedDepth: null,\n dragging: false\n });\n\n // Drop was cancelled\n if (!dropResult) {\n resetTree();\n } else if (dropResult.treeId !== this.treeId) {\n // The node was dropped in an external drop target or tree\n const {node, path, treeIndex} = dropResult;\n let shouldCopy = this.props.shouldCopyOnOutsideDrop;\n if (typeof shouldCopy === 'function') {\n shouldCopy = shouldCopy({\n node,\n prevTreeIndex: treeIndex,\n prevPath: path\n });\n }\n\n let treeData = this.state.draggingTreeData || instanceProps.treeData;\n\n // If copying is enabled, a drop outside leaves behind a copy in the\n // source tree\n if (shouldCopy) {\n treeData = changeNodeAtPath({\n treeData: instanceProps.treeData, // use treeData unaltered by the drag operation\n path,\n newNode: ({node: copyNode}) => ({...copyNode}), // create a shallow copy of the node\n getNodeKey: this.props.getNodeKey\n });\n }\n\n this.props.onChange(treeData);\n\n this.props.onMoveNode({\n treeData,\n node,\n treeIndex: null,\n path: null,\n nextPath: null,\n nextTreeIndex: null,\n prevPath: path,\n prevTreeIndex: treeIndex\n });\n }\n }\n\n drop(dropResult) {\n this.moveNode(dropResult);\n }\n\n canNodeHaveChildren(node) {\n const {canNodeHaveChildren} = this.props;\n if (canNodeHaveChildren) {\n return canNodeHaveChildren(node);\n }\n return true;\n }\n\n // Load any children in the tree that are given by a function\n // calls the onChange callback on the new treeData\n static loadLazyChildren(props) {\n walk({\n treeData: props.treeData,\n getNodeKey: props.getNodeKey,\n callback: ({node, path, lowerSiblingCounts, treeIndex}) => {\n // If the node has children defined by a function, and is either expanded\n // or set to load even before expansion, run the function.\n if (node.pending && (node.expanded || props.loadCollapsedLazyChildren)) {\n // Call the children fetching function\n props.onLazyLoadChildren({\n node,\n path,\n lowerSiblingCounts,\n treeIndex,\n\n // Provide a helper to append the new data when it is received\n done: (childrenArray) =>\n props.onChange(\n changeNodeAtPath({\n treeData: props.treeData,\n path,\n newNode: ({node: oldNode}) =>\n // Only replace the old node if it's the one we set off to find children\n // for in the first place\n oldNode === node\n ? {\n ...oldNode,\n children: childrenArray\n }\n : oldNode,\n getNodeKey: props.getNodeKey\n }),\n true\n )\n });\n }\n }\n });\n }\n\n renderRow(row, {listIndex, style, getPrevRow, matchKeys, swapFrom, swapDepth, swapLength}) {\n const {node, parentNode, path, lowerSiblingCounts, treeIndex} = row;\n\n const {canDrag, generateNodeProps, scaffoldBlockPxWidth, searchFocusOffset, rowDirection} = mergeTheme(\n this.props\n );\n const TreeNodeRenderer = this.treeNodeRenderer;\n const NodeContentRenderer = this.nodeContentRenderer;\n const nodeKey = path[path.length - 1];\n const isSearchMatch = nodeKey in matchKeys;\n const isSearchFocus = isSearchMatch && matchKeys[nodeKey] === searchFocusOffset;\n const callbackParams = {\n node,\n parentNode,\n path,\n lowerSiblingCounts,\n treeIndex,\n isSearchMatch,\n isSearchFocus\n };\n const nodeProps = !generateNodeProps ? {} : generateNodeProps(callbackParams);\n const rowCanDrag = typeof canDrag !== 'function' ? canDrag : canDrag(callbackParams);\n\n const sharedProps = {\n treeIndex,\n scaffoldBlockPxWidth,\n node,\n path,\n treeId: this.treeId,\n rowDirection\n };\n\n return (\n <TreeNodeRenderer\n style={style}\n key={nodeKey}\n listIndex={listIndex}\n getPrevRow={getPrevRow}\n lowerSiblingCounts={lowerSiblingCounts}\n swapFrom={swapFrom}\n swapLength={swapLength}\n swapDepth={swapDepth}\n {...sharedProps}\n >\n <NodeContentRenderer\n parentNode={parentNode}\n isSearchMatch={isSearchMatch}\n isSearchFocus={isSearchFocus}\n canDrag={rowCanDrag}\n toggleChildrenVisibility={this.toggleChildrenVisibility}\n {...sharedProps}\n {...nodeProps}\n />\n </TreeNodeRenderer>\n );\n }\n\n render() {\n const {\n dragDropManager,\n style,\n className,\n innerStyle,\n rowHeight,\n isVirtualized,\n placeholderRenderer,\n reactVirtualizedListProps,\n getNodeKey,\n rowDirection\n } = mergeTheme(this.props);\n const {searchMatches, searchFocusTreeIndex, draggedNode, draggedDepth, draggedMinimumTreeIndex} = this.state;\n\n const treeData = this.state.draggingTreeData || this.props.treeData;\n const rowDirectionClass = rowDirection === 'rtl' ? 'rst__rtl' : null;\n\n let rows;\n let swapFrom = null;\n let swapLength = null;\n if (draggedNode && draggedMinimumTreeIndex !== null) {\n const addedResult = memoizedInsertNode({\n treeData,\n newNode: draggedNode,\n depth: draggedDepth,\n minimumTreeIndex: draggedMinimumTreeIndex,\n expandParent: true,\n getNodeKey\n });\n\n const swapTo = draggedMinimumTreeIndex;\n swapFrom = addedResult.treeIndex;\n swapLength = 1 + memoizedGetDescendantCount({node: draggedNode});\n rows = slideRows(this.getRows(addedResult.treeData), swapFrom, swapTo, swapLength);\n } else {\n rows = this.getRows(treeData);\n }\n\n // Get indices for rows that match the search conditions\n const matchKeys = {};\n searchMatches.forEach(({path}, i) => {\n matchKeys[path[path.length - 1]] = i;\n });\n\n // Seek to the focused search result if there is one specified\n const scrollToInfo = searchFocusTreeIndex !== null ? {scrollToIndex: searchFocusTreeIndex} : {};\n\n let containerStyle = style;\n let list;\n if (rows.length < 1) {\n const Placeholder = this.treePlaceholderRenderer;\n const PlaceholderContent = placeholderRenderer;\n list = (\n <Placeholder treeId={this.treeId} drop={this.drop}>\n <PlaceholderContent />\n </Placeholder>\n );\n } else if (isVirtualized) {\n containerStyle = {height: '100%', ...containerStyle};\n\n const ScrollZoneVirtualList = this.scrollZoneVirtualList;\n // Render list with react-virtualized\n list = (\n <AutoSizer>\n {({height, width}) => (\n <ScrollZoneVirtualList\n {...scrollToInfo}\n dragDropManager={dragDropManager}\n verticalStrength={this.vStrength}\n horizontalStrength={this.hStrength}\n speed={30}\n scrollToAlignment=\"start\"\n className={this.props.classes.rst__virtualScrollOverride}\n width={width}\n onScroll={({scrollTop}) => {\n this.scrollTop = scrollTop;\n }}\n height={height}\n style={innerStyle}\n rowCount={rows.length}\n estimatedRowSize={typeof rowHeight !== 'function' ? rowHeight : undefined}\n rowHeight={\n typeof rowHeight !== 'function'\n ? rowHeight\n : ({index}) =>\n rowHeight({\n index,\n treeIndex: index,\n node: rows[index].node,\n path: rows[index].path\n })\n }\n rowRenderer={({index, style: rowStyle}) =>\n this.renderRow(rows[index], {\n listIndex: index,\n style: rowStyle,\n getPrevRow: () => rows[index - 1] || null,\n matchKeys,\n swapFrom,\n swapDepth: draggedDepth,\n swapLength\n })\n }\n {...reactVirtualizedListProps}\n />\n )}\n </AutoSizer>\n );\n } else {\n // Render list without react-virtualized\n list = rows.map((row, index) =>\n this.renderRow(row, {\n listIndex: index,\n style: {\n height:\n typeof rowHeight !== 'function'\n ? rowHeight\n : rowHeight({\n index,\n treeIndex: index,\n node: row.node,\n path: row.path\n })\n },\n getPrevRow: () => rows[index - 1] || null,\n matchKeys,\n swapFrom,\n swapDepth: draggedDepth,\n swapLength\n })\n );\n }\n\n return (\n <div className={classnames('rst__tree', className, rowDirectionClass)} style={containerStyle}>\n {list}\n </div>\n );\n }\n}\n\nReactSortableTree.propTypes = {\n classes: PropTypes.object,\n dragDropManager: PropTypes.shape({\n getMonitor: PropTypes.func\n }).isRequired,\n\n // Tree data in the following format:\n // [{title: 'main', subtitle: 'sub'}, { title: 'value2', expanded: true, children: [{ title: 'value3') }] }]\n // `title` is the primary label for the node\n // `subtitle` is a secondary label for the node\n // `expanded` shows children of the node if true, or hides them if false. Defaults to false.\n // `children` is an array of child nodes belonging to the node.\n treeData: PropTypes.arrayOf(PropTypes.object).isRequired,\n\n // Style applied to the container wrapping the tree (style defaults to {height: '100%'})\n style: PropTypes.shape({}),\n\n // Class name for the container wrapping the tree\n className: PropTypes.string,\n\n // Style applied to the inner, scrollable container (for padding, etc.)\n innerStyle: PropTypes.shape({}),\n\n // Used by react-virtualized\n // Either a fixed row height (number) or a function that returns the\n // height of a row given its index: `({ index: number }): number`\n rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),\n\n // Size in px of the region near the edges that initiates scrolling on dragover\n slideRegionSize: PropTypes.number,\n\n // Custom properties to hand to the react-virtualized list\n // https://github.com/bvaughn/react-virtualized/blob/master/docs/List.md#prop-types\n reactVirtualizedListProps: PropTypes.shape({}),\n\n // The width of the blocks containing the lines representing the structure of the tree.\n scaffoldBlockPxWidth: PropTypes.number,\n\n // Maximum depth nodes can be inserted at. Defaults to infinite.\n maxDepth: PropTypes.number,\n\n // The method used to search nodes.\n // Defaults to a function that uses the `searchQuery` string to search for nodes with\n // matching `title` or `subtitle` values.\n // NOTE: Changing `searchMethod` will not update the search, but changing the `searchQuery` will.\n searchMethod: PropTypes.func,\n\n // Used by the `searchMethod` to highlight and scroll to matched nodes.\n // Should be a string for the default `searchMethod`, but can be anything when using a custom search.\n searchQuery: PropTypes.any, // eslint-disable-line react/forbid-prop-types\n\n // Outline the <`searchFocusOffset`>th node and scroll to it.\n searchFocusOffset: PropTypes.number,\n\n // Get the nodes that match the search criteria. Used for counting total matches, etc.\n searchFinishCallback: PropTypes.func,\n\n // Generate an object with additional props to be passed to the node renderer.\n // Use this for adding buttons via the `buttons` key,\n // or additional `style` / `className` settings.\n generateNodeProps: PropTypes.func,\n\n // Set to false to disable virtualization.\n // NOTE: Auto-scrolling while dragging, and scrolling to the `searchFocusOffset` will be disabled.\n isVirtualized: PropTypes.bool,\n\n treeNodeRenderer: PropTypes.func,\n\n // Override the default component for rendering nodes (but keep the scaffolding generator)\n // This is an advanced option for complete customization of the appearance.\n // It is best to copy the component in `node-renderer-default.js` to use as a base, and customize as needed.\n nodeContentRenderer: PropTypes.func,\n\n // Override the default component for rendering an empty tree\n // This is an advanced option for complete customization of the appearance.\n // It is best to copy the component in `placeholder-renderer-default.js` to use as a base,\n // and customize as needed.\n placeholderRenderer: PropTypes.func,\n\n theme: PropTypes.shape({\n style: PropTypes.shape({}),\n innerStyle: PropTypes.shape({}),\n reactVirtualizedListProps: PropTypes.shape({}),\n scaffoldBlockPxWidth: PropTypes.number,\n slideRegionSize: PropTypes.number,\n rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),\n treeNodeRenderer: PropTypes.func,\n nodeContentRenderer: PropTypes.func,\n placeholderRenderer: PropTypes.func\n }),\n\n // Determine the unique key used to identify each node and\n // generate the `path` array passed in callbacks.\n // By default, returns the index in the tree (omitting hidden nodes).\n getNodeKey: PropTypes.func,\n\n // Called whenever tree data changed.\n // Just like with React input elements, you have to update your\n // own component's data to see the changes reflected.\n onChange: PropTypes.func.isRequired,\n\n // Called after node move operation.\n onMoveNode: PropTypes.func,\n\n // Determine whether a node can be dragged. Set to false to disable dragging on all nodes.\n canDrag: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n\n // Determine whether a node can be dropped based on its path and parents'.\n canDrop: PropTypes.func,\n\n // Determine whether a node can have children\n canNodeHaveChildren: PropTypes.func,\n\n // When true, or a callback returning true, dropping nodes to react-dnd\n // drop targets outside of this tree will not remove them from this tree\n shouldCopyOnOutsideDrop: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n\n // Called after children nodes collapsed or expanded.\n onVisibilityToggle: PropTypes.func,\n\n dndType: PropTypes.string,\n\n // Called to track between dropped and dragging\n onDragStateChanged: PropTypes.func,\n\n // Specify that nodes that do not match search will be collapsed\n onlyExpandSearchedNodes: PropTypes.bool,\n\n // rtl support\n rowDirection: PropTypes.string,\n\n onLazyLoadChildren: PropTypes.func,\n ignoreTreeChanges: PropTypes.bool\n};\n\nReactSortableTree.defaultProps = {\n canDrag: true,\n canDrop: null,\n canNodeHaveChildren: () => true,\n className: '',\n dndType: null,\n generateNodeProps: null,\n getNodeKey: defaultGetNodeKey,\n innerStyle: {},\n isVirtualized: true,\n maxDepth: null,\n treeNodeRenderer: null,\n nodeContentRenderer: null,\n onMoveNode: () => {},\n onVisibilityToggle: () => {},\n placeholderRenderer: null,\n reactVirtualizedListProps: {},\n rowHeight: null,\n scaffoldBlockPxWidth: null,\n searchFinishCallback: null,\n searchFocusOffset: null,\n searchMethod: null,\n searchQuery: null,\n shouldCopyOnOutsideDrop: false,\n slideRegionSize: null,\n style: {},\n theme: {},\n onDragStateChanged: () => {},\n onlyExpandSearchedNodes: false,\n rowDirection: 'ltr',\n onLazyLoadChildren: () => {},\n ignoreTreeChanges: false\n};\n\npolyfill(ReactSortableTree);\n\nconst StyledReactSortableTree = withStyles(styles)(ReactSortableTree);\n\nconst SortableTreeWithoutDndContext = (props) => (\n <DndContext.Consumer>\n {({dragDropManager}) =>\n dragDropManager === undefined ? null : (\n <StyledReactSortableTree {...props} dragDropManager={dragDropManager} />\n )\n }\n </DndContext.Consumer>\n);\n\nconst SortableTree = (props) => {\n return (\n <DragAndDrop>\n <SortableTreeWithoutDndContext {...props} />\n </DragAndDrop>\n );\n};\n\n// Export the tree component without the react-dnd DragDropContext,\n// for when component is used with other components using react-dnd.\n// see: https://github.com/gaearon/react-dnd/issues/186\nexport {SortableTreeWithoutDndContext};\n\nexport default SortableTree;\n","/* eslint-disable import/prefer-default-export */\n\nexport function slideRows(rows, fromIndex, toIndex, count = 1) {\n const rowsWithoutMoved = [...rows.slice(0, fromIndex), ...rows.slice(fromIndex + count)];\n\n return [\n ...rowsWithoutMoved.slice(0, toIndex),\n ...rows.slice(fromIndex, fromIndex + count),\n ...rowsWithoutMoved.slice(toIndex)\n ];\n}\n","export const styles = () => ({\n /* import styles from react-virtualized/styles.css */\n\n /* Grid default theme */\n '@global .ReactVirtualized__Grid__innerScrollContainer': {\n overflow: 'visible !important' // override base style\n },\n\n '@global .ReactVirtualized__Grid': {\n outline: 'none' //override base style,\n },\n\n /* List default theme */\n '@global .ReactVirtualized__List': {},\n\n // New styles\n rst__virtualScrollOverride: {\n overflow: 'auto !important'\n },\n\n '@global .rst__rtl .ReactVirtualized__Grid__innerScrollContainer': {\n direction: 'rtl'\n }\n});\n","import SortableTree, {SortableTreeWithoutDndContext} from './react-sortable-tree';\n\nexport * from './utils/default-handlers';\nexport * from './utils/tree-data-utils';\nexport default SortableTree;\n\n// Export the tree component without the react-dnd DragDropContext,\n// for when component is used with other components using react-dnd.\n// see: https://github.com/gaearon/react-dnd/issues/186\nexport {SortableTreeWithoutDndContext};\n","export function defaultGetNodeKey({treeIndex}) {\n return treeIndex;\n}\n\n// Cheap hack to get the text of a react object\nfunction getReactElementText(parent) {\n if (typeof parent === 'string') {\n return parent;\n }\n\n if (\n parent === null ||\n typeof parent !== 'object' ||\n !parent.props ||\n !parent.props.children ||\n (typeof parent.props.children !== 'string' && typeof parent.props.children !== 'object')\n ) {\n return '';\n }\n\n if (typeof parent.props.children === 'string') {\n return parent.props.children;\n }\n\n return parent.props.children.map((child) => getReactElementText(child)).join('');\n}\n\n// Search for a query string inside a node property\nfunction stringSearch(key, searchQuery, node, path, treeIndex) {\n if (typeof node[key] === 'function') {\n // Search within text after calling its function to generate the text\n return String(node[key]({node, path, treeIndex})).indexOf(searchQuery) > -1;\n }\n if (typeof node[key] === 'object') {\n // Search within text inside react elements\n return getReactElementText(node[key]).indexOf(searchQuery) > -1;\n }\n\n // Search within string\n return node[key] && String(node[key]).indexOf(searchQuery) > -1;\n}\n\nexport function defaultSearchMethod({node, path, treeIndex, searchQuery}) {\n return (\n stringSearch('title', searchQuery, node, path, treeIndex) ||\n stringSearch('subtitle', searchQuery, node, path, treeIndex)\n );\n}\n\nexport default {defaultSearchMethod, defaultGetNodeKey};\n","/**\n * Performs a depth-first traversal over all of the node descendants,\n * incrementing currentIndex by 1 for each\n */\nfunction getNodeDataAtTreeIndexOrNextIndex({\n targetIndex,\n node,\n currentIndex,\n getNodeKey,\n path = [],\n lowerSiblingCounts = [],\n ignoreCollapsed = true,\n isPseudoRoot = false\n}) {\n // The pseudo-root is not considered in the path\n const selfPath = !isPseudoRoot ? [...path, getNodeKey({node, treeIndex: currentIndex})] : [];\n\n // Return target node when found\n if (currentIndex === targetIndex) {\n return {\n node,\n lowerSiblingCounts,\n path: selfPath\n };\n }\n\n // Add one and continue for nodes with no children or hidden children\n if (!node.children || (ignoreCollapsed && node.expanded !== true)) {\n return {nextIndex: currentIndex + 1};\n }\n\n // Iterate over each child and their descendants and return the\n // target node if childIndex reaches the targetIndex\n let childIndex = currentIndex + 1;\n const childCount = node.children.length;\n for (let i = 0; i < childCount; i += 1) {\n const result = getNodeDataAtTreeIndexOrNextIndex({\n ignoreCollapsed,\n getNodeKey,\n targetIndex,\n node: node.children[i],\n currentIndex: childIndex,\n lowerSiblingCounts: [...lowerSiblingCounts, childCount - i - 1],\n path: selfPath\n });\n\n if (result.node) {\n return result;\n }\n\n childIndex = result.nextIndex;\n }\n\n // If the target node is not found, return the farthest traversed index\n return {nextIndex: childIndex};\n}\n\nexport function getDescendantCount({node, ignoreCollapsed = true}) {\n return (\n getNodeDataAtTreeIndexOrNextIndex({\n getNodeKey: () => {},\n ignoreCollapsed,\n node,\n currentIndex: 0,\n targetIndex: -1\n }).nextIndex - 1\n );\n}\n\n/**\n * Walk all descendants of the given node, depth-first\n *\n * @param {Object} args - Function parameters\n * @param {function} args.callback - Function to call on each node\n * @param {function} args.getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean} args.ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n * @param {boolean=} args.isPseudoRoot - If true, this node has no real data, and only serves\n * as the parent of all the nodes in the tree\n * @param {Object} args.node - A tree node\n * @param {Object=} args.parentNode - The parent node of `node`\n * @param {number} args.currentIndex - The treeIndex of `node`\n * @param {number[]|string[]} args.path - Array of keys leading up to node to be changed\n * @param {number[]} args.lowerSiblingCounts - An array containing the count of siblings beneath the\n * previous nodes in this path\n *\n * @return {number|false} nextIndex - Index of the next sibling of `node`,\n * or false if the walk should be terminated\n */\nfunction walkDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n isPseudoRoot = false,\n node,\n parentNode = null,\n currentIndex,\n path = [],\n lowerSiblingCounts = []\n}) {\n // The pseudo-root is not considered in the path\n const selfPath = isPseudoRoot ? [] : [...path, getNodeKey({node, treeIndex: currentIndex})];\n const selfInfo = isPseudoRoot\n ? null\n : {\n node,\n parentNode,\n path: selfPath,\n lowerSiblingCounts,\n treeIndex: currentIndex\n };\n\n if (!isPseudoRoot) {\n const callbackResult = callback(selfInfo);\n\n // Cut walk short if the callback returned false\n if (callbackResult === false) {\n return false;\n }\n }\n\n // Return self on nodes with no children or hidden children\n if (!node.children || (node.expanded !== true && ignoreCollapsed && !isPseudoRoot)) {\n return currentIndex;\n }\n\n // Get all descendants\n let childIndex = currentIndex;\n const childCount = node.children.length;\n if (typeof node.children !== 'function') {\n for (let i = 0; i < childCount; i += 1) {\n childIndex = walkDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n node: node.children[i],\n parentNode: isPseudoRoot ? null : node,\n currentIndex: childIndex + 1,\n lowerSiblingCounts: [...lowerSiblingCounts, childCount - i - 1],\n path: selfPath\n });\n\n // Cut walk short if the callback returned false\n if (childIndex === false) {\n return false;\n }\n }\n }\n\n return childIndex;\n}\n\n/**\n * Perform a change on the given node and all its descendants, traversing the tree depth-first\n *\n * @param {Object} args - Function parameters\n * @param {function} args.callback - Function to call on each node\n * @param {function} args.getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean} args.ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n * @param {boolean=} args.isPseudoRoot - If true, this node has no real data, and only serves\n * as the parent of all the nodes in the tree\n * @param {Object} args.node - A tree node\n * @param {Object=} args.parentNode - The parent node of `node`\n * @param {number} args.currentIndex - The treeIndex of `node`\n * @param {number[]|string[]} args.path - Array of keys leading up to node to be changed\n * @param {number[]} args.lowerSiblingCounts - An array containing the count of siblings beneath the\n * previous nodes in this path\n *\n * @return {number|false} nextIndex - Index of the next sibling of `node`,\n * or false if the walk should be terminated\n */\nfunction mapDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n isPseudoRoot = false,\n node,\n parentNode = null,\n currentIndex,\n path = [],\n lowerSiblingCounts = []\n}) {\n const nextNode = {...node};\n\n // The pseudo-root is not considered in the path\n const selfPath = isPseudoRoot ? [] : [...path, getNodeKey({node: nextNode, treeIndex: currentIndex})];\n const selfInfo = {\n node: nextNode,\n parentNode,\n path: selfPath,\n lowerSiblingCounts,\n treeIndex: currentIndex\n };\n\n // Return self on nodes with no children or hidden children\n if (!nextNode.children || (nextNode.expanded !== true && ignoreCollapsed && !isPseudoRoot)) {\n return {\n treeIndex: currentIndex,\n node: callback(selfInfo)\n };\n }\n\n // Get all descendants\n let childIndex = currentIndex;\n const childCount = nextNode.children.length;\n if (typeof nextNode.children !== 'function') {\n nextNode.children = nextNode.children.map((child, i) => {\n const mapResult = mapDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n node: child,\n parentNode: isPseudoRoot ? null : nextNode,\n currentIndex: childIndex + 1,\n lowerSiblingCounts: [...lowerSiblingCounts, childCount - i - 1],\n path: selfPath\n });\n childIndex = mapResult.treeIndex;\n\n return mapResult.node;\n });\n }\n\n return {\n node: callback(selfInfo),\n treeIndex: childIndex\n };\n}\n\n/**\n * Count all the visible (expanded) descendants in the tree data.\n *\n * @param {!Object[]} treeData - Tree data\n *\n * @return {number} count\n */\nexport function getVisibleNodeCount({treeData}) {\n const traverse = (node) => {\n if (!node.children || node.expanded !== true || typeof node.children === 'function') {\n return 1;\n }\n\n return 1 + node.children.reduce((total, currentNode) => total + traverse(currentNode), 0);\n };\n\n return treeData.reduce((total, currentNode) => total + traverse(currentNode), 0);\n}\n\n/**\n * Get the <targetIndex>th visible node in the tree data.\n *\n * @param {!Object[]} treeData - Tree data\n * @param {!number} targetIndex - The index of the node to search for\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n *\n * @return {{\n * node: Object,\n * path: []string|[]number,\n * lowerSiblingCounts: []number\n * }|null} node - The node at targetIndex, or null if not found\n */\nexport function getVisibleNodeInfoAtIndex({treeData, index: targetIndex, getNodeKey}) {\n if (!treeData || treeData.length < 1) {\n return null;\n }\n\n // Call the tree traversal with a pseudo-root node\n const result = getNodeDataAtTreeIndexOrNextIndex({\n targetIndex,\n getNodeKey,\n node: {\n children: treeData,\n expanded: true\n },\n currentIndex: -1,\n path: [],\n lowerSiblingCounts: [],\n isPseudoRoot: true\n });\n\n if (result.node) {\n return result;\n }\n\n return null;\n}\n\n/**\n * Walk descendants depth-first and call a callback on each\n *\n * @param {!Object[]} treeData - Tree data\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {function} callback - Function to call on each node\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return void\n */\nexport function walk({treeData, getNodeKey, callback, ignoreCollapsed = true}) {\n if (!treeData || treeData.length < 1) {\n return;\n }\n\n walkDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n isPseudoRoot: true,\n node: {children: treeData},\n currentIndex: -1,\n path: [],\n lowerSiblingCounts: []\n });\n}\n\n/**\n * Perform a depth-first transversal of the descendants and\n * make a change to every node in the tree\n *\n * @param {!Object[]} treeData - Tree data\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {function} callback - Function to call on each node\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {Object[]} changedTreeData - The changed tree data\n */\nexport function map({treeData, getNodeKey, callback, ignoreCollapsed = true}) {\n if (!treeData || treeData.length < 1) {\n return [];\n }\n\n return mapDescendants({\n callback,\n getNodeKey,\n ignoreCollapsed,\n isPseudoRoot: true,\n node: {children: treeData},\n currentIndex: -1,\n path: [],\n lowerSiblingCounts: []\n }).node.children;\n}\n\n/**\n * Expand or close every node in the tree\n *\n * @param {!Object[]} treeData - Tree data\n * @param {?boolean} expanded - Whether the node is expanded or not\n *\n * @return {Object[]} changedTreeData - The changed tree data\n */\nexport function toggleExpandedForAll({treeData, expanded = true}) {\n return map({\n treeData,\n callback: ({node}) => ({...node, expanded}),\n getNodeKey: ({treeIndex}) => treeIndex,\n ignoreCollapsed: false\n });\n}\n\nexport const RESULT_MISS_ERROR_MESSAGE = 'No node found at the given path.';\n\n/**\n * Replaces node at path with object, or callback-defined object\n *\n * @param {!Object[]} treeData\n * @param {number[]|string[]} path - Array of keys leading up to node to be changed\n * @param {function|any} newNode - Node to replace the node at the path with, or a function producing the new node\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {Object[]} changedTreeData - The changed tree data\n */\nexport function changeNodeAtPath({treeData, path, newNode, getNodeKey, ignoreCollapsed = true}) {\n const RESULT_MISS = 'RESULT_MISS';\n const traverse = ({isPseudoRoot = false, node, currentTreeIndex, pathIndex}) => {\n if (!isPseudoRoot && getNodeKey({node, treeIndex: currentTreeIndex}) !== path[pathIndex]) {\n return RESULT_MISS;\n }\n\n if (pathIndex >= path.length - 1) {\n // If this is the final location in the path, return its changed form\n return typeof newNode === 'function' ? newNode({node, treeIndex: currentTreeIndex}) : newNode;\n }\n if (!node.children) {\n // If this node is part of the path, but has no children, return the unchanged node\n throw new Error('Path referenced children of node with no children.');\n }\n\n let nextTreeIndex = currentTreeIndex + 1;\n for (let i = 0; i < node.children.length; i += 1) {\n const result = traverse({\n node: node.children[i],\n currentTreeIndex: nextTreeIndex,\n pathIndex: pathIndex + 1\n });\n\n // If the result went down the correct path\n if (result !== RESULT_MISS) {\n if (result) {\n // If the result was truthy (in this case, an object),\n // pass it to the next level of recursion up\n return {\n ...node,\n children: [...node.children.slice(0, i), result, ...node.children.slice(i + 1)]\n };\n }\n // If the result was falsy (returned from the newNode function), then\n // delete the node from the array.\n return {\n ...node,\n children: [...node.children.slice(0, i), ...node.children.slice(i + 1)]\n };\n }\n\n nextTreeIndex += 1 + getDescendantCount({node: node.children[i], ignoreCollapsed});\n }\n\n return RESULT_MISS;\n };\n\n // Use a pseudo-root node in the beginning traversal\n const result = traverse({\n node: {children: treeData},\n currentTreeIndex: -1,\n pathIndex: -1,\n isPseudoRoot: true\n });\n\n if (result === RESULT_MISS) {\n throw new Error(RESULT_MISS_ERROR_MESSAGE);\n }\n\n return result.children;\n}\n\n/**\n * Removes the node at the specified path and returns the resulting treeData.\n *\n * @param {!Object[]} treeData\n * @param {number[]|string[]} path - Array of keys leading up to node to be deleted\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {Object[]} changedTreeData - The tree data with the node removed\n */\nexport function removeNodeAtPath({treeData, path, getNodeKey, ignoreCollapsed = true}) {\n return changeNodeAtPath({\n treeData,\n path,\n getNodeKey,\n ignoreCollapsed,\n newNode: null // Delete the node\n });\n}\n\n/**\n * Removes the node at the specified path and returns the resulting treeData.\n *\n * @param {!Object[]} treeData\n * @param {number[]|string[]} path - Array of keys leading up to node to be deleted\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {Object} result\n * @return {Object[]} result.treeData - The tree data with the node removed\n * @return {Object} result.node - The node that was removed\n * @return {number} result.treeIndex - The previous treeIndex of the removed node\n */\nexport function removeNode({treeData, path, getNodeKey, ignoreCollapsed = true}) {\n let removedNode = null;\n let removedTreeIndex = null;\n const nextTreeData = changeNodeAtPath({\n treeData,\n path,\n getNodeKey,\n ignoreCollapsed,\n newNode: ({node, treeIndex}) => {\n // Store the target node and delete it from the tree\n removedNode = node;\n removedTreeIndex = treeIndex;\n\n return null;\n }\n });\n\n return {\n treeData: nextTreeData,\n node: removedNode,\n treeIndex: removedTreeIndex\n };\n}\n\n/**\n * Gets the node at the specified path\n *\n * @param {!Object[]} treeData\n * @param {number[]|string[]} path - Array of keys leading up to node to be deleted\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {Object|null} nodeInfo - The node info at the given path, or null if not found\n */\nexport function getNodeAtPath({treeData, path, getNodeKey, ignoreCollapsed = true}) {\n let foundNodeInfo = null;\n\n try {\n changeNodeAtPath({\n treeData,\n path,\n getNodeKey,\n ignoreCollapsed,\n newNode: ({node, treeIndex}) => {\n foundNodeInfo = {node, treeIndex};\n return node;\n }\n });\n } catch (err) {\n // Ignore the error -- the null return will be explanation enough\n }\n\n return foundNodeInfo;\n}\n\n/**\n * Adds the node to the specified parent and returns the resulting treeData.\n *\n * @param {!Object[]} treeData\n * @param {!Object} newNode - The node to insert\n * @param {number|string} parentKey - The key of the to-be parentNode of the node\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n * @param {boolean=} expandParent - If true, expands the parentNode specified by parentPath\n * @param {boolean=} addAsFirstChild - If true, adds new node as first child of tree\n *\n * @return {Object} result\n * @return {Object[]} result.treeData - The updated tree data\n * @return {number} result.treeIndex - The tree index at which the node was inserted\n */\nexport function addNodeUnderParent({\n treeData,\n newNode,\n parentKey = null,\n getNodeKey,\n ignoreCollapsed = true,\n expandParent = false,\n addAsFirstChild = false\n}) {\n if (parentKey === null) {\n return addAsFirstChild\n ? {\n treeData: [newNode, ...(treeData || [])],\n treeIndex: 0\n }\n : {\n treeData: [...(treeData || []), newNode],\n treeIndex: (treeData || []).length\n };\n }\n\n let insertedTreeIndex = null;\n let hasBeenAdded = false;\n const changedTreeData = map({\n treeData,\n getNodeKey,\n ignoreCollapsed,\n callback: ({node, treeIndex, path}) => {\n const key = path ? path[path.length - 1] : null;\n // Return nodes that are not the parent as-is\n if (hasBeenAdded || key !== parentKey) {\n return node;\n }\n hasBeenAdded = true;\n\n const parentNode = {\n ...node\n };\n\n if (expandParent) {\n parentNode.expanded = true;\n }\n\n // If no children exist yet, just add the single newNode\n if (!parentNode.children) {\n insertedTreeIndex = treeIndex + 1;\n return {\n ...parentNode,\n children: [newNode]\n };\n }\n\n if (typeof parentNode.children === 'function') {\n throw new Error('Cannot add to children defined by a function');\n }\n\n let nextTreeIndex = treeIndex + 1;\n for (let i = 0; i < parentNode.children.length; i += 1) {\n nextTreeIndex += 1 + getDescendantCount({node: parentNode.children[i], ignoreCollapsed});\n }\n\n insertedTreeIndex = nextTreeIndex;\n\n const children = addAsFirstChild ? [newNode, ...parentNode.children] : [...parentNode.children, newNode];\n\n return {\n ...parentNode,\n children\n };\n }\n });\n\n if (!hasBeenAdded) {\n throw new Error('No node found with the given key.');\n }\n\n return {\n treeData: changedTreeData,\n treeIndex: insertedTreeIndex\n };\n}\n\nfunction addNodeAtDepthAndIndex({\n targetDepth,\n minimumTreeIndex,\n newNode,\n ignoreCollapsed,\n expandParent,\n isPseudoRoot = false,\n isLastChild,\n node,\n currentIndex,\n currentDepth,\n getNodeKey,\n path = []\n}) {\n const selfPath = (n) => (isPseudoRoot ? [] : [...path, getNodeKey({node: n, treeIndex: currentIndex})]);\n\n // If the current position is the only possible place to add, add it\n if (currentIndex >= minimumTreeIndex - 1 || (isLastChild && !(node.children && node.children.length))) {\n if (typeof node.children === 'function') {\n throw new Error('Cannot add to children defined by a function');\n } else {\n const extraNodeProps = expandParent ? {expanded: true} : {};\n const nextNode = {\n ...node,\n\n ...extraNodeProps,\n children: node.children ? [newNode, ...node.children] : [newNode]\n };\n\n return {\n node: nextNode,\n nextIndex: currentIndex + 2,\n insertedTreeIndex: currentIndex + 1,\n parentPath: selfPath(nextNode),\n parentNode: isPseudoRoot ? null : nextNode\n };\n }\n }\n\n // If this is the target depth for the insertion,\n // i.e., where the newNode can be added to the current node's children\n if (currentDepth >= targetDepth - 1) {\n // Skip over nodes with no children or hidden children\n if (\n !node.children ||\n typeof node.children === 'function' ||\n (node.expanded !== true && ignoreCollapsed && !isPseudoRoot)\n ) {\n return {node, nextIndex: currentIndex + 1};\n }\n\n // Scan over the children to see if there's a place among them that fulfills\n // the minimumTreeIndex requirement\n let childIndex = currentIndex + 1;\n let insertedTreeIndex = null;\n let insertIndex = null;\n for (let i = 0; i < node.children.length; i += 1) {\n // If a valid location is found, mark it as the insertion location and\n // break out of the loop\n if (childIndex >= minimumTreeIndex) {\n insertedTreeIndex = childIndex;\n insertIndex = i;\n break;\n }\n\n // Increment the index by the child itself plus the number of descendants it has\n childIndex += 1 + getDescendantCount({node: node.children[i], ignoreCollapsed});\n }\n\n // If no valid indices to add the node were found\n if (insertIndex === null) {\n // If the last position in this node's children is less than the minimum index\n // and there are more children on the level of this node, return without insertion\n if (childIndex < minimumTreeIndex && !isLastChild) {\n return {node, nextIndex: childIndex};\n }\n\n // Use the last position in the children array to insert the newNode\n insertedTreeIndex = childIndex;\n insertIndex = node.children.length;\n }\n\n // Insert the newNode at the insertIndex\n const nextNode = {\n ...node,\n children: [...node.children.slice(0, insertIndex), newNode, ...node.children.slice(insertIndex)]\n };\n\n // Return node with successful insert result\n return {\n node: nextNode,\n nextIndex: childIndex,\n insertedTreeIndex,\n parentPath: selfPath(nextNode),\n parentNode: isPseudoRoot ? null : nextNode\n };\n }\n\n // Skip over nodes with no children or hidden children\n if (\n !node.children ||\n typeof node.children === 'function' ||\n (node.expanded !== true && ignoreCollapsed && !isPseudoRoot)\n ) {\n return {node, nextIndex: currentIndex + 1};\n }\n\n // Get all descendants\n let insertedTreeIndex = null;\n let pathFragment = null;\n let parentNode = null;\n let childIndex = currentIndex + 1;\n let newChildren = node.children;\n if (typeof newChildren !== 'function') {\n newChildren = newChildren.map((child, i) => {\n if (insertedTreeIndex !== null) {\n return child;\n }\n\n const mapResult = addNodeAtDepthAndIndex({\n targetDepth,\n minimumTreeIndex,\n newNode,\n ignoreCollapsed,\n expandParent,\n isLastChild: isLastChild && i === newChildren.length - 1,\n node: child,\n currentIndex: childIndex,\n currentDepth: currentDepth + 1,\n getNodeKey,\n path: [] // Cannot determine the parent path until the children have been processed\n });\n\n if ('insertedTreeIndex' in mapResult) {\n ({insertedTreeIndex, parentNode, parentPath: pathFragment} = mapResult);\n }\n\n childIndex = mapResult.nextIndex;\n\n return mapResult.node;\n });\n }\n\n const nextNode = {...node, children: newChildren};\n const result = {\n node: nextNode,\n nextIndex: childIndex\n };\n\n if (insertedTreeIndex !== null) {\n result.insertedTreeIndex = insertedTreeIndex;\n result.parentPath = [...selfPath(nextNode), ...pathFragment];\n result.parentNode = parentNode;\n }\n\n return result;\n}\n\n/**\n * Insert a node into the tree at the given depth, after the minimum index\n *\n * @param {!Object[]} treeData - Tree data\n * @param {!number} depth - The depth to insert the node at (the first level of the array being depth 0)\n * @param {!number} minimumTreeIndex - The lowest possible treeIndex to insert the node at\n * @param {!Object} newNode - The node to insert into the tree\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n * @param {boolean=} expandParent - If true, expands the parent of the inserted node\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n *\n * @return {Object} result\n * @return {Object[]} result.treeData - The tree data with the node added\n * @return {number} result.treeIndex - The tree index at which the node was inserted\n * @return {number[]|string[]} result.path - Array of keys leading to the node location after insertion\n * @return {Object} result.parentNode - The parent node of the inserted node\n */\nexport function insertNode({\n treeData,\n depth: targetDepth,\n minimumTreeIndex,\n newNode,\n getNodeKey = () => {},\n ignoreCollapsed = true,\n expandParent = false\n}) {\n if (!treeData && targetDepth === 0) {\n return {\n treeData: [newNode],\n treeIndex: 0,\n path: [getNodeKey({node: newNode, treeIndex: 0})],\n parentNode: null\n };\n }\n\n const insertResult = addNodeAtDepthAndIndex({\n targetDepth,\n minimumTreeIndex,\n newNode,\n ignoreCollapsed,\n expandParent,\n getNodeKey,\n isPseudoRoot: true,\n isLastChild: true,\n node: {children: treeData},\n currentIndex: -1,\n currentDepth: -1\n });\n\n if (!('insertedTreeIndex' in insertResult)) {\n throw new Error('No suitable position found to insert.');\n }\n\n const treeIndex = insertResult.insertedTreeIndex;\n return {\n treeData: insertResult.node.children,\n treeIndex,\n path: [...insertResult.parentPath, getNodeKey({node: newNode, treeIndex})],\n parentNode: insertResult.parentNode\n };\n}\n\n/**\n * Get tree data flattened.\n *\n * @param {!Object[]} treeData - Tree data\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`\n *\n * @return {{\n * node: Object,\n * path: []string|[]number,\n * lowerSiblingCounts: []number\n * }}[] nodes - The node array\n */\nexport function getFlatDataFromTree({treeData, getNodeKey, ignoreCollapsed = true}) {\n if (!treeData || treeData.length < 1) {\n return [];\n }\n\n const flattened = [];\n walk({\n treeData,\n getNodeKey,\n ignoreCollapsed,\n callback: (nodeInfo) => {\n flattened.push(nodeInfo);\n }\n });\n\n return flattened;\n}\n\n/**\n * Generate a tree structure from flat data.\n *\n * @param {!Object[]} flatData\n * @param {!function=} getKey - Function to get the key from the nodeData\n * @param {!function=} getParentKey - Function to get the parent key from the nodeData\n * @param {string|number=} rootKey - The value returned by `getParentKey` that corresponds to the root node.\n * For example, if your nodes have id 1-99, you might use rootKey = 0\n *\n * @return {Object[]} treeData - The flat data represented as a tree\n */\nexport function getTreeFromFlatData({\n flatData,\n getKey = (node) => node.id,\n getParentKey = (node) => node.parentId,\n rootKey = '0'\n}) {\n if (!flatData) {\n return [];\n }\n\n const childrenToParents = {};\n flatData.forEach((child) => {\n const parentKey = getParentKey(child);\n\n if (parentKey in childrenToParents) {\n childrenToParents[parentKey].push(child);\n } else {\n childrenToParents[parentKey] = [child];\n }\n });\n\n if (!(rootKey in childrenToParents)) {\n return [];\n }\n\n const trav = (parent) => {\n const parentKey = getKey(parent);\n if (parentKey in childrenToParents) {\n return {\n ...parent,\n children: childrenToParents[parentKey].map((child) => trav(child))\n };\n }\n\n return {...parent};\n };\n\n return childrenToParents[rootKey].map((child) => trav(child));\n}\n\n/**\n * Check if a node is a descendant of another node.\n *\n * @param {!Object} older - Potential ancestor of younger node\n * @param {!Object} younger - Potential descendant of older node\n *\n * @return {boolean}\n */\nexport function isDescendant(older, younger) {\n return (\n !!older.children &&\n typeof older.children !== 'function' &&\n older.children.some((child) => child === younger || isDescendant(child, younger))\n );\n}\n\n/**\n * Get the maximum depth of the children (the depth of the root node is 0).\n *\n * @param {!Object} node - Node in the tree\n * @param {?number} depth - The current depth\n *\n * @return {number} maxDepth - The deepest depth in the tree\n */\nexport function getDepth(node, depth = 0) {\n if (!node.children) {\n return depth;\n }\n\n if (typeof node.children === 'function') {\n return depth + 1;\n }\n\n return node.children.reduce((deepest, child) => Math.max(deepest, getDepth(child, depth + 1)), depth);\n}\n\n/**\n * Find nodes matching a search query in the tree,\n *\n * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index\n * @param {!Object[]} treeData - Tree data\n * @param {?string|number} searchQuery - Function returning a boolean to indicate whether the node is a match or not\n * @param {!function} searchMethod - Function returning a boolean to indicate whether the node is a match or not\n * @param {?number} searchFocusOffset - The offset of the match to focus on\n * (e.g., 0 focuses on the first match, 1 on the second)\n * @param {boolean=} expandAllMatchPaths - If true, expands the paths to any matched node\n * @param {boolean=} expandFocusMatchPaths - If true, expands the path to the focused node\n *\n * @return {Object[]} matches - An array of objects containing the matching `node`s, their `path`s and `treeIndex`s\n * @return {Object[]} treeData - The original tree data with all relevant nodes expanded.\n * If expandAllMatchPaths and expandFocusMatchPaths are both false,\n * it will be the same as the original tree data.\n */\nexport function find({\n getNodeKey,\n treeData,\n searchQuery,\n searchMethod,\n searchFocusOffset,\n expandAllMatchPaths = false,\n expandFocusMatchPaths = true\n}) {\n let matchCount = 0;\n const trav = ({isPseudoRoot = false, node, currentIndex, path = []}) => {\n let matches = [];\n let isSelfMatch = false;\n let hasFocusMatch = false;\n // The pseudo-root is not considered in the path\n const selfPath = isPseudoRoot ? [] : [...path, getNodeKey({node, treeIndex: currentIndex})];\n const extraInfo = isPseudoRoot\n ? null\n : {\n path: selfPath,\n treeIndex: currentIndex\n };\n\n // Nodes with with children that aren't lazy\n const hasChildren = node.children && typeof node.children !== 'function' && node.children.length > 0;\n\n // Examine the current node to see if it is a match\n if (!isPseudoRoot && searchMethod({...extraInfo, node, searchQuery})) {\n if (matchCount === searchFocusOffset) {\n hasFocusMatch = true;\n }\n\n // Keep track of the number of matching nodes, so we know when the searchFocusOffset\n // is reached\n matchCount += 1;\n\n // We cannot add this node to the matches right away, as it may be changed\n // during the search of the descendants. The entire node is used in\n // comparisons between nodes inside the `matches` and `treeData` results\n // of this method (`find`)\n isSelfMatch = true;\n }\n\n let childIndex = currentIndex;\n const newNode = {...node};\n if (hasChildren) {\n // Get all descendants\n newNode.children = newNode.children.map((child) => {\n const mapResult = trav({\n node: child,\n currentIndex: childIndex + 1,\n path: selfPath\n });\n\n // Ignore hidden nodes by only advancing the index counter to the returned treeIndex\n // if the child is expanded.\n //\n // The child could have been expanded from the start,\n // or expanded due to a matching node being found in its descendants\n if (mapResult.node.expanded) {\n childIndex = mapResult.treeIndex;\n } else {\n childIndex += 1;\n }\n\n if (mapResult.matches.length > 0 || mapResult.hasFocusMatch) {\n matches = [...matches, ...mapResult.matches];\n if (mapResult.hasFocusMatch) {\n hasFocusMatch = true;\n }\n\n // Expand the current node if it has descendants matching the search\n // and the settings are set to do so.\n if (\n (expandAllMatchPaths && mapResult.matches.length > 0) ||\n ((expandAllMatchPaths || expandFocusMatchPaths) && mapResult.hasFocusMatch)\n ) {\n newNode.expanded = true;\n }\n }\n\n return mapResult.node;\n });\n }\n\n // Cannot assign a treeIndex to hidden nodes\n if (!isPseudoRoot && !newNode.expanded) {\n matches = matches.map((match) => ({\n ...match,\n treeIndex: null\n }));\n }\n\n // Add this node to the matches if it fits the search criteria.\n // This is performed at the last minute so newNode can be sent in its final form.\n if (isSelfMatch) {\n matches = [{...extraInfo, node: newNode}, ...matches];\n }\n\n return {\n node: matches.length > 0 ? newNode : node,\n matches,\n hasFocusMatch,\n treeIndex: childIndex\n };\n };\n\n const result = trav({\n node: {children: treeData},\n isPseudoRoot: true,\n currentIndex: -1\n });\n\n return {\n matches: result.matches,\n treeData: result.node.children\n };\n}\n\nexport default {\n find,\n getDepth,\n isDescendant,\n getTreeFromFlatData,\n getFlatDataFromTree,\n insertNode,\n addNodeUnderParent,\n getNodeAtPath,\n removeNode,\n removeNodeAtPath,\n changeNodeAtPath,\n toggleExpandedForAll,\n map,\n walk,\n getVisibleNodeInfoAtIndex,\n getVisibleNodeCount,\n getDescendantCount\n};\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n onlyValue: {\n color: 'rgba(0,0,0,.6)',\n fontSize: '13px',\n fontWeight: 'normal',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden'\n },\n select: {\n fontSize: '13px',\n color: 'rgba(0,0,0,.6)',\n paddingLeft: '15px',\n '&&&': {\n paddingRight: '35px'\n }\n },\n selectMenu: {\n '& li': {\n fontSize: '13px',\n height: '32px'\n }\n },\n textField: {\n maxWidth: '100%'\n }\n});\n","import React, {useEffect} from 'react';\nimport PropTypes from 'prop-types';\n\nimport Typography from '@mui/material/Typography';\nimport {useStyles} from './styles';\nimport DropDownEditor from '../editors/DropDownEditor/DropDownEditor';\n\nconst SelectorWithOnlyOptionAutoSelect = ({value, onChange, options, classes = {}, emptyLabel}) => {\n const styles = useStyles();\n\n const [firstOption, ...moreOptions] = options;\n const hasOnlyOneOptionToSelect = moreOptions.length === 0;\n\n useEffect(() => {\n if (hasOnlyOneOptionToSelect && value !== firstOption.value) {\n onChange(firstOption.value);\n }\n }, [firstOption.value]); // eslint-disable-line\n\n const displayEmpty = !!emptyLabel;\n\n return (\n <div className={classes.root}>\n {hasOnlyOneOptionToSelect ? (\n <Typography className={classes.onlyValue || styles.onlyValue} variant={'h6'}>\n {firstOption.label}\n </Typography>\n ) : (\n <DropDownEditor\n displayEmpty={displayEmpty}\n disableUnderline={true}\n classes={{\n select: classes.select || styles.select\n }}\n TextFieldProps={{\n classes: {\n root: classes.textField || styles.textField\n }\n }}\n MenuProps={{\n classes: {\n list: classes.selectMenu || styles.selectMenu\n }\n }}\n value={value || ''}\n entries={displayEmpty ? [{value: '', label: emptyLabel}, ...options] : options}\n onChange={(value) => onChange(value || null)}\n />\n )}\n </div>\n );\n};\n\nSelectorWithOnlyOptionAutoSelect.propTypes = {\n value: PropTypes.string,\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n value: PropTypes.string,\n label: PropTypes.string\n })\n ),\n classes: PropTypes.shape({\n root: PropTypes.string,\n onlyValue: PropTypes.string,\n select: PropTypes.string,\n selectMenu: PropTypes.string,\n textField: PropTypes.string\n }),\n emptyLabel: PropTypes.string\n};\n\nexport default SelectorWithOnlyOptionAutoSelect;\n","import {alpha} from '@mui/material/styles';\n\nimport {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles((theme) => ({\n container: {\n display: 'flex',\n flexDirection: 'column',\n flexShrink: 0,\n width: '64px',\n paddingTop: '8px',\n backgroundColor: theme.palette.background.paper,\n boxShadow: '0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)'\n },\n active: {\n backgroundColor: alpha(theme.palette.primary.main, 0.12),\n color: theme.palette.primary.main,\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n height: '42px',\n width: '3px',\n backgroundColor: theme.palette.primary.main,\n left: '-8px',\n borderRadius: '0 6px 6px 0'\n }\n },\n buttonWrapper: {\n position: 'relative',\n width: '48px',\n height: '44px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '6px',\n margin: '2px 8px',\n color: theme.palette.text.secondary\n }\n}));\n","import React, {ElementType} from 'react';\nimport classnames from 'classnames';\nimport {IconButtonProps} from '@mui/material/IconButton';\nimport {SmallIconButtonWithTooltip} from '../SmallIconButton';\nimport {useStyles} from './styles';\n\ntype Props = {\n disabled: boolean;\n buttonsProps: Array<{\n icon: ElementType;\n tooltipTitle: string;\n id: number;\n }>;\n classes?: {active?: string; buttonWrapper?: string} & IconButtonProps['classes'];\n activeIndexId: number;\n className?: string;\n onButtonClick: (id: number) => void;\n};\n\nexport const SideButtonsPanel = ({\n disabled,\n buttonsProps,\n activeIndexId,\n className,\n onButtonClick,\n classes = {}\n}: Props) => {\n const styles = useStyles();\n const {active, buttonWrapper, ...iconButtonClasses} = classes;\n\n return (\n <div className={classnames(styles.container, className)}>\n {buttonsProps.map(({id, ...buttonProps}) => {\n return (\n <SmallIconButtonWithTooltip\n {...buttonProps}\n disabled={disabled}\n classes={iconButtonClasses}\n size=\"S\"\n key={id}\n className={classnames(\n {[classnames(styles.active, active)]: activeIndexId === id},\n styles.buttonWrapper,\n buttonWrapper\n )}\n onClick={() => onButtonClick(id)}\n data-reltio-id={`reltio-profile-right-side-button-${id}`}\n />\n );\n })}\n </div>\n );\n};\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles((theme) => ({\n contentWrapper: {\n display: 'flex',\n boxSizing: 'border-box',\n flex: 1,\n flexDirection: 'column',\n backgroundColor: theme.palette.background.paper,\n boxShadow: '0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)',\n transition: theme.transitions.create(['width'], {\n duration: theme.transitions.duration.enteringScreen\n })\n }\n}));\n","import React, {ReactNode, VFC} from 'react';\nimport {useStyles} from './styles';\n\ntype Props = {\n width?: number;\n open: boolean;\n children: ReactNode;\n};\n\nexport const SidePanel: VFC<Props> = ({width, open, children}) => {\n const styles = useStyles();\n return (\n <div\n className={styles.contentWrapper}\n data-reltio-id=\"side-panel\"\n style={{\n width: width ? `${open ? width : 0}px` : '100%'\n }}\n >\n {open && <>{children}</>}\n </div>\n );\n};\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n attributesContainer: {\n padding: '0 16px 16px 16px'\n },\n header: {\n marginBottom: '4px'\n },\n noCaption: {\n paddingTop: '16px'\n },\n noData: {\n fontSize: '13px',\n color: 'rgba(0,0,0,0.54)'\n }\n});\n","import {connect} from 'react-redux';\nimport mdmModule from '@reltio/mdm-module';\nimport {AttributesViewStateProps} from '../../types';\nimport AttributesView from './AttributesView';\n\nconst mapStateToProps = (state): AttributesViewStateProps => ({\n metadata: mdmModule.selectors.getMetadata(state)\n});\n\nexport {AttributesView};\n\nexport default connect(mapStateToProps)(AttributesView);\n","import React, {useMemo} from 'react';\nimport {useSelector} from 'react-redux';\nimport mdm from '@reltio/mdm-module';\nimport {Entity, getAttributesListForReadMode, isEmptyValue, PivotingAttribute} from '@reltio/mdm-sdk';\nimport classnames from 'classnames';\nimport i18n from 'ui-i18n';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport {PivotingAttributeContext} from '../../../../contexts';\nimport BasicView from '../../../BasicView/BasicView';\nimport FacetViewHeader from '../../../FacetViewHeader/FacetViewHeader';\nimport AttributesList from '../AttributesList';\nimport {AttributesViewProps} from '../../types';\nimport {getFilteredAttrTypes} from '../../helpers/attributesView';\nimport {useStyles} from './styles';\n\ntype Props = Omit<AttributesViewProps, 'mode'>;\n\nconst AttributesView = ({\n className,\n entity = {} as Entity,\n metadata,\n caption = '',\n excludeUris = [],\n includeUris = [],\n attributesCount = 16\n}: Props) => {\n const styles = useStyles();\n const pivotingAttributes: PivotingAttribute[] = useSelector(mdm.selectors.getPivotingAttributes);\n\n const filteredAttrTypes = useMemo(\n () => getFilteredAttrTypes(metadata, entity.type, includeUris, excludeUris),\n [excludeUris, includeUris, metadata, entity.type]\n );\n\n const attributesList = getAttributesListForReadMode(filteredAttrTypes, entity);\n\n const isShowAttributeList = attributesList.filter(({values}) => !isEmptyValue(values)).length > 0;\n\n return isShowAttributeList || !isEmptyValue(caption) ? (\n <PivotingAttributeContext.Provider value={pivotingAttributes}>\n <BasicView className={className}>\n {caption && <FacetViewHeader className={styles.header} title={caption} />}\n <Box className={classnames(styles.attributesContainer, {[styles.noCaption]: !caption})}>\n {isShowAttributeList ? (\n <AttributesList\n entity={entity}\n attrTypes={filteredAttrTypes}\n parentUri={entity.uri}\n drawLines={false}\n max={attributesCount}\n />\n ) : (\n <Typography className={styles.noData}>{i18n.text('No data found')}</Typography>\n )}\n </Box>\n </BasicView>\n </PivotingAttributeContext.Provider>\n ) : null;\n};\n\nexport default AttributesView;\n","import {makeStyles} from '@mui/styles';\n\nexport const useStyles = makeStyles({\n attributesContainer: {\n overflow: 'hidden',\n padding: '0 16px 16px 16px'\n },\n header: {\n marginBottom: '4px'\n },\n noCaption: {\n paddingTop: '16px'\n }\n});\n","import React, {useCallback, useContext, useMemo} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport classnames from 'classnames';\nimport {pipe} from 'ramda';\nimport mdmModule, {profile} from '@reltio/mdm-module';\nimport {Entity, isTempUri, getPinnedAttributesForUser, AttributeItem} from '@reltio/mdm-sdk';\nimport Box from '@mui/material/Box';\nimport BasicView from '../../../BasicView/BasicView';\nimport FacetViewHeader from '../../../FacetViewHeader/FacetViewHeader';\nimport AttributesList from '../AttributesList';\nimport {ViewIdContext} from '../../../../contexts';\nimport {AttributesViewProps} from '../../types';\nimport {getFilteredAttrTypes} from '../../helpers/attributesView';\nimport {PinnedAttributesContext} from '../contexts/PinnedAttributesContext';\nimport {useStyles} from './styles';\n\ntype Props = Omit<AttributesViewProps, 'attributesCount'>;\n\nconst AttributesView = ({\n className,\n entity = {} as Entity,\n mode,\n metadata,\n caption = '',\n excludeUris = [],\n includeUris = [],\n pinnedAttributes\n}: Props) => {\n const styles = useStyles();\n const dispatch = useDispatch();\n const viewId = useContext(ViewIdContext);\n const userRoles = useSelector(mdmModule.selectors.getUserRoles);\n const pinnedAttributeUris = useMemo(\n () => getPinnedAttributesForUser(pinnedAttributes, userRoles),\n [pinnedAttributes, userRoles]\n );\n const modifiedEntity = useSelector(\n (state) => mdmModule.selectors.getModifiedEntity(state, entity.uri) || ({} as Entity)\n );\n\n const filteredAttrTypes = useMemo(\n () => getFilteredAttrTypes(metadata, modifiedEntity.type, includeUris, excludeUris),\n [excludeUris, includeUris, metadata, modifiedEntity.type]\n );\n\n const onAddAttributes = useCallback(\n (params: AttributeItem[]) =>\n pipe(profile.actions.addAttributes, dispatch)(params.map((param) => ({...param, viewId}))),\n [viewId, dispatch]\n );\n\n const onChangeAttribute = useCallback(\n (params: AttributeItem) => pipe(profile.actions.modifyAttribute, dispatch)({...params, viewId}),\n [viewId, dispatch]\n );\n\n const onDeleteAttribute = useCallback(\n (params: AttributeItem) => pipe(profile.actions.removeAttribute, dispatch)({...params, viewId}),\n [viewId, dispatch]\n );\n\n return (\n <BasicView className={className}>\n {caption && <FacetViewHeader className={styles.header} title={caption} />}\n <Box className={classnames(styles.attributesContainer, {[styles.noCaption]: !caption})}>\n <PinnedAttributesContext.Provider value={pinnedAttributeUris}>\n <AttributesList\n entity={modifiedEntity}\n attrTypes={filteredAttrTypes}\n parentUri={modifiedEntity.uri}\n drawLines={false}\n mode={mode}\n showEmptyEditors={isTempUri(modifiedEntity.uri)}\n crosswalks={modifiedEntity.crosswalks}\n onAddAttributes={onAddAttributes}\n onChangeAttribute={onChangeAttribute}\n onDeleteAttribute={onDeleteAttribute}\n />\n </PinnedAttributesContext.Provider>\n </Box>\n </BasicView>\n );\n};\n\nexport default AttributesView;\n","import {connect} from 'react-redux';\nimport mdmModule from '@reltio/mdm-module';\nimport {AttributesViewStateProps} from '../../types';\nimport AttributesView from './AttributesView';\n\nconst mapStateToProps = (state): AttributesViewStateProps => ({\n metadata: mdmModule.selectors.getMetadata(state)\n});\n\nexport {AttributesView};\n\nexport default connect(mapStateToProps)(AttributesView);\n","import React from 'react';\nimport {isViewMode, Mode} from '@reltio/mdm-sdk';\nimport {AttributesViewOwnProps} from '../types';\nimport ReadModeAttributesView from '../readMode/AttributesView';\nimport EditModeAttributesView from '../editMode/AttributesView';\nimport {EntityContext} from '../../../contexts';\n\nconst AttributesView = ({\n mode = Mode.Viewing,\n attributesCount,\n pinnedAttributes,\n entity,\n ...restProps\n}: AttributesViewOwnProps) => {\n return (\n <EntityContext.Provider value={entity}>\n {isViewMode(mode) ? (\n <ReadModeAttributesView attributesCount={attributesCount} entity={entity} {...restProps} />\n ) : (\n <EditModeAttributesView\n mode={mode}\n pinnedAttributes={pinnedAttributes}\n entity={entity}\n {...restProps}\n />\n )}\n </EntityContext.Provider>\n );\n};\n\nexport default AttributesView;\n","import {connect} from 'react-redux';\nimport mdm from '@reltio/mdm-module';\nimport {AttributesViewOwnProps} from '../types';\nimport AttributesView from './AttributesView';\n\ntype Props = Pick<AttributesViewOwnProps, 'entity' | 'mode'>;\n\nconst mapStateToProps = (state, ownProps: Props): Props => ({\n entity: ownProps.entity || mdm.selectors.getEntityWithDiff(state),\n mode: ownProps.mode || mdm.selectors.getMode(state)\n});\n\nexport {AttributesView};\n\nexport default connect(mapStateToProps)(AttributesView);\n","import {makeStyles} from '@mui/styles';\n\nconst iconsWidth = '68px';\n\nexport const useOptionStyles = makeStyles({\n container: {\n display: 'flex',\n alignItems: 'center',\n height: '32px',\n minHeight: '32px',\n padding: 0\n },\n text: {\n display: 'flex',\n width: `calc(100% - ${iconsWidth})`\n },\n textItem: {\n fontSize: '13px',\n lineHeight: '15px',\n marginRight: 10\n },\n primaryTextItem: {\n flex: '1 0',\n flexBasis: 0,\n maxWidth: '50%',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryTextItem: {\n flex: '1 0',\n flexBasis: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n icons: {\n transform: 'scale(0.5)',\n position: 'relative',\n flexShrink: 0,\n width: iconsWidth,\n bottom: '10px'\n },\n iconTop: {\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1\n },\n iconBottom: {\n position: 'absolute',\n top: 0,\n left: 26,\n zIndex: 0\n }\n});\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport MenuItem from '@mui/material/MenuItem';\nimport Typography from '@mui/material/Typography';\nimport {useOptionStyles} from './styles';\nimport EntityTypeIcon from '../../../../EntityTypeIcon/EntityTypeIcon';\nimport ExpandedValueTooltip from '../../../../ExpandedValueTooltip/ExpandedValueTooltip';\n\nconst RelationOption = ({innerRef, innerProps, selectOption, data}) => {\n const styles = useOptionStyles();\n const {value, label, startObject, endObject} = data;\n const secondaryLabel = startObject.objectType.label + ' \\u2194 ' + endObject.objectType.label;\n return (\n <MenuItem\n className={styles.container}\n ref={innerRef}\n key={value}\n onClick={() => selectOption({label, value, startObject, endObject})}\n {...innerProps}\n >\n <div className={styles.icons}>\n <EntityTypeIcon className={styles.iconTop} entityType={startObject.objectType} />\n <EntityTypeIcon className={styles.iconBottom} entityType={endObject.objectType} />\n </div>\n <div className={styles.text}>\n <ExpandedValueTooltip value={label}>\n <Typography className={classnames(styles.textItem, styles.primaryTextItem)}>{label}</Typography>\n </ExpandedValueTooltip>\n <ExpandedValueTooltip value={secondaryLabel}>\n <Typography color=\"textSecondary\" className={classnames(styles.textItem, styles.secondaryTextItem)}>\n {secondaryLabel}\n </Typography>\n </ExpandedValueTooltip>\n </div>\n </MenuItem>\n );\n};\n\nRelationOption.propTypes = {\n innerRef: PropTypes.oneOfType([\n PropTypes.oneOf([null]),\n PropTypes.func,\n PropTypes.shape({\n current: PropTypes.any.isRequired\n })\n ]),\n innerProps: PropTypes.object.isRequired,\n selectOption: PropTypes.func.isRequired,\n data: PropTypes.shape({\n value: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n startObject: PropTypes.object,\n endObject: PropTypes.object\n })\n};\n\nexport default RelationOption;\n","import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport i18n from 'ui-i18n';\nimport {identity, defaultTo} from 'ramda';\nimport RelationOption from './components/RelationOption';\nimport DropDownSelector from '../../../DropDownSelector/DropDownSelector';\n\nconst RelationTypeSelector = ({value = {}, options = [], onChange = identity, TextFieldProps, ...otherProps}) => {\n const textFieldProps = useMemo(\n () => ({\n ...defaultTo({}, TextFieldProps),\n ['data-reltio-id']: 'relation-type-selector'\n }),\n [TextFieldProps]\n );\n return (\n <DropDownSelector\n value={value}\n options={options}\n onChange={onChange}\n label={i18n.text('Select relationship type ')}\n components={{Option: RelationOption}}\n TextFieldProps={textFieldProps}\n {...otherProps}\n />\n );\n};\n\nconst ValueType = PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n startObject: PropTypes.object,\n endObject: PropTypes.object\n});\n\nRelationTypeSelector.propTypes = {\n value: ValueType,\n options: PropTypes.arrayOf(ValueType),\n onChange: PropTypes.func\n};\n\nexport default RelationTypeSelector;\n","import React from 'react';\n\nexport const PageRequestsAbortingContext = React.createContext<AbortSignal>(undefined);\n\nPageRequestsAbortingContext.displayName = 'PageRequestsAbortingContext';\n","import React, {useCallback, useContext} from 'react';\nimport {PerspectivesSettings, PerspectiveSettingItem} from '../../types';\n\ntype PerspectivesSettingsProps = {\n settings: PerspectivesSettings;\n onChange: (perspectiveId: string, newSetting: Partial<PerspectiveSettingItem>) => void;\n};\n\nexport const PerspectivesSettingsContext = React.createContext<PerspectivesSettingsProps>({\n settings: {},\n onChange: () => {}\n});\n\nPerspectivesSettingsContext.displayName = 'PerspectivesSettingsContext';\n\nexport const usePerspectivesSettings = (perspectiveId: string) => {\n const {settings, onChange} = useContext(PerspectivesSettingsContext) || {};\n const perspectiveSettings = settings?.[perspectiveId];\n\n const updatePerspectiveSettings = useCallback(\n (newSetting: Partial<PerspectiveSettingItem>) => {\n onChange(perspectiveId, newSetting);\n },\n [perspectiveId, onChange]\n );\n\n return {updatePerspectiveSettings, perspectiveSettings};\n};\n","import {useCallback} from 'react';\nimport {Directions, getDirectionalLabelFromObject} from '@reltio/mdm-sdk';\nimport {ascend, curry, evolve, pipe, prop, propEq, propOr, tap} from 'ramda';\n\nexport const useRelationTypeSelector = ({reversedContextLabels}) => {\n const getRelationTypesOptions = useCallback(\n (inRelations, outRelations) => {\n const labelsMap = {};\n const addLabelInMap = (label) => (labelsMap[label] = propOr(0, label, labelsMap) + 1);\n const getDirectionalLabel = pipe(getDirectionalLabelFromObject, tap(addLabelInMap));\n const byLabel = ascend(prop('label'));\n\n const prepareRelation = curry((direction, {uri, label, startObject, endObject}) => {\n const dirObject =\n direction === (reversedContextLabels ? Directions.OUT : Directions.IN) ? startObject : endObject;\n return {\n label: {directionalLabel: getDirectionalLabel(dirObject), typeLabel: label},\n value: `${uri},${direction}`,\n startObject,\n endObject\n };\n });\n\n return inRelations\n .map(prepareRelation(Directions.IN))\n .concat(outRelations.map(prepareRelation(Directions.OUT)))\n .map(\n evolve({\n label: ({directionalLabel, typeLabel}) => {\n return directionalLabel\n ? labelsMap[directionalLabel] > 1\n ? `${directionalLabel} (${typeLabel})`\n : directionalLabel\n : typeLabel;\n }\n })\n )\n .sort(byLabel);\n },\n [reversedContextLabels]\n );\n\n const fromEditorValue = useCallback(\n (inRelationTypes, outRelationTypes) => (relation) => {\n const [uri, direction] = relation.value.split(',');\n const type = (direction === Directions.IN ? inRelationTypes : outRelationTypes).find(propEq('uri', uri));\n return {type, direction};\n },\n []\n );\n\n const toEditorValue = useCallback(\n (relation, relationsTypesOptions) =>\n relationsTypesOptions.find(propEq('value', `${relation.relationType},${relation.direction}`)),\n []\n );\n\n return {\n getRelationTypesOptions,\n fromEditorValue,\n toEditorValue\n };\n};\n","import {useEffect, useRef} from 'react';\n\nexport const useRunOnceAfterValueInitialization = (cb, value) => {\n const isValueInited = useRef(false);\n useEffect(() => {\n if (value && !isValueInited.current) {\n isValueInited.current = true;\n cb();\n }\n }, [cb, value]);\n};\n"],"names":["useStyles","makeStyles","theme","button","whiteSpace","fontSize","lineHeight","letterSpacing","padding","fill","palette","primary","main","fillOpacity","iconButton","startIcon","marginLeft","marginRight","width","height","alignItems","overflowStyle","overflow","textOverflow","menuIcon","menuItem","minHeight","menuText","color","text","ActionButtonMode","ActionButton","forwardRef","ref","className","mode","label","disabled","icon","Icon","onClick","noop","onMenuClose","otherProps","styles","SmallIconButton","classnames","size","tooltipTitle","showForDisabled","Button","classes","ExpandedValueTooltip","value","handleClick","MenuItem","root","Typography","getButtonView","displayName","basicViewPaper","display","flexDirection","basicView","BasicView","children","Paper","paper","title","fontWeight","content","contentText","marginBottom","actionButtons","paddingTop","discardButton","open","onCancel","cancelCaption","i18n","onDiscard","discardCaption","onSave","saveCaption","disabledSave","Dialog","onClose","paperScrollPaper","DialogTitle","DialogContent","DialogContentText","DialogActions","disableSpacing","autoFocus","ConnectionRelationTypeSelector","relation","inRelationTypes","outRelationTypes","onChange","identity","applyFirstByDefault","reversedContextLabels","getRelationTypesOptions","fromEditorValue","toEditorValue","useRelationTypeSelector","relationsTypesOptions","useMemo","handleChange","useCallback","pipe","hasValue","relationType","useEffect","length","options","propTypes","PropTypes","ConnectionRelationType","RelationTypeType","container","justifyContent","BasicViewHeader","link","cursor","wordBreak","selected","popper","maxWidth","minWidth","boxShadow","backgroundColor","borderRadius","HierarchyNodeTitle","isSelected","entityUri","viewId","anchorEl","withEntityDetails","dispatch","useDispatch","uiPath","useSelector","mdm","generateEntityUrl","useContext","UrlGeneratorsContext","isLoading","entityDetails","showEntityDetails","hideEntityDetails","setEntityDetails","useState","setIsLoading","timerId","useRef","safePromise","useSafePromise","cancelRequest","Promise","resolve","current","setTimeout","getEntity","then","finally","clearTimeout","useEntityDetails","uri","showPopper","Boolean","ui","onMouseEnter","undefined","onMouseLeave","Link","to","Popper","modal","placement","ProfileCard","entity","variant","textDecoration","href","e","stopPropagation","preventDefault","alt","src","gif2Url","image","info","secondaryLabel","marginTop","secondary","thirdRow","entityId","entityIdLabel","entityIdValue","ProfileCardContent","secondaryLabelClass","labelClass","getLabel","handleCopyEntityIdToClipboard","navigator","clipboard","writeText","getEntityId","EntityAvatar","imageClassName","EntityUriLink","getEntityUriForLink","showOnExceededHeight","EntityTypeBadge","transform","wave","position","top","left","right","bottom","animation","background","avatar","flex","ProfileCardPlaceholder","memo","containerClass","resizablePanesWrapper","flexGrow","pane","DEFAULT_R_PANE_SIZE","ProfileResizablePanes","perspectiveId","buttonsProps","defaultTab","perspectiveSettings","updatePerspectiveSettings","usePerspectivesSettings","active","isSidePanelOpen","isNil","handleUpdateSettings","newSetting","toggleActive","newId","resetActive","handlePaneSizeChange","ResizablePanes","orientation","minSize","maxSize","allowResize","debounceInterval","cloneElement","SideButtonsPanel","onButtonClick","activeIndexId","filter","join","textAlign","zIndex","opacity","borderLeft","borderRight","borderTop","boxSizing","borderBottom","TreeNode","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection","rowDirectionClass","scaffoldBlockCount","scaffold","style","forEach","lowerSiblingCount","i","lineClass","push","key","highlightLineClass","Children","child","defaultProps","isRequired","NodeRendererDefault","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrag","subtitle","isSearchMatch","isSearchFocus","buttons","didDrop","parentNode","nodeTitle","nodeSubtitle","handle","expanded","Array","map","_","index","dropEffect","isDraggedDescendant","isDescendant","isLandingPadActive","buttonStyle","type","btn","TreePlaceholder","Component","render","this","props","drop","border","outline","borderColor","PlaceholderRendererDefault","memoize","f","savedArgsArray","savedKeysArray","savedResult","args","keysArray","Object","keys","sort","argsArray","some","arg","memoizedInsertNode","insertNode","memoizedGetFlatDataFromTree","getFlatDataFromTree","memoizedGetDescendantCount","getDescendantCount","DndManager","constructor","treeRef","hoverHandler","hoverProps","dropTargetProps","monitor","component","item","getItem","targetDepth","getTargetDepth","lastDropTargetNode","lastDropTargetDepth","dragHover","minimumTreeIndex","depth","deferredCallHoverHandler","shouldSkipMoreFrames","rafId","requestAnimationFrame","resetDragVariables","startDrag","endDrag","dndType","treeData","state","draggingTreeData","getNodeKey","customCanDrop","maxDepth","lastCanDropResult","lastCanDropProps","dropTargetDepth","rowAbove","canNodeHaveChildren","slice","Math","min","blocksOffset","dragSourceInitialDepth","relativePosition","findDOMNode","getBoundingClientRect","leftShift","getSourceClientOffset","x","round","direction","getDifferenceFromInitialOffset","max","draggedChildDepth","getDepth","abovePath","aboveNode","newCanDropProps","nodeId","aboveNodeId","equals","addedResult","newNode","expandParent","prevPath","prevParent","prevTreeIndex","nextPath","nextParent","nextTreeIndex","wrapSource","el","nodeDragSource","beginDrag","cancelAnimationFrame","getDropResult","dropTargetNode","dragSource","connect","dragPreview","wrapTarget","nodeDropTarget","result","hover","bind","dropTarget","dragged","wrapPlaceholder","placeholderDropTarget","treeIdCounter","mergeTheme","merged","innerStyle","reactVirtualizedListProps","overridableDefaults","nodeContentRenderer","placeholderRenderer","rowHeight","slideRegionSize","treeNodeRenderer","propKey","ReactSortableTree","super","isVirtualized","dndManager","treePlaceholderRenderer","scrollZoneVirtualList","createScrollingComponent","withScrolling","List","vStrength","createVerticalStrength","hStrength","createHorizontalStrength","draggedMinimumTreeIndex","draggedDepth","searchMatches","searchFocusTreeIndex","dragging","draggingExpandedPaths","ignoreOneTreeUpdate","instanceProps","searchQuery","searchFocusOffset","ignoreTreeChanges","moveNode","handleDndMonitorChange","componentDidMount","loadLazyChildren","stateUpdate","search","setState","clearMonitorSubscription","dragDropManager","getMonitor","subscribeToStateChange","nextProps","prevState","newState","assign","componentDidUpdate","prevProps","onDragStateChanged","walk","callback","pending","onLazyLoadChildren","removeNode","draggedPath","reduce","newTree","changeNodeAtPath","isTreeDataEqual","componentWillUnmount","getRows","ignoreCollapsed","targetNode","onVisibilityToggle","nextParentNode","onMoveNode","seekIndex","expand","singleSearch","searchFinishCallback","searchMethod","onlyExpandSearchedNodes","expandedTreeData","matches","find","toggleExpandedForAll","defaultSearchMethod","expandAllMatchPaths","expandFocusMatchPaths","newDraggingTreeData","nodePath","newDraggingExpandedPaths","when","always","gt","append","uniqWith","eqBy","String","dropResult","shouldCopy","shouldCopyOnOutsideDrop","copyNode","resetTree","loadCollapsedLazyChildren","done","childrenArray","oldNode","renderRow","row","matchKeys","generateNodeProps","TreeNodeRenderer","NodeContentRenderer","nodeKey","callbackParams","nodeProps","rowCanDrag","sharedProps","rows","swapTo","fromIndex","toIndex","count","rowsWithoutMoved","slideRows","scrollToInfo","scrollToIndex","list","containerStyle","Placeholder","PlaceholderContent","ScrollZoneVirtualList","verticalStrength","horizontalStrength","speed","scrollToAlignment","rst__virtualScrollOverride","onScroll","scrollTop","rowCount","estimatedRowSize","rowRenderer","rowStyle","defaultGetNodeKey","polyfill","StyledReactSortableTree","withStyles","SortableTreeWithoutDndContext","DndContext","DragAndDrop","getReactElementText","parent","stringSearch","indexOf","getNodeDataAtTreeIndexOrNextIndex","targetIndex","currentIndex","isPseudoRoot","selfPath","nextIndex","childIndex","childCount","walkDescendants","mapDescendants","nextNode","selfInfo","mapResult","RESULT_MISS","traverse","currentTreeIndex","pathIndex","Error","removedNode","removedTreeIndex","addNodeAtDepthAndIndex","isLastChild","currentDepth","n","insertedTreeIndex","parentPath","insertIndex","pathFragment","newChildren","insertResult","flattened","nodeInfo","older","younger","deepest","matchCount","trav","isSelfMatch","hasFocusMatch","extraInfo","hasChildren","match","getTreeFromFlatData","flatData","getKey","id","getParentKey","parentId","rootKey","childrenToParents","parentKey","addNodeUnderParent","addAsFirstChild","hasBeenAdded","changedTreeData","getNodeAtPath","foundNodeInfo","err","removeNodeAtPath","getVisibleNodeInfoAtIndex","getVisibleNodeCount","total","currentNode","onlyValue","select","paddingLeft","paddingRight","selectMenu","textField","SelectorWithOnlyOptionAutoSelect","emptyLabel","firstOption","moreOptions","hasOnlyOneOptionToSelect","displayEmpty","DropDownEditor","disableUnderline","TextFieldProps","MenuProps","entries","flexShrink","alpha","buttonWrapper","margin","iconButtonClasses","buttonProps","contentWrapper","transition","transitions","create","duration","enteringScreen","SidePanel","attributesContainer","header","noCaption","noData","metadata","mdmModule","caption","excludeUris","includeUris","attributesCount","pivotingAttributes","filteredAttrTypes","getFilteredAttrTypes","isShowAttributeList","getAttributesListForReadMode","values","isEmptyValue","PivotingAttributeContext","FacetViewHeader","Box","AttributesList","attrTypes","parentUri","drawLines","pinnedAttributes","ViewIdContext","userRoles","pinnedAttributeUris","getPinnedAttributesForUser","modifiedEntity","onAddAttributes","params","profile","param","onChangeAttribute","onDeleteAttribute","PinnedAttributesContext","showEmptyEditors","isTempUri","crosswalks","ownProps","Mode","restProps","EntityContext","isViewMode","useOptionStyles","textItem","primaryTextItem","flexBasis","secondaryTextItem","icons","iconTop","iconBottom","RelationOption","innerRef","innerProps","selectOption","data","startObject","endObject","objectType","EntityTypeIcon","entityType","RelationTypeSelector","textFieldProps","defaultTo","DropDownSelector","components","Option","ValueType","PageRequestsAbortingContext","React","PerspectivesSettingsContext","settings","inRelations","outRelations","labelsMap","getDirectionalLabel","getDirectionalLabelFromObject","tap","propOr","byLabel","ascend","prop","prepareRelation","curry","dirObject","Directions","directionalLabel","typeLabel","concat","evolve","split","propEq","useRunOnceAfterValueInitialization","cb","isValueInited"],"sourceRoot":""}