@m4l/components 0.1.11 → 0.1.13

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.
Files changed (144) hide show
  1. package/assets/Logo/index.228dcb5a.js +86 -0
  2. package/commonjs.565e6834.js +12 -0
  3. package/components/CommonActions/components/ActionCancel/index.cba1b460.js +17 -0
  4. package/components/CommonActions/components/ActionFormCancel/index.be2fe891.js +49 -0
  5. package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +31 -0
  6. package/components/CommonActions/components/ActionIntro/index.cc4b1e0e.js +18 -0
  7. package/components/CommonActions/components/Actions/index.e8148d98.js +743 -0
  8. package/components/CompanyLogo/{index.js → index.f81c179c.js} +42 -48
  9. package/components/DataGrid/index.b688877d.js +894 -0
  10. package/components/DataGrid/types.d.ts +1 -1
  11. package/components/DynamicFilter/index.82ce857e.js +1158 -0
  12. package/components/ErrorLabel/index.c8615f16.js +19 -0
  13. package/components/Icon/index.cbca79b0.js +70 -0
  14. package/components/Image/index.e790b50b.js +122 -0
  15. package/components/LanguagePopover/index.3d9611cb.js +87 -0
  16. package/components/Loadable/index.f5518558.js +15 -0
  17. package/components/ModalDialog/index.3850c053.js +168 -0
  18. package/components/NoItemSelected/{index.js → index.12f0ca67.js} +43 -50
  19. package/components/ObjectLogs/index.27ef875d.js +266 -0
  20. package/components/Page/index.6d69977e.js +35 -0
  21. package/components/Page/index.d.ts +1 -1
  22. package/components/PaperForm/index.d7c74064.js +105 -0
  23. package/components/Period/index.5e68286a.js +160 -0
  24. package/components/PropertyValue/index.ab3dd7e9.js +116 -0
  25. package/components/Resizeable/{index.js → index.45995d2b.js} +21 -19
  26. package/components/ScrollBar/index.39eeb2de.js +49 -0
  27. package/components/ScrollToTop/index.e06f98f6.js +11 -0
  28. package/components/SplitLayout/{index.js → index.4032673d.js} +35 -35
  29. package/components/animate/IconButtonAnimate/index.d.ts +1 -1
  30. package/components/animate/LoadingScreen/{index.js → index.f1cec7db.js} +29 -27
  31. package/components/animate/MotionContainer/index.8d9f9d80.js +30 -0
  32. package/components/animate/MotionLazyContainer/index.572dd012.js +15 -0
  33. package/components/animate/features.0fbf41e1.js +5 -0
  34. package/components/animate/variants/{bounce.js → bounce.784aaaaa.js} +15 -16
  35. package/components/animate/variants/container.11f82b76.js +20 -0
  36. package/components/animate/variants/fade.b561c0fc.js +59 -0
  37. package/components/animate/variants/{index.js → index.7a912140.js} +0 -0
  38. package/components/animate/variants/transition.bd46b9ce.js +15 -0
  39. package/components/formatters/BooleanFormatter/index.cca53b7f.js +42 -0
  40. package/components/formatters/DateFormatter/index.ad8d9b8e.js +57 -0
  41. package/components/formatters/index.55856d65.js +106 -0
  42. package/components/hook-form/FormProvider/index.257acd9f.js +55 -0
  43. package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +122 -0
  44. package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +153 -0
  45. package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +59 -0
  46. package/components/hook-form/RHFDateTime/index.fc5cbafe.js +68 -0
  47. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +34 -0
  48. package/components/hook-form/RHFPeriod/index.23c254e9.js +45 -0
  49. package/components/hook-form/RHFRadioGroup/index.b3335e13.js +43 -0
  50. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +36 -0
  51. package/components/hook-form/RHFTextField/index.4c455f75.js +77 -0
  52. package/components/hook-form/RHFTextField/index.d.ts +1 -1
  53. package/components/hook-form/RHFUpload/index.ed3d739f.js +244 -0
  54. package/components/mui_extended/Accordion/index.2116e423.js +103 -0
  55. package/components/mui_extended/Avatar/index.0a2a4523.js +32 -0
  56. package/components/mui_extended/Avatar/index.d.ts +1 -1
  57. package/components/mui_extended/BoxIcon/index.e638ecc8.js +22 -0
  58. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +89 -0
  59. package/components/mui_extended/Button/index.84d8898c.js +110 -0
  60. package/components/mui_extended/IconButton/index.88f3aadb.js +98 -0
  61. package/components/mui_extended/LinkWithRoute/index.d4b263de.js +28 -0
  62. package/components/mui_extended/MenuPopover/index.488fc536.js +131 -0
  63. package/components/mui_extended/Pager/index.0576814f.js +126 -0
  64. package/components/mui_extended/Tab/index.e0653a0a.js +28 -0
  65. package/components/mui_extended/Typography/index.0c4604b3.js +22 -0
  66. package/contexts/ModalContext/index.2188b69e.js +150 -0
  67. package/hooks/useFormAddEdit/index.d4845f1a.js +26 -0
  68. package/hooks/useModal/index.6571d2d9.js +6 -0
  69. package/index.js +162 -70
  70. package/lodash.e09401f0.js +32 -0
  71. package/node_modules.168cb897.js +55 -0
  72. package/package.json +1 -1
  73. package/react-data-grid.d46d625e.js +2115 -0
  74. package/react-draggable.20e95c61.js +714 -0
  75. package/react-json-view.f56a7f8e.js +2762 -0
  76. package/react-lazy-load-image-component.45b56650.js +784 -0
  77. package/react-resizable.5277deaf.js +371 -0
  78. package/react-splitter-layout.7810ac1b.js +165 -0
  79. package/utils/index.214d9542.js +435 -0
  80. package/assets/Logo/index.js +0 -91
  81. package/commonjs.js +0 -9
  82. package/components/CommonActions/components/ActionCancel/index.js +0 -15
  83. package/components/CommonActions/components/ActionFormCancel/index.js +0 -62
  84. package/components/CommonActions/components/ActionFormIntro/index.js +0 -35
  85. package/components/CommonActions/components/ActionIntro/index.js +0 -16
  86. package/components/CommonActions/components/Actions/index.js +0 -859
  87. package/components/DataGrid/index.js +0 -1067
  88. package/components/DynamicFilter/index.js +0 -1573
  89. package/components/ErrorLabel/index.js +0 -18
  90. package/components/Icon/index.js +0 -80
  91. package/components/Image/index.js +0 -128
  92. package/components/LanguagePopover/index.js +0 -93
  93. package/components/Loadable/index.js +0 -13
  94. package/components/ModalDialog/index.js +0 -180
  95. package/components/ObjectLogs/index.js +0 -284
  96. package/components/Page/index.js +0 -36
  97. package/components/PaperForm/index.js +0 -110
  98. package/components/Period/index.js +0 -230
  99. package/components/PropertyValue/index.js +0 -142
  100. package/components/ScrollBar/index.js +0 -52
  101. package/components/ScrollToTop/index.js +0 -10
  102. package/components/animate/MotionContainer/index.js +0 -31
  103. package/components/animate/MotionLazyContainer/index.js +0 -13
  104. package/components/animate/features.js +0 -2
  105. package/components/animate/variants/container.js +0 -20
  106. package/components/animate/variants/fade.js +0 -61
  107. package/components/animate/variants/transition.js +0 -16
  108. package/components/formatters/BooleanFormatter/index.js +0 -52
  109. package/components/formatters/DateFormatter/index.js +0 -66
  110. package/components/formatters/index.js +0 -112
  111. package/components/hook-form/FormProvider/index.js +0 -61
  112. package/components/hook-form/RHFAutocomplete/index.js +0 -144
  113. package/components/hook-form/RHFAutocompleteAsync/index.js +0 -191
  114. package/components/hook-form/RHFCheckbox/index.js +0 -65
  115. package/components/hook-form/RHFDateTime/index.js +0 -79
  116. package/components/hook-form/RHFMultiCheckbox/index.js +0 -32
  117. package/components/hook-form/RHFPeriod/index.js +0 -47
  118. package/components/hook-form/RHFRadioGroup/index.js +0 -41
  119. package/components/hook-form/RHFSelect/index.js +0 -34
  120. package/components/hook-form/RHFTextField/index.js +0 -87
  121. package/components/hook-form/RHFUpload/index.js +0 -255
  122. package/components/mui_extended/Accordion/index.js +0 -105
  123. package/components/mui_extended/Avatar/index.js +0 -33
  124. package/components/mui_extended/BoxIcon/index.js +0 -20
  125. package/components/mui_extended/Breadcrumbs/index.js +0 -92
  126. package/components/mui_extended/Button/index.js +0 -131
  127. package/components/mui_extended/IconButton/index.js +0 -108
  128. package/components/mui_extended/LinkWithRoute/index.js +0 -30
  129. package/components/mui_extended/MenuPopover/index.js +0 -135
  130. package/components/mui_extended/Pager/index.js +0 -137
  131. package/components/mui_extended/Tab/index.js +0 -30
  132. package/components/mui_extended/Typography/index.js +0 -21
  133. package/contexts/ModalContext/index.js +0 -165
  134. package/hooks/useFormAddEdit/index.js +0 -42
  135. package/hooks/useModal/index.js +0 -4
  136. package/lodash.js +0 -62
  137. package/node_modules.js +0 -54
  138. package/react-data-grid.js +0 -2652
  139. package/react-draggable.js +0 -960
  140. package/react-json-view.js +0 -2764
  141. package/react-lazy-load-image-component.js +0 -792
  142. package/react-resizable.js +0 -541
  143. package/react-splitter-layout.js +0 -165
  144. package/utils/index.js +0 -572
