@apipass/design-system 4.1.0 → 4.2.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/dist/lib/embedded-styles.js +1 -1
- package/dist/lib/lib.index.cjs +1 -1
- package/dist/lib/lib.index.js +696 -694
- package/dist/lib/lib.index.js.map +1 -1
- package/dist/lib/style.css +1 -1
- package/dist/lib/ui/components/DataTable/DataTable.cjs +1 -1
- package/dist/lib/ui/components/Widget/Widget.cjs +1 -1
- package/dist/lib/ui/components/WidgetGrid/WidgetGrid.cjs +1 -1
- package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.cjs +1 -1
- package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.cjs.map +1 -1
- package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.js +66 -50
- package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.js.map +1 -1
- package/dist/lib/ui/primitives/Button/Button.cjs +1 -1
- package/dist/lib/ui/primitives/CodeBlock/CodeBlock.cjs +1 -1
- package/dist/lib/ui/primitives/CodeEditor/CodeEditor.cjs +1 -1
- package/dist/lib/ui/primitives/ComboBox/ComboBox.cjs +1 -1
- package/dist/lib/ui/primitives/ComboBox/ComboBox.cjs.map +1 -1
- package/dist/lib/ui/primitives/ComboBox/ComboBox.js +60 -37
- package/dist/lib/ui/primitives/ComboBox/ComboBox.js.map +1 -1
- package/dist/lib/ui/primitives/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/lib/ui/primitives/FileUpload/FileUpload.cjs +1 -1
- package/dist/lib/ui/primitives/FileUpload/FileUpload.js +10 -10
- package/dist/lib/ui/primitives/IconButton/IconButton.cjs +1 -1
- package/dist/lib/ui/primitives/Input/Input.js +2 -2
- package/dist/lib/ui/primitives/JsonViewer/JsonEditor.cjs +1 -1
- package/dist/lib/ui/primitives/JsonViewer/JsonViewer.cjs +1 -1
- package/dist/lib/ui/primitives/Link/Link.cjs +1 -1
- package/dist/lib/ui/primitives/Link/Link.js +3 -3
- package/dist/lib/ui/primitives/Menu/Menu.cjs +1 -1
- package/dist/lib/ui/primitives/Menu/Menu.cjs.map +1 -1
- package/dist/lib/ui/primitives/Menu/Menu.js +28 -28
- package/dist/lib/ui/primitives/Menu/Menu.js.map +1 -1
- package/dist/lib/ui/primitives/Search/Search.cjs +1 -1
- package/dist/lib/ui/primitives/Search/Search.js +8 -8
- package/dist/lib/ui/primitives/Select/MultiSelect.cjs +2 -0
- package/dist/lib/ui/primitives/Select/MultiSelect.cjs.map +1 -0
- package/dist/lib/ui/primitives/Select/MultiSelect.js +113 -0
- package/dist/lib/ui/primitives/Select/MultiSelect.js.map +1 -0
- package/dist/lib/ui/primitives/Select/Select.cjs +1 -1
- package/dist/lib/ui/primitives/Select/Select.cjs.map +1 -1
- package/dist/lib/ui/primitives/Select/Select.js +19 -12
- package/dist/lib/ui/primitives/Select/Select.js.map +1 -1
- package/dist/lib/vendor/@monaco-editor/react/dist/index.cjs +1 -1
- package/dist/lib/vendor/@monaco-editor/react/dist/index.cjs.map +1 -1
- package/dist/lib/vendor/@monaco-editor/react/dist/index.js +21 -21
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocusable.cjs +1 -1
- package/dist/lib/vendor/@react-aria/interactions/dist/useFocusable.js +4 -4
- package/dist/lib/vendor/@react-aria/ssr/dist/SSRProvider.js.map +1 -1
- package/dist/lib/vendor/@react-stately/utils/dist/useControlledState.cjs +1 -1
- package/dist/lib/vendor/react-draggable/build/cjs/Draggable.cjs +2 -2
- package/dist/lib/vendor/react-draggable/build/cjs/Draggable.js +8 -8
- package/dist/lib/vendor/react-grid-layout/build/GridItem.cjs +1 -1
- package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.cjs +1 -1
- package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.js +6 -6
- package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.js.map +1 -1
- package/dist/lib/vendor/react-grid-layout/build/ReactGridLayoutPropTypes.js +2 -2
- package/dist/lib/vendor/react-grid-layout/build/ResponsiveReactGridLayout.cjs +1 -1
- package/dist/lib/vendor/react-grid-layout/build/ResponsiveReactGridLayout.js.map +1 -1
- package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.cjs +1 -1
- package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.js +6 -6
- package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.js.map +1 -1
- package/dist/lib/vendor/react-grid-layout/build/utils.cjs +1 -1
- package/dist/lib/vendor/react-grid-layout/build/utils.js +27 -27
- package/dist/lib/vendor/react-resizable/build/Resizable.cjs +1 -1
- package/dist/lib/vendor/react-resizable/build/Resizable.js +17 -17
- package/dist/lib/vendor/react-resizable/build/Resizable.js.map +1 -1
- package/dist/lib/vendor/react-resizable/build/ResizableBox.cjs +1 -1
- package/dist/lib/vendor/react-resizable/build/ResizableBox.js +5 -5
- package/dist/lib/vendor/react-resizable/build/ResizableBox.js.map +1 -1
- package/dist/lib/vendor/react-resizable/build/utils.cjs +1 -1
- package/dist/lib/vendor/react-resizable/build/utils.cjs.map +1 -1
- package/dist/lib/vendor/react-resizable/build/utils.js +2 -2
- package/dist/lib/vendor/react-toastify/dist/index.cjs +1 -1
- package/dist/lib/vendor/react-toastify/dist/index.js +10 -10
- package/dist/types/ui/primitives/Select/MultiSelect.d.ts +15 -0
- package/dist/types/ui/primitives/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),K=require("../../../prop-types/index.cjs"),J=require("react-dom"),Xt=require("../../../clsx/dist/clsx2.cjs");var R,Q;function Yt(){if(Q)return R;Q=1;var Z=Object.create,w=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,et=Object.getOwnPropertyNames,nt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty,st=(t,e)=>{for(var n in e)w(t,n,{get:e[n],enumerable:!0})},U=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of et(e))!ot.call(t,s)&&s!==n&&w(t,s,{get:()=>e[s],enumerable:!(o=tt(e,s))||o.enumerable});return t},y=(t,e,n)=>(n=t!=null?Z(nt(t)):{},U(!t||!t.__esModule?w(n,"default",{value:t,enumerable:!0}):n,t)),rt=t=>U(w({},"__esModule",{value:!0}),t)
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),K=require("../../../prop-types/index.cjs"),J=require("react-dom"),Xt=require("../../../clsx/dist/clsx2.cjs");var R,Q;function Yt(){if(Q)return R;Q=1;var Z=Object.create,w=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,et=Object.getOwnPropertyNames,nt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty,st=(t,e)=>{for(var n in e)w(t,n,{get:e[n],enumerable:!0})},U=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of et(e))!ot.call(t,s)&&s!==n&&w(t,s,{get:()=>e[s],enumerable:!(o=tt(e,s))||o.enumerable});return t},y=(t,e,n)=>(n=t!=null?Z(nt(t)):{},U(!t||!t.__esModule?w(n,"default",{value:t,enumerable:!0}):n,t)),rt=t=>U(w({},"__esModule",{value:!0}),t),L={};st(L,{DraggableCore:()=>g,default:()=>N}),R=rt(L);var v=y(z),a=y(K.__require()),at=y(J),it=Xt.__require();function _(t,e){for(let n=0,o=t.length;n<o;n++)if(e.apply(e,[t[n],n,t]))return t[n]}function $(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Function]"}function S(t){return typeof t=="number"&&!isNaN(t)}function u(t){return parseInt(t,10)}function b(t,e,n){if(t[e])return new Error(`Invalid prop ${e} passed to ${n} - do not set this, set it on the child.`)}var x=["Moz","Webkit","O","ms"];function lt(t="transform"){var e,n;if(typeof window>"u")return"";const o=(n=(e=window.document)==null?void 0:e.documentElement)==null?void 0:n.style;if(!o||t in o)return"";for(let s=0;s<x.length;s++)if(q(t,x[s])in o)return x[s];return""}function q(t,e){return e?`${e}${ut(t)}`:t}function ut(t){let e="",n=!0;for(let o=0;o<t.length;o++)n?(e+=t[o].toUpperCase(),n=!1):t[o]==="-"?n=!0:e+=t[o];return e}var ct=lt(),M="";function dt(t,e){var n;M||(M=(n=_(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(s){return $(t[s])}))!=null?n:"");const o=t[M];return $(o)?!!o.call(t,e):!1}function B(t,e,n){let o=t;do{if(dt(o,e))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1}function T(t,e,n,o){if(!t)return;const s={capture:!0,...o},i=n;t.addEventListener?t.addEventListener(e,i,s):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i}function p(t,e,n,o){if(!t)return;const s={capture:!0,...o},i=n;t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null}function ft(t){let e=t.clientHeight;const n=t.ownerDocument.defaultView.getComputedStyle(t);return e+=u(n.borderTopWidth),e+=u(n.borderBottomWidth),e}function ht(t){let e=t.clientWidth;const n=t.ownerDocument.defaultView.getComputedStyle(t);return e+=u(n.borderLeftWidth),e+=u(n.borderRightWidth),e}function pt(t){let e=t.clientHeight;const n=t.ownerDocument.defaultView.getComputedStyle(t);return e-=u(n.paddingTop),e-=u(n.paddingBottom),e}function gt(t){let e=t.clientWidth;const n=t.ownerDocument.defaultView.getComputedStyle(t);return e-=u(n.paddingLeft),e-=u(n.paddingRight),e}function mt(t,e,n){const s=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect(),i=(t.clientX+e.scrollLeft-s.left)/n,r=(t.clientY+e.scrollTop-s.top)/n;return{x:i,y:r}}function yt(t,e){const n=A(t,e,"px");return{[q("transform",ct)]:n}}function bt(t,e){return A(t,e,"")}function A({x:t,y:e},n,o){let s=`translate(${t}${o},${e}${o})`;if(n){const i=`${typeof n.x=="string"?n.x:n.x+o}`,r=`${typeof n.y=="string"?n.y:n.y+o}`;s=`translate(${i}, ${r})`+s}return s}function Dt(t,e){return t.targetTouches&&_(t.targetTouches,n=>e===n.identifier)||t.changedTouches&&_(t.changedTouches,n=>e===n.identifier)}function St(t){if(t.targetTouches&&t.targetTouches[0])return t.targetTouches[0].identifier;if(t.changedTouches&&t.changedTouches[0])return t.changedTouches[0].identifier}function wt(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0}function vt(t,e){if(!t)return;let n=t.getElementById("react-draggable-style-el");if(!n){n=t.createElement("style"),n.type="text/css",n.id="react-draggable-style-el";const o=e??wt();o&&n.setAttribute("nonce",o),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
2
2
|
`,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
3
|
-
`,t.getElementsByTagName("head")[0].appendChild(n)}t.body&&Nt(t.body,"react-draggable-transparent-selection")}function j(t){window.requestAnimationFrame?window.requestAnimationFrame(()=>{V(t)}):V(t)}function V(t){if(t)try{t.body&&_t(t.body,"react-draggable-transparent-selection");const e=t.selection;if(e)e.empty();else{const n=(t.defaultView||window).getSelection();n&&n.type!=="Caret"&&n.removeAllRanges()}}catch{}}function Nt(t,e){t.classList?t.classList.add(e):t.className.match(new RegExp(`(?:^|\\s)${e}(?!\\S)`))||(t.className+=` ${e}`)}function _t(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp(`(?:^|\\s)${e}(?!\\S)`,"g"),"")}function xt(t,e,n){if(!t.props.bounds)return[e,n];let{bounds:o}=t.props;o=typeof o=="string"?o:Et(o);const s=P(t);if(typeof o=="string"){const{ownerDocument:i}=s,r=i.defaultView;if(!r)throw new Error("Cannot resolve the owner window of the draggable node.");let l;if(o==="parent"?l=s.parentNode:l=s.getRootNode().querySelector(o),!(l instanceof r.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');const d=l,m=r.getComputedStyle(s),D=r.getComputedStyle(d);o={left:-s.offsetLeft+u(D.paddingLeft)+u(m.marginLeft),top:-s.offsetTop+u(D.paddingTop)+u(m.marginTop),right:gt(d)-ht(s)-s.offsetLeft+u(D.paddingRight)-u(m.marginRight),bottom:pt(d)-ft(s)-s.offsetTop+u(D.paddingBottom)-u(m.marginBottom)}}return S(o.right)&&(e=Math.min(e,o.right)),S(o.bottom)&&(n=Math.min(n,o.bottom)),S(o.left)&&(e=Math.max(e,o.left)),S(o.top)&&(n=Math.max(n,o.top)),[e,n]}function H(t,e,n){const o=Math.round(e/t[0])*t[0],s=Math.round(n/t[1])*t[1];return[o,s]}function Mt(t){return t.props.axis==="both"||t.props.axis==="x"}function Tt(t){return t.props.axis==="both"||t.props.axis==="y"}function E(t,e,n){const o=typeof e=="number"?Dt(t,e):null;if(typeof e=="number"&&!o)return null;const s=P(n),i=n.props.offsetParent||s.offsetParent||s.ownerDocument.body;return mt(o||t,i,n.props.scale)}function C(t,e,n){const o=!S(t.lastX),s=P(t);return o?{node:s,deltaX:0,deltaY:0,lastX:e,lastY:n,x:e,y:n}:{node:s,deltaX:e-t.lastX,deltaY:n-t.lastY,lastX:t.lastX,lastY:t.lastY,x:e,y:n}}function O(t,e){const n=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/n,y:t.state.y+e.deltaY/n,deltaX:e.deltaX/n,deltaY:e.deltaY/n,lastX:t.state.x,lastY:t.state.y}}function Et(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function P(t){const e=t.findDOMNode();if(!e)throw new Error("<DraggableCore>: Unmounted during event!");return e}var X=y(z),c=y(K.__require()),Ct=y(J);function Ot(...t){}var f={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},h=f.mouse,g=class extends X.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&(typeof t.button=="number"&&t.button!==0||t.ctrlKey))return!1;const e=this.findDOMNode();if(!e||!e.ownerDocument||!e.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=e;if(this.props.disabled||!(t.target instanceof n.defaultView.Node)||this.props.handle&&!q(t.target,this.props.handle,e)||this.props.cancel&&q(t.target,this.props.cancel,e))return;t.type==="touchstart"&&!this.props.allowMobileScroll&&t.preventDefault();const o=St(t);this.touchIdentifier=o;const s=E(t,o,this);if(s==null)return;const{x:i,y:r}=s,l=C(this,i,r);Ot("calling",this.props.onStart),!(this.props.onStart(t,l)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&vt(n,this.props.nonce),this.dragging=!0,this.lastX=i,this.lastY=r,T(n,h.move,this.handleDrag),T(n,h.stop,this.handleDragStop))},this.handleDrag=t=>{const e=E(t,this.touchIdentifier,this);if(e==null)return;let{x:n,y:o}=e;if(Array.isArray(this.props.grid)){let r=n-this.lastX,l=o-this.lastY;if([r,l]=H(this.props.grid,r,l),!r&&!l)return;n=this.lastX+r,o=this.lastY+l}const s=C(this,n,o);if(this.props.onDrag(t,s)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const r=document.createEvent("MouseEvents");r.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(r)}return}this.lastX=n,this.lastY=o},this.handleDragStop=t=>{if(!this.dragging)return;const e=E(t,this.touchIdentifier,this);if(e==null)return;let{x:n,y:o}=e;if(Array.isArray(this.props.grid)){let l=n-this.lastX||0,d=o-this.lastY||0;[l,d]=H(this.props.grid,l,d),n=this.lastX+l,o=this.lastY+d}const s=C(this,n,o);if(this.props.onStop(t,s)===!1||this.mounted===!1)return!1;const r=this.findDOMNode();r&&this.props.enableUserSelectHack&&j(r.ownerDocument),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,r&&(p(r.ownerDocument,h.move,this.handleDrag),p(r.ownerDocument,h.stop,this.handleDragStop))},this.onMouseDown=t=>(h=f.mouse,this.handleDragStart(t)),this.onMouseUp=t=>(h=f.mouse,this.handleDragStop(t)),this.onTouchStart=t=>(h=f.touch,this.handleDragStart(t)),this.onTouchEnd=t=>(h=f.touch,this.handleDragStop(t))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&T(t,f.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:e}=t;p(e,f.mouse.move,this.handleDrag),p(e,f.touch.move,this.handleDrag),p(e,f.mouse.stop,this.handleDragStop),p(e,f.touch.stop,this.handleDragStop),p(t,f.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&j(e)}}findDOMNode(){var t;if((t=this.props)!=null&&t.nodeRef)return this.props.nodeRef.current;const e=Ct.default;return typeof e.findDOMNode=="function"?e.findDOMNode(this):null}render(){return X.cloneElement(X.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};g.displayName="DraggableCore",g.propTypes={allowAnyClick:c.default.bool,allowMobileScroll:c.default.bool,children:c.default.node.isRequired,disabled:c.default.bool,enableUserSelectHack:c.default.bool,offsetParent:function(t,e){if(t[e]&&t[e].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:c.default.arrayOf(c.default.number),handle:c.default.string,cancel:c.default.string,nodeRef:c.default.object,nonce:c.default.string,onStart:c.default.func,onDrag:c.default.func,onStop:c.default.func,onMouseDown:c.default.func,scale:c.default.number,className:b,style:b,transform:b},g.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var N=class extends v.Component{constructor(t){super(t),this.onDragStart=(e,n)=>{if(this.props.onStart(e,O(this,n))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,n)=>{if(!this.state.dragging)return!1;const o=O(this,n),s={x:o.x,y:o.y,slackX:0,slackY:0};if(this.props.bounds){const{x:r,y:l}=s;s.x+=this.state.slackX,s.y+=this.state.slackY;const[d,m]=xt(this,s.x,s.y);s.x=d,s.y=m,s.slackX=this.state.slackX+(r-s.x),s.slackY=this.state.slackY+(l-s.y),o.x=s.x,o.y=s.y,o.deltaX=s.x-this.state.x,o.deltaY=s.y-this.state.y}if(this.props.onDrag(e,o)===!1)return!1;this.setState(s)},this.onDragStop=(e,n)=>{if(!this.state.dragging||this.props.onStop(e,O(this,n))===!1)return!1;const s={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:r,y:l}=this.props.position;s.x=r,s.y=l}this.setState(s)},this.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,prevPropsPosition:{...t.position},slackX:0,slackY:0,isElementSVG:!1},t.position&&!(t.onDrag||t.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:t},{prevPropsPosition:e}){return t&&(!e||t.x!==e.x||t.y!==e.y)?{x:t.x,y:t.y,prevPropsPosition:{...t}}:null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var t;if((t=this.props)!=null&&t.nodeRef)return this.props.nodeRef.current;const e=at.default;return typeof e.findDOMNode=="function"?e.findDOMNode(this):null}render(){const{axis:t,bounds:e,children:n,defaultPosition:o,defaultClassName:s,defaultClassNameDragging:i,defaultClassNameDragged:r,position:l,positionOffset:d,scale:m,...D}=this.props;let Y={},W=null;const F=!!!l||this.state.dragging,I=l||o,G={x:Mt(this)&&F?this.state.x:I.x,y:Tt(this)&&F?this.state.y:I.y};this.state.isElementSVG?W=bt(G,d):Y=yt(G,d);const k=v.Children.only(n),Pt=(0,it.clsx)(k.props.className||"",s,{[i]:this.state.dragging,[r]:this.state.dragged});return v.createElement(g,{...D,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},v.cloneElement(k,{className:Pt,style:{...k.props.style,...Y},transform:W}))}};return N.displayName="Draggable",N.propTypes={...g.propTypes,axis:a.default.oneOf(["both","x","y","none"]),bounds:a.default.oneOfType([a.default.shape({left:a.default.number,right:a.default.number,top:a.default.number,bottom:a.default.number}),a.default.string,a.default.oneOf([!1])]),defaultClassName:a.default.string,defaultClassNameDragging:a.default.string,defaultClassNameDragged:a.default.string,defaultPosition:a.default.shape({x:a.default.number,y:a.default.number}),positionOffset:a.default.shape({x:a.default.oneOfType([a.default.number,a.default.string]),y:a.default.oneOfType([a.default.number,a.default.string])}),position:a.default.shape({x:a.default.number,y:a.default.number}),className:b,style:b,transform:b},N.defaultProps={...g.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1},R}exports.__require=Yt;
|
|
3
|
+
`,t.getElementsByTagName("head")[0].appendChild(n)}t.body&&Nt(t.body,"react-draggable-transparent-selection")}function j(t){window.requestAnimationFrame?window.requestAnimationFrame(()=>{V(t)}):V(t)}function V(t){if(t)try{t.body&&_t(t.body,"react-draggable-transparent-selection");const e=t.selection;if(e)e.empty();else{const n=(t.defaultView||window).getSelection();n&&n.type!=="Caret"&&n.removeAllRanges()}}catch{}}function Nt(t,e){t.classList?t.classList.add(e):t.className.match(new RegExp(`(?:^|\\s)${e}(?!\\S)`))||(t.className+=` ${e}`)}function _t(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp(`(?:^|\\s)${e}(?!\\S)`,"g"),"")}function xt(t,e,n){if(!t.props.bounds)return[e,n];let{bounds:o}=t.props;o=typeof o=="string"?o:Et(o);const s=P(t);if(typeof o=="string"){const{ownerDocument:i}=s,r=i.defaultView;if(!r)throw new Error("Cannot resolve the owner window of the draggable node.");let l;if(o==="parent"?l=s.parentNode:l=s.getRootNode().querySelector(o),!(l instanceof r.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');const d=l,m=r.getComputedStyle(s),D=r.getComputedStyle(d);o={left:-s.offsetLeft+u(D.paddingLeft)+u(m.marginLeft),top:-s.offsetTop+u(D.paddingTop)+u(m.marginTop),right:gt(d)-ht(s)-s.offsetLeft+u(D.paddingRight)-u(m.marginRight),bottom:pt(d)-ft(s)-s.offsetTop+u(D.paddingBottom)-u(m.marginBottom)}}return S(o.right)&&(e=Math.min(e,o.right)),S(o.bottom)&&(n=Math.min(n,o.bottom)),S(o.left)&&(e=Math.max(e,o.left)),S(o.top)&&(n=Math.max(n,o.top)),[e,n]}function H(t,e,n){const o=Math.round(e/t[0])*t[0],s=Math.round(n/t[1])*t[1];return[o,s]}function Mt(t){return t.props.axis==="both"||t.props.axis==="x"}function Tt(t){return t.props.axis==="both"||t.props.axis==="y"}function E(t,e,n){const o=typeof e=="number"?Dt(t,e):null;if(typeof e=="number"&&!o)return null;const s=P(n),i=n.props.offsetParent||s.offsetParent||s.ownerDocument.body;return mt(o||t,i,n.props.scale)}function C(t,e,n){const o=!S(t.lastX),s=P(t);return o?{node:s,deltaX:0,deltaY:0,lastX:e,lastY:n,x:e,y:n}:{node:s,deltaX:e-t.lastX,deltaY:n-t.lastY,lastX:t.lastX,lastY:t.lastY,x:e,y:n}}function O(t,e){const n=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/n,y:t.state.y+e.deltaY/n,deltaX:e.deltaX/n,deltaY:e.deltaY/n,lastX:t.state.x,lastY:t.state.y}}function Et(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function P(t){const e=t.findDOMNode();if(!e)throw new Error("<DraggableCore>: Unmounted during event!");return e}var X=y(z),c=y(K.__require()),Ct=y(J);function Ot(...t){}var f={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},h=f.mouse,g=class extends X.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&(typeof t.button=="number"&&t.button!==0||t.ctrlKey))return!1;const e=this.findDOMNode();if(!e||!e.ownerDocument||!e.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=e;if(this.props.disabled||!(t.target instanceof n.defaultView.Node)||this.props.handle&&!B(t.target,this.props.handle,e)||this.props.cancel&&B(t.target,this.props.cancel,e))return;t.type==="touchstart"&&!this.props.allowMobileScroll&&t.preventDefault();const o=St(t);this.touchIdentifier=o;const s=E(t,o,this);if(s==null)return;const{x:i,y:r}=s,l=C(this,i,r);Ot("calling",this.props.onStart),!(this.props.onStart(t,l)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&vt(n,this.props.nonce),this.dragging=!0,this.lastX=i,this.lastY=r,T(n,h.move,this.handleDrag),T(n,h.stop,this.handleDragStop))},this.handleDrag=t=>{const e=E(t,this.touchIdentifier,this);if(e==null)return;let{x:n,y:o}=e;if(Array.isArray(this.props.grid)){let r=n-this.lastX,l=o-this.lastY;if([r,l]=H(this.props.grid,r,l),!r&&!l)return;n=this.lastX+r,o=this.lastY+l}const s=C(this,n,o);if(this.props.onDrag(t,s)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const r=document.createEvent("MouseEvents");r.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(r)}return}this.lastX=n,this.lastY=o},this.handleDragStop=t=>{if(!this.dragging)return;const e=E(t,this.touchIdentifier,this);if(e==null)return;let{x:n,y:o}=e;if(Array.isArray(this.props.grid)){let l=n-this.lastX||0,d=o-this.lastY||0;[l,d]=H(this.props.grid,l,d),n=this.lastX+l,o=this.lastY+d}const s=C(this,n,o);if(this.props.onStop(t,s)===!1||this.mounted===!1)return!1;const r=this.findDOMNode();r&&this.props.enableUserSelectHack&&j(r.ownerDocument),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,r&&(p(r.ownerDocument,h.move,this.handleDrag),p(r.ownerDocument,h.stop,this.handleDragStop))},this.onMouseDown=t=>(h=f.mouse,this.handleDragStart(t)),this.onMouseUp=t=>(h=f.mouse,this.handleDragStop(t)),this.onTouchStart=t=>(h=f.touch,this.handleDragStart(t)),this.onTouchEnd=t=>(h=f.touch,this.handleDragStop(t))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&T(t,f.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:e}=t;p(e,f.mouse.move,this.handleDrag),p(e,f.touch.move,this.handleDrag),p(e,f.mouse.stop,this.handleDragStop),p(e,f.touch.stop,this.handleDragStop),p(t,f.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&j(e)}}findDOMNode(){var t;if((t=this.props)!=null&&t.nodeRef)return this.props.nodeRef.current;const e=Ct.default;return typeof e.findDOMNode=="function"?e.findDOMNode(this):null}render(){return X.cloneElement(X.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};g.displayName="DraggableCore",g.propTypes={allowAnyClick:c.default.bool,allowMobileScroll:c.default.bool,children:c.default.node.isRequired,disabled:c.default.bool,enableUserSelectHack:c.default.bool,offsetParent:function(t,e){if(t[e]&&t[e].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:c.default.arrayOf(c.default.number),handle:c.default.string,cancel:c.default.string,nodeRef:c.default.object,nonce:c.default.string,onStart:c.default.func,onDrag:c.default.func,onStop:c.default.func,onMouseDown:c.default.func,scale:c.default.number,className:b,style:b,transform:b},g.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var N=class extends v.Component{constructor(t){super(t),this.onDragStart=(e,n)=>{if(this.props.onStart(e,O(this,n))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,n)=>{if(!this.state.dragging)return!1;const o=O(this,n),s={x:o.x,y:o.y,slackX:0,slackY:0};if(this.props.bounds){const{x:r,y:l}=s;s.x+=this.state.slackX,s.y+=this.state.slackY;const[d,m]=xt(this,s.x,s.y);s.x=d,s.y=m,s.slackX=this.state.slackX+(r-s.x),s.slackY=this.state.slackY+(l-s.y),o.x=s.x,o.y=s.y,o.deltaX=s.x-this.state.x,o.deltaY=s.y-this.state.y}if(this.props.onDrag(e,o)===!1)return!1;this.setState(s)},this.onDragStop=(e,n)=>{if(!this.state.dragging||this.props.onStop(e,O(this,n))===!1)return!1;const s={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:r,y:l}=this.props.position;s.x=r,s.y=l}this.setState(s)},this.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,prevPropsPosition:{...t.position},slackX:0,slackY:0,isElementSVG:!1},t.position&&!(t.onDrag||t.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:t},{prevPropsPosition:e}){return t&&(!e||t.x!==e.x||t.y!==e.y)?{x:t.x,y:t.y,prevPropsPosition:{...t}}:null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var t;if((t=this.props)!=null&&t.nodeRef)return this.props.nodeRef.current;const e=at.default;return typeof e.findDOMNode=="function"?e.findDOMNode(this):null}render(){const{axis:t,bounds:e,children:n,defaultPosition:o,defaultClassName:s,defaultClassNameDragging:i,defaultClassNameDragged:r,position:l,positionOffset:d,scale:m,...D}=this.props;let Y={},W=null;const F=!!!l||this.state.dragging,I=l||o,G={x:Mt(this)&&F?this.state.x:I.x,y:Tt(this)&&F?this.state.y:I.y};this.state.isElementSVG?W=bt(G,d):Y=yt(G,d);const k=v.Children.only(n),Pt=(0,it.clsx)(k.props.className||"",s,{[i]:this.state.dragging,[r]:this.state.dragged});return v.createElement(g,{...D,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},v.cloneElement(k,{className:Pt,style:{...k.props.style,...Y},transform:W}))}};return N.displayName="Draggable",N.propTypes={...g.propTypes,axis:a.default.oneOf(["both","x","y","none"]),bounds:a.default.oneOfType([a.default.shape({left:a.default.number,right:a.default.number,top:a.default.number,bottom:a.default.number}),a.default.string,a.default.oneOf([!1])]),defaultClassName:a.default.string,defaultClassNameDragging:a.default.string,defaultClassNameDragged:a.default.string,defaultPosition:a.default.shape({x:a.default.number,y:a.default.number}),positionOffset:a.default.shape({x:a.default.oneOfType([a.default.number,a.default.string]),y:a.default.oneOfType([a.default.number,a.default.string])}),position:a.default.shape({x:a.default.number,y:a.default.number}),className:b,style:b,transform:b},N.defaultProps={...g.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1},R}exports.__require=Yt;
|
|
4
4
|
//# sourceMappingURL=Draggable.cjs.map
|
|
@@ -3,7 +3,7 @@ import { __require as K } from "../../../prop-types/index.js";
|
|
|
3
3
|
import J from "react-dom";
|
|
4
4
|
import { __require as Xt } from "../../../clsx/dist/clsx2.js";
|
|
5
5
|
var R, Q;
|
|
6
|
-
function
|
|
6
|
+
function $t() {
|
|
7
7
|
if (Q) return R;
|
|
8
8
|
Q = 1;
|
|
9
9
|
var Z = Object.create, w = Object.defineProperty, tt = Object.getOwnPropertyDescriptor, et = Object.getOwnPropertyNames, nt = Object.getPrototypeOf, ot = Object.prototype.hasOwnProperty, st = (t, e) => {
|
|
@@ -21,17 +21,17 @@ function Lt() {
|
|
|
21
21
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
22
|
!t || !t.__esModule ? w(n, "default", { value: t, enumerable: !0 }) : n,
|
|
23
23
|
t
|
|
24
|
-
)), rt = (t) => U(w({}, "__esModule", { value: !0 }), t),
|
|
25
|
-
st(
|
|
24
|
+
)), rt = (t) => U(w({}, "__esModule", { value: !0 }), t), L = {};
|
|
25
|
+
st(L, {
|
|
26
26
|
DraggableCore: () => g,
|
|
27
27
|
default: () => N
|
|
28
|
-
}), R = rt(
|
|
28
|
+
}), R = rt(L);
|
|
29
29
|
var v = y(z), a = y(/* @__PURE__ */ K()), at = y(J), it = Xt();
|
|
30
30
|
function _(t, e) {
|
|
31
31
|
for (let n = 0, o = t.length; n < o; n++)
|
|
32
32
|
if (e.apply(e, [t[n], n, t])) return t[n];
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function $(t) {
|
|
35
35
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Function]";
|
|
36
36
|
}
|
|
37
37
|
function S(t) {
|
|
@@ -73,10 +73,10 @@ function Lt() {
|
|
|
73
73
|
"msMatchesSelector",
|
|
74
74
|
"oMatchesSelector"
|
|
75
75
|
], function(s) {
|
|
76
|
-
return
|
|
76
|
+
return $(t[s]);
|
|
77
77
|
})) != null ? n : "");
|
|
78
78
|
const o = t[M];
|
|
79
|
-
return
|
|
79
|
+
return $(o) ? !!o.call(t, e) : !1;
|
|
80
80
|
}
|
|
81
81
|
function A(t, e, n) {
|
|
82
82
|
let o = t;
|
|
@@ -750,6 +750,6 @@ function Lt() {
|
|
|
750
750
|
}, R;
|
|
751
751
|
}
|
|
752
752
|
export {
|
|
753
|
-
|
|
753
|
+
$t as __require
|
|
754
754
|
};
|
|
755
755
|
//# sourceMappingURL=Draggable.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../../../_virtual/GridItem.cjs"),Y=require("react")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../../../_virtual/GridItem.cjs"),Y=require("react"),U=require("react-dom"),$=require("../../prop-types/index.cjs"),K=require("../../react-draggable/build/cjs/cjs.cjs"),k=require("../../react-resizable/index.cjs"),A=require("./utils.cjs"),F=require("./calculateUtils.cjs"),J=require("./ReactGridLayoutPropTypes.cjs"),Q=require("../../clsx/dist/clsx2.cjs");var j;function V(){if(j)return x.__exports;j=1,Object.defineProperty(x.__exports,"__esModule",{value:!0}),x.__exports.default=void 0;var S=q(Y),v=U,n=q($.__require()),T=K.__require(),E=k.__require(),w=A.__require(),u=F.__require(),W=J.__require(),C=q(Q.__require());function q(r){return r&&r.__esModule?r:{default:r}}function I(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),t.push.apply(t,i)}return t}function D(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?I(Object(t),!0).forEach(function(i){p(r,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i))})}return r}function p(r,e,t){return(e=G(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function G(r){var e=N(r,"string");return typeof e=="symbol"?e:e+""}function N(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}let H=class extends S.default.Component{constructor(){super(...arguments),p(this,"state",{resizing:null,dragging:null,className:""}),p(this,"elementRef",S.default.createRef()),p(this,"onDragStart",(e,t)=>{let{node:i}=t;const{onDragStart:o,transformScale:s}=this.props;if(!o)return;const a={top:0,left:0},{offsetParent:l}=i;if(!l)return;const c=l.getBoundingClientRect(),d=i.getBoundingClientRect(),f=d.left/s,h=c.left/s,m=d.top/s,y=c.top/s;a.left=f-h+l.scrollLeft,a.top=m-y+l.scrollTop,this.setState({dragging:a});const{x:R,y:g}=(0,u.calcXY)(this.getPositionParams(),a.top,a.left,this.props.w,this.props.h);return o.call(this,this.props.i,R,g,{e,node:i,newPosition:a})}),p(this,"onDrag",(e,t,i)=>{let{node:o,deltaX:s,deltaY:a}=t;const{onDrag:l}=this.props;if(!l)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let c=this.state.dragging.top+a,d=this.state.dragging.left+s;const{isBounded:f,i:h,w:m,h:y,containerWidth:R}=this.props,g=this.getPositionParams();if(f){const{offsetParent:z}=o;if(z){const{margin:O,rowHeight:B}=this.props,M=z.clientHeight-(0,u.calcGridItemWHPx)(y,B,O[1]);c=(0,u.clamp)(c,0,M);const L=(0,u.calcGridColWidth)(g),X=R-(0,u.calcGridItemWHPx)(m,L,O[0]);d=(0,u.clamp)(d,0,X)}}const P={top:c,left:d};i?this.setState({dragging:P}):(0,v.flushSync)(()=>{this.setState({dragging:P})});const{x:b,y:_}=(0,u.calcXY)(g,c,d,m,y);return l.call(this,h,b,_,{e,node:o,newPosition:P})}),p(this,"onDragStop",(e,t)=>{let{node:i}=t;const{onDragStop:o}=this.props;if(!o)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:s,h:a,i:l}=this.props,{left:c,top:d}=this.state.dragging,f={top:d,left:c};this.setState({dragging:null});const{x:h,y:m}=(0,u.calcXY)(this.getPositionParams(),d,c,s,a);return o.call(this,l,h,m,{e,node:i,newPosition:f})}),p(this,"onResizeStop",(e,t,i)=>this.onResizeHandler(e,t,i,"onResizeStop")),p(this,"onResizeStart",(e,t,i)=>this.onResizeHandler(e,t,i,"onResizeStart")),p(this,"onResize",(e,t,i)=>this.onResizeHandler(e,t,i,"onResize"))}shouldComponentUpdate(e,t){if(this.props.children!==e.children||this.props.droppingPosition!==e.droppingPosition)return!0;const i=(0,u.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),o=(0,u.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,w.fastPositionEqual)(i,o)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){const{droppingPosition:t}=this.props;if(!t)return;const i=this.elementRef.current;if(!i)return;const o=e.droppingPosition||{left:0,top:0},{dragging:s}=this.state,a=s&&t.left!==o.left||t.top!==o.top;if(!s)this.onDragStart(t.e,{node:i,deltaX:t.left,deltaY:t.top});else if(a){const l=t.left-s.left,c=t.top-s.top;this.onDrag(t.e,{node:i,deltaX:l,deltaY:c},!0)}}getPositionParams(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){const{usePercentages:t,containerWidth:i,useCSSTransforms:o}=this.props;let s;return o?s=(0,w.setTransform)(e):(s=(0,w.setTopLeft)(e),t&&(s.left=(0,w.perc)(e.left/i),s.width=(0,w.perc)(e.width/i))),s}mixinDraggable(e,t){return S.default.createElement(T.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}curryResizeHandler(e,t){return(i,o)=>t(i,o,e)}mixinResizable(e,t,i){const{cols:o,minW:s,minH:a,maxW:l,maxH:c,transformScale:d,resizeHandles:f,resizeHandle:h}=this.props,m=this.getPositionParams(),y=(0,u.calcGridItemPosition)(m,0,0,o,0).width,R=(0,u.calcGridItemPosition)(m,0,0,s,a),g=(0,u.calcGridItemPosition)(m,0,0,l,c),P=[R.width,R.height],b=[Math.min(g.width,y),Math.min(g.height,1/0)];return S.default.createElement(E.Resizable,{draggableOpts:{disabled:!i},className:i?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:P,maxConstraints:b,onResizeStop:this.curryResizeHandler(t,this.onResizeStop),onResizeStart:this.curryResizeHandler(t,this.onResizeStart),onResize:this.curryResizeHandler(t,this.onResize),transformScale:d,resizeHandles:f,handle:h},e)}onResizeHandler(e,t,i,o){let{node:s,size:a,handle:l}=t;const c=this.props[o];if(!c)return;const{x:d,y:f,i:h,maxH:m,minH:y,containerWidth:R}=this.props,{minW:g,maxW:P}=this.props;let b=a;s&&(b=(0,w.resizeItemInDirection)(l,i,a,R),(0,v.flushSync)(()=>{this.setState({resizing:o==="onResizeStop"?null:b})}));let{w:_,h:z}=(0,u.calcWH)(this.getPositionParams(),b.width,b.height,d,f,l);_=(0,u.clamp)(_,Math.max(g,1),P),z=(0,u.clamp)(z,y,m),c.call(this,h,_,z,{e,node:s,size:b,handle:l})}render(){const{x:e,y:t,w:i,h:o,isDraggable:s,isResizable:a,droppingPosition:l,useCSSTransforms:c}=this.props,d=(0,u.calcGridItemPosition)(this.getPositionParams(),e,t,i,o,this.state),f=S.default.Children.only(this.props.children);let h=S.default.cloneElement(f,{ref:this.elementRef,className:(0,C.default)("react-grid-item",f.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":s,"react-draggable-dragging":!!this.state.dragging,dropping:!!l,cssTransforms:c}),style:D(D(D({},this.props.style),f.props.style),this.createStyle(d))});return h=this.mixinResizable(h,d,a),h=this.mixinDraggable(h,s),h}};return x.__exports.default=H,p(H,"propTypes",{children:n.default.element,cols:n.default.number.isRequired,containerWidth:n.default.number.isRequired,rowHeight:n.default.number.isRequired,margin:n.default.array.isRequired,maxRows:n.default.number.isRequired,containerPadding:n.default.array.isRequired,x:n.default.number.isRequired,y:n.default.number.isRequired,w:n.default.number.isRequired,h:n.default.number.isRequired,minW:function(r,e){const t=r[e];if(typeof t!="number")return new Error("minWidth not Number");if(t>r.w||t>r.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(r,e){const t=r[e];if(typeof t!="number")return new Error("maxWidth not Number");if(t<r.w||t<r.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(r,e){const t=r[e];if(typeof t!="number")return new Error("minHeight not Number");if(t>r.h||t>r.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(r,e){const t=r[e];if(typeof t!="number")return new Error("maxHeight not Number");if(t<r.h||t<r.minH)return new Error("maxHeight smaller than item height/minHeight")},i:n.default.string.isRequired,resizeHandles:W.resizeHandleAxesType,resizeHandle:W.resizeHandleType,onDragStop:n.default.func,onDragStart:n.default.func,onDrag:n.default.func,onResizeStop:n.default.func,onResizeStart:n.default.func,onResize:n.default.func,isDraggable:n.default.bool.isRequired,isResizable:n.default.bool.isRequired,isBounded:n.default.bool.isRequired,static:n.default.bool,useCSSTransforms:n.default.bool.isRequired,transformScale:n.default.number,className:n.default.string,handle:n.default.string,cancel:n.default.string,droppingPosition:n.default.shape({e:n.default.object.isRequired,left:n.default.number.isRequired,top:n.default.number.isRequired})}),p(H,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),x.__exports}exports.__require=V;
|
|
2
2
|
//# sourceMappingURL=GridItem.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../../../_virtual/ReactGridLayout.cjs"),k=require("react"),$=require("../../fast-equals/dist/fast-equals.cjs"),Y=require("../../clsx/dist/clsx2.cjs"),X=require("./utils.cjs"),F=require("./calculateUtils.cjs"),K=require("./GridItem.cjs"),J=require("./ReactGridLayoutPropTypes.cjs");var N;function Q(){if(N)return L.__exports;N=1,Object.defineProperty(L.__exports,"__esModule",{value:!0}),L.__exports.default=void 0;var _=q(k),C=$.__require(),G=I(Y.__require()),r=X.__require(),W=F.__require(),E=I(K.__require()),U=I(J.__require());function I(a){return a&&a.__esModule?a:{default:a}}function q(a,t){if(typeof WeakMap=="function")var o=new WeakMap,e=new WeakMap;return(q=function(s,l){if(!l&&s&&s.__esModule)return s;var p,n,i={__proto__:null,default:s};if(s===null||typeof s!="object"&&typeof s!="function")return i;if(p=l?e:o){if(p.has(s))return p.get(s);p.set(s,i)}for(const c in s)c!=="default"&&{}.hasOwnProperty.call(s,c)&&((n=(p=Object.defineProperty)&&Object.getOwnPropertyDescriptor(s,c))&&(n.get||n.set)?p(i,c,n):i[c]=s[c]);return i})(a,t)}function T(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(a);t&&(e=e.filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable})),o.push.apply(o,e)}return o}function R(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?T(Object(o),!0).forEach(function(e){h(a,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):T(Object(o)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(o,e))})}return a}function h(a,t,o){return(t=A(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function A(a){var t=B(a,"string");return typeof t=="symbol"?t:t+""}function B(a,t){if(typeof a!="object"||!a)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var e=o.call(a,t);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(a)}const H="react-grid-layout";let M=!1;try{M=/firefox/i.test(navigator.userAgent)}catch{}let P=class extends _.Component{constructor(){super(...arguments),h(this,"state",{activeDrag:null,layout:(0,r.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,r.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),h(this,"dragEnterCounter",0),h(this,"onDragStart",(t,o,e,s)=>{let{e:l,node:p}=s;const{layout:n}=this.state,i=(0,r.getLayoutItem)(n,t);if(!i)return;const c={w:i.w,h:i.h,x:i.x,y:i.y,placeholder:!0,i:t};return this.setState({oldDragItem:(0,r.cloneLayoutItem)(i),oldLayout:n,activeDrag:c}),this.props.onDragStart(n,i,i,null,l,p)}),h(this,"onDrag",(t,o,e,s)=>{let{e:l,node:p}=s;const{oldDragItem:n}=this.state;let{layout:i}=this.state;const{cols:c,allowOverlap:D,preventCollision:m}=this.props,d=(0,r.getLayoutItem)(i,t);if(!d)return;const g={w:d.w,h:d.h,x:d.x,y:d.y,placeholder:!0,i:t};i=(0,r.moveElement)(i,d,o,e,!0,m,(0,r.compactType)(this.props),c,D),this.props.onDrag(i,n,d,g,l,p),this.setState({layout:D?i:(0,r.compact)(i,(0,r.compactType)(this.props),c),activeDrag:g})}),h(this,"onDragStop",(t,o,e,s)=>{let{e:l,node:p}=s;if(!this.state.activeDrag)return;const{oldDragItem:n}=this.state;let{layout:i}=this.state;const{cols:c,preventCollision:D,allowOverlap:m}=this.props,d=(0,r.getLayoutItem)(i,t);if(!d)return;i=(0,r.moveElement)(i,d,o,e,!0,D,(0,r.compactType)(this.props),c,m);const w=m?i:(0,r.compact)(i,(0,r.compactType)(this.props),c);this.props.onDragStop(w,n,d,null,l,p);const{oldLayout:b}=this.state;this.setState({activeDrag:null,layout:w,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(w,b)}),h(this,"onResizeStart",(t,o,e,s)=>{let{e:l,node:p}=s;const{layout:n}=this.state,i=(0,r.getLayoutItem)(n,t);i&&(this.setState({oldResizeItem:(0,r.cloneLayoutItem)(i),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(n,i,i,null,l,p))}),h(this,"onResize",(t,o,e,s)=>{let{e:l,node:p,size:n,handle:i}=s;const{oldResizeItem:c}=this.state,{layout:D}=this.state,{cols:m,preventCollision:d,allowOverlap:g}=this.props;let w=!1,b,y,f;const[O,v]=(0,r.withLayoutItem)(D,t,u=>{let z;return y=u.x,f=u.y,["sw","w","nw","n","ne"].indexOf(i)!==-1&&(["sw","nw","w"].indexOf(i)!==-1&&(y=u.x+(u.w-o),o=u.x!==y&&y<0?u.w:o,y=y<0?0:y),["ne","n","nw"].indexOf(i)!==-1&&(f=u.y+(u.h-e),e=u.y!==f&&f<0?u.h:e,f=f<0?0:f),w=!0),d&&!g&&(z=(0,r.getAllCollisions)(D,R(R({},u),{},{w:o,h:e,x:y,y:f})).filter(x=>x.i!==u.i).length>0,z&&(f=u.y,e=u.h,y=u.x,o=u.w,w=!1)),u.w=o,u.h=e,u});if(!v)return;b=O,w&&(b=(0,r.moveElement)(O,v,y,f,!0,this.props.preventCollision,(0,r.compactType)(this.props),m,g));const S={w:v.w,h:v.h,x:v.x,y:v.y,static:!0,i:t};this.props.onResize(b,c,v,S,l,p),this.setState({layout:g?b:(0,r.compact)(b,(0,r.compactType)(this.props),m),activeDrag:S})}),h(this,"onResizeStop",(t,o,e,s)=>{let{e:l,node:p}=s;const{layout:n,oldResizeItem:i}=this.state,{cols:c,allowOverlap:D}=this.props,m=(0,r.getLayoutItem)(n,t),d=D?n:(0,r.compact)(n,(0,r.compactType)(this.props),c);this.props.onResizeStop(d,i,m,null,l,p);const{oldLayout:g}=this.state;this.setState({activeDrag:null,layout:d,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(d,g)}),h(this,"onDragOver",t=>{var o;if(t.preventDefault(),t.stopPropagation(),M&&!((o=t.nativeEvent.target)!==null&&o!==void 0&&o.classList.contains(H)))return!1;const{droppingItem:e,onDropDragOver:s,margin:l,cols:p,rowHeight:n,maxRows:i,width:c,containerPadding:D,transformScale:m}=this.props,d=s==null?void 0:s(t);if(d===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const g=R(R({},e),d),{layout:w}=this.state,b=t.currentTarget.getBoundingClientRect(),y=t.clientX-b.left,f=t.clientY-b.top,O={left:y/m,top:f/m,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:v,top:S}=this.state.droppingPosition;(v!=y||S!=f)&&this.setState({droppingPosition:O})}}else{const v={cols:p,margin:l,maxRows:i,rowHeight:n,containerWidth:c,containerPadding:D||l},S=(0,W.calcXY)(v,f,y,g.w,g.h);this.setState({droppingDOMNode:_.createElement("div",{key:g.i}),droppingPosition:O,layout:[...w,R(R({},g),{},{x:S.x,y:S.y,static:!1,isDraggable:!0})]})}}),h(this,"removeDroppingPlaceholder",()=>{const{droppingItem:t,cols:o}=this.props,{layout:e}=this.state,s=(0,r.compact)(e.filter(l=>l.i!==t.i),(0,r.compactType)(this.props),o,this.props.allowOverlap);this.setState({layout:s,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),h(this,"onDragLeave",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),h(this,"onDragEnter",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter++}),h(this,"onDrop",t=>{t.preventDefault(),t.stopPropagation();const{droppingItem:o}=this.props,{layout:e}=this.state,s=e.find(l=>l.i===o.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(e,s,t)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(t,o){let e;return o.activeDrag?null:(!(0,C.deepEqual)(t.layout,o.propsLayout)||t.compactType!==o.compactType?e=t.layout:(0,r.childrenEqual)(t.children,o.children)||(e=o.layout),e?{layout:(0,r.synchronizeLayoutWithChildren)(e,t.children,t.cols,(0,r.compactType)(t),t.allowOverlap),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}shouldComponentUpdate(t,o){return this.props.children!==t.children||!(0,r.fastRGLPropsEqual)(this.props,t,C.deepEqual)||this.state.activeDrag!==o.activeDrag||this.state.mounted!==o.mounted||this.state.droppingPosition!==o.droppingPosition}componentDidUpdate(t,o){if(!this.state.activeDrag){const e=this.state.layout,s=o.layout;this.onLayoutMaybeChanged(e,s)}}containerHeight(){if(!this.props.autoSize)return;const t=(0,r.bottom)(this.state.layout),o=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+o*2+"px"}onLayoutMaybeChanged(t,o){o||(o=this.state.layout),(0,C.deepEqual)(o,t)||this.props.onLayoutChange(t)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:o,cols:e,margin:s,containerPadding:l,rowHeight:p,maxRows:n,useCSSTransforms:i,transformScale:c}=this.props;return _.createElement(E.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder ".concat(this.state.resizing?"placeholder-resizing":""),containerWidth:o,cols:e,margin:s,containerPadding:l||s,maxRows:n,rowHeight:p,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:i,transformScale:c},_.createElement("div",null))}processGridItem(t,o){if(!t||!t.key)return;const e=(0,r.getLayoutItem)(this.state.layout,String(t.key));if(!e)return null;const{width:s,cols:l,margin:p,containerPadding:n,rowHeight:i,maxRows:c,isDraggable:D,isResizable:m,isBounded:d,useCSSTransforms:g,transformScale:w,draggableCancel:b,draggableHandle:y,resizeHandles:f,resizeHandle:O}=this.props,{mounted:v,droppingPosition:S}=this.state,u=typeof e.isDraggable=="boolean"?e.isDraggable:!e.static&&D,z=typeof e.isResizable=="boolean"?e.isResizable:!e.static&&m,j=e.resizeHandles||f,x=u&&d&&e.isBounded!==!1;return _.createElement(E.default,{containerWidth:s,cols:l,margin:p,containerPadding:n||p,maxRows:c,rowHeight:i,cancel:b,handle:y,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:u,isResizable:z,isBounded:x,useCSSTransforms:g&&v,usePercentages:!v,transformScale:w,w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minH:e.minH,minW:e.minW,maxH:e.maxH,maxW:e.maxW,static:e.static,droppingPosition:o?S:void 0,resizeHandles:j,resizeHandle:O},t)}render(){const{className:t,style:o,isDroppable:e,innerRef:s}=this.props,l=(0,G.default)(H,t),p=R({height:this.containerHeight()},o);return _.createElement("div",{ref:s,className:l,style:p,onDrop:e?this.onDrop:r.noop,onDragLeave:e?this.onDragLeave:r.noop,onDragEnter:e?this.onDragEnter:r.noop,onDragOver:e?this.onDragOver:r.noop},_.Children.map(this.props.children,n=>this.processGridItem(n)),e&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};return L.__exports.default=P,h(P,"displayName","ReactGridLayout"),h(P,"propTypes",U.default),h(P,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:r.noop,onDragStart:r.noop,onDrag:r.noop,onDragStop:r.noop,onResizeStart:r.noop,onResize:r.noop,onResizeStop:r.noop,onDrop:r.noop,onDropDragOver:r.noop}),L.__exports}exports.__require=Q;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../../../_virtual/ReactGridLayout.cjs"),B=require("react"),Y=require("../../fast-equals/dist/fast-equals.cjs"),$=require("../../clsx/dist/clsx2.cjs"),X=require("./utils.cjs"),F=require("./calculateUtils.cjs"),K=require("./GridItem.cjs"),J=require("./ReactGridLayoutPropTypes.cjs");var N;function Q(){if(N)return L.__exports;N=1,Object.defineProperty(L.__exports,"__esModule",{value:!0}),L.__exports.default=void 0;var R=q(B),C=Y.__require(),G=I($.__require()),r=X.__require(),W=F.__require(),E=I(K.__require()),U=I(J.__require());function I(a){return a&&a.__esModule?a:{default:a}}function q(a,t){if(typeof WeakMap=="function")var o=new WeakMap,e=new WeakMap;return(q=function(s,l){if(!l&&s&&s.__esModule)return s;var p,n,i={__proto__:null,default:s};if(s===null||typeof s!="object"&&typeof s!="function")return i;if(p=l?e:o){if(p.has(s))return p.get(s);p.set(s,i)}for(const c in s)c!=="default"&&{}.hasOwnProperty.call(s,c)&&((n=(p=Object.defineProperty)&&Object.getOwnPropertyDescriptor(s,c))&&(n.get||n.set)?p(i,c,n):i[c]=s[c]);return i})(a,t)}function T(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(a);t&&(e=e.filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable})),o.push.apply(o,e)}return o}function _(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?T(Object(o),!0).forEach(function(e){h(a,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):T(Object(o)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(o,e))})}return a}function h(a,t,o){return(t=A(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function A(a){var t=k(a,"string");return typeof t=="symbol"?t:t+""}function k(a,t){if(typeof a!="object"||!a)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var e=o.call(a,t);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(a)}const H="react-grid-layout";let M=!1;try{M=/firefox/i.test(navigator.userAgent)}catch{}let P=class extends R.Component{constructor(){super(...arguments),h(this,"state",{activeDrag:null,layout:(0,r.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,r.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),h(this,"dragEnterCounter",0),h(this,"onDragStart",(t,o,e,s)=>{let{e:l,node:p}=s;const{layout:n}=this.state,i=(0,r.getLayoutItem)(n,t);if(!i)return;const c={w:i.w,h:i.h,x:i.x,y:i.y,placeholder:!0,i:t};return this.setState({oldDragItem:(0,r.cloneLayoutItem)(i),oldLayout:n,activeDrag:c}),this.props.onDragStart(n,i,i,null,l,p)}),h(this,"onDrag",(t,o,e,s)=>{let{e:l,node:p}=s;const{oldDragItem:n}=this.state;let{layout:i}=this.state;const{cols:c,allowOverlap:D,preventCollision:m}=this.props,d=(0,r.getLayoutItem)(i,t);if(!d)return;const g={w:d.w,h:d.h,x:d.x,y:d.y,placeholder:!0,i:t};i=(0,r.moveElement)(i,d,o,e,!0,m,(0,r.compactType)(this.props),c,D),this.props.onDrag(i,n,d,g,l,p),this.setState({layout:D?i:(0,r.compact)(i,(0,r.compactType)(this.props),c),activeDrag:g})}),h(this,"onDragStop",(t,o,e,s)=>{let{e:l,node:p}=s;if(!this.state.activeDrag)return;const{oldDragItem:n}=this.state;let{layout:i}=this.state;const{cols:c,preventCollision:D,allowOverlap:m}=this.props,d=(0,r.getLayoutItem)(i,t);if(!d)return;i=(0,r.moveElement)(i,d,o,e,!0,D,(0,r.compactType)(this.props),c,m);const w=m?i:(0,r.compact)(i,(0,r.compactType)(this.props),c);this.props.onDragStop(w,n,d,null,l,p);const{oldLayout:b}=this.state;this.setState({activeDrag:null,layout:w,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(w,b)}),h(this,"onResizeStart",(t,o,e,s)=>{let{e:l,node:p}=s;const{layout:n}=this.state,i=(0,r.getLayoutItem)(n,t);i&&(this.setState({oldResizeItem:(0,r.cloneLayoutItem)(i),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(n,i,i,null,l,p))}),h(this,"onResize",(t,o,e,s)=>{let{e:l,node:p,size:n,handle:i}=s;const{oldResizeItem:c}=this.state,{layout:D}=this.state,{cols:m,preventCollision:d,allowOverlap:g}=this.props;let w=!1,b,y,f;const[O,v]=(0,r.withLayoutItem)(D,t,u=>{let z;return y=u.x,f=u.y,["sw","w","nw","n","ne"].indexOf(i)!==-1&&(["sw","nw","w"].indexOf(i)!==-1&&(y=u.x+(u.w-o),o=u.x!==y&&y<0?u.w:o,y=y<0?0:y),["ne","n","nw"].indexOf(i)!==-1&&(f=u.y+(u.h-e),e=u.y!==f&&f<0?u.h:e,f=f<0?0:f),w=!0),d&&!g&&(z=(0,r.getAllCollisions)(D,_(_({},u),{},{w:o,h:e,x:y,y:f})).filter(x=>x.i!==u.i).length>0,z&&(f=u.y,e=u.h,y=u.x,o=u.w,w=!1)),u.w=o,u.h=e,u});if(!v)return;b=O,w&&(b=(0,r.moveElement)(O,v,y,f,!0,this.props.preventCollision,(0,r.compactType)(this.props),m,g));const S={w:v.w,h:v.h,x:v.x,y:v.y,static:!0,i:t};this.props.onResize(b,c,v,S,l,p),this.setState({layout:g?b:(0,r.compact)(b,(0,r.compactType)(this.props),m),activeDrag:S})}),h(this,"onResizeStop",(t,o,e,s)=>{let{e:l,node:p}=s;const{layout:n,oldResizeItem:i}=this.state,{cols:c,allowOverlap:D}=this.props,m=(0,r.getLayoutItem)(n,t),d=D?n:(0,r.compact)(n,(0,r.compactType)(this.props),c);this.props.onResizeStop(d,i,m,null,l,p);const{oldLayout:g}=this.state;this.setState({activeDrag:null,layout:d,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(d,g)}),h(this,"onDragOver",t=>{var o;if(t.preventDefault(),t.stopPropagation(),M&&!((o=t.nativeEvent.target)!==null&&o!==void 0&&o.classList.contains(H)))return!1;const{droppingItem:e,onDropDragOver:s,margin:l,cols:p,rowHeight:n,maxRows:i,width:c,containerPadding:D,transformScale:m}=this.props,d=s==null?void 0:s(t);if(d===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const g=_(_({},e),d),{layout:w}=this.state,b=t.currentTarget.getBoundingClientRect(),y=t.clientX-b.left,f=t.clientY-b.top,O={left:y/m,top:f/m,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:v,top:S}=this.state.droppingPosition;(v!=y||S!=f)&&this.setState({droppingPosition:O})}}else{const v={cols:p,margin:l,maxRows:i,rowHeight:n,containerWidth:c,containerPadding:D||l},S=(0,W.calcXY)(v,f,y,g.w,g.h);this.setState({droppingDOMNode:R.createElement("div",{key:g.i}),droppingPosition:O,layout:[...w,_(_({},g),{},{x:S.x,y:S.y,static:!1,isDraggable:!0})]})}}),h(this,"removeDroppingPlaceholder",()=>{const{droppingItem:t,cols:o}=this.props,{layout:e}=this.state,s=(0,r.compact)(e.filter(l=>l.i!==t.i),(0,r.compactType)(this.props),o,this.props.allowOverlap);this.setState({layout:s,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),h(this,"onDragLeave",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),h(this,"onDragEnter",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter++}),h(this,"onDrop",t=>{t.preventDefault(),t.stopPropagation();const{droppingItem:o}=this.props,{layout:e}=this.state,s=e.find(l=>l.i===o.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(e,s,t)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(t,o){let e;return o.activeDrag?null:(!(0,C.deepEqual)(t.layout,o.propsLayout)||t.compactType!==o.compactType?e=t.layout:(0,r.childrenEqual)(t.children,o.children)||(e=o.layout),e?{layout:(0,r.synchronizeLayoutWithChildren)(e,t.children,t.cols,(0,r.compactType)(t),t.allowOverlap),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}shouldComponentUpdate(t,o){return this.props.children!==t.children||!(0,r.fastRGLPropsEqual)(this.props,t,C.deepEqual)||this.state.activeDrag!==o.activeDrag||this.state.mounted!==o.mounted||this.state.droppingPosition!==o.droppingPosition}componentDidUpdate(t,o){if(!this.state.activeDrag){const e=this.state.layout,s=o.layout;this.onLayoutMaybeChanged(e,s)}}containerHeight(){if(!this.props.autoSize)return;const t=(0,r.bottom)(this.state.layout),o=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+o*2+"px"}onLayoutMaybeChanged(t,o){o||(o=this.state.layout),(0,C.deepEqual)(o,t)||this.props.onLayoutChange(t)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:o,cols:e,margin:s,containerPadding:l,rowHeight:p,maxRows:n,useCSSTransforms:i,transformScale:c}=this.props;return R.createElement(E.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder ".concat(this.state.resizing?"placeholder-resizing":""),containerWidth:o,cols:e,margin:s,containerPadding:l||s,maxRows:n,rowHeight:p,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:i,transformScale:c},R.createElement("div",null))}processGridItem(t,o){if(!t||!t.key)return;const e=(0,r.getLayoutItem)(this.state.layout,String(t.key));if(!e)return null;const{width:s,cols:l,margin:p,containerPadding:n,rowHeight:i,maxRows:c,isDraggable:D,isResizable:m,isBounded:d,useCSSTransforms:g,transformScale:w,draggableCancel:b,draggableHandle:y,resizeHandles:f,resizeHandle:O}=this.props,{mounted:v,droppingPosition:S}=this.state,u=typeof e.isDraggable=="boolean"?e.isDraggable:!e.static&&D,z=typeof e.isResizable=="boolean"?e.isResizable:!e.static&&m,j=e.resizeHandles||f,x=u&&d&&e.isBounded!==!1;return R.createElement(E.default,{containerWidth:s,cols:l,margin:p,containerPadding:n||p,maxRows:c,rowHeight:i,cancel:b,handle:y,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:u,isResizable:z,isBounded:x,useCSSTransforms:g&&v,usePercentages:!v,transformScale:w,w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minH:e.minH,minW:e.minW,maxH:e.maxH,maxW:e.maxW,static:e.static,droppingPosition:o?S:void 0,resizeHandles:j,resizeHandle:O},t)}render(){const{className:t,style:o,isDroppable:e,innerRef:s}=this.props,l=(0,G.default)(H,t),p=_({height:this.containerHeight()},o);return R.createElement("div",{ref:s,className:l,style:p,onDrop:e?this.onDrop:r.noop,onDragLeave:e?this.onDragLeave:r.noop,onDragEnter:e?this.onDragEnter:r.noop,onDragOver:e?this.onDragOver:r.noop},R.Children.map(this.props.children,n=>this.processGridItem(n)),e&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};return L.__exports.default=P,h(P,"displayName","ReactGridLayout"),h(P,"propTypes",U.default),h(P,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:r.noop,onDragStart:r.noop,onDrag:r.noop,onDragStop:r.noop,onResizeStart:r.noop,onResize:r.noop,onResizeStop:r.noop,onDrop:r.noop,onDropDragOver:r.noop}),L.__exports}exports.__require=Q;
|
|
2
2
|
//# sourceMappingURL=ReactGridLayout.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exports as z } from "../../../_virtual/ReactGridLayout.js";
|
|
2
|
-
import
|
|
3
|
-
import { __require as
|
|
4
|
-
import { __require as
|
|
2
|
+
import B from "react";
|
|
3
|
+
import { __require as Y } from "../../fast-equals/dist/fast-equals.js";
|
|
4
|
+
import { __require as $ } from "../../clsx/dist/clsx2.js";
|
|
5
5
|
import { __require as F } from "./utils.js";
|
|
6
6
|
import { __require as X } from "./calculateUtils.js";
|
|
7
7
|
import { __require as K } from "./GridItem.js";
|
|
@@ -12,7 +12,7 @@ function at() {
|
|
|
12
12
|
N = 1, Object.defineProperty(z, "__esModule", {
|
|
13
13
|
value: !0
|
|
14
14
|
}), z.default = void 0;
|
|
15
|
-
var S = T(
|
|
15
|
+
var S = T(B), C = /* @__PURE__ */ Y(), G = I($()), r = F(), U = X(), x = I(K()), W = I(J());
|
|
16
16
|
function I(a) {
|
|
17
17
|
return a && a.__esModule ? a : { default: a };
|
|
18
18
|
}
|
|
@@ -55,10 +55,10 @@ function at() {
|
|
|
55
55
|
return (t = A(t)) in a ? Object.defineProperty(a, t, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : a[t] = o, a;
|
|
56
56
|
}
|
|
57
57
|
function A(a) {
|
|
58
|
-
var t =
|
|
58
|
+
var t = k(a, "string");
|
|
59
59
|
return typeof t == "symbol" ? t : t + "";
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function k(a, t) {
|
|
62
62
|
if (typeof a != "object" || !a) return a;
|
|
63
63
|
var o = a[Symbol.toPrimitive];
|
|
64
64
|
if (o !== void 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactGridLayout.js","sources":["../../../../../node_modules/react-grid-layout/build/ReactGridLayout.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _fastEquals = require(\"fast-equals\");\nvar _clsx = _interopRequireDefault(require(\"clsx\"));\nvar _utils = require(\"./utils\");\nvar _calculateUtils = require(\"./calculateUtils\");\nvar _GridItem = _interopRequireDefault(require(\"./GridItem\"));\nvar _ReactGridLayoutPropTypes = _interopRequireDefault(require(\"./ReactGridLayoutPropTypes\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/*:: import type {\n ChildrenArray as ReactChildrenArray,\n Element as ReactElement\n} from \"react\";*/\n/*:: import type {\n CompactType,\n GridResizeEvent,\n GridDragEvent,\n DragOverEvent,\n Layout,\n DroppingPosition,\n LayoutItem\n} from \"./utils\";*/\n// Types\n/*:: import type { PositionParams } from \"./calculateUtils\";*/\n/*:: type State = {\n activeDrag: ?LayoutItem,\n layout: Layout,\n mounted: boolean,\n oldDragItem: ?LayoutItem,\n oldLayout: ?Layout,\n oldResizeItem: ?LayoutItem,\n resizing: boolean,\n droppingDOMNode: ?ReactElement<any>,\n droppingPosition?: DroppingPosition,\n // Mirrored props\n children: ReactChildrenArray<ReactElement<any>>,\n compactType?: CompactType,\n propsLayout?: Layout\n};*/\n/*:: import type { Props, DefaultProps } from \"./ReactGridLayoutPropTypes\";*/\n// End Types\nconst layoutClassName = \"react-grid-layout\";\nlet isFirefox = false;\n// Try...catch will protect from navigator not existing (e.g. node) or a bad implementation of navigator\ntry {\n isFirefox = /firefox/i.test(navigator.userAgent);\n} catch (e) {\n /* Ignore */\n}\n\n/**\n * A reactive, fluid grid layout with draggable, resizable components.\n */\n\nclass ReactGridLayout extends React.Component /*:: <Props, State>*/{\n constructor() {\n super(...arguments);\n _defineProperty(this, \"state\", {\n activeDrag: null,\n layout: (0, _utils.synchronizeLayoutWithChildren)(this.props.layout, this.props.children, this.props.cols,\n // Legacy support for verticalCompact: false\n (0, _utils.compactType)(this.props), this.props.allowOverlap),\n mounted: false,\n oldDragItem: null,\n oldLayout: null,\n oldResizeItem: null,\n resizing: false,\n droppingDOMNode: null,\n children: []\n });\n _defineProperty(this, \"dragEnterCounter\", 0);\n /**\n * When dragging starts\n * @param {String} i Id of the child\n * @param {Number} x X position of the move\n * @param {Number} y Y position of the move\n * @param {Event} e The mousedown event\n * @param {Element} node The current dragging DOM element\n */\n _defineProperty(this, \"onDragStart\", (i /*: string*/, x /*: number*/, y /*: number*/, _ref /*:: */) => {\n let {\n e,\n node\n } /*: GridDragEvent*/ = _ref /*: GridDragEvent*/;\n const {\n layout\n } = this.state;\n const l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\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 this.setState({\n oldDragItem: (0, _utils.cloneLayoutItem)(l),\n oldLayout: layout,\n activeDrag: placeholder\n });\n return this.props.onDragStart(layout, l, l, null, e, node);\n });\n /**\n * Each drag movement create a new dragelement and move the element to the dragged location\n * @param {String} i Id of the child\n * @param {Number} x X position of the move\n * @param {Number} y Y position of the move\n * @param {Event} e The mousedown event\n * @param {Element} node The current dragging DOM element\n */\n _defineProperty(this, \"onDrag\", (i, x, y, _ref2) => {\n let {\n e,\n node\n } = _ref2;\n const {\n oldDragItem\n } = this.state;\n let {\n layout\n } = this.state;\n const {\n cols,\n allowOverlap,\n preventCollision\n } = this.props;\n const l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\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 // Move the element to the dragged location.\n const isUserAction = true;\n layout = (0, _utils.moveElement)(layout, l, x, y, isUserAction, preventCollision, (0, _utils.compactType)(this.props), cols, allowOverlap);\n this.props.onDrag(layout, oldDragItem, l, placeholder, e, node);\n this.setState({\n layout: allowOverlap ? layout : (0, _utils.compact)(layout, (0, _utils.compactType)(this.props), cols),\n activeDrag: placeholder\n });\n });\n /**\n * When dragging stops, figure out which position the element is closest to and update its x and y.\n * @param {String} i Index of the child.\n * @param {Number} x X position of the move\n * @param {Number} y Y position of the move\n * @param {Event} e The mousedown event\n * @param {Element} node The current dragging DOM element\n */\n _defineProperty(this, \"onDragStop\", (i, x, y, _ref3) => {\n let {\n e,\n node\n } = _ref3;\n if (!this.state.activeDrag) return;\n const {\n oldDragItem\n } = this.state;\n let {\n layout\n } = this.state;\n const {\n cols,\n preventCollision,\n allowOverlap\n } = this.props;\n const l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\n\n // Move the element here\n const isUserAction = true;\n layout = (0, _utils.moveElement)(layout, l, x, y, isUserAction, preventCollision, (0, _utils.compactType)(this.props), cols, allowOverlap);\n\n // Set state\n const newLayout = allowOverlap ? layout : (0, _utils.compact)(layout, (0, _utils.compactType)(this.props), cols);\n this.props.onDragStop(newLayout, oldDragItem, l, null, e, node);\n const {\n oldLayout\n } = this.state;\n this.setState({\n activeDrag: null,\n layout: newLayout,\n oldDragItem: null,\n oldLayout: null\n });\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n });\n _defineProperty(this, \"onResizeStart\", (i, w, h, _ref4) => {\n let {\n e,\n node\n } = _ref4;\n const {\n layout\n } = this.state;\n const l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\n this.setState({\n oldResizeItem: (0, _utils.cloneLayoutItem)(l),\n oldLayout: this.state.layout,\n resizing: true\n });\n this.props.onResizeStart(layout, l, l, null, e, node);\n });\n _defineProperty(this, \"onResize\", (i, w, h, _ref5) => {\n let {\n e,\n node,\n size,\n handle\n } = _ref5;\n const {\n oldResizeItem\n } = this.state;\n const {\n layout\n } = this.state;\n const {\n cols,\n preventCollision,\n allowOverlap\n } = this.props;\n let shouldMoveItem = false;\n let finalLayout;\n let x;\n let y;\n const [newLayout, l] = (0, _utils.withLayoutItem)(layout, i, l => {\n let hasCollisions;\n x = l.x;\n y = l.y;\n if ([\"sw\", \"w\", \"nw\", \"n\", \"ne\"].indexOf(handle) !== -1) {\n if ([\"sw\", \"nw\", \"w\"].indexOf(handle) !== -1) {\n x = l.x + (l.w - w);\n w = l.x !== x && x < 0 ? l.w : w;\n x = x < 0 ? 0 : x;\n }\n if ([\"ne\", \"n\", \"nw\"].indexOf(handle) !== -1) {\n y = l.y + (l.h - h);\n h = l.y !== y && y < 0 ? l.h : h;\n y = y < 0 ? 0 : y;\n }\n shouldMoveItem = true;\n }\n\n // Something like quad tree should be used\n // to find collisions faster\n if (preventCollision && !allowOverlap) {\n const collisions = (0, _utils.getAllCollisions)(layout, _objectSpread(_objectSpread({}, l), {}, {\n w,\n h,\n x,\n y\n })).filter(layoutItem => layoutItem.i !== l.i);\n hasCollisions = collisions.length > 0;\n\n // If we're colliding, we need adjust the placeholder.\n if (hasCollisions) {\n // Reset layoutItem dimensions if there were collisions\n y = l.y;\n h = l.h;\n x = l.x;\n w = l.w;\n shouldMoveItem = false;\n }\n }\n l.w = w;\n l.h = h;\n return l;\n });\n\n // Shouldn't ever happen, but typechecking makes it necessary\n if (!l) return;\n finalLayout = newLayout;\n if (shouldMoveItem) {\n // Move the element to the new position.\n const isUserAction = true;\n finalLayout = (0, _utils.moveElement)(newLayout, l, x, y, isUserAction, this.props.preventCollision, (0, _utils.compactType)(this.props), cols, allowOverlap);\n }\n\n // Create placeholder element (display only)\n const placeholder = {\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n static: true,\n i: i\n };\n this.props.onResize(finalLayout, oldResizeItem, l, placeholder, e, node);\n\n // Re-compact the newLayout and set the drag placeholder.\n this.setState({\n layout: allowOverlap ? finalLayout : (0, _utils.compact)(finalLayout, (0, _utils.compactType)(this.props), cols),\n activeDrag: placeholder\n });\n });\n _defineProperty(this, \"onResizeStop\", (i, w, h, _ref6) => {\n let {\n e,\n node\n } = _ref6;\n const {\n layout,\n oldResizeItem\n } = this.state;\n const {\n cols,\n allowOverlap\n } = this.props;\n const l = (0, _utils.getLayoutItem)(layout, i);\n\n // Set state\n const newLayout = allowOverlap ? layout : (0, _utils.compact)(layout, (0, _utils.compactType)(this.props), cols);\n this.props.onResizeStop(newLayout, oldResizeItem, l, null, e, node);\n const {\n oldLayout\n } = this.state;\n this.setState({\n activeDrag: null,\n layout: newLayout,\n oldResizeItem: null,\n oldLayout: null,\n resizing: false\n });\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n });\n // Called while dragging an element. Part of browser native drag/drop API.\n // Native event target might be the layout itself, or an element within the layout.\n _defineProperty(this, \"onDragOver\", e => {\n var _e$nativeEvent$target;\n e.preventDefault(); // Prevent any browser native action\n e.stopPropagation();\n\n // we should ignore events from layout's children in Firefox\n // to avoid unpredictable jumping of a dropping placeholder\n // FIXME remove this hack\n if (isFirefox &&\n // $FlowIgnore can't figure this out\n !((_e$nativeEvent$target = e.nativeEvent.target) !== null && _e$nativeEvent$target !== void 0 && _e$nativeEvent$target.classList.contains(layoutClassName))) {\n return false;\n }\n const {\n droppingItem,\n onDropDragOver,\n margin,\n cols,\n rowHeight,\n maxRows,\n width,\n containerPadding,\n transformScale\n } = this.props;\n // Allow user to customize the dropping item or short-circuit the drop based on the results\n // of the `onDragOver(e: Event)` callback.\n const onDragOverResult = onDropDragOver === null || onDropDragOver === void 0 ? void 0 : onDropDragOver(e);\n if (onDragOverResult === false) {\n if (this.state.droppingDOMNode) {\n this.removeDroppingPlaceholder();\n }\n return false;\n }\n const finalDroppingItem = _objectSpread(_objectSpread({}, droppingItem), onDragOverResult);\n const {\n layout\n } = this.state;\n\n // $FlowIgnore missing def\n const gridRect = e.currentTarget.getBoundingClientRect(); // The grid's position in the viewport\n\n // Calculate the mouse position relative to the grid\n const layerX = e.clientX - gridRect.left;\n const layerY = e.clientY - gridRect.top;\n const droppingPosition = {\n left: layerX / transformScale,\n top: layerY / transformScale,\n e\n };\n if (!this.state.droppingDOMNode) {\n const positionParams /*: PositionParams*/ = {\n cols,\n margin,\n maxRows,\n rowHeight,\n containerWidth: width,\n containerPadding: containerPadding || margin\n };\n const calculatedPosition = (0, _calculateUtils.calcXY)(positionParams, layerY, layerX, finalDroppingItem.w, finalDroppingItem.h);\n this.setState({\n droppingDOMNode: /*#__PURE__*/React.createElement(\"div\", {\n key: finalDroppingItem.i\n }),\n droppingPosition,\n layout: [...layout, _objectSpread(_objectSpread({}, finalDroppingItem), {}, {\n x: calculatedPosition.x,\n y: calculatedPosition.y,\n static: false,\n isDraggable: true\n })]\n });\n } else if (this.state.droppingPosition) {\n const {\n left,\n top\n } = this.state.droppingPosition;\n const shouldUpdatePosition = left != layerX || top != layerY;\n if (shouldUpdatePosition) {\n this.setState({\n droppingPosition\n });\n }\n }\n });\n _defineProperty(this, \"removeDroppingPlaceholder\", () => {\n const {\n droppingItem,\n cols\n } = this.props;\n const {\n layout\n } = this.state;\n const newLayout = (0, _utils.compact)(layout.filter(l => l.i !== droppingItem.i), (0, _utils.compactType)(this.props), cols, this.props.allowOverlap);\n this.setState({\n layout: newLayout,\n droppingDOMNode: null,\n activeDrag: null,\n droppingPosition: undefined\n });\n });\n _defineProperty(this, \"onDragLeave\", e => {\n e.preventDefault(); // Prevent any browser native action\n e.stopPropagation();\n this.dragEnterCounter--;\n\n // onDragLeave can be triggered on each layout's child.\n // But we know that count of dragEnter and dragLeave events\n // will be balanced after leaving the layout's container\n // so we can increase and decrease count of dragEnter and\n // when it'll be equal to 0 we'll remove the placeholder\n if (this.dragEnterCounter === 0) {\n this.removeDroppingPlaceholder();\n }\n });\n _defineProperty(this, \"onDragEnter\", e => {\n e.preventDefault(); // Prevent any browser native action\n e.stopPropagation();\n this.dragEnterCounter++;\n });\n _defineProperty(this, \"onDrop\", (e /*: Event*/) => {\n e.preventDefault(); // Prevent any browser native action\n e.stopPropagation();\n const {\n droppingItem\n } = this.props;\n const {\n layout\n } = this.state;\n const item = layout.find(l => l.i === droppingItem.i);\n\n // reset dragEnter counter on drop\n this.dragEnterCounter = 0;\n this.removeDroppingPlaceholder();\n this.props.onDrop(layout, item, e);\n });\n }\n componentDidMount() {\n this.setState({\n mounted: true\n });\n // Possibly call back with layout on mount. This should be done after correcting the layout width\n // to ensure we don't rerender with the wrong width.\n this.onLayoutMaybeChanged(this.state.layout, this.props.layout);\n }\n static getDerivedStateFromProps(nextProps /*: Props*/, prevState /*: State*/) /*: $Shape<State> | null*/{\n let newLayoutBase;\n if (prevState.activeDrag) {\n return null;\n }\n\n // Legacy support for compactType\n // Allow parent to set layout directly.\n if (!(0, _fastEquals.deepEqual)(nextProps.layout, prevState.propsLayout) || nextProps.compactType !== prevState.compactType) {\n newLayoutBase = nextProps.layout;\n } else if (!(0, _utils.childrenEqual)(nextProps.children, prevState.children)) {\n // If children change, also regenerate the layout. Use our state\n // as the base in case because it may be more up to date than\n // what is in props.\n newLayoutBase = prevState.layout;\n }\n\n // We need to regenerate the layout.\n if (newLayoutBase) {\n const newLayout = (0, _utils.synchronizeLayoutWithChildren)(newLayoutBase, nextProps.children, nextProps.cols, (0, _utils.compactType)(nextProps), nextProps.allowOverlap);\n return {\n layout: newLayout,\n // We need to save these props to state for using\n // getDerivedStateFromProps instead of componentDidMount (in which we would get extra rerender)\n compactType: nextProps.compactType,\n children: nextProps.children,\n propsLayout: nextProps.layout\n };\n }\n return null;\n }\n shouldComponentUpdate(nextProps /*: Props*/, nextState /*: State*/) /*: boolean*/{\n return (\n // NOTE: this is almost always unequal. Therefore the only way to get better performance\n // from SCU is if the user intentionally memoizes children. If they do, and they can\n // handle changes properly, performance will increase.\n this.props.children !== nextProps.children || !(0, _utils.fastRGLPropsEqual)(this.props, nextProps, _fastEquals.deepEqual) || this.state.activeDrag !== nextState.activeDrag || this.state.mounted !== nextState.mounted || this.state.droppingPosition !== nextState.droppingPosition\n );\n }\n componentDidUpdate(prevProps /*: Props*/, prevState /*: State*/) {\n if (!this.state.activeDrag) {\n const newLayout = this.state.layout;\n const oldLayout = prevState.layout;\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n }\n }\n\n /**\n * Calculates a pixel value for the container.\n * @return {String} Container height in pixels.\n */\n containerHeight() /*: ?string*/{\n if (!this.props.autoSize) return;\n const nbRow = (0, _utils.bottom)(this.state.layout);\n const containerPaddingY = this.props.containerPadding ? this.props.containerPadding[1] : this.props.margin[1];\n return nbRow * this.props.rowHeight + (nbRow - 1) * this.props.margin[1] + containerPaddingY * 2 + \"px\";\n }\n onLayoutMaybeChanged(newLayout /*: Layout*/, oldLayout /*: ?Layout*/) {\n if (!oldLayout) oldLayout = this.state.layout;\n if (!(0, _fastEquals.deepEqual)(oldLayout, newLayout)) {\n this.props.onLayoutChange(newLayout);\n }\n }\n /**\n * Create a placeholder object.\n * @return {Element} Placeholder div.\n */\n placeholder() /*: ?ReactElement<any>*/{\n const {\n activeDrag\n } = this.state;\n if (!activeDrag) return null;\n const {\n width,\n cols,\n margin,\n containerPadding,\n rowHeight,\n maxRows,\n useCSSTransforms,\n transformScale\n } = this.props;\n\n // {...this.state.activeDrag} is pretty slow, actually\n return /*#__PURE__*/React.createElement(_GridItem.default, {\n w: activeDrag.w,\n h: activeDrag.h,\n x: activeDrag.x,\n y: activeDrag.y,\n i: activeDrag.i,\n className: \"react-grid-placeholder \".concat(this.state.resizing ? \"placeholder-resizing\" : \"\"),\n containerWidth: width,\n cols: cols,\n margin: margin,\n containerPadding: containerPadding || margin,\n maxRows: maxRows,\n rowHeight: rowHeight,\n isDraggable: false,\n isResizable: false,\n isBounded: false,\n useCSSTransforms: useCSSTransforms,\n transformScale: transformScale\n }, /*#__PURE__*/React.createElement(\"div\", null));\n }\n\n /**\n * Given a grid item, set its style attributes & surround in a <Draggable>.\n * @param {Element} child React element.\n * @return {Element} Element wrapped in draggable and properly placed.\n */\n processGridItem(child /*: ReactElement<any>*/, isDroppingItem /*: boolean*/) /*: ?ReactElement<any>*/{\n if (!child || !child.key) return;\n const l = (0, _utils.getLayoutItem)(this.state.layout, String(child.key));\n if (!l) return null;\n const {\n width,\n cols,\n margin,\n containerPadding,\n rowHeight,\n maxRows,\n isDraggable,\n isResizable,\n isBounded,\n useCSSTransforms,\n transformScale,\n draggableCancel,\n draggableHandle,\n resizeHandles,\n resizeHandle\n } = this.props;\n const {\n mounted,\n droppingPosition\n } = this.state;\n\n // Determine user manipulations possible.\n // If an item is static, it can't be manipulated by default.\n // Any properties defined directly on the grid item will take precedence.\n const draggable = typeof l.isDraggable === \"boolean\" ? l.isDraggable : !l.static && isDraggable;\n const resizable = typeof l.isResizable === \"boolean\" ? l.isResizable : !l.static && isResizable;\n const resizeHandlesOptions = l.resizeHandles || resizeHandles;\n\n // isBounded set on child if set on parent, and child is not explicitly false\n const bounded = draggable && isBounded && l.isBounded !== false;\n return /*#__PURE__*/React.createElement(_GridItem.default, {\n containerWidth: width,\n cols: cols,\n margin: margin,\n containerPadding: containerPadding || margin,\n maxRows: maxRows,\n rowHeight: rowHeight,\n cancel: draggableCancel,\n handle: draggableHandle,\n onDragStop: this.onDragStop,\n onDragStart: this.onDragStart,\n onDrag: this.onDrag,\n onResizeStart: this.onResizeStart,\n onResize: this.onResize,\n onResizeStop: this.onResizeStop,\n isDraggable: draggable,\n isResizable: resizable,\n isBounded: bounded,\n useCSSTransforms: useCSSTransforms && mounted,\n usePercentages: !mounted,\n transformScale: transformScale,\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n i: l.i,\n minH: l.minH,\n minW: l.minW,\n maxH: l.maxH,\n maxW: l.maxW,\n static: l.static,\n droppingPosition: isDroppingItem ? droppingPosition : undefined,\n resizeHandles: resizeHandlesOptions,\n resizeHandle: resizeHandle\n }, child);\n }\n render() /*: React.Element<\"div\">*/{\n const {\n className,\n style,\n isDroppable,\n innerRef\n } = this.props;\n const mergedClassName = (0, _clsx.default)(layoutClassName, className);\n const mergedStyle = _objectSpread({\n height: this.containerHeight()\n }, style);\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: innerRef,\n className: mergedClassName,\n style: mergedStyle,\n onDrop: isDroppable ? this.onDrop : _utils.noop,\n onDragLeave: isDroppable ? this.onDragLeave : _utils.noop,\n onDragEnter: isDroppable ? this.onDragEnter : _utils.noop,\n onDragOver: isDroppable ? this.onDragOver : _utils.noop\n }, React.Children.map(this.props.children, child => this.processGridItem(child)), isDroppable && this.state.droppingDOMNode && this.processGridItem(this.state.droppingDOMNode, true), this.placeholder());\n }\n}\nexports.default = ReactGridLayout;\n// TODO publish internal ReactClass displayName transform\n_defineProperty(ReactGridLayout, \"displayName\", \"ReactGridLayout\");\n// Refactored to another module to make way for preval\n_defineProperty(ReactGridLayout, \"propTypes\", _ReactGridLayoutPropTypes.default);\n_defineProperty(ReactGridLayout, \"defaultProps\", {\n autoSize: true,\n cols: 12,\n className: \"\",\n style: {},\n draggableHandle: \"\",\n draggableCancel: \"\",\n containerPadding: null,\n rowHeight: 150,\n maxRows: Infinity,\n // infinite vertical growth\n layout: [],\n margin: [10, 10],\n isBounded: false,\n isDraggable: true,\n isResizable: true,\n allowOverlap: false,\n isDroppable: false,\n useCSSTransforms: true,\n transformScale: 1,\n verticalCompact: true,\n compactType: \"vertical\",\n preventCollision: false,\n droppingItem: {\n i: \"__dropping-elem__\",\n h: 1,\n w: 1\n },\n resizeHandles: [\"se\"],\n onLayoutChange: _utils.noop,\n onDragStart: _utils.noop,\n onDrag: _utils.noop,\n onDragStop: _utils.noop,\n onResizeStart: _utils.noop,\n onResize: _utils.noop,\n onResizeStop: _utils.noop,\n onDrop: _utils.noop,\n onDropDragOver: _utils.noop\n});"],"names":["ReactGridLayout_1","React","_interopRequireWildcard","require$$0","_fastEquals","require$$1","_clsx","_interopRequireDefault","require$$2","_utils","require$$3","_calculateUtils","require$$4","_GridItem","require$$5","_ReactGridLayoutPropTypes","require$$6","e","r","n","t","o","i","f","ownKeys","_objectSpread","_defineProperty","_toPropertyKey","_toPrimitive","layoutClassName","isFirefox","ReactGridLayout$1","x","y","_ref","node","layout","l","placeholder","_ref2","oldDragItem","cols","allowOverlap","preventCollision","_ref3","newLayout","oldLayout","w","h","_ref4","_ref5","size","handle","oldResizeItem","shouldMoveItem","finalLayout","hasCollisions","layoutItem","_ref6","_e$nativeEvent$target","droppingItem","onDropDragOver","margin","rowHeight","maxRows","width","containerPadding","transformScale","onDragOverResult","finalDroppingItem","gridRect","layerX","layerY","droppingPosition","left","top","positionParams","calculatedPosition","item","nextProps","prevState","newLayoutBase","nextState","prevProps","nbRow","containerPaddingY","activeDrag","useCSSTransforms","child","isDroppingItem","isDraggable","isResizable","isBounded","draggableCancel","draggableHandle","resizeHandles","resizeHandle","mounted","draggable","resizable","resizeHandlesOptions","bounded","className","style","isDroppable","innerRef","mergedClassName","mergedStyle","ReactGridLayout"],"mappings":";;;;;;;;;;;SAEA,OAAO,eAAeA,GAAS,c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,eAAe,CAAC,IAAI;AAAA,IACpB,gBAAgBnG,EAAO;AAAA,IACvB,aAAaA,EAAO;AAAA,IACpB,QAAQA,EAAO;AAAA,IACf,YAAYA,EAAO;AAAA,IACnB,eAAeA,EAAO;AAAA,IACtB,UAAUA,EAAO;AAAA,IACjB,cAAcA,EAAO;AAAA,IACrB,QAAQA,EAAO;AAAA,IACf,gBAAgBA,EAAO;AAAA,EACzB,CAAC;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"ReactGridLayout.js","sources":["../../../../../node_modules/react-grid-layout/build/ReactGridLayout.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _fastEquals = require(\"fast-equals\");\nvar _clsx = _interopRequireDefault(require(\"clsx\"));\nvar _utils = require(\"./utils\");\nvar _calculateUtils = require(\"./calculateUtils\");\nvar _GridItem = _interopRequireDefault(require(\"./GridItem\"));\nvar _ReactGridLayoutPropTypes = _interopRequireDefault(require(\"./ReactGridLayoutPropTypes\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/*:: import type {\n ChildrenArray as ReactChildrenArray,\n Element as ReactElement\n} from \"react\";*/\n/*:: import type {\n CompactType,\n GridResizeEvent,\n GridDragEvent,\n DragOverEvent,\n Layout,\n DroppingPosition,\n LayoutItem\n} from \"./utils\";*/\n// Types\n/*:: import type { PositionParams } from \"./calculateUtils\";*/\n/*:: type State = {\n activeDrag: ?LayoutItem,\n layout: Layout,\n mounted: boolean,\n oldDragItem: ?LayoutItem,\n oldLayout: ?Layout,\n oldResizeItem: ?LayoutItem,\n resizing: boolean,\n droppingDOMNode: ?ReactElement<any>,\n droppingPosition?: DroppingPosition,\n // Mirrored props\n children: ReactChildrenArray<ReactElement<any>>,\n compactType?: CompactType,\n propsLayout?: Layout\n};*/\n/*:: import type { Props, DefaultProps } from \"./ReactGridLayoutPropTypes\";*/\n// End Types\nconst layoutClassName = \"react-grid-layout\";\nlet isFirefox = false;\n// Try...catch will protect from navigator not existing (e.g. node) or a bad implementation of navigator\ntry {\n isFirefox = /firefox/i.test(navigator.userAgent);\n} catch (e) {\n /* Ignore */\n}\n\n/**\n * A reactive, fluid grid layout with draggable, resizable components.\n */\n\nclass ReactGridLayout extends React.Component /*:: <Props, State>*/{\n constructor() {\n super(...arguments);\n _defineProperty(this, \"state\", {\n activeDrag: null,\n layout: (0, _utils.synchronizeLayoutWithChildren)(this.props.layout, this.props.children, this.props.cols,\n // Legacy support for verticalCompact: false\n (0, _utils.compactType)(this.props), this.props.allowOverlap),\n mounted: false,\n oldDragItem: null,\n oldLayout: null,\n oldResizeItem: null,\n resizing: false,\n droppingDOMNode: null,\n children: []\n });\n _defineProperty(this, \"dragEnterCounter\", 0);\n /**\n * When dragging starts\n * @param {String} i Id of the child\n * @param {Number} x X position of the move\n * @param {Number} y Y position of the move\n * @param {Event} e The mousedown event\n * @param {Element} node The current dragging DOM element\n */\n _defineProperty(this, \"onDragStart\", (i /*: string*/, x /*: number*/, y /*: number*/, _ref /*:: */) => {\n let {\n e,\n node\n } /*: GridDragEvent*/ = _ref /*: GridDragEvent*/;\n const {\n layout\n } = this.state;\n const l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\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 this.setState({\n oldDragItem: (0, _utils.cloneLayoutItem)(l),\n oldLayout: layout,\n activeDrag: placeholder\n });\n return this.props.onDragStart(layout, l, l, null, e, node);\n });\n /**\n * Each drag movement create a new dragelement and move the element to the dragged location\n * @param {String} i Id of the child\n * @param {Number} x X position of the move\n * @param {Number} y Y position of the move\n * @param {Event} e The mousedown event\n * @param {Element} node The current dragging DOM element\n */\n _defineProperty(this, \"onDrag\", (i, x, y, _ref2) => {\n let {\n e,\n node\n } = _ref2;\n const {\n oldDragItem\n } = this.state;\n let {\n layout\n } = this.state;\n const {\n cols,\n allowOverlap,\n preventCollision\n } = this.props;\n const l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\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 // Move the element to the dragged location.\n const isUserAction = true;\n layout = (0, _utils.moveElement)(layout, l, x, y, isUserAction, preventCollision, (0, _utils.compactType)(this.props), cols, allowOverlap);\n this.props.onDrag(layout, oldDragItem, l, placeholder, e, node);\n this.setState({\n layout: allowOverlap ? layout : (0, _utils.compact)(layout, (0, _utils.compactType)(this.props), cols),\n activeDrag: placeholder\n });\n });\n /**\n * When dragging stops, figure out which position the element is closest to and update its x and y.\n * @param {String} i Index of the child.\n * @param {Number} x X position of the move\n * @param {Number} y Y position of the move\n * @param {Event} e The mousedown event\n * @param {Element} node The current dragging DOM element\n */\n _defineProperty(this, \"onDragStop\", (i, x, y, _ref3) => {\n let {\n e,\n node\n } = _ref3;\n if (!this.state.activeDrag) return;\n const {\n oldDragItem\n } = this.state;\n let {\n layout\n } = this.state;\n const {\n cols,\n preventCollision,\n allowOverlap\n } = this.props;\n const l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\n\n // Move the element here\n const isUserAction = true;\n layout = (0, _utils.moveElement)(layout, l, x, y, isUserAction, preventCollision, (0, _utils.compactType)(this.props), cols, allowOverlap);\n\n // Set state\n const newLayout = allowOverlap ? layout : (0, _utils.compact)(layout, (0, _utils.compactType)(this.props), cols);\n this.props.onDragStop(newLayout, oldDragItem, l, null, e, node);\n const {\n oldLayout\n } = this.state;\n this.setState({\n activeDrag: null,\n layout: newLayout,\n oldDragItem: null,\n oldLayout: null\n });\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n });\n _defineProperty(this, \"onResizeStart\", (i, w, h, _ref4) => {\n let {\n e,\n node\n } = _ref4;\n const {\n layout\n } = this.state;\n const l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\n this.setState({\n oldResizeItem: (0, _utils.cloneLayoutItem)(l),\n oldLayout: this.state.layout,\n resizing: true\n });\n this.props.onResizeStart(layout, l, l, null, e, node);\n });\n _defineProperty(this, \"onResize\", (i, w, h, _ref5) => {\n let {\n e,\n node,\n size,\n handle\n } = _ref5;\n const {\n oldResizeItem\n } = this.state;\n const {\n layout\n } = this.state;\n const {\n cols,\n preventCollision,\n allowOverlap\n } = this.props;\n let shouldMoveItem = false;\n let finalLayout;\n let x;\n let y;\n const [newLayout, l] = (0, _utils.withLayoutItem)(layout, i, l => {\n let hasCollisions;\n x = l.x;\n y = l.y;\n if ([\"sw\", \"w\", \"nw\", \"n\", \"ne\"].indexOf(handle) !== -1) {\n if ([\"sw\", \"nw\", \"w\"].indexOf(handle) !== -1) {\n x = l.x + (l.w - w);\n w = l.x !== x && x < 0 ? l.w : w;\n x = x < 0 ? 0 : x;\n }\n if ([\"ne\", \"n\", \"nw\"].indexOf(handle) !== -1) {\n y = l.y + (l.h - h);\n h = l.y !== y && y < 0 ? l.h : h;\n y = y < 0 ? 0 : y;\n }\n shouldMoveItem = true;\n }\n\n // Something like quad tree should be used\n // to find collisions faster\n if (preventCollision && !allowOverlap) {\n const collisions = (0, _utils.getAllCollisions)(layout, _objectSpread(_objectSpread({}, l), {}, {\n w,\n h,\n x,\n y\n })).filter(layoutItem => layoutItem.i !== l.i);\n hasCollisions = collisions.length > 0;\n\n // If we're colliding, we need adjust the placeholder.\n if (hasCollisions) {\n // Reset layoutItem dimensions if there were collisions\n y = l.y;\n h = l.h;\n x = l.x;\n w = l.w;\n shouldMoveItem = false;\n }\n }\n l.w = w;\n l.h = h;\n return l;\n });\n\n // Shouldn't ever happen, but typechecking makes it necessary\n if (!l) return;\n finalLayout = newLayout;\n if (shouldMoveItem) {\n // Move the element to the new position.\n const isUserAction = true;\n finalLayout = (0, _utils.moveElement)(newLayout, l, x, y, isUserAction, this.props.preventCollision, (0, _utils.compactType)(this.props), cols, allowOverlap);\n }\n\n // Create placeholder element (display only)\n const placeholder = {\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n static: true,\n i: i\n };\n this.props.onResize(finalLayout, oldResizeItem, l, placeholder, e, node);\n\n // Re-compact the newLayout and set the drag placeholder.\n this.setState({\n layout: allowOverlap ? finalLayout : (0, _utils.compact)(finalLayout, (0, _utils.compactType)(this.props), cols),\n activeDrag: placeholder\n });\n });\n _defineProperty(this, \"onResizeStop\", (i, w, h, _ref6) => {\n let {\n e,\n node\n } = _ref6;\n const {\n layout,\n oldResizeItem\n } = this.state;\n const {\n cols,\n allowOverlap\n } = this.props;\n const l = (0, _utils.getLayoutItem)(layout, i);\n\n // Set state\n const newLayout = allowOverlap ? layout : (0, _utils.compact)(layout, (0, _utils.compactType)(this.props), cols);\n this.props.onResizeStop(newLayout, oldResizeItem, l, null, e, node);\n const {\n oldLayout\n } = this.state;\n this.setState({\n activeDrag: null,\n layout: newLayout,\n oldResizeItem: null,\n oldLayout: null,\n resizing: false\n });\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n });\n // Called while dragging an element. Part of browser native drag/drop API.\n // Native event target might be the layout itself, or an element within the layout.\n _defineProperty(this, \"onDragOver\", e => {\n var _e$nativeEvent$target;\n e.preventDefault(); // Prevent any browser native action\n e.stopPropagation();\n\n // we should ignore events from layout's children in Firefox\n // to avoid unpredictable jumping of a dropping placeholder\n // FIXME remove this hack\n if (isFirefox &&\n // $FlowIgnore can't figure this out\n !((_e$nativeEvent$target = e.nativeEvent.target) !== null && _e$nativeEvent$target !== void 0 && _e$nativeEvent$target.classList.contains(layoutClassName))) {\n return false;\n }\n const {\n droppingItem,\n onDropDragOver,\n margin,\n cols,\n rowHeight,\n maxRows,\n width,\n containerPadding,\n transformScale\n } = this.props;\n // Allow user to customize the dropping item or short-circuit the drop based on the results\n // of the `onDragOver(e: Event)` callback.\n const onDragOverResult = onDropDragOver === null || onDropDragOver === void 0 ? void 0 : onDropDragOver(e);\n if (onDragOverResult === false) {\n if (this.state.droppingDOMNode) {\n this.removeDroppingPlaceholder();\n }\n return false;\n }\n const finalDroppingItem = _objectSpread(_objectSpread({}, droppingItem), onDragOverResult);\n const {\n layout\n } = this.state;\n\n // $FlowIgnore missing def\n const gridRect = e.currentTarget.getBoundingClientRect(); // The grid's position in the viewport\n\n // Calculate the mouse position relative to the grid\n const layerX = e.clientX - gridRect.left;\n const layerY = e.clientY - gridRect.top;\n const droppingPosition = {\n left: layerX / transformScale,\n top: layerY / transformScale,\n e\n };\n if (!this.state.droppingDOMNode) {\n const positionParams /*: PositionParams*/ = {\n cols,\n margin,\n maxRows,\n rowHeight,\n containerWidth: width,\n containerPadding: containerPadding || margin\n };\n const calculatedPosition = (0, _calculateUtils.calcXY)(positionParams, layerY, layerX, finalDroppingItem.w, finalDroppingItem.h);\n this.setState({\n droppingDOMNode: /*#__PURE__*/React.createElement(\"div\", {\n key: finalDroppingItem.i\n }),\n droppingPosition,\n layout: [...layout, _objectSpread(_objectSpread({}, finalDroppingItem), {}, {\n x: calculatedPosition.x,\n y: calculatedPosition.y,\n static: false,\n isDraggable: true\n })]\n });\n } else if (this.state.droppingPosition) {\n const {\n left,\n top\n } = this.state.droppingPosition;\n const shouldUpdatePosition = left != layerX || top != layerY;\n if (shouldUpdatePosition) {\n this.setState({\n droppingPosition\n });\n }\n }\n });\n _defineProperty(this, \"removeDroppingPlaceholder\", () => {\n const {\n droppingItem,\n cols\n } = this.props;\n const {\n layout\n } = this.state;\n const newLayout = (0, _utils.compact)(layout.filter(l => l.i !== droppingItem.i), (0, _utils.compactType)(this.props), cols, this.props.allowOverlap);\n this.setState({\n layout: newLayout,\n droppingDOMNode: null,\n activeDrag: null,\n droppingPosition: undefined\n });\n });\n _defineProperty(this, \"onDragLeave\", e => {\n e.preventDefault(); // Prevent any browser native action\n e.stopPropagation();\n this.dragEnterCounter--;\n\n // onDragLeave can be triggered on each layout's child.\n // But we know that count of dragEnter and dragLeave events\n // will be balanced after leaving the layout's container\n // so we can increase and decrease count of dragEnter and\n // when it'll be equal to 0 we'll remove the placeholder\n if (this.dragEnterCounter === 0) {\n this.removeDroppingPlaceholder();\n }\n });\n _defineProperty(this, \"onDragEnter\", e => {\n e.preventDefault(); // Prevent any browser native action\n e.stopPropagation();\n this.dragEnterCounter++;\n });\n _defineProperty(this, \"onDrop\", (e /*: Event*/) => {\n e.preventDefault(); // Prevent any browser native action\n e.stopPropagation();\n const {\n droppingItem\n } = this.props;\n const {\n layout\n } = this.state;\n const item = layout.find(l => l.i === droppingItem.i);\n\n // reset dragEnter counter on drop\n this.dragEnterCounter = 0;\n this.removeDroppingPlaceholder();\n this.props.onDrop(layout, item, e);\n });\n }\n componentDidMount() {\n this.setState({\n mounted: true\n });\n // Possibly call back with layout on mount. This should be done after correcting the layout width\n // to ensure we don't rerender with the wrong width.\n this.onLayoutMaybeChanged(this.state.layout, this.props.layout);\n }\n static getDerivedStateFromProps(nextProps /*: Props*/, prevState /*: State*/) /*: $Shape<State> | null*/{\n let newLayoutBase;\n if (prevState.activeDrag) {\n return null;\n }\n\n // Legacy support for compactType\n // Allow parent to set layout directly.\n if (!(0, _fastEquals.deepEqual)(nextProps.layout, prevState.propsLayout) || nextProps.compactType !== prevState.compactType) {\n newLayoutBase = nextProps.layout;\n } else if (!(0, _utils.childrenEqual)(nextProps.children, prevState.children)) {\n // If children change, also regenerate the layout. Use our state\n // as the base in case because it may be more up to date than\n // what is in props.\n newLayoutBase = prevState.layout;\n }\n\n // We need to regenerate the layout.\n if (newLayoutBase) {\n const newLayout = (0, _utils.synchronizeLayoutWithChildren)(newLayoutBase, nextProps.children, nextProps.cols, (0, _utils.compactType)(nextProps), nextProps.allowOverlap);\n return {\n layout: newLayout,\n // We need to save these props to state for using\n // getDerivedStateFromProps instead of componentDidMount (in which we would get extra rerender)\n compactType: nextProps.compactType,\n children: nextProps.children,\n propsLayout: nextProps.layout\n };\n }\n return null;\n }\n shouldComponentUpdate(nextProps /*: Props*/, nextState /*: State*/) /*: boolean*/{\n return (\n // NOTE: this is almost always unequal. Therefore the only way to get better performance\n // from SCU is if the user intentionally memoizes children. If they do, and they can\n // handle changes properly, performance will increase.\n this.props.children !== nextProps.children || !(0, _utils.fastRGLPropsEqual)(this.props, nextProps, _fastEquals.deepEqual) || this.state.activeDrag !== nextState.activeDrag || this.state.mounted !== nextState.mounted || this.state.droppingPosition !== nextState.droppingPosition\n );\n }\n componentDidUpdate(prevProps /*: Props*/, prevState /*: State*/) {\n if (!this.state.activeDrag) {\n const newLayout = this.state.layout;\n const oldLayout = prevState.layout;\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n }\n }\n\n /**\n * Calculates a pixel value for the container.\n * @return {String} Container height in pixels.\n */\n containerHeight() /*: ?string*/{\n if (!this.props.autoSize) return;\n const nbRow = (0, _utils.bottom)(this.state.layout);\n const containerPaddingY = this.props.containerPadding ? this.props.containerPadding[1] : this.props.margin[1];\n return nbRow * this.props.rowHeight + (nbRow - 1) * this.props.margin[1] + containerPaddingY * 2 + \"px\";\n }\n onLayoutMaybeChanged(newLayout /*: Layout*/, oldLayout /*: ?Layout*/) {\n if (!oldLayout) oldLayout = this.state.layout;\n if (!(0, _fastEquals.deepEqual)(oldLayout, newLayout)) {\n this.props.onLayoutChange(newLayout);\n }\n }\n /**\n * Create a placeholder object.\n * @return {Element} Placeholder div.\n */\n placeholder() /*: ?ReactElement<any>*/{\n const {\n activeDrag\n } = this.state;\n if (!activeDrag) return null;\n const {\n width,\n cols,\n margin,\n containerPadding,\n rowHeight,\n maxRows,\n useCSSTransforms,\n transformScale\n } = this.props;\n\n // {...this.state.activeDrag} is pretty slow, actually\n return /*#__PURE__*/React.createElement(_GridItem.default, {\n w: activeDrag.w,\n h: activeDrag.h,\n x: activeDrag.x,\n y: activeDrag.y,\n i: activeDrag.i,\n className: \"react-grid-placeholder \".concat(this.state.resizing ? \"placeholder-resizing\" : \"\"),\n containerWidth: width,\n cols: cols,\n margin: margin,\n containerPadding: containerPadding || margin,\n maxRows: maxRows,\n rowHeight: rowHeight,\n isDraggable: false,\n isResizable: false,\n isBounded: false,\n useCSSTransforms: useCSSTransforms,\n transformScale: transformScale\n }, /*#__PURE__*/React.createElement(\"div\", null));\n }\n\n /**\n * Given a grid item, set its style attributes & surround in a <Draggable>.\n * @param {Element} child React element.\n * @return {Element} Element wrapped in draggable and properly placed.\n */\n processGridItem(child /*: ReactElement<any>*/, isDroppingItem /*: boolean*/) /*: ?ReactElement<any>*/{\n if (!child || !child.key) return;\n const l = (0, _utils.getLayoutItem)(this.state.layout, String(child.key));\n if (!l) return null;\n const {\n width,\n cols,\n margin,\n containerPadding,\n rowHeight,\n maxRows,\n isDraggable,\n isResizable,\n isBounded,\n useCSSTransforms,\n transformScale,\n draggableCancel,\n draggableHandle,\n resizeHandles,\n resizeHandle\n } = this.props;\n const {\n mounted,\n droppingPosition\n } = this.state;\n\n // Determine user manipulations possible.\n // If an item is static, it can't be manipulated by default.\n // Any properties defined directly on the grid item will take precedence.\n const draggable = typeof l.isDraggable === \"boolean\" ? l.isDraggable : !l.static && isDraggable;\n const resizable = typeof l.isResizable === \"boolean\" ? l.isResizable : !l.static && isResizable;\n const resizeHandlesOptions = l.resizeHandles || resizeHandles;\n\n // isBounded set on child if set on parent, and child is not explicitly false\n const bounded = draggable && isBounded && l.isBounded !== false;\n return /*#__PURE__*/React.createElement(_GridItem.default, {\n containerWidth: width,\n cols: cols,\n margin: margin,\n containerPadding: containerPadding || margin,\n maxRows: maxRows,\n rowHeight: rowHeight,\n cancel: draggableCancel,\n handle: draggableHandle,\n onDragStop: this.onDragStop,\n onDragStart: this.onDragStart,\n onDrag: this.onDrag,\n onResizeStart: this.onResizeStart,\n onResize: this.onResize,\n onResizeStop: this.onResizeStop,\n isDraggable: draggable,\n isResizable: resizable,\n isBounded: bounded,\n useCSSTransforms: useCSSTransforms && mounted,\n usePercentages: !mounted,\n transformScale: transformScale,\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n i: l.i,\n minH: l.minH,\n minW: l.minW,\n maxH: l.maxH,\n maxW: l.maxW,\n static: l.static,\n droppingPosition: isDroppingItem ? droppingPosition : undefined,\n resizeHandles: resizeHandlesOptions,\n resizeHandle: resizeHandle\n }, child);\n }\n render() /*: React.Element<\"div\">*/{\n const {\n className,\n style,\n isDroppable,\n innerRef\n } = this.props;\n const mergedClassName = (0, _clsx.default)(layoutClassName, className);\n const mergedStyle = _objectSpread({\n height: this.containerHeight()\n }, style);\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: innerRef,\n className: mergedClassName,\n style: mergedStyle,\n onDrop: isDroppable ? this.onDrop : _utils.noop,\n onDragLeave: isDroppable ? this.onDragLeave : _utils.noop,\n onDragEnter: isDroppable ? this.onDragEnter : _utils.noop,\n onDragOver: isDroppable ? this.onDragOver : _utils.noop\n }, React.Children.map(this.props.children, child => this.processGridItem(child)), isDroppable && this.state.droppingDOMNode && this.processGridItem(this.state.droppingDOMNode, true), this.placeholder());\n }\n}\nexports.default = ReactGridLayout;\n// TODO publish internal ReactClass displayName transform\n_defineProperty(ReactGridLayout, \"displayName\", \"ReactGridLayout\");\n// Refactored to another module to make way for preval\n_defineProperty(ReactGridLayout, \"propTypes\", _ReactGridLayoutPropTypes.default);\n_defineProperty(ReactGridLayout, \"defaultProps\", {\n autoSize: true,\n cols: 12,\n className: \"\",\n style: {},\n draggableHandle: \"\",\n draggableCancel: \"\",\n containerPadding: null,\n rowHeight: 150,\n maxRows: Infinity,\n // infinite vertical growth\n layout: [],\n margin: [10, 10],\n isBounded: false,\n isDraggable: true,\n isResizable: true,\n allowOverlap: false,\n isDroppable: false,\n useCSSTransforms: true,\n transformScale: 1,\n verticalCompact: true,\n compactType: \"vertical\",\n preventCollision: false,\n droppingItem: {\n i: \"__dropping-elem__\",\n h: 1,\n w: 1\n },\n resizeHandles: [\"se\"],\n onLayoutChange: _utils.noop,\n onDragStart: _utils.noop,\n onDrag: _utils.noop,\n onDragStop: _utils.noop,\n onResizeStart: _utils.noop,\n onResize: _utils.noop,\n onResizeStop: _utils.noop,\n onDrop: _utils.noop,\n onDropDragOver: _utils.noop\n});"],"names":["ReactGridLayout_1","React","_interopRequireWildcard","require$$0","_fastEquals","require$$1","_clsx","_interopRequireDefault","require$$2","_utils","require$$3","_calculateUtils","require$$4","_GridItem","require$$5","_ReactGridLayoutPropTypes","require$$6","e","r","n","t","o","i","f","ownKeys","_objectSpread","_defineProperty","_toPropertyKey","_toPrimitive","layoutClassName","isFirefox","ReactGridLayout$1","x","y","_ref","node","layout","l","placeholder","_ref2","oldDragItem","cols","allowOverlap","preventCollision","_ref3","newLayout","oldLayout","w","h","_ref4","_ref5","size","handle","oldResizeItem","shouldMoveItem","finalLayout","hasCollisions","layoutItem","_ref6","_e$nativeEvent$target","droppingItem","onDropDragOver","margin","rowHeight","maxRows","width","containerPadding","transformScale","onDragOverResult","finalDroppingItem","gridRect","layerX","layerY","droppingPosition","left","top","positionParams","calculatedPosition","item","nextProps","prevState","newLayoutBase","nextState","prevProps","nbRow","containerPaddingY","activeDrag","useCSSTransforms","child","isDroppingItem","isDraggable","isResizable","isBounded","draggableCancel","draggableHandle","resizeHandles","resizeHandle","mounted","draggable","resizable","resizeHandlesOptions","bounded","className","style","isDroppable","innerRef","mergedClassName","mergedStyle","ReactGridLayout"],"mappings":";;;;;;;;;;;SAEA,OAAO,eAAeA,GAAS,cAAc;AAAA,IAC3C,OAAO;AAAA,EACT,CAAC,GACDA,EAAA,UAAkB;AAClB,MAAIC,IAAQC,EAAwBC,CAAgB,GAChDC,IAAcC,gBAAAA,EAAA,GACdC,IAAQC,EAAuBC,GAAe,GAC9CC,IAASC,EAAA,GACTC,IAAkBC,EAAA,GAClBC,IAAYN,EAAuBO,GAAqB,GACxDC,IAA4BR,EAAuBS,GAAqC;AAC5F,WAAST,EAAuBU,GAAG;AAAE,WAAOA,KAAKA,EAAE,aAAaA,IAAI,EAAE,SAASA,EAAC;AAAA,EAAG;AACnF,WAASf,EAAwBe,GAAG,GAAG;AAAE,QAAkB,OAAO,WAArB,WAA8B,KAAIC,IAAI,oBAAI,QAAO,GAAIC,IAAI,oBAAI,QAAO;AAAI,YAAQjB,IAA0B,SAAUe,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B,KAAK,gBAAgB,KAAK,MAAM,iBAAiB,EAAI,GAAG,KAAK,YAAW,CAAE;AAAA,IAC7M;AAAA,EACA;AACAxG,SAAAA,EAAA,UAAkB4G,GAElBlF,EAAgBkF,GAAiB,eAAe,iBAAiB,GAEjElF,EAAgBkF,GAAiB,aAAa7F,EAA0B,OAAO,GAC/EW,EAAgBkF,GAAiB,gBAAgB;AAAA,IAC/C,UAAU;AAAA,IACV,MAAM;AAAA,IACN,WAAW;AAAA,IACX,OAAO,CAAA;AAAA,IACP,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,WAAW;AAAA,IACX,SAAS;AAAA;AAAA,IAET,QAAQ,CAAA;AAAA,IACR,QAAQ,CAAC,IAAI,EAAE;AAAA,IACf,WAAW;AAAA,IACX,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,cAAc;AAAA,MACZ,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA;IAEL,eAAe,CAAC,IAAI;AAAA,IACpB,gBAAgBnG,EAAO;AAAA,IACvB,aAAaA,EAAO;AAAA,IACpB,QAAQA,EAAO;AAAA,IACf,YAAYA,EAAO;AAAA,IACnB,eAAeA,EAAO;AAAA,IACtB,UAAUA,EAAO;AAAA,IACjB,cAAcA,EAAO;AAAA,IACrB,QAAQA,EAAO;AAAA,IACf,gBAAgBA,EAAO;AAAA,EACzB,CAAC;;","x_google_ignoreList":[0]}
|
|
@@ -3,7 +3,7 @@ import { __require as p } from "../../prop-types/index.js";
|
|
|
3
3
|
import c from "react";
|
|
4
4
|
import { __require as y } from "./utils.js";
|
|
5
5
|
var n;
|
|
6
|
-
function
|
|
6
|
+
function v() {
|
|
7
7
|
if (n) return r;
|
|
8
8
|
n = 1, Object.defineProperty(r, "__esModule", {
|
|
9
9
|
value: !0
|
|
@@ -121,6 +121,6 @@ function R() {
|
|
|
121
121
|
}, r;
|
|
122
122
|
}
|
|
123
123
|
export {
|
|
124
|
-
|
|
124
|
+
v as __require
|
|
125
125
|
};
|
|
126
126
|
//# sourceMappingURL=ReactGridLayoutPropTypes.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../../../_virtual/ResponsiveReactGridLayout.cjs"),G=require("react"),T=require("../../prop-types/index.cjs"),D=require("../../fast-equals/dist/fast-equals.cjs"),M=require("./utils.cjs"),F=require("./responsiveUtils.cjs"),I=require("./ReactGridLayout.cjs");var q;function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../../../_virtual/ResponsiveReactGridLayout.cjs"),G=require("react"),T=require("../../prop-types/index.cjs"),D=require("../../fast-equals/dist/fast-equals.cjs"),M=require("./utils.cjs"),F=require("./responsiveUtils.cjs"),I=require("./ReactGridLayout.cjs");var q;function U(){if(q)return h.__exports;q=1,Object.defineProperty(h.__exports,"__esModule",{value:!0}),h.__exports.default=void 0;var k=j(G),s=w(T.__require()),g=D.__require(),y=M.__require(),c=F.__require(),R=w(I.__require());const x=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function w(e){return e&&e.__esModule?e:{default:e}}function j(e,t){if(typeof WeakMap=="function")var o=new WeakMap,n=new WeakMap;return(j=function(r,i){if(!i&&r&&r.__esModule)return r;var a,u,l={__proto__:null,default:r};if(r===null||typeof r!="object"&&typeof r!="function")return l;if(a=i?n:o){if(a.has(r))return a.get(r);a.set(r,l)}for(const p in r)p!=="default"&&{}.hasOwnProperty.call(r,p)&&((u=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(r,p))&&(u.get||u.set)?a(l,p,u):l[p]=r[p]);return l})(e,t)}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_.apply(null,arguments)}function W(e,t){if(e==null)return{};var o,n,r=E(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)===-1&&{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function E(e,t){if(e==null)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;o[n]=e[n]}return o}function L(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),o.push.apply(o,n)}return o}function m(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?L(Object(o),!0).forEach(function(n){f(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):L(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function f(e,t,o){return(t=S(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function S(e){var t=B(e,"string");return typeof t=="symbol"?t:t+""}function B(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const C=e=>Object.prototype.toString.call(e);function b(e,t){return e==null?null:Array.isArray(e)?e:e[t]}let O=class extends k.Component{constructor(){super(...arguments),f(this,"state",this.generateInitialState()),f(this,"onLayoutChange",t=>{this.props.onLayoutChange(t,m(m({},this.props.layouts),{},{[this.state.breakpoint]:t}))})}generateInitialState(){const{width:t,breakpoints:o,layouts:n,cols:r}=this.props,i=(0,c.getBreakpointFromWidth)(o,t),a=(0,c.getColsFromBreakpoint)(i,r),u=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,c.findOrGenerateResponsiveLayout)(n,o,i,i,a,u),breakpoint:i,cols:a}}static getDerivedStateFromProps(t,o){if(!(0,g.deepEqual)(t.layouts,o.layouts)){const{breakpoint:n,cols:r}=o;return{layout:(0,c.findOrGenerateResponsiveLayout)(t.layouts,t.breakpoints,n,n,r,t.compactType),layouts:t.layouts}}return null}componentDidUpdate(t){(this.props.width!=t.width||this.props.breakpoint!==t.breakpoint||!(0,g.deepEqual)(this.props.breakpoints,t.breakpoints)||!(0,g.deepEqual)(this.props.cols,t.cols))&&this.onWidthChange(t)}onWidthChange(t){const{breakpoints:o,cols:n,layouts:r,compactType:i}=this.props,a=this.props.breakpoint||(0,c.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),u=this.state.breakpoint,l=(0,c.getColsFromBreakpoint)(a,n),p=m({},r);if(u!==a||t.breakpoints!==o||t.cols!==n){u in p||(p[u]=(0,y.cloneLayout)(this.state.layout));let d=(0,c.findOrGenerateResponsiveLayout)(p,o,a,u,l,i);d=(0,y.synchronizeLayoutWithChildren)(d,this.props.children,l,i,this.props.allowOverlap),p[a]=d,this.props.onBreakpointChange(a,l),this.props.onLayoutChange(d,p),this.setState({breakpoint:a,layout:d,cols:l})}const P=b(this.props.margin,a),v=b(this.props.containerPadding,a);this.props.onWidthChange(this.props.width,P,l,v)}render(){const t=this.props,{breakpoint:o,breakpoints:n,cols:r,layouts:i,margin:a,containerPadding:u,onBreakpointChange:l,onLayoutChange:p,onWidthChange:P}=t,v=W(t,x);return k.createElement(R.default,_({},v,{margin:b(a,this.state.breakpoint),containerPadding:b(u,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return h.__exports.default=O,f(O,"propTypes",{breakpoint:s.default.string,breakpoints:s.default.object,allowOverlap:s.default.bool,cols:s.default.object,margin:s.default.oneOfType([s.default.array,s.default.object]),containerPadding:s.default.oneOfType([s.default.array,s.default.object]),layouts(e,t){if(C(e[t])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+C(e[t]));Object.keys(e[t]).forEach(o=>{if(!(o in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,y.validateLayout)(e.layouts[o],"layouts."+o)})},width:s.default.number.isRequired,onBreakpointChange:s.default.func,onLayoutChange:s.default.func,onWidthChange:s.default.func}),f(O,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:y.noop,onLayoutChange:y.noop,onWidthChange:y.noop}),h.__exports}exports.__require=U;
|
|
2
2
|
//# sourceMappingURL=ResponsiveReactGridLayout.cjs.map
|