@gravity-ui/dashkit 9.3.1 → 10.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/README.md +1 -1
  2. package/build/cjs/components/DashKit/DashKit.d.ts +2 -2
  3. package/build/cjs/components/DashKit/DashKit.js +2 -2
  4. package/build/cjs/components/DashKit/DashKit.js.map +1 -1
  5. package/build/cjs/components/DashKitView/DashKitView.d.ts +3 -5
  6. package/build/cjs/components/DashKitView/DashKitView.js.map +1 -1
  7. package/build/cjs/components/GridItem/GridItem.d.ts +32 -2
  8. package/build/cjs/components/GridItem/GridItem.js +9 -42
  9. package/build/cjs/components/GridItem/GridItem.js.map +1 -1
  10. package/build/cjs/components/GridLayout/GridLayout.d.ts +55 -65
  11. package/build/cjs/components/GridLayout/GridLayout.js +39 -17
  12. package/build/cjs/components/GridLayout/GridLayout.js.map +1 -1
  13. package/build/cjs/components/GridLayout/ReactGridLayout.d.ts +13 -2
  14. package/build/cjs/components/GridLayout/ReactGridLayout.js +27 -6
  15. package/build/cjs/components/GridLayout/ReactGridLayout.js.map +1 -1
  16. package/build/cjs/components/GridLayout/types.d.ts +59 -0
  17. package/build/cjs/components/GridLayout/types.js +3 -0
  18. package/build/cjs/components/GridLayout/types.js.map +1 -0
  19. package/build/cjs/components/Item/Item.d.ts +17 -72
  20. package/build/cjs/components/Item/Item.js +3 -12
  21. package/build/cjs/components/Item/Item.js.map +1 -1
  22. package/build/cjs/components/Item/types.d.ts +14 -0
  23. package/build/cjs/components/Item/types.js +3 -0
  24. package/build/cjs/components/Item/types.js.map +1 -0
  25. package/build/cjs/components/MobileLayout/MobileLayout.d.ts +7 -7
  26. package/build/cjs/components/MobileLayout/MobileLayout.js.map +1 -1
  27. package/build/cjs/components/OverlayControls/OverlayControls.d.ts +1 -1
  28. package/build/cjs/components/OverlayControls/OverlayControls.js.map +1 -1
  29. package/build/cjs/context/DashKitContext.d.ts +24 -14
  30. package/build/cjs/context/DashKitContext.js.map +1 -1
  31. package/build/cjs/hocs/prepareItem.d.ts +21 -71
  32. package/build/cjs/hocs/prepareItem.js +8 -29
  33. package/build/cjs/hocs/prepareItem.js.map +1 -1
  34. package/build/cjs/hocs/withContext.d.ts +12 -2
  35. package/build/cjs/hocs/withContext.js +35 -14
  36. package/build/cjs/hocs/withContext.js.map +1 -1
  37. package/build/cjs/package.json +1 -1
  38. package/build/cjs/typings/common.d.ts +6 -4
  39. package/build/cjs/typings/common.js.map +1 -1
  40. package/build/cjs/typings/config.d.ts +3 -7
  41. package/build/cjs/typings/config.js.map +1 -1
  42. package/build/cjs/typings/plugin.d.ts +7 -7
  43. package/build/cjs/typings/plugin.js.map +1 -1
  44. package/build/cjs/utils/register-manager.d.ts +2 -3
  45. package/build/cjs/utils/register-manager.js.map +1 -1
  46. package/build/cjs/utils/update-manager.d.ts +2 -2
  47. package/build/cjs/utils/update-manager.js.map +1 -1
  48. package/build/esm/components/DashKit/DashKit.d.ts +2 -2
  49. package/build/esm/components/DashKit/DashKit.js +2 -2
  50. package/build/esm/components/DashKit/DashKit.js.map +1 -1
  51. package/build/esm/components/DashKitView/DashKitView.d.ts +3 -5
  52. package/build/esm/components/DashKitView/DashKitView.js.map +1 -1
  53. package/build/esm/components/GridItem/GridItem.d.ts +32 -2
  54. package/build/esm/components/GridItem/GridItem.js +9 -42
  55. package/build/esm/components/GridItem/GridItem.js.map +1 -1
  56. package/build/esm/components/GridLayout/GridLayout.d.ts +55 -65
  57. package/build/esm/components/GridLayout/GridLayout.js +39 -17
  58. package/build/esm/components/GridLayout/GridLayout.js.map +1 -1
  59. package/build/esm/components/GridLayout/ReactGridLayout.d.ts +13 -2
  60. package/build/esm/components/GridLayout/ReactGridLayout.js +27 -6
  61. package/build/esm/components/GridLayout/ReactGridLayout.js.map +1 -1
  62. package/build/esm/components/GridLayout/types.d.ts +59 -0
  63. package/build/esm/components/GridLayout/types.js +2 -0
  64. package/build/esm/components/GridLayout/types.js.map +1 -0
  65. package/build/esm/components/Item/Item.d.ts +17 -72
  66. package/build/esm/components/Item/Item.js +3 -12
  67. package/build/esm/components/Item/Item.js.map +1 -1
  68. package/build/esm/components/Item/types.d.ts +14 -0
  69. package/build/esm/components/Item/types.js +2 -0
  70. package/build/esm/components/Item/types.js.map +1 -0
  71. package/build/esm/components/MobileLayout/MobileLayout.d.ts +7 -7
  72. package/build/esm/components/MobileLayout/MobileLayout.js.map +1 -1
  73. package/build/esm/components/OverlayControls/OverlayControls.d.ts +1 -1
  74. package/build/esm/components/OverlayControls/OverlayControls.js.map +1 -1
  75. package/build/esm/context/DashKitContext.d.ts +24 -14
  76. package/build/esm/context/DashKitContext.js.map +1 -1
  77. package/build/esm/hocs/prepareItem.d.ts +21 -71
  78. package/build/esm/hocs/prepareItem.js +8 -29
  79. package/build/esm/hocs/prepareItem.js.map +1 -1
  80. package/build/esm/hocs/withContext.d.ts +12 -2
  81. package/build/esm/hocs/withContext.js +35 -14
  82. package/build/esm/hocs/withContext.js.map +1 -1
  83. package/build/esm/package.json +1 -1
  84. package/build/esm/typings/common.d.ts +6 -4
  85. package/build/esm/typings/common.js.map +1 -1
  86. package/build/esm/typings/config.d.ts +3 -7
  87. package/build/esm/typings/config.js.map +1 -1
  88. package/build/esm/typings/plugin.d.ts +7 -7
  89. package/build/esm/typings/plugin.js.map +1 -1
  90. package/build/esm/utils/register-manager.d.ts +2 -3
  91. package/build/esm/utils/register-manager.js.map +1 -1
  92. package/build/esm/utils/update-manager.d.ts +2 -2
  93. package/build/esm/utils/update-manager.js.map +1 -1
  94. package/package.json +17 -7
