@m4l/components 0.1.13 → 0.1.15
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/assets/Logo/index.js +91 -0
- package/commonjs.js +9 -0
- package/components/CommonActions/components/ActionCancel/index.js +15 -0
- package/components/CommonActions/components/ActionFormCancel/index.js +62 -0
- package/components/CommonActions/components/ActionFormIntro/index.js +35 -0
- package/components/CommonActions/components/ActionIntro/index.js +16 -0
- package/components/CommonActions/components/Actions/index.js +859 -0
- package/components/CompanyLogo/{index.f81c179c.js → index.js} +48 -42
- package/components/DataGrid/index.js +1067 -0
- package/components/DynamicFilter/index.js +1573 -0
- package/components/ErrorLabel/index.js +18 -0
- package/components/Icon/index.js +80 -0
- package/components/Image/index.js +128 -0
- package/components/LanguagePopover/index.js +93 -0
- package/components/Loadable/index.js +13 -0
- package/components/ModalDialog/index.js +180 -0
- package/components/NoItemSelected/{index.12f0ca67.js → index.js} +50 -43
- package/components/ObjectLogs/index.js +284 -0
- package/components/Page/index.js +36 -0
- package/components/PaperForm/index.js +110 -0
- package/components/Period/index.js +230 -0
- package/components/PropertyValue/index.js +142 -0
- package/components/Resizeable/{index.45995d2b.js → index.js} +19 -21
- package/components/ScrollBar/index.js +52 -0
- package/components/ScrollToTop/index.js +10 -0
- package/components/SplitLayout/{index.4032673d.js → index.js} +35 -35
- package/components/animate/LoadingScreen/{index.f1cec7db.js → index.js} +27 -29
- package/components/animate/MotionContainer/index.js +31 -0
- package/components/animate/MotionLazyContainer/index.js +13 -0
- package/components/animate/features.js +2 -0
- package/components/animate/variants/{bounce.784aaaaa.js → bounce.js} +16 -15
- package/components/animate/variants/container.js +20 -0
- package/components/animate/variants/fade.js +61 -0
- package/components/animate/variants/{index.7a912140.js → index.js} +0 -0
- package/components/animate/variants/transition.js +16 -0
- package/components/formatters/BooleanFormatter/index.js +52 -0
- package/components/formatters/DateFormatter/index.js +66 -0
- package/components/formatters/index.js +112 -0
- package/components/hook-form/FormProvider/index.js +61 -0
- package/components/hook-form/RHFAutocomplete/index.js +144 -0
- package/components/hook-form/RHFAutocompleteAsync/index.js +191 -0
- package/components/hook-form/RHFCheckbox/index.js +65 -0
- package/components/hook-form/RHFDateTime/index.js +79 -0
- package/components/hook-form/RHFMultiCheckbox/index.js +32 -0
- package/components/hook-form/RHFPeriod/index.js +47 -0
- package/components/hook-form/RHFRadioGroup/index.js +41 -0
- package/components/hook-form/RHFSelect/index.js +34 -0
- package/components/hook-form/RHFTextField/index.js +87 -0
- package/components/hook-form/RHFUpload/index.js +255 -0
- package/components/mui_extended/Accordion/index.js +105 -0
- package/components/mui_extended/Avatar/index.js +33 -0
- package/components/mui_extended/BoxIcon/index.js +20 -0
- package/components/mui_extended/Breadcrumbs/index.js +92 -0
- package/components/mui_extended/Button/index.js +131 -0
- package/components/mui_extended/IconButton/index.js +108 -0
- package/components/mui_extended/LinkWithRoute/index.js +30 -0
- package/components/mui_extended/MenuPopover/index.js +135 -0
- package/components/mui_extended/Pager/index.js +137 -0
- package/components/mui_extended/Tab/index.js +30 -0
- package/components/mui_extended/Typography/index.js +21 -0
- package/contexts/ModalContext/index.js +165 -0
- package/hooks/useFormAddEdit/index.js +42 -0
- package/hooks/useModal/index.js +4 -0
- package/index.js +70 -162
- package/lodash.js +62 -0
- package/node_modules.js +54 -0
- package/package.json +2 -1
- package/react-data-grid.js +2652 -0
- package/react-draggable.js +960 -0
- package/react-json-view.js +2764 -0
- package/react-lazy-load-image-component.js +792 -0
- package/react-resizable.js +541 -0
- package/react-splitter-layout.js +165 -0
- package/utils/index.js +572 -0
- package/assets/Logo/index.228dcb5a.js +0 -86
- package/commonjs.565e6834.js +0 -12
- package/components/CommonActions/components/ActionCancel/index.cba1b460.js +0 -17
- package/components/CommonActions/components/ActionFormCancel/index.be2fe891.js +0 -49
- package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +0 -31
- package/components/CommonActions/components/ActionIntro/index.cc4b1e0e.js +0 -18
- package/components/CommonActions/components/Actions/index.e8148d98.js +0 -743
- package/components/DataGrid/index.b688877d.js +0 -894
- package/components/DynamicFilter/index.82ce857e.js +0 -1158
- package/components/ErrorLabel/index.c8615f16.js +0 -19
- package/components/Icon/index.cbca79b0.js +0 -70
- package/components/Image/index.e790b50b.js +0 -122
- package/components/LanguagePopover/index.3d9611cb.js +0 -87
- package/components/Loadable/index.f5518558.js +0 -15
- package/components/ModalDialog/index.3850c053.js +0 -168
- package/components/ObjectLogs/index.27ef875d.js +0 -266
- package/components/Page/index.6d69977e.js +0 -35
- package/components/PaperForm/index.d7c74064.js +0 -105
- package/components/Period/index.5e68286a.js +0 -160
- package/components/PropertyValue/index.ab3dd7e9.js +0 -116
- package/components/ScrollBar/index.39eeb2de.js +0 -49
- package/components/ScrollToTop/index.e06f98f6.js +0 -11
- package/components/animate/MotionContainer/index.8d9f9d80.js +0 -30
- package/components/animate/MotionLazyContainer/index.572dd012.js +0 -15
- package/components/animate/features.0fbf41e1.js +0 -5
- package/components/animate/variants/container.11f82b76.js +0 -20
- package/components/animate/variants/fade.b561c0fc.js +0 -59
- package/components/animate/variants/transition.bd46b9ce.js +0 -15
- package/components/formatters/BooleanFormatter/index.cca53b7f.js +0 -42
- package/components/formatters/DateFormatter/index.ad8d9b8e.js +0 -57
- package/components/formatters/index.55856d65.js +0 -106
- package/components/hook-form/FormProvider/index.257acd9f.js +0 -55
- package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +0 -122
- package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +0 -153
- package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +0 -59
- package/components/hook-form/RHFDateTime/index.fc5cbafe.js +0 -68
- package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +0 -34
- package/components/hook-form/RHFPeriod/index.23c254e9.js +0 -45
- package/components/hook-form/RHFRadioGroup/index.b3335e13.js +0 -43
- package/components/hook-form/RHFSelect/index.b6ca8bb2.js +0 -36
- package/components/hook-form/RHFTextField/index.4c455f75.js +0 -77
- package/components/hook-form/RHFUpload/index.ed3d739f.js +0 -244
- package/components/mui_extended/Accordion/index.2116e423.js +0 -103
- package/components/mui_extended/Avatar/index.0a2a4523.js +0 -32
- package/components/mui_extended/BoxIcon/index.e638ecc8.js +0 -22
- package/components/mui_extended/Breadcrumbs/index.5e37d903.js +0 -89
- package/components/mui_extended/Button/index.84d8898c.js +0 -110
- package/components/mui_extended/IconButton/index.88f3aadb.js +0 -98
- package/components/mui_extended/LinkWithRoute/index.d4b263de.js +0 -28
- package/components/mui_extended/MenuPopover/index.488fc536.js +0 -131
- package/components/mui_extended/Pager/index.0576814f.js +0 -126
- package/components/mui_extended/Tab/index.e0653a0a.js +0 -28
- package/components/mui_extended/Typography/index.0c4604b3.js +0 -22
- package/contexts/ModalContext/index.2188b69e.js +0 -150
- package/hooks/useFormAddEdit/index.d4845f1a.js +0 -26
- package/hooks/useModal/index.6571d2d9.js +0 -6
- package/lodash.e09401f0.js +0 -32
- package/node_modules.168cb897.js +0 -55
- package/react-data-grid.d46d625e.js +0 -2115
- package/react-draggable.20e95c61.js +0 -714
- package/react-json-view.f56a7f8e.js +0 -2762
- package/react-lazy-load-image-component.45b56650.js +0 -784
- package/react-resizable.5277deaf.js +0 -371
- package/react-splitter-layout.7810ac1b.js +0 -165
- package/utils/index.214d9542.js +0 -435
package/utils/index.214d9542.js
DELETED
|
@@ -1,435 +0,0 @@
|
|
|
1
|
-
import B from "react";
|
|
2
|
-
const Pe = function(e, t) {
|
|
3
|
-
t = t.replace(/\[(\w+)\]/g, ".$1"), t = t.replace(/^\./, "");
|
|
4
|
-
let r = e;
|
|
5
|
-
const n = t.split(".");
|
|
6
|
-
for (let a = 0, o = n.length; a < o; ++a) {
|
|
7
|
-
const c = n[a];
|
|
8
|
-
if (c in r)
|
|
9
|
-
r = r[c];
|
|
10
|
-
else
|
|
11
|
-
return e.action.active;
|
|
12
|
-
}
|
|
13
|
-
return r;
|
|
14
|
-
}, Oe = (e) => {
|
|
15
|
-
switch (e) {
|
|
16
|
-
case "warning":
|
|
17
|
-
return "warning";
|
|
18
|
-
case "delete":
|
|
19
|
-
return "error";
|
|
20
|
-
case "info":
|
|
21
|
-
return "info";
|
|
22
|
-
}
|
|
23
|
-
return "primary";
|
|
24
|
-
}, Se = (e, t) => {
|
|
25
|
-
switch (t) {
|
|
26
|
-
case "warning":
|
|
27
|
-
e.palette.warning.main;
|
|
28
|
-
break;
|
|
29
|
-
case "delete":
|
|
30
|
-
e.palette.error.main;
|
|
31
|
-
break;
|
|
32
|
-
case "info":
|
|
33
|
-
e.palette.info.main;
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
return e.palette.text.primary;
|
|
37
|
-
};
|
|
38
|
-
var i = {}, f = {};
|
|
39
|
-
Object.defineProperty(f, "__esModule", {
|
|
40
|
-
value: !0
|
|
41
|
-
});
|
|
42
|
-
f.dontSetMe = $;
|
|
43
|
-
f.findInArray = F;
|
|
44
|
-
f.int = V;
|
|
45
|
-
f.isFunction = j;
|
|
46
|
-
f.isNum = H;
|
|
47
|
-
function F(e, t) {
|
|
48
|
-
for (var r = 0, n = e.length; r < n; r++)
|
|
49
|
-
if (t.apply(t, [e[r], r, e]))
|
|
50
|
-
return e[r];
|
|
51
|
-
}
|
|
52
|
-
function j(e) {
|
|
53
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
54
|
-
}
|
|
55
|
-
function H(e) {
|
|
56
|
-
return typeof e == "number" && !isNaN(e);
|
|
57
|
-
}
|
|
58
|
-
function V(e) {
|
|
59
|
-
return parseInt(e, 10);
|
|
60
|
-
}
|
|
61
|
-
function $(e, t, r) {
|
|
62
|
-
if (e[t])
|
|
63
|
-
return new Error("Invalid prop ".concat(t, " passed to ").concat(r, " - do not set this, set it on the child."));
|
|
64
|
-
}
|
|
65
|
-
var p = {};
|
|
66
|
-
Object.defineProperty(p, "__esModule", {
|
|
67
|
-
value: !0
|
|
68
|
-
});
|
|
69
|
-
p.browserPrefixToKey = C;
|
|
70
|
-
p.browserPrefixToStyle = I;
|
|
71
|
-
p.default = void 0;
|
|
72
|
-
p.getPrefix = E;
|
|
73
|
-
var w = ["Moz", "Webkit", "O", "ms"];
|
|
74
|
-
function E() {
|
|
75
|
-
var e, t, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
|
|
76
|
-
if (typeof window > "u")
|
|
77
|
-
return "";
|
|
78
|
-
var n = (e = window.document) === null || e === void 0 || (t = e.documentElement) === null || t === void 0 ? void 0 : t.style;
|
|
79
|
-
if (!n || r in n)
|
|
80
|
-
return "";
|
|
81
|
-
for (var a = 0; a < w.length; a++)
|
|
82
|
-
if (C(r, w[a]) in n)
|
|
83
|
-
return w[a];
|
|
84
|
-
return "";
|
|
85
|
-
}
|
|
86
|
-
function C(e, t) {
|
|
87
|
-
return t ? "".concat(t).concat(A(e)) : e;
|
|
88
|
-
}
|
|
89
|
-
function I(e, t) {
|
|
90
|
-
return t ? "-".concat(t.toLowerCase(), "-").concat(e) : e;
|
|
91
|
-
}
|
|
92
|
-
function A(e) {
|
|
93
|
-
for (var t = "", r = !0, n = 0; n < e.length; n++)
|
|
94
|
-
r ? (t += e[n].toUpperCase(), r = !1) : e[n] === "-" ? r = !0 : t += e[n];
|
|
95
|
-
return t;
|
|
96
|
-
}
|
|
97
|
-
var U = E();
|
|
98
|
-
p.default = U;
|
|
99
|
-
function b(e) {
|
|
100
|
-
return b = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
101
|
-
return typeof t;
|
|
102
|
-
} : function(t) {
|
|
103
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
104
|
-
}, b(e);
|
|
105
|
-
}
|
|
106
|
-
Object.defineProperty(i, "__esModule", {
|
|
107
|
-
value: !0
|
|
108
|
-
});
|
|
109
|
-
i.addClassName = X;
|
|
110
|
-
i.addEvent = z;
|
|
111
|
-
i.addUserSelectStyles = oe;
|
|
112
|
-
i.createCSSTransform = te;
|
|
113
|
-
i.createSVGTransform = re;
|
|
114
|
-
i.getTouch = ne;
|
|
115
|
-
i.getTouchIdentifier = ae;
|
|
116
|
-
i.getTranslation = P;
|
|
117
|
-
i.innerHeight = Q;
|
|
118
|
-
i.innerWidth = Z;
|
|
119
|
-
i.matchesSelector = W;
|
|
120
|
-
i.matchesSelectorAndParentsTo = K;
|
|
121
|
-
i.offsetXYFromParent = ee;
|
|
122
|
-
i.outerHeight = k;
|
|
123
|
-
i.outerWidth = J;
|
|
124
|
-
i.removeClassName = N;
|
|
125
|
-
i.removeEvent = G;
|
|
126
|
-
i.removeUserSelectStyles = ie;
|
|
127
|
-
var s = f, S = q(p);
|
|
128
|
-
function D(e) {
|
|
129
|
-
if (typeof WeakMap != "function")
|
|
130
|
-
return null;
|
|
131
|
-
var t = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap();
|
|
132
|
-
return (D = function(a) {
|
|
133
|
-
return a ? r : t;
|
|
134
|
-
})(e);
|
|
135
|
-
}
|
|
136
|
-
function q(e, t) {
|
|
137
|
-
if (!t && e && e.__esModule)
|
|
138
|
-
return e;
|
|
139
|
-
if (e === null || b(e) !== "object" && typeof e != "function")
|
|
140
|
-
return { default: e };
|
|
141
|
-
var r = D(t);
|
|
142
|
-
if (r && r.has(e))
|
|
143
|
-
return r.get(e);
|
|
144
|
-
var n = {}, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
145
|
-
for (var o in e)
|
|
146
|
-
if (o !== "default" && Object.prototype.hasOwnProperty.call(e, o)) {
|
|
147
|
-
var c = a ? Object.getOwnPropertyDescriptor(e, o) : null;
|
|
148
|
-
c && (c.get || c.set) ? Object.defineProperty(n, o, c) : n[o] = e[o];
|
|
149
|
-
}
|
|
150
|
-
return n.default = e, r && r.set(e, n), n;
|
|
151
|
-
}
|
|
152
|
-
function T(e, t) {
|
|
153
|
-
var r = Object.keys(e);
|
|
154
|
-
if (Object.getOwnPropertySymbols) {
|
|
155
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
156
|
-
t && (n = n.filter(function(a) {
|
|
157
|
-
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
|
158
|
-
})), r.push.apply(r, n);
|
|
159
|
-
}
|
|
160
|
-
return r;
|
|
161
|
-
}
|
|
162
|
-
function x(e) {
|
|
163
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
164
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
165
|
-
t % 2 ? T(Object(r), !0).forEach(function(n) {
|
|
166
|
-
L(e, n, r[n]);
|
|
167
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : T(Object(r)).forEach(function(n) {
|
|
168
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
return e;
|
|
172
|
-
}
|
|
173
|
-
function L(e, t, r) {
|
|
174
|
-
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
175
|
-
}
|
|
176
|
-
var v = "";
|
|
177
|
-
function W(e, t) {
|
|
178
|
-
return v || (v = (0, s.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(r) {
|
|
179
|
-
return (0, s.isFunction)(e[r]);
|
|
180
|
-
})), (0, s.isFunction)(e[v]) ? e[v](t) : !1;
|
|
181
|
-
}
|
|
182
|
-
function K(e, t, r) {
|
|
183
|
-
var n = e;
|
|
184
|
-
do {
|
|
185
|
-
if (W(n, t))
|
|
186
|
-
return !0;
|
|
187
|
-
if (n === r)
|
|
188
|
-
return !1;
|
|
189
|
-
n = n.parentNode;
|
|
190
|
-
} while (n);
|
|
191
|
-
return !1;
|
|
192
|
-
}
|
|
193
|
-
function z(e, t, r, n) {
|
|
194
|
-
if (!!e) {
|
|
195
|
-
var a = x({
|
|
196
|
-
capture: !0
|
|
197
|
-
}, n);
|
|
198
|
-
e.addEventListener ? e.addEventListener(t, r, a) : e.attachEvent ? e.attachEvent("on" + t, r) : e["on" + t] = r;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
function G(e, t, r, n) {
|
|
202
|
-
if (!!e) {
|
|
203
|
-
var a = x({
|
|
204
|
-
capture: !0
|
|
205
|
-
}, n);
|
|
206
|
-
e.removeEventListener ? e.removeEventListener(t, r, a) : e.detachEvent ? e.detachEvent("on" + t, r) : e["on" + t] = null;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
function k(e) {
|
|
210
|
-
var t = e.clientHeight, r = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
211
|
-
return t += (0, s.int)(r.borderTopWidth), t += (0, s.int)(r.borderBottomWidth), t;
|
|
212
|
-
}
|
|
213
|
-
function J(e) {
|
|
214
|
-
var t = e.clientWidth, r = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
215
|
-
return t += (0, s.int)(r.borderLeftWidth), t += (0, s.int)(r.borderRightWidth), t;
|
|
216
|
-
}
|
|
217
|
-
function Q(e) {
|
|
218
|
-
var t = e.clientHeight, r = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
219
|
-
return t -= (0, s.int)(r.paddingTop), t -= (0, s.int)(r.paddingBottom), t;
|
|
220
|
-
}
|
|
221
|
-
function Z(e) {
|
|
222
|
-
var t = e.clientWidth, r = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
223
|
-
return t -= (0, s.int)(r.paddingLeft), t -= (0, s.int)(r.paddingRight), t;
|
|
224
|
-
}
|
|
225
|
-
function ee(e, t, r) {
|
|
226
|
-
var n = t === t.ownerDocument.body, a = n ? {
|
|
227
|
-
left: 0,
|
|
228
|
-
top: 0
|
|
229
|
-
} : t.getBoundingClientRect(), o = (e.clientX + t.scrollLeft - a.left) / r, c = (e.clientY + t.scrollTop - a.top) / r;
|
|
230
|
-
return {
|
|
231
|
-
x: o,
|
|
232
|
-
y: c
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
function te(e, t) {
|
|
236
|
-
var r = P(e, t, "px");
|
|
237
|
-
return L({}, (0, S.browserPrefixToKey)("transform", S.default), r);
|
|
238
|
-
}
|
|
239
|
-
function re(e, t) {
|
|
240
|
-
var r = P(e, t, "");
|
|
241
|
-
return r;
|
|
242
|
-
}
|
|
243
|
-
function P(e, t, r) {
|
|
244
|
-
var n = e.x, a = e.y, o = "translate(".concat(n).concat(r, ",").concat(a).concat(r, ")");
|
|
245
|
-
if (t) {
|
|
246
|
-
var c = "".concat(typeof t.x == "string" ? t.x : t.x + r), d = "".concat(typeof t.y == "string" ? t.y : t.y + r);
|
|
247
|
-
o = "translate(".concat(c, ", ").concat(d, ")") + o;
|
|
248
|
-
}
|
|
249
|
-
return o;
|
|
250
|
-
}
|
|
251
|
-
function ne(e, t) {
|
|
252
|
-
return e.targetTouches && (0, s.findInArray)(e.targetTouches, function(r) {
|
|
253
|
-
return t === r.identifier;
|
|
254
|
-
}) || e.changedTouches && (0, s.findInArray)(e.changedTouches, function(r) {
|
|
255
|
-
return t === r.identifier;
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
function ae(e) {
|
|
259
|
-
if (e.targetTouches && e.targetTouches[0])
|
|
260
|
-
return e.targetTouches[0].identifier;
|
|
261
|
-
if (e.changedTouches && e.changedTouches[0])
|
|
262
|
-
return e.changedTouches[0].identifier;
|
|
263
|
-
}
|
|
264
|
-
function oe(e) {
|
|
265
|
-
if (!!e) {
|
|
266
|
-
var t = e.getElementById("react-draggable-style-el");
|
|
267
|
-
t || (t = e.createElement("style"), t.type = "text/css", t.id = "react-draggable-style-el", t.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
268
|
-
`, t.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
269
|
-
`, e.getElementsByTagName("head")[0].appendChild(t)), e.body && X(e.body, "react-draggable-transparent-selection");
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
function ie(e) {
|
|
273
|
-
if (!!e)
|
|
274
|
-
try {
|
|
275
|
-
if (e.body && N(e.body, "react-draggable-transparent-selection"), e.selection)
|
|
276
|
-
e.selection.empty();
|
|
277
|
-
else {
|
|
278
|
-
var t = (e.defaultView || window).getSelection();
|
|
279
|
-
t && t.type !== "Caret" && t.removeAllRanges();
|
|
280
|
-
}
|
|
281
|
-
} catch {
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
function X(e, t) {
|
|
285
|
-
e.classList ? e.classList.add(t) : e.className.match(new RegExp("(?:^|\\s)".concat(t, "(?!\\S)"))) || (e.className += " ".concat(t));
|
|
286
|
-
}
|
|
287
|
-
function N(e, t) {
|
|
288
|
-
e.classList ? e.classList.remove(t) : e.className = e.className.replace(new RegExp("(?:^|\\s)".concat(t, "(?!\\S)"), "g"), "");
|
|
289
|
-
}
|
|
290
|
-
var l = {};
|
|
291
|
-
Object.defineProperty(l, "__esModule", {
|
|
292
|
-
value: !0
|
|
293
|
-
});
|
|
294
|
-
l.canDragX = se;
|
|
295
|
-
l.canDragY = fe;
|
|
296
|
-
l.createCoreData = pe;
|
|
297
|
-
l.createDraggableData = de;
|
|
298
|
-
l.getBoundPosition = ce;
|
|
299
|
-
l.getControlPosition = le;
|
|
300
|
-
l.snapToGrid = ue;
|
|
301
|
-
var u = f, m = i;
|
|
302
|
-
function ce(e, t, r) {
|
|
303
|
-
if (!e.props.bounds)
|
|
304
|
-
return [t, r];
|
|
305
|
-
var n = e.props.bounds;
|
|
306
|
-
n = typeof n == "string" ? n : me(n);
|
|
307
|
-
var a = O(e);
|
|
308
|
-
if (typeof n == "string") {
|
|
309
|
-
var o = a.ownerDocument, c = o.defaultView, d;
|
|
310
|
-
if (n === "parent" ? d = a.parentNode : d = o.querySelector(n), !(d instanceof c.HTMLElement))
|
|
311
|
-
throw new Error('Bounds selector "' + n + '" could not find an element.');
|
|
312
|
-
var y = d, g = c.getComputedStyle(a), h = c.getComputedStyle(y);
|
|
313
|
-
n = {
|
|
314
|
-
left: -a.offsetLeft + (0, u.int)(h.paddingLeft) + (0, u.int)(g.marginLeft),
|
|
315
|
-
top: -a.offsetTop + (0, u.int)(h.paddingTop) + (0, u.int)(g.marginTop),
|
|
316
|
-
right: (0, m.innerWidth)(y) - (0, m.outerWidth)(a) - a.offsetLeft + (0, u.int)(h.paddingRight) - (0, u.int)(g.marginRight),
|
|
317
|
-
bottom: (0, m.innerHeight)(y) - (0, m.outerHeight)(a) - a.offsetTop + (0, u.int)(h.paddingBottom) - (0, u.int)(g.marginBottom)
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
return (0, u.isNum)(n.right) && (t = Math.min(t, n.right)), (0, u.isNum)(n.bottom) && (r = Math.min(r, n.bottom)), (0, u.isNum)(n.left) && (t = Math.max(t, n.left)), (0, u.isNum)(n.top) && (r = Math.max(r, n.top)), [t, r];
|
|
321
|
-
}
|
|
322
|
-
function ue(e, t, r) {
|
|
323
|
-
var n = Math.round(t / e[0]) * e[0], a = Math.round(r / e[1]) * e[1];
|
|
324
|
-
return [n, a];
|
|
325
|
-
}
|
|
326
|
-
function se(e) {
|
|
327
|
-
return e.props.axis === "both" || e.props.axis === "x";
|
|
328
|
-
}
|
|
329
|
-
function fe(e) {
|
|
330
|
-
return e.props.axis === "both" || e.props.axis === "y";
|
|
331
|
-
}
|
|
332
|
-
function le(e, t, r) {
|
|
333
|
-
var n = typeof t == "number" ? (0, m.getTouch)(e, t) : null;
|
|
334
|
-
if (typeof t == "number" && !n)
|
|
335
|
-
return null;
|
|
336
|
-
var a = O(r), o = r.props.offsetParent || a.offsetParent || a.ownerDocument.body;
|
|
337
|
-
return (0, m.offsetXYFromParent)(n || e, o, r.props.scale);
|
|
338
|
-
}
|
|
339
|
-
function pe(e, t, r) {
|
|
340
|
-
var n = e.state, a = !(0, u.isNum)(n.lastX), o = O(e);
|
|
341
|
-
return a ? {
|
|
342
|
-
node: o,
|
|
343
|
-
deltaX: 0,
|
|
344
|
-
deltaY: 0,
|
|
345
|
-
lastX: t,
|
|
346
|
-
lastY: r,
|
|
347
|
-
x: t,
|
|
348
|
-
y: r
|
|
349
|
-
} : {
|
|
350
|
-
node: o,
|
|
351
|
-
deltaX: t - n.lastX,
|
|
352
|
-
deltaY: r - n.lastY,
|
|
353
|
-
lastX: n.lastX,
|
|
354
|
-
lastY: n.lastY,
|
|
355
|
-
x: t,
|
|
356
|
-
y: r
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
function de(e, t) {
|
|
360
|
-
var r = e.props.scale;
|
|
361
|
-
return {
|
|
362
|
-
node: t.node,
|
|
363
|
-
x: e.state.x + t.deltaX / r,
|
|
364
|
-
y: e.state.y + t.deltaY / r,
|
|
365
|
-
deltaX: t.deltaX / r,
|
|
366
|
-
deltaY: t.deltaY / r,
|
|
367
|
-
lastX: e.state.x,
|
|
368
|
-
lastY: e.state.y
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
function me(e) {
|
|
372
|
-
return {
|
|
373
|
-
left: e.left,
|
|
374
|
-
top: e.top,
|
|
375
|
-
right: e.right,
|
|
376
|
-
bottom: e.bottom
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
function O(e) {
|
|
380
|
-
var t = e.findDOMNode();
|
|
381
|
-
if (!t)
|
|
382
|
-
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
383
|
-
return t;
|
|
384
|
-
}
|
|
385
|
-
var Y = {};
|
|
386
|
-
Object.defineProperty(Y, "__esModule", {
|
|
387
|
-
value: !0
|
|
388
|
-
});
|
|
389
|
-
Y.default = ge;
|
|
390
|
-
function ge() {
|
|
391
|
-
}
|
|
392
|
-
var R = {};
|
|
393
|
-
R.__esModule = !0;
|
|
394
|
-
R.cloneElement = we;
|
|
395
|
-
var he = ve(B);
|
|
396
|
-
function ve(e) {
|
|
397
|
-
return e && e.__esModule ? e : { default: e };
|
|
398
|
-
}
|
|
399
|
-
function _(e, t) {
|
|
400
|
-
var r = Object.keys(e);
|
|
401
|
-
if (Object.getOwnPropertySymbols) {
|
|
402
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
403
|
-
t && (n = n.filter(function(a) {
|
|
404
|
-
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
|
405
|
-
})), r.push.apply(r, n);
|
|
406
|
-
}
|
|
407
|
-
return r;
|
|
408
|
-
}
|
|
409
|
-
function M(e) {
|
|
410
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
411
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
412
|
-
t % 2 ? _(Object(r), !0).forEach(function(n) {
|
|
413
|
-
ye(e, n, r[n]);
|
|
414
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : _(Object(r)).forEach(function(n) {
|
|
415
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
return e;
|
|
419
|
-
}
|
|
420
|
-
function ye(e, t, r) {
|
|
421
|
-
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
422
|
-
}
|
|
423
|
-
function we(e, t) {
|
|
424
|
-
return t.style && e.props.style && (t.style = M(M({}, e.props.style), t.style)), t.className && e.props.className && (t.className = e.props.className + " " + t.className), /* @__PURE__ */ he.default.cloneElement(e, t);
|
|
425
|
-
}
|
|
426
|
-
export {
|
|
427
|
-
Se as a,
|
|
428
|
-
Oe as b,
|
|
429
|
-
i as d,
|
|
430
|
-
Pe as g,
|
|
431
|
-
Y as l,
|
|
432
|
-
l as p,
|
|
433
|
-
f as s,
|
|
434
|
-
R as u
|
|
435
|
-
};
|