easy-drag-and-drop 1.3.15 → 1.3.17
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/example.js +3757 -3765
- package/lib/element/drag.js +44 -55
- package/lib/element/drop.js +40 -51
- package/lib/example/div/drag.js +35 -35
- package/lib/example/div/drop.js +48 -59
- package/lib/example/view.js +42 -53
- package/lib/example.js +5 -5
- package/lib/index.js +7 -7
- package/lib/mixins/drag.js +13 -13
- package/lib/mixins/drop.js +13 -13
- package/package.json +2 -2
package/lib/element/drag.js
CHANGED
|
@@ -8,43 +8,32 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
var
|
|
11
|
+
var _easywithstyle = /*#__PURE__*/ _interop_require_default(require("easy-with-style"));
|
|
12
12
|
var _easy = require("easy");
|
|
13
|
-
var _drag = /*#__PURE__*/
|
|
14
|
-
function
|
|
13
|
+
var _drag = /*#__PURE__*/ _interop_require_default(require("../mixins/drag"));
|
|
14
|
+
function _assert_this_initialized(self) {
|
|
15
15
|
if (self === void 0) {
|
|
16
16
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
17
17
|
}
|
|
18
18
|
return self;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function _class_call_check(instance, Constructor) {
|
|
21
21
|
if (!(instance instanceof Constructor)) {
|
|
22
22
|
throw new TypeError("Cannot call a class as a function");
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
function isNativeReflectConstruct() {
|
|
26
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
27
|
-
if (Reflect.construct.sham) return false;
|
|
28
|
-
if (typeof Proxy === "function") return true;
|
|
29
|
-
try {
|
|
30
|
-
Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
|
|
31
|
-
return true;
|
|
32
|
-
} catch (e) {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
25
|
function _construct(Parent, args, Class) {
|
|
37
|
-
if (
|
|
26
|
+
if (_is_native_reflect_construct()) {
|
|
38
27
|
_construct = Reflect.construct;
|
|
39
28
|
} else {
|
|
40
|
-
_construct = function
|
|
29
|
+
_construct = function construct(Parent, args, Class) {
|
|
41
30
|
var a = [
|
|
42
31
|
null
|
|
43
32
|
];
|
|
44
33
|
a.push.apply(a, args);
|
|
45
34
|
var Constructor = Function.bind.apply(Parent, a);
|
|
46
35
|
var instance = new Constructor();
|
|
47
|
-
if (Class)
|
|
36
|
+
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
48
37
|
return instance;
|
|
49
38
|
};
|
|
50
39
|
}
|
|
@@ -59,12 +48,12 @@ function _defineProperties(target, props) {
|
|
|
59
48
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
60
49
|
}
|
|
61
50
|
}
|
|
62
|
-
function
|
|
51
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
63
52
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
64
53
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
65
54
|
return Constructor;
|
|
66
55
|
}
|
|
67
|
-
function
|
|
56
|
+
function _define_property(obj, key, value) {
|
|
68
57
|
if (key in obj) {
|
|
69
58
|
Object.defineProperty(obj, key, {
|
|
70
59
|
value: value,
|
|
@@ -77,11 +66,11 @@ function _defineProperty(obj, key, value) {
|
|
|
77
66
|
}
|
|
78
67
|
return obj;
|
|
79
68
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
69
|
+
function _get_prototype_of(o) {
|
|
70
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
82
71
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
83
72
|
};
|
|
84
|
-
return
|
|
73
|
+
return _get_prototype_of(o);
|
|
85
74
|
}
|
|
86
75
|
function _inherits(subClass, superClass) {
|
|
87
76
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -94,30 +83,30 @@ function _inherits(subClass, superClass) {
|
|
|
94
83
|
configurable: true
|
|
95
84
|
}
|
|
96
85
|
});
|
|
97
|
-
if (superClass)
|
|
86
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
98
87
|
}
|
|
99
|
-
function
|
|
88
|
+
function _interop_require_default(obj) {
|
|
100
89
|
return obj && obj.__esModule ? obj : {
|
|
101
90
|
default: obj
|
|
102
91
|
};
|
|
103
92
|
}
|
|
104
|
-
function
|
|
93
|
+
function _is_native_function(fn) {
|
|
105
94
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
106
95
|
}
|
|
107
|
-
function
|
|
108
|
-
if (call && (
|
|
96
|
+
function _possible_constructor_return(self, call) {
|
|
97
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
109
98
|
return call;
|
|
110
99
|
}
|
|
111
|
-
return
|
|
100
|
+
return _assert_this_initialized(self);
|
|
112
101
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
102
|
+
function _set_prototype_of(o, p) {
|
|
103
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
115
104
|
o.__proto__ = p;
|
|
116
105
|
return o;
|
|
117
106
|
};
|
|
118
|
-
return
|
|
107
|
+
return _set_prototype_of(o, p);
|
|
119
108
|
}
|
|
120
|
-
function
|
|
109
|
+
function _tagged_template_literal(strings, raw) {
|
|
121
110
|
if (!raw) {
|
|
122
111
|
raw = strings.slice(0);
|
|
123
112
|
}
|
|
@@ -127,14 +116,14 @@ function _taggedTemplateLiteral(strings, raw) {
|
|
|
127
116
|
}
|
|
128
117
|
}));
|
|
129
118
|
}
|
|
130
|
-
|
|
119
|
+
function _type_of(obj) {
|
|
131
120
|
"@swc/helpers - typeof";
|
|
132
121
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
133
|
-
}
|
|
134
|
-
function
|
|
122
|
+
}
|
|
123
|
+
function _wrap_native_super(Class) {
|
|
135
124
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
136
|
-
|
|
137
|
-
if (Class === null || !
|
|
125
|
+
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
126
|
+
if (Class === null || !_is_native_function(Class)) return Class;
|
|
138
127
|
if (typeof Class !== "function") {
|
|
139
128
|
throw new TypeError("Super expression must either be null or a function");
|
|
140
129
|
}
|
|
@@ -143,7 +132,7 @@ function _wrapNativeSuper(Class) {
|
|
|
143
132
|
_cache.set(Class, Wrapper);
|
|
144
133
|
}
|
|
145
134
|
function Wrapper() {
|
|
146
|
-
return _construct(Class, arguments,
|
|
135
|
+
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
147
136
|
}
|
|
148
137
|
Wrapper.prototype = Object.create(Class.prototype, {
|
|
149
138
|
constructor: {
|
|
@@ -153,11 +142,11 @@ function _wrapNativeSuper(Class) {
|
|
|
153
142
|
configurable: true
|
|
154
143
|
}
|
|
155
144
|
});
|
|
156
|
-
return
|
|
145
|
+
return _set_prototype_of(Wrapper, Class);
|
|
157
146
|
};
|
|
158
|
-
return
|
|
147
|
+
return _wrap_native_super(Class);
|
|
159
148
|
}
|
|
160
|
-
function
|
|
149
|
+
function _is_native_reflect_construct() {
|
|
161
150
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
162
151
|
if (Reflect.construct.sham) return false;
|
|
163
152
|
if (typeof Proxy === "function") return true;
|
|
@@ -168,21 +157,21 @@ function _isNativeReflectConstruct() {
|
|
|
168
157
|
return false;
|
|
169
158
|
}
|
|
170
159
|
}
|
|
171
|
-
function
|
|
172
|
-
var hasNativeReflectConstruct =
|
|
160
|
+
function _create_super(Derived) {
|
|
161
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
173
162
|
return function _createSuperInternal() {
|
|
174
|
-
var Super =
|
|
163
|
+
var Super = _get_prototype_of(Derived), result;
|
|
175
164
|
if (hasNativeReflectConstruct) {
|
|
176
|
-
var NewTarget =
|
|
165
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
177
166
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
178
167
|
} else {
|
|
179
168
|
result = Super.apply(this, arguments);
|
|
180
169
|
}
|
|
181
|
-
return
|
|
170
|
+
return _possible_constructor_return(this, result);
|
|
182
171
|
};
|
|
183
172
|
}
|
|
184
173
|
function _templateObject() {
|
|
185
|
-
var data =
|
|
174
|
+
var data = _tagged_template_literal([
|
|
186
175
|
"\n\n .dragging {\n z-index: 1;\n position: fixed;\n pointer-events: none;\n }\n \n"
|
|
187
176
|
]);
|
|
188
177
|
_templateObject = function _templateObject() {
|
|
@@ -192,12 +181,12 @@ function _templateObject() {
|
|
|
192
181
|
}
|
|
193
182
|
var DragElement = /*#__PURE__*/ function(Element) {
|
|
194
183
|
_inherits(DragElement, Element);
|
|
195
|
-
var _super =
|
|
184
|
+
var _super = _create_super(DragElement);
|
|
196
185
|
function DragElement() {
|
|
197
|
-
|
|
186
|
+
_class_call_check(this, DragElement);
|
|
198
187
|
return _super.apply(this, arguments);
|
|
199
188
|
}
|
|
200
|
-
|
|
189
|
+
_create_class(DragElement, [
|
|
201
190
|
{
|
|
202
191
|
key: "didMount",
|
|
203
192
|
value: function didMount() {
|
|
@@ -212,13 +201,13 @@ var DragElement = /*#__PURE__*/ function(Element) {
|
|
|
212
201
|
}
|
|
213
202
|
]);
|
|
214
203
|
return DragElement;
|
|
215
|
-
}(
|
|
216
|
-
|
|
204
|
+
}(_wrap_native_super(_easy.Element));
|
|
205
|
+
_define_property(DragElement, "ignoredProperties", [
|
|
217
206
|
"onDrag",
|
|
218
207
|
"onStartDrag",
|
|
219
208
|
"offStartDrag"
|
|
220
209
|
]);
|
|
221
210
|
Object.assign(DragElement.prototype, _drag.default);
|
|
222
|
-
var _default = (0,
|
|
211
|
+
var _default = (0, _easywithstyle.default)(DragElement)(_templateObject());
|
|
223
212
|
|
|
224
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
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YWdNaXhpbnMiLCJ3aXRoU3R5bGUiXSwibWFwcGluZ3MiOiJBQUFBOzs7OytCQTBCQTs7O2VBQUE7OztvRUF4QnNCO29CQUVFOzJEQUVEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRXZCLElBQUEsQUFBTUEsNEJBZ0JILEFBaEJIO2NBQU1BOytCQUFBQTthQUFBQTtnQ0FBQUE7OztrQkFBQUE7O1lBQ0pDLEtBQUFBO21CQUFBQSxTQUFBQSxXQUFXO2dCQUNULElBQUksQ0FBQ0MsVUFBVTtZQUNqQjs7O1lBRUFDLEtBQUFBO21CQUFBQSxTQUFBQSxjQUFjO2dCQUNaLElBQUksQ0FBQ0MsV0FBVztZQUNsQjs7O1dBUElKO3FCQUFvQkssYUFBTztBQVMvQixpQkFUSUwsYUFTR00scUJBQW9CO0lBQ3pCO0lBQ0E7SUFDQTtDQUNEO0FBR0hDLE9BQU9DLE1BQU0sQ0FBQ1IsWUFBWVMsU0FBUyxFQUFFQyxhQUFVO0lBRS9DLFdBQWVDLElBQUFBLHNCQUFTLEVBQUNYIn0=
|
package/lib/element/drop.js
CHANGED
|
@@ -9,41 +9,30 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _easy = require("easy");
|
|
12
|
-
var _drop = /*#__PURE__*/
|
|
13
|
-
function
|
|
12
|
+
var _drop = /*#__PURE__*/ _interop_require_default(require("../mixins/drop"));
|
|
13
|
+
function _assert_this_initialized(self) {
|
|
14
14
|
if (self === void 0) {
|
|
15
15
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
16
|
}
|
|
17
17
|
return self;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function _class_call_check(instance, Constructor) {
|
|
20
20
|
if (!(instance instanceof Constructor)) {
|
|
21
21
|
throw new TypeError("Cannot call a class as a function");
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function isNativeReflectConstruct() {
|
|
25
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
26
|
-
if (Reflect.construct.sham) return false;
|
|
27
|
-
if (typeof Proxy === "function") return true;
|
|
28
|
-
try {
|
|
29
|
-
Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
|
|
30
|
-
return true;
|
|
31
|
-
} catch (e) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
24
|
function _construct(Parent, args, Class) {
|
|
36
|
-
if (
|
|
25
|
+
if (_is_native_reflect_construct()) {
|
|
37
26
|
_construct = Reflect.construct;
|
|
38
27
|
} else {
|
|
39
|
-
_construct = function
|
|
28
|
+
_construct = function construct(Parent, args, Class) {
|
|
40
29
|
var a = [
|
|
41
30
|
null
|
|
42
31
|
];
|
|
43
32
|
a.push.apply(a, args);
|
|
44
33
|
var Constructor = Function.bind.apply(Parent, a);
|
|
45
34
|
var instance = new Constructor();
|
|
46
|
-
if (Class)
|
|
35
|
+
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
47
36
|
return instance;
|
|
48
37
|
};
|
|
49
38
|
}
|
|
@@ -58,12 +47,12 @@ function _defineProperties(target, props) {
|
|
|
58
47
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
59
48
|
}
|
|
60
49
|
}
|
|
61
|
-
function
|
|
50
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
62
51
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
63
52
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
64
53
|
return Constructor;
|
|
65
54
|
}
|
|
66
|
-
function
|
|
55
|
+
function _define_property(obj, key, value) {
|
|
67
56
|
if (key in obj) {
|
|
68
57
|
Object.defineProperty(obj, key, {
|
|
69
58
|
value: value,
|
|
@@ -76,11 +65,11 @@ function _defineProperty(obj, key, value) {
|
|
|
76
65
|
}
|
|
77
66
|
return obj;
|
|
78
67
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
68
|
+
function _get_prototype_of(o) {
|
|
69
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
81
70
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
82
71
|
};
|
|
83
|
-
return
|
|
72
|
+
return _get_prototype_of(o);
|
|
84
73
|
}
|
|
85
74
|
function _inherits(subClass, superClass) {
|
|
86
75
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -93,37 +82,37 @@ function _inherits(subClass, superClass) {
|
|
|
93
82
|
configurable: true
|
|
94
83
|
}
|
|
95
84
|
});
|
|
96
|
-
if (superClass)
|
|
85
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
97
86
|
}
|
|
98
|
-
function
|
|
87
|
+
function _interop_require_default(obj) {
|
|
99
88
|
return obj && obj.__esModule ? obj : {
|
|
100
89
|
default: obj
|
|
101
90
|
};
|
|
102
91
|
}
|
|
103
|
-
function
|
|
92
|
+
function _is_native_function(fn) {
|
|
104
93
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
105
94
|
}
|
|
106
|
-
function
|
|
107
|
-
if (call && (
|
|
95
|
+
function _possible_constructor_return(self, call) {
|
|
96
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
108
97
|
return call;
|
|
109
98
|
}
|
|
110
|
-
return
|
|
99
|
+
return _assert_this_initialized(self);
|
|
111
100
|
}
|
|
112
|
-
function
|
|
113
|
-
|
|
101
|
+
function _set_prototype_of(o, p) {
|
|
102
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
114
103
|
o.__proto__ = p;
|
|
115
104
|
return o;
|
|
116
105
|
};
|
|
117
|
-
return
|
|
106
|
+
return _set_prototype_of(o, p);
|
|
118
107
|
}
|
|
119
|
-
|
|
108
|
+
function _type_of(obj) {
|
|
120
109
|
"@swc/helpers - typeof";
|
|
121
110
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
122
|
-
}
|
|
123
|
-
function
|
|
111
|
+
}
|
|
112
|
+
function _wrap_native_super(Class) {
|
|
124
113
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
125
|
-
|
|
126
|
-
if (Class === null || !
|
|
114
|
+
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
115
|
+
if (Class === null || !_is_native_function(Class)) return Class;
|
|
127
116
|
if (typeof Class !== "function") {
|
|
128
117
|
throw new TypeError("Super expression must either be null or a function");
|
|
129
118
|
}
|
|
@@ -132,7 +121,7 @@ function _wrapNativeSuper(Class) {
|
|
|
132
121
|
_cache.set(Class, Wrapper);
|
|
133
122
|
}
|
|
134
123
|
function Wrapper() {
|
|
135
|
-
return _construct(Class, arguments,
|
|
124
|
+
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
136
125
|
}
|
|
137
126
|
Wrapper.prototype = Object.create(Class.prototype, {
|
|
138
127
|
constructor: {
|
|
@@ -142,11 +131,11 @@ function _wrapNativeSuper(Class) {
|
|
|
142
131
|
configurable: true
|
|
143
132
|
}
|
|
144
133
|
});
|
|
145
|
-
return
|
|
134
|
+
return _set_prototype_of(Wrapper, Class);
|
|
146
135
|
};
|
|
147
|
-
return
|
|
136
|
+
return _wrap_native_super(Class);
|
|
148
137
|
}
|
|
149
|
-
function
|
|
138
|
+
function _is_native_reflect_construct() {
|
|
150
139
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
151
140
|
if (Reflect.construct.sham) return false;
|
|
152
141
|
if (typeof Proxy === "function") return true;
|
|
@@ -157,27 +146,27 @@ function _isNativeReflectConstruct() {
|
|
|
157
146
|
return false;
|
|
158
147
|
}
|
|
159
148
|
}
|
|
160
|
-
function
|
|
161
|
-
var hasNativeReflectConstruct =
|
|
149
|
+
function _create_super(Derived) {
|
|
150
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
162
151
|
return function _createSuperInternal() {
|
|
163
|
-
var Super =
|
|
152
|
+
var Super = _get_prototype_of(Derived), result;
|
|
164
153
|
if (hasNativeReflectConstruct) {
|
|
165
|
-
var NewTarget =
|
|
154
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
166
155
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
167
156
|
} else {
|
|
168
157
|
result = Super.apply(this, arguments);
|
|
169
158
|
}
|
|
170
|
-
return
|
|
159
|
+
return _possible_constructor_return(this, result);
|
|
171
160
|
};
|
|
172
161
|
}
|
|
173
162
|
var DropElement = /*#__PURE__*/ function(Element) {
|
|
174
163
|
_inherits(DropElement, Element);
|
|
175
|
-
var _super =
|
|
164
|
+
var _super = _create_super(DropElement);
|
|
176
165
|
function DropElement() {
|
|
177
|
-
|
|
166
|
+
_class_call_check(this, DropElement);
|
|
178
167
|
return _super.apply(this, arguments);
|
|
179
168
|
}
|
|
180
|
-
|
|
169
|
+
_create_class(DropElement, [
|
|
181
170
|
{
|
|
182
171
|
key: "didMount",
|
|
183
172
|
value: function didMount() {
|
|
@@ -192,12 +181,12 @@ var DropElement = /*#__PURE__*/ function(Element) {
|
|
|
192
181
|
}
|
|
193
182
|
]);
|
|
194
183
|
return DropElement;
|
|
195
|
-
}(
|
|
196
|
-
|
|
184
|
+
}(_wrap_native_super(_easy.Element));
|
|
185
|
+
_define_property(DropElement, "ignoredProperties", [
|
|
197
186
|
"onDrop",
|
|
198
187
|
"onDragOut",
|
|
199
188
|
"onDragOver"
|
|
200
189
|
]);
|
|
201
190
|
Object.assign(DropElement.prototype, _drop.default);
|
|
202
191
|
|
|
203
|
-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ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRVIsSUFBQSxBQUFNQSw0QkFnQmxCLEFBaEJZO2NBQU1BOytCQUFBQTthQUFBQTtnQ0FBQUE7OztrQkFBQUE7O1lBQ25CQyxLQUFBQTttQkFBQUEsU0FBQUEsV0FBVztnQkFDVCxJQUFJLENBQUNDLFVBQVU7WUFDakI7OztZQUVBQyxLQUFBQTttQkFBQUEsU0FBQUEsY0FBYztnQkFDWixJQUFJLENBQUNDLFdBQVc7WUFDbEI7OztXQVBtQko7cUJBQW9CSyxhQUFPO0FBUzlDLGlCQVRtQkwsYUFTWk0scUJBQW9CO0lBQ3pCO0lBQ0E7SUFDQTtDQUNEO0FBR0hDLE9BQU9DLE1BQU0sQ0FBQ1IsWUFBWVMsU0FBUyxFQUFFQyxhQUFVIn0=
|
package/lib/example/div/drag.js
CHANGED
|
@@ -8,17 +8,17 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
var
|
|
11
|
+
var _easywithstyle = /*#__PURE__*/ _interop_require_default(require("easy-with-style"));
|
|
12
12
|
var _easy = require("easy");
|
|
13
13
|
var _index = require("../../index");
|
|
14
|
-
var _style = /*#__PURE__*/
|
|
15
|
-
function
|
|
14
|
+
var _style = /*#__PURE__*/ _interop_require_default(require("../style"));
|
|
15
|
+
function _assert_this_initialized(self) {
|
|
16
16
|
if (self === void 0) {
|
|
17
17
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
18
18
|
}
|
|
19
19
|
return self;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function _class_call_check(instance, Constructor) {
|
|
22
22
|
if (!(instance instanceof Constructor)) {
|
|
23
23
|
throw new TypeError("Cannot call a class as a function");
|
|
24
24
|
}
|
|
@@ -32,12 +32,12 @@ function _defineProperties(target, props) {
|
|
|
32
32
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
36
36
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
37
37
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
38
38
|
return Constructor;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function _define_property(obj, key, value) {
|
|
41
41
|
if (key in obj) {
|
|
42
42
|
Object.defineProperty(obj, key, {
|
|
43
43
|
value: value,
|
|
@@ -50,11 +50,11 @@ function _defineProperty(obj, key, value) {
|
|
|
50
50
|
}
|
|
51
51
|
return obj;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
53
|
+
function _get_prototype_of(o) {
|
|
54
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
55
55
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
56
56
|
};
|
|
57
|
-
return
|
|
57
|
+
return _get_prototype_of(o);
|
|
58
58
|
}
|
|
59
59
|
function _inherits(subClass, superClass) {
|
|
60
60
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -67,27 +67,27 @@ function _inherits(subClass, superClass) {
|
|
|
67
67
|
configurable: true
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
|
-
if (superClass)
|
|
70
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function _interop_require_default(obj) {
|
|
73
73
|
return obj && obj.__esModule ? obj : {
|
|
74
74
|
default: obj
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
if (call && (
|
|
77
|
+
function _possible_constructor_return(self, call) {
|
|
78
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
79
79
|
return call;
|
|
80
80
|
}
|
|
81
|
-
return
|
|
81
|
+
return _assert_this_initialized(self);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
83
|
+
function _set_prototype_of(o, p) {
|
|
84
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
85
85
|
o.__proto__ = p;
|
|
86
86
|
return o;
|
|
87
87
|
};
|
|
88
|
-
return
|
|
88
|
+
return _set_prototype_of(o, p);
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function _tagged_template_literal(strings, raw) {
|
|
91
91
|
if (!raw) {
|
|
92
92
|
raw = strings.slice(0);
|
|
93
93
|
}
|
|
@@ -97,11 +97,11 @@ function _taggedTemplateLiteral(strings, raw) {
|
|
|
97
97
|
}
|
|
98
98
|
}));
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
function _type_of(obj) {
|
|
101
101
|
"@swc/helpers - typeof";
|
|
102
102
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
103
|
-
}
|
|
104
|
-
function
|
|
103
|
+
}
|
|
104
|
+
function _is_native_reflect_construct() {
|
|
105
105
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
106
106
|
if (Reflect.construct.sham) return false;
|
|
107
107
|
if (typeof Proxy === "function") return true;
|
|
@@ -112,21 +112,21 @@ function _isNativeReflectConstruct() {
|
|
|
112
112
|
return false;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
var hasNativeReflectConstruct =
|
|
115
|
+
function _create_super(Derived) {
|
|
116
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
117
117
|
return function _createSuperInternal() {
|
|
118
|
-
var Super =
|
|
118
|
+
var Super = _get_prototype_of(Derived), result;
|
|
119
119
|
if (hasNativeReflectConstruct) {
|
|
120
|
-
var NewTarget =
|
|
120
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
121
121
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
122
122
|
} else {
|
|
123
123
|
result = Super.apply(this, arguments);
|
|
124
124
|
}
|
|
125
|
-
return
|
|
125
|
+
return _possible_constructor_return(this, result);
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
function _templateObject() {
|
|
129
|
-
var data =
|
|
129
|
+
var data = _tagged_template_literal([
|
|
130
130
|
"\n\n ",
|
|
131
131
|
"\n \n background-color: red;\n \n .dragging {\n z-index: 1;\n position: fixed;\n pointer-events: none;\n }\n\n"
|
|
132
132
|
]);
|
|
@@ -138,17 +138,17 @@ function _templateObject() {
|
|
|
138
138
|
var DBLCLICK_EVENT_TYPE = _easy.eventTypes.DBLCLICK_EVENT_TYPE;
|
|
139
139
|
var DragDiv = /*#__PURE__*/ function(DragElement) {
|
|
140
140
|
_inherits(DragDiv, DragElement);
|
|
141
|
-
var _super =
|
|
141
|
+
var _super = _create_super(DragDiv);
|
|
142
142
|
function DragDiv() {
|
|
143
|
-
|
|
143
|
+
_class_call_check(this, DragDiv);
|
|
144
144
|
var _this;
|
|
145
145
|
_this = _super.apply(this, arguments);
|
|
146
|
-
|
|
146
|
+
_define_property(_assert_this_initialized(_this), "doubleClickHandler", function(event, element) {
|
|
147
147
|
console.log("double click!");
|
|
148
148
|
});
|
|
149
149
|
return _this;
|
|
150
150
|
}
|
|
151
|
-
|
|
151
|
+
_create_class(DragDiv, [
|
|
152
152
|
{
|
|
153
153
|
key: "didMount",
|
|
154
154
|
value: function didMount() {
|
|
@@ -172,11 +172,11 @@ var DragDiv = /*#__PURE__*/ function(DragElement) {
|
|
|
172
172
|
]);
|
|
173
173
|
return DragDiv;
|
|
174
174
|
}(_index.DragElement);
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
_define_property(DragDiv, "tagName", "div");
|
|
176
|
+
_define_property(DragDiv, "defaultProperties", {
|
|
177
177
|
className: "drag"
|
|
178
178
|
});
|
|
179
179
|
Object.assign(DragDiv.prototype, _index.dragMixins);
|
|
180
|
-
var _default = (0,
|
|
180
|
+
var _default = (0, _easywithstyle.default)(DragDiv)(_templateObject(), _style.default);
|
|
181
181
|
|
|
182
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
182
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL2Rpdi9kcmFnLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgd2l0aFN0eWxlIGZyb20gXCJlYXN5LXdpdGgtc3R5bGVcIjtcblxuaW1wb3J0IHsgZXZlbnRUeXBlcyB9IGZyb20gXCJlYXN5XCI7XG5pbXBvcnQgeyBkcmFnTWl4aW5zLCBEcmFnRWxlbWVudCB9IGZyb20gXCIuLi8uLi9pbmRleFwiOyAvLy9cblxuaW1wb3J0IHN0eWxlIGZyb20gXCIuLi9zdHlsZVwiO1xuXG5jb25zdCB7IERCTENMSUNLX0VWRU5UX1RZUEUgfSA9IGV2ZW50VHlwZXM7XG5cbmNsYXNzIERyYWdEaXYgZXh0ZW5kcyBEcmFnRWxlbWVudCB7XG4gIGRvdWJsZUNsaWNrSGFuZGxlciA9IChldmVudCwgZWxlbWVudCkgPT4ge1xuICAgIGNvbnNvbGUubG9nKFwiZG91YmxlIGNsaWNrIVwiKVxuICB9XG5cbiAgZGlkTW91bnQoKSB7XG4gICAgdGhpcy5lbmFibGVEcmFnKCk7XG5cbiAgICB0aGlzLm9uKERCTENMSUNLX0VWRU5UX1RZUEUsIHRoaXMuZG91YmxlQ2xpY2tIYW5kbGVyLCB0aGlzKTtcbiAgfVxuXG4gIHdpbGxVbm1vdW50KCkge1xuICAgIHRoaXMub2ZmKERCTENMSUNLX0VWRU5UX1RZUEUsIHRoaXMuZG91YmxlQ2xpY2tIYW5kbGVyLCB0aGlzKTtcblxuICAgIHRoaXMuZGlzYWJsZURyYWcoKTtcbiAgfVxuXG4gIGN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