@@ -1 +1 @@
1
- {"version":3,"file":"GridLayout.js","sourceRoot":"../../../../src","sources":["components/GridLayout/GridLayout.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACH,8BAA8B,EAC9B,aAAa,EACb,2BAA2B,EAC3B,iBAAiB,GACpB,iCAAwB;AACzB,OAAO,EAAC,cAAc,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AE,IAAI,aAAa,CAAC;gBAErC,IAAI,MAAM,EAAE,KAAK,CAAC;gBAElB,IAAI,EAAE,KAAK,aAAa,EAAE,CAAC;oBACvB,MAAM,GAAG,mBAAmB,CAAC;oBAC7B,KAAK,GAAG,kBAAkB,CAAC;gBAC/B,CAAC;qBAAM,CAAC;oBACJ,MAAM,GAAG,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;oBACjC,KAAK,GAAG,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;gBACnC,CAAC;gBAED,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;gBAClF,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC;gBAEvB,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;oBACf,MAAM,YAAY,GAAG;wBACjB,QAAQ,EAAE,KAAK;wBACf,MAAM;wBACN,QAAQ;wBACR,KAAK;wBACL,MAAM;wBACN,OAAO;qBACV,CAAC;oBACF,OAAO,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;gBACnD,CAAC;gBAED,OAAO,OAAO,CAAC;YACnB,CAAC,CAAC,CAAC;QACP,CAAC;aAAM,CAAC;YACJ,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAC;QAC5F,CAAC;IACL,CAAC;;AAntBM,sBAAW,GAAG,cAAc,AAAjB,CAAkB;eAjCnB,UAAU","sourcesContent":["import React from 'react';\n\nimport {\n COMPACT_TYPE_HORIZONTAL_NOWRAP,\n DEFAULT_GROUP,\n DRAGGABLE_CANCEL_CLASS_NAME,\n TEMPORARY_ITEM_ID,\n} from '../../constants';\nimport {DashKitContext} from '../../context';\nimport {resolveLayoutGroup} from '../../utils';\nimport GridItem from '../GridItem/GridItem';\n\nimport {Layout} from './ReactGridLayout';\n\nexport default class GridLayout extends React.PureComponent {\n constructor(props, context) {\n super(props, context);\n this.pluginsRefs = [];\n this.state = {\n isDragging: false,\n isDraggedOut: false,\n isPageHidden: false,\n currentDraggingElement: null,\n draggedOverGroup: null,\n };\n }\n\n componentDidMount() {\n this.reloadItems();\n document.addEventListener('visibilitychange', this.onVisibilityChange);\n }\n\n componentDidUpdate() {\n clearTimeout(this._timeout);\n this.reloadItems();\n }\n\n componentWillUnmount() {\n clearTimeout(this._timeout);\n document.removeEventListener('visibilitychange', this.onVisibilityChange);\n\n this._memoCallbacksForGroups = {};\n this._memoGroupsProps = {};\n this._memoGroupsLayouts = {};\n this._memoForwardedPluginRef = [];\n }\n\n static contextType = DashKitContext;\n\n _memoForwardedPluginRef = [];\n _memoGroupsProps = {};\n _memoGroupsLayouts = {};\n _memoCallbacksForGroups = {};\n\n _timeout;\n _lastReloadAt;\n\n onVisibilityChange = () => {\n this.setState({\n isPageHidden: document.hidden,\n });\n };\n\n adjustWidgetLayout = ({widgetId, needSetDefault, adjustedWidgetLayout}) => {\n const {layout, memorizeOriginalLayout, revertToOriginalLayout} = this.context;\n\n if (needSetDefault) {\n revertToOriginalLayout(widgetId);\n return;\n }\n\n if (!adjustedWidgetLayout) {\n return;\n }\n\n const correspondedLayoutItemIndex = layout.findIndex(\n (layoutItem) => layoutItem.i === widgetId,\n );\n\n memorizeOriginalLayout(\n widgetId,\n {...layout[correspondedLayoutItemIndex]},\n adjustedWidgetLayout,\n );\n };\n\n getItemsMeta = () => {\n const {getItemsMeta} = this.context;\n return getItemsMeta(this.pluginsRefs);\n };\n\n getActiveLayout() {\n const {layout, temporaryLayout} = this.context;\n\n return temporaryLayout?.data || layout;\n }\n\n getMemoGroupLayout(group, layout) {\n // fastest possible way to match json\n const key = JSON.stringify(layout);\n\n if (this._memoGroupsLayouts[group]) {\n if (this._memoGroupsLayouts[group].key === key) {\n return this._memoGroupsLayouts[group];\n } else {\n this._memoGroupsLayouts[group].key = key;\n this._memoGroupsLayouts[group].layout = layout;\n }\n } else {\n this._memoGroupsLayouts[group] = {\n key,\n layout,\n };\n }\n\n return this._memoGroupsLayouts[group];\n }\n\n getMemoGroupCallbacks(group) {\n if (!this._memoCallbacksForGroups[group]) {\n const onDragStart = this._onDragStart.bind(this, group);\n const onDrag = this._onDrag.bind(this, group);\n const onDragStop = this._onDragStop.bind(this, group);\n\n const onResizeStart = this._onResizeStart.bind(this, group);\n const onResize = this._onResize.bind(this, group);\n const onResizeStop = this._onResizeStop.bind(this, group);\n\n const onDrop = this._onDrop.bind(this, group);\n const onDropDragOver = this._onDropDragOver.bind(this, group);\n const onDragTargetRestore = this._onTargetRestore.bind(this, group);\n\n this._memoCallbacksForGroups[group] = {\n onDragStart,\n onDrag,\n onDragStop,\n onResizeStart,\n onResize,\n onResizeStop,\n onDrop,\n onDropDragOver,\n onDragTargetRestore,\n };\n }\n\n return this._memoCallbacksForGroups[group];\n }\n\n getMemoGroupProps = (group, renderLayout, properties) => {\n // Needed for _onDropDragOver\n this._memoGroupsProps[group] = properties;\n\n return {\n layout: this.getMemoGroupLayout(group, renderLayout).layout,\n callbacks: this.getMemoGroupCallbacks(group),\n };\n };\n\n getLayoutAndPropsByGroup = (group) => {\n return {\n properties: this._memoGroupsProps[group],\n layout: this._memoGroupsLayouts[group].layout,\n };\n };\n\n getMemoForwardRefCallback = (refIndex) => {\n if (!this._memoForwardedPluginRef[refIndex]) {\n this._memoForwardedPluginRef[refIndex] = (pluginRef) => {\n this.pluginsRefs[refIndex] = pluginRef;\n };\n }\n\n return this._memoForwardedPluginRef[refIndex];\n };\n\n mergeGroupsLayout(group, newLayout, temporaryItem) {\n const renderLayout = this.getActiveLayout();\n const itemsByGroup = renderLayout.reduce(\n (memo, item) => {\n memo[item.i] = item;\n return memo;\n },\n temporaryItem ? {[temporaryItem.i]: temporaryItem} : {},\n );\n\n const newItemsLayoutById = newLayout.reduce((memo, item) => {\n const parent = itemsByGroup[item.i].parent;\n memo[item.i] = {...item};\n\n if (parent) {\n memo[item.i].parent = parent;\n }\n return memo;\n }, {});\n\n return renderLayout.map((currentItem) => {\n const itemParent = resolveLayoutGroup(itemsByGroup[currentItem.i]);\n\n if (itemParent === group) {\n return newItemsLayoutById[currentItem.i];\n }\n\n return currentItem;\n });\n }\n\n reloadItems(options) {\n const {targetIds, force} = options || {};\n\n const {\n editMode,\n settings: {autoupdateInterval, silentLoading} = {},\n reloadItems,\n } = this.context;\n\n const {isPageHidden} = this.state;\n\n const autoupdateIntervalMs = Number(autoupdateInterval) * 1000;\n\n const targetPlugins = targetIds\n ? this.pluginsRefs.filter((plugin) => targetIds.includes(plugin.props.id))\n : this.pluginsRefs;\n\n if (autoupdateIntervalMs) {\n const timeSinceLastReload = new Date().getTime() - (this._lastReloadAt || 0);\n const reloadIntervalRemains = autoupdateIntervalMs - timeSinceLastReload;\n\n if (force || (!isPageHidden && !editMode && reloadIntervalRemains <= 0)) {\n this._lastReloadAt = new Date().getTime();\n reloadItems(targetPlugins, {silentLoading, noVeil: true});\n }\n\n this._timeout = setTimeout(\n () => this.reloadItems(),\n reloadIntervalRemains <= 0 ? autoupdateIntervalMs : reloadIntervalRemains,\n );\n } else if (force) {\n reloadItems(targetPlugins, {silentLoading, noVeil: true});\n }\n }\n\n prepareDefaultArguments(group, layout, oldItem, newItem, placeholder, e, element) {\n return {\n group,\n layout,\n oldItem,\n newItem,\n placeholder,\n e,\n element,\n };\n }\n\n updateDraggingElementState(group, layoutItem, e) {\n let currentDraggingElement = this.state.currentDraggingElement;\n\n if (!currentDraggingElement) {\n const {temporaryLayout} = this.context;\n const layoutId = layoutItem.i;\n\n const item = temporaryLayout\n ? temporaryLayout.dragProps\n : this.context.configItems.find(({id}) => id === layoutId);\n\n let {offsetX, offsetY} = e.nativeEvent || {};\n if (offsetX === undefined || offsetY === undefined) {\n const gridRect = e.currentTarget.getBoundingClientRect();\n\n offsetX = e.clientX - gridRect.left;\n offsetY = e.clientY - gridRect.top;\n }\n\n currentDraggingElement = {\n group,\n layoutItem,\n item,\n cursorPosition: {offsetX, offsetY},\n };\n }\n\n this.setState({currentDraggingElement, draggedOverGroup: group});\n }\n\n _initDragCoordinatesWatcher(element) {\n if (!this._parendDragNode) {\n this._parendDragNode = element.parentElement;\n this.setState({isDraggedOut: false});\n }\n }\n\n // When element is going back and prointer-event: none is removed mouse enter event is not fired\n // So to trigger it we are forcing this event by adding transparent block under the mouse\n _forceCursorCapture(parentElement, position, parentRect) {\n const block = document.createElement('div');\n block.classList.add('react-grid-focus-capture');\n\n const blockSize = 44;\n const offset = blockSize / 2;\n\n // Keeping elemnt inside current grid\n const top = Math.min(Math.max(position.top - offset, 0), parentRect.height - blockSize);\n const left = Math.min(Math.max(position.left - offset, 0), parentRect.width - blockSize);\n\n block.style.width = `${blockSize}px`;\n block.style.height = `${blockSize}px`;\n block.style.top = `${top}px`;\n block.style.left = `${left}px`;\n\n parentElement.appendChild(block);\n\n setTimeout(() => {\n block.remove();\n }, 100);\n }\n\n _updateDragCoordinates(e) {\n const parent = this._parendDragNode;\n const parentRect = parent.getBoundingClientRect();\n const {clientX, clientY} = e;\n\n let isDraggedOut = this.state.isDraggedOut;\n if (\n clientX < parentRect.left ||\n clientX > parentRect.right ||\n clientY < parentRect.top ||\n clientY > parentRect.bottom\n ) {\n isDraggedOut = true;\n } else {\n isDraggedOut = false;\n }\n\n if (isDraggedOut !== this.state.isDraggedOut) {\n this.setState({isDraggedOut});\n\n if (!isDraggedOut) {\n this._forceCursorCapture(\n parent,\n {\n top: clientY - parentRect.top,\n left: clientX - parentRect.left,\n },\n parentRect,\n );\n }\n }\n }\n\n _resetDragWatcher() {\n this._parendDragNode = null;\n this.setState({isDraggedOut: false});\n }\n\n _onDragStart(group, _newLayout, layoutItem, _newItem, _placeholder, e, element) {\n this.context.onDragStart?.call(\n this,\n this.prepareDefaultArguments(\n group,\n _newLayout,\n layoutItem,\n _newItem,\n _placeholder,\n e,\n element,\n ),\n );\n\n if (this.context.dragOverPlugin) {\n this.setState({isDragging: true});\n } else {\n this._initDragCoordinatesWatcher(element);\n this.updateDraggingElementState(group, layoutItem, e);\n this.setState({isDragging: true});\n }\n }\n\n _onDrag(group, layout, oldItem, newItem, placeholder, e, element) {\n if (!this.context.dragOverPlugin) {\n this._updateDragCoordinates(e);\n }\n\n this.context.onDrag?.call(\n this,\n this.prepareDefaultArguments(group, layout, oldItem, newItem, placeholder, e, element),\n );\n }\n\n _onDragStop(group, layout, oldItem, newItem, placeholder, e, element) {\n this._resetDragWatcher();\n\n this._onStop(group, layout);\n\n this.context.onDragStop?.call(\n this,\n this.prepareDefaultArguments(group, layout, oldItem, newItem, placeholder, e, element),\n );\n }\n\n _onResizeStart(group, layout, oldItem, newItem, placeholder, e, element) {\n this.setState({\n isDragging: true,\n });\n\n this.context.onResizeStart?.call(\n this,\n this.prepareDefaultArguments(group, layout, oldItem, newItem, placeholder, e, element),\n );\n }\n\n _onResize(group, layout, oldItem, newItem, placeholder, e, element) {\n this.context.onResize?.call(\n this,\n this.prepareDefaultArguments(group, layout, oldItem, newItem, placeholder, e, element),\n );\n }\n\n _onResizeStop(group, layout, oldItem, newItem, placeholder, e, element) {\n this._onStop(group, layout);\n\n this.context.onResizeStop?.call(\n this,\n this.prepareDefaultArguments(group, layout, oldItem, newItem, placeholder, e, element),\n );\n }\n\n _onTargetRestore() {\n if (this.context.temporaryLayout) {\n return;\n }\n\n const {currentDraggingElement} = this.state;\n\n if (currentDraggingElement) {\n this.setState({\n draggedOverGroup: currentDraggingElement.group,\n });\n }\n }\n\n _onStop = (group, newLayout) => {\n const {layoutChange, onDrop, temporaryLayout} = this.context;\n const {draggedOverGroup, currentDraggingElement} = this.state;\n\n if (\n currentDraggingElement &&\n draggedOverGroup !== null &&\n draggedOverGroup !== currentDraggingElement.group\n ) {\n // Skipping layout update when change event called for source grid\n // and waiting _onDrop\n return;\n }\n\n const groupedLayout = this.mergeGroupsLayout(group, newLayout);\n\n this.setState({\n isDragging: false,\n currentDraggingElement: null,\n draggedOverGroup: null,\n });\n\n if (temporaryLayout) {\n onDrop?.(\n groupedLayout,\n groupedLayout.find(({i}) => i === TEMPORARY_ITEM_ID),\n );\n } else {\n layoutChange(groupedLayout);\n }\n };\n\n _onSharedDrop = (targetGroup, newLayout, tempItem) => {\n const {currentDraggingElement} = this.state;\n const {layoutChange} = this.context;\n\n if (!currentDraggingElement) {\n return;\n }\n\n const sourceLayoutItem = currentDraggingElement.layoutItem;\n\n const groupedLayout = this.mergeGroupsLayout(targetGroup, newLayout, tempItem).map(\n (item) => {\n if (item.i === sourceLayoutItem.i) {\n const copy = {...tempItem};\n\n delete copy.parent;\n if (targetGroup !== DEFAULT_GROUP) {\n copy.parent = targetGroup;\n }\n copy.i = sourceLayoutItem.i;\n\n return copy;\n }\n\n return item;\n },\n );\n\n this.setState({\n isDragging: false,\n currentDraggingElement: null,\n draggedOverGroup: null,\n });\n\n // TODO temporaryLayout\n layoutChange(groupedLayout);\n };\n\n _onExternalDrop = (group, newLayout, item, e) => {\n const {onDrop} = this.context;\n\n if (group !== DEFAULT_GROUP) {\n item.parent = group;\n }\n\n const groupedLayout = this.mergeGroupsLayout(group, newLayout, item);\n this.setState({isDragging: false});\n\n onDrop?.(groupedLayout, item, e);\n };\n\n _onDrop = (group, newLayout, item, e) => {\n if (!item || !this.context.editMode) {\n return false;\n }\n\n const {draggedOverGroup, currentDraggingElement} = this.state;\n if (currentDraggingElement && draggedOverGroup === group) {\n this._onSharedDrop(group, newLayout, item);\n } else {\n this._onExternalDrop(group, newLayout, item, e);\n }\n };\n\n _onDropDragOver = (group, e) => {\n const {editMode, dragOverPlugin, onDropDragOver, temporaryLayout} = this.context;\n const {currentDraggingElement} = this.state;\n\n // TODO If temporary item is trying to change group\n if (temporaryLayout && currentDraggingElement) {\n return false;\n }\n\n if (!editMode || (!dragOverPlugin && !currentDraggingElement)) {\n return false;\n }\n\n const {properties, layout} = this.getLayoutAndPropsByGroup(group);\n\n if (currentDraggingElement) {\n const {h, w, i} = currentDraggingElement.layoutItem;\n const {type} = currentDraggingElement.item;\n const sharedItem = {\n h,\n w,\n i,\n type,\n parent: currentDraggingElement.group,\n };\n\n return onDropDragOver(e, group, properties, layout, sharedItem);\n }\n\n if (dragOverPlugin) {\n return onDropDragOver(e, group, properties, layout);\n }\n\n return false;\n };\n\n renderTemporaryPlaceholder(gridLayout) {\n const {temporaryLayout, noOverlay, draggableHandleClassName} = this.context;\n\n if (!temporaryLayout || !temporaryLayout.dragProps) {\n return null;\n }\n\n const id = TEMPORARY_ITEM_ID;\n const {type} = temporaryLayout.dragProps;\n\n return (\n <GridItem\n key={id}\n id={id}\n item={{id, type, data: {}}}\n layout={temporaryLayout.data}\n adjustWidgetLayout={this.adjustWidgetLayout}\n isDragging={this.state.isDragging}\n isPlaceholder={true}\n noOverlay={noOverlay}\n withCustomHandle={Boolean(draggableHandleClassName)}\n gridLayout={gridLayout}\n />\n );\n }\n\n renderGroup(group, renderLayout, renderItems, offset = 0, groupGridProperties) {\n const {\n registerManager,\n editMode,\n noOverlay,\n focusable,\n draggableHandleClassName,\n outerDnDEnable,\n onItemMountChange,\n onItemRender,\n onItemFocus,\n onItemBlur,\n } = this.context;\n\n const {currentDraggingElement, draggedOverGroup} = this.state;\n const hasOwnGroupProperties = typeof groupGridProperties === 'function';\n const properties = hasOwnGroupProperties\n ? groupGridProperties({...registerManager.gridLayout})\n : registerManager.gridLayout;\n let {compactType} = properties;\n\n if (compactType === COMPACT_TYPE_HORIZONTAL_NOWRAP) {\n compactType = 'horizontal';\n }\n\n const {callbacks, layout} = this.getMemoGroupProps(group, renderLayout, properties);\n const hasSharedDragItem = Boolean(\n currentDraggingElement && currentDraggingElement.group !== group,\n );\n const isDragCaptured =\n currentDraggingElement &&\n group === currentDraggingElement.group &&\n draggedOverGroup !== null &&\n draggedOverGroup !== group;\n\n return (\n <Layout\n isDraggable={editMode}\n isResizable={editMode}\n // Group properties\n {...properties}\n key={`group_${group}`}\n // Layout props\n compactType={compactType}\n layout={layout}\n draggableCancel={`.${DRAGGABLE_CANCEL_CLASS_NAME}`}\n draggableHandle={draggableHandleClassName ? `.${draggableHandleClassName}` : null}\n // Default callbacks\n onDragStart={callbacks.onDragStart}\n onDrag={callbacks.onDrag}\n onDragStop={callbacks.onDragStop}\n onResizeStart={callbacks.onResizeStart}\n onResize={callbacks.onResize}\n onResizeStop={callbacks.onResizeStop}\n // External Drag N Drop options\n onDragTargetRestore={callbacks.onDragTargetRestore}\n onDropDragOver={callbacks.onDropDragOver}\n onDrop={callbacks.onDrop}\n hasSharedDragItem={hasSharedDragItem}\n sharedDragPosition={currentDraggingElement?.cursorPosition}\n isDragCaptured={isDragCaptured}\n isDroppable={Boolean(outerDnDEnable) && editMode}\n >\n {renderItems.map((item, i) => {\n const keyId = item.id;\n const isDragging = this.state.isDragging;\n const isCurrentDraggedItem = currentDraggingElement?.item.id === keyId;\n const isDraggedOut = isCurrentDraggedItem && this.state.isDraggedOut;\n const itemNoOverlay =\n hasOwnGroupProperties && 'noOverlay' in properties\n ? properties.noOverlay\n : noOverlay;\n\n return (\n <GridItem\n forwardedPluginRef={this.getMemoForwardRefCallback(offset + i)} // forwarded ref to plugin\n key={keyId}\n id={keyId}\n item={item}\n layout={layout}\n adjustWidgetLayout={this.adjustWidgetLayout}\n isDragging={isDragging}\n isDraggedOut={isDraggedOut}\n noOverlay={itemNoOverlay}\n focusable={focusable}\n withCustomHandle={Boolean(draggableHandleClassName)}\n onItemMountChange={onItemMountChange}\n onItemRender={onItemRender}\n gridLayout={properties}\n onItemFocus={onItemFocus}\n onItemBlur={onItemBlur}\n />\n );\n })}\n {this.renderTemporaryPlaceholder(properties)}\n </Layout>\n );\n }\n\n render() {\n const {config, groups, editMode, context} = this.context;\n\n this.pluginsRefs.length = this.context.configItems.length;\n\n const defaultRenderLayout = [];\n const defaultRenderItems = [];\n const layoutMap = {};\n\n const groupedLayout = this.getActiveLayout().reduce((memo, item) => {\n if (item.parent) {\n if (!memo[item.parent]) {\n memo[item.parent] = [];\n }\n\n memo[item.parent].push(item);\n layoutMap[item.i] = item.parent;\n } else {\n defaultRenderLayout.push(item);\n }\n\n return memo;\n }, []);\n\n const itemsByGroup = this.context.configItems.reduce((memo, item) => {\n const group = layoutMap[item.id];\n if (group) {\n if (!memo[group]) {\n memo[group] = [];\n }\n memo[group].push(item);\n } else {\n defaultRenderItems.push(item);\n }\n\n return memo;\n }, {});\n\n let offset = 0;\n\n if (groups) {\n return groups.map((group) => {\n const id = group.id || DEFAULT_GROUP;\n\n let layout, items;\n\n if (id === DEFAULT_GROUP) {\n layout = defaultRenderLayout;\n items = defaultRenderItems;\n } else {\n layout = groupedLayout[id] || [];\n items = itemsByGroup[id] || [];\n }\n\n const element = this.renderGroup(id, layout, items, offset, group.gridProperties);\n offset += items.length;\n\n if (group.render) {\n const groupContext = {\n isMobile: false,\n config,\n editMode,\n items,\n layout,\n context,\n };\n return group.render(id, element, groupContext);\n }\n\n return element;\n });\n } else {\n return this.renderGroup(DEFAULT_GROUP, defaultRenderLayout, defaultRenderItems, offset);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"GridLayout.js","sourceRoot":"../../../../src","sources":["components/GridLayout/GridLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EACH,8BAA8B,EAC9B,aAAa,EACb,2BAA2B,EAC3B,iBAAiB,GACpB,iCAAwB;AACzB,OAAO,EAAC,cAAc,EAAC,+BAAsB;AAG7C,OAAO,EAAC,kBAAkB,EAAC,6BAAoB;AAC/C,OAAO,QAAQ,gCAA6B;AAE5C,OAAO,EAAC,MAAM,EAAC,6BAA0B;AAYzC,MAAM,WAAW,GAAG,CAAC,KAAgB,EAAkC,EAAE;IACrE,OAAO,CACH,KAAK,KAAK,IAAI;QACd,OAAO,IAAI,KAAK;QAChB,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ;QAC/B,KAAK,CAAC,KAAK,KAAK,IAAI;QACpB,IAAI,IAAI,KA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,OAAO,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;gBACnD,CAAC;gBAED,OAAO,OAAO,CAAC;YACnB,CAAC,CAAC,CAAC;QACP,CAAC;aAAM,CAAC;YACJ,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAC;QAC5F,CAAC;IACL,CAAC;;AA52BM,sBAAW,GAAG,cAAc,AAAjB,CAAkB;eADnB,UAAU","sourcesContent":["import React from 'react';\n\nimport type {DragOverEvent} from 'react-grid-layout';\n\nimport type {PluginRef, PluginWidgetProps, ReactGridLayoutProps} from 'src/typings';\n\nimport {\n COMPACT_TYPE_HORIZONTAL_NOWRAP,\n DEFAULT_GROUP,\n DRAGGABLE_CANCEL_CLASS_NAME,\n TEMPORARY_ITEM_ID,\n} from '../../constants';\nimport {DashKitContext} from '../../context';\nimport type {DashKitCtxShape} from '../../context';\nimport type {ConfigItem, ConfigLayout, DraggedOverItem} from '../../shared';\nimport {resolveLayoutGroup} from '../../utils';\nimport GridItem from '../GridItem/GridItem';\n\nimport {Layout} from './ReactGridLayout';\nimport type {\n CurrentDraggingElement,\n GridLayoutProps,\n GridLayoutState,\n GroupCallbacks,\n LayoutAndPropsByGroup,\n ManipulationCallbackArgs,\n MemoGroupLayout,\n ReloadItemsOptions,\n} from './types';\n\nconst hasPluginId = (value: PluginRef): value is {props: {id: string}} => {\n return (\n value !== null &&\n 'props' in value &&\n typeof value.props === 'object' &&\n value.props !== null &&\n 'id' in value.props &&\n typeof value.props.id === 'string'\n );\n};\n\nexport default class GridLayout extends React.PureComponent<GridLayoutProps, GridLayoutState> {\n static contextType = DashKitContext;\n context!: DashKitCtxShape;\n\n pluginsRefs: Array<PluginRef>;\n\n private _memoForwardedPluginRef: Array<(pluginRef: PluginRef) => void> = [];\n private _memoGroupsProps: Record<string, Partial<ReactGridLayoutProps>> = {};\n private _memoGroupsLayouts: Record<string, MemoGroupLayout> = {};\n private _memoCallbacksForGroups: Record<string, GroupCallbacks> = {};\n\n private _timeout?: NodeJS.Timeout;\n private _lastReloadAt?: number;\n private _parendDragNode: HTMLElement | null = null;\n\n constructor(props: GridLayoutProps, context: DashKitCtxShape) {\n super(props, context);\n this.pluginsRefs = [];\n this.state = {\n isDragging: false,\n isDraggedOut: false,\n isPageHidden: false,\n currentDraggingElement: null,\n draggedOverGroup: null,\n };\n }\n\n componentDidMount() {\n this.reloadItems();\n document.addEventListener('visibilitychange', this.onVisibilityChange);\n }\n\n componentDidUpdate() {\n clearTimeout(this._timeout);\n this.reloadItems();\n }\n\n componentWillUnmount() {\n clearTimeout(this._timeout);\n document.removeEventListener('visibilitychange', this.onVisibilityChange);\n\n this._memoCallbacksForGroups = {};\n this._memoGroupsProps = {};\n this._memoGroupsLayouts = {};\n this._memoForwardedPluginRef = [];\n }\n\n onVisibilityChange = () => {\n this.setState({\n isPageHidden: document.hidden,\n });\n };\n\n adjustWidgetLayout: PluginWidgetProps['adjustWidgetLayout'] = ({\n widgetId,\n needSetDefault,\n adjustedWidgetLayout,\n }) => {\n const {layout, memorizeOriginalLayout, revertToOriginalLayout} = this.context;\n\n if (needSetDefault) {\n revertToOriginalLayout(widgetId);\n return;\n }\n\n if (!adjustedWidgetLayout) {\n return;\n }\n\n const correspondedLayoutItemIndex = layout.findIndex(\n (layoutItem) => layoutItem.i === widgetId,\n );\n\n memorizeOriginalLayout(\n widgetId,\n {...layout[correspondedLayoutItemIndex]},\n adjustedWidgetLayout,\n );\n };\n\n getItemsMeta = () => {\n const {getItemsMeta} = this.context;\n return getItemsMeta(this.pluginsRefs);\n };\n\n getActiveLayout(): ConfigLayout[] {\n const {layout, temporaryLayout} = this.context;\n\n return temporaryLayout?.data || layout;\n }\n\n getMemoGroupLayout(group: string, layout: ConfigLayout[]): MemoGroupLayout {\n // fastest possible way to match json\n const key = JSON.stringify(layout);\n\n if (this._memoGroupsLayouts[group]) {\n if (this._memoGroupsLayouts[group].key === key) {\n return this._memoGroupsLayouts[group];\n } else {\n this._memoGroupsLayouts[group].key = key;\n this._memoGroupsLayouts[group].layout = layout;\n }\n } else {\n this._memoGroupsLayouts[group] = {\n key,\n layout,\n };\n }\n\n return this._memoGroupsLayouts[group];\n }\n\n getMemoGroupCallbacks(group: string): GroupCallbacks {\n if (!this._memoCallbacksForGroups[group]) {\n const onDragStart = this._onDragStart.bind(this, group);\n const onDrag = this._onDrag.bind(this, group);\n const onDragStop = this._onDragStop.bind(this, group);\n\n const onResizeStart = this._onResizeStart.bind(this, group);\n const onResize = this._onResize.bind(this, group);\n const onResizeStop = this._onResizeStop.bind(this, group);\n\n const onDrop = this._onDrop.bind(this, group);\n const onDropDragOver = this._onDropDragOver.bind(this, group);\n const onDragTargetRestore = this._onTargetRestore.bind(this);\n\n this._memoCallbacksForGroups[group] = {\n onDragStart,\n onDrag,\n onDragStop,\n onResizeStart,\n onResize,\n onResizeStop,\n onDrop,\n onDropDragOver,\n onDragTargetRestore,\n };\n }\n\n return this._memoCallbacksForGroups[group];\n }\n\n getMemoGroupProps = (\n group: string,\n renderLayout: ConfigLayout[],\n properties: Partial<ReactGridLayoutProps>,\n ) => {\n // Needed for _onDropDragOver\n this._memoGroupsProps[group] = properties;\n\n return {\n layout: this.getMemoGroupLayout(group, renderLayout).layout,\n callbacks: this.getMemoGroupCallbacks(group),\n };\n };\n\n getLayoutAndPropsByGroup = (group: string): LayoutAndPropsByGroup => {\n return {\n properties: this._memoGroupsProps[group],\n layout: this._memoGroupsLayouts[group].layout,\n };\n };\n\n getMemoForwardRefCallback = (refIndex: number) => {\n if (!this._memoForwardedPluginRef[refIndex]) {\n this._memoForwardedPluginRef[refIndex] = (pluginRef: PluginRef) => {\n this.pluginsRefs[refIndex] = pluginRef;\n };\n }\n\n return this._memoForwardedPluginRef[refIndex];\n };\n\n mergeGroupsLayout(\n group: string,\n newLayout: ConfigLayout[],\n temporaryItem?: ConfigLayout,\n ): ConfigLayout[] {\n const renderLayout = this.getActiveLayout();\n const itemsByGroup = renderLayout.reduce<Record<string, ConfigLayout>>(\n (memo, item) => {\n memo[item.i] = item;\n return memo;\n },\n temporaryItem ? {[temporaryItem.i]: temporaryItem} : {},\n );\n\n const newItemsLayoutById = newLayout.reduce<Record<string, ConfigLayout>>((memo, item) => {\n const parent = itemsByGroup[item.i]?.parent;\n memo[item.i] = {...item};\n\n if (parent) {\n memo[item.i].parent = parent;\n }\n return memo;\n }, {});\n\n return renderLayout.map((currentItem) => {\n const itemParent = resolveLayoutGroup(itemsByGroup[currentItem.i]);\n\n if (itemParent === group) {\n return newItemsLayoutById[currentItem.i];\n }\n\n return currentItem;\n });\n }\n\n reloadItems(options?: ReloadItemsOptions) {\n const {targetIds, force} = options || {};\n\n const {\n editMode,\n settings: {autoupdateInterval, silentLoading} = {},\n reloadItems,\n } = this.context;\n\n const {isPageHidden} = this.state;\n\n const autoupdateIntervalMs = Number(autoupdateInterval) * 1000;\n\n const targetPlugins = targetIds\n ? this.pluginsRefs.filter(\n (plugin) => hasPluginId(plugin) && targetIds.includes(plugin.props.id),\n )\n : this.pluginsRefs;\n\n if (autoupdateIntervalMs) {\n const timeSinceLastReload = new Date().getTime() - (this._lastReloadAt || 0);\n const reloadIntervalRemains = autoupdateIntervalMs - timeSinceLastReload;\n\n if (force || (!isPageHidden && !editMode && reloadIntervalRemains <= 0)) {\n this._lastReloadAt = new Date().getTime();\n reloadItems(targetPlugins, {silentLoading: Boolean(silentLoading), noVeil: true});\n }\n\n this._timeout = setTimeout(\n () => this.reloadItems(),\n reloadIntervalRemains <= 0 ? autoupdateIntervalMs : reloadIntervalRemains,\n );\n } else if (force) {\n reloadItems(targetPlugins, {silentLoading: Boolean(silentLoading), noVeil: true});\n }\n }\n\n prepareDefaultArguments(\n group: string,\n layout: ConfigLayout[],\n oldItem: ConfigLayout,\n newItem: ConfigLayout,\n placeholder: ConfigLayout,\n e: MouseEvent,\n element: HTMLElement,\n ): ManipulationCallbackArgs {\n return {\n group,\n layout,\n oldItem,\n newItem,\n placeholder,\n e,\n element,\n };\n }\n\n updateDraggingElementState(group: string, layoutItem: ConfigLayout, e: MouseEvent) {\n let currentDraggingElement: CurrentDraggingElement | null =\n this.state.currentDraggingElement;\n\n if (!currentDraggingElement) {\n const {temporaryLayout} = this.context;\n const layoutId = layoutItem.i;\n\n const item = temporaryLayout\n ? temporaryLayout.dragProps\n : this.context.configItems.find(({id}) => id === layoutId);\n\n if (!item) {\n return;\n }\n\n let {offsetX, offsetY} =\n (e as MouseEvent & {nativeEvent?: MouseEvent}).nativeEvent || {};\n if (offsetX === undefined || offsetY === undefined) {\n const target = e.currentTarget as HTMLElement;\n const gridRect = target?.getBoundingClientRect();\n\n offsetX = e.clientX - (gridRect?.left || 0);\n offsetY = e.clientY - (gridRect?.top || 0);\n }\n\n currentDraggingElement = {\n group,\n layoutItem,\n item,\n cursorPosition: {offsetX, offsetY},\n };\n }\n\n this.setState({currentDraggingElement, draggedOverGroup: group});\n }\n\n _initDragCoordinatesWatcher(element: HTMLElement) {\n if (!this._parendDragNode) {\n this._parendDragNode = element.parentElement;\n this.setState({isDraggedOut: false});\n }\n }\n\n // When element is going back and prointer-event: none is removed mouse enter event is not fired\n // So to trigger it we are forcing this event by adding transparent block under the mouse\n _forceCursorCapture(\n parentElement: HTMLElement,\n position: {top: number; left: number},\n parentRect: DOMRect,\n ) {\n const block = document.createElement('div');\n block.classList.add('react-grid-focus-capture');\n\n const blockSize = 44;\n const offset = blockSize / 2;\n\n // Keeping elemnt inside current grid\n const top = Math.min(Math.max(position.top - offset, 0), parentRect.height - blockSize);\n const left = Math.min(Math.max(position.left - offset, 0), parentRect.width - blockSize);\n\n block.style.width = `${blockSize}px`;\n block.style.height = `${blockSize}px`;\n block.style.top = `${top}px`;\n block.style.left = `${left}px`;\n\n parentElement.appendChild(block);\n\n setTimeout(() => {\n block.remove();\n }, 100);\n }\n\n _updateDragCoordinates(e: MouseEvent) {\n const parent = this._parendDragNode;\n\n if (!parent) {\n return;\n }\n\n const parentRect = parent.getBoundingClientRect();\n const {clientX, clientY} = e;\n\n let isDraggedOut = this.state.isDraggedOut;\n if (\n clientX < parentRect.left ||\n clientX > parentRect.right ||\n clientY < parentRect.top ||\n clientY > parentRect.bottom\n ) {\n isDraggedOut = true;\n } else {\n isDraggedOut = false;\n }\n\n if (isDraggedOut !== this.state.isDraggedOut) {\n this.setState({isDraggedOut});\n\n if (!isDraggedOut) {\n this._forceCursorCapture(\n parent,\n {\n top: clientY - parentRect.top,\n left: clientX - parentRect.left,\n },\n parentRect,\n );\n }\n }\n }\n\n _resetDragWatcher() {\n this._parendDragNode = null;\n this.setState({isDraggedOut: false});\n }\n\n _onDragStart(\n group: string,\n _newLayout: ConfigLayout[],\n layoutItem: ConfigLayout,\n _newItem: ConfigLayout,\n _placeholder: ConfigLayout,\n e: MouseEvent,\n element: HTMLElement,\n ) {\n this.context.onDragStart?.call(\n this,\n this.prepareDefaultArguments(\n group,\n _newLayout,\n layoutItem,\n _newItem,\n _placeholder,\n e,\n element,\n ),\n );\n\n if (this.context.dragOverPlugin) {\n this.setState({isDragging: true});\n } else {\n this._initDragCoordinatesWatcher(element);\n this.updateDraggingElementState(group, layoutItem, e);\n this.setState({isDragging: true});\n }\n }\n\n _onDrag(\n group: string,\n layout: ConfigLayout[],\n oldItem: ConfigLayout,\n newItem: ConfigLayout,\n placeholder: ConfigLayout,\n e: MouseEvent,\n element: HTMLElement,\n ) {\n if (!this.context.dragOverPlugin) {\n this._updateDragCoordinates(e);\n }\n\n this.context.onDrag?.call(\n this,\n this.prepareDefaultArguments(group, layout, oldItem, newItem, placeholder, e, element),\n );\n }\n\n _onDragStop(\n group: string,\n layout: ConfigLayout[],\n oldItem: ConfigLayout,\n newItem: ConfigLayout,\n placeholder: ConfigLayout,\n e: MouseEvent,\n element: HTMLElement,\n ) {\n this._resetDragWatcher();\n\n this._onStop(group, layout);\n\n this.context.onDragStop?.call(\n this,\n this.prepareDefaultArguments(group, layout, oldItem, newItem, placeholder, e, element),\n );\n }\n\n _onResizeStart(\n group: string,\n layout: ConfigLayout[],\n oldItem: ConfigLayout,\n newItem: ConfigLayout,\n placeholder: ConfigLayout,\n e: MouseEvent,\n element: HTMLElement,\n ) {\n this.setState({\n isDragging: true,\n });\n\n this.context.onResizeStart?.call(\n this,\n this.prepareDefaultArguments(group, layout, oldItem, newItem, placeholder, e, element),\n );\n }\n\n _onResize(\n group: string,\n layout: ConfigLayout[],\n oldItem: ConfigLayout,\n newItem: ConfigLayout,\n placeholder: ConfigLayout,\n e: MouseEvent,\n element: HTMLElement,\n ) {\n this.context.onResize?.call(\n this,\n this.prepareDefaultArguments(group, layout, oldItem, newItem, placeholder, e, element),\n );\n }\n\n _onResizeStop(\n group: string,\n layout: ConfigLayout[],\n oldItem: ConfigLayout,\n newItem: ConfigLayout,\n placeholder: ConfigLayout,\n e: MouseEvent,\n element: HTMLElement,\n ) {\n this._onStop(group, layout);\n\n this.context.onResizeStop?.call(\n this,\n this.prepareDefaultArguments(group, layout, oldItem, newItem, placeholder, e, element),\n );\n }\n\n _onTargetRestore() {\n if (this.context.temporaryLayout) {\n return;\n }\n\n const {currentDraggingElement} = this.state;\n\n if (currentDraggingElement) {\n this.setState({\n draggedOverGroup: currentDraggingElement.group,\n });\n }\n }\n\n _onStop = (group: string, newLayout: ConfigLayout[]) => {\n const {layoutChange, onDrop, temporaryLayout} = this.context;\n const {draggedOverGroup, currentDraggingElement} = this.state;\n\n if (\n currentDraggingElement &&\n draggedOverGroup !== null &&\n draggedOverGroup !== currentDraggingElement.group\n ) {\n // Skipping layout update when change event called for source grid\n // and waiting _onDrop\n return;\n }\n\n const groupedLayout = this.mergeGroupsLayout(group, newLayout);\n\n this.setState({\n isDragging: false,\n currentDraggingElement: null,\n draggedOverGroup: null,\n });\n\n if (temporaryLayout) {\n const temporaryItem = groupedLayout.find(({i}) => i === TEMPORARY_ITEM_ID);\n if (onDrop && temporaryItem) {\n onDrop(groupedLayout, temporaryItem);\n }\n } else {\n layoutChange(groupedLayout);\n }\n };\n\n _onSharedDrop = (targetGroup: string, newLayout: ConfigLayout[], tempItem: ConfigLayout) => {\n const {currentDraggingElement} = this.state;\n const {layoutChange} = this.context;\n\n if (!currentDraggingElement) {\n return;\n }\n\n const sourceLayoutItem = currentDraggingElement.layoutItem;\n\n const groupedLayout = this.mergeGroupsLayout(targetGroup, newLayout, tempItem).map(\n (item) => {\n if (item.i === sourceLayoutItem.i) {\n const copy = {...tempItem};\n\n delete copy.parent;\n if (targetGroup !== DEFAULT_GROUP) {\n copy.parent = targetGroup;\n }\n copy.i = sourceLayoutItem.i;\n\n return copy;\n }\n\n return item;\n },\n );\n\n this.setState({\n isDragging: false,\n currentDraggingElement: null,\n draggedOverGroup: null,\n });\n\n // TODO temporaryLayout\n layoutChange(groupedLayout);\n };\n\n _onExternalDrop = (\n group: string,\n newLayout: ConfigLayout[],\n item: ConfigLayout,\n e: MouseEvent,\n ) => {\n const {onDrop} = this.context;\n\n if (group !== DEFAULT_GROUP) {\n item.parent = group;\n }\n\n const groupedLayout = this.mergeGroupsLayout(group, newLayout, item);\n this.setState({isDragging: false});\n\n onDrop?.(groupedLayout, item, e);\n };\n\n _onDrop = (\n group: string,\n newLayout: ConfigLayout[],\n item: ConfigLayout | undefined,\n e: MouseEvent,\n ): void | false => {\n if (!item || !this.context.editMode) {\n return false;\n }\n\n const {draggedOverGroup, currentDraggingElement} = this.state;\n if (currentDraggingElement && draggedOverGroup === group) {\n this._onSharedDrop(group, newLayout, item);\n } else {\n this._onExternalDrop(group, newLayout, item, e);\n }\n };\n\n _onDropDragOver = (\n group: string,\n e: DragOverEvent,\n ): {w?: number; h?: number} | false | undefined => {\n const {editMode, dragOverPlugin, onDropDragOver, temporaryLayout} = this.context;\n const {currentDraggingElement} = this.state;\n\n // TODO If temporary item is trying to change group\n if (temporaryLayout && currentDraggingElement) {\n return false;\n }\n\n if (!editMode || (!dragOverPlugin && !currentDraggingElement)) {\n return false;\n }\n\n const {properties, layout} = this.getLayoutAndPropsByGroup(group);\n\n if (currentDraggingElement) {\n const {h, w, i} = currentDraggingElement.layoutItem;\n const {type} = currentDraggingElement.item;\n const sharedItem: DraggedOverItem = {\n h,\n w,\n i,\n type,\n parent: currentDraggingElement.group,\n };\n\n return onDropDragOver(e, group, properties, layout, sharedItem);\n }\n\n if (dragOverPlugin) {\n return onDropDragOver(e, group, properties, layout);\n }\n\n return false;\n };\n\n renderTemporaryPlaceholder(gridLayout: Partial<ReactGridLayoutProps>) {\n const {temporaryLayout, noOverlay, draggableHandleClassName} = this.context;\n\n if (!temporaryLayout || !temporaryLayout.dragProps) {\n return null;\n }\n\n const id = TEMPORARY_ITEM_ID;\n const {type} = temporaryLayout.dragProps;\n\n return (\n <GridItem\n key={id}\n id={id}\n item={{id, type, data: {}} as ConfigItem}\n layout={temporaryLayout.data}\n adjustWidgetLayout={this.adjustWidgetLayout}\n isDragging={this.state.isDragging}\n isPlaceholder={true}\n noOverlay={noOverlay}\n withCustomHandle={Boolean(draggableHandleClassName)}\n gridLayout={gridLayout}\n />\n );\n }\n\n renderGroup(\n group: string,\n renderLayout: ConfigLayout[],\n renderItems: ConfigItem[],\n offset = 0,\n groupGridProperties?: (props: ReactGridLayoutProps) => ReactGridLayoutProps,\n ) {\n const {\n registerManager,\n editMode,\n noOverlay,\n focusable,\n draggableHandleClassName,\n outerDnDEnable,\n onItemMountChange,\n onItemRender,\n onItemFocus,\n onItemBlur,\n } = this.context;\n\n const {currentDraggingElement, draggedOverGroup} = this.state;\n const hasOwnGroupProperties = typeof groupGridProperties === 'function';\n const properties = hasOwnGroupProperties\n ? groupGridProperties({...registerManager.gridLayout})\n : registerManager.gridLayout;\n let {compactType} = properties;\n\n if (compactType === COMPACT_TYPE_HORIZONTAL_NOWRAP) {\n compactType = 'horizontal';\n }\n\n const {callbacks, layout} = this.getMemoGroupProps(group, renderLayout, properties);\n const hasSharedDragItem = Boolean(\n currentDraggingElement && currentDraggingElement.group !== group,\n );\n const isDragCaptured = Boolean(\n currentDraggingElement &&\n group === currentDraggingElement.group &&\n draggedOverGroup !== null &&\n draggedOverGroup !== group,\n );\n\n return (\n <Layout\n key={`group_${group}`}\n isDraggable={editMode}\n isResizable={editMode}\n // Group properties\n {...properties}\n // Layout props\n compactType={compactType}\n layout={layout}\n draggableCancel={`.${DRAGGABLE_CANCEL_CLASS_NAME}`}\n draggableHandle={\n draggableHandleClassName ? `.${draggableHandleClassName}` : undefined\n }\n // Default callbacks\n onDragStart={callbacks.onDragStart}\n onDrag={callbacks.onDrag}\n onDragStop={callbacks.onDragStop}\n onResizeStart={callbacks.onResizeStart}\n onResize={callbacks.onResize}\n onResizeStop={callbacks.onResizeStop}\n // External Drag N Drop options\n onDragTargetRestore={callbacks.onDragTargetRestore}\n onDropDragOver={callbacks.onDropDragOver}\n onDrop={callbacks.onDrop}\n hasSharedDragItem={hasSharedDragItem}\n sharedDragPosition={currentDraggingElement?.cursorPosition}\n isDragCaptured={isDragCaptured}\n isDroppable={Boolean(outerDnDEnable) && editMode}\n >\n {renderItems.map((item, i) => {\n const keyId = item.id;\n const isDragging = this.state.isDragging;\n const isCurrentDraggedItem =\n currentDraggingElement &&\n 'id' in currentDraggingElement.item &&\n currentDraggingElement.item.id === keyId;\n const isDraggedOut = isCurrentDraggedItem && this.state.isDraggedOut;\n const itemNoOverlay =\n hasOwnGroupProperties && 'noOverlay' in properties\n ? properties.noOverlay\n : noOverlay;\n\n return (\n <GridItem\n key={keyId}\n forwardedPluginRef={this.getMemoForwardRefCallback(offset + i)} // forwarded ref to plugin\n id={keyId}\n item={item}\n layout={layout}\n adjustWidgetLayout={this.adjustWidgetLayout}\n isDragging={isDragging}\n isDraggedOut={isDraggedOut || undefined}\n noOverlay={itemNoOverlay}\n focusable={focusable}\n withCustomHandle={Boolean(draggableHandleClassName)}\n onItemMountChange={onItemMountChange}\n onItemRender={onItemRender}\n gridLayout={properties}\n onItemFocus={onItemFocus}\n onItemBlur={onItemBlur}\n />\n );\n })}\n {this.renderTemporaryPlaceholder(properties)}\n </Layout>\n );\n }\n\n render() {\n const {config, groups, editMode, context} = this.context;\n\n this.pluginsRefs.length = this.context.configItems.length;\n\n const defaultRenderLayout: ConfigLayout[] = [];\n const defaultRenderItems: ConfigItem[] = [];\n const layoutMap: Record<string, string> = {};\n\n const groupedLayout = this.getActiveLayout().reduce<Record<string, ConfigLayout[]>>(\n (memo, item) => {\n if (item.parent) {\n if (!memo[item.parent]) {\n memo[item.parent] = [];\n }\n\n memo[item.parent].push(item);\n layoutMap[item.i] = item.parent;\n } else {\n defaultRenderLayout.push(item);\n }\n\n return memo;\n },\n {},\n );\n\n const itemsByGroup = this.context.configItems.reduce<Record<string, ConfigItem[]>>(\n (memo, item) => {\n const group = layoutMap[item.id];\n if (group) {\n if (!memo[group]) {\n memo[group] = [];\n }\n memo[group].push(item);\n } else {\n defaultRenderItems.push(item);\n }\n\n return memo;\n },\n {},\n );\n\n let offset = 0;\n\n if (groups) {\n return groups.map((group) => {\n const id = group.id || DEFAULT_GROUP;\n\n let layout, items;\n\n if (id === DEFAULT_GROUP) {\n layout = defaultRenderLayout;\n items = defaultRenderItems;\n } else {\n layout = groupedLayout[id] || [];\n items = itemsByGroup[id] || [];\n }\n\n const element = this.renderGroup(id, layout, items, offset, group.gridProperties);\n offset += items.length;\n\n if (group.render) {\n const groupContext = {\n isMobile: false,\n config,\n editMode,\n items,\n layout,\n context,\n };\n return group.render(id, element, groupContext);\n }\n\n return element;\n });\n } else {\n return this.renderGroup(DEFAULT_GROUP, defaultRenderLayout, defaultRenderItems, offset);\n }\n }\n}\n"]}
@@ -1,3 +1,14 @@
1
- export const Layout: React.ComponentClass<ReactGridLayout.ReactGridLayoutProps & ReactGridLayout.WidthProviderProps, any>;
2
- import ReactGridLayout from 'react-grid-layout';
3
1
  import React from 'react';
2
+ import ReactGridLayout from 'react-grid-layout';
3
+ type SharedDragPosition = {
4
+ offsetX: number;
5
+ offsetY: number;
6
+ };
7
+ export declare const Layout: React.ComponentClass<ReactGridLayout.ReactGridLayoutProps & {
8
+ innerRef?: React.Ref<HTMLDivElement>;
9
+ isDragCaptured?: boolean;
10
+ hasSharedDragItem?: boolean;
11
+ sharedDragPosition?: SharedDragPosition;
12
+ onDragTargetRestore?: () => void;
13
+ } & ReactGridLayout.WidthProviderProps, any>;
14
+ export {};
@@ -1,14 +1,24 @@
1
1
  import React from 'react';
2
+ // @ts-expect-error - utils is not exported in type definitions
2
3
  import ReactGridLayout, { WidthProvider, utils } from 'react-grid-layout';
3
4
  import { DROPPING_ELEMENT_CLASS_NAME, OVERLAY_CLASS_NAME } from "../../constants/index.js";
5
+ const isRefObject = (value) => {
6
+ return (typeof value === 'object' &&
7
+ value !== null &&
8
+ 'current' in value &&
9
+ typeof value.current === 'object');
10
+ };
4
11
  class DragOverLayout extends ReactGridLayout {
5
- constructor(...args) {
6
- super(...args);
12
+ constructor(props, context) {
13
+ super(props, context);
7
14
  this._savedDraggedOutLayout = null;
8
15
  // Reset placeholder when item dragged from outside
9
16
  this.resetExternalPlaceholder = () => {
17
+ // @ts-expect-error - dragEnterCounter is an internal property of parent class
10
18
  if (this.dragEnterCounter) {
19
+ // @ts-expect-error - dragEnterCounter is an internal property of parent class
11
20
  this.dragEnterCounter = 0;
21
+ // @ts-expect-error - removeDroppingPlaceholder is a protected method in parent class
12
22
  this.removeDroppingPlaceholder();
13
23
  }
14
24
  };
@@ -75,6 +85,7 @@ class DragOverLayout extends ReactGridLayout {
75
85
  this.mouseEnterHandler = (e) => {
76
86
  var _a, _b;
77
87
  if (this.props.hasSharedDragItem) {
88
+ // @ts-expect-error - onDragEnter is a protected method in parent class
78
89
  this.onDragEnter(e);
79
90
  }
80
91
  else if (this.props.isDragCaptured) {
@@ -84,6 +95,7 @@ class DragOverLayout extends ReactGridLayout {
84
95
  this.mouseLeaveHandler = (e) => {
85
96
  var _a, _b;
86
97
  if (this.props.hasSharedDragItem) {
98
+ // @ts-expect-error - onDragLeave is a protected method in parent class
87
99
  this.onDragLeave(e);
88
100
  (_b = (_a = this.props).onDragTargetRestore) === null || _b === void 0 ? void 0 : _b.call(_a);
89
101
  }
@@ -99,6 +111,7 @@ class DragOverLayout extends ReactGridLayout {
99
111
  target,
100
112
  };
101
113
  }
114
+ // @ts-expect-error - onDragOver is a protected method in parent class
102
115
  this.onDragOver(e);
103
116
  }
104
117
  };
@@ -108,15 +121,21 @@ class DragOverLayout extends ReactGridLayout {
108
121
  e.preventDefault();
109
122
  const { droppingItem } = this.props;
110
123
  const { layout } = this.state;
111
- const item = layout.find((l) => l.i === droppingItem.i);
124
+ const item = layout.find((l) => l.i === (droppingItem === null || droppingItem === void 0 ? void 0 : droppingItem.i));
112
125
  // reset dragEnter counter on drop
113
126
  this.resetExternalPlaceholder();
114
- (_b = (_a = this.props).onDrop) === null || _b === void 0 ? void 0 : _b.call(_a, layout, item, e);
127
+ if (item) {
128
+ (_b = (_a = this.props).onDrop) === null || _b === void 0 ? void 0 : _b.call(_a, layout, item, e);
129
+ }
115
130
  }
116
131
  };
132
+ // @ts-expect-error - onDrag is a protected method in parent class
117
133
  this.parentOnDrag = this.onDrag;
134
+ // @ts-expect-error - assigning custom method to parent's onDrag
118
135
  this.onDrag = this.extendedOnDrag;
136
+ // @ts-expect-error - onDragStop is a protected method in parent class
119
137
  this.parentOnDragStop = this.onDragStop;
138
+ // @ts-expect-error - assigning custom method to parent's onDragStop
120
139
  this.onDragStop = this.extendedOnDragStop;
121
140
  }
122
141
  componentDidMount() {
@@ -151,6 +170,7 @@ class DragOverLayout extends ReactGridLayout {
151
170
  return;
152
171
  }
153
172
  // eslint-disable-next-line consistent-return
173
+ // @ts-expect-error - containerHeight is a protected method in parent class
154
174
  return super.containerHeight();
155
175
  }
156
176
  // innerRef is passed by WithProvider without this wrapper there are only
@@ -159,8 +179,8 @@ class DragOverLayout extends ReactGridLayout {
159
179
  // so in that case don't try to use this class on it's own
160
180
  // or pass innerRef: React.MutableRef as it's not optional prop
161
181
  getInnerElement() {
162
- var _a;
163
- return ((_a = this.props.innerRef) === null || _a === void 0 ? void 0 : _a.current) || null;
182
+ const { innerRef } = this.props;
183
+ return innerRef && isRefObject(innerRef) && innerRef.current ? innerRef.current : null;
164
184
  }
165
185
  calculateDroppingPosition(itemProps) {
166
186
  const { containerWidth, cols, w, h, rowHeight, margin, transformScale, droppingPosition } = itemProps;
@@ -182,6 +202,7 @@ class DragOverLayout extends ReactGridLayout {
182
202
  // like overlay adding className
183
203
  processGridItem(child, isDroppingItem) {
184
204
  var _a;
205
+ // @ts-expect-error - processGridItem is a protected method in parent class
185
206
  const gridItem = (_a = super.processGridItem) === null || _a === void 0 ? void 0 : _a.call(this, child, isDroppingItem);
186
207
  if (!gridItem) {
187
208
  return gridItem;
@@ -1 +1 @@
1
- {"version":3,"file":"ReactGridLayout.js","sourceRoot":"../../../../src","sources":["components/GridLayout/ReactGridLayout.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,eAAe,EAAE,EAAC,aAAa,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAC,2BAA2B,EAAE,kBAAkB,EAAC,iCAAwB;AAEhF,MAAM,cAAe,SAAQ,eAAe;IACxC,YAAY,GAAG,IAAI;QACf,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QASnB,2BAAsB,GAAG,IAAI,CAAC;QAmD9B,mDAAmD;QACnD,6BAAwB,GAAG,GAAG,EAAE;YAC5B,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACxB,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;gBAC1B,IAAI,CAAC,yBAAyB,EAAE,CAAC;YACrC,CAAC;QACL,CAAC,CAAC;QAEF,+CAA+C;QAC/C,yBAAoB,GAAG,CAAC,CAAC,EAAE,EAAE;YACzB,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;YAC5B,MAAM,EAAC,IAAI,EAAC,GAAG,IAAI,CAAC,KAAK,CA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AAI,CAAC,CAAC,GAAG,cAAc,CAAC;QAChF,CAAC;QAED,uCACO,gBAAgB,KACnB,IAAI,EAAE,gBAAgB,CAAC,IAAI,GAAG,OAAO,EACrC,GAAG,EAAE,gBAAgB,CAAC,GAAG,GAAG,OAAO,IACrC;IACN,CAAC;IAED,mDAAmD;IACnD,6CAA6C;IAC7C,gEAAgE;IAChE,gCAAgC;IAChC,eAAe,CAAC,KAAK,EAAE,cAAc;;QACjC,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,eAAe,qDAAG,KAAK,EAAE,cAAc,CAAC,CAAC;QAEhE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO,QAAQ,CAAC;QACpB,CAAC;QAED,IAAI,cAAc,EAAE,CAAC;YACjB,kFAAkF;YAClF,OAAO,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE;gBAChC,yCAAyC;gBACzC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB;oBAC/B,CAAC,iCAAK,QAAQ,CAAC,KAAK,CAAC,KAAK,KAAE,OAAO,EAAE,CAAC,IACtC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK;gBAC1B,SAAS,EAAE,GAAG,kBAAkB,IAAI,2BAA2B,EAAE;gBACjE,gBAAgB,EAAE,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,KAAK,CAAC;aACnE,CAAC,CAAC;QACP,CAAC;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ;AAED,mCAAmC;AACnC,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport ReactGridLayout, {WidthProvider, utils} from 'react-grid-layout';\n\nimport {DROPPING_ELEMENT_CLASS_NAME, OVERLAY_CLASS_NAME} from '../../constants';\n\nclass DragOverLayout extends ReactGridLayout {\n constructor(...args) {\n super(...args);\n\n this.parentOnDrag = this.onDrag;\n this.onDrag = this.extendedOnDrag;\n\n this.parentOnDragStop = this.onDragStop;\n this.onDragStop = this.extendedOnDragStop;\n }\n\n _savedDraggedOutLayout = null;\n\n componentDidMount() {\n super.componentDidMount?.();\n\n // If cursor is moved out of the window there is a bug\n // which leaves placeholder element in grid, this action needed to reset this state\n window.addEventListener('dragend', this.resetExternalPlaceholder);\n const innerElement = this.getInnerElement();\n\n if (innerElement) {\n innerElement.addEventListener('mouseup', this.mouseUpHandler);\n innerElement.addEventListener('mouseenter', this.mouseEnterHandler);\n innerElement.addEventListener('mouseleave', this.mouseLeaveHandler);\n innerElement.addEventListener('mousemove', this.mouseMoveHandler);\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener('dragend', this.resetExternalPlaceholder);\n const innerElement = this.getInnerElement();\n\n if (innerElement) {\n innerElement.removeEventListener('mouseup', this.mouseUpHandler);\n innerElement.removeEventListener('mouseenter', this.mouseEnterHandler);\n innerElement.removeEventListener('mouseleave', this.mouseLeaveHandler);\n innerElement.removeEventListener('mousemove', this.mouseMoveHandler);\n }\n }\n\n // react-grid-layout doens't calculate it's height when last element is removed\n // and just keeps the previous value\n // so for autosize to work in that case we are resetting it's height value\n containerHeight() {\n if (this.props.autoSize && this.state.layout.length === 0) {\n return;\n }\n\n // eslint-disable-next-line consistent-return\n return super.containerHeight();\n }\n\n // innerRef is passed by WithProvider without this wrapper there are only\n // * findDOMNode - deprecated\n // * rewrite whole ReactGridLayout.render method\n // so in that case don't try to use this class on it's own\n // or pass innerRef: React.MutableRef as it's not optional prop\n getInnerElement() {\n return this.props.innerRef?.current || null;\n }\n\n // Reset placeholder when item dragged from outside\n resetExternalPlaceholder = () => {\n if (this.dragEnterCounter) {\n this.dragEnterCounter = 0;\n this.removeDroppingPlaceholder();\n }\n };\n\n // Hide placeholder when element is dragged out\n hideLocalPlaceholder = (i) => {\n const {layout} = this.state;\n const {cols} = this.props;\n const savedLayout = layout.map((item) => ({...item}));\n\n let hiddenElement;\n const newLayout = utils.compact(\n layout.filter((item) => {\n if (item.i === i) {\n hiddenElement = item;\n return false;\n }\n\n return true;\n }),\n utils.compactType(this.props),\n cols,\n );\n\n if (hiddenElement) {\n newLayout.push(hiddenElement);\n }\n\n this.setState({\n activeDrag: null,\n layout: newLayout,\n });\n\n return savedLayout;\n };\n\n extendedOnDrag = (i, x, y, sintEv) => {\n if (this.props.isDragCaptured) {\n if (!this._savedDraggedOutLayout) {\n this._savedDraggedOutLayout = this.hideLocalPlaceholder(i);\n }\n\n return;\n }\n\n this._savedDraggedOutLayout = null;\n // parent onDrag will show new placeholder again\n this.parentOnDrag(i, x, y, sintEv);\n };\n\n extendedOnDragStop = (i, x, y, sintEv) => {\n // Restoring layout if item was dropped outside of the grid\n if (this._savedDraggedOutLayout) {\n const savedLayout = this._savedDraggedOutLayout;\n const l = utils.getLayoutItem(savedLayout, i);\n\n // Create placeholder (display only)\n const placeholder = {\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n placeholder: true,\n i: i,\n };\n\n this.setState(\n {\n layout: savedLayout,\n activeDrag: placeholder,\n },\n () => {\n this.parentOnDragStop(i, x, y, sintEv);\n },\n );\n\n this._savedDraggedOutLayout = null;\n } else {\n this.parentOnDragStop(i, x, y, sintEv);\n }\n };\n\n // Proxy mouse events -> drag methods for dnd between groups\n mouseEnterHandler = (e) => {\n if (this.props.hasSharedDragItem) {\n this.onDragEnter(e);\n } else if (this.props.isDragCaptured) {\n this.props.onDragTargetRestore?.();\n }\n };\n\n mouseLeaveHandler = (e) => {\n if (this.props.hasSharedDragItem) {\n this.onDragLeave(e);\n this.props.onDragTargetRestore?.();\n }\n };\n\n mouseMoveHandler = (e) => {\n if (this.props.hasSharedDragItem) {\n if (!e.nativeEvent) {\n // Emulate nativeEvent for firefox\n const target = this.getInnerElement() || e.target;\n\n e.nativeEvent = {\n clientX: e.clientX,\n clientY: e.clientY,\n target,\n };\n }\n\n this.onDragOver(e);\n }\n };\n\n mouseUpHandler = (e) => {\n if (this.props.hasSharedDragItem) {\n e.preventDefault();\n const {droppingItem} = this.props;\n const {layout} = this.state;\n const item = layout.find((l) => l.i === droppingItem.i);\n\n // reset dragEnter counter on drop\n this.resetExternalPlaceholder();\n\n this.props.onDrop?.(layout, item, e);\n }\n };\n\n calculateDroppingPosition(itemProps) {\n const {containerWidth, cols, w, h, rowHeight, margin, transformScale, droppingPosition} =\n itemProps;\n const {sharedDragPosition} = this.props;\n\n let offsetX, offsetY;\n\n if (sharedDragPosition) {\n offsetX = sharedDragPosition.offsetX;\n offsetY = sharedDragPosition.offsetY;\n } else {\n offsetX = (((containerWidth / cols) * w) / 2 || 0) * transformScale;\n offsetY = ((h * rowHeight + (h - 1) * margin[1]) / 2 || 0) * transformScale;\n }\n\n return {\n ...droppingPosition,\n left: droppingPosition.left - offsetX,\n top: droppingPosition.top - offsetY,\n };\n }\n\n // Drop item from outside gets 0,0 droppingPosition\n // centering cursor on newly creted grid item\n // And cause grid-layout using it's own GridItem to make it look\n // like overlay adding className\n processGridItem(child, isDroppingItem) {\n const gridItem = super.processGridItem?.(child, isDroppingItem);\n\n if (!gridItem) {\n return gridItem;\n }\n\n if (isDroppingItem) {\n // React.cloneElement is just cleaner then copy-paste whole processGridItem method\n return React.cloneElement(gridItem, {\n // hiding preview if dragging shared item\n style: this.props.hasSharedDragItem\n ? {...gridItem.props.style, opacity: 0}\n : gridItem.props.style,\n className: `${OVERLAY_CLASS_NAME} ${DROPPING_ELEMENT_CLASS_NAME}`,\n droppingPosition: this.calculateDroppingPosition(gridItem.props),\n });\n }\n\n return gridItem;\n }\n}\n\n// eslint-disable-next-line new-cap\nexport const Layout = WidthProvider(DragOverLayout);\n"]}
1
+ {"version":3,"file":"ReactGridLayout.js","sourceRoot":"../../../../src","sources":["components/GridLayout/ReactGridLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,+DAA+D;AAC/D,OAAO,eAAe,EAAE,EAAC,aAAa,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAExE,OAAO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,IAAI,EAAE,gBAAgB,CAAC,IAAI,GAAG,OAAO,EACrC,GAAG,EAAE,gBAAgB,CAAC,GAAG,GAAG,OAAO,IACrC;IACN,CAAC;IAED,mDAAmD;IACnD,6CAA6C;IAC7C,gEAAgE;IAChE,gCAAgC;IAChC,eAAe,CACX,KAAyB,EACzB,cAAwB;;QAExB,2EAA2E;QAC3E,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,eAAe,qDAAG,KAAK,EAAE,cAAc,CAAC,CAAC;QAEhE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO,QAAQ,CAAC;QACpB,CAAC;QAED,IAAI,cAAc,EAAE,CAAC;YACjB,kFAAkF;YAClF,OAAO,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE;gBAChC,yCAAyC;gBACzC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB;oBAC/B,CAAC,iCAAK,QAAQ,CAAC,KAAK,CAAC,KAAK,KAAE,OAAO,EAAE,CAAC,IACtC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK;gBAC1B,SAAS,EAAE,GAAG,kBAAkB,IAAI,2BAA2B,EAAE;gBACjE,gBAAgB,EAAE,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,KAAK,CAAC;aACnE,CAAC,CAAC;QACP,CAAC;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ;AAED,mCAAmC;AACnC,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAsB,cAAc,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport type {Layout as RGLLayout} from 'react-grid-layout';\n// @ts-expect-error - utils is not exported in type definitions\nimport ReactGridLayout, {WidthProvider, utils} from 'react-grid-layout';\n\nimport {DROPPING_ELEMENT_CLASS_NAME, OVERLAY_CLASS_NAME} from '../../constants';\n\nconst isRefObject = (\n value: React.Ref<HTMLDivElement>,\n): value is React.RefObject<HTMLDivElement> => {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'current' in value &&\n typeof value.current === 'object'\n );\n};\n\ntype SharedDragPosition = {\n offsetX: number;\n offsetY: number;\n};\n\ntype DragOverLayoutProps = ReactGridLayout.ReactGridLayoutProps & {\n innerRef?: React.Ref<HTMLDivElement>;\n isDragCaptured?: boolean;\n hasSharedDragItem?: boolean;\n sharedDragPosition?: SharedDragPosition;\n onDragTargetRestore?: () => void;\n};\n\ntype DragOverLayoutState = {\n layout: RGLLayout[];\n activeDrag: RGLLayout | null;\n};\n\ntype RGLLayoutWithPlaceholder = RGLLayout & {placeholder?: boolean};\n\ntype OnDragMethod = (\n i: string,\n x: number,\n y: number,\n sintEv: {e: Event; node: HTMLElement},\n) => void;\n\nclass DragOverLayout extends ReactGridLayout {\n // @ts-expect-error - TypeScript doesn't allow direct property redeclaration in extending classes. We need to narrow the props type from ReactGridLayoutProps to DragOverLayoutProps for type safety in our custom methods\n props: DragOverLayoutProps;\n // @ts-expect-error - TypeScript doesn't allow direct property redeclaration in extending classes. State is initialized by parent constructor\n state: DragOverLayoutState;\n\n parentOnDrag: OnDragMethod;\n parentOnDragStop: OnDragMethod;\n _savedDraggedOutLayout: RGLLayout[] | null = null;\n\n constructor(props: DragOverLayoutProps, context?: unknown) {\n super(props, context);\n\n // @ts-expect-error - onDrag is a protected method in parent class\n this.parentOnDrag = this.onDrag;\n // @ts-expect-error - assigning custom method to parent's onDrag\n this.onDrag = this.extendedOnDrag;\n\n // @ts-expect-error - onDragStop is a protected method in parent class\n this.parentOnDragStop = this.onDragStop;\n // @ts-expect-error - assigning custom method to parent's onDragStop\n this.onDragStop = this.extendedOnDragStop;\n }\n\n componentDidMount(): void {\n super.componentDidMount?.();\n\n // If cursor is moved out of the window there is a bug\n // which leaves placeholder element in grid, this action needed to reset this state\n window.addEventListener('dragend', this.resetExternalPlaceholder);\n const innerElement = this.getInnerElement();\n\n if (innerElement) {\n innerElement.addEventListener('mouseup', this.mouseUpHandler);\n innerElement.addEventListener('mouseenter', this.mouseEnterHandler);\n innerElement.addEventListener('mouseleave', this.mouseLeaveHandler);\n innerElement.addEventListener('mousemove', this.mouseMoveHandler);\n }\n }\n\n componentWillUnmount(): void {\n window.removeEventListener('dragend', this.resetExternalPlaceholder);\n const innerElement = this.getInnerElement();\n\n if (innerElement) {\n innerElement.removeEventListener('mouseup', this.mouseUpHandler);\n innerElement.removeEventListener('mouseenter', this.mouseEnterHandler);\n innerElement.removeEventListener('mouseleave', this.mouseLeaveHandler);\n innerElement.removeEventListener('mousemove', this.mouseMoveHandler);\n }\n }\n\n // react-grid-layout doens't calculate it's height when last element is removed\n // and just keeps the previous value\n // so for autosize to work in that case we are resetting it's height value\n containerHeight(): string | undefined {\n if (this.props.autoSize && this.state.layout.length === 0) {\n return;\n }\n\n // eslint-disable-next-line consistent-return\n // @ts-expect-error - containerHeight is a protected method in parent class\n return super.containerHeight();\n }\n\n // innerRef is passed by WithProvider without this wrapper there are only\n // * findDOMNode - deprecated\n // * rewrite whole ReactGridLayout.render method\n // so in that case don't try to use this class on it's own\n // or pass innerRef: React.MutableRef as it's not optional prop\n getInnerElement(): HTMLDivElement | null {\n const {innerRef} = this.props;\n\n return innerRef && isRefObject(innerRef) && innerRef.current ? innerRef.current : null;\n }\n\n // Reset placeholder when item dragged from outside\n resetExternalPlaceholder = (): void => {\n // @ts-expect-error - dragEnterCounter is an internal property of parent class\n if (this.dragEnterCounter) {\n // @ts-expect-error - dragEnterCounter is an internal property of parent class\n this.dragEnterCounter = 0;\n // @ts-expect-error - removeDroppingPlaceholder is a protected method in parent class\n this.removeDroppingPlaceholder();\n }\n };\n\n // Hide placeholder when element is dragged out\n hideLocalPlaceholder = (i: string): RGLLayout[] => {\n const {layout} = this.state;\n const {cols} = this.props;\n const savedLayout = layout.map((item) => ({...item}));\n\n let hiddenElement: RGLLayout | undefined;\n const newLayout = utils.compact(\n layout.filter((item) => {\n if (item.i === i) {\n hiddenElement = item;\n return false;\n }\n\n return true;\n }),\n utils.compactType(this.props),\n cols,\n );\n\n if (hiddenElement) {\n newLayout.push(hiddenElement);\n }\n\n this.setState({\n activeDrag: null,\n layout: newLayout,\n });\n\n return savedLayout;\n };\n\n extendedOnDrag = (\n i: string,\n x: number,\n y: number,\n sintEv: {e: Event; node: HTMLElement},\n ): void => {\n if (this.props.isDragCaptured) {\n if (!this._savedDraggedOutLayout) {\n this._savedDraggedOutLayout = this.hideLocalPlaceholder(i);\n }\n\n return;\n }\n\n this._savedDraggedOutLayout = null;\n // parent onDrag will show new placeholder again\n this.parentOnDrag(i, x, y, sintEv);\n };\n\n extendedOnDragStop = (\n i: string,\n x: number,\n y: number,\n sintEv: {e: Event; node: HTMLElement},\n ): void => {\n // Restoring layout if item was dropped outside of the grid\n if (this._savedDraggedOutLayout) {\n const savedLayout = this._savedDraggedOutLayout;\n const l = utils.getLayoutItem(savedLayout, i);\n\n // Create placeholder (display only)\n const placeholder: RGLLayoutWithPlaceholder = {\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n placeholder: true,\n i: i,\n };\n\n this.setState(\n {\n layout: savedLayout,\n activeDrag: placeholder,\n },\n () => {\n this.parentOnDragStop(i, x, y, sintEv);\n },\n );\n\n this._savedDraggedOutLayout = null;\n } else {\n this.parentOnDragStop(i, x, y, sintEv);\n }\n };\n\n // Proxy mouse events -> drag methods for dnd between groups\n mouseEnterHandler = (e: MouseEvent): void => {\n if (this.props.hasSharedDragItem) {\n // @ts-expect-error - onDragEnter is a protected method in parent class\n this.onDragEnter(e);\n } else if (this.props.isDragCaptured) {\n this.props.onDragTargetRestore?.();\n }\n };\n\n mouseLeaveHandler = (e: MouseEvent): void => {\n if (this.props.hasSharedDragItem) {\n // @ts-expect-error - onDragLeave is a protected method in parent class\n this.onDragLeave(e);\n this.props.onDragTargetRestore?.();\n }\n };\n\n mouseMoveHandler = (e: MouseEvent): void => {\n if (this.props.hasSharedDragItem) {\n if (!(e as MouseEvent & {nativeEvent?: MouseEvent}).nativeEvent) {\n // Emulate nativeEvent for firefox\n const target = this.getInnerElement() || (e.target as HTMLElement);\n\n (e as MouseEvent & {nativeEvent: Partial<MouseEvent>}).nativeEvent = {\n clientX: e.clientX,\n clientY: e.clientY,\n target,\n };\n }\n\n // @ts-expect-error - onDragOver is a protected method in parent class\n this.onDragOver(e);\n }\n };\n\n mouseUpHandler = (e: MouseEvent): void => {\n if (this.props.hasSharedDragItem) {\n e.preventDefault();\n const {droppingItem} = this.props;\n const {layout} = this.state;\n const item = layout.find((l) => l.i === droppingItem?.i);\n\n // reset dragEnter counter on drop\n this.resetExternalPlaceholder();\n\n if (item) {\n this.props.onDrop?.(layout, item, e);\n }\n }\n };\n\n calculateDroppingPosition(itemProps: {\n containerWidth: number;\n cols: number;\n w: number;\n h: number;\n rowHeight: number;\n margin: [number, number];\n transformScale: number;\n droppingPosition: {left: number; top: number};\n }): {left: number; top: number} {\n const {containerWidth, cols, w, h, rowHeight, margin, transformScale, droppingPosition} =\n itemProps;\n const {sharedDragPosition} = this.props;\n\n let offsetX: number, offsetY: number;\n\n if (sharedDragPosition) {\n offsetX = sharedDragPosition.offsetX;\n offsetY = sharedDragPosition.offsetY;\n } else {\n offsetX = (((containerWidth / cols) * w) / 2 || 0) * transformScale;\n offsetY = ((h * rowHeight + (h - 1) * margin[1]) / 2 || 0) * transformScale;\n }\n\n return {\n ...droppingPosition,\n left: droppingPosition.left - offsetX,\n top: droppingPosition.top - offsetY,\n };\n }\n\n // Drop item from outside gets 0,0 droppingPosition\n // centering cursor on newly creted grid item\n // And cause grid-layout using it's own GridItem to make it look\n // like overlay adding className\n processGridItem(\n child: React.ReactElement,\n isDroppingItem?: boolean,\n ): React.ReactElement | undefined {\n // @ts-expect-error - processGridItem is a protected method in parent class\n const gridItem = super.processGridItem?.(child, isDroppingItem);\n\n if (!gridItem) {\n return gridItem;\n }\n\n if (isDroppingItem) {\n // React.cloneElement is just cleaner then copy-paste whole processGridItem method\n return React.cloneElement(gridItem, {\n // hiding preview if dragging shared item\n style: this.props.hasSharedDragItem\n ? {...gridItem.props.style, opacity: 0}\n : gridItem.props.style,\n className: `${OVERLAY_CLASS_NAME} ${DROPPING_ELEMENT_CLASS_NAME}`,\n droppingPosition: this.calculateDroppingPosition(gridItem.props),\n });\n }\n\n return gridItem;\n }\n}\n\n// eslint-disable-next-line new-cap\nexport const Layout = WidthProvider<DragOverLayoutProps>(DragOverLayout);\n"]}
@@ -0,0 +1,59 @@
1
+ import type { DragOverEvent } from 'react-grid-layout';
2
+ import type { ReactGridLayoutProps } from 'src/typings';
3
+ import type { ConfigItem, ConfigLayout, ItemDragProps } from "../../shared/index.js";
4
+ export type GridLayoutProps = {
5
+ ref?: React.ForwardedRef<unknown>;
6
+ };
7
+ export type GridLayoutState = {
8
+ isDragging: boolean;
9
+ isDraggedOut: boolean;
10
+ isPageHidden: boolean;
11
+ currentDraggingElement: CurrentDraggingElement | null;
12
+ draggedOverGroup: string | null;
13
+ };
14
+ export type CurrentDraggingElement = {
15
+ group: string;
16
+ layoutItem: ConfigLayout;
17
+ item: ConfigItem | ItemDragProps;
18
+ cursorPosition: {
19
+ offsetX: number;
20
+ offsetY: number;
21
+ };
22
+ };
23
+ export type ReloadItemsOptions = {
24
+ targetIds?: string[];
25
+ force?: boolean;
26
+ };
27
+ export type ManipulationCallbackArgs = {
28
+ group: string;
29
+ layout: ConfigLayout[];
30
+ oldItem: ConfigLayout;
31
+ newItem: ConfigLayout;
32
+ placeholder: ConfigLayout;
33
+ e: MouseEvent;
34
+ element: HTMLElement;
35
+ };
36
+ export type MemoGroupLayout = {
37
+ key: string;
38
+ layout: ConfigLayout[];
39
+ };
40
+ type GroupCallback = (layout: ConfigLayout[], layoutItem: ConfigLayout, newItem: ConfigLayout, placeholder: ConfigLayout, event: MouseEvent, element: HTMLElement) => void;
41
+ export type GroupCallbacks = {
42
+ onDragStart: GroupCallback;
43
+ onDrag: GroupCallback;
44
+ onDragStop: GroupCallback;
45
+ onResizeStart: GroupCallback;
46
+ onResize: GroupCallback;
47
+ onResizeStop: GroupCallback;
48
+ onDrop: (layout: ConfigLayout[], item: ConfigLayout | undefined, e: MouseEvent) => void | false;
49
+ onDropDragOver: (event: DragOverEvent) => {
50
+ w?: number;
51
+ h?: number;
52
+ } | false | undefined;
53
+ onDragTargetRestore: (group?: string) => void;
54
+ };
55
+ export type LayoutAndPropsByGroup = {
56
+ properties: Partial<ReactGridLayoutProps>;
57
+ layout: ConfigLayout[];
58
+ };
59
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"../../../../src","sources":["components/GridLayout/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {DragOverEvent} from 'react-grid-layout';\n\nimport type {ReactGridLayoutProps} from 'src/typings';\n\nimport type {ConfigItem, ConfigLayout, ItemDragProps} from '../../shared';\n\nexport type GridLayoutProps = {\n ref?: React.ForwardedRef<unknown>;\n};\n\nexport type GridLayoutState = {\n isDragging: boolean;\n isDraggedOut: boolean;\n isPageHidden: boolean;\n currentDraggingElement: CurrentDraggingElement | null;\n draggedOverGroup: string | null;\n};\n\nexport type CurrentDraggingElement = {\n group: string;\n layoutItem: ConfigLayout;\n item: ConfigItem | ItemDragProps;\n cursorPosition: {\n offsetX: number;\n offsetY: number;\n };\n};\n\nexport type ReloadItemsOptions = {\n targetIds?: string[];\n force?: boolean;\n};\n\nexport type ManipulationCallbackArgs = {\n group: string;\n layout: ConfigLayout[];\n oldItem: ConfigLayout;\n newItem: ConfigLayout;\n placeholder: ConfigLayout;\n e: MouseEvent;\n element: HTMLElement;\n};\n\nexport type MemoGroupLayout = {\n key: string;\n layout: ConfigLayout[];\n};\n\ntype GroupCallback = (\n layout: ConfigLayout[],\n layoutItem: ConfigLayout,\n newItem: ConfigLayout,\n placeholder: ConfigLayout,\n event: MouseEvent,\n element: HTMLElement,\n) => void;\n\nexport type GroupCallbacks = {\n onDragStart: GroupCallback;\n onDrag: GroupCallback;\n onDragStop: GroupCallback;\n onResizeStart: GroupCallback;\n onResize: GroupCallback;\n onResizeStop: GroupCallback;\n onDrop: (layout: ConfigLayout[], item: ConfigLayout | undefined, e: MouseEvent) => void | false;\n onDropDragOver: (event: DragOverEvent) => {w?: number; h?: number} | false | undefined;\n onDragTargetRestore: (group?: string) => void;\n};\n\nexport type LayoutAndPropsByGroup = {\n properties: Partial<ReactGridLayoutProps>;\n layout: ConfigLayout[];\n};\n"]}
@@ -1,73 +1,18 @@
1
- declare const _default: {
2
- new (props: any): {
3
- shouldComponentUpdate(nextProps: any): boolean;
4
- _onStateAndParamsChange: (stateAndParams: any, options: any) => void;
5
- _currentRenderProps: {};
6
- getRenderProps: () => {};
7
- render(): JSX.Element;
8
- context: unknown;
9
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
10
- forceUpdate(callback?: (() => void) | undefined): void;
11
- readonly props: Readonly<any>;
12
- state: Readonly<any>;
13
- refs: {
14
- [key: string]: React.ReactInstance;
15
- };
16
- componentDidMount?(): void;
17
- componentWillUnmount?(): void;
18
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
19
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
20
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
21
- componentWillMount?(): void;
22
- UNSAFE_componentWillMount?(): void;
23
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
24
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
25
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
26
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
27
- };
28
- new (props: any, context: any): {
29
- shouldComponentUpdate(nextProps: any): boolean;
30
- _onStateAndParamsChange: (stateAndParams: any, options: any) => void;
31
- _currentRenderProps: {};
32
- getRenderProps: () => {};
33
- render(): JSX.Element;
34
- context: unknown;
35
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
36
- forceUpdate(callback?: (() => void) | undefined): void;
37
- readonly props: Readonly<any>;
38
- state: Readonly<any>;
39
- refs: {
40
- [key: string]: React.ReactInstance;
41
- };
42
- componentDidMount?(): void;
43
- componentWillUnmount?(): void;
44
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
45
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
46
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
47
- componentWillMount?(): void;
48
- UNSAFE_componentWillMount?(): void;
49
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
50
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
51
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
52
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
53
- };
54
- propTypes: {
55
- gridLayout: PropTypes.Requireable<object>;
56
- adjustWidgetLayout: PropTypes.Validator<(...args: any[]) => any>;
57
- layout: PropTypes.Requireable<any[]>;
58
- id: PropTypes.Requireable<string>;
59
- item: PropTypes.Requireable<object>;
60
- shouldItemUpdate: PropTypes.Requireable<boolean>;
61
- width: PropTypes.Requireable<number>;
62
- height: PropTypes.Requireable<number>;
63
- transform: PropTypes.Requireable<string>;
64
- isPlaceholder: PropTypes.Requireable<boolean>;
65
- onItemRender: PropTypes.Requireable<(...args: any[]) => any>;
66
- onItemMountChange: PropTypes.Requireable<(...args: any[]) => any>;
67
- forwardedPluginRef: PropTypes.Requireable<any>;
68
- };
69
- contextType: React.Context<import("../../context/index.js").DashKitCtxShape>;
70
- };
71
- export default _default;
72
1
  import React from 'react';
73
- import PropTypes from 'prop-types';
2
+ import "./Item.css";
3
+ declare const _default: React.ComponentClass<{
4
+ gridLayout?: import("../../index.js").ReactGridLayoutProps;
5
+ adjustWidgetLayout: import("../../index.js").PluginWidgetProps["adjustWidgetLayout"];
6
+ layout: import("../../index.js").ConfigLayout[];
7
+ id: string;
8
+ item: import("../../index.js").ConfigItem;
9
+ shouldItemUpdate?: boolean;
10
+ width?: number;
11
+ height?: number;
12
+ transform?: string;
13
+ isPlaceholder?: boolean;
14
+ onItemRender?: import("../index.js").DashKitProps["onItemRender"];
15
+ onItemMountChange?: import("../index.js").DashKitProps["onItemMountChange"];
16
+ forwardedPluginRef?: (ref: import("../../index.js").PluginRef) => void;
17
+ }, any>;
18
+ export default _default;