@m4l/components 0.1.92 → 0.1.93
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/@types/export.d.ts +12 -15
- package/components/AccountPopover/AccountPopover.d.ts +2 -1
- package/components/AccountPopover/{index.eebea1c5.js → index.2ef0bf6d.js} +20 -31
- package/components/AccountPopover/index.d.ts +0 -1
- package/components/AccountPopover/subcomponents/PopOver/types.d.ts +4 -3
- package/components/AccountPopover/types.d.ts +50 -26
- package/components/AppBar/{index.90cceb7d.js → index.16fe42a1.js} +3 -22
- package/components/CommonActions/components/ActionCancel/{index.54588e5b.js → index.c3e23ad4.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.7907e6f4.js → index.6da52418.js} +4 -34
- package/components/CommonActions/components/ActionFormIntro/{index.f7cd515b.js → index.c3af6d1d.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.f20cffae.js → index.49631fcb.js} +2 -2
- package/components/CommonActions/components/Actions/{index.7a196c44.js → index.ccf731c1.js} +2 -38
- package/components/DataGrid/classes/index.d.ts +1 -0
- package/components/DataGrid/classes/types.d.ts +1 -0
- package/components/DataGrid/formatters/columnConcatenatedValueFormatter/index.d.ts +2 -2
- package/components/DataGrid/{index.95cea2ca.js → index.abedf2c0.js} +44 -14
- package/components/DataGrid/subcomponents/Actions/{index.5b0b1fbf.js → index.c8408b73.js} +9 -38
- package/components/DraggableWindow/{index.c702d3f2.js → index.8f423ed7.js} +1 -1
- package/components/DynamicFilter/{index.e9192ebd.js → index.cb1402aa.js} +23 -56
- package/components/DynamicFilter/index.d.ts +1 -1
- package/components/GridLayout/classes/index.d.ts +1 -1
- package/components/GridLayout/{index.5e43414d.js → index.1421f0d4.js} +7 -7
- package/components/GridLayout/subcomponents/Griditem/{index.d6f326d2.js → index.b2342897.js} +4 -4
- package/components/GridLayout/subcomponents/Responsive/{index.d41e31ca.js → index.f459804c.js} +2 -2
- package/components/HelperText/{index.191348cc.js → index.7d2afdb3.js} +2 -23
- package/components/Icon/{index.a70c4729.js → index.3211023d.js} +8 -6
- package/components/Image/{index.c18ebf5a.js → index.611cd930.js} +43 -14
- package/components/LanguagePopover/{index.a74f2065.js → index.b6dc03d0.js} +4 -20
- package/components/LinearProgressIndeterminate/{index.60dabc06.js → index.c46da124.js} +1 -1
- package/components/LoadingError/LoadingError.d.ts +3 -0
- package/components/LoadingError/classes/constants.d.ts +1 -0
- package/components/LoadingError/classes/index.d.ts +14 -0
- package/components/LoadingError/classes/types.d.ts +14 -0
- package/components/LoadingError/dictionary.d.ts +1 -0
- package/components/LoadingError/index.96bdc803.js +106 -0
- package/components/LoadingError/index.d.ts +2 -0
- package/components/LoadingError/types.d.ts +10 -0
- package/components/MFLoader/classes/constants.d.ts +1 -0
- package/components/MFLoader/classes/index.d.ts +7 -0
- package/components/MFLoader/classes/types.d.ts +7 -0
- package/components/MFLoader/dictionary.d.ts +1 -0
- package/components/MFLoader/index.caee87dd.js +296 -0
- package/components/MFLoader/index.d.ts +2 -0
- package/components/MFLoader/types.d.ts +7 -0
- package/components/ModalDialog/{index.99745527.js → index.ec55087e.js} +5 -5
- package/components/NavLink/{index.f12bba32.js → index.b75c91e1.js} +2 -22
- package/components/NoItemSelected/{index.1eaf72d8.js → index.3e29c208.js} +1 -1
- package/components/ObjectLogs/{index.9bbac2a0.js → index.38fd657f.js} +12 -38
- package/components/Page/index.c4642a29.js +127 -0
- package/components/PaperForm/{index.e02c772c.js → index.cce9ed39.js} +1 -1
- package/components/Period/{index.ebd5e3b7.js → index.c35c6a6c.js} +5 -37
- package/components/PrintingSystem/PrintingSystem.d.ts +3 -0
- package/components/PrintingSystem/classes/constants.d.ts +1 -0
- package/components/PrintingSystem/classes/index.d.ts +32 -0
- package/components/PrintingSystem/classes/types.d.ts +33 -0
- package/components/PrintingSystem/index.d.ts +2 -0
- package/components/PrintingSystem/index.e18a2fa8.js +634 -0
- package/components/PrintingSystem/subcomponents/BodyNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/BodyNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/ChartNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/ChartNode/types.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/DividerNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/DividerNode/types.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/FooterNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/FooterNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/GridNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/GridNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/HeaderNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/HeaderNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/ImageNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/ImageNode/types.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PageNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PageNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/Pager/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/Pager/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/PaperNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PaperNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/PropertyValueNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PropertyValueNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/SectionNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/SectionNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/TextBoxNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/TextBoxNode/types.d.ts +3 -0
- package/components/PrintingSystem/types.d.ts +214 -0
- package/components/PrintingSystem/utils/FactoryRender/index.d.ts +3 -0
- package/components/PrintingSystem/utils/FactoryRender/types.d.ts +4 -0
- package/components/PrintingSystem/utils/PageRender/index.d.ts +3 -0
- package/components/PrintingSystem/utils/PageRender/types.d.ts +13 -0
- package/components/PrintingSystem/utils/getEvalValue/index.d.ts +1 -0
- package/components/PrintingSystem/utils/getSize/index.d.ts +1 -0
- package/components/PropertyValue/classes/index.d.ts +3 -2
- package/components/PropertyValue/classes/types.d.ts +2 -0
- package/components/PropertyValue/{index.76fa6a12.js → index.3ee95452.js} +25 -9
- package/components/PropertyValue/types.d.ts +4 -0
- package/components/Resizeable/{index.676c96fe.js → index.8c53c1fa.js} +1 -1
- package/components/SideBar/{index.2dfc5445.js → index.5fd648d2.js} +44 -39
- package/components/animate/{index.4e9774a6.js → index.5d4575bc.js} +2 -6
- package/components/areas/components/AreasAdmin/{index.cd054608.js → index.ddb384a1.js} +29 -62
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/types.d.ts +2 -8
- package/components/areas/components/AreasViewer/{index.62abf0bb.js → index.625bf23b.js} +68 -437
- package/components/areas/components/index.558684b3.js +1 -0
- package/components/areas/components/index.d.ts +0 -1
- package/components/areas/contexts/AreasContext/{index.d528f6e7.js → index.646f3c8f.js} +9 -7
- package/components/areas/contexts/index.24025b97.js +1 -0
- package/components/areas/contexts/index.d.ts +1 -0
- package/components/areas/hooks/index.d9dc1e21.js +1 -0
- package/components/areas/hooks/useAreas/{index.d417e4b2.js → index.ee66240b.js} +1 -1
- package/components/areas/index.4cc6a221.js +22 -0
- package/components/areas/index.d.ts +1 -1
- package/components/formatters/BooleanFormatter/{index.a013b080.js → index.3c2df7a8.js} +10 -4
- package/components/formatters/FormatterRoot/index.d.ts +3 -0
- package/components/formatters/FormatterRoot/types.d.ts +4 -0
- package/components/formatters/classes/index.d.ts +4 -0
- package/components/formatters/classes/types.d.ts +6 -0
- package/components/formatters/constants.d.ts +1 -0
- package/components/formatters/{index.576922c9.js → index.dc77adb7.js} +25 -8
- package/components/hook-form/RHFAutocomplete/{index.29a4c62c.js → index.52387f0f.js} +7 -22
- package/components/hook-form/RHFAutocompleteAsync/{index.647c3f9c.js → index.638bd2ae.js} +3 -2
- package/components/hook-form/RHFCheckbox/{index.0b89ea5c.js → index.a38715e3.js} +2 -22
- package/components/hook-form/RHFDateTime/{index.1adc88ad.js → index.66e334b0.js} +23 -23
- package/components/hook-form/RHFPeriod/{index.a4476d23.js → index.23099265.js} +2 -2
- package/components/hook-form/RHFTextField/{index.a1a240b1.js → index.25b3627e.js} +6 -8
- package/components/hook-form/RHFUpload/{index.a4582341.js → index.65588e08.js} +5 -22
- package/components/index.d.ts +3 -0
- package/components/modal/{WindowBase.a4752aa1.js → WindowBase.161ec78a.js} +5 -37
- package/components/modal/{WindowConfirm.7a9c12c0.js → WindowConfirm.7eed7c35.js} +8 -40
- package/components/modal/{index.b434146b.js → index.61389369.js} +0 -37
- package/components/mui_extended/Accordion/{index.cdedddba.js → index.92aae1a4.js} +4 -4
- package/components/mui_extended/Button/{index.f79eb74e.js → index.94fec33c.js} +3 -3
- package/components/mui_extended/{CheckBox.38abccd8.js → CheckBox.e662d20c.js} +1 -1
- package/components/mui_extended/IconButton/{index.76624519.js → index.53cd6388.js} +2 -2
- package/components/mui_extended/MenuActions/{index.7669b8af.js → index.dd9f65a2.js} +5 -19
- package/components/mui_extended/Pager/{index.ac2a21f0.js → index.de0bd62c.js} +2 -2
- package/components/mui_extended/Tab/{index.5f09e16a.js → index.1fcabba2.js} +2 -2
- package/components/mui_extended/index.b606cd9d.js +1 -0
- package/contexts/ModalContext/{index.347f6738.js → index.436c2938.js} +1 -1
- package/contexts/RHFormContext/classes/index.d.ts +1 -1
- package/hooks/useFormAddEdit/{index.e8e7f758.js → index.3584a29f.js} +2 -26
- package/hooks/useModal/{index.fa6dfaa1.js → index.05d1821e.js} +1 -1
- package/index.js +196 -187
- package/node_modules.b55d04d9.js +15267 -0
- package/package.json +5 -1
- package/react-data-grid.d46d625e.js +2 -2
- package/react-draggable.e4725f3a.js +630 -0
- package/{react-resizable.ba08699a.js → react-resizable.c07d63fb.js} +2 -2
- package/utils/{index.c43a95f4.js → index.6469f148.js} +75 -107
- package/vendor.71883626.js +104 -0
- package/components/Page/index.4237c241.js +0 -27
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/types.d.ts +0 -8
- package/components/areas/components/AreasViewer/subcomponents/AreasLoadingError/index.d.ts +0 -3
- package/components/areas/components/AreasViewer/subcomponents/AreasLoadingError/types.d.ts +0 -5
- package/components/areas/components/index.ea2f9914.js +0 -31
- package/components/areas/contexts/index.6e9bbc64.js +0 -2
- package/components/areas/hooks/index.0184c6f7.js +0 -4
- package/components/areas/index.8d6d8969.js +0 -54
- package/components/mui_extended/index.fe189e7d.js +0 -24
- package/node_modules.d73a220d.js +0 -363
- package/react-draggable.7abb5d0a.js +0 -962
- package/vendor.e14dec76.js +0 -128
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/index.d.ts → MFLoader/MFLoader.d.ts} +0 -0
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader → MFLoader}/helper.d.ts +0 -0
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader → MFLoader}/subcomponents/ProggessLoadingMF/index.d.ts +0 -0
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader → MFLoader}/subcomponents/ProggessLoadingMF/types.d.ts +0 -0
- package/components/mui_extended/Badge/{index.b09524fe.js → index.09f5aee5.js} +1 -1
- package/components/mui_extended/Popover/{index.9f35d0eb.js → index.b3eca6b1.js} +2 -2
- package/components/mui_extended/Tooltip/{index.5a795dcd.js → index.24a2bc3f.js} +1 -1
- package/components/mui_extended/Typography/{index.443590d6.js → index.379dd374.js} +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.93",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@emotion/react": "^11.9.0",
|
|
@@ -12,13 +12,17 @@
|
|
|
12
12
|
"@mui/lab": "5.0.0-alpha.89",
|
|
13
13
|
"@mui/material": "5.10.4",
|
|
14
14
|
"@mui/x-date-pickers": "6.11.1",
|
|
15
|
+
"chart.js": "^4.4.0",
|
|
16
|
+
"chartjs-chart-error-bars": "^4.3.3",
|
|
15
17
|
"fast-equals": "^5.0.1",
|
|
16
18
|
"immer": "^9.0.21",
|
|
17
19
|
"install": "^0.13.0",
|
|
18
20
|
"lodash.clonedeep": "^4.5.0",
|
|
19
21
|
"lodash.debounce": "^4.0.8",
|
|
22
|
+
"jwt-decode": "^4.0.0",
|
|
20
23
|
"lodash.throttle": "^4.1.1",
|
|
21
24
|
"npm": "^9.6.2",
|
|
25
|
+
"react-chartjs-2": "^5.2.0",
|
|
22
26
|
"react-dnd": "^16.0.1",
|
|
23
27
|
"react-dnd-html5-backend": "^16.0.1",
|
|
24
28
|
"react-helmet-async": "^1.3.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { forwardRef, createContext,
|
|
1
|
+
import { forwardRef, createContext, useState, useRef, useMemo, useImperativeHandle, useCallback, useEffect, useLayoutEffect as useLayoutEffect$1, useContext, memo } from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import {
|
|
3
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
4
4
|
function styleInject(css, ref) {
|
|
5
5
|
if (ref === void 0)
|
|
6
6
|
ref = {};
|
|
@@ -0,0 +1,630 @@
|
|
|
1
|
+
import React__default from "react";
|
|
2
|
+
import require$$1 from "prop-types";
|
|
3
|
+
import require$$2 from "react-dom";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { d as domFns, s as shims, l as log, p as positionFns } from "./utils/index.6469f148.js";
|
|
6
|
+
var cjs = { exports: {} };
|
|
7
|
+
var Draggable$1 = {};
|
|
8
|
+
var DraggableCore$2 = {};
|
|
9
|
+
Object.defineProperty(DraggableCore$2, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
DraggableCore$2.default = void 0;
|
|
13
|
+
var React = _interopRequireWildcard(React__default);
|
|
14
|
+
var _propTypes = _interopRequireDefault(require$$1);
|
|
15
|
+
var _reactDom = _interopRequireDefault(require$$2);
|
|
16
|
+
var _domFns = domFns;
|
|
17
|
+
var _positionFns = positionFns;
|
|
18
|
+
var _shims = shims;
|
|
19
|
+
var _log = _interopRequireDefault(log);
|
|
20
|
+
function _interopRequireDefault(obj) {
|
|
21
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
22
|
+
}
|
|
23
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
24
|
+
if (typeof WeakMap !== "function")
|
|
25
|
+
return null;
|
|
26
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
27
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
28
|
+
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
29
|
+
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
30
|
+
})(nodeInterop);
|
|
31
|
+
}
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
33
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
34
|
+
return obj;
|
|
35
|
+
}
|
|
36
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
37
|
+
return { default: obj };
|
|
38
|
+
}
|
|
39
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
40
|
+
if (cache && cache.has(obj)) {
|
|
41
|
+
return cache.get(obj);
|
|
42
|
+
}
|
|
43
|
+
var newObj = {};
|
|
44
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
45
|
+
for (var key in obj) {
|
|
46
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
47
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
48
|
+
if (desc && (desc.get || desc.set)) {
|
|
49
|
+
Object.defineProperty(newObj, key, desc);
|
|
50
|
+
} else {
|
|
51
|
+
newObj[key] = obj[key];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
newObj.default = obj;
|
|
56
|
+
if (cache) {
|
|
57
|
+
cache.set(obj, newObj);
|
|
58
|
+
}
|
|
59
|
+
return newObj;
|
|
60
|
+
}
|
|
61
|
+
function _defineProperty(obj, key, value) {
|
|
62
|
+
key = _toPropertyKey(key);
|
|
63
|
+
if (key in obj) {
|
|
64
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
65
|
+
} else {
|
|
66
|
+
obj[key] = value;
|
|
67
|
+
}
|
|
68
|
+
return obj;
|
|
69
|
+
}
|
|
70
|
+
function _toPropertyKey(arg) {
|
|
71
|
+
var key = _toPrimitive(arg, "string");
|
|
72
|
+
return typeof key === "symbol" ? key : String(key);
|
|
73
|
+
}
|
|
74
|
+
function _toPrimitive(input, hint) {
|
|
75
|
+
if (typeof input !== "object" || input === null)
|
|
76
|
+
return input;
|
|
77
|
+
var prim = input[Symbol.toPrimitive];
|
|
78
|
+
if (prim !== void 0) {
|
|
79
|
+
var res = prim.call(input, hint || "default");
|
|
80
|
+
if (typeof res !== "object")
|
|
81
|
+
return res;
|
|
82
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
83
|
+
}
|
|
84
|
+
return (hint === "string" ? String : Number)(input);
|
|
85
|
+
}
|
|
86
|
+
const eventsFor = {
|
|
87
|
+
touch: {
|
|
88
|
+
start: "touchstart",
|
|
89
|
+
move: "touchmove",
|
|
90
|
+
stop: "touchend"
|
|
91
|
+
},
|
|
92
|
+
mouse: {
|
|
93
|
+
start: "mousedown",
|
|
94
|
+
move: "mousemove",
|
|
95
|
+
stop: "mouseup"
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
let dragEventFor = eventsFor.mouse;
|
|
99
|
+
class DraggableCore$1 extends React.Component {
|
|
100
|
+
constructor() {
|
|
101
|
+
super(...arguments);
|
|
102
|
+
_defineProperty(this, "dragging", false);
|
|
103
|
+
_defineProperty(this, "lastX", NaN);
|
|
104
|
+
_defineProperty(this, "lastY", NaN);
|
|
105
|
+
_defineProperty(this, "touchIdentifier", null);
|
|
106
|
+
_defineProperty(this, "mounted", false);
|
|
107
|
+
_defineProperty(this, "handleDragStart", (e) => {
|
|
108
|
+
this.props.onMouseDown(e);
|
|
109
|
+
if (!this.props.allowAnyClick && typeof e.button === "number" && e.button !== 0)
|
|
110
|
+
return false;
|
|
111
|
+
const thisNode = this.findDOMNode();
|
|
112
|
+
if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {
|
|
113
|
+
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
114
|
+
}
|
|
115
|
+
const {
|
|
116
|
+
ownerDocument
|
|
117
|
+
} = thisNode;
|
|
118
|
+
if (this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, this.props.handle, thisNode) || this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, this.props.cancel, thisNode)) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (e.type === "touchstart")
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
const touchIdentifier = (0, _domFns.getTouchIdentifier)(e);
|
|
124
|
+
this.touchIdentifier = touchIdentifier;
|
|
125
|
+
const position = (0, _positionFns.getControlPosition)(e, touchIdentifier, this);
|
|
126
|
+
if (position == null)
|
|
127
|
+
return;
|
|
128
|
+
const {
|
|
129
|
+
x,
|
|
130
|
+
y
|
|
131
|
+
} = position;
|
|
132
|
+
const coreEvent = (0, _positionFns.createCoreData)(this, x, y);
|
|
133
|
+
(0, _log.default)("DraggableCore: handleDragStart: %j", coreEvent);
|
|
134
|
+
(0, _log.default)("calling", this.props.onStart);
|
|
135
|
+
const shouldUpdate = this.props.onStart(e, coreEvent);
|
|
136
|
+
if (shouldUpdate === false || this.mounted === false)
|
|
137
|
+
return;
|
|
138
|
+
if (this.props.enableUserSelectHack)
|
|
139
|
+
(0, _domFns.addUserSelectStyles)(ownerDocument);
|
|
140
|
+
this.dragging = true;
|
|
141
|
+
this.lastX = x;
|
|
142
|
+
this.lastY = y;
|
|
143
|
+
(0, _domFns.addEvent)(ownerDocument, dragEventFor.move, this.handleDrag);
|
|
144
|
+
(0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, this.handleDragStop);
|
|
145
|
+
});
|
|
146
|
+
_defineProperty(this, "handleDrag", (e) => {
|
|
147
|
+
const position = (0, _positionFns.getControlPosition)(e, this.touchIdentifier, this);
|
|
148
|
+
if (position == null)
|
|
149
|
+
return;
|
|
150
|
+
let {
|
|
151
|
+
x,
|
|
152
|
+
y
|
|
153
|
+
} = position;
|
|
154
|
+
if (Array.isArray(this.props.grid)) {
|
|
155
|
+
let deltaX = x - this.lastX, deltaY = y - this.lastY;
|
|
156
|
+
[deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);
|
|
157
|
+
if (!deltaX && !deltaY)
|
|
158
|
+
return;
|
|
159
|
+
x = this.lastX + deltaX, y = this.lastY + deltaY;
|
|
160
|
+
}
|
|
161
|
+
const coreEvent = (0, _positionFns.createCoreData)(this, x, y);
|
|
162
|
+
(0, _log.default)("DraggableCore: handleDrag: %j", coreEvent);
|
|
163
|
+
const shouldUpdate = this.props.onDrag(e, coreEvent);
|
|
164
|
+
if (shouldUpdate === false || this.mounted === false) {
|
|
165
|
+
try {
|
|
166
|
+
this.handleDragStop(new MouseEvent("mouseup"));
|
|
167
|
+
} catch (err) {
|
|
168
|
+
const event = document.createEvent("MouseEvents");
|
|
169
|
+
event.initMouseEvent("mouseup", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
|
170
|
+
this.handleDragStop(event);
|
|
171
|
+
}
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
this.lastX = x;
|
|
175
|
+
this.lastY = y;
|
|
176
|
+
});
|
|
177
|
+
_defineProperty(this, "handleDragStop", (e) => {
|
|
178
|
+
if (!this.dragging)
|
|
179
|
+
return;
|
|
180
|
+
const position = (0, _positionFns.getControlPosition)(e, this.touchIdentifier, this);
|
|
181
|
+
if (position == null)
|
|
182
|
+
return;
|
|
183
|
+
let {
|
|
184
|
+
x,
|
|
185
|
+
y
|
|
186
|
+
} = position;
|
|
187
|
+
if (Array.isArray(this.props.grid)) {
|
|
188
|
+
let deltaX = x - this.lastX || 0;
|
|
189
|
+
let deltaY = y - this.lastY || 0;
|
|
190
|
+
[deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);
|
|
191
|
+
x = this.lastX + deltaX, y = this.lastY + deltaY;
|
|
192
|
+
}
|
|
193
|
+
const coreEvent = (0, _positionFns.createCoreData)(this, x, y);
|
|
194
|
+
const shouldContinue = this.props.onStop(e, coreEvent);
|
|
195
|
+
if (shouldContinue === false || this.mounted === false)
|
|
196
|
+
return false;
|
|
197
|
+
const thisNode = this.findDOMNode();
|
|
198
|
+
if (thisNode) {
|
|
199
|
+
if (this.props.enableUserSelectHack)
|
|
200
|
+
(0, _domFns.removeUserSelectStyles)(thisNode.ownerDocument);
|
|
201
|
+
}
|
|
202
|
+
(0, _log.default)("DraggableCore: handleDragStop: %j", coreEvent);
|
|
203
|
+
this.dragging = false;
|
|
204
|
+
this.lastX = NaN;
|
|
205
|
+
this.lastY = NaN;
|
|
206
|
+
if (thisNode) {
|
|
207
|
+
(0, _log.default)("DraggableCore: Removing handlers");
|
|
208
|
+
(0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);
|
|
209
|
+
(0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
_defineProperty(this, "onMouseDown", (e) => {
|
|
213
|
+
dragEventFor = eventsFor.mouse;
|
|
214
|
+
return this.handleDragStart(e);
|
|
215
|
+
});
|
|
216
|
+
_defineProperty(this, "onMouseUp", (e) => {
|
|
217
|
+
dragEventFor = eventsFor.mouse;
|
|
218
|
+
return this.handleDragStop(e);
|
|
219
|
+
});
|
|
220
|
+
_defineProperty(this, "onTouchStart", (e) => {
|
|
221
|
+
dragEventFor = eventsFor.touch;
|
|
222
|
+
return this.handleDragStart(e);
|
|
223
|
+
});
|
|
224
|
+
_defineProperty(this, "onTouchEnd", (e) => {
|
|
225
|
+
dragEventFor = eventsFor.touch;
|
|
226
|
+
return this.handleDragStop(e);
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
componentDidMount() {
|
|
230
|
+
this.mounted = true;
|
|
231
|
+
const thisNode = this.findDOMNode();
|
|
232
|
+
if (thisNode) {
|
|
233
|
+
(0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
|
|
234
|
+
passive: false
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
componentWillUnmount() {
|
|
239
|
+
this.mounted = false;
|
|
240
|
+
const thisNode = this.findDOMNode();
|
|
241
|
+
if (thisNode) {
|
|
242
|
+
const {
|
|
243
|
+
ownerDocument
|
|
244
|
+
} = thisNode;
|
|
245
|
+
(0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag);
|
|
246
|
+
(0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag);
|
|
247
|
+
(0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);
|
|
248
|
+
(0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop);
|
|
249
|
+
(0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
|
|
250
|
+
passive: false
|
|
251
|
+
});
|
|
252
|
+
if (this.props.enableUserSelectHack)
|
|
253
|
+
(0, _domFns.removeUserSelectStyles)(ownerDocument);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
findDOMNode() {
|
|
257
|
+
var _this$props, _this$props2;
|
|
258
|
+
return (_this$props = this.props) !== null && _this$props !== void 0 && _this$props.nodeRef ? (_this$props2 = this.props) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.nodeRef) === null || _this$props2 === void 0 ? void 0 : _this$props2.current : _reactDom.default.findDOMNode(this);
|
|
259
|
+
}
|
|
260
|
+
render() {
|
|
261
|
+
return /* @__PURE__ */ React.cloneElement(React.Children.only(this.props.children), {
|
|
262
|
+
onMouseDown: this.onMouseDown,
|
|
263
|
+
onMouseUp: this.onMouseUp,
|
|
264
|
+
onTouchEnd: this.onTouchEnd
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
DraggableCore$2.default = DraggableCore$1;
|
|
269
|
+
_defineProperty(DraggableCore$1, "displayName", "DraggableCore");
|
|
270
|
+
_defineProperty(DraggableCore$1, "propTypes", {
|
|
271
|
+
allowAnyClick: _propTypes.default.bool,
|
|
272
|
+
children: _propTypes.default.node.isRequired,
|
|
273
|
+
disabled: _propTypes.default.bool,
|
|
274
|
+
enableUserSelectHack: _propTypes.default.bool,
|
|
275
|
+
offsetParent: function(props, propName) {
|
|
276
|
+
if (props[propName] && props[propName].nodeType !== 1) {
|
|
277
|
+
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
grid: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
281
|
+
handle: _propTypes.default.string,
|
|
282
|
+
cancel: _propTypes.default.string,
|
|
283
|
+
nodeRef: _propTypes.default.object,
|
|
284
|
+
onStart: _propTypes.default.func,
|
|
285
|
+
onDrag: _propTypes.default.func,
|
|
286
|
+
onStop: _propTypes.default.func,
|
|
287
|
+
onMouseDown: _propTypes.default.func,
|
|
288
|
+
scale: _propTypes.default.number,
|
|
289
|
+
className: _shims.dontSetMe,
|
|
290
|
+
style: _shims.dontSetMe,
|
|
291
|
+
transform: _shims.dontSetMe
|
|
292
|
+
});
|
|
293
|
+
_defineProperty(DraggableCore$1, "defaultProps", {
|
|
294
|
+
allowAnyClick: false,
|
|
295
|
+
disabled: false,
|
|
296
|
+
enableUserSelectHack: true,
|
|
297
|
+
onStart: function() {
|
|
298
|
+
},
|
|
299
|
+
onDrag: function() {
|
|
300
|
+
},
|
|
301
|
+
onStop: function() {
|
|
302
|
+
},
|
|
303
|
+
onMouseDown: function() {
|
|
304
|
+
},
|
|
305
|
+
scale: 1
|
|
306
|
+
});
|
|
307
|
+
(function(exports) {
|
|
308
|
+
Object.defineProperty(exports, "__esModule", {
|
|
309
|
+
value: true
|
|
310
|
+
});
|
|
311
|
+
Object.defineProperty(exports, "DraggableCore", {
|
|
312
|
+
enumerable: true,
|
|
313
|
+
get: function() {
|
|
314
|
+
return _DraggableCore.default;
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
exports.default = void 0;
|
|
318
|
+
var React2 = _interopRequireWildcard2(React__default);
|
|
319
|
+
var _propTypes2 = _interopRequireDefault2(require$$1);
|
|
320
|
+
var _reactDom2 = _interopRequireDefault2(require$$2);
|
|
321
|
+
var _clsx = _interopRequireDefault2(clsx);
|
|
322
|
+
var _domFns2 = domFns;
|
|
323
|
+
var _positionFns2 = positionFns;
|
|
324
|
+
var _shims2 = shims;
|
|
325
|
+
var _DraggableCore = _interopRequireDefault2(DraggableCore$2);
|
|
326
|
+
var _log2 = _interopRequireDefault2(log);
|
|
327
|
+
function _interopRequireDefault2(obj) {
|
|
328
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
329
|
+
}
|
|
330
|
+
function _getRequireWildcardCache2(nodeInterop) {
|
|
331
|
+
if (typeof WeakMap !== "function")
|
|
332
|
+
return null;
|
|
333
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
334
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
335
|
+
return (_getRequireWildcardCache2 = function(nodeInterop2) {
|
|
336
|
+
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
337
|
+
})(nodeInterop);
|
|
338
|
+
}
|
|
339
|
+
function _interopRequireWildcard2(obj, nodeInterop) {
|
|
340
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
341
|
+
return obj;
|
|
342
|
+
}
|
|
343
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
344
|
+
return { default: obj };
|
|
345
|
+
}
|
|
346
|
+
var cache = _getRequireWildcardCache2(nodeInterop);
|
|
347
|
+
if (cache && cache.has(obj)) {
|
|
348
|
+
return cache.get(obj);
|
|
349
|
+
}
|
|
350
|
+
var newObj = {};
|
|
351
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
352
|
+
for (var key in obj) {
|
|
353
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
354
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
355
|
+
if (desc && (desc.get || desc.set)) {
|
|
356
|
+
Object.defineProperty(newObj, key, desc);
|
|
357
|
+
} else {
|
|
358
|
+
newObj[key] = obj[key];
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
newObj.default = obj;
|
|
363
|
+
if (cache) {
|
|
364
|
+
cache.set(obj, newObj);
|
|
365
|
+
}
|
|
366
|
+
return newObj;
|
|
367
|
+
}
|
|
368
|
+
function _extends() {
|
|
369
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
370
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
371
|
+
var source = arguments[i];
|
|
372
|
+
for (var key in source) {
|
|
373
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
374
|
+
target[key] = source[key];
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return target;
|
|
379
|
+
};
|
|
380
|
+
return _extends.apply(this, arguments);
|
|
381
|
+
}
|
|
382
|
+
function _defineProperty2(obj, key, value) {
|
|
383
|
+
key = _toPropertyKey2(key);
|
|
384
|
+
if (key in obj) {
|
|
385
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
386
|
+
} else {
|
|
387
|
+
obj[key] = value;
|
|
388
|
+
}
|
|
389
|
+
return obj;
|
|
390
|
+
}
|
|
391
|
+
function _toPropertyKey2(arg) {
|
|
392
|
+
var key = _toPrimitive2(arg, "string");
|
|
393
|
+
return typeof key === "symbol" ? key : String(key);
|
|
394
|
+
}
|
|
395
|
+
function _toPrimitive2(input, hint) {
|
|
396
|
+
if (typeof input !== "object" || input === null)
|
|
397
|
+
return input;
|
|
398
|
+
var prim = input[Symbol.toPrimitive];
|
|
399
|
+
if (prim !== void 0) {
|
|
400
|
+
var res = prim.call(input, hint || "default");
|
|
401
|
+
if (typeof res !== "object")
|
|
402
|
+
return res;
|
|
403
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
404
|
+
}
|
|
405
|
+
return (hint === "string" ? String : Number)(input);
|
|
406
|
+
}
|
|
407
|
+
class Draggable2 extends React2.Component {
|
|
408
|
+
static getDerivedStateFromProps(_ref, _ref2) {
|
|
409
|
+
let {
|
|
410
|
+
position
|
|
411
|
+
} = _ref;
|
|
412
|
+
let {
|
|
413
|
+
prevPropsPosition
|
|
414
|
+
} = _ref2;
|
|
415
|
+
if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) {
|
|
416
|
+
(0, _log2.default)("Draggable: getDerivedStateFromProps %j", {
|
|
417
|
+
position,
|
|
418
|
+
prevPropsPosition
|
|
419
|
+
});
|
|
420
|
+
return {
|
|
421
|
+
x: position.x,
|
|
422
|
+
y: position.y,
|
|
423
|
+
prevPropsPosition: {
|
|
424
|
+
...position
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
return null;
|
|
429
|
+
}
|
|
430
|
+
constructor(props) {
|
|
431
|
+
super(props);
|
|
432
|
+
_defineProperty2(this, "onDragStart", (e, coreData) => {
|
|
433
|
+
(0, _log2.default)("Draggable: onDragStart: %j", coreData);
|
|
434
|
+
const shouldStart = this.props.onStart(e, (0, _positionFns2.createDraggableData)(this, coreData));
|
|
435
|
+
if (shouldStart === false)
|
|
436
|
+
return false;
|
|
437
|
+
this.setState({
|
|
438
|
+
dragging: true,
|
|
439
|
+
dragged: true
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
_defineProperty2(this, "onDrag", (e, coreData) => {
|
|
443
|
+
if (!this.state.dragging)
|
|
444
|
+
return false;
|
|
445
|
+
(0, _log2.default)("Draggable: onDrag: %j", coreData);
|
|
446
|
+
const uiData = (0, _positionFns2.createDraggableData)(this, coreData);
|
|
447
|
+
const newState = {
|
|
448
|
+
x: uiData.x,
|
|
449
|
+
y: uiData.y,
|
|
450
|
+
slackX: 0,
|
|
451
|
+
slackY: 0
|
|
452
|
+
};
|
|
453
|
+
if (this.props.bounds) {
|
|
454
|
+
const {
|
|
455
|
+
x,
|
|
456
|
+
y
|
|
457
|
+
} = newState;
|
|
458
|
+
newState.x += this.state.slackX;
|
|
459
|
+
newState.y += this.state.slackY;
|
|
460
|
+
const [newStateX, newStateY] = (0, _positionFns2.getBoundPosition)(this, newState.x, newState.y);
|
|
461
|
+
newState.x = newStateX;
|
|
462
|
+
newState.y = newStateY;
|
|
463
|
+
newState.slackX = this.state.slackX + (x - newState.x);
|
|
464
|
+
newState.slackY = this.state.slackY + (y - newState.y);
|
|
465
|
+
uiData.x = newState.x;
|
|
466
|
+
uiData.y = newState.y;
|
|
467
|
+
uiData.deltaX = newState.x - this.state.x;
|
|
468
|
+
uiData.deltaY = newState.y - this.state.y;
|
|
469
|
+
}
|
|
470
|
+
const shouldUpdate = this.props.onDrag(e, uiData);
|
|
471
|
+
if (shouldUpdate === false)
|
|
472
|
+
return false;
|
|
473
|
+
this.setState(newState);
|
|
474
|
+
});
|
|
475
|
+
_defineProperty2(this, "onDragStop", (e, coreData) => {
|
|
476
|
+
if (!this.state.dragging)
|
|
477
|
+
return false;
|
|
478
|
+
const shouldContinue = this.props.onStop(e, (0, _positionFns2.createDraggableData)(this, coreData));
|
|
479
|
+
if (shouldContinue === false)
|
|
480
|
+
return false;
|
|
481
|
+
(0, _log2.default)("Draggable: onDragStop: %j", coreData);
|
|
482
|
+
const newState = {
|
|
483
|
+
dragging: false,
|
|
484
|
+
slackX: 0,
|
|
485
|
+
slackY: 0
|
|
486
|
+
};
|
|
487
|
+
const controlled = Boolean(this.props.position);
|
|
488
|
+
if (controlled) {
|
|
489
|
+
const {
|
|
490
|
+
x,
|
|
491
|
+
y
|
|
492
|
+
} = this.props.position;
|
|
493
|
+
newState.x = x;
|
|
494
|
+
newState.y = y;
|
|
495
|
+
}
|
|
496
|
+
this.setState(newState);
|
|
497
|
+
});
|
|
498
|
+
this.state = {
|
|
499
|
+
dragging: false,
|
|
500
|
+
dragged: false,
|
|
501
|
+
x: props.position ? props.position.x : props.defaultPosition.x,
|
|
502
|
+
y: props.position ? props.position.y : props.defaultPosition.y,
|
|
503
|
+
prevPropsPosition: {
|
|
504
|
+
...props.position
|
|
505
|
+
},
|
|
506
|
+
slackX: 0,
|
|
507
|
+
slackY: 0,
|
|
508
|
+
isElementSVG: false
|
|
509
|
+
};
|
|
510
|
+
if (props.position && !(props.onDrag || props.onStop)) {
|
|
511
|
+
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.");
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
componentDidMount() {
|
|
515
|
+
if (typeof window.SVGElement !== "undefined" && this.findDOMNode() instanceof window.SVGElement) {
|
|
516
|
+
this.setState({
|
|
517
|
+
isElementSVG: true
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
componentWillUnmount() {
|
|
522
|
+
this.setState({
|
|
523
|
+
dragging: false
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
findDOMNode() {
|
|
527
|
+
var _this$props$nodeRef$c, _this$props;
|
|
528
|
+
return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.nodeRef) === null || _this$props === void 0 ? void 0 : _this$props.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : _reactDom2.default.findDOMNode(this);
|
|
529
|
+
}
|
|
530
|
+
render() {
|
|
531
|
+
const {
|
|
532
|
+
axis,
|
|
533
|
+
bounds,
|
|
534
|
+
children,
|
|
535
|
+
defaultPosition,
|
|
536
|
+
defaultClassName,
|
|
537
|
+
defaultClassNameDragging,
|
|
538
|
+
defaultClassNameDragged,
|
|
539
|
+
position,
|
|
540
|
+
positionOffset,
|
|
541
|
+
scale,
|
|
542
|
+
...draggableCoreProps
|
|
543
|
+
} = this.props;
|
|
544
|
+
let style = {};
|
|
545
|
+
let svgTransform = null;
|
|
546
|
+
const controlled = Boolean(position);
|
|
547
|
+
const draggable = !controlled || this.state.dragging;
|
|
548
|
+
const validPosition = position || defaultPosition;
|
|
549
|
+
const transformOpts = {
|
|
550
|
+
x: (0, _positionFns2.canDragX)(this) && draggable ? this.state.x : validPosition.x,
|
|
551
|
+
y: (0, _positionFns2.canDragY)(this) && draggable ? this.state.y : validPosition.y
|
|
552
|
+
};
|
|
553
|
+
if (this.state.isElementSVG) {
|
|
554
|
+
svgTransform = (0, _domFns2.createSVGTransform)(transformOpts, positionOffset);
|
|
555
|
+
} else {
|
|
556
|
+
style = (0, _domFns2.createCSSTransform)(transformOpts, positionOffset);
|
|
557
|
+
}
|
|
558
|
+
const className = (0, _clsx.default)(children.props.className || "", defaultClassName, {
|
|
559
|
+
[defaultClassNameDragging]: this.state.dragging,
|
|
560
|
+
[defaultClassNameDragged]: this.state.dragged
|
|
561
|
+
});
|
|
562
|
+
return /* @__PURE__ */ React2.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, {
|
|
563
|
+
onStart: this.onDragStart,
|
|
564
|
+
onDrag: this.onDrag,
|
|
565
|
+
onStop: this.onDragStop
|
|
566
|
+
}), /* @__PURE__ */ React2.cloneElement(React2.Children.only(children), {
|
|
567
|
+
className,
|
|
568
|
+
style: {
|
|
569
|
+
...children.props.style,
|
|
570
|
+
...style
|
|
571
|
+
},
|
|
572
|
+
transform: svgTransform
|
|
573
|
+
}));
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
exports.default = Draggable2;
|
|
577
|
+
_defineProperty2(Draggable2, "displayName", "Draggable");
|
|
578
|
+
_defineProperty2(Draggable2, "propTypes", {
|
|
579
|
+
..._DraggableCore.default.propTypes,
|
|
580
|
+
axis: _propTypes2.default.oneOf(["both", "x", "y", "none"]),
|
|
581
|
+
bounds: _propTypes2.default.oneOfType([_propTypes2.default.shape({
|
|
582
|
+
left: _propTypes2.default.number,
|
|
583
|
+
right: _propTypes2.default.number,
|
|
584
|
+
top: _propTypes2.default.number,
|
|
585
|
+
bottom: _propTypes2.default.number
|
|
586
|
+
}), _propTypes2.default.string, _propTypes2.default.oneOf([false])]),
|
|
587
|
+
defaultClassName: _propTypes2.default.string,
|
|
588
|
+
defaultClassNameDragging: _propTypes2.default.string,
|
|
589
|
+
defaultClassNameDragged: _propTypes2.default.string,
|
|
590
|
+
defaultPosition: _propTypes2.default.shape({
|
|
591
|
+
x: _propTypes2.default.number,
|
|
592
|
+
y: _propTypes2.default.number
|
|
593
|
+
}),
|
|
594
|
+
positionOffset: _propTypes2.default.shape({
|
|
595
|
+
x: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
|
|
596
|
+
y: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string])
|
|
597
|
+
}),
|
|
598
|
+
position: _propTypes2.default.shape({
|
|
599
|
+
x: _propTypes2.default.number,
|
|
600
|
+
y: _propTypes2.default.number
|
|
601
|
+
}),
|
|
602
|
+
className: _shims2.dontSetMe,
|
|
603
|
+
style: _shims2.dontSetMe,
|
|
604
|
+
transform: _shims2.dontSetMe
|
|
605
|
+
});
|
|
606
|
+
_defineProperty2(Draggable2, "defaultProps", {
|
|
607
|
+
..._DraggableCore.default.defaultProps,
|
|
608
|
+
axis: "both",
|
|
609
|
+
bounds: false,
|
|
610
|
+
defaultClassName: "react-draggable",
|
|
611
|
+
defaultClassNameDragging: "react-draggable-dragging",
|
|
612
|
+
defaultClassNameDragged: "react-draggable-dragged",
|
|
613
|
+
defaultPosition: {
|
|
614
|
+
x: 0,
|
|
615
|
+
y: 0
|
|
616
|
+
},
|
|
617
|
+
scale: 1
|
|
618
|
+
});
|
|
619
|
+
})(Draggable$1);
|
|
620
|
+
const {
|
|
621
|
+
default: Draggable,
|
|
622
|
+
DraggableCore
|
|
623
|
+
} = Draggable$1;
|
|
624
|
+
cjs.exports = Draggable;
|
|
625
|
+
cjs.exports.default = Draggable;
|
|
626
|
+
var DraggableCore_1 = cjs.exports.DraggableCore = DraggableCore;
|
|
627
|
+
export {
|
|
628
|
+
DraggableCore_1 as D,
|
|
629
|
+
cjs as c
|
|
630
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from "react";
|
|
2
|
-
import { c as cjs } from "./react-draggable.
|
|
3
|
-
import { u as utils } from "./utils/index.
|
|
2
|
+
import { c as cjs } from "./react-draggable.e4725f3a.js";
|
|
3
|
+
import { u as utils } from "./utils/index.6469f148.js";
|
|
4
4
|
import require$$1 from "prop-types";
|
|
5
5
|
var reactResizable = { exports: {} };
|
|
6
6
|
var Resizable$2 = {};
|