@@ -0,0 +1,714 @@
1
+ import de from "react";
2
+ import pe from "prop-types";
3
+ import ge from "react-dom";
4
+ import Ie from "clsx";
5
+ import { s as ye, l as ve, d as he, p as me } from "./utils/index.214d9542.js";
6
+ var re = { exports: {} }, be = {}, L = {};
7
+ function V(r) {
8
+ return V = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
9
+ return typeof a;
10
+ } : function(a) {
11
+ return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
12
+ }, V(r);
13
+ }
14
+ Object.defineProperty(L, "__esModule", {
15
+ value: !0
16
+ });
17
+ L.default = void 0;
18
+ var Z = We(de), w = ne(pe), Ue = ne(ge), _ = he, j = me, ee = ye, F = ne(ve);
19
+ function ne(r) {
20
+ return r && r.__esModule ? r : { default: r };
21
+ }
22
+ function De(r) {
23
+ if (typeof WeakMap != "function")
24
+ return null;
25
+ var a = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap();
26
+ return (De = function(d) {
27
+ return d ? l : a;
28
+ })(r);
29
+ }
30
+ function We(r, a) {
31
+ if (!a && r && r.__esModule)
32
+ return r;
33
+ if (r === null || V(r) !== "object" && typeof r != "function")
34
+ return { default: r };
35
+ var l = De(a);
36
+ if (l && l.has(r))
37
+ return l.get(r);
38
+ var e = {}, d = Object.defineProperty && Object.getOwnPropertyDescriptor;
39
+ for (var p in r)
40
+ if (p !== "default" && Object.prototype.hasOwnProperty.call(r, p)) {
41
+ var h = d ? Object.getOwnPropertyDescriptor(r, p) : null;
42
+ h && (h.get || h.set) ? Object.defineProperty(e, p, h) : e[p] = r[p];
43
+ }
44
+ return e.default = r, l && l.set(r, e), e;
45
+ }
46
+ function fe(r, a) {
47
+ return Xe(r) || Fe(r, a) || qe(r, a) || $e();
48
+ }
49
+ function $e() {
50
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
51
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
52
+ }
53
+ function qe(r, a) {
54
+ if (!!r) {
55
+ if (typeof r == "string")
56
+ return se(r, a);
57
+ var l = Object.prototype.toString.call(r).slice(8, -1);
58
+ if (l === "Object" && r.constructor && (l = r.constructor.name), l === "Map" || l === "Set")
59
+ return Array.from(r);
60
+ if (l === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))
61
+ return se(r, a);
62
+ }
63
+ }
64
+ function se(r, a) {
65
+ (a == null || a > r.length) && (a = r.length);
66
+ for (var l = 0, e = new Array(a); l < a; l++)
67
+ e[l] = r[l];
68
+ return e;
69
+ }
70
+ function Fe(r, a) {
71
+ var l = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
72
+ if (l != null) {
73
+ var e = [], d = !0, p = !1, h, s;
74
+ try {
75
+ for (l = l.call(r); !(d = (h = l.next()).done) && (e.push(h.value), !(a && e.length === a)); d = !0)
76
+ ;
77
+ } catch (v) {
78
+ p = !0, s = v;
79
+ } finally {
80
+ try {
81
+ !d && l.return != null && l.return();
82
+ } finally {
83
+ if (p)
84
+ throw s;
85
+ }
86
+ }
87
+ return e;
88
+ }
89
+ }
90
+ function Xe(r) {
91
+ if (Array.isArray(r))
92
+ return r;
93
+ }
94
+ function Ye(r, a) {
95
+ if (!(r instanceof a))
96
+ throw new TypeError("Cannot call a class as a function");
97
+ }
98
+ function ce(r, a) {
99
+ for (var l = 0; l < a.length; l++) {
100
+ var e = a[l];
101
+ e.enumerable = e.enumerable || !1, e.configurable = !0, "value" in e && (e.writable = !0), Object.defineProperty(r, e.key, e);
102
+ }
103
+ }
104
+ function Be(r, a, l) {
105
+ return a && ce(r.prototype, a), l && ce(r, l), Object.defineProperty(r, "prototype", { writable: !1 }), r;
106
+ }
107
+ function He(r, a) {
108
+ if (typeof a != "function" && a !== null)
109
+ throw new TypeError("Super expression must either be null or a function");
110
+ r.prototype = Object.create(a && a.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), Object.defineProperty(r, "prototype", { writable: !1 }), a && te(r, a);
111
+ }
112
+ function te(r, a) {
113
+ return te = Object.setPrototypeOf || function(e, d) {
114
+ return e.__proto__ = d, e;
115
+ }, te(r, a);
116
+ }
117
+ function Ve(r) {
118
+ var a = Le();
119
+ return function() {
120
+ var e = G(r), d;
121
+ if (a) {
122
+ var p = G(this).constructor;
123
+ d = Reflect.construct(e, arguments, p);
124
+ } else
125
+ d = e.apply(this, arguments);
126
+ return Ge(this, d);
127
+ };
128
+ }
129
+ function Ge(r, a) {
130
+ if (a && (V(a) === "object" || typeof a == "function"))
131
+ return a;
132
+ if (a !== void 0)
133
+ throw new TypeError("Derived constructors may only return object or undefined");
134
+ return S(r);
135
+ }
136
+ function S(r) {
137
+ if (r === void 0)
138
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
139
+ return r;
140
+ }
141
+ function Le() {
142
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
143
+ return !1;
144
+ if (typeof Proxy == "function")
145
+ return !0;
146
+ try {
147
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
148
+ })), !0;
149
+ } catch {
150
+ return !1;
151
+ }
152
+ }
153
+ function G(r) {
154
+ return G = Object.setPrototypeOf ? Object.getPrototypeOf : function(l) {
155
+ return l.__proto__ || Object.getPrototypeOf(l);
156
+ }, G(r);
157
+ }
158
+ function P(r, a, l) {
159
+ return a in r ? Object.defineProperty(r, a, { value: l, enumerable: !0, configurable: !0, writable: !0 }) : r[a] = l, r;
160
+ }
161
+ var N = {
162
+ touch: {
163
+ start: "touchstart",
164
+ move: "touchmove",
165
+ stop: "touchend"
166
+ },
167
+ mouse: {
168
+ start: "mousedown",
169
+ move: "mousemove",
170
+ stop: "mouseup"
171
+ }
172
+ }, k = N.mouse, z = /* @__PURE__ */ function(r) {
173
+ He(l, r);
174
+ var a = Ve(l);
175
+ function l() {
176
+ var e;
177
+ Ye(this, l);
178
+ for (var d = arguments.length, p = new Array(d), h = 0; h < d; h++)
179
+ p[h] = arguments[h];
180
+ return e = a.call.apply(a, [this].concat(p)), P(S(e), "state", {
181
+ dragging: !1,
182
+ lastX: NaN,
183
+ lastY: NaN,
184
+ touchIdentifier: null
185
+ }), P(S(e), "mounted", !1), P(S(e), "handleDragStart", function(s) {
186
+ if (e.props.onMouseDown(s), !e.props.allowAnyClick && typeof s.button == "number" && s.button !== 0)
187
+ return !1;
188
+ var v = e.findDOMNode();
189
+ if (!v || !v.ownerDocument || !v.ownerDocument.body)
190
+ throw new Error("<DraggableCore> not mounted on DragStart!");
191
+ var m = v.ownerDocument;
192
+ if (!(e.props.disabled || !(s.target instanceof m.defaultView.Node) || e.props.handle && !(0, _.matchesSelectorAndParentsTo)(s.target, e.props.handle, v) || e.props.cancel && (0, _.matchesSelectorAndParentsTo)(s.target, e.props.cancel, v))) {
193
+ s.type === "touchstart" && s.preventDefault();
194
+ var D = (0, _.getTouchIdentifier)(s);
195
+ e.setState({
196
+ touchIdentifier: D
197
+ });
198
+ var O = (0, j.getControlPosition)(s, D, S(e));
199
+ if (O != null) {
200
+ var b = O.x, E = O.y, M = (0, j.createCoreData)(S(e), b, E);
201
+ (0, F.default)("DraggableCore: handleDragStart: %j", M), (0, F.default)("calling", e.props.onStart);
202
+ var x = e.props.onStart(s, M);
203
+ x === !1 || e.mounted === !1 || (e.props.enableUserSelectHack && (0, _.addUserSelectStyles)(m), e.setState({
204
+ dragging: !0,
205
+ lastX: b,
206
+ lastY: E
207
+ }), (0, _.addEvent)(m, k.move, e.handleDrag), (0, _.addEvent)(m, k.stop, e.handleDragStop));
208
+ }
209
+ }
210
+ }), P(S(e), "handleDrag", function(s) {
211
+ var v = (0, j.getControlPosition)(s, e.state.touchIdentifier, S(e));
212
+ if (v != null) {
213
+ var m = v.x, D = v.y;
214
+ if (Array.isArray(e.props.grid)) {
215
+ var O = m - e.state.lastX, b = D - e.state.lastY, E = (0, j.snapToGrid)(e.props.grid, O, b), M = fe(E, 2);
216
+ if (O = M[0], b = M[1], !O && !b)
217
+ return;
218
+ m = e.state.lastX + O, D = e.state.lastY + b;
219
+ }
220
+ var x = (0, j.createCoreData)(S(e), m, D);
221
+ (0, F.default)("DraggableCore: handleDrag: %j", x);
222
+ var $ = e.props.onDrag(s, x);
223
+ if ($ === !1 || e.mounted === !1) {
224
+ try {
225
+ e.handleDragStop(new MouseEvent("mouseup"));
226
+ } catch {
227
+ var C = document.createEvent("MouseEvents");
228
+ C.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), e.handleDragStop(C);
229
+ }
230
+ return;
231
+ }
232
+ e.setState({
233
+ lastX: m,
234
+ lastY: D
235
+ });
236
+ }
237
+ }), P(S(e), "handleDragStop", function(s) {
238
+ if (!!e.state.dragging) {
239
+ var v = (0, j.getControlPosition)(s, e.state.touchIdentifier, S(e));
240
+ if (v != null) {
241
+ var m = v.x, D = v.y;
242
+ if (Array.isArray(e.props.grid)) {
243
+ var O = m - e.state.lastX || 0, b = D - e.state.lastY || 0, E = (0, j.snapToGrid)(e.props.grid, O, b), M = fe(E, 2);
244
+ O = M[0], b = M[1], m = e.state.lastX + O, D = e.state.lastY + b;
245
+ }
246
+ var x = (0, j.createCoreData)(S(e), m, D), $ = e.props.onStop(s, x);
247
+ if ($ === !1 || e.mounted === !1)
248
+ return !1;
249
+ var C = e.findDOMNode();
250
+ C && e.props.enableUserSelectHack && (0, _.removeUserSelectStyles)(C.ownerDocument), (0, F.default)("DraggableCore: handleDragStop: %j", x), e.setState({
251
+ dragging: !1,
252
+ lastX: NaN,
253
+ lastY: NaN
254
+ }), C && ((0, F.default)("DraggableCore: Removing handlers"), (0, _.removeEvent)(C.ownerDocument, k.move, e.handleDrag), (0, _.removeEvent)(C.ownerDocument, k.stop, e.handleDragStop));
255
+ }
256
+ }
257
+ }), P(S(e), "onMouseDown", function(s) {
258
+ return k = N.mouse, e.handleDragStart(s);
259
+ }), P(S(e), "onMouseUp", function(s) {
260
+ return k = N.mouse, e.handleDragStop(s);
261
+ }), P(S(e), "onTouchStart", function(s) {
262
+ return k = N.touch, e.handleDragStart(s);
263
+ }), P(S(e), "onTouchEnd", function(s) {
264
+ return k = N.touch, e.handleDragStop(s);
265
+ }), e;
266
+ }
267
+ return Be(l, [{
268
+ key: "componentDidMount",
269
+ value: function() {
270
+ this.mounted = !0;
271
+ var d = this.findDOMNode();
272
+ d && (0, _.addEvent)(d, N.touch.start, this.onTouchStart, {
273
+ passive: !1
274
+ });
275
+ }
276
+ }, {
277
+ key: "componentWillUnmount",
278
+ value: function() {
279
+ this.mounted = !1;
280
+ var d = this.findDOMNode();
281
+ if (d) {
282
+ var p = d.ownerDocument;
283
+ (0, _.removeEvent)(p, N.mouse.move, this.handleDrag), (0, _.removeEvent)(p, N.touch.move, this.handleDrag), (0, _.removeEvent)(p, N.mouse.stop, this.handleDragStop), (0, _.removeEvent)(p, N.touch.stop, this.handleDragStop), (0, _.removeEvent)(d, N.touch.start, this.onTouchStart, {
284
+ passive: !1
285
+ }), this.props.enableUserSelectHack && (0, _.removeUserSelectStyles)(p);
286
+ }
287
+ }
288
+ }, {
289
+ key: "findDOMNode",
290
+ value: function() {
291
+ var d, p, h;
292
+ return (d = this.props) !== null && d !== void 0 && d.nodeRef ? (p = this.props) === null || p === void 0 || (h = p.nodeRef) === null || h === void 0 ? void 0 : h.current : Ue.default.findDOMNode(this);
293
+ }
294
+ }, {
295
+ key: "render",
296
+ value: function() {
297
+ return /* @__PURE__ */ Z.cloneElement(Z.Children.only(this.props.children), {
298
+ onMouseDown: this.onMouseDown,
299
+ onMouseUp: this.onMouseUp,
300
+ onTouchEnd: this.onTouchEnd
301
+ });
302
+ }
303
+ }]), l;
304
+ }(Z.Component);
305
+ L.default = z;
306
+ P(z, "displayName", "DraggableCore");
307
+ P(z, "propTypes", {
308
+ allowAnyClick: w.default.bool,
309
+ disabled: w.default.bool,
310
+ enableUserSelectHack: w.default.bool,
311
+ offsetParent: function(a, l) {
312
+ if (a[l] && a[l].nodeType !== 1)
313
+ throw new Error("Draggable's offsetParent must be a DOM Node.");
314
+ },
315
+ grid: w.default.arrayOf(w.default.number),
316
+ handle: w.default.string,
317
+ cancel: w.default.string,
318
+ nodeRef: w.default.object,
319
+ onStart: w.default.func,
320
+ onDrag: w.default.func,
321
+ onStop: w.default.func,
322
+ onMouseDown: w.default.func,
323
+ scale: w.default.number,
324
+ className: ee.dontSetMe,
325
+ style: ee.dontSetMe,
326
+ transform: ee.dontSetMe
327
+ });
328
+ P(z, "defaultProps", {
329
+ allowAnyClick: !1,
330
+ disabled: !1,
331
+ enableUserSelectHack: !0,
332
+ onStart: function() {
333
+ },
334
+ onDrag: function() {
335
+ },
336
+ onStop: function() {
337
+ },
338
+ onMouseDown: function() {
339
+ },
340
+ scale: 1
341
+ });
342
+ (function(r) {
343
+ function a(t) {
344
+ return a = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
345
+ return typeof n;
346
+ } : function(n) {
347
+ return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
348
+ }, a(t);
349
+ }
350
+ Object.defineProperty(r, "__esModule", {
351
+ value: !0
352
+ }), Object.defineProperty(r, "DraggableCore", {
353
+ enumerable: !0,
354
+ get: function() {
355
+ return m.default;
356
+ }
357
+ }), r.default = void 0;
358
+ var l = M(de), e = b(pe), d = b(ge), p = b(Ie), h = he, s = me, v = ye, m = b(L), D = b(ve), O = ["axis", "bounds", "children", "defaultPosition", "defaultClassName", "defaultClassNameDragging", "defaultClassNameDragged", "position", "positionOffset", "scale"];
359
+ function b(t) {
360
+ return t && t.__esModule ? t : { default: t };
361
+ }
362
+ function E(t) {
363
+ if (typeof WeakMap != "function")
364
+ return null;
365
+ var n = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap();
366
+ return (E = function(u) {
367
+ return u ? o : n;
368
+ })(t);
369
+ }
370
+ function M(t, n) {
371
+ if (!n && t && t.__esModule)
372
+ return t;
373
+ if (t === null || a(t) !== "object" && typeof t != "function")
374
+ return { default: t };
375
+ var o = E(n);
376
+ if (o && o.has(t))
377
+ return o.get(t);
378
+ var i = {}, u = Object.defineProperty && Object.getOwnPropertyDescriptor;
379
+ for (var f in t)
380
+ if (f !== "default" && Object.prototype.hasOwnProperty.call(t, f)) {
381
+ var c = u ? Object.getOwnPropertyDescriptor(t, f) : null;
382
+ c && (c.get || c.set) ? Object.defineProperty(i, f, c) : i[f] = t[f];
383
+ }
384
+ return i.default = t, o && o.set(t, i), i;
385
+ }
386
+ function x() {
387
+ return x = Object.assign || function(t) {
388
+ for (var n = 1; n < arguments.length; n++) {
389
+ var o = arguments[n];
390
+ for (var i in o)
391
+ Object.prototype.hasOwnProperty.call(o, i) && (t[i] = o[i]);
392
+ }
393
+ return t;
394
+ }, x.apply(this, arguments);
395
+ }
396
+ function $(t, n) {
397
+ if (t == null)
398
+ return {};
399
+ var o = C(t, n), i, u;
400
+ if (Object.getOwnPropertySymbols) {
401
+ var f = Object.getOwnPropertySymbols(t);
402
+ for (u = 0; u < f.length; u++)
403
+ i = f[u], !(n.indexOf(i) >= 0) && (!Object.prototype.propertyIsEnumerable.call(t, i) || (o[i] = t[i]));
404
+ }
405
+ return o;
406
+ }
407
+ function C(t, n) {
408
+ if (t == null)
409
+ return {};
410
+ var o = {}, i = Object.keys(t), u, f;
411
+ for (f = 0; f < i.length; f++)
412
+ u = i[f], !(n.indexOf(u) >= 0) && (o[u] = t[u]);
413
+ return o;
414
+ }
415
+ function K(t, n) {
416
+ var o = Object.keys(t);
417
+ if (Object.getOwnPropertySymbols) {
418
+ var i = Object.getOwnPropertySymbols(t);
419
+ n && (i = i.filter(function(u) {
420
+ return Object.getOwnPropertyDescriptor(t, u).enumerable;
421
+ })), o.push.apply(o, i);
422
+ }
423
+ return o;
424
+ }
425
+ function R(t) {
426
+ for (var n = 1; n < arguments.length; n++) {
427
+ var o = arguments[n] != null ? arguments[n] : {};
428
+ n % 2 ? K(Object(o), !0).forEach(function(i) {
429
+ T(t, i, o[i]);
430
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(o)) : K(Object(o)).forEach(function(i) {
431
+ Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(o, i));
432
+ });
433
+ }
434
+ return t;
435
+ }
436
+ function Oe(t, n) {
437
+ return Ne(t) || xe(t, n) || Pe(t, n) || we();
438
+ }
439
+ function we() {
440
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
441
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
442
+ }
443
+ function Pe(t, n) {
444
+ if (!!t) {
445
+ if (typeof t == "string")
446
+ return ae(t, n);
447
+ var o = Object.prototype.toString.call(t).slice(8, -1);
448
+ if (o === "Object" && t.constructor && (o = t.constructor.name), o === "Map" || o === "Set")
449
+ return Array.from(t);
450
+ if (o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))
451
+ return ae(t, n);
452
+ }
453
+ }
454
+ function ae(t, n) {
455
+ (n == null || n > t.length) && (n = t.length);
456
+ for (var o = 0, i = new Array(n); o < n; o++)
457
+ i[o] = t[o];
458
+ return i;
459
+ }
460
+ function xe(t, n) {
461
+ var o = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
462
+ if (o != null) {
463
+ var i = [], u = !0, f = !1, c, y;
464
+ try {
465
+ for (o = o.call(t); !(u = (c = o.next()).done) && (i.push(c.value), !(n && i.length === n)); u = !0)
466
+ ;
467
+ } catch (g) {
468
+ f = !0, y = g;
469
+ } finally {
470
+ try {
471
+ !u && o.return != null && o.return();
472
+ } finally {
473
+ if (f)
474
+ throw y;
475
+ }
476
+ }
477
+ return i;
478
+ }
479
+ }
480
+ function Ne(t) {
481
+ if (Array.isArray(t))
482
+ return t;
483
+ }
484
+ function Me(t, n) {
485
+ if (!(t instanceof n))
486
+ throw new TypeError("Cannot call a class as a function");
487
+ }
488
+ function oe(t, n) {
489
+ for (var o = 0; o < n.length; o++) {
490
+ var i = n[o];
491
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
492
+ }
493
+ }
494
+ function Ce(t, n, o) {
495
+ return n && oe(t.prototype, n), o && oe(t, o), Object.defineProperty(t, "prototype", { writable: !1 }), t;
496
+ }
497
+ function Ee(t, n) {
498
+ if (typeof n != "function" && n !== null)
499
+ throw new TypeError("Super expression must either be null or a function");
500
+ t.prototype = Object.create(n && n.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), n && J(t, n);
501
+ }
502
+ function J(t, n) {
503
+ return J = Object.setPrototypeOf || function(i, u) {
504
+ return i.__proto__ = u, i;
505
+ }, J(t, n);
506
+ }
507
+ function Te(t) {
508
+ var n = Ae();
509
+ return function() {
510
+ var i = X(t), u;
511
+ if (n) {
512
+ var f = X(this).constructor;
513
+ u = Reflect.construct(i, arguments, f);
514
+ } else
515
+ u = i.apply(this, arguments);
516
+ return Re(this, u);
517
+ };
518
+ }
519
+ function Re(t, n) {
520
+ if (n && (a(n) === "object" || typeof n == "function"))
521
+ return n;
522
+ if (n !== void 0)
523
+ throw new TypeError("Derived constructors may only return object or undefined");
524
+ return A(t);
525
+ }
526
+ function A(t) {
527
+ if (t === void 0)
528
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
529
+ return t;
530
+ }
531
+ function Ae() {
532
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
533
+ return !1;
534
+ if (typeof Proxy == "function")
535
+ return !0;
536
+ try {
537
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
538
+ })), !0;
539
+ } catch {
540
+ return !1;
541
+ }
542
+ }
543
+ function X(t) {
544
+ return X = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) {
545
+ return o.__proto__ || Object.getPrototypeOf(o);
546
+ }, X(t);
547
+ }
548
+ function T(t, n, o) {
549
+ return n in t ? Object.defineProperty(t, n, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = o, t;
550
+ }
551
+ var Y = /* @__PURE__ */ function(t) {
552
+ Ee(o, t);
553
+ var n = Te(o);
554
+ function o(i) {
555
+ var u;
556
+ return Me(this, o), u = n.call(this, i), T(A(u), "onDragStart", function(f, c) {
557
+ (0, D.default)("Draggable: onDragStart: %j", c);
558
+ var y = u.props.onStart(f, (0, s.createDraggableData)(A(u), c));
559
+ if (y === !1)
560
+ return !1;
561
+ u.setState({
562
+ dragging: !0,
563
+ dragged: !0
564
+ });
565
+ }), T(A(u), "onDrag", function(f, c) {
566
+ if (!u.state.dragging)
567
+ return !1;
568
+ (0, D.default)("Draggable: onDrag: %j", c);
569
+ var y = (0, s.createDraggableData)(A(u), c), g = {
570
+ x: y.x,
571
+ y: y.y
572
+ };
573
+ if (u.props.bounds) {
574
+ var q = g.x, U = g.y;
575
+ g.x += u.state.slackX, g.y += u.state.slackY;
576
+ var W = (0, s.getBoundPosition)(A(u), g.x, g.y), I = Oe(W, 2), Q = I[0], B = I[1];
577
+ g.x = Q, g.y = B, g.slackX = u.state.slackX + (q - g.x), g.slackY = u.state.slackY + (U - g.y), y.x = g.x, y.y = g.y, y.deltaX = g.x - u.state.x, y.deltaY = g.y - u.state.y;
578
+ }
579
+ var H = u.props.onDrag(f, y);
580
+ if (H === !1)
581
+ return !1;
582
+ u.setState(g);
583
+ }), T(A(u), "onDragStop", function(f, c) {
584
+ if (!u.state.dragging)
585
+ return !1;
586
+ var y = u.props.onStop(f, (0, s.createDraggableData)(A(u), c));
587
+ if (y === !1)
588
+ return !1;
589
+ (0, D.default)("Draggable: onDragStop: %j", c);
590
+ var g = {
591
+ dragging: !1,
592
+ slackX: 0,
593
+ slackY: 0
594
+ }, q = Boolean(u.props.position);
595
+ if (q) {
596
+ var U = u.props.position, W = U.x, I = U.y;
597
+ g.x = W, g.y = I;
598
+ }
599
+ u.setState(g);
600
+ }), u.state = {
601
+ dragging: !1,
602
+ dragged: !1,
603
+ x: i.position ? i.position.x : i.defaultPosition.x,
604
+ y: i.position ? i.position.y : i.defaultPosition.y,
605
+ prevPropsPosition: R({}, i.position),
606
+ slackX: 0,
607
+ slackY: 0,
608
+ isElementSVG: !1
609
+ }, i.position && !(i.onDrag || i.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."), u;
610
+ }
611
+ return Ce(o, [{
612
+ key: "componentDidMount",
613
+ value: function() {
614
+ typeof window.SVGElement < "u" && this.findDOMNode() instanceof window.SVGElement && this.setState({
615
+ isElementSVG: !0
616
+ });
617
+ }
618
+ }, {
619
+ key: "componentWillUnmount",
620
+ value: function() {
621
+ this.setState({
622
+ dragging: !1
623
+ });
624
+ }
625
+ }, {
626
+ key: "findDOMNode",
627
+ value: function() {
628
+ var u, f, c;
629
+ return (u = (f = this.props) === null || f === void 0 || (c = f.nodeRef) === null || c === void 0 ? void 0 : c.current) !== null && u !== void 0 ? u : d.default.findDOMNode(this);
630
+ }
631
+ }, {
632
+ key: "render",
633
+ value: function() {
634
+ var u, f = this.props;
635
+ f.axis, f.bounds;
636
+ var c = f.children, y = f.defaultPosition, g = f.defaultClassName, q = f.defaultClassNameDragging, U = f.defaultClassNameDragged, W = f.position, I = f.positionOffset;
637
+ f.scale;
638
+ var Q = $(f, O), B = {}, H = null, je = Boolean(W), ie = !je || this.state.dragging, ue = W || y, le = {
639
+ x: (0, s.canDragX)(this) && ie ? this.state.x : ue.x,
640
+ y: (0, s.canDragY)(this) && ie ? this.state.y : ue.y
641
+ };
642
+ this.state.isElementSVG ? H = (0, h.createSVGTransform)(le, I) : B = (0, h.createCSSTransform)(le, I);
643
+ var ke = (0, p.default)(c.props.className || "", g, (u = {}, T(u, q, this.state.dragging), T(u, U, this.state.dragged), u));
644
+ return /* @__PURE__ */ l.createElement(m.default, x({}, Q, {
645
+ onStart: this.onDragStart,
646
+ onDrag: this.onDrag,
647
+ onStop: this.onDragStop
648
+ }), /* @__PURE__ */ l.cloneElement(l.Children.only(c), {
649
+ className: ke,
650
+ style: R(R({}, c.props.style), B),
651
+ transform: H
652
+ }));
653
+ }
654
+ }], [{
655
+ key: "getDerivedStateFromProps",
656
+ value: function(u, f) {
657
+ var c = u.position, y = f.prevPropsPosition;
658
+ return c && (!y || c.x !== y.x || c.y !== y.y) ? ((0, D.default)("Draggable: getDerivedStateFromProps %j", {
659
+ position: c,
660
+ prevPropsPosition: y
661
+ }), {
662
+ x: c.x,
663
+ y: c.y,
664
+ prevPropsPosition: R({}, c)
665
+ }) : null;
666
+ }
667
+ }]), o;
668
+ }(l.Component);
669
+ r.default = Y, T(Y, "displayName", "Draggable"), T(Y, "propTypes", R(R({}, m.default.propTypes), {}, {
670
+ axis: e.default.oneOf(["both", "x", "y", "none"]),
671
+ bounds: e.default.oneOfType([e.default.shape({
672
+ left: e.default.number,
673
+ right: e.default.number,
674
+ top: e.default.number,
675
+ bottom: e.default.number
676
+ }), e.default.string, e.default.oneOf([!1])]),
677
+ defaultClassName: e.default.string,
678
+ defaultClassNameDragging: e.default.string,
679
+ defaultClassNameDragged: e.default.string,
680
+ defaultPosition: e.default.shape({
681
+ x: e.default.number,
682
+ y: e.default.number
683
+ }),
684
+ positionOffset: e.default.shape({
685
+ x: e.default.oneOfType([e.default.number, e.default.string]),
686
+ y: e.default.oneOfType([e.default.number, e.default.string])
687
+ }),
688
+ position: e.default.shape({
689
+ x: e.default.number,
690
+ y: e.default.number
691
+ }),
692
+ className: v.dontSetMe,
693
+ style: v.dontSetMe,
694
+ transform: v.dontSetMe
695
+ })), T(Y, "defaultProps", R(R({}, m.default.defaultProps), {}, {
696
+ axis: "both",
697
+ bounds: !1,
698
+ defaultClassName: "react-draggable",
699
+ defaultClassNameDragging: "react-draggable-dragging",
700
+ defaultClassNameDragged: "react-draggable-dragged",
701
+ defaultPosition: {
702
+ x: 0,
703
+ y: 0
704
+ },
705
+ scale: 1
706
+ }));
707
+ })(be);
708
+ var _e = be, Se = _e.default, ze = _e.DraggableCore;
709
+ re.exports = Se;
710
+ re.exports.default = Se;
711
+ re.exports.DraggableCore = ze;
712
+ export {
713
+ re as c
714
+ };