@gravity-ui/dashkit 10.5.0 → 10.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/components/ActionPanel/ActionPanel.css +6 -4
- package/build/cjs/components/GridLayout/GridLayout.d.ts +1 -1
- package/build/cjs/components/GridLayout/GridLayout.js +25 -8
- package/build/cjs/components/GridLayout/GridLayout.js.map +1 -1
- package/build/cjs/components/GridLayout/ReactGridLayout.d.ts +1 -0
- package/build/cjs/components/GridLayout/ReactGridLayout.js +30 -0
- package/build/cjs/components/GridLayout/ReactGridLayout.js.map +1 -1
- package/build/cjs/components/GridLayout/utils.d.ts +1 -0
- package/build/cjs/components/GridLayout/utils.js +11 -0
- package/build/cjs/components/GridLayout/utils.js.map +1 -1
- package/build/cjs/package.json +1 -1
- package/build/esm/components/ActionPanel/ActionPanel.css +6 -4
- package/build/esm/components/GridLayout/GridLayout.d.ts +1 -1
- package/build/esm/components/GridLayout/GridLayout.js +25 -8
- package/build/esm/components/GridLayout/GridLayout.js.map +1 -1
- package/build/esm/components/GridLayout/ReactGridLayout.d.ts +1 -0
- package/build/esm/components/GridLayout/ReactGridLayout.js +30 -0
- package/build/esm/components/GridLayout/ReactGridLayout.js.map +1 -1
- package/build/esm/components/GridLayout/utils.d.ts +1 -0
- package/build/esm/components/GridLayout/utils.js +10 -0
- package/build/esm/components/GridLayout/utils.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactGridLayout.js","sourceRoot":"../../../../src","sources":["components/GridLayout/ReactGridLayout.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAE1B,yCAAoC;AAEpC,+DAA+D;AAC/D,+EAAyD;AACzD,gGAA8D;AAE9D,wDAAgF;AAEhF,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AACnD,MAAM,0BAA0B,GAAG,GAAG,CAAC;AAEvC,MAAM,WA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AgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,IAChC,CACL,CAAC;IACN,CAAC;CAmJJ;AAEY,QAAA,MAAM,GAAG,oBAAoB,CAAC","sourcesContent":["import React from 'react';\n\nimport {flushSync} from 'react-dom';\nimport type {Layout as RGLLayout} from 'react-grid-layout';\n// @ts-expect-error - utils is not exported in type definitions\nimport ReactGridLayout, {utils} from 'react-grid-layout';\nimport ResizeObserverPolyfill from 'resize-observer-polyfill';\n\nimport {DROPPING_ELEMENT_CLASS_NAME, OVERLAY_CLASS_NAME} from '../../constants';\n\nconst GRID_LAYOUT_CLASS_NAME = 'react-grid-layout';\nconst SETTLED_WIDTH_COMMIT_DELAY = 150;\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 dragStateRef?: React.MutableRefObject<{isDragging: boolean; sourceGroup: string | null}>;\n sharedDragPositionRef?: React.MutableRefObject<SharedDragPosition | null>;\n group?: string;\n onDragTargetRestore?: () => void;\n transformScaleRef?: React.MutableRefObject<number>;\n groupResetRegistryRef?: React.MutableRefObject<Map<string, () => void>>;\n externalLayoutRevision?: number;\n onBeforeDragOver?: () => void;\n};\n\ntype DragOverLayoutState = {\n layout: RGLLayout[];\n activeDrag: RGLLayout | null;\n};\n\ntype RGLLayoutWithPlaceholder = RGLLayout & {placeholder?: boolean};\n\ntype PassiveWidthProviderProps = DragOverLayoutProps & {\n measureBeforeMount?: boolean;\n};\n\ntype OnDragMethod = (\n i: string,\n x: number,\n y: number,\n sintEv: {e: Event; node: HTMLElement},\n) => void;\n\nconst getGridItemStyle = ({\n cols,\n containerPadding,\n margin,\n width,\n x,\n y,\n w,\n h,\n rowHeight,\n useCSSTransforms,\n}: {\n cols: number;\n containerPadding: [number, number];\n h: number;\n margin: [number, number];\n rowHeight: number;\n useCSSTransforms: boolean;\n w: number;\n width: number;\n x: number;\n y: number;\n}) => {\n const [marginX, marginY] = margin;\n const [paddingX, paddingY] = containerPadding;\n const columnWidth = (width - marginX * (cols - 1) - paddingX * 2) / cols;\n const position = {\n height: Math.round(rowHeight * h + marginY * (h - 1)),\n left: Math.round((columnWidth + marginX) * x + paddingX),\n top: Math.round(paddingY + (rowHeight + marginY) * y),\n width: Math.round(columnWidth * w + marginX * (w - 1)),\n };\n\n return useCSSTransforms\n ? {...utils.setTransform(position), left: '', top: ''}\n : {\n ...utils.setTopLeft(position),\n MozTransform: '',\n OTransform: '',\n WebkitTransform: '',\n msTransform: '',\n transform: '',\n };\n};\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 parentOnDragOver: (e: MouseEvent) => false | void;\n _savedDraggedOutLayout: RGLLayout[] | null = null;\n // Suppresses onLayoutMaybeChanged during imperative layout restore actions.\n // Without this flag, our setState would trigger onLayoutChange back to the consumer\n // that just initiated the action, causing a spurious 'change' event.\n _isRestoringExternalLayout = false;\n private readonly gridItemChildren = new WeakMap<\n React.ReactElement,\n {child: React.ReactElement; metadata: Record<string, string>}\n >();\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 // @ts-expect-error - onDragOver is a protected method in parent class\n this.parentOnDragOver = this.onDragOver;\n // @ts-expect-error - assigning custom method to parent's onDragOver\n this.onDragOver = this.extendedOnDragOver;\n }\n\n componentDidMount(): void {\n super.componentDidMount?.();\n\n if (this.props.group !== undefined) {\n this.props.groupResetRegistryRef?.current.set(\n this.props.group,\n this.resetExternalPlaceholder,\n );\n }\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 componentDidUpdate(prevProps: DragOverLayoutProps, prevState: DragOverLayoutState): void {\n const revisionChanged =\n prevProps.externalLayoutRevision !== this.props.externalLayoutRevision;\n\n if (revisionChanged && this.props.layout) {\n const newLayout = utils.synchronizeLayoutWithChildren(\n this.props.layout,\n this.props.children,\n this.props.cols,\n utils.compactType(this.props),\n this.props.allowOverlap,\n );\n\n this._isRestoringExternalLayout = true;\n // Override both layout and propsLayout so getDerivedStateFromProps\n // doesn't revert our update on the next render cycle.\n this.setState(\n {\n layout: newLayout,\n propsLayout: this.props.layout,\n } as unknown as DragOverLayoutState,\n () => {\n this._isRestoringExternalLayout = false;\n },\n );\n // RGL's shouldComponentUpdate only tracks activeDrag/mounted/droppingPosition — not\n // state.layout. So setState({layout}) alone is silently ignored (no re-render).\n // forceUpdate bypasses SCU and is batched with the setState above, producing a\n // single render cycle with the merged state that includes the restored layout.\n this.forceUpdate();\n // Don't call super here: restoring is an external action, not a user drag/resize.\n // onLayoutMaybeChanged is suppressed via _isRestoringExternalLayout.\n return;\n }\n\n // Maintain parent behavior for all non-restore cycles (drag, resize, etc.).\n super.componentDidUpdate?.(prevProps, prevState);\n }\n\n onLayoutMaybeChanged(newLayout: RGLLayout[], oldLayout: RGLLayout[]): void {\n if (this._isRestoringExternalLayout) {\n return;\n }\n // @ts-expect-error — onLayoutMaybeChanged is not in ReactGridLayout's public types\n super.onLayoutMaybeChanged(newLayout, oldLayout);\n }\n\n componentWillUnmount(): void {\n if (this.props.group !== undefined) {\n this.props.groupResetRegistryRef?.current.delete(this.props.group);\n }\n\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 extendedOnDragOver = (e: MouseEvent): false | void => {\n this.props.onBeforeDragOver?.();\n return this.parentOnDragOver(e);\n };\n\n isSharedDragTarget = (): boolean => {\n const drag = this.props.dragStateRef?.current;\n return Boolean(drag?.isDragging);\n };\n\n // Proxy mouse events -> drag methods for dnd between groups\n mouseEnterHandler = (e: MouseEvent): void => {\n if (this.isSharedDragTarget()) {\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.isSharedDragTarget()) {\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 (\n this.isSharedDragTarget() &&\n this.props.group !== this.props.dragStateRef?.current.sourceGroup\n ) {\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.isSharedDragTarget()) {\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 for all registered groups\n this.props.groupResetRegistryRef?.current.forEach((reset) => reset());\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.sharedDragPositionRef?.current;\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 const {cols, containerPadding, h, margin, rowHeight, useCSSTransforms, w, x, y} =\n gridItem.props;\n const [marginX, marginY] = margin;\n const [paddingX, paddingY] = containerPadding;\n const gridItemMetadata: Record<string, string> = {\n 'data-dashkit-grid-cols': String(cols),\n 'data-dashkit-grid-h': String(h),\n 'data-dashkit-grid-margin-x': String(marginX),\n 'data-dashkit-grid-margin-y': String(marginY),\n 'data-dashkit-grid-padding-x': String(paddingX),\n 'data-dashkit-grid-padding-y': String(paddingY),\n 'data-dashkit-grid-row-height': String(rowHeight),\n 'data-dashkit-grid-use-css-transforms': String(useCSSTransforms),\n 'data-dashkit-grid-w': String(w),\n 'data-dashkit-grid-x': String(x),\n 'data-dashkit-grid-y': String(y),\n };\n // Lazy proxy for transformScaleRef so react-draggable reads fresh scale without re-render.\n const {transformScaleRef} = this.props;\n const lazyScale = transformScaleRef\n ? ({valueOf: () => transformScaleRef.current} as unknown as number)\n : undefined;\n\n if (isDroppingItem) {\n // React.cloneElement is just cleaner then copy-paste whole processGridItem method\n return React.cloneElement(gridItem, {\n ...(lazyScale !== undefined && {transformScale: lazyScale}),\n // hiding preview if dragging shared item\n style: this.isSharedDragTarget()\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 const gridChild = gridItem.props.children as React.ReactElement<Record<string, string>>;\n const cachedGridItemChild = this.gridItemChildren.get(gridChild);\n const gridItemChild =\n cachedGridItemChild &&\n Object.keys(gridItemMetadata).every(\n (key) => cachedGridItemChild.metadata[key] === gridItemMetadata[key],\n )\n ? cachedGridItemChild.child\n : React.cloneElement(gridChild, gridItemMetadata);\n\n if (gridItemChild !== cachedGridItemChild?.child) {\n this.gridItemChildren.set(gridChild, {\n child: gridItemChild,\n metadata: gridItemMetadata,\n });\n }\n\n if (lazyScale !== undefined) {\n return React.cloneElement(gridItem, {\n children: gridItemChild,\n transformScale: lazyScale,\n });\n }\n\n return React.cloneElement(gridItem, {children: gridItemChild});\n }\n}\n\nclass PassiveWidthProvider extends React.Component<\n PassiveWidthProviderProps,\n {interactionRevision: number; isMounted: boolean; settledWidth: number}\n> {\n state = {interactionRevision: 0, isMounted: false, settledWidth: 1280};\n\n private element: HTMLDivElement | null = null;\n private readonly elementRef = React.createRef<HTMLDivElement>();\n private readonly widthRef = {current: 1280};\n private gridItems: HTMLElement[] = [];\n private lastAppliedWidth?: number;\n private resizeObserver?: ResizeObserver;\n private settledWidthCommitTimer?: number;\n private isComponentMounted = false;\n\n componentDidMount() {\n this.isComponentMounted = true;\n this.syncElement();\n this.setState({isMounted: true, settledWidth: this.widthRef.current});\n }\n\n componentDidUpdate() {\n this.syncElement();\n this.cacheGridItems();\n this.updateGridItems(this.widthRef.current);\n }\n\n componentWillUnmount() {\n this.isComponentMounted = false;\n this.resizeObserver?.disconnect();\n this.resizeObserver = undefined;\n this.cancelSettledWidthCommit();\n this.element?.removeEventListener('pointerdown', this.handlePointerDown, true);\n this.element = null;\n }\n\n render() {\n const {measureBeforeMount, ...props} = this.props;\n\n if (measureBeforeMount && !this.state.isMounted) {\n return (\n <div\n className={[props.className, GRID_LAYOUT_CLASS_NAME].filter(Boolean).join(' ')}\n ref={this.elementRef}\n style={props.style}\n />\n );\n }\n\n return (\n <DragOverLayout\n {...props}\n innerRef={this.elementRef}\n onBeforeDragOver={this.syncSettledWidth}\n width={this.state.settledWidth}\n />\n );\n }\n\n private cacheGridItems = () => {\n const node = this.element;\n this.gridItems = node\n ? Array.from(node.children).filter(\n (child): child is HTMLElement =>\n child instanceof HTMLElement &&\n child.matches('.react-grid-item[data-dashkit-grid-cols]'),\n )\n : [];\n this.lastAppliedWidth = undefined;\n };\n\n private updateGridItems = (width: number) => {\n if (width === this.lastAppliedWidth) {\n return;\n }\n this.lastAppliedWidth = width;\n\n this.gridItems.forEach((item) => {\n if (\n item.classList.contains('react-draggable-dragging') ||\n item.classList.contains('resizing')\n ) {\n return;\n }\n\n const {dataset, style} = item;\n const cols = Number(dataset.dashkitGridCols);\n const x = Number(dataset.dashkitGridX);\n const y = Number(dataset.dashkitGridY);\n const w = Number(dataset.dashkitGridW);\n const h = Number(dataset.dashkitGridH);\n const marginX = Number(dataset.dashkitGridMarginX);\n const marginY = Number(dataset.dashkitGridMarginY);\n const paddingX = Number(dataset.dashkitGridPaddingX);\n const paddingY = Number(dataset.dashkitGridPaddingY);\n const rowHeight = Number(dataset.dashkitGridRowHeight);\n const useCSSTransforms = dataset.dashkitGridUseCssTransforms === 'true';\n\n if (\n [cols, x, y, w, h, marginX, marginY, paddingX, paddingY, rowHeight].some(\n (value) => !Number.isFinite(value),\n )\n ) {\n return;\n }\n\n Object.assign(\n style,\n getGridItemStyle({\n cols,\n containerPadding: [paddingX, paddingY],\n h,\n margin: [marginX, marginY],\n rowHeight,\n useCSSTransforms,\n w,\n width,\n x,\n y,\n }),\n );\n });\n };\n\n private handlePointerDown = () => {\n if (!this.props.isDraggable && !this.props.isResizable) {\n return;\n }\n\n this.cancelSettledWidthCommit();\n flushSync(() => {\n this.setState((state) => ({\n interactionRevision: state.interactionRevision + 1,\n settledWidth: this.widthRef.current,\n }));\n });\n };\n\n private syncSettledWidth = () => {\n this.cancelSettledWidthCommit();\n if (this.state.settledWidth === this.widthRef.current) {\n return;\n }\n\n flushSync(() => {\n this.setState({settledWidth: this.widthRef.current});\n });\n };\n\n private cancelSettledWidthCommit = () => {\n if (this.settledWidthCommitTimer === undefined) {\n return;\n }\n window.clearTimeout(this.settledWidthCommitTimer);\n this.settledWidthCommitTimer = undefined;\n };\n\n private scheduleSettledWidthCommit = () => {\n this.cancelSettledWidthCommit();\n // DOM grid items update in ResizeObserver; React reconciles only after resizing settles.\n this.settledWidthCommitTimer = window.setTimeout(() => {\n this.settledWidthCommitTimer = undefined;\n if (this.isComponentMounted && this.state.settledWidth !== this.widthRef.current) {\n this.setState({settledWidth: this.widthRef.current});\n }\n }, SETTLED_WIDTH_COMMIT_DELAY);\n };\n\n private syncElement = () => {\n const node = this.elementRef.current;\n if (node === this.element) {\n return;\n }\n\n if (this.element) {\n this.resizeObserver?.unobserve(this.element);\n this.element.removeEventListener('pointerdown', this.handlePointerDown, true);\n }\n\n this.element = node;\n if (node && this.isComponentMounted) {\n this.observeElement(node);\n }\n };\n\n private observeElement = (node: HTMLDivElement) => {\n this.widthRef.current = node.clientWidth;\n this.cacheGridItems();\n this.updateGridItems(this.widthRef.current);\n node.addEventListener('pointerdown', this.handlePointerDown, true);\n this.resizeObserver ??= new (\n typeof ResizeObserver === 'function' ? ResizeObserver : ResizeObserverPolyfill\n )((entries: ResizeObserverEntry[]) => {\n const entry = entries.find((currentEntry) => currentEntry.target === this.element);\n if (!entry) {\n return;\n }\n\n this.widthRef.current = entry.contentRect.width;\n this.updateGridItems(this.widthRef.current);\n this.scheduleSettledWidthCommit();\n });\n this.resizeObserver.observe(node);\n };\n}\n\nexport const Layout = PassiveWidthProvider;\n"]}
|
|
1
|
+
{"version":3,"file":"ReactGridLayout.js","sourceRoot":"../../../../src","sources":["components/GridLayout/ReactGridLayout.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAE1B,yCAAoC;AAEpC,+DAA+D;AAC/D,+EAAyD;AACzD,gGAA8D;AAE9D,wDAAgF;AAEhF,sCAAyC;AAEzC,MAAM,sBAAsB,GAA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AO,CACH,uCACI,SAAS,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC9E,GAAG,EAAE,IAAI,CAAC,UAAU,EACpB,KAAK,EAAE,KAAK,CAAC,KAAK,GACpB,CACL,CAAC;QACN,CAAC;QAED,OAAO,CACH,8BAAC,cAAc,oBACP,KAAK,IACT,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,IAChC,CACL,CAAC;IACN,CAAC;CAmJJ;AAEY,QAAA,MAAM,GAAG,oBAAoB,CAAC","sourcesContent":["import React from 'react';\n\nimport {flushSync} from 'react-dom';\nimport type {Layout as RGLLayout} from 'react-grid-layout';\n// @ts-expect-error - utils is not exported in type definitions\nimport ReactGridLayout, {utils} from 'react-grid-layout';\nimport ResizeObserverPolyfill from 'resize-observer-polyfill';\n\nimport {DROPPING_ELEMENT_CLASS_NAME, OVERLAY_CLASS_NAME} from '../../constants';\n\nimport {getEventPosition} from './utils';\n\nconst GRID_LAYOUT_CLASS_NAME = 'react-grid-layout';\nconst SETTLED_WIDTH_COMMIT_DELAY = 150;\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 dragStateRef?: React.MutableRefObject<{\n isDragging: boolean;\n sourceGroup: string | null;\n touchIdentifier?: number;\n }>;\n sharedDragPositionRef?: React.MutableRefObject<SharedDragPosition | null>;\n group?: string;\n onDragTargetRestore?: () => void;\n transformScaleRef?: React.MutableRefObject<number>;\n groupResetRegistryRef?: React.MutableRefObject<Map<string, () => void>>;\n externalLayoutRevision?: number;\n onBeforeDragOver?: () => void;\n};\n\ntype DragOverLayoutState = {\n layout: RGLLayout[];\n activeDrag: RGLLayout | null;\n};\n\ntype RGLLayoutWithPlaceholder = RGLLayout & {placeholder?: boolean};\n\ntype PassiveWidthProviderProps = DragOverLayoutProps & {\n measureBeforeMount?: boolean;\n};\n\ntype OnDragMethod = (\n i: string,\n x: number,\n y: number,\n sintEv: {e: Event; node: HTMLElement},\n) => void;\n\nconst getGridItemStyle = ({\n cols,\n containerPadding,\n margin,\n width,\n x,\n y,\n w,\n h,\n rowHeight,\n useCSSTransforms,\n}: {\n cols: number;\n containerPadding: [number, number];\n h: number;\n margin: [number, number];\n rowHeight: number;\n useCSSTransforms: boolean;\n w: number;\n width: number;\n x: number;\n y: number;\n}) => {\n const [marginX, marginY] = margin;\n const [paddingX, paddingY] = containerPadding;\n const columnWidth = (width - marginX * (cols - 1) - paddingX * 2) / cols;\n const position = {\n height: Math.round(rowHeight * h + marginY * (h - 1)),\n left: Math.round((columnWidth + marginX) * x + paddingX),\n top: Math.round(paddingY + (rowHeight + marginY) * y),\n width: Math.round(columnWidth * w + marginX * (w - 1)),\n };\n\n return useCSSTransforms\n ? {...utils.setTransform(position), left: '', top: ''}\n : {\n ...utils.setTopLeft(position),\n MozTransform: '',\n OTransform: '',\n WebkitTransform: '',\n msTransform: '',\n transform: '',\n };\n};\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 parentOnDragOver: (e: MouseEvent) => false | void;\n _savedDraggedOutLayout: RGLLayout[] | null = null;\n // Suppresses onLayoutMaybeChanged during imperative layout restore actions.\n // Without this flag, our setState would trigger onLayoutChange back to the consumer\n // that just initiated the action, causing a spurious 'change' event.\n _isRestoringExternalLayout = false;\n private touchTarget: Element | null = null;\n private readonly gridItemChildren = new WeakMap<\n React.ReactElement,\n {child: React.ReactElement; metadata: Record<string, string>}\n >();\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 // @ts-expect-error - onDragOver is a protected method in parent class\n this.parentOnDragOver = this.onDragOver;\n // @ts-expect-error - assigning custom method to parent's onDragOver\n this.onDragOver = this.extendedOnDragOver;\n }\n\n componentDidMount(): void {\n super.componentDidMount?.();\n\n if (this.props.group !== undefined) {\n this.props.groupResetRegistryRef?.current.set(\n this.props.group,\n this.resetExternalPlaceholder,\n );\n }\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 componentDidUpdate(prevProps: DragOverLayoutProps, prevState: DragOverLayoutState): void {\n const revisionChanged =\n prevProps.externalLayoutRevision !== this.props.externalLayoutRevision;\n\n if (revisionChanged && this.props.layout) {\n const newLayout = utils.synchronizeLayoutWithChildren(\n this.props.layout,\n this.props.children,\n this.props.cols,\n utils.compactType(this.props),\n this.props.allowOverlap,\n );\n\n this._isRestoringExternalLayout = true;\n // Override both layout and propsLayout so getDerivedStateFromProps\n // doesn't revert our update on the next render cycle.\n this.setState(\n {\n layout: newLayout,\n propsLayout: this.props.layout,\n } as unknown as DragOverLayoutState,\n () => {\n this._isRestoringExternalLayout = false;\n },\n );\n // RGL's shouldComponentUpdate only tracks activeDrag/mounted/droppingPosition — not\n // state.layout. So setState({layout}) alone is silently ignored (no re-render).\n // forceUpdate bypasses SCU and is batched with the setState above, producing a\n // single render cycle with the merged state that includes the restored layout.\n this.forceUpdate();\n // Don't call super here: restoring is an external action, not a user drag/resize.\n // onLayoutMaybeChanged is suppressed via _isRestoringExternalLayout.\n return;\n }\n\n // Maintain parent behavior for all non-restore cycles (drag, resize, etc.).\n super.componentDidUpdate?.(prevProps, prevState);\n }\n\n onLayoutMaybeChanged(newLayout: RGLLayout[], oldLayout: RGLLayout[]): void {\n if (this._isRestoringExternalLayout) {\n return;\n }\n // @ts-expect-error — onLayoutMaybeChanged is not in ReactGridLayout's public types\n super.onLayoutMaybeChanged(newLayout, oldLayout);\n }\n\n componentWillUnmount(): void {\n if (this.props.group !== undefined) {\n this.props.groupResetRegistryRef?.current.delete(this.props.group);\n }\n\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 ('touches' in sintEv.e) {\n this.updateTouchTarget(sintEv.e as TouchEvent);\n }\n\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 if ('changedTouches' in sintEv.e) {\n const position = getEventPosition(\n sintEv.e as TouchEvent,\n this.props.dragStateRef?.current.touchIdentifier,\n );\n if (position) {\n this.touchTarget?.dispatchEvent(new MouseEvent('mouseup', position));\n }\n this.touchTarget = null;\n }\n\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 extendedOnDragOver = (e: MouseEvent): false | void => {\n this.props.onBeforeDragOver?.();\n return this.parentOnDragOver(e);\n };\n\n isSharedDragTarget = (): boolean => {\n const drag = this.props.dragStateRef?.current;\n return Boolean(drag?.isDragging);\n };\n\n // Proxy mouse events -> drag methods for dnd between groups\n mouseEnterHandler = (e: MouseEvent): void => {\n if (this.isSharedDragTarget()) {\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.isSharedDragTarget()) {\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 (\n this.isSharedDragTarget() &&\n this.props.group !== this.props.dragStateRef?.current.sourceGroup\n ) {\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.isSharedDragTarget()) {\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 for all registered groups\n this.props.groupResetRegistryRef?.current.forEach((reset) => reset());\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.sharedDragPositionRef?.current;\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 const {cols, containerPadding, h, margin, rowHeight, useCSSTransforms, w, x, y} =\n gridItem.props;\n const [marginX, marginY] = margin;\n const [paddingX, paddingY] = containerPadding;\n const gridItemMetadata: Record<string, string> = {\n 'data-dashkit-grid-cols': String(cols),\n 'data-dashkit-grid-h': String(h),\n 'data-dashkit-grid-margin-x': String(marginX),\n 'data-dashkit-grid-margin-y': String(marginY),\n 'data-dashkit-grid-padding-x': String(paddingX),\n 'data-dashkit-grid-padding-y': String(paddingY),\n 'data-dashkit-grid-row-height': String(rowHeight),\n 'data-dashkit-grid-use-css-transforms': String(useCSSTransforms),\n 'data-dashkit-grid-w': String(w),\n 'data-dashkit-grid-x': String(x),\n 'data-dashkit-grid-y': String(y),\n };\n // Lazy proxy for transformScaleRef so react-draggable reads fresh scale without re-render.\n const {transformScaleRef} = this.props;\n const lazyScale = transformScaleRef\n ? ({valueOf: () => transformScaleRef.current} as unknown as number)\n : undefined;\n\n if (isDroppingItem) {\n // React.cloneElement is just cleaner then copy-paste whole processGridItem method\n return React.cloneElement(gridItem, {\n ...(lazyScale !== undefined && {transformScale: lazyScale}),\n // hiding preview if dragging shared item\n style: this.isSharedDragTarget()\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 const gridChild = gridItem.props.children as React.ReactElement<Record<string, string>>;\n const cachedGridItemChild = this.gridItemChildren.get(gridChild);\n const gridItemChild =\n cachedGridItemChild &&\n Object.keys(gridItemMetadata).every(\n (key) => cachedGridItemChild.metadata[key] === gridItemMetadata[key],\n )\n ? cachedGridItemChild.child\n : React.cloneElement(gridChild, gridItemMetadata);\n\n if (gridItemChild !== cachedGridItemChild?.child) {\n this.gridItemChildren.set(gridChild, {\n child: gridItemChild,\n metadata: gridItemMetadata,\n });\n }\n\n if (lazyScale !== undefined) {\n return React.cloneElement(gridItem, {\n children: gridItemChild,\n transformScale: lazyScale,\n });\n }\n\n return React.cloneElement(gridItem, {children: gridItemChild});\n }\n private updateTouchTarget(event: TouchEvent): void {\n const position = getEventPosition(event, this.props.dragStateRef?.current.touchIdentifier);\n if (!position) {\n return;\n }\n const target =\n document\n .elementsFromPoint(position.clientX, position.clientY)\n .find((element) => element.classList.contains(GRID_LAYOUT_CLASS_NAME)) || null;\n\n // Touch events keep their original target, so route group transitions explicitly.\n if (target !== this.touchTarget) {\n this.touchTarget?.dispatchEvent(new MouseEvent('mouseleave', position));\n target?.dispatchEvent(new MouseEvent('mouseenter', position));\n this.touchTarget = target;\n }\n\n target?.dispatchEvent(new MouseEvent('mousemove', position));\n }\n}\n\nclass PassiveWidthProvider extends React.Component<\n PassiveWidthProviderProps,\n {interactionRevision: number; isMounted: boolean; settledWidth: number}\n> {\n state = {interactionRevision: 0, isMounted: false, settledWidth: 1280};\n\n private element: HTMLDivElement | null = null;\n private readonly elementRef = React.createRef<HTMLDivElement>();\n private readonly widthRef = {current: 1280};\n private gridItems: HTMLElement[] = [];\n private lastAppliedWidth?: number;\n private resizeObserver?: ResizeObserver;\n private settledWidthCommitTimer?: number;\n private isComponentMounted = false;\n\n componentDidMount() {\n this.isComponentMounted = true;\n this.syncElement();\n this.setState({isMounted: true, settledWidth: this.widthRef.current});\n }\n\n componentDidUpdate() {\n this.syncElement();\n this.cacheGridItems();\n this.updateGridItems(this.widthRef.current);\n }\n\n componentWillUnmount() {\n this.isComponentMounted = false;\n this.resizeObserver?.disconnect();\n this.resizeObserver = undefined;\n this.cancelSettledWidthCommit();\n this.element?.removeEventListener('pointerdown', this.handlePointerDown, true);\n this.element = null;\n }\n\n render() {\n const {measureBeforeMount, ...props} = this.props;\n\n if (measureBeforeMount && !this.state.isMounted) {\n return (\n <div\n className={[props.className, GRID_LAYOUT_CLASS_NAME].filter(Boolean).join(' ')}\n ref={this.elementRef}\n style={props.style}\n />\n );\n }\n\n return (\n <DragOverLayout\n {...props}\n innerRef={this.elementRef}\n onBeforeDragOver={this.syncSettledWidth}\n width={this.state.settledWidth}\n />\n );\n }\n\n private cacheGridItems = () => {\n const node = this.element;\n this.gridItems = node\n ? Array.from(node.children).filter(\n (child): child is HTMLElement =>\n child instanceof HTMLElement &&\n child.matches('.react-grid-item[data-dashkit-grid-cols]'),\n )\n : [];\n this.lastAppliedWidth = undefined;\n };\n\n private updateGridItems = (width: number) => {\n if (width === this.lastAppliedWidth) {\n return;\n }\n this.lastAppliedWidth = width;\n\n this.gridItems.forEach((item) => {\n if (\n item.classList.contains('react-draggable-dragging') ||\n item.classList.contains('resizing')\n ) {\n return;\n }\n\n const {dataset, style} = item;\n const cols = Number(dataset.dashkitGridCols);\n const x = Number(dataset.dashkitGridX);\n const y = Number(dataset.dashkitGridY);\n const w = Number(dataset.dashkitGridW);\n const h = Number(dataset.dashkitGridH);\n const marginX = Number(dataset.dashkitGridMarginX);\n const marginY = Number(dataset.dashkitGridMarginY);\n const paddingX = Number(dataset.dashkitGridPaddingX);\n const paddingY = Number(dataset.dashkitGridPaddingY);\n const rowHeight = Number(dataset.dashkitGridRowHeight);\n const useCSSTransforms = dataset.dashkitGridUseCssTransforms === 'true';\n\n if (\n [cols, x, y, w, h, marginX, marginY, paddingX, paddingY, rowHeight].some(\n (value) => !Number.isFinite(value),\n )\n ) {\n return;\n }\n\n Object.assign(\n style,\n getGridItemStyle({\n cols,\n containerPadding: [paddingX, paddingY],\n h,\n margin: [marginX, marginY],\n rowHeight,\n useCSSTransforms,\n w,\n width,\n x,\n y,\n }),\n );\n });\n };\n\n private handlePointerDown = () => {\n if (!this.props.isDraggable && !this.props.isResizable) {\n return;\n }\n\n this.cancelSettledWidthCommit();\n flushSync(() => {\n this.setState((state) => ({\n interactionRevision: state.interactionRevision + 1,\n settledWidth: this.widthRef.current,\n }));\n });\n };\n\n private syncSettledWidth = () => {\n this.cancelSettledWidthCommit();\n if (this.state.settledWidth === this.widthRef.current) {\n return;\n }\n\n flushSync(() => {\n this.setState({settledWidth: this.widthRef.current});\n });\n };\n\n private cancelSettledWidthCommit = () => {\n if (this.settledWidthCommitTimer === undefined) {\n return;\n }\n window.clearTimeout(this.settledWidthCommitTimer);\n this.settledWidthCommitTimer = undefined;\n };\n\n private scheduleSettledWidthCommit = () => {\n this.cancelSettledWidthCommit();\n // DOM grid items update in ResizeObserver; React reconciles only after resizing settles.\n this.settledWidthCommitTimer = window.setTimeout(() => {\n this.settledWidthCommitTimer = undefined;\n if (this.isComponentMounted && this.state.settledWidth !== this.widthRef.current) {\n this.setState({settledWidth: this.widthRef.current});\n }\n }, SETTLED_WIDTH_COMMIT_DELAY);\n };\n\n private syncElement = () => {\n const node = this.elementRef.current;\n if (node === this.element) {\n return;\n }\n\n if (this.element) {\n this.resizeObserver?.unobserve(this.element);\n this.element.removeEventListener('pointerdown', this.handlePointerDown, true);\n }\n\n this.element = node;\n if (node && this.isComponentMounted) {\n this.observeElement(node);\n }\n };\n\n private observeElement = (node: HTMLDivElement) => {\n this.widthRef.current = node.clientWidth;\n this.cacheGridItems();\n this.updateGridItems(this.widthRef.current);\n node.addEventListener('pointerdown', this.handlePointerDown, true);\n this.resizeObserver ??= new (\n typeof ResizeObserver === 'function' ? ResizeObserver : ResizeObserverPolyfill\n )((entries: ResizeObserverEntry[]) => {\n const entry = entries.find((currentEntry) => currentEntry.target === this.element);\n if (!entry) {\n return;\n }\n\n this.widthRef.current = entry.contentRect.width;\n this.updateGridItems(this.widthRef.current);\n this.scheduleSettledWidthCommit();\n });\n this.resizeObserver.observe(node);\n };\n}\n\nexport const Layout = PassiveWidthProvider;\n"]}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare function shallowArrayEqual<T>(a: T[], b: T[]): boolean;
|
|
2
2
|
export declare function shallowObjectEqual<T extends object>(a: T, b: T): boolean;
|
|
3
|
+
export declare function getEventPosition(event: MouseEvent | TouchEvent, touchIdentifier?: number): MouseEvent | Touch | undefined;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.shallowArrayEqual = shallowArrayEqual;
|
|
4
4
|
exports.shallowObjectEqual = shallowObjectEqual;
|
|
5
|
+
exports.getEventPosition = getEventPosition;
|
|
5
6
|
function shallowArrayEqual(a, b) {
|
|
6
7
|
if (a === b) {
|
|
7
8
|
return true;
|
|
@@ -22,4 +23,14 @@ function shallowObjectEqual(a, b) {
|
|
|
22
23
|
}
|
|
23
24
|
return keysA.every((key) => a[key] === b[key]);
|
|
24
25
|
}
|
|
26
|
+
function getEventPosition(event, touchIdentifier) {
|
|
27
|
+
if (!('touches' in event)) {
|
|
28
|
+
return event;
|
|
29
|
+
}
|
|
30
|
+
if (touchIdentifier === undefined) {
|
|
31
|
+
return event.targetTouches[0] || event.changedTouches[0];
|
|
32
|
+
}
|
|
33
|
+
return (Array.from(event.touches).find((touch) => touch.identifier === touchIdentifier) ||
|
|
34
|
+
Array.from(event.changedTouches).find((touch) => touch.identifier === touchIdentifier));
|
|
35
|
+
}
|
|
25
36
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"../../../../src","sources":["components/GridLayout/utils.tsx"],"names":[],"mappings":";;AAAA,8CAQC;AAED,gDAUC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"../../../../src","sources":["components/GridLayout/utils.tsx"],"names":[],"mappings":";;AAAA,8CAQC;AAED,gDAUC;AAED,4CAgBC;AAtCD,SAAgB,iBAAiB,CAAI,CAAM,EAAE,CAAM;IAC/C,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,SAAgB,kBAAkB,CAAmB,CAAI,EAAE,CAAI;IAC3D,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAmB,CAAC;IAC/C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAmB,CAAC;IAC/C,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,gBAAgB,CAC5B,KAA8B,EAC9B,eAAwB;IAExB,IAAI,CAAC,CAAC,SAAS,IAAI,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,CACH,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,KAAK,eAAe,CAAC;QAC/E,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,KAAK,eAAe,CAAC,CACzF,CAAC;AACN,CAAC","sourcesContent":["export function shallowArrayEqual<T>(a: T[], b: T[]): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n return a.every((item, i) => item === b[i]);\n}\n\nexport function shallowObjectEqual<T extends object>(a: T, b: T): boolean {\n if (a === b) {\n return true;\n }\n const keysA = Object.keys(a) as Array<keyof T>;\n const keysB = Object.keys(b) as Array<keyof T>;\n if (keysA.length !== keysB.length) {\n return false;\n }\n return keysA.every((key) => a[key] === b[key]);\n}\n\nexport function getEventPosition(\n event: MouseEvent | TouchEvent,\n touchIdentifier?: number,\n): MouseEvent | Touch | undefined {\n if (!('touches' in event)) {\n return event;\n }\n\n if (touchIdentifier === undefined) {\n return event.targetTouches[0] || event.changedTouches[0];\n }\n\n return (\n Array.from(event.touches).find((touch) => touch.identifier === touchIdentifier) ||\n Array.from(event.changedTouches).find((touch) => touch.identifier === touchIdentifier)\n );\n}\n"]}
|
package/build/cjs/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"10.5.
|
|
1
|
+
{"version":"10.5.2","type":"commonjs","sideEffects":["*.scss","*.css"]}
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
max-width: 200px;
|
|
64
64
|
flex: 0 0 auto;
|
|
65
65
|
display: flex;
|
|
66
|
-
gap:
|
|
66
|
+
gap: 8px;
|
|
67
67
|
justify-content: center;
|
|
68
68
|
align-items: center;
|
|
69
69
|
border-radius: var(--g-border-radius-xl);
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
background-color: var(--_--dashkit-action-panel-item-color);
|
|
74
74
|
color: var(--_--dashkit-action-panel-item-text-color);
|
|
75
75
|
cursor: pointer;
|
|
76
|
+
transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
|
|
76
77
|
}
|
|
77
78
|
.dashkit-action-panel__item:hover, .dashkit-action-panel__item:focus-visible {
|
|
78
79
|
background-color: var(--_--dashkit-action-panel-item-color-hover);
|
|
@@ -105,10 +106,11 @@
|
|
|
105
106
|
justify-content: center;
|
|
106
107
|
}
|
|
107
108
|
.dashkit-action-panel__title {
|
|
109
|
+
font-family: var(--g-text-subheader-font-family);
|
|
110
|
+
font-weight: var(--g-text-subheader-font-weight);
|
|
111
|
+
font-size: var(--g-text-subheader-1-font-size);
|
|
112
|
+
line-height: var(--g-text-subheader-1-line-height);
|
|
108
113
|
min-width: 0;
|
|
109
|
-
font-size: 12px;
|
|
110
|
-
font-weight: 400;
|
|
111
|
-
line-height: 16px;
|
|
112
114
|
overflow: hidden;
|
|
113
115
|
text-overflow: ellipsis;
|
|
114
116
|
}
|
|
@@ -40,7 +40,7 @@ export default class GridLayout extends React.PureComponent<GridLayoutProps, Gri
|
|
|
40
40
|
mergeGroupsLayout(group: string, newLayout: ConfigLayout[], temporaryItem?: ConfigLayout): ConfigLayout[];
|
|
41
41
|
reloadItems(options?: ReloadItemsOptions): void;
|
|
42
42
|
prepareDefaultArguments(group: string, layout: ConfigLayout[], oldItem: ConfigLayout, newItem: ConfigLayout, placeholder: ConfigLayout, e: MouseEvent, element: HTMLElement): ManipulationCallbackArgs;
|
|
43
|
-
updateDraggingElementState(group: string, layoutItem: ConfigLayout, e: MouseEvent): void;
|
|
43
|
+
updateDraggingElementState(group: string, layoutItem: ConfigLayout, e: MouseEvent, element: HTMLElement): void;
|
|
44
44
|
_initDragCoordinatesWatcher(element: HTMLElement): void;
|
|
45
45
|
_forceCursorCapture(parentElement: HTMLElement, position: {
|
|
46
46
|
top: number;
|
|
@@ -4,6 +4,7 @@ import { DashKitContext } from "../../context/index.js";
|
|
|
4
4
|
import { resolveLayoutGroup } from "../../utils/index.js";
|
|
5
5
|
import GridItem from "../GridItem/GridItem.js";
|
|
6
6
|
import { GroupLayout } from "./GroupLayout.js";
|
|
7
|
+
import { getEventPosition } from "./utils.js";
|
|
7
8
|
const hasPluginId = (value) => {
|
|
8
9
|
return (value !== null &&
|
|
9
10
|
'props' in value &&
|
|
@@ -323,7 +324,7 @@ class GridLayout extends React.PureComponent {
|
|
|
323
324
|
element,
|
|
324
325
|
};
|
|
325
326
|
}
|
|
326
|
-
updateDraggingElementState(group, layoutItem, e) {
|
|
327
|
+
updateDraggingElementState(group, layoutItem, e, element) {
|
|
327
328
|
let currentDraggingElement = this.state.currentDraggingElement;
|
|
328
329
|
if (!currentDraggingElement) {
|
|
329
330
|
const { temporaryLayout } = this.context;
|
|
@@ -336,10 +337,14 @@ class GridLayout extends React.PureComponent {
|
|
|
336
337
|
}
|
|
337
338
|
let { offsetX, offsetY } = e.nativeEvent || {};
|
|
338
339
|
if (offsetX === undefined || offsetY === undefined) {
|
|
339
|
-
const
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
|
|
340
|
+
const gridRect = element.getBoundingClientRect();
|
|
341
|
+
const position = getEventPosition(e, this._sharedDragRef.current.touchIdentifier);
|
|
342
|
+
if (!position) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const { clientX, clientY } = position;
|
|
346
|
+
offsetX = clientX - gridRect.left;
|
|
347
|
+
offsetY = clientY - gridRect.top;
|
|
343
348
|
}
|
|
344
349
|
currentDraggingElement = {
|
|
345
350
|
group,
|
|
@@ -383,7 +388,11 @@ class GridLayout extends React.PureComponent {
|
|
|
383
388
|
return;
|
|
384
389
|
}
|
|
385
390
|
const parentRect = parent.getBoundingClientRect();
|
|
386
|
-
const
|
|
391
|
+
const position = getEventPosition(e, this._sharedDragRef.current.touchIdentifier);
|
|
392
|
+
if (!position) {
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
const { clientX, clientY } = position;
|
|
387
396
|
let isDraggedOut = this.state.isDraggedOut;
|
|
388
397
|
if (clientX < parentRect.left ||
|
|
389
398
|
clientX > parentRect.right ||
|
|
@@ -416,10 +425,18 @@ class GridLayout extends React.PureComponent {
|
|
|
416
425
|
}
|
|
417
426
|
else {
|
|
418
427
|
if (!this._sharedDragRef.current.isDragging) {
|
|
419
|
-
|
|
428
|
+
const position = getEventPosition(e);
|
|
429
|
+
if (!position) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
this._sharedDragRef.current = {
|
|
433
|
+
isDragging: true,
|
|
434
|
+
sourceGroup: group,
|
|
435
|
+
touchIdentifier: 'identifier' in position ? position.identifier : undefined,
|
|
436
|
+
};
|
|
420
437
|
}
|
|
421
438
|
this._initDragCoordinatesWatcher(element);
|
|
422
|
-
this.updateDraggingElementState(group, layoutItem, e);
|
|
439
|
+
this.updateDraggingElementState(group, layoutItem, e, element);
|
|
423
440
|
this.setState({ isDragging: true });
|
|
424
441
|
}
|
|
425
442
|
}
|