@techdocs/cli 1.11.3-next.0 → 1.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/embedded-app/.config-schema.json +55 -55
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/{1134.7002acb7fabf.chunk.js → 1134.cdfeb48e4304.chunk.js} +2 -2
- package/dist/embedded-app/static/1134.cdfeb48e4304.chunk.js.map +1 -0
- package/dist/embedded-app/static/123.637f5aacc8d1.chunk.js +2 -0
- package/dist/embedded-app/static/123.637f5aacc8d1.chunk.js.map +1 -0
- package/dist/embedded-app/static/1659.76be9a6f67da.chunk.js +2 -0
- package/dist/embedded-app/static/1659.76be9a6f67da.chunk.js.map +1 -0
- package/dist/embedded-app/static/3554.6bba0bb8bcc1.chunk.js +2 -0
- package/dist/embedded-app/static/3554.6bba0bb8bcc1.chunk.js.map +1 -0
- package/dist/embedded-app/static/{7213.e2116c7254ff.chunk.js → 4424.e6c1b7a79f04.chunk.js} +2 -2
- package/dist/embedded-app/static/4424.e6c1b7a79f04.chunk.js.map +1 -0
- package/dist/embedded-app/static/4587.4fe4db532e38.chunk.js +2 -0
- package/dist/embedded-app/static/4587.4fe4db532e38.chunk.js.map +1 -0
- package/dist/embedded-app/static/4923.4e90c656282c.chunk.js +2 -0
- package/dist/embedded-app/static/4923.4e90c656282c.chunk.js.map +1 -0
- package/dist/embedded-app/static/5443.6a7f7c419094.chunk.js +4 -0
- package/dist/embedded-app/static/5443.6a7f7c419094.chunk.js.map +1 -0
- package/dist/embedded-app/static/5588.e2ec3ec3c5bd.chunk.js +2 -0
- package/dist/embedded-app/static/5588.e2ec3ec3c5bd.chunk.js.map +1 -0
- package/dist/embedded-app/static/7632.3917bed33d55.chunk.js +2 -0
- package/dist/embedded-app/static/7632.3917bed33d55.chunk.js.map +1 -0
- package/dist/embedded-app/static/{7998.b43c307e32d8.chunk.js → 7998.75a90b89c056.chunk.js} +2 -2
- package/dist/embedded-app/static/7998.75a90b89c056.chunk.js.map +1 -0
- package/dist/embedded-app/static/8461.e13cb51757cd.chunk.js +10 -0
- package/dist/embedded-app/static/8461.e13cb51757cd.chunk.js.map +1 -0
- package/dist/embedded-app/static/8877.b559311f1e18.chunk.js +2 -0
- package/dist/embedded-app/static/8877.b559311f1e18.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.63b77055452b.js +523 -0
- package/dist/embedded-app/static/main.63b77055452b.js.map +1 -0
- package/dist/embedded-app/static/module-dompurify.2a1a57d1bb7d.js +2 -0
- package/dist/embedded-app/static/module-dompurify.2a1a57d1bb7d.js.map +1 -0
- package/dist/embedded-app/static/{module-zod.bc4245f82c69.js → module-zod.c13f6fd98701.js} +2 -2
- package/dist/embedded-app/static/{module-zod.bc4245f82c69.js.map → module-zod.c13f6fd98701.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.6b5e92c67af9.js → runtime.aa5597464824.js} +2 -2
- package/dist/embedded-app/static/{runtime.6b5e92c67af9.js.map → runtime.aa5597464824.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.b20c39624bca.js → vendor.12fa41368f4c.js} +4 -8
- package/dist/embedded-app/static/vendor.12fa41368f4c.js.map +1 -0
- package/dist/package.json.cjs.js +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/1134.7002acb7fabf.chunk.js.map +0 -1
- package/dist/embedded-app/static/123.c5259eb3ae0f.chunk.js +0 -2
- package/dist/embedded-app/static/123.c5259eb3ae0f.chunk.js.map +0 -1
- package/dist/embedded-app/static/1659.11628d2e4d1f.chunk.js +0 -2
- package/dist/embedded-app/static/1659.11628d2e4d1f.chunk.js.map +0 -1
- package/dist/embedded-app/static/3554.d76a6182d04f.chunk.js +0 -2
- package/dist/embedded-app/static/3554.d76a6182d04f.chunk.js.map +0 -1
- package/dist/embedded-app/static/4400.ad9c19b09cbe.chunk.js +0 -2
- package/dist/embedded-app/static/4400.ad9c19b09cbe.chunk.js.map +0 -1
- package/dist/embedded-app/static/4587.a191f5a61b82.chunk.js +0 -2
- package/dist/embedded-app/static/4587.a191f5a61b82.chunk.js.map +0 -1
- package/dist/embedded-app/static/5443.ca89276cc3fe.chunk.js +0 -4
- package/dist/embedded-app/static/5443.ca89276cc3fe.chunk.js.map +0 -1
- package/dist/embedded-app/static/7213.e2116c7254ff.chunk.js.map +0 -1
- package/dist/embedded-app/static/7632.d2fd37a3ce88.chunk.js +0 -2
- package/dist/embedded-app/static/7632.d2fd37a3ce88.chunk.js.map +0 -1
- package/dist/embedded-app/static/7998.b43c307e32d8.chunk.js.map +0 -1
- package/dist/embedded-app/static/8461.3a913e298014.chunk.js +0 -10
- package/dist/embedded-app/static/8461.3a913e298014.chunk.js.map +0 -1
- package/dist/embedded-app/static/8877.98760209b373.chunk.js +0 -2
- package/dist/embedded-app/static/8877.98760209b373.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.6b421945425a.js +0 -523
- package/dist/embedded-app/static/main.6b421945425a.js.map +0 -1
- package/dist/embedded-app/static/module-dompurify.b9b41a29cecf.js +0 -2
- package/dist/embedded-app/static/module-dompurify.b9b41a29cecf.js.map +0 -1
- package/dist/embedded-app/static/vendor.b20c39624bca.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/7213.e2116c7254ff.chunk.js","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/core/esm/internal/svg-icons/CheckBoxOutlineBlank.js","webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/core/esm/internal/svg-icons/CheckBox.js","webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/core/esm/internal/svg-icons/IndeterminateCheckBox.js","webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/core/esm/Checkbox/Checkbox.js","webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/core/esm/FormControlLabel/FormControlLabel.js","webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/core/esm/ListItemSecondaryAction/ListItemSecondaryAction.js","webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/core/esm/ListSubheader/ListSubheader.js","webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/core/esm/internal/SwitchBase.js","webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/Cancel.js","webpack://techdocs-cli-embedded-app/../../node_modules/fast-deep-equal/react.js"],"sourcesContent":["import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"\n}), 'CheckBoxOutlineBlank');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckBox');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z\"\n}), 'IndeterminateCheckBox');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport SwitchBase from '../internal/SwitchBase';\nimport CheckBoxOutlineBlankIcon from '../internal/svg-icons/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '../internal/svg-icons/CheckBox';\nimport { alpha } from '../styles/colorManipulator';\nimport IndeterminateCheckBoxIcon from '../internal/svg-icons/IndeterminateCheckBox';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if `indeterminate={true}`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/React.createElement(CheckBoxIcon, null);\nvar defaultIcon = /*#__PURE__*/React.createElement(CheckBoxOutlineBlankIcon, null);\nvar defaultIndeterminateIcon = /*#__PURE__*/React.createElement(IndeterminateCheckBoxIcon, null);\nvar Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {\n var _props$checkedIcon = props.checkedIcon,\n checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$icon = props.icon,\n iconProp = _props$icon === void 0 ? defaultIcon : _props$icon,\n _props$indeterminate = props.indeterminate,\n indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,\n _props$indeterminateI = props.indeterminateIcon,\n indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI,\n inputProps = props.inputProps,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"checkedIcon\", \"classes\", \"color\", \"icon\", \"indeterminate\", \"indeterminateIcon\", \"inputProps\", \"size\"]);\n\n var icon = indeterminate ? indeterminateIconProp : iconProp;\n var indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;\n return /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n classes: {\n root: clsx(classes.root, classes[\"color\".concat(capitalize(color))], indeterminate && classes.indeterminate),\n checked: classes.checked,\n disabled: classes.disabled\n },\n color: color,\n inputProps: _extends({\n 'data-indeterminate': indeterminate\n }, inputProps),\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: icon.props.fontSize === undefined && size === \"small\" ? size : icon.props.fontSize\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(indeterminateIcon, {\n fontSize: indeterminateIcon.props.fontSize === undefined && size === \"small\" ? size : indeterminateIcon.props.fontSize\n }),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Checkbox.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the checkbox will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * If `true`, the component appears indeterminate.\n * This does not set the native input element to indeterminate due\n * to inconsistent behavior across browsers.\n * However, we set a `data-indeterminate` attribute on the input.\n */\n indeterminate: PropTypes.bool,\n\n /**\n * The icon to display when the component is indeterminate.\n */\n indeterminateIcon: PropTypes.node,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the checkbox.\n * `small` is equivalent to the dense checkbox styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCheckbox'\n})(Checkbox);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport { useFormControl } from '../FormControl';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n WebkitTapHighlightColor: 'transparent',\n marginLeft: -11,\n marginRight: 16,\n // used for row presentation of radio/checkbox\n '&$disabled': {\n cursor: 'default'\n }\n },\n\n /* Styles applied to the root element if `labelPlacement=\"start\"`. */\n labelPlacementStart: {\n flexDirection: 'row-reverse',\n marginLeft: 16,\n // used for row presentation of radio/checkbox\n marginRight: -11\n },\n\n /* Styles applied to the root element if `labelPlacement=\"top\"`. */\n labelPlacementTop: {\n flexDirection: 'column-reverse',\n marginLeft: 16\n },\n\n /* Styles applied to the root element if `labelPlacement=\"bottom\"`. */\n labelPlacementBottom: {\n flexDirection: 'column',\n marginLeft: 16\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the label's Typography component. */\n label: {\n '&$disabled': {\n color: theme.palette.text.disabled\n }\n }\n };\n};\n/**\n * Drop in replacement of the `Radio`, `Switch` and `Checkbox` component.\n * Use this component if you want to display an extra label.\n */\n\nvar FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(props, ref) {\n var checked = props.checked,\n classes = props.classes,\n className = props.className,\n control = props.control,\n disabledProp = props.disabled,\n inputRef = props.inputRef,\n label = props.label,\n _props$labelPlacement = props.labelPlacement,\n labelPlacement = _props$labelPlacement === void 0 ? 'end' : _props$labelPlacement,\n name = props.name,\n onChange = props.onChange,\n value = props.value,\n other = _objectWithoutProperties(props, [\"checked\", \"classes\", \"className\", \"control\", \"disabled\", \"inputRef\", \"label\", \"labelPlacement\", \"name\", \"onChange\", \"value\"]);\n\n var muiFormControl = useFormControl();\n var disabled = disabledProp;\n\n if (typeof disabled === 'undefined' && typeof control.props.disabled !== 'undefined') {\n disabled = control.props.disabled;\n }\n\n if (typeof disabled === 'undefined' && muiFormControl) {\n disabled = muiFormControl.disabled;\n }\n\n var controlProps = {\n disabled: disabled\n };\n ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(function (key) {\n if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') {\n controlProps[key] = props[key];\n }\n });\n return /*#__PURE__*/React.createElement(\"label\", _extends({\n className: clsx(classes.root, className, labelPlacement !== 'end' && classes[\"labelPlacement\".concat(capitalize(labelPlacement))], disabled && classes.disabled),\n ref: ref\n }, other), /*#__PURE__*/React.cloneElement(control, controlProps), /*#__PURE__*/React.createElement(Typography, {\n component: \"span\",\n className: clsx(classes.label, disabled && classes.disabled)\n }, label));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControlLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component appears selected.\n */\n checked: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * A control element. For instance, it can be be a `Radio`, a `Switch` or a `Checkbox`.\n */\n control: PropTypes.element.isRequired,\n\n /**\n * If `true`, the control will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * The text to be used in an enclosing label element.\n */\n label: PropTypes.node,\n\n /**\n * The position of the label.\n */\n labelPlacement: PropTypes.oneOf(['bottom', 'end', 'start', 'top']),\n\n /**\n * @ignore\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormControlLabel'\n})(FormControlLabel);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n right: 16,\n top: '50%',\n transform: 'translateY(-50%)'\n }\n};\n/**\n * Must be used as the last child of ListItem to function properly.\n */\n\nvar ListItemSecondaryAction = /*#__PURE__*/React.forwardRef(function ListItemSecondaryAction(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemSecondaryAction.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally an `IconButton` or selection control.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nListItemSecondaryAction.muiName = 'ListItemSecondaryAction';\nexport default withStyles(styles, {\n name: 'MuiListItemSecondaryAction'\n})(ListItemSecondaryAction);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n lineHeight: '48px',\n listStyle: 'none',\n color: theme.palette.text.secondary,\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(14)\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the inner `component` element if `disableGutters={false}`. */\n gutters: {\n paddingLeft: 16,\n paddingRight: 16\n },\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 72\n },\n\n /* Styles applied to the root element if `disableSticky={false}`. */\n sticky: {\n position: 'sticky',\n top: 0,\n zIndex: 1,\n backgroundColor: 'inherit'\n }\n };\n};\nvar ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$disableSticky = props.disableSticky,\n disableSticky = _props$disableSticky === void 0 ? false : _props$disableSticky,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"disableGutters\", \"disableSticky\", \"inset\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, color !== 'default' && classes[\"color\".concat(capitalize(color))], inset && classes.inset, !disableSticky && classes.sticky, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListSubheader.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'inherit']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the List Subheader will not have gutters.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader will not stick to the top during scroll.\n */\n disableSticky: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader will be indented.\n */\n inset: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListSubheader'\n})(ListSubheader);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport useControlled from '../utils/useControlled';\nimport useFormControl from '../FormControl/useFormControl';\nimport withStyles from '../styles/withStyles';\nimport IconButton from '../IconButton';\nexport var styles = {\n root: {\n padding: 9\n },\n checked: {},\n disabled: {},\n input: {\n cursor: 'inherit',\n position: 'absolute',\n opacity: 0,\n width: '100%',\n height: '100%',\n top: 0,\n left: 0,\n margin: 0,\n padding: 0,\n zIndex: 1\n }\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref) {\n var autoFocus = props.autoFocus,\n checkedProp = props.checked,\n checkedIcon = props.checkedIcon,\n classes = props.classes,\n className = props.className,\n defaultChecked = props.defaultChecked,\n disabledProp = props.disabled,\n icon = props.icon,\n id = props.id,\n inputProps = props.inputProps,\n inputRef = props.inputRef,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onFocus = props.onFocus,\n readOnly = props.readOnly,\n required = props.required,\n tabIndex = props.tabIndex,\n type = props.type,\n value = props.value,\n other = _objectWithoutProperties(props, [\"autoFocus\", \"checked\", \"checkedIcon\", \"classes\", \"className\", \"defaultChecked\", \"disabled\", \"icon\", \"id\", \"inputProps\", \"inputRef\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"readOnly\", \"required\", \"tabIndex\", \"type\", \"value\"]);\n\n var _useControlled = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'SwitchBase',\n state: 'checked'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n checked = _useControlled2[0],\n setCheckedState = _useControlled2[1];\n\n var muiFormControl = useFormControl();\n\n var handleFocus = function handleFocus(event) {\n if (onFocus) {\n onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n }\n };\n\n var handleInputChange = function handleInputChange(event) {\n var newChecked = event.target.checked;\n setCheckedState(newChecked);\n\n if (onChange) {\n // TODO v5: remove the second argument.\n onChange(event, newChecked);\n }\n };\n\n var disabled = disabledProp;\n\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n\n var hasLabelFor = type === 'checkbox' || type === 'radio';\n return /*#__PURE__*/React.createElement(IconButton, _extends({\n component: \"span\",\n className: clsx(classes.root, className, checked && classes.checked, disabled && classes.disabled),\n disabled: disabled,\n tabIndex: null,\n role: undefined,\n onFocus: handleFocus,\n onBlur: handleBlur,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"input\", _extends({\n autoFocus: autoFocus,\n checked: checkedProp,\n defaultChecked: defaultChecked,\n className: classes.input,\n disabled: disabled,\n id: hasLabelFor && id,\n name: name,\n onChange: handleInputChange,\n readOnly: readOnly,\n ref: inputRef,\n required: required,\n tabIndex: tabIndex,\n type: type,\n value: value\n }, inputProps)), checked ? checkedIcon : icon);\n}); // NB: If changed, please update Checkbox, Switch and Radio\n// so that the API documentation is updated.\n\nprocess.env.NODE_ENV !== \"production\" ? SwitchBase.propTypes = {\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node.isRequired,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /*\n * @ignore\n */\n name: PropTypes.string,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * The input component prop `type`.\n */\n type: PropTypes.string.isRequired,\n\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateSwitchBase'\n})(SwitchBase);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');\n\nexports.default = _default;","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (key === '_owner' && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner.\n // _owner contains circular references\n // and is not needed when comparing the actual elements (and not their owners)\n continue;\n }\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n"],"names":["c","e","Array","RegExp","Object"],"mappings":"2NAMA,MAAe,QAA4B,eAAmB,CAAC,OAAQ,CACrE,EAAG,4FACL,GAAI,wBCFJ,EAAe,QAA4B,eAAmB,CAAC,OAAQ,CACrE,EAAG,qIACL,GAAI,Y,aCFJ,MAAe,QAA4B,eAAmB,CAAC,OAAQ,CACrE,E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AC5E,GAAI,EAAE,QAAQ,GAAKA,OAAO,SAAS,CAAC,QAAQ,CAAE,OAAO,EAAE,QAAQ,KAAO,EAAE,QAAQ,GAIhF,GAAI,AADJ,GAAS,AADT,GAAOA,OAAO,IAAI,CAAC,EAAC,EACN,MAAM,AAAD,IACJA,OAAO,IAAI,CAAC,GAAG,MAAM,CAAE,MAAO,GAE7C,IAAK,EAAI,EAAQ,AAAQ,GAAR,KACf,GAAI,CAACA,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAG,CAAI,CAAC,EAAE,EAAG,MAAO,GAEhE,IAAK,EAAI,EAAQ,AAAQ,GAAR,KAAY,CAC3B,IAvBE,EAAQ,EAAG,EAuBT,EAAM,CAAI,CAAC,EAAE,CAEjB,GAAI,CAAQ,WAAR,IAAoB,EAAE,QAAQ,AAAD,GAO7B,CAACH,EAAM,CAAC,CAAC,EAAI,CAAE,CAAC,CAAC,EAAI,EAAG,MAAO,EACrC,CAEA,MAAO,EACT,CAGA,OAAO,GAAI,GAAK,GAAI,CACtB,C"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["7632"],{6659(e,t,r){r.d(t,{DependencyGraph:()=>z});var n=r(31085),a=r(14041),l=r(37238),s=r(53373),i=r.n(s),d=r(45250),o=r(68510),c=r(67566),u=r(41809),h=r(57586),f=r.n(h),m=r(12784),g=r.n(m),x=r(6033),p=r(22249),k=r(58837);let w=(0,k.A)(e=>({node:{fill:e.palette.primary.light,stroke:e.palette.primary.light},text:{fill:e.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function b({node:{id:e}}){let t=w(),[r,l]=(0,a.useState)(0),[s,i]=(0,a.useState)(0),d=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if(d.current){let{height:e,width:t}=d.current.getBBox();e=Math.round(e),t=Math.round(t),(e!==s||t!==r)&&(l(t),i(e))}},[r,s]);let o=r+20,c=s+20;return(0,n.jsxs)("g",{children:[(0,n.jsx)("rect",{className:t.node,width:o,height:c,rx:10}),(0,n.jsx)("text",{ref:d,className:t.text,y:c/2,x:o/2,textAnchor:"middle",alignmentBaseline:"middle",children:e})]})}let y=(0,p.default)(e=>({node:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),j=e=>(0,n.jsx)(b,{...e});function v({render:e=j,setNode:t,node:r}){let{width:l,height:s,x:i=0,y:d=0}=r,o=y(),c=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{if(c.current){let{height:e,width:n}=c.current.getBBox();e=Math.round(e),n=Math.round(n),(e!==s||n!==l)&&t(r.id,{...r,height:e,width:n})}},[r,l,s,t]),(0,n.jsx)("g",{ref:c,"data-testid":"node",className:o.node,transform:`translate(${i-l/2},${d-s/2})`,children:e({node:r})})}var M=r(1121),B=r(12895),E=r(20644),N=r.n(E);let $="arrow-marker",S=(0,p.default)(e=>({text:{fill:e.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function A({edge:{label:e}}){let t=S();return(0,n.jsx)("text",{className:t.text,textAnchor:"middle",children:e})}let D=(0,p.default)(e=>({path:{strokeWidth:1.3,stroke:e.palette.textSubtle,fill:"none",transition:`${e.transitions.duration.shortest}ms`},label:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),C=e=>(0,n.jsx)(A,{...e});function G({render:e=C,setEdge:t,id:r,edge:l,curve:s,showArrowHeads:i}){let{x:d=0,y:o=0,width:c,height:u,points:h}=l,f=D(),m=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if(m.current){let{height:e,width:n}=m.current.getBBox();e=Math.round(e),n=Math.round(n),(e!==u||n!==c)&&t(r,{...l,height:e,width:n})}},[l,u,c,t,r]);let g="",x=(0,a.useMemo)(()=>M.A().x(e=>e.x).y(e=>e.y).curve(B[s]),[s]);return h&&(g=x(h.filter(e=>N()(e.x)&&N()(e.y)))||""),(0,n.jsxs)(n.Fragment,{children:[g&&(0,n.jsx)("path",{"data-testid":"edge",className:f.path,markerEnd:i?`url(#${$})`:void 0,d:g}),l.label?(0,n.jsx)("g",{ref:m,"data-testid":"label",className:f.label,transform:`translate(${d},${o})`,children:e({edge:l})}):null]})}var _=r(29365),R=r(25828),L=r(63988),T=r(14112),H=r(71677),O=r(89595),W=r(89332);let I=(0,k.A)(e=>({fullscreenButton:{position:"absolute",right:0},root:{overflow:"hidden",minHeight:"100%",minWidth:"100%"},fixedHeight:{maxHeight:"100%"},fullscreen:{backgroundColor:e.palette.background.paper}})),P="workspace",X="dependency-graph";function z(e){let{edges:t,nodes:r,renderNode:s,direction:h=x.D.Direction.TOP_BOTTOM,align:m,nodeMargin:p=50,edgeMargin:k=10,rankMargin:w=50,paddingX:b=0,paddingY:y=0,acyclicer:j,ranker:M=x.D.Ranker.NETWORK_SIMPLEX,labelPosition:B=x.D.LabelPosition.RIGHT,labelOffset:E=10,edgeRanks:N=1,edgeWeight:S=1,renderEdge:A,renderLabel:D,defs:C,zoom:z="enabled",curve:q="curveMonotoneX",showArrowHeads:F=!1,fit:K="grow",allowFullscreen:U=!0,...V}=e,Y=(0,u.default)(),[J,Q]=(0,a.useState)(100),[Z,ee]=(0,a.useState)(100),et=(0,T.V)(),er=I(),{t:en}=(0,O.i)(W.O),ea=(0,a.useRef)(new(f()).graphlib.Graph),[el,es]=(0,a.useState)(ea.current.graph()?.width||0),[ei,ed]=(0,a.useState)(ea.current.graph()?.height||0),[eo,ec]=(0,a.useState)([]),[eu,eh]=(0,a.useState)([]),ef=Math.max(el,J),em=Math.max(ei,Z),[eg]=(0,l.A)(),ex=(0,d.once)(eg),ep="grow"!==K||et.active?"100%":em,ek=(0,a.useMemo)(()=>g()(e=>{if(!e)return;ex(e);let t=e.querySelector(`svg#${X}`);if(!t)return;let r=c.A(t),n=c.A(t.getElementById(P));function a(){r.call(o.s_().scaleExtent([1,1/0]).on("zoom",e=>{e.transform.x=Math.min(0,Math.max(e.transform.x,ef-ef*e.transform.k)),e.transform.y=Math.min(0,Math.max(e.transform.y,em-em*e.transform.k)),n.attr("transform",e.transform)}))}"enabled"===z?a():"enable-on-click"===z&&r.on("click",()=>a());let{width:l,height:s}=e.getBoundingClientRect();J!==l&&l<=ef&&Q(l),Z!==s&&s<=em&&ee(s)},100),[ex,Z,J,ef,em,z]),ew=(0,a.useCallback)(()=>{let e=ea.current.nodes(),n=ea.current.edges();e.forEach(e=>{r.some(t=>t.id===e)||ea.current.removeNode(e)}),n.forEach(e=>{t.some(t=>t.from===e.v&&t.to===e.w)||ea.current.removeEdge(e.v,e.w)}),r.forEach(e=>{let t=ea.current.nodes().find(t=>e.id===t);if(t&&ea.current.node(t)){let{width:r,height:n,x:a,y:l}=ea.current.node(t);ea.current.setNode(t,{...e,width:r,height:n,x:a,y:l})}else ea.current.setNode(e.id,{...e,width:0,height:0})}),t.forEach(e=>{ea.current.setEdge(e.from,e.to,{...e,label:e.label,width:0,height:0,labelpos:B,labeloffset:E,weight:S,minlen:N})})},[t,r,B,E,S,N]),eb=(0,a.useMemo)(()=>g()(()=>{f().layout(ea.current);let{height:e,width:t}=ea.current.graph(),r=Math.max(0,e||0);es(Math.max(0,t||0)),ed(r),ec(ea.current.nodes()),eh(ea.current.edges())},250,{leading:!0}),[]);(0,a.useEffect)(()=>(ea.current.setGraph({rankdir:h,align:m,nodesep:p,edgesep:k,ranksep:w,marginx:b,marginy:y,acyclicer:j,ranker:M}),ew(),eb(),eb.cancel),[j,m,h,k,b,y,p,w,M,ew,eb]);let ey=(0,a.useCallback)((e,t)=>(ea.current.setNode(e,t),eb(),ea.current),[eb]),ej=(0,a.useCallback)((e,t)=>(ea.current.setEdge(e,t),eb(),ea.current),[eb]);return(0,n.jsxs)(T.m,{handle:et,className:i()(et.active?er.fullscreen:er.root),children:[U&&(0,n.jsx)(H.Ay,{title:en("dependencyGraph.fullscreenTooltip"),children:(0,n.jsx)(_.A,{className:er.fullscreenButton,onClick:et.active?et.exit:et.enter,children:et.active?(0,n.jsx)(L.default,{}):(0,n.jsx)(R.default,{})})}),(0,n.jsx)("div",{ref:ek,style:{width:"100%",height:"100%"},children:(0,n.jsxs)("svg",{...V,width:"100%",height:ep,viewBox:`0 0 ${ef} ${em}`,id:X,children:[(0,n.jsxs)("defs",{children:[(0,n.jsx)("marker",{id:$,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth",children:(0,n.jsx)("path",{fill:Y.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),C]}),(0,n.jsx)("g",{id:P,children:(0,n.jsxs)("svg",{width:el,height:ei,y:em/2-ei/2,x:ef/2-el/2,viewBox:`0 0 ${el} ${ei}`,children:[eu.map(e=>{let t=ea.current.edge(e);return t?A?A({edge:t,id:e}):(0,n.jsx)(G,{id:e,setEdge:ej,render:D,edge:t,curve:q,showArrowHeads:F},`${e.v}-${e.w}`):null}),eo.map(e=>{let t=ea.current.node(e);return t?(0,n.jsx)(v,{setNode:ey,render:s,node:t},e):null})]})})]})})]})}}}]);
|
|
2
|
-
//# sourceMappingURL=7632.d2fd37a3ce88.chunk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/7632.d2fd37a3ce88.chunk.js","sources":["webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/DefaultNode.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/Node.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/constants.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/DefaultLabel.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/Edge.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/DependencyGraphContent.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState, useRef, useLayoutEffect } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { DependencyGraphTypes as Types } from './types';\n\n/** @public */\nexport type DependencyGraphDefaultNodeClassKey = 'node' | 'text';\n\nconst useStyles = makeStyles(\n theme => ({\n node: {\n fill: theme.palette.primary.light,\n stroke: theme.palette.primary.light,\n },\n text: {\n fill: theme.palette.primary.contrastText,\n },\n }),\n { name: 'BackstageDependencyGraphDefaultNode' },\n);\n\n/** @public */\nexport function DefaultNode({ node: { id } }: Types.RenderNodeProps) {\n const classes = useStyles();\n const [width, setWidth] = useState(0);\n const [height, setHeight] = useState(0);\n const idRef = useRef<SVGTextElement | null>(null);\n\n useLayoutEffect(() => {\n // set the width to the length of the ID\n if (idRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n idRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setWidth(renderedWidth);\n setHeight(renderedHeight);\n }\n }\n }, [width, height]);\n\n const padding = 10;\n const paddedWidth = width + padding * 2;\n const paddedHeight = height + padding * 2;\n\n return (\n <g>\n <rect\n className={classes.node}\n width={paddedWidth}\n height={paddedHeight}\n rx={10}\n />\n <text\n ref={idRef}\n className={classes.text}\n y={paddedHeight / 2}\n x={paddedWidth / 2}\n textAnchor=\"middle\"\n alignmentBaseline=\"middle\"\n >\n {id}\n </text>\n </g>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useRef, useLayoutEffect } from 'react';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport { DefaultNode } from './DefaultNode';\nimport { DependencyGraphTypes as Types } from './types';\nimport { NODE_TEST_ID } from './constants';\nimport dagre from '@dagrejs/dagre';\n\n/** @public */\nexport type DependencyGraphNodeClassKey = 'node';\n\nconst useStyles = makeStyles(\n theme => ({\n node: {\n transition: `${theme.transitions.duration.shortest}ms`,\n },\n }),\n { name: 'BackstageDependencyGraphNode' },\n);\n\nexport type GraphNode<T> = dagre.Node<Types.DependencyNode<T>>;\n\nexport type NodeComponentProps<T> = {\n node: GraphNode<T>;\n render?: Types.RenderNodeFunction<T>;\n setNode: dagre.graphlib.Graph['setNode'];\n};\n\nconst renderDefault = (props: Types.RenderNodeProps) => (\n <DefaultNode {...props} />\n);\n\nexport function Node<T>({\n render = renderDefault,\n setNode,\n node,\n}: NodeComponentProps<T>) {\n const { width, height, x = 0, y = 0 } = node;\n const nodeProps: Types.DependencyNode<T> = node;\n const classes = useStyles();\n const nodeRef = useRef<SVGGElement | null>(null);\n\n useLayoutEffect(() => {\n // set the node width to the actual rendered width to properly layout graph\n if (nodeRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n nodeRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setNode(node.id, {\n ...node,\n height: renderedHeight,\n width: renderedWidth,\n });\n }\n }\n }, [node, width, height, setNode]);\n\n return (\n <g\n ref={nodeRef}\n data-testid={NODE_TEST_ID}\n className={classes.node}\n transform={`translate(${x - width / 2},${y - height / 2})`}\n >\n {render({ node: nodeProps })}\n </g>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const ARROW_MARKER_ID = 'arrow-marker';\n\nexport const NODE_TEST_ID = 'node';\nexport const EDGE_TEST_ID = 'edge';\nexport const LABEL_TEST_ID = 'label';\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport { DependencyGraphTypes as Types } from './types';\n\n/** @public */\nexport type DependencyGraphDefaultLabelClassKey = 'text';\n\nconst useStyles = makeStyles(\n theme => ({\n text: {\n fill: theme.palette.textContrast,\n },\n }),\n { name: 'BackstageDependencyGraphDefaultLabel' },\n);\n\n/** @public */\nexport function DefaultLabel({ edge: { label } }: Types.RenderLabelProps) {\n const classes = useStyles();\n return (\n <text className={classes.text} textAnchor=\"middle\">\n {label}\n </text>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useRef, useLayoutEffect, useMemo } from 'react';\nimport * as d3Shape from 'd3-shape';\nimport isFinite from 'lodash/isFinite';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport { DependencyGraphTypes as Types } from './types';\nimport { ARROW_MARKER_ID, EDGE_TEST_ID, LABEL_TEST_ID } from './constants';\nimport { DefaultLabel } from './DefaultLabel';\nimport dagre from '@dagrejs/dagre';\n\n/* Based on: https://github.com/dagrejs/dagre/wiki#configuring-the-layout */\nexport type EdgeProperties = {\n label?: string;\n width?: number;\n height?: number;\n labeloffset?: number;\n labelpos?: Types.LabelPosition;\n minlen?: number;\n weight?: number;\n};\nexport type GraphEdge<T> = Types.DependencyEdge<T> &\n dagre.GraphEdge &\n EdgeProperties;\n\n/** @public */\nexport type DependencyGraphEdgeClassKey = 'path' | 'label';\n\nconst useStyles = makeStyles(\n theme => ({\n path: {\n strokeWidth: 1.3,\n stroke: theme.palette.textSubtle,\n fill: 'none',\n transition: `${theme.transitions.duration.shortest}ms`,\n },\n label: {\n transition: `${theme.transitions.duration.shortest}ms`,\n },\n }),\n { name: 'BackstageDependencyGraphEdge' },\n);\n\ntype EdgePoint = dagre.GraphEdge['points'][0];\n\n/** @public */\nexport type EdgeComponentProps<T = unknown> = {\n id: dagre.Edge;\n edge: GraphEdge<T>;\n render?: Types.RenderLabelFunction<T>;\n setEdge: (\n id: dagre.Edge,\n edge: Types.DependencyEdge<T>,\n ) => dagre.graphlib.Graph<{}>;\n curve: 'curveStepBefore' | 'curveMonotoneX';\n showArrowHeads?: boolean;\n};\n\nconst renderDefault = (props: Types.RenderLabelProps<unknown>) => (\n <DefaultLabel {...props} />\n);\n\nexport function Edge<EdgeData>({\n render = renderDefault,\n setEdge,\n id,\n edge,\n curve,\n showArrowHeads,\n}: EdgeComponentProps<EdgeData>) {\n const { x = 0, y = 0, width, height, points } = edge;\n const labelProps: Types.DependencyEdge<EdgeData> = edge;\n const classes = useStyles();\n\n const labelRef = useRef<SVGGElement>(null);\n\n useLayoutEffect(() => {\n // set the label width to the actual rendered width to properly layout graph\n if (labelRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n labelRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setEdge(id, {\n ...edge,\n height: renderedHeight,\n width: renderedWidth,\n });\n }\n }\n }, [edge, height, width, setEdge, id]);\n\n let path: string = '';\n\n const createPath = useMemo(\n () =>\n d3Shape\n .line<EdgePoint>()\n .x(d => d.x)\n .y(d => d.y)\n .curve(d3Shape[curve]),\n [curve],\n );\n\n if (points) {\n const finitePoints = points.filter(\n (point: EdgePoint) => isFinite(point.x) && isFinite(point.y),\n );\n path = createPath(finitePoints) || '';\n }\n\n return (\n <>\n {path && (\n <path\n data-testid={EDGE_TEST_ID}\n className={classes.path}\n markerEnd={showArrowHeads ? `url(#${ARROW_MARKER_ID})` : undefined}\n d={path}\n />\n )}\n {labelProps.label ? (\n <g\n ref={labelRef}\n data-testid={LABEL_TEST_ID}\n className={classes.label}\n transform={`translate(${x},${y})`}\n >\n {render({ edge: labelProps })}\n </g>\n ) : null}\n </>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n SVGProps,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport useMeasure from 'react-use/esm/useMeasure';\nimport classNames from 'classnames';\nimport { once } from 'lodash';\nimport * as d3Zoom from 'd3-zoom';\nimport * as d3Selection from 'd3-selection';\nimport useTheme from '@material-ui/core/styles/useTheme';\nimport dagre from '@dagrejs/dagre';\nimport debounce from 'lodash/debounce';\nimport { DependencyGraphTypes as Types } from './types';\nimport { Node } from './Node';\nimport { Edge, GraphEdge } from './Edge';\nimport { ARROW_MARKER_ID } from './constants';\nimport IconButton from '@material-ui/core/IconButton';\nimport FullscreenIcon from '@material-ui/icons/Fullscreen';\nimport FullscreenExitIcon from '@material-ui/icons/FullscreenExit';\nimport { FullScreen, useFullScreenHandle } from 'react-full-screen';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { coreComponentsTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles((theme: Theme) => ({\n fullscreenButton: {\n position: 'absolute',\n right: 0,\n },\n root: {\n overflow: 'hidden',\n minHeight: '100%',\n minWidth: '100%',\n },\n fixedHeight: {\n maxHeight: '100%',\n },\n fullscreen: {\n backgroundColor: theme.palette.background.paper,\n },\n}));\n\n/**\n * Properties of {@link DependencyGraph}\n *\n * @public\n * @remarks\n * `<NodeData>` and `<EdgeData>` are useful when rendering custom or edge labels\n */\nexport interface DependencyGraphProps<NodeData, EdgeData>\n extends SVGProps<SVGSVGElement> {\n /**\n * Edges of graph\n */\n edges: Types.DependencyEdge<EdgeData>[];\n /**\n * Nodes of Graph\n */\n nodes: Types.DependencyNode<NodeData>[];\n /**\n * Graph {@link DependencyGraphTypes.(Direction:namespace) | direction}\n *\n * @remarks\n *\n * Default: `DependencyGraphTypes.Direction.TOP_BOTTOM`\n */\n direction?: Types.Direction;\n /**\n * Node {@link DependencyGraphTypes.(Alignment:namespace) | alignment}\n */\n align?: Types.Alignment;\n /**\n * Margin between nodes on each rank\n *\n * @remarks\n *\n * Default: 50\n */\n nodeMargin?: number;\n /**\n * Margin between edges\n *\n * @remarks\n *\n * Default: 10\n */\n edgeMargin?: number;\n /**\n * Margin between each rank\n *\n * @remarks\n *\n * Default: 50\n */\n rankMargin?: number;\n /**\n * Margin on left and right of whole graph\n *\n * @remarks\n *\n * Default: 0\n */\n paddingX?: number;\n /**\n * Margin on top and bottom of whole graph\n *\n * @remarks\n *\n * Default: 0\n */\n paddingY?: number;\n /**\n * Heuristic used to find set of edges that will make graph acyclic\n */\n acyclicer?: 'greedy';\n /**\n * {@link DependencyGraphTypes.(Ranker:namespace) | Algorithm} used to rank nodes\n *\n * @remarks\n *\n * Default: `DependencyGraphTypes.Ranker.NETWORK_SIMPLEX`\n */\n ranker?: Types.Ranker;\n /**\n * {@link DependencyGraphTypes.(LabelPosition:namespace) | Position} of label in relation to edge\n *\n * @remarks\n *\n * Default: `DependencyGraphTypes.LabelPosition.RIGHT`\n */\n labelPosition?: Types.LabelPosition;\n /**\n * How much to move label away from edge\n *\n * @remarks\n *\n * Applies only when {@link DependencyGraphProps.labelPosition} is `DependencyGraphTypes.LabelPosition.LEFT` or\n * `DependencyGraphTypes.LabelPosition.RIGHT`\n */\n labelOffset?: number;\n /**\n * Minimum number of ranks to keep between connected nodes\n */\n edgeRanks?: number;\n /**\n * Weight applied to edges in graph\n */\n edgeWeight?: number;\n /**\n * Custom edge rendering component\n */\n renderEdge?: Types.RenderEdgeFunction<EdgeData>;\n /**\n * Custom node rendering component\n */\n renderNode?: Types.RenderNodeFunction<NodeData>;\n /**\n * Custom label rendering component\n */\n renderLabel?: Types.RenderLabelFunction<EdgeData>;\n /**\n * {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs | Defs} shared by rendered SVG to be used by\n * {@link DependencyGraphProps.renderNode} and/or {@link DependencyGraphProps.renderLabel}\n */\n defs?: JSX.Element | JSX.Element[];\n /**\n * Controls zoom behavior of graph\n *\n * @remarks\n *\n * Default: `enabled`\n */\n zoom?: 'enabled' | 'disabled' | 'enable-on-click';\n /**\n * A factory for curve generators addressing both lines and areas.\n *\n * @remarks\n *\n * Default: 'curveMonotoneX'\n */\n curve?: 'curveStepBefore' | 'curveMonotoneX';\n /**\n * Controls if the arrow heads should be rendered or not.\n *\n * Default: false\n */\n showArrowHeads?: boolean;\n /**\n * Controls if the graph should be contained or grow\n *\n * @remarks\n *\n * Default: 'grow'\n */\n fit?: 'grow' | 'contain';\n /**\n * Controls if user can toggle fullscreen mode\n *\n * @remarks\n *\n * Default: true\n */\n allowFullscreen?: boolean;\n}\n\nconst WORKSPACE_ID = 'workspace';\nconst DEPENDENCY_GRAPH_SVG = 'dependency-graph';\n\n/**\n * Graph component used to visualize relations between entities\n *\n * @public\n */\nexport function DependencyGraph<NodeData, EdgeData>(\n props: DependencyGraphProps<NodeData, EdgeData>,\n) {\n const {\n edges,\n nodes,\n renderNode,\n direction = Types.Direction.TOP_BOTTOM,\n align,\n nodeMargin = 50,\n edgeMargin = 10,\n rankMargin = 50,\n paddingX = 0,\n paddingY = 0,\n acyclicer,\n ranker = Types.Ranker.NETWORK_SIMPLEX,\n labelPosition = Types.LabelPosition.RIGHT,\n labelOffset = 10,\n edgeRanks = 1,\n edgeWeight = 1,\n renderEdge,\n renderLabel,\n defs,\n zoom = 'enabled',\n curve = 'curveMonotoneX',\n showArrowHeads = false,\n fit = 'grow',\n allowFullscreen = true,\n ...svgProps\n } = props;\n const theme = useTheme();\n const [containerWidth, setContainerWidth] = useState<number>(100);\n const [containerHeight, setContainerHeight] = useState<number>(100);\n const fullScreenHandle = useFullScreenHandle();\n const styles = useStyles();\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n\n const graph = useRef<dagre.graphlib.Graph<Types.DependencyNode<NodeData>>>(\n new dagre.graphlib.Graph(),\n );\n const [graphWidth, setGraphWidth] = useState<number>(\n graph.current.graph()?.width || 0,\n );\n const [graphHeight, setGraphHeight] = useState<number>(\n graph.current.graph()?.height || 0,\n );\n const [graphNodes, setGraphNodes] = useState<string[]>([]);\n const [graphEdges, setGraphEdges] = useState<dagre.Edge[]>([]);\n\n const maxWidth = Math.max(graphWidth, containerWidth);\n const maxHeight = Math.max(graphHeight, containerHeight);\n\n const [_measureRef] = useMeasure();\n const measureRef = once(_measureRef);\n\n const scalableHeight =\n fit === 'grow' && !fullScreenHandle.active ? maxHeight : '100%';\n\n const containerRef = useMemo(\n () =>\n debounce((root: HTMLDivElement) => {\n if (!root) {\n return;\n }\n measureRef(root);\n\n // Set up zooming + panning\n const node: SVGSVGElement = root.querySelector(\n `svg#${DEPENDENCY_GRAPH_SVG}`,\n ) as SVGSVGElement;\n if (!node) {\n return;\n }\n const container = d3Selection.select<SVGSVGElement, null>(node);\n const workspace = d3Selection.select(node.getElementById(WORKSPACE_ID));\n\n function enableZoom() {\n container.call(\n d3Zoom\n .zoom<SVGSVGElement, null>()\n .scaleExtent([1, Infinity])\n .on('zoom', event => {\n event.transform.x = Math.min(\n 0,\n Math.max(\n event.transform.x,\n maxWidth - maxWidth * event.transform.k,\n ),\n );\n event.transform.y = Math.min(\n 0,\n Math.max(\n event.transform.y,\n maxHeight - maxHeight * event.transform.k,\n ),\n );\n workspace.attr('transform', event.transform);\n }),\n );\n }\n\n if (zoom === 'enabled') {\n enableZoom();\n } else if (zoom === 'enable-on-click') {\n container.on('click', () => enableZoom());\n }\n\n const { width: newContainerWidth, height: newContainerHeight } =\n root.getBoundingClientRect();\n if (\n containerWidth !== newContainerWidth &&\n newContainerWidth <= maxWidth\n ) {\n setContainerWidth(newContainerWidth);\n }\n if (\n containerHeight !== newContainerHeight &&\n newContainerHeight <= maxHeight\n ) {\n setContainerHeight(newContainerHeight);\n }\n }, 100),\n [measureRef, containerHeight, containerWidth, maxWidth, maxHeight, zoom],\n );\n\n const setNodesAndEdges = useCallback(() => {\n // Cleaning up lingering nodes and edges\n const currentGraphNodes = graph.current.nodes();\n const currentGraphEdges = graph.current.edges();\n\n currentGraphNodes.forEach(nodeId => {\n const remainingNode = nodes.some(node => node.id === nodeId);\n if (!remainingNode) {\n graph.current.removeNode(nodeId);\n }\n });\n\n currentGraphEdges.forEach(e => {\n const remainingEdge = edges.some(\n edge => edge.from === e.v && edge.to === e.w,\n );\n if (!remainingEdge) {\n graph.current.removeEdge(e.v, e.w);\n }\n });\n\n // Adding/updating nodes and edges\n nodes.forEach(node => {\n const existingNode = graph.current\n .nodes()\n .find(nodeId => node.id === nodeId);\n\n if (existingNode && graph.current.node(existingNode)) {\n const { width, height, x, y } = graph.current.node(existingNode);\n graph.current.setNode(existingNode, { ...node, width, height, x, y });\n } else {\n graph.current.setNode(node.id, { ...node, width: 0, height: 0 });\n }\n });\n\n edges.forEach(e => {\n graph.current.setEdge(e.from, e.to, {\n ...e,\n label: e.label,\n width: 0,\n height: 0,\n labelpos: labelPosition,\n labeloffset: labelOffset,\n weight: edgeWeight,\n minlen: edgeRanks,\n });\n });\n }, [edges, nodes, labelPosition, labelOffset, edgeWeight, edgeRanks]);\n\n const updateGraph = useMemo(\n () =>\n debounce(\n () => {\n dagre.layout(graph.current);\n const { height, width } = graph.current.graph();\n const newHeight = Math.max(0, height || 0);\n const newWidth = Math.max(0, width || 0);\n setGraphWidth(newWidth);\n setGraphHeight(newHeight);\n\n setGraphNodes(graph.current.nodes());\n setGraphEdges(graph.current.edges());\n },\n 250,\n { leading: true },\n ),\n [],\n );\n\n useEffect(() => {\n graph.current.setGraph({\n rankdir: direction,\n align,\n nodesep: nodeMargin,\n edgesep: edgeMargin,\n ranksep: rankMargin,\n marginx: paddingX,\n marginy: paddingY,\n acyclicer,\n ranker,\n });\n\n setNodesAndEdges();\n updateGraph();\n\n return updateGraph.cancel;\n }, [\n acyclicer,\n align,\n direction,\n edgeMargin,\n paddingX,\n paddingY,\n nodeMargin,\n rankMargin,\n ranker,\n setNodesAndEdges,\n updateGraph,\n ]);\n\n const setNode = useCallback(\n (id: string, node: Types.DependencyNode<NodeData>) => {\n graph.current.setNode(id, node);\n updateGraph();\n return graph.current;\n },\n [updateGraph],\n );\n\n const setEdge = useCallback(\n (id: dagre.Edge, edge: Types.DependencyEdge<EdgeData>) => {\n graph.current.setEdge(id, edge);\n updateGraph();\n return graph.current;\n },\n [updateGraph],\n );\n\n return (\n <FullScreen\n handle={fullScreenHandle}\n className={classNames(\n fullScreenHandle.active ? styles.fullscreen : styles.root,\n )}\n >\n {allowFullscreen && (\n <Tooltip title={t('dependencyGraph.fullscreenTooltip')}>\n <IconButton\n className={styles.fullscreenButton}\n onClick={\n fullScreenHandle.active\n ? fullScreenHandle.exit\n : fullScreenHandle.enter\n }\n >\n {fullScreenHandle.active ? (\n <FullscreenExitIcon />\n ) : (\n <FullscreenIcon />\n )}\n </IconButton>\n </Tooltip>\n )}\n\n <div ref={containerRef} style={{ width: '100%', height: '100%' }}>\n <svg\n {...svgProps}\n width=\"100%\"\n height={scalableHeight}\n viewBox={`0 0 ${maxWidth} ${maxHeight}`}\n id={DEPENDENCY_GRAPH_SVG}\n >\n <defs>\n <marker\n id={ARROW_MARKER_ID}\n viewBox=\"0 0 24 24\"\n markerWidth=\"14\"\n markerHeight=\"14\"\n refX=\"16\"\n refY=\"12\"\n orient=\"auto\"\n markerUnits=\"strokeWidth\"\n >\n <path\n fill={theme.palette.textSubtle}\n d=\"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z\"\n />\n </marker>\n {defs}\n </defs>\n <g id={WORKSPACE_ID}>\n <svg\n width={graphWidth}\n height={graphHeight}\n y={maxHeight / 2 - graphHeight / 2}\n x={maxWidth / 2 - graphWidth / 2}\n viewBox={`0 0 ${graphWidth} ${graphHeight}`}\n >\n {graphEdges.map(e => {\n const edge = graph.current.edge(e) as GraphEdge<EdgeData>;\n if (!edge) return null;\n if (renderEdge) return renderEdge({ edge, id: e });\n\n return (\n <Edge\n key={`${e.v}-${e.w}`}\n id={e}\n setEdge={setEdge}\n render={renderLabel}\n edge={edge}\n curve={curve}\n showArrowHeads={showArrowHeads}\n />\n );\n })}\n {graphNodes.map((id: string) => {\n const node = graph.current.node(id);\n if (!node) return null;\n return (\n <Node\n key={id}\n setNode={setNode}\n render={renderNode}\n node={node}\n />\n );\n })}\n </svg>\n </g>\n </svg>\n </div>\n </FullScreen>\n );\n}\n"],"names":["useStyles","makeStyles","theme","DefaultNode","id","classes","width","setWidth","useState","height","setHeight","idRef","useRef","useLayoutEffect","renderedHeight","renderedWidth","Math","paddedWidth","padding","paddedHeight","renderDefault","props","Node","render","setNode","node","x","y","nodeRef","NODE_TEST_ID","ARROW_MARKER_ID","DefaultLabel","label","Edge","setEdge","edge","curve","showArrowHeads","points","labelRef","path","createPath","useMemo","d3Shape","d","point","isFinite","EDGE_TEST_ID","undefined","labelProps","LABEL_TEST_ID","WORKSPACE_ID","DEPENDENCY_GRAPH_SVG","DependencyGraph","edges","nodes","renderNode","direction","Types","align","nodeMargin","edgeMargin","rankMargin","paddingX","paddingY","acyclicer","ranker","labelPosition","labelOffset","edgeRanks","edgeWeight","renderEdge","renderLabel","defs","zoom","fit","allowFullscreen","svgProps","useTheme","containerWidth","setContainerWidth","containerHeight","setContainerHeight","fullScreenHandle","useFullScreenHandle","styles","t","useTranslationRef","coreComponentsTranslationRef","graph","dagre","graphWidth","setGraphWidth","graphHeight","setGraphHeight","graphNodes","setGraphNodes","graphEdges","setGraphEdges","maxWidth","maxHeight","_measureRef","useMeasure","measureRef","once","scalableHeight","containerRef","debounce","root","container","d3Selection","workspace","enableZoom","d3Zoom","Infinity","event","newContainerWidth","newContainerHeight","setNodesAndEdges","useCallback","currentGraphNodes","currentGraphEdges","nodeId","e","existingNode","updateGraph","newHeight","useEffect","FullScreen","classNames","Tooltip","IconButton","FullscreenExitIcon","FullscreenIcon"],"mappings":"iVAuBA,IAAMA,EAAYC,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,EAChBC,AAAAA,GAAU,EACR,KAAM,CACJ,KAAMA,EAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CACjC,OAAQA,EAAM,OAAO,CAAC,OAAO,CAAC,KAAK,AACrC,EACA,KAAM,CACJ,KAAMA,EAAM,OAAO,CAAC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