@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponsiveReactGridLayout.js","sources":["../../../../../node_modules/react-grid-layout/build/ResponsiveReactGridLayout.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _fastEquals = require(\"fast-equals\");\nvar _utils = require(\"./utils\");\nvar _responsiveUtils = require(\"./responsiveUtils\");\nvar _ReactGridLayout = _interopRequireDefault(require(\"./ReactGridLayout\"));\nconst _excluded = [\"breakpoint\", \"breakpoints\", \"cols\", \"layouts\", \"margin\", \"containerPadding\", \"onBreakpointChange\", \"onLayoutChange\", \"onWidthChange\"];\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 _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return 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); } /*:: import { type Layout, type Pick } from \"./utils\";*/ /*:: import { type ResponsiveLayout, type OnLayoutChangeCallback, type Breakpoints } from \"./responsiveUtils\";*/\n// $FlowFixMe[method-unbinding]\nconst type = obj => Object.prototype.toString.call(obj);\n\n/**\n * Get a value of margin or containerPadding.\n *\n * @param {Array | Object} param Margin | containerPadding, e.g. [10, 10] | {lg: [10, 10], ...}.\n * @param {String} breakpoint Breakpoint: lg, md, sm, xs and etc.\n * @return {Array}\n */\nfunction getIndentationValue /*:: <T: ?[number, number]>*/(param /*: { [key: string]: T } | T*/, breakpoint /*: string*/) /*: T*/{\n // $FlowIgnore TODO fix this typedef\n if (param == null) return null;\n // $FlowIgnore TODO fix this typedef\n return Array.isArray(param) ? param : param[breakpoint];\n}\n/*:: type State = {\n layout: Layout,\n breakpoint: string,\n cols: number,\n layouts?: ResponsiveLayout<string>\n};*/\n/*:: type Props<Breakpoint: string = string> = {|\n ...React.ElementConfig<typeof ReactGridLayout>,\n\n // Responsive config\n breakpoint?: ?Breakpoint,\n breakpoints: Breakpoints<Breakpoint>,\n cols: { [key: Breakpoint]: number },\n layouts: ResponsiveLayout<Breakpoint>,\n width: number,\n margin: { [key: Breakpoint]: [number, number] } | [number, number],\n /* prettier-ignore *-/\n containerPadding: { [key: Breakpoint]: ?[number, number] } | ?[number, number],\n\n // Callbacks\n onBreakpointChange: (Breakpoint, cols: number) => void,\n onLayoutChange: OnLayoutChangeCallback,\n onWidthChange: (\n containerWidth: number,\n margin: [number, number],\n cols: number,\n containerPadding: ?[number, number]\n ) => void\n|};*/\n/*:: type DefaultProps = Pick<\n Props<>,\n {|\n allowOverlap: 0,\n breakpoints: 0,\n cols: 0,\n containerPadding: 0,\n layouts: 0,\n margin: 0,\n onBreakpointChange: 0,\n onLayoutChange: 0,\n onWidthChange: 0\n |}\n>;*/\nclass ResponsiveReactGridLayout extends React.Component\n/*:: <\n Props<>,\n State\n>*/\n{\n constructor() {\n super(...arguments);\n _defineProperty(this, \"state\", this.generateInitialState());\n // wrap layouts so we do not need to pass layouts to child\n _defineProperty(this, \"onLayoutChange\", (layout /*: Layout*/) => {\n this.props.onLayoutChange(layout, _objectSpread(_objectSpread({}, this.props.layouts), {}, {\n [this.state.breakpoint]: layout\n }));\n });\n }\n generateInitialState() /*: State*/{\n const {\n width,\n breakpoints,\n layouts,\n cols\n } = this.props;\n const breakpoint = (0, _responsiveUtils.getBreakpointFromWidth)(breakpoints, width);\n const colNo = (0, _responsiveUtils.getColsFromBreakpoint)(breakpoint, cols);\n // verticalCompact compatibility, now deprecated\n const compactType = this.props.verticalCompact === false ? null : this.props.compactType;\n // Get the initial layout. This can tricky; we try to generate one however possible if one doesn't exist\n // for this layout.\n const initialLayout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(layouts, breakpoints, breakpoint, breakpoint, colNo, compactType);\n return {\n layout: initialLayout,\n breakpoint: breakpoint,\n cols: colNo\n };\n }\n static getDerivedStateFromProps(nextProps /*: Props<*>*/, prevState /*: State*/) /*: ?$Shape<State>*/{\n if (!(0, _fastEquals.deepEqual)(nextProps.layouts, prevState.layouts)) {\n // Allow parent to set layouts directly.\n const {\n breakpoint,\n cols\n } = prevState;\n\n // Since we're setting an entirely new layout object, we must generate a new responsive layout\n // if one does not exist.\n const newLayout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(nextProps.layouts, nextProps.breakpoints, breakpoint, breakpoint, cols, nextProps.compactType);\n return {\n layout: newLayout,\n layouts: nextProps.layouts\n };\n }\n return null;\n }\n componentDidUpdate(prevProps /*: Props<*>*/) {\n // Allow parent to set width or breakpoint directly.\n if (this.props.width != prevProps.width || this.props.breakpoint !== prevProps.breakpoint || !(0, _fastEquals.deepEqual)(this.props.breakpoints, prevProps.breakpoints) || !(0, _fastEquals.deepEqual)(this.props.cols, prevProps.cols)) {\n this.onWidthChange(prevProps);\n }\n }\n /**\n * When the width changes work through breakpoints and reset state with the new width & breakpoint.\n * Width changes are necessary to figure out the widget widths.\n */\n onWidthChange(prevProps /*: Props<*>*/) {\n const {\n breakpoints,\n cols,\n layouts,\n compactType\n } = this.props;\n const newBreakpoint = this.props.breakpoint || (0, _responsiveUtils.getBreakpointFromWidth)(this.props.breakpoints, this.props.width);\n const lastBreakpoint = this.state.breakpoint;\n const newCols /*: number*/ = (0, _responsiveUtils.getColsFromBreakpoint)(newBreakpoint, cols);\n const newLayouts = _objectSpread({}, layouts);\n\n // Breakpoint change\n if (lastBreakpoint !== newBreakpoint || prevProps.breakpoints !== breakpoints || prevProps.cols !== cols) {\n // Preserve the current layout if the current breakpoint is not present in the next layouts.\n if (!(lastBreakpoint in newLayouts)) newLayouts[lastBreakpoint] = (0, _utils.cloneLayout)(this.state.layout);\n\n // Find or generate a new layout.\n let layout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(newLayouts, breakpoints, newBreakpoint, lastBreakpoint, newCols, compactType);\n\n // This adds missing items.\n layout = (0, _utils.synchronizeLayoutWithChildren)(layout, this.props.children, newCols, compactType, this.props.allowOverlap);\n\n // Store the new layout.\n newLayouts[newBreakpoint] = layout;\n\n // callbacks\n this.props.onBreakpointChange(newBreakpoint, newCols);\n this.props.onLayoutChange(layout, newLayouts);\n this.setState({\n breakpoint: newBreakpoint,\n layout: layout,\n cols: newCols\n });\n }\n const margin = getIndentationValue(this.props.margin, newBreakpoint);\n const containerPadding = getIndentationValue(this.props.containerPadding, newBreakpoint);\n\n //call onWidthChange on every change of width, not only on breakpoint changes\n this.props.onWidthChange(this.props.width, margin, newCols, containerPadding);\n }\n render() /*: React.Element<typeof ReactGridLayout>*/{\n /* eslint-disable no-unused-vars */\n const _this$props = this.props,\n {\n breakpoint,\n breakpoints,\n cols,\n layouts,\n margin,\n containerPadding,\n onBreakpointChange,\n onLayoutChange,\n onWidthChange\n } = _this$props,\n other = _objectWithoutProperties(_this$props, _excluded);\n /* eslint-enable no-unused-vars */\n\n return /*#__PURE__*/React.createElement(_ReactGridLayout.default, _extends({}, other, {\n // $FlowIgnore should allow nullable here due to DefaultProps\n margin: getIndentationValue(margin, this.state.breakpoint),\n containerPadding: getIndentationValue(containerPadding, this.state.breakpoint),\n onLayoutChange: this.onLayoutChange,\n layout: this.state.layout,\n cols: this.state.cols\n }));\n }\n}\nexports.default = ResponsiveReactGridLayout;\n// This should only include propTypes needed in this code; RGL itself\n// will do validation of the rest props passed to it.\n_defineProperty(ResponsiveReactGridLayout, \"propTypes\", {\n //\n // Basic props\n //\n\n // Optional, but if you are managing width yourself you may want to set the breakpoint\n // yourself as well.\n breakpoint: _propTypes.default.string,\n // {name: pxVal}, e.g. {lg: 1200, md: 996, sm: 768, xs: 480}\n breakpoints: _propTypes.default.object,\n allowOverlap: _propTypes.default.bool,\n // # of cols. This is a breakpoint -> cols map\n cols: _propTypes.default.object,\n // # of margin. This is a breakpoint -> margin map\n // e.g. { lg: [5, 5], md: [10, 10], sm: [15, 15] }\n // Margin between items [x, y] in px\n // e.g. [10, 10]\n margin: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object]),\n // # of containerPadding. This is a breakpoint -> containerPadding map\n // e.g. { lg: [5, 5], md: [10, 10], sm: [15, 15] }\n // Padding inside the container [x, y] in px\n // e.g. [10, 10]\n containerPadding: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object]),\n // layouts is an object mapping breakpoints to layouts.\n // e.g. {lg: Layout, md: Layout, ...}\n layouts(props /*: Props<>*/, propName /*: string*/) {\n if (type(props[propName]) !== \"[object Object]\") {\n throw new Error(\"Layout property must be an object. Received: \" + type(props[propName]));\n }\n Object.keys(props[propName]).forEach(key => {\n if (!(key in props.breakpoints)) {\n throw new Error(\"Each key in layouts must align with a key in breakpoints.\");\n }\n (0, _utils.validateLayout)(props.layouts[key], \"layouts.\" + key);\n });\n },\n // The width of this component.\n // Required in this propTypes stanza because generateInitialState() will fail without it.\n width: _propTypes.default.number.isRequired,\n //\n // Callbacks\n //\n\n // Calls back with breakpoint and new # cols\n onBreakpointChange: _propTypes.default.func,\n // Callback so you can save the layout.\n // Calls back with (currentLayout, allLayouts). allLayouts are keyed by breakpoint.\n onLayoutChange: _propTypes.default.func,\n // Calls back with (containerWidth, margin, cols, containerPadding)\n onWidthChange: _propTypes.default.func\n});\n_defineProperty(ResponsiveReactGridLayout, \"defaultProps\", {\n breakpoints: {\n lg: 1200,\n md: 996,\n sm: 768,\n xs: 480,\n xxs: 0\n },\n cols: {\n lg: 12,\n md: 10,\n sm: 6,\n xs: 4,\n xxs: 2\n },\n containerPadding: {\n lg: null,\n md: null,\n sm: null,\n xs: null,\n xxs: null\n },\n layouts: {},\n margin: [10, 10],\n allowOverlap: false,\n onBreakpointChange: _utils.noop,\n onLayoutChange: _utils.noop,\n onWidthChange: _utils.noop\n});"],"names":["ResponsiveReactGridLayout_1","React","_interopRequireWildcard","require$$0","_propTypes","_interopRequireDefault","_fastEquals","require$$2","_utils","require$$3","_responsiveUtils","require$$4","_ReactGridLayout","require$$5","_excluded","r","n","e","t","o","i","f","_extends","_objectWithoutProperties","_objectWithoutPropertiesLoose","ownKeys","_objectSpread","_defineProperty","_toPropertyKey","_toPrimitive","type","obj","getIndentationValue","param","breakpoint","layout","width","breakpoints","layouts","cols","colNo","compactType","nextProps","prevState","prevProps","newBreakpoint","lastBreakpoint","newCols","newLayouts","margin","containerPadding","_this$props","onBreakpointChange","onLayoutChange","onWidthChange","other","ResponsiveReactGridLayout","props","propName","key"],"mappings":";;;;;;;;;;SAEA,OAAO,eAAeA,GAAS,cAAc;AAAA,IAC3C,OAAO;AAAA,EACT,CAAC,GACDA,EAAA,UAAkB;AAClB,MAAIC,IAAQC,EAAwBC,CAAgB,GAChDC,IAAaC,qBAA4C,GACzDC,IAAcC,gBAAAA,EAAA,GACdC,IAASC,EAAA,GACTC,IAAmBC,EAAA,GACnBC,IAAmBP,EAAuBQ,GAA4B;AAC1E,QAAMC,IAAY,CAAC,cAAc,eAAe,QAAQ,WAAW,UAAU,oBAAoB,sBAAsB,kBAAkB,eAAe;AACxJ,WAAST,EAAuB,GAAG;AAAE,WAAO,KAAK,EAAE,aAAa,IAAI,EAAE,SAAS,EAAC;AAAA,EAAG;AACnF,WAASH,EAAwB,GAAG,GAAG;AAAE,QAAkB,OAAO,WAArB,WAA8B,KAAIa,IAAI,oBAAI,QAAO,GAAIC,IAAI,oBAAI,QAAO;AAAI,YAAQd,IAA0B,SAAUe,GAAGC,GAAG;AAAE,UAAI,CAACA,KAAKD,KAAKA,EAAE,WAAY,QAAOA;AAAG,UAAIE,GAAGC,GAAGC,IAAI,EAAE,WAAW,MAAM,SAASJ;AAAK,UAAaA,MAAT,QAA0B,OAAOA,KAAnB,YAAsC,OAAOA,KAArB,WAAwB,QAAOI;AAAG,UAAIF,IAAID,IAAIF,IAAID,GAAG;AAAE,YAAII,EAAE,IAAIF,CAAC,EAAG,QAAOE,EAAE,IAAIF,CAAC;AAAG,QAAAE,EAAE,IAAIF,GAAGI,CAAC;AAAA,MAAE;AAAG,iBAAWH,KAAKD,EAAG,CAAcC,MAAd,aAAmB,CAAA,EAAG,eAAe,KAAKD,GAAGC,CAAC,OAAOE,KAAKD,IAA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,IAAI;AAAA,MACJ,KAAK;AAAA;IAEP,kBAAkB;AAAA,MAChB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA;IAEP,SAAS,CAAA;AAAA,IACT,QAAQ,CAAC,IAAI,EAAE;AAAA,IACf,cAAc;AAAA,IACd,oBAAoBhD,EAAO;AAAA,IAC3B,gBAAgBA,EAAO;AAAA,IACvB,eAAeA,EAAO;AAAA,EACxB,CAAC;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"ResponsiveReactGridLayout.js","sources":["../../../../../node_modules/react-grid-layout/build/ResponsiveReactGridLayout.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _fastEquals = require(\"fast-equals\");\nvar _utils = require(\"./utils\");\nvar _responsiveUtils = require(\"./responsiveUtils\");\nvar _ReactGridLayout = _interopRequireDefault(require(\"./ReactGridLayout\"));\nconst _excluded = [\"breakpoint\", \"breakpoints\", \"cols\", \"layouts\", \"margin\", \"containerPadding\", \"onBreakpointChange\", \"onLayoutChange\", \"onWidthChange\"];\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 _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return 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); } /*:: import { type Layout, type Pick } from \"./utils\";*/ /*:: import { type ResponsiveLayout, type OnLayoutChangeCallback, type Breakpoints } from \"./responsiveUtils\";*/\n// $FlowFixMe[method-unbinding]\nconst type = obj => Object.prototype.toString.call(obj);\n\n/**\n * Get a value of margin or containerPadding.\n *\n * @param {Array | Object} param Margin | containerPadding, e.g. [10, 10] | {lg: [10, 10], ...}.\n * @param {String} breakpoint Breakpoint: lg, md, sm, xs and etc.\n * @return {Array}\n */\nfunction getIndentationValue /*:: <T: ?[number, number]>*/(param /*: { [key: string]: T } | T*/, breakpoint /*: string*/) /*: T*/{\n // $FlowIgnore TODO fix this typedef\n if (param == null) return null;\n // $FlowIgnore TODO fix this typedef\n return Array.isArray(param) ? param : param[breakpoint];\n}\n/*:: type State = {\n layout: Layout,\n breakpoint: string,\n cols: number,\n layouts?: ResponsiveLayout<string>\n};*/\n/*:: type Props<Breakpoint: string = string> = {|\n ...React.ElementConfig<typeof ReactGridLayout>,\n\n // Responsive config\n breakpoint?: ?Breakpoint,\n breakpoints: Breakpoints<Breakpoint>,\n cols: { [key: Breakpoint]: number },\n layouts: ResponsiveLayout<Breakpoint>,\n width: number,\n margin: { [key: Breakpoint]: [number, number] } | [number, number],\n /* prettier-ignore *-/\n containerPadding: { [key: Breakpoint]: ?[number, number] } | ?[number, number],\n\n // Callbacks\n onBreakpointChange: (Breakpoint, cols: number) => void,\n onLayoutChange: OnLayoutChangeCallback,\n onWidthChange: (\n containerWidth: number,\n margin: [number, number],\n cols: number,\n containerPadding: ?[number, number]\n ) => void\n|};*/\n/*:: type DefaultProps = Pick<\n Props<>,\n {|\n allowOverlap: 0,\n breakpoints: 0,\n cols: 0,\n containerPadding: 0,\n layouts: 0,\n margin: 0,\n onBreakpointChange: 0,\n onLayoutChange: 0,\n onWidthChange: 0\n |}\n>;*/\nclass ResponsiveReactGridLayout extends React.Component\n/*:: <\n Props<>,\n State\n>*/\n{\n constructor() {\n super(...arguments);\n _defineProperty(this, \"state\", this.generateInitialState());\n // wrap layouts so we do not need to pass layouts to child\n _defineProperty(this, \"onLayoutChange\", (layout /*: Layout*/) => {\n this.props.onLayoutChange(layout, _objectSpread(_objectSpread({}, this.props.layouts), {}, {\n [this.state.breakpoint]: layout\n }));\n });\n }\n generateInitialState() /*: State*/{\n const {\n width,\n breakpoints,\n layouts,\n cols\n } = this.props;\n const breakpoint = (0, _responsiveUtils.getBreakpointFromWidth)(breakpoints, width);\n const colNo = (0, _responsiveUtils.getColsFromBreakpoint)(breakpoint, cols);\n // verticalCompact compatibility, now deprecated\n const compactType = this.props.verticalCompact === false ? null : this.props.compactType;\n // Get the initial layout. This can tricky; we try to generate one however possible if one doesn't exist\n // for this layout.\n const initialLayout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(layouts, breakpoints, breakpoint, breakpoint, colNo, compactType);\n return {\n layout: initialLayout,\n breakpoint: breakpoint,\n cols: colNo\n };\n }\n static getDerivedStateFromProps(nextProps /*: Props<*>*/, prevState /*: State*/) /*: ?$Shape<State>*/{\n if (!(0, _fastEquals.deepEqual)(nextProps.layouts, prevState.layouts)) {\n // Allow parent to set layouts directly.\n const {\n breakpoint,\n cols\n } = prevState;\n\n // Since we're setting an entirely new layout object, we must generate a new responsive layout\n // if one does not exist.\n const newLayout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(nextProps.layouts, nextProps.breakpoints, breakpoint, breakpoint, cols, nextProps.compactType);\n return {\n layout: newLayout,\n layouts: nextProps.layouts\n };\n }\n return null;\n }\n componentDidUpdate(prevProps /*: Props<*>*/) {\n // Allow parent to set width or breakpoint directly.\n if (this.props.width != prevProps.width || this.props.breakpoint !== prevProps.breakpoint || !(0, _fastEquals.deepEqual)(this.props.breakpoints, prevProps.breakpoints) || !(0, _fastEquals.deepEqual)(this.props.cols, prevProps.cols)) {\n this.onWidthChange(prevProps);\n }\n }\n /**\n * When the width changes work through breakpoints and reset state with the new width & breakpoint.\n * Width changes are necessary to figure out the widget widths.\n */\n onWidthChange(prevProps /*: Props<*>*/) {\n const {\n breakpoints,\n cols,\n layouts,\n compactType\n } = this.props;\n const newBreakpoint = this.props.breakpoint || (0, _responsiveUtils.getBreakpointFromWidth)(this.props.breakpoints, this.props.width);\n const lastBreakpoint = this.state.breakpoint;\n const newCols /*: number*/ = (0, _responsiveUtils.getColsFromBreakpoint)(newBreakpoint, cols);\n const newLayouts = _objectSpread({}, layouts);\n\n // Breakpoint change\n if (lastBreakpoint !== newBreakpoint || prevProps.breakpoints !== breakpoints || prevProps.cols !== cols) {\n // Preserve the current layout if the current breakpoint is not present in the next layouts.\n if (!(lastBreakpoint in newLayouts)) newLayouts[lastBreakpoint] = (0, _utils.cloneLayout)(this.state.layout);\n\n // Find or generate a new layout.\n let layout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(newLayouts, breakpoints, newBreakpoint, lastBreakpoint, newCols, compactType);\n\n // This adds missing items.\n layout = (0, _utils.synchronizeLayoutWithChildren)(layout, this.props.children, newCols, compactType, this.props.allowOverlap);\n\n // Store the new layout.\n newLayouts[newBreakpoint] = layout;\n\n // callbacks\n this.props.onBreakpointChange(newBreakpoint, newCols);\n this.props.onLayoutChange(layout, newLayouts);\n this.setState({\n breakpoint: newBreakpoint,\n layout: layout,\n cols: newCols\n });\n }\n const margin = getIndentationValue(this.props.margin, newBreakpoint);\n const containerPadding = getIndentationValue(this.props.containerPadding, newBreakpoint);\n\n //call onWidthChange on every change of width, not only on breakpoint changes\n this.props.onWidthChange(this.props.width, margin, newCols, containerPadding);\n }\n render() /*: React.Element<typeof ReactGridLayout>*/{\n /* eslint-disable no-unused-vars */\n const _this$props = this.props,\n {\n breakpoint,\n breakpoints,\n cols,\n layouts,\n margin,\n containerPadding,\n onBreakpointChange,\n onLayoutChange,\n onWidthChange\n } = _this$props,\n other = _objectWithoutProperties(_this$props, _excluded);\n /* eslint-enable no-unused-vars */\n\n return /*#__PURE__*/React.createElement(_ReactGridLayout.default, _extends({}, other, {\n // $FlowIgnore should allow nullable here due to DefaultProps\n margin: getIndentationValue(margin, this.state.breakpoint),\n containerPadding: getIndentationValue(containerPadding, this.state.breakpoint),\n onLayoutChange: this.onLayoutChange,\n layout: this.state.layout,\n cols: this.state.cols\n }));\n }\n}\nexports.default = ResponsiveReactGridLayout;\n// This should only include propTypes needed in this code; RGL itself\n// will do validation of the rest props passed to it.\n_defineProperty(ResponsiveReactGridLayout, \"propTypes\", {\n //\n // Basic props\n //\n\n // Optional, but if you are managing width yourself you may want to set the breakpoint\n // yourself as well.\n breakpoint: _propTypes.default.string,\n // {name: pxVal}, e.g. {lg: 1200, md: 996, sm: 768, xs: 480}\n breakpoints: _propTypes.default.object,\n allowOverlap: _propTypes.default.bool,\n // # of cols. This is a breakpoint -> cols map\n cols: _propTypes.default.object,\n // # of margin. This is a breakpoint -> margin map\n // e.g. { lg: [5, 5], md: [10, 10], sm: [15, 15] }\n // Margin between items [x, y] in px\n // e.g. [10, 10]\n margin: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object]),\n // # of containerPadding. This is a breakpoint -> containerPadding map\n // e.g. { lg: [5, 5], md: [10, 10], sm: [15, 15] }\n // Padding inside the container [x, y] in px\n // e.g. [10, 10]\n containerPadding: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object]),\n // layouts is an object mapping breakpoints to layouts.\n // e.g. {lg: Layout, md: Layout, ...}\n layouts(props /*: Props<>*/, propName /*: string*/) {\n if (type(props[propName]) !== \"[object Object]\") {\n throw new Error(\"Layout property must be an object. Received: \" + type(props[propName]));\n }\n Object.keys(props[propName]).forEach(key => {\n if (!(key in props.breakpoints)) {\n throw new Error(\"Each key in layouts must align with a key in breakpoints.\");\n }\n (0, _utils.validateLayout)(props.layouts[key], \"layouts.\" + key);\n });\n },\n // The width of this component.\n // Required in this propTypes stanza because generateInitialState() will fail without it.\n width: _propTypes.default.number.isRequired,\n //\n // Callbacks\n //\n\n // Calls back with breakpoint and new # cols\n onBreakpointChange: _propTypes.default.func,\n // Callback so you can save the layout.\n // Calls back with (currentLayout, allLayouts). allLayouts are keyed by breakpoint.\n onLayoutChange: _propTypes.default.func,\n // Calls back with (containerWidth, margin, cols, containerPadding)\n onWidthChange: _propTypes.default.func\n});\n_defineProperty(ResponsiveReactGridLayout, \"defaultProps\", {\n breakpoints: {\n lg: 1200,\n md: 996,\n sm: 768,\n xs: 480,\n xxs: 0\n },\n cols: {\n lg: 12,\n md: 10,\n sm: 6,\n xs: 4,\n xxs: 2\n },\n containerPadding: {\n lg: null,\n md: null,\n sm: null,\n xs: null,\n xxs: null\n },\n layouts: {},\n margin: [10, 10],\n allowOverlap: false,\n onBreakpointChange: _utils.noop,\n onLayoutChange: _utils.noop,\n onWidthChange: _utils.noop\n});"],"names":["ResponsiveReactGridLayout_1","React","_interopRequireWildcard","require$$0","_propTypes","_interopRequireDefault","_fastEquals","require$$2","_utils","require$$3","_responsiveUtils","require$$4","_ReactGridLayout","require$$5","_excluded","r","n","e","t","o","i","f","_extends","_objectWithoutProperties","_objectWithoutPropertiesLoose","ownKeys","_objectSpread","_defineProperty","_toPropertyKey","_toPrimitive","type","obj","getIndentationValue","param","breakpoint","layout","width","breakpoints","layouts","cols","colNo","compactType","nextProps","prevState","prevProps","newBreakpoint","lastBreakpoint","newCols","newLayouts","margin","containerPadding","_this$props","onBreakpointChange","onLayoutChange","onWidthChange","other","ResponsiveReactGridLayout","props","propName","key"],"mappings":";;;;;;;;;;SAEA,OAAO,eAAeA,GAAS,cAAc;AAAA,IAC3C,OAAO;AAAA,EACT,CAAC,GACDA,EAAA,UAAkB;AAClB,MAAIC,IAAQC,EAAwBC,CAAgB,GAChDC,IAAaC,qBAA4C,GACzDC,IAAcC,gBAAAA,EAAA,GACdC,IAASC,EAAA,GACTC,IAAmBC,EAAA,GACnBC,IAAmBP,EAAuBQ,GAA4B;AAC1E,QAAMC,IAAY,CAAC,cAAc,eAAe,QAAQ,WAAW,UAAU,oBAAoB,sBAAsB,kBAAkB,eAAe;AACxJ,WAAST,EAAuB,GAAG;AAAE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AO,KAAKD,EAAMC,CAAQ,CAAC,EAAE,QAAQ,CAAAC,MAAO;AAC1C,YAAI,EAAEA,KAAOF,EAAM;AACjB,gBAAM,IAAI,MAAM,2DAA2D;AAE7E,YAAIjD,EAAO,gBAAgBiD,EAAM,QAAQE,CAAG,GAAG,aAAaA,CAAG;AAAA,MACrE,CAAK;AAAA,IACL;AAAA;AAAA;AAAA,IAGE,OAAOvD,EAAW,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAMjC,oBAAoBA,EAAW,QAAQ;AAAA;AAAA;AAAA,IAGvC,gBAAgBA,EAAW,QAAQ;AAAA;AAAA,IAEnC,eAAeA,EAAW,QAAQ;AAAA,EACpC,CAAC,GACDuB,EAAgB6B,GAA2B,gBAAgB;AAAA,IACzD,aAAa;AAAA,MACX,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA;IAEP,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA;IAEP,kBAAkB;AAAA,MAChB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA;IAEP,SAAS,CAAA;AAAA,IACT,QAAQ,CAAC,IAAI,EAAE;AAAA,IACf,cAAc;AAAA,IACd,oBAAoBhD,EAAO;AAAA,IAC3B,gBAAgBA,EAAO;AAAA,IACvB,eAAeA,EAAO;AAAA,EACxB,CAAC;;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../../../_virtual/WidthProvider.cjs"),W=require("react"),q=require("../../../prop-types/index.cjs"),x=require("../../../../_virtual/ResizeObserver.es.cjs"),z=require("../../../clsx/dist/clsx2.cjs");var h;function E(){if(h)return d.__exports;h=1,Object.defineProperty(d.__exports,"__esModule",{value:!0}),d.__exports.default=j;var l=m(W),_=p(q.__require()),b=p(x),y=p(z.__require());const P=["measureBeforeMount"];function p(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(typeof WeakMap=="function")var n=new WeakMap,r=new WeakMap;return(m=function(i,o){if(!o&&i&&i.__esModule)return i;var s,c,f={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return f;if(s=o?r:n){if(s.has(i))return s.get(i);s.set(i,f)}for(const a in i)a!=="default"&&{}.hasOwnProperty.call(i,a)&&((c=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,a))&&(c.get||c.set)?s(f,a,c):f[a]=i[a]);return f})(e,t)}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v.apply(null,arguments)}function O(e,t){if(e==null)return{};var n,r,i=g(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function g(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function u(e,t,n){return(t=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../../../_virtual/WidthProvider.cjs"),W=require("react"),q=require("../../../prop-types/index.cjs"),x=require("../../../../_virtual/ResizeObserver.es.cjs"),z=require("../../../clsx/dist/clsx2.cjs");var h;function E(){if(h)return d.__exports;h=1,Object.defineProperty(d.__exports,"__esModule",{value:!0}),d.__exports.default=j;var l=m(W),_=p(q.__require()),b=p(x),y=p(z.__require());const P=["measureBeforeMount"];function p(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(typeof WeakMap=="function")var n=new WeakMap,r=new WeakMap;return(m=function(i,o){if(!o&&i&&i.__esModule)return i;var s,c,f={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return f;if(s=o?r:n){if(s.has(i))return s.get(i);s.set(i,f)}for(const a in i)a!=="default"&&{}.hasOwnProperty.call(i,a)&&((c=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,a))&&(c.get||c.set)?s(f,a,c):f[a]=i[a]);return f})(e,t)}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v.apply(null,arguments)}function O(e,t){if(e==null)return{};var n,r,i=g(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function g(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function u(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e){var t=w(e,"string");return typeof t=="symbol"?t:t+""}function w(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const M="react-grid-layout";function j(e){var t;return t=class extends l.Component{constructor(){super(...arguments),u(this,"state",{width:1280}),u(this,"elementRef",l.createRef()),u(this,"mounted",!1),u(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new b.default(i=>{if(this.elementRef.current instanceof HTMLElement){const s=i[0].contentRect.width;this.setState({width:s})}});const r=this.elementRef.current;r instanceof HTMLElement&&this.resizeObserver.observe(r)}componentWillUnmount(){this.mounted=!1;const r=this.elementRef.current;r instanceof HTMLElement&&this.resizeObserver.unobserve(r),this.resizeObserver.disconnect()}render(){const r=this.props,{measureBeforeMount:i}=r,o=O(r,P);return i&&!this.mounted?l.createElement("div",{className:(0,y.default)(this.props.className,M),style:this.props.style,ref:this.elementRef}):l.createElement(e,v({innerRef:this.elementRef},o,this.state))}},u(t,"defaultProps",{measureBeforeMount:!1}),u(t,"propTypes",{measureBeforeMount:_.default.bool}),t}return d.__exports}exports.__require=E;
|
|
2
2
|
//# sourceMappingURL=WidthProvider.cjs.map
|
|
@@ -4,7 +4,7 @@ import { __require as q } from "../../../prop-types/index.js";
|
|
|
4
4
|
import x from "../../../../_virtual/ResizeObserver.es.js";
|
|
5
5
|
import { __require as E } from "../../../clsx/dist/clsx2.js";
|
|
6
6
|
var h;
|
|
7
|
-
function
|
|
7
|
+
function $() {
|
|
8
8
|
if (h) return p;
|
|
9
9
|
h = 1, Object.defineProperty(p, "__esModule", {
|
|
10
10
|
value: !0
|
|
@@ -59,10 +59,10 @@ function N() {
|
|
|
59
59
|
return (r = w(r)) in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
|
|
60
60
|
}
|
|
61
61
|
function w(e) {
|
|
62
|
-
var r =
|
|
62
|
+
var r = R(e, "string");
|
|
63
63
|
return typeof r == "symbol" ? r : r + "";
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function R(e, r) {
|
|
66
66
|
if (typeof e != "object" || !e) return e;
|
|
67
67
|
var n = e[Symbol.toPrimitive];
|
|
68
68
|
if (n !== void 0) {
|
|
@@ -72,7 +72,7 @@ function N() {
|
|
|
72
72
|
}
|
|
73
73
|
return (r === "string" ? String : Number)(e);
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const M = "react-grid-layout";
|
|
76
76
|
function j(e) {
|
|
77
77
|
var r;
|
|
78
78
|
return r = class extends l.Component {
|
|
@@ -103,7 +103,7 @@ function N() {
|
|
|
103
103
|
measureBeforeMount: o
|
|
104
104
|
} = t, i = O(t, P);
|
|
105
105
|
return o && !this.mounted ? /* @__PURE__ */ l.createElement("div", {
|
|
106
|
-
className: (0, _.default)(this.props.className,
|
|
106
|
+
className: (0, _.default)(this.props.className, M),
|
|
107
107
|
style: this.props.style,
|
|
108
108
|
ref: this.elementRef
|
|
109
109
|
}) : /* @__PURE__ */ l.createElement(e, m({
|
|
@@ -121,6 +121,6 @@ function N() {
|
|
|
121
121
|
return p;
|
|
122
122
|
}
|
|
123
123
|
export {
|
|
124
|
-
|
|
124
|
+
$ as __require
|
|
125
125
|
};
|
|
126
126
|
//# sourceMappingURL=WidthProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidthProvider.js","sources":["../../../../../../node_modules/react-grid-layout/build/components/WidthProvider.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = WidthProvideRGL;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _resizeObserverPolyfill = _interopRequireDefault(require(\"resize-observer-polyfill\"));\nvar _clsx = _interopRequireDefault(require(\"clsx\"));\nconst _excluded = [\"measureBeforeMount\"];\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 _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }\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 { ReactRef } from \"../ReactGridLayoutPropTypes\";*/\n/*:: type WPDefaultProps = {|\n measureBeforeMount: boolean\n|};*/\n/*:: type WPProps = {|\n className?: string,\n style?: Object,\n ...WPDefaultProps\n|};*/\n// eslint-disable-next-line no-unused-vars\n/*:: type WPState = {|\n width: number\n|};*/\n/*:: type ComposedProps<Config> = {|\n ...Config,\n measureBeforeMount?: boolean,\n className?: string,\n style?: Object,\n width?: number\n|};*/\nconst layoutClassName = \"react-grid-layout\";\n\n/*\n * A simple HOC that provides facility for listening to container resizes.\n *\n * The Flow type is pretty janky here. I can't just spread `WPProps` into this returned object - I wish I could - but it triggers\n * a flow bug of some sort that causes it to stop typechecking.\n */\nfunction WidthProvideRGL /*:: <Config>*/(ComposedComponent /*: React.AbstractComponent<Config>*/) /*: React.AbstractComponent<ComposedProps<Config>>*/{\n var _WidthProvider;\n return _WidthProvider = class WidthProvider extends React.Component\n /*:: <\n ComposedProps<Config>,\n WPState\n >*/\n {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"state\", {\n width: 1280\n });\n _defineProperty(this, \"elementRef\", /*#__PURE__*/React.createRef());\n _defineProperty(this, \"mounted\", false);\n _defineProperty(this, \"resizeObserver\", void 0);\n }\n componentDidMount() {\n this.mounted = true;\n this.resizeObserver = new _resizeObserverPolyfill.default(entries => {\n const node = this.elementRef.current;\n if (node instanceof HTMLElement) {\n const width = entries[0].contentRect.width;\n this.setState({\n width\n });\n }\n });\n const node = this.elementRef.current;\n if (node instanceof HTMLElement) {\n this.resizeObserver.observe(node);\n }\n }\n componentWillUnmount() {\n this.mounted = false;\n const node = this.elementRef.current;\n if (node instanceof HTMLElement) {\n this.resizeObserver.unobserve(node);\n }\n this.resizeObserver.disconnect();\n }\n render() {\n const _this$props = this.props,\n {\n measureBeforeMount\n } = _this$props,\n rest = _objectWithoutProperties(_this$props, _excluded);\n if (measureBeforeMount && !this.mounted) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _clsx.default)(this.props.className, layoutClassName),\n style: this.props.style\n // $FlowIgnore ref types\n ,\n ref: this.elementRef\n });\n }\n return /*#__PURE__*/React.createElement(ComposedComponent, _extends({\n innerRef: this.elementRef\n }, rest, this.state));\n }\n }, _defineProperty(_WidthProvider, \"defaultProps\", {\n measureBeforeMount: false\n }), _defineProperty(_WidthProvider, \"propTypes\", {\n // If true, will not render children until mounted. Useful for getting the exact width before\n // rendering, to prevent any unsightly resizing.\n measureBeforeMount: _propTypes.default.bool\n }), _WidthProvider;\n}"],"names":["WidthProvider_1","WidthProvideRGL","React","_interopRequireWildcard","require$$0","_propTypes","_interopRequireDefault","_resizeObserverPolyfill","require$$2","_clsx","require$$3","_excluded","t","r","n","e","o","i","_extends","_objectWithoutProperties","_objectWithoutPropertiesLoose","_defineProperty","_toPropertyKey","_toPrimitive","layoutClassName","ComposedComponent","_WidthProvider","entries","width","node","_this$props","measureBeforeMount","rest"],"mappings":";;;;;;;;SAEA,OAAO,eAAeA,GAAS,cAAc;AAAA,IAC3C,OAAO;AAAA,EACT,CAAC,GACDA,EAAA,UAAkBC;AAClB,MAAIC,IAAQC,EAAwBC,CAAgB,GAChDC,IAAaC,qBAA4C,GACzDC,IAA0BD,EAAuBE,CAAmC,GACpFC,IAAQH,EAAuBI,GAAe;AAClD,QAAMC,IAAY,CAAC,oBAAoB;AACvC,WAASL,EAAuB,GAAG;AAAE,WAAO,KAAK,EAAE,aAAa,IAAI,EAAE,SAAS,EAAC;AAAA,EAAG;AACnF,WAASH,EAAwB,GAAGS,GAAG;AAAE,QAAkB,OAAO,WAArB,WAA8B,KAAIC,IAAI,oBAAI,QAAO,GAAIC,IAAI,oBAAI,QAAO;AAAI,YAAQX,IAA0B,SAAUY,GAAGH,GAAG;AAAE,UAAI,CAACA,KAAKG,KAAKA,EAAE,WAAY,QAAOA;AAAG,UAAIC,GAAGC,GAAG,IAAI,EAAE,WAAW,MAAM,SAASF;AAAK,UAAaA,MAAT,QAA0B,OAAOA,KAAnB,YAAsC,OAAOA,KAArB,WAAwB,QAAO;AAAG,UAAIC,IAAIJ,IAAIE,IAAID,GAAG;AAAE,YAAIG,EAAE,IAAID,CAAC,EAAG,QAAOC,EAAE,IAAID,CAAC;AAAG,QAAAC,EAAE,IAAID,GAAG,CAAC;AAAA,MAAE;AAAG,iBAAWH,KAAKG,EAAG,CAAcH,MAAd,aAAmB,CAAA,EAAG,eAAe,KAAKG,GAAGH,CAAC,OAAOK,KAAKD,IAAI,OAAO,mBAAmB,OAAO,yBAAyBD,GAAGH,CAAC,OAAOK,EAAE,OAAOA,EAAE,OAAOD,EAAE,GAAGJ,GAAGK,CAAC,IAAI,EAAEL,CAAC,IAAIG,EAAEH,CAAC;AAAI,aAAO;AAAA,IAAE,GAAI,GAAG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AAI;AAAA,MAExC;AAAA,MACI,uBAAuB;AACrB,aAAK,UAAU;AACf,cAAMA,IAAO,KAAK,WAAW;AAC7B,QAAIA,aAAgB,eAClB,KAAK,eAAe,UAAUA,CAAI,GAEpC,KAAK,eAAe,WAAU;AAAA,MACpC;AAAA,MACI,SAAS;AACP,cAAMC,IAAc,KAAK,OACvB;AAAA,UACE,oBAAAC;AAAA,QACV,IAAYD,GACJE,IAAOb,EAAyBW,GAAanB,CAAS;AACxD,eAAIoB,KAAsB,CAAC,KAAK,UACV,gBAAA7B,EAAM,cAAc,OAAO;AAAA,UAC7C,eAAeO,EAAM,SAAS,KAAK,MAAM,WAAWe,CAAe;AAAA,UACnE,OAAO,KAAK,MAAM;AAAA,UAGlB,KAAK,KAAK;AAAA,QACpB,CAAS,IAEiB,gBAAAtB,EAAM,cAAcuB,GAAmBP,EAAS;AAAA,UAClE,UAAU,KAAK;AAAA,QACvB,GAASc,GAAM,KAAK,KAAK,CAAC;AAAA,MAC1B;AAAA,IACA,GAAKX,EAAgBK,GAAgB,gBAAgB;AAAA,MACjD,oBAAoB;AAAA,IACxB,CAAG,GAAGL,EAAgBK,GAAgB,aAAa;AAAA;AAAA;AAAA,MAG/C,oBAAoBrB,EAAW,QAAQ;AAAA,KACxC,GAAGqB;AAAA,EACN;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"WidthProvider.js","sources":["../../../../../../node_modules/react-grid-layout/build/components/WidthProvider.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = WidthProvideRGL;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _resizeObserverPolyfill = _interopRequireDefault(require(\"resize-observer-polyfill\"));\nvar _clsx = _interopRequireDefault(require(\"clsx\"));\nconst _excluded = [\"measureBeforeMount\"];\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 _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }\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 { ReactRef } from \"../ReactGridLayoutPropTypes\";*/\n/*:: type WPDefaultProps = {|\n measureBeforeMount: boolean\n|};*/\n/*:: type WPProps = {|\n className?: string,\n style?: Object,\n ...WPDefaultProps\n|};*/\n// eslint-disable-next-line no-unused-vars\n/*:: type WPState = {|\n width: number\n|};*/\n/*:: type ComposedProps<Config> = {|\n ...Config,\n measureBeforeMount?: boolean,\n className?: string,\n style?: Object,\n width?: number\n|};*/\nconst layoutClassName = \"react-grid-layout\";\n\n/*\n * A simple HOC that provides facility for listening to container resizes.\n *\n * The Flow type is pretty janky here. I can't just spread `WPProps` into this returned object - I wish I could - but it triggers\n * a flow bug of some sort that causes it to stop typechecking.\n */\nfunction WidthProvideRGL /*:: <Config>*/(ComposedComponent /*: React.AbstractComponent<Config>*/) /*: React.AbstractComponent<ComposedProps<Config>>*/{\n var _WidthProvider;\n return _WidthProvider = class WidthProvider extends React.Component\n /*:: <\n ComposedProps<Config>,\n WPState\n >*/\n {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"state\", {\n width: 1280\n });\n _defineProperty(this, \"elementRef\", /*#__PURE__*/React.createRef());\n _defineProperty(this, \"mounted\", false);\n _defineProperty(this, \"resizeObserver\", void 0);\n }\n componentDidMount() {\n this.mounted = true;\n this.resizeObserver = new _resizeObserverPolyfill.default(entries => {\n const node = this.elementRef.current;\n if (node instanceof HTMLElement) {\n const width = entries[0].contentRect.width;\n this.setState({\n width\n });\n }\n });\n const node = this.elementRef.current;\n if (node instanceof HTMLElement) {\n this.resizeObserver.observe(node);\n }\n }\n componentWillUnmount() {\n this.mounted = false;\n const node = this.elementRef.current;\n if (node instanceof HTMLElement) {\n this.resizeObserver.unobserve(node);\n }\n this.resizeObserver.disconnect();\n }\n render() {\n const _this$props = this.props,\n {\n measureBeforeMount\n } = _this$props,\n rest = _objectWithoutProperties(_this$props, _excluded);\n if (measureBeforeMount && !this.mounted) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _clsx.default)(this.props.className, layoutClassName),\n style: this.props.style\n // $FlowIgnore ref types\n ,\n ref: this.elementRef\n });\n }\n return /*#__PURE__*/React.createElement(ComposedComponent, _extends({\n innerRef: this.elementRef\n }, rest, this.state));\n }\n }, _defineProperty(_WidthProvider, \"defaultProps\", {\n measureBeforeMount: false\n }), _defineProperty(_WidthProvider, \"propTypes\", {\n // If true, will not render children until mounted. Useful for getting the exact width before\n // rendering, to prevent any unsightly resizing.\n measureBeforeMount: _propTypes.default.bool\n }), _WidthProvider;\n}"],"names":["WidthProvider_1","WidthProvideRGL","React","_interopRequireWildcard","require$$0","_propTypes","_interopRequireDefault","_resizeObserverPolyfill","require$$2","_clsx","require$$3","_excluded","t","r","n","e","o","i","_extends","_objectWithoutProperties","_objectWithoutPropertiesLoose","_defineProperty","_toPropertyKey","_toPrimitive","layoutClassName","ComposedComponent","_WidthProvider","entries","width","node","_this$props","measureBeforeMount","rest"],"mappings":";;;;;;;;SAEA,OAAO,eAAeA,GAAS,cAAc;AAAA,IAC3C,OAAO;AAAA,EACT,CAAC,GACDA,EAAA,UAAkBC;AAClB,MAAIC,IAAQC,EAAwBC,CAAgB,GAChDC,IAAaC,qBAA4C,GACzDC,IAA0BD,EAAuBE,CAAmC,GACpFC,IAAQH,EAAuBI,GAAe;AAClD,QAAMC,IAAY,CAAC,oBAAoB;AACvC,WAASL,EAAuB,GAAG;AAAE,WAAO,KAAK,EAAE,aAAa,IAAI,EAAE,SAAS,EAAC;AAAA,EAAG;AACnF,WAASH,EAAwB,GAAGS,GAAG;AAAE,QAAkB,OAAO,WAArB,WAA8B,KAAIC,IAAI,oBAAI,QAAO,GAAIC,IAAI,oBAAI,QAAO;AAAI,YAAQX,IAA0B,SAAUY,GAAGH,GAAG;AAAE,UAAI,CAACA,KAAKG,KAAKA,EAAE,WAAY,QAAOA;AAAG,UAAIC,GAAGC,GAAG,IAAI,EAAE,WAAW,MAAM,SAASF;AAAK,UAAaA,MAAT,QAA0B,OAAOA,KAAnB,YAAsC,OAAOA,KAArB,WAAwB,QAAO;AAAG,UAAIC,IAAIJ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","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../_virtual/utils.cjs"),pt=require("../../fast-equals/dist/fast-equals.cjs"),dt=require("react"),gt=require("./fastRGLPropsEqual.cjs");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../_virtual/utils.cjs"),pt=require("../../fast-equals/dist/fast-equals.cjs"),dt=require("react"),gt=require("./fastRGLPropsEqual.cjs");var Q;function xt(){if(Q)return c.__exports;Q=1,Object.defineProperty(c.__exports,"__esModule",{value:!0}),c.__exports.bottom=v,c.__exports.childrenEqual=tt,c.__exports.cloneLayout=S,c.__exports.cloneLayoutItem=p,c.__exports.collides=b,c.__exports.compact=I,c.__exports.compactItem=G,c.__exports.compactType=at,c.__exports.correctBounds=F,c.__exports.fastPositionEqual=et,c.__exports.fastRGLPropsEqual=void 0,c.__exports.getAllCollisions=A,c.__exports.getFirstCollision=d,c.__exports.getLayoutItem=C,c.__exports.getStatics=O,c.__exports.modifyLayout=W,c.__exports.moveElement=w,c.__exports.moveElementAwayFromCollision=P,c.__exports.noop=void 0,c.__exports.perc=rt,c.__exports.resizeItemInDirection=it,c.__exports.setTopLeft=ct,c.__exports.setTransform=st,c.__exports.sortLayoutItems=D,c.__exports.sortLayoutItemsByColRow=J,c.__exports.sortLayoutItemsByRowCol=X,c.__exports.synchronizeLayoutWithChildren=ft,c.__exports.validateLayout=ut,c.__exports.withLayoutItem=T;var N=pt.__require(),m=Z(dt);function Z(t){return t&&t.__esModule?t:{default:t}}function B(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?B(Object(n),!0).forEach(function(r){$(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $(t,e,n){return(e=U(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U(t){var e=M(t,"string");return typeof e=="symbol"?e:e+""}function M(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function v(t){let e=0,n;for(let r=0,i=t.length;r<i;r++)n=t[r].y+t[r].h,n>e&&(e=n);return e}function S(t){const e=Array(t.length);for(let n=0,r=t.length;n<r;n++)e[n]=p(t[n]);return e}function W(t,e){const n=Array(t.length);for(let r=0,i=t.length;r<i;r++)e.i===t[r].i?n[r]=e:n[r]=t[r];return n}function T(t,e,n){let r=C(t,e);return r?(r=n(p(r)),t=W(t,r),[t,r]):[t,null]}function p(t){return{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,minW:t.minW,maxW:t.maxW,minH:t.minH,maxH:t.maxH,moved:!!t.moved,static:!!t.static,isDraggable:t.isDraggable,isResizable:t.isResizable,resizeHandles:t.resizeHandles,isBounded:t.isBounded}}function tt(t,e){return(0,N.deepEqual)(m.default.Children.map(t,n=>n==null?void 0:n.key),m.default.Children.map(e,n=>n==null?void 0:n.key))&&(0,N.deepEqual)(m.default.Children.map(t,n=>n==null?void 0:n.props["data-grid"]),m.default.Children.map(e,n=>n==null?void 0:n.props["data-grid"]))}c.__exports.fastRGLPropsEqual=gt.__require();function et(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.width&&t.height===e.height}function b(t,e){return!(t.i===e.i||t.x+t.w<=e.x||t.x>=e.x+e.w||t.y+t.h<=e.y||t.y>=e.y+e.h)}function I(t,e,n,r){const i=O(t);let o=v(i);const s=D(t,e),f=Array(t.length);for(let u=0,a=s.length;u<a;u++){let l=p(s[u]);l.static||(l=G(i,l,e,n,s,r,o),o=Math.max(o,l.y+l.h),i.push(l)),f[t.indexOf(s[u])]=l,l.moved=!1}return f}const nt={x:"w",y:"h"};function E(t,e,n,r){const i=nt[r];e[r]+=1;const o=t.map(s=>s.i).indexOf(e.i);for(let s=o+1;s<t.length;s++){const f=t[s];if(!f.static){if(f.y>e.y+e.h)break;b(e,f)&&E(t,f,n+e[i],r)}}e[r]=n}function G(t,e,n,r,i,o,s){const f=n==="vertical",u=n==="horizontal";if(f)for(typeof s=="number"?e.y=Math.min(s,e.y):e.y=Math.min(v(t),e.y);e.y>0&&!d(t,e);)e.y--;else if(u)for(;e.x>0&&!d(t,e);)e.x--;let a;for(;(a=d(t,e))&&!(n===null&&o);)if(u?E(i,e,a.x+a.w,"x"):E(i,e,a.y+a.h,"y"),u&&e.x+e.w>r)for(e.x=r-e.w,e.y++;e.x>0&&!d(t,e);)e.x--;return e.y=Math.max(e.y,0),e.x=Math.max(e.x,0),e}function F(t,e){const n=O(t);for(let r=0,i=t.length;r<i;r++){const o=t[r];if(o.x+o.w>e.cols&&(o.x=e.cols-o.w),o.x<0&&(o.x=0,o.w=e.cols),!o.static)n.push(o);else for(;d(n,o);)o.y++}return t}function C(t,e){for(let n=0,r=t.length;n<r;n++)if(t[n].i===e)return t[n]}function d(t,e){for(let n=0,r=t.length;n<r;n++)if(b(t[n],e))return t[n]}function A(t,e){return t.filter(n=>b(n,e))}function O(t){return t.filter(e=>e.static)}function w(t,e,n,r,i,o,s,f,u){if(e.static&&e.isDraggable!==!0||e.y===r&&e.x===n)return t;"Moving element ".concat(e.i," to [").concat(String(n),",").concat(String(r),"] from [").concat(e.x,",").concat(e.y,"]");const a=e.x,l=e.y;typeof n=="number"&&(e.x=n),typeof r=="number"&&(e.y=r),e.moved=!0;let h=D(t,s);(s==="vertical"&&typeof r=="number"?l>=r:s==="horizontal"&&typeof n=="number"?a>=n:!1)&&(h=h.reverse());const _=A(h,e),L=_.length>0;if(L&&u)return S(t);if(L&&o)return"Collision prevented on ".concat(e.i,", reverting."),e.x=a,e.y=l,e.moved=!1,t;for(let H=0,ht=_.length;H<ht;H++){const x=_[H];"Resolving collision between ".concat(e.i," at [").concat(e.x,",").concat(e.y,"] and ").concat(x.i," at [").concat(x.x,",").concat(x.y,"]"),!x.moved&&(x.static?t=P(t,x,e,i,s):t=P(t,e,x,i,s))}return t}function P(t,e,n,r,i,o){const s=i==="horizontal",f=i==="vertical",u=e.static;if(r){r=!1;const h={x:s?Math.max(e.x-n.w,0):n.x,y:f?Math.max(e.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},g=d(t,h),_=g&&g.y+g.h>e.y,L=g&&e.x+e.w>g.x;if(g){if(_&&f)return w(t,n,void 0,n.y+1,r,u,i);if(_&&i==null)return e.y=n.y,n.y=n.y+n.h,t;if(L&&s)return w(t,e,n.x,void 0,r,u,i)}else return"Doing reverse collision on ".concat(n.i," up to [").concat(h.x,",").concat(h.y,"]."),w(t,n,s?h.x:void 0,f?h.y:void 0,r,u,i)}const a=s?n.x+1:void 0,l=f?n.y+1:void 0;return a==null&&l==null?t:w(t,n,s?n.x+1:void 0,f?n.y+1:void 0,r,u,i)}function rt(t){return t*100+"%"}const Y=(t,e,n,r)=>t+n>r?e:n,K=(t,e,n)=>t<0?e:n,V=t=>Math.max(0,t),q=t=>Math.max(0,t),j=(t,e,n)=>{let{left:r,height:i,width:o}=e;const s=t.top-(i-t.height);return{left:r,width:o,height:K(s,t.height,i),top:q(s)}},z=(t,e,n)=>{let{top:r,left:i,height:o,width:s}=e;return{top:r,height:o,width:Y(t.left,t.width,s,n),left:V(i)}},R=(t,e,n)=>{let{top:r,height:i,width:o}=e;const s=t.left-(o-t.width);return{height:i,width:s<0?t.width:Y(t.left,t.width,o,n),top:q(r),left:V(s)}},k=(t,e,n)=>{let{top:r,left:i,height:o,width:s}=e;return{width:s,left:i,height:K(r,t.height,o),top:q(r)}},ot={n:j,ne:function(){return j(arguments.length<=0?void 0:arguments[0],z(...arguments))},e:z,se:function(){return k(arguments.length<=0?void 0:arguments[0],z(...arguments))},s:k,sw:function(){return k(arguments.length<=0?void 0:arguments[0],R(...arguments))},w:R,nw:function(){return j(arguments.length<=0?void 0:arguments[0],R(...arguments))}};function it(t,e,n,r){const i=ot[t];return i?i(e,y(y({},e),n),r):n}function st(t){let{top:e,left:n,width:r,height:i}=t;const o="translate(".concat(n,"px,").concat(e,"px)");return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:"".concat(r,"px"),height:"".concat(i,"px"),position:"absolute"}}function ct(t){let{top:e,left:n,width:r,height:i}=t;return{top:"".concat(e,"px"),left:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(i,"px"),position:"absolute"}}function D(t,e){return e==="horizontal"?J(t):e==="vertical"?X(t):t}function X(t){return t.slice(0).sort(function(e,n){return e.y>n.y||e.y===n.y&&e.x>n.x?1:e.y===n.y&&e.x===n.x?0:-1})}function J(t){return t.slice(0).sort(function(e,n){return e.x>n.x||e.x===n.x&&e.y>n.y?1:-1})}function ft(t,e,n,r,i){t=t||[];const o=[];m.default.Children.forEach(e,f=>{if((f==null?void 0:f.key)==null)return;const u=C(t,String(f.key)),a=f.props["data-grid"];u&&a==null?o.push(p(u)):a?o.push(p(y(y({},a),{},{i:f.key}))):o.push(p({w:1,h:1,x:0,y:v(o),i:String(f.key)}))});const s=F(o,{cols:n});return i?s:I(s,r,n)}function ut(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const n=["x","y","w","h"];if(!Array.isArray(t))throw new Error(e+" must be an array!");for(let r=0,i=t.length;r<i;r++){const o=t[r];for(let s=0;s<n.length;s++){const f=n[s],u=o[f];if(typeof u!="number"||Number.isNaN(u))throw new Error("ReactGridLayout: ".concat(e,"[").concat(r,"].").concat(f," must be a number! Received: ").concat(u," (").concat(typeof u,")"))}if(typeof o.i<"u"&&typeof o.i!="string")throw new Error("ReactGridLayout: ".concat(e,"[").concat(r,"].i must be a string! Received: ").concat(o.i," (").concat(typeof o.i,")"))}}function at(t){const{verticalCompact:e,compactType:n}=t||{};return e===!1?null:n}function vt(){}const lt=()=>{};return c.__exports.noop=lt,c.__exports}exports.__require=xt;
|
|
2
2
|
//# sourceMappingURL=utils.cjs.map
|
|
@@ -2,17 +2,17 @@ import { __exports as c } from "../../../_virtual/utils.js";
|
|
|
2
2
|
import { __require as dt } from "../../fast-equals/dist/fast-equals.js";
|
|
3
3
|
import gt from "react";
|
|
4
4
|
import { __require as pt } from "./fastRGLPropsEqual.js";
|
|
5
|
-
var
|
|
5
|
+
var Q;
|
|
6
6
|
function Ot() {
|
|
7
|
-
if (
|
|
8
|
-
|
|
7
|
+
if (Q) return c;
|
|
8
|
+
Q = 1, Object.defineProperty(c, "__esModule", {
|
|
9
9
|
value: !0
|
|
10
|
-
}), c.bottom = b, c.childrenEqual = tt, c.cloneLayout = S, c.cloneLayoutItem = d, c.collides = L, c.compact = F, c.compactItem = I, c.compactType = at, c.correctBounds = G, c.fastPositionEqual = et, c.fastRGLPropsEqual = void 0, c.getAllCollisions = A, c.getFirstCollision = g, c.getLayoutItem = O, c.getStatics = P, c.modifyLayout = W, c.moveElement = y, c.moveElementAwayFromCollision = _, c.noop = void 0, c.perc = rt, c.resizeItemInDirection = ot, c.setTopLeft = ct, c.setTransform = st, c.sortLayoutItems =
|
|
11
|
-
var
|
|
12
|
-
function
|
|
10
|
+
}), c.bottom = b, c.childrenEqual = tt, c.cloneLayout = S, c.cloneLayoutItem = d, c.collides = L, c.compact = F, c.compactItem = I, c.compactType = at, c.correctBounds = G, c.fastPositionEqual = et, c.fastRGLPropsEqual = void 0, c.getAllCollisions = A, c.getFirstCollision = g, c.getLayoutItem = O, c.getStatics = P, c.modifyLayout = W, c.moveElement = y, c.moveElementAwayFromCollision = _, c.noop = void 0, c.perc = rt, c.resizeItemInDirection = ot, c.setTopLeft = ct, c.setTransform = st, c.sortLayoutItems = D, c.sortLayoutItemsByColRow = J, c.sortLayoutItemsByRowCol = X, c.synchronizeLayoutWithChildren = ft, c.validateLayout = ut, c.withLayoutItem = T;
|
|
11
|
+
var N = /* @__PURE__ */ dt(), x = Z(gt);
|
|
12
|
+
function Z(t) {
|
|
13
13
|
return t && t.__esModule ? t : { default: t };
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function B(t, e) {
|
|
16
16
|
var n = Object.keys(t);
|
|
17
17
|
if (Object.getOwnPropertySymbols) {
|
|
18
18
|
var r = Object.getOwnPropertySymbols(t);
|
|
@@ -25,15 +25,15 @@ function Ot() {
|
|
|
25
25
|
function v(t) {
|
|
26
26
|
for (var e = 1; e < arguments.length; e++) {
|
|
27
27
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
28
|
-
e % 2 ?
|
|
29
|
-
|
|
30
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) :
|
|
28
|
+
e % 2 ? B(Object(n), !0).forEach(function(r) {
|
|
29
|
+
$(t, r, n[r]);
|
|
30
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : B(Object(n)).forEach(function(r) {
|
|
31
31
|
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
return t;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function $(t, e, n) {
|
|
37
37
|
return (e = U(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
|
|
38
38
|
}
|
|
39
39
|
function U(t) {
|
|
@@ -93,7 +93,7 @@ function Ot() {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
function tt(t, e) {
|
|
96
|
-
return (0,
|
|
96
|
+
return (0, N.deepEqual)(x.default.Children.map(t, (n) => n == null ? void 0 : n.key), x.default.Children.map(e, (n) => n == null ? void 0 : n.key)) && (0, N.deepEqual)(x.default.Children.map(t, (n) => n == null ? void 0 : n.props["data-grid"]), x.default.Children.map(e, (n) => n == null ? void 0 : n.props["data-grid"]));
|
|
97
97
|
}
|
|
98
98
|
c.fastRGLPropsEqual = pt();
|
|
99
99
|
function et(t, e) {
|
|
@@ -105,7 +105,7 @@ function Ot() {
|
|
|
105
105
|
function F(t, e, n, r) {
|
|
106
106
|
const o = P(t);
|
|
107
107
|
let i = b(o);
|
|
108
|
-
const s =
|
|
108
|
+
const s = D(t, e), f = Array(t.length);
|
|
109
109
|
for (let u = 0, a = s.length; u < a; u++) {
|
|
110
110
|
let l = d(s[u]);
|
|
111
111
|
l.static || (l = I(o, l, e, n, s, r, i), i = Math.max(i, l.y + l.h), o.push(l)), f[t.indexOf(s[u])] = l, l.moved = !1;
|
|
@@ -174,15 +174,15 @@ function Ot() {
|
|
|
174
174
|
"Moving element ".concat(e.i, " to [").concat(String(n), ",").concat(String(r), "] from [").concat(e.x, ",").concat(e.y, "]");
|
|
175
175
|
const a = e.x, l = e.y;
|
|
176
176
|
typeof n == "number" && (e.x = n), typeof r == "number" && (e.y = r), e.moved = !0;
|
|
177
|
-
let h =
|
|
177
|
+
let h = D(t, s);
|
|
178
178
|
(s === "vertical" && typeof r == "number" ? l >= r : s === "horizontal" && typeof n == "number" ? a >= n : !1) && (h = h.reverse());
|
|
179
179
|
const w = A(h, e), E = w.length > 0;
|
|
180
180
|
if (E && u)
|
|
181
181
|
return S(t);
|
|
182
182
|
if (E && i)
|
|
183
183
|
return "Collision prevented on ".concat(e.i, ", reverting."), e.x = a, e.y = l, e.moved = !1, t;
|
|
184
|
-
for (let
|
|
185
|
-
const m = w[
|
|
184
|
+
for (let H = 0, ht = w.length; H < ht; H++) {
|
|
185
|
+
const m = w[H];
|
|
186
186
|
"Resolving collision between ".concat(e.i, " at [").concat(e.x, ",").concat(e.y, "] and ").concat(m.i, " at [").concat(m.x, ",").concat(m.y, "]"), !m.moved && (m.static ? t = _(t, m, e, o, s) : t = _(t, e, m, o, s));
|
|
187
187
|
}
|
|
188
188
|
return t;
|
|
@@ -226,7 +226,7 @@ function Ot() {
|
|
|
226
226
|
height: K(s, t.height, o),
|
|
227
227
|
top: q(s)
|
|
228
228
|
};
|
|
229
|
-
},
|
|
229
|
+
}, R = (t, e, n) => {
|
|
230
230
|
let {
|
|
231
231
|
top: r,
|
|
232
232
|
left: o,
|
|
@@ -239,7 +239,7 @@ function Ot() {
|
|
|
239
239
|
width: Y(t.left, t.width, s, n),
|
|
240
240
|
left: V(o)
|
|
241
241
|
};
|
|
242
|
-
},
|
|
242
|
+
}, j = (t, e, n) => {
|
|
243
243
|
let {
|
|
244
244
|
top: r,
|
|
245
245
|
height: o,
|
|
@@ -268,19 +268,19 @@ function Ot() {
|
|
|
268
268
|
}, it = {
|
|
269
269
|
n: z,
|
|
270
270
|
ne: function() {
|
|
271
|
-
return z(arguments.length <= 0 ? void 0 : arguments[0],
|
|
271
|
+
return z(arguments.length <= 0 ? void 0 : arguments[0], R(...arguments));
|
|
272
272
|
},
|
|
273
|
-
e:
|
|
273
|
+
e: R,
|
|
274
274
|
se: function() {
|
|
275
|
-
return k(arguments.length <= 0 ? void 0 : arguments[0],
|
|
275
|
+
return k(arguments.length <= 0 ? void 0 : arguments[0], R(...arguments));
|
|
276
276
|
},
|
|
277
277
|
s: k,
|
|
278
278
|
sw: function() {
|
|
279
|
-
return k(arguments.length <= 0 ? void 0 : arguments[0],
|
|
279
|
+
return k(arguments.length <= 0 ? void 0 : arguments[0], j(...arguments));
|
|
280
280
|
},
|
|
281
|
-
w:
|
|
281
|
+
w: j,
|
|
282
282
|
nw: function() {
|
|
283
|
-
return z(arguments.length <= 0 ? void 0 : arguments[0],
|
|
283
|
+
return z(arguments.length <= 0 ? void 0 : arguments[0], j(...arguments));
|
|
284
284
|
}
|
|
285
285
|
};
|
|
286
286
|
function ot(t, e, n, r) {
|
|
@@ -321,15 +321,15 @@ function Ot() {
|
|
|
321
321
|
position: "absolute"
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
return e === "horizontal" ?
|
|
324
|
+
function D(t, e) {
|
|
325
|
+
return e === "horizontal" ? J(t) : e === "vertical" ? X(t) : t;
|
|
326
326
|
}
|
|
327
327
|
function X(t) {
|
|
328
328
|
return t.slice(0).sort(function(e, n) {
|
|
329
329
|
return e.y > n.y || e.y === n.y && e.x > n.x ? 1 : e.y === n.y && e.x === n.x ? 0 : -1;
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function J(t) {
|
|
333
333
|
return t.slice(0).sort(function(e, n) {
|
|
334
334
|
return e.x > n.x || e.x === n.x && e.y > n.y ? 1 : -1;
|
|
335
335
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../../../_virtual/Resizable.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../../../_virtual/Resizable.cjs"),I=require("react"),K=require("../../react-draggable/build/cjs/cjs.cjs"),B=require("./utils.cjs"),U=require("./propTypes.cjs");var M;function V(){if(M)return m.__exports;M=1,m.__exports.__esModule=!0,m.__exports.default=void 0;var f=O(I),q=K.__require(),$=B.__require(),x=U.__require();const W=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function O(r,e){if(typeof WeakMap=="function")var t=new WeakMap,s=new WeakMap;return(O=function(n,a){if(!a&&n&&n.__esModule)return n;var l,i,c={__proto__:null,default:n};if(n===null||typeof n!="object"&&typeof n!="function")return c;if(l=a?s:t){if(l.has(n))return l.get(n);l.set(n,c)}for(const o in n)o!=="default"&&{}.hasOwnProperty.call(n,o)&&((i=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(n,o))&&(i.get||i.set)?l(c,o,i):c[o]=n[o]);return c})(r,e)}function R(){return R=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)({}).hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r},R.apply(null,arguments)}function E(r,e){if(r==null)return{};var t={};for(var s in r)if({}.hasOwnProperty.call(r,s)){if(e.indexOf(s)!==-1)continue;t[s]=r[s]}return t}function j(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);e&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,s)}return t}function g(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?j(Object(t),!0).forEach(function(s){T(r,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(t,s))})}return r}function T(r,e,t){return(e=L(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function L(r){var e=X(r,"string");return typeof e=="symbol"?e:e+""}function X(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var s=t.call(r,e);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}let _=class extends f.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(e,t){const s=this.props,n=s.minConstraints,a=s.maxConstraints,l=s.lockAspectRatio;if(!n&&!a&&!l)return[e,t];if(l){const h=this.props.width/this.props.height,z=e-this.props.width,y=t-this.props.height;Math.abs(z)>Math.abs(y*h)?t=e/h:e=t*h}const i=e,c=t;let o=this.slack||[0,0],p=o[0],u=o[1];return e+=p,t+=u,n&&(e=Math.max(n[0],e),t=Math.max(n[1],t)),a&&(e=Math.min(a[0],e),t=Math.min(a[1],t)),this.slack=[p+(i-e),u+(c-t)],[e,t]}resizeHandler(e,t){return(s,n)=>{var a,l,i,c;let o=n.node,p=n.deltaX,u=n.deltaY;e==="onResizeStart"&&this.resetData();const h=(this.props.axis==="both"||this.props.axis==="x")&&t!=="n"&&t!=="s",z=(this.props.axis==="both"||this.props.axis==="y")&&t!=="e"&&t!=="w";if(!h&&!z)return;const y=t[0],P=t[t.length-1],S=o.getBoundingClientRect();if(this.lastHandleRect!=null){if(P==="w"){const v=S.left-this.lastHandleRect.left;p+=v}if(y==="n"){const v=S.top-this.lastHandleRect.top;u+=v}}this.lastHandleRect=S,P==="w"&&(p=-p),y==="n"&&(u=-u);const H=(a=(l=this.lastSize)==null?void 0:l.width)!=null?a:this.props.width,C=(i=(c=this.lastSize)==null?void 0:c.height)!=null?i:this.props.height;let d=H+(h?p/this.props.transformScale:0),b=C+(z?u/this.props.transformScale:0);var k=this.runConstraints(d,b);if(d=k[0],b=k[1],e==="onResizeStop"&&this.lastSize){var w=this.lastSize;d=w.width,b=w.height}const Y=d!==H||b!==C;e!=="onResizeStop"&&(this.lastSize={width:d,height:b});const D=typeof this.props[e]=="function"?this.props[e]:null;D&&!(e==="onResize"&&!Y)&&(s.persist==null||s.persist(),D(s,{node:o,size:{width:d,height:b},handle:t})),e==="onResizeStop"&&this.resetData()}}renderResizeHandle(e,t){const s=this.props.handle;if(!s)return f.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+e,ref:t});if(typeof s=="function")return s(e,t);const n=typeof s.type=="string",a=g({ref:t},n?{}:{handleAxis:e});return f.cloneElement(s,a)}render(){const e=this.props,t=e.children,s=e.className,n=e.draggableOpts;e.width,e.height,e.handle,e.handleSize,e.lockAspectRatio,e.axis,e.minConstraints,e.maxConstraints,e.onResize,e.onResizeStop,e.onResizeStart;const a=e.resizeHandles;e.transformScale;const l=E(e,W);return(0,$.cloneElement)(t,g(g({},l),{},{className:(s?s+" ":"")+"react-resizable",children:[...f.Children.toArray(t.props.children),...a.map(i=>{var c;const o=(c=this.handleRefs[i])!=null?c:this.handleRefs[i]=f.createRef();return f.createElement(q.DraggableCore,R({},n,{nodeRef:o,key:"resizableHandle-"+i,onStop:this.resizeHandler("onResizeStop",i),onStart:this.resizeHandler("onResizeStart",i),onDrag:this.resizeHandler("onResize",i)}),this.renderResizeHandle(i,o))})]}))}};return m.__exports.default=_,_.propTypes=x.resizableProps,_.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},m.__exports}exports.__require=V;
|
|
2
2
|
//# sourceMappingURL=Resizable.cjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __exports as b } from "../../../_virtual/Resizable.js";
|
|
2
|
-
import
|
|
3
|
-
import { __require as
|
|
4
|
-
import { __require as
|
|
5
|
-
import { __require as
|
|
6
|
-
var
|
|
2
|
+
import I from "react";
|
|
3
|
+
import { __require as K } from "../../react-draggable/build/cjs/cjs.js";
|
|
4
|
+
import { __require as U } from "./utils.js";
|
|
5
|
+
import { __require as B } from "./propTypes.js";
|
|
6
|
+
var M;
|
|
7
7
|
function A() {
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
var f = O(
|
|
8
|
+
if (M) return b;
|
|
9
|
+
M = 1, b.__esModule = !0, b.default = void 0;
|
|
10
|
+
var f = O(I), $ = K(), q = U(), W = B();
|
|
11
11
|
const x = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
|
|
12
12
|
function O(r, t) {
|
|
13
13
|
if (typeof WeakMap == "function") var e = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap();
|
|
@@ -23,14 +23,14 @@ function A() {
|
|
|
23
23
|
return c;
|
|
24
24
|
})(r, t);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function y() {
|
|
27
|
+
return y = Object.assign ? Object.assign.bind() : function(r) {
|
|
28
28
|
for (var t = 1; t < arguments.length; t++) {
|
|
29
29
|
var e = arguments[t];
|
|
30
30
|
for (var s in e) ({}).hasOwnProperty.call(e, s) && (r[s] = e[s]);
|
|
31
31
|
}
|
|
32
32
|
return r;
|
|
33
|
-
},
|
|
33
|
+
}, y.apply(null, arguments);
|
|
34
34
|
}
|
|
35
35
|
function E(r, t) {
|
|
36
36
|
if (r == null) return {};
|
|
@@ -94,8 +94,8 @@ function A() {
|
|
|
94
94
|
const s = this.props, n = s.minConstraints, a = s.maxConstraints, l = s.lockAspectRatio;
|
|
95
95
|
if (!n && !a && !l) return [t, e];
|
|
96
96
|
if (l) {
|
|
97
|
-
const h = this.props.width / this.props.height, z = t - this.props.width,
|
|
98
|
-
Math.abs(z) > Math.abs(
|
|
97
|
+
const h = this.props.width / this.props.height, z = t - this.props.width, R = e - this.props.height;
|
|
98
|
+
Math.abs(z) > Math.abs(R * h) ? e = t / h : t = e * h;
|
|
99
99
|
}
|
|
100
100
|
const i = t, c = e;
|
|
101
101
|
let o = this.slack || [0, 0], p = o[0], u = o[1];
|
|
@@ -114,18 +114,18 @@ function A() {
|
|
|
114
114
|
t === "onResizeStart" && this.resetData();
|
|
115
115
|
const h = (this.props.axis === "both" || this.props.axis === "x") && e !== "n" && e !== "s", z = (this.props.axis === "both" || this.props.axis === "y") && e !== "e" && e !== "w";
|
|
116
116
|
if (!h && !z) return;
|
|
117
|
-
const
|
|
117
|
+
const R = e[0], j = e[e.length - 1], _ = o.getBoundingClientRect();
|
|
118
118
|
if (this.lastHandleRect != null) {
|
|
119
119
|
if (j === "w") {
|
|
120
120
|
const v = _.left - this.lastHandleRect.left;
|
|
121
121
|
p += v;
|
|
122
122
|
}
|
|
123
|
-
if (
|
|
123
|
+
if (R === "n") {
|
|
124
124
|
const v = _.top - this.lastHandleRect.top;
|
|
125
125
|
u += v;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
this.lastHandleRect = _, j === "w" && (p = -p),
|
|
128
|
+
this.lastHandleRect = _, j === "w" && (p = -p), R === "n" && (u = -u);
|
|
129
129
|
const H = (a = (l = this.lastSize) == null ? void 0 : l.width) != null ? a : this.props.width, C = (i = (c = this.lastSize) == null ? void 0 : c.height) != null ? i : this.props.height;
|
|
130
130
|
let d = H + (h ? p / this.props.transformScale : 0), m = C + (z ? u / this.props.transformScale : 0);
|
|
131
131
|
var k = this.runConstraints(d, m);
|
|
@@ -178,7 +178,7 @@ function A() {
|
|
|
178
178
|
children: [...f.Children.toArray(e.props.children), ...a.map((i) => {
|
|
179
179
|
var c;
|
|
180
180
|
const o = (c = this.handleRefs[i]) != null ? c : this.handleRefs[i] = /* @__PURE__ */ f.createRef();
|
|
181
|
-
return /* @__PURE__ */ f.createElement(
|
|
181
|
+
return /* @__PURE__ */ f.createElement($.DraggableCore, y({}, n, {
|
|
182
182
|
nodeRef: o,
|
|
183
183
|
key: "resizableHandle-" + i,
|
|
184
184
|
onStop: this.resizeHandler("onResizeStop", i),
|