easy-layout 6.0.290 → 6.0.292
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/lib/constants.js +2 -2
- package/lib/cursor.js +20 -20
- package/lib/cursors.js +5 -5
- package/lib/div/column.js +13 -151
- package/lib/div/columns.js +14 -151
- package/lib/div/row.js +13 -151
- package/lib/div/rows.js +14 -151
- package/lib/div/sizeable.js +12 -151
- package/lib/div/splitter/horizontal.js +43 -163
- package/lib/div/splitter/vertical.js +43 -163
- package/lib/div/splitter.js +86 -275
- package/lib/example/div/bottomLeft.js +11 -25
- package/lib/example/div/column/middle.js +11 -104
- package/lib/example/div/row/blue.js +11 -104
- package/lib/example/div/row/yellow.js +11 -104
- package/lib/example/div/sizeable/bottom.js +11 -104
- package/lib/example/div/sizeable/left.js +13 -104
- package/lib/example/div/sizeable/right.js +12 -104
- package/lib/example/div/splitter/horizontal/main.js +11 -104
- package/lib/example/div/splitter/pseudo.js +12 -25
- package/lib/example/div/splitter/vertical/left.js +11 -104
- package/lib/example/div/splitter/vertical/right.js +11 -104
- package/lib/example/preamble.js +2 -2
- package/lib/example/section/text.js +13 -25
- package/lib/example/view.js +29 -42
- package/lib/example.js +6 -6
- package/lib/index.js +10 -10
- package/package.json +5 -1
- package/.swcrc +0 -11
- package/bin/main.js +0 -15
- package/example.js +0 -37321
- package/index.html +0 -46
package/lib/div/rows.js
CHANGED
|
@@ -8,162 +8,25 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function _assert_this_initialized(self) {
|
|
14
|
-
if (self === void 0) {
|
|
15
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
|
-
}
|
|
17
|
-
return self;
|
|
18
|
-
}
|
|
19
|
-
function _call_super(_this, derived, args) {
|
|
20
|
-
derived = _get_prototype_of(derived);
|
|
21
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
22
|
-
}
|
|
23
|
-
function _class_call_check(instance, Constructor) {
|
|
24
|
-
if (!(instance instanceof Constructor)) {
|
|
25
|
-
throw new TypeError("Cannot call a class as a function");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function _construct(Parent, args, Class) {
|
|
29
|
-
if (_is_native_reflect_construct()) {
|
|
30
|
-
_construct = Reflect.construct;
|
|
31
|
-
} else {
|
|
32
|
-
_construct = function construct(Parent, args, Class) {
|
|
33
|
-
var a = [
|
|
34
|
-
null
|
|
35
|
-
];
|
|
36
|
-
a.push.apply(a, args);
|
|
37
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
38
|
-
var instance = new Constructor();
|
|
39
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
40
|
-
return instance;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return _construct.apply(null, arguments);
|
|
44
|
-
}
|
|
45
|
-
function _define_property(obj, key, value) {
|
|
46
|
-
if (key in obj) {
|
|
47
|
-
Object.defineProperty(obj, key, {
|
|
48
|
-
value: value,
|
|
49
|
-
enumerable: true,
|
|
50
|
-
configurable: true,
|
|
51
|
-
writable: true
|
|
52
|
-
});
|
|
53
|
-
} else {
|
|
54
|
-
obj[key] = value;
|
|
55
|
-
}
|
|
56
|
-
return obj;
|
|
57
|
-
}
|
|
58
|
-
function _get_prototype_of(o) {
|
|
59
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
60
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
61
|
-
};
|
|
62
|
-
return _get_prototype_of(o);
|
|
63
|
-
}
|
|
64
|
-
function _inherits(subClass, superClass) {
|
|
65
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
66
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
67
|
-
}
|
|
68
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
69
|
-
constructor: {
|
|
70
|
-
value: subClass,
|
|
71
|
-
writable: true,
|
|
72
|
-
configurable: true
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
76
|
-
}
|
|
11
|
+
const _easywithstyle = /*#__PURE__*/ _interop_require_default(require("easy-with-style"));
|
|
12
|
+
const _easy = require("easy");
|
|
77
13
|
function _interop_require_default(obj) {
|
|
78
14
|
return obj && obj.__esModule ? obj : {
|
|
79
15
|
default: obj
|
|
80
16
|
};
|
|
81
17
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
87
|
-
return call;
|
|
88
|
-
}
|
|
89
|
-
return _assert_this_initialized(self);
|
|
90
|
-
}
|
|
91
|
-
function _set_prototype_of(o, p) {
|
|
92
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
93
|
-
o.__proto__ = p;
|
|
94
|
-
return o;
|
|
95
|
-
};
|
|
96
|
-
return _set_prototype_of(o, p);
|
|
97
|
-
}
|
|
98
|
-
function _tagged_template_literal(strings, raw) {
|
|
99
|
-
if (!raw) {
|
|
100
|
-
raw = strings.slice(0);
|
|
101
|
-
}
|
|
102
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
103
|
-
raw: {
|
|
104
|
-
value: Object.freeze(raw)
|
|
105
|
-
}
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
function _type_of(obj) {
|
|
109
|
-
"@swc/helpers - typeof";
|
|
110
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
111
|
-
}
|
|
112
|
-
function _wrap_native_super(Class) {
|
|
113
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
114
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
115
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
116
|
-
if (typeof Class !== "function") {
|
|
117
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
118
|
-
}
|
|
119
|
-
if (typeof _cache !== "undefined") {
|
|
120
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
121
|
-
_cache.set(Class, Wrapper);
|
|
122
|
-
}
|
|
123
|
-
function Wrapper() {
|
|
124
|
-
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
125
|
-
}
|
|
126
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
127
|
-
constructor: {
|
|
128
|
-
value: Wrapper,
|
|
129
|
-
enumerable: false,
|
|
130
|
-
writable: true,
|
|
131
|
-
configurable: true
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
return _set_prototype_of(Wrapper, Class);
|
|
135
|
-
};
|
|
136
|
-
return _wrap_native_super(Class);
|
|
137
|
-
}
|
|
138
|
-
function _is_native_reflect_construct() {
|
|
139
|
-
try {
|
|
140
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
141
|
-
} catch (_) {}
|
|
142
|
-
return (_is_native_reflect_construct = function() {
|
|
143
|
-
return !!result;
|
|
144
|
-
})();
|
|
145
|
-
}
|
|
146
|
-
function _templateObject() {
|
|
147
|
-
var data = _tagged_template_literal([
|
|
148
|
-
"\n\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n\n"
|
|
149
|
-
]);
|
|
150
|
-
_templateObject = function _templateObject() {
|
|
151
|
-
return data;
|
|
18
|
+
class RowsDiv extends _easy.Element {
|
|
19
|
+
static tagName = "div";
|
|
20
|
+
static defaultProperties = {
|
|
21
|
+
className: "rows"
|
|
152
22
|
};
|
|
153
|
-
return data;
|
|
154
23
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}(_wrap_native_super(_easy.Element));
|
|
163
|
-
_define_property(RowsDiv, "tagName", "div");
|
|
164
|
-
_define_property(RowsDiv, "defaultProperties", {
|
|
165
|
-
className: "rows"
|
|
166
|
-
});
|
|
167
|
-
var _default = (0, _easywithstyle.default)(RowsDiv)(_templateObject());
|
|
24
|
+
const _default = (0, _easywithstyle.default)(RowsDiv)`
|
|
25
|
+
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-grow: 1;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
|
|
30
|
+
`;
|
|
168
31
|
|
|
169
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaXYvcm93cy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IHdpdGhTdHlsZSBmcm9tIFwiZWFzeS13aXRoLXN0eWxlXCI7ICAvLy9cblxuaW1wb3J0IHsgRWxlbWVudCB9IGZyb20gXCJlYXN5XCI7XG5cbmNsYXNzIFJvd3NEaXYgZXh0ZW5kcyBFbGVtZW50IHtcbiAgc3RhdGljIHRhZ05hbWUgPSBcImRpdlwiO1xuXG4gIHN0YXRpYyBkZWZhdWx0UHJvcGVydGllcyA9IHtcbiAgICBjbGFzc05hbWU6IFwicm93c1wiXG4gIH07XG59XG5cbmV4cG9ydCBkZWZhdWx0IHdpdGhTdHlsZShSb3dzRGl2KWBcblxuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LWdyb3c6IDE7XG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG5cbmA7XG4iXSwibmFtZXMiOlsiUm93c0RpdiIsIkVsZW1lbnQiLCJ0YWdOYW1lIiwiZGVmYXVsdFByb3BlcnRpZXMiLCJjbGFzc05hbWUiLCJ3aXRoU3R5bGUiXSwibWFwcGluZ3MiOiJBQUFBOzs7OytCQWNBOzs7ZUFBQTs7O3NFQVpzQjtzQkFFRTs7Ozs7O0FBRXhCLE1BQU1BLGdCQUFnQkMsYUFBTztJQUMzQixPQUFPQyxVQUFVLE1BQU07SUFFdkIsT0FBT0Msb0JBQW9CO1FBQ3pCQyxXQUFXO0lBQ2IsRUFBRTtBQUNKO01BRUEsV0FBZUMsSUFBQUEsc0JBQVMsRUFBQ0wsUUFBUSxDQUFDOzs7Ozs7QUFNbEMsQ0FBQyJ9
|
package/lib/div/sizeable.js
CHANGED
|
@@ -8,162 +8,23 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function _assert_this_initialized(self) {
|
|
14
|
-
if (self === void 0) {
|
|
15
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
|
-
}
|
|
17
|
-
return self;
|
|
18
|
-
}
|
|
19
|
-
function _call_super(_this, derived, args) {
|
|
20
|
-
derived = _get_prototype_of(derived);
|
|
21
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
22
|
-
}
|
|
23
|
-
function _class_call_check(instance, Constructor) {
|
|
24
|
-
if (!(instance instanceof Constructor)) {
|
|
25
|
-
throw new TypeError("Cannot call a class as a function");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function _construct(Parent, args, Class) {
|
|
29
|
-
if (_is_native_reflect_construct()) {
|
|
30
|
-
_construct = Reflect.construct;
|
|
31
|
-
} else {
|
|
32
|
-
_construct = function construct(Parent, args, Class) {
|
|
33
|
-
var a = [
|
|
34
|
-
null
|
|
35
|
-
];
|
|
36
|
-
a.push.apply(a, args);
|
|
37
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
38
|
-
var instance = new Constructor();
|
|
39
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
40
|
-
return instance;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return _construct.apply(null, arguments);
|
|
44
|
-
}
|
|
45
|
-
function _define_property(obj, key, value) {
|
|
46
|
-
if (key in obj) {
|
|
47
|
-
Object.defineProperty(obj, key, {
|
|
48
|
-
value: value,
|
|
49
|
-
enumerable: true,
|
|
50
|
-
configurable: true,
|
|
51
|
-
writable: true
|
|
52
|
-
});
|
|
53
|
-
} else {
|
|
54
|
-
obj[key] = value;
|
|
55
|
-
}
|
|
56
|
-
return obj;
|
|
57
|
-
}
|
|
58
|
-
function _get_prototype_of(o) {
|
|
59
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
60
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
61
|
-
};
|
|
62
|
-
return _get_prototype_of(o);
|
|
63
|
-
}
|
|
64
|
-
function _inherits(subClass, superClass) {
|
|
65
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
66
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
67
|
-
}
|
|
68
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
69
|
-
constructor: {
|
|
70
|
-
value: subClass,
|
|
71
|
-
writable: true,
|
|
72
|
-
configurable: true
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
76
|
-
}
|
|
11
|
+
const _easywithstyle = /*#__PURE__*/ _interop_require_default(require("easy-with-style"));
|
|
12
|
+
const _easy = require("easy");
|
|
77
13
|
function _interop_require_default(obj) {
|
|
78
14
|
return obj && obj.__esModule ? obj : {
|
|
79
15
|
default: obj
|
|
80
16
|
};
|
|
81
17
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
87
|
-
return call;
|
|
88
|
-
}
|
|
89
|
-
return _assert_this_initialized(self);
|
|
90
|
-
}
|
|
91
|
-
function _set_prototype_of(o, p) {
|
|
92
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
93
|
-
o.__proto__ = p;
|
|
94
|
-
return o;
|
|
95
|
-
};
|
|
96
|
-
return _set_prototype_of(o, p);
|
|
97
|
-
}
|
|
98
|
-
function _tagged_template_literal(strings, raw) {
|
|
99
|
-
if (!raw) {
|
|
100
|
-
raw = strings.slice(0);
|
|
101
|
-
}
|
|
102
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
103
|
-
raw: {
|
|
104
|
-
value: Object.freeze(raw)
|
|
105
|
-
}
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
function _type_of(obj) {
|
|
109
|
-
"@swc/helpers - typeof";
|
|
110
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
111
|
-
}
|
|
112
|
-
function _wrap_native_super(Class) {
|
|
113
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
114
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
115
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
116
|
-
if (typeof Class !== "function") {
|
|
117
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
118
|
-
}
|
|
119
|
-
if (typeof _cache !== "undefined") {
|
|
120
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
121
|
-
_cache.set(Class, Wrapper);
|
|
122
|
-
}
|
|
123
|
-
function Wrapper() {
|
|
124
|
-
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
125
|
-
}
|
|
126
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
127
|
-
constructor: {
|
|
128
|
-
value: Wrapper,
|
|
129
|
-
enumerable: false,
|
|
130
|
-
writable: true,
|
|
131
|
-
configurable: true
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
return _set_prototype_of(Wrapper, Class);
|
|
18
|
+
class SizeableDiv extends _easy.Element {
|
|
19
|
+
static tagName = "div";
|
|
20
|
+
static defaultProperties = {
|
|
21
|
+
className: "sizeable"
|
|
135
22
|
};
|
|
136
|
-
return _wrap_native_super(Class);
|
|
137
23
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return !!result;
|
|
144
|
-
})();
|
|
145
|
-
}
|
|
146
|
-
function _templateObject() {
|
|
147
|
-
var data = _tagged_template_literal([
|
|
148
|
-
"\n\n display: flex;\n \n"
|
|
149
|
-
]);
|
|
150
|
-
_templateObject = function _templateObject() {
|
|
151
|
-
return data;
|
|
152
|
-
};
|
|
153
|
-
return data;
|
|
154
|
-
}
|
|
155
|
-
var SizeableDiv = /*#__PURE__*/ function(Element) {
|
|
156
|
-
_inherits(SizeableDiv, Element);
|
|
157
|
-
function SizeableDiv() {
|
|
158
|
-
_class_call_check(this, SizeableDiv);
|
|
159
|
-
return _call_super(this, SizeableDiv, arguments);
|
|
160
|
-
}
|
|
161
|
-
return SizeableDiv;
|
|
162
|
-
}(_wrap_native_super(_easy.Element));
|
|
163
|
-
_define_property(SizeableDiv, "tagName", "div");
|
|
164
|
-
_define_property(SizeableDiv, "defaultProperties", {
|
|
165
|
-
className: "sizeable"
|
|
166
|
-
});
|
|
167
|
-
var _default = (0, _easywithstyle.default)(SizeableDiv)(_templateObject());
|
|
24
|
+
const _default = (0, _easywithstyle.default)(SizeableDiv)`
|
|
25
|
+
|
|
26
|
+
display: flex;
|
|
27
|
+
|
|
28
|
+
`;
|
|
168
29
|
|
|
169
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaXYvc2l6ZWFibGUuanMiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmltcG9ydCB3aXRoU3R5bGUgZnJvbSBcImVhc3ktd2l0aC1zdHlsZVwiOyAgLy8vXG5cbmltcG9ydCB7IEVsZW1lbnQgfSBmcm9tIFwiZWFzeVwiO1xuXG5jbGFzcyBTaXplYWJsZURpdiBleHRlbmRzIEVsZW1lbnQge1xuICBzdGF0aWMgdGFnTmFtZSA9IFwiZGl2XCI7XG5cbiAgc3RhdGljIGRlZmF1bHRQcm9wZXJ0aWVzID0ge1xuICAgIGNsYXNzTmFtZTogXCJzaXplYWJsZVwiXG4gIH07XG59XG5cbmV4cG9ydCBkZWZhdWx0IHdpdGhTdHlsZShTaXplYWJsZURpdilgXG5cbiAgZGlzcGxheTogZmxleDtcbiAgXG5gO1xuIl0sIm5hbWVzIjpbIlNpemVhYmxlRGl2IiwiRWxlbWVudCIsInRhZ05hbWUiLCJkZWZhdWx0UHJvcGVydGllcyIsImNsYXNzTmFtZSIsIndpdGhTdHlsZSJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7K0JBY0E7OztlQUFBOzs7c0VBWnNCO3NCQUVFOzs7Ozs7QUFFeEIsTUFBTUEsb0JBQW9CQyxhQUFPO0lBQy9CLE9BQU9DLFVBQVUsTUFBTTtJQUV2QixPQUFPQyxvQkFBb0I7UUFDekJDLFdBQVc7SUFDYixFQUFFO0FBQ0o7TUFFQSxXQUFlQyxJQUFBQSxzQkFBUyxFQUFDTCxZQUFZLENBQUM7Ozs7QUFJdEMsQ0FBQyJ9
|
|
@@ -8,176 +8,56 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function _assert_this_initialized(self) {
|
|
15
|
-
if (self === void 0) {
|
|
16
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
17
|
-
}
|
|
18
|
-
return self;
|
|
19
|
-
}
|
|
20
|
-
function _call_super(_this, derived, args) {
|
|
21
|
-
derived = _get_prototype_of(derived);
|
|
22
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
23
|
-
}
|
|
24
|
-
function _class_call_check(instance, Constructor) {
|
|
25
|
-
if (!(instance instanceof Constructor)) {
|
|
26
|
-
throw new TypeError("Cannot call a class as a function");
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function _defineProperties(target, props) {
|
|
30
|
-
for(var i = 0; i < props.length; i++){
|
|
31
|
-
var descriptor = props[i];
|
|
32
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
33
|
-
descriptor.configurable = true;
|
|
34
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
35
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
39
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
40
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
41
|
-
return Constructor;
|
|
42
|
-
}
|
|
43
|
-
function _define_property(obj, key, value) {
|
|
44
|
-
if (key in obj) {
|
|
45
|
-
Object.defineProperty(obj, key, {
|
|
46
|
-
value: value,
|
|
47
|
-
enumerable: true,
|
|
48
|
-
configurable: true,
|
|
49
|
-
writable: true
|
|
50
|
-
});
|
|
51
|
-
} else {
|
|
52
|
-
obj[key] = value;
|
|
53
|
-
}
|
|
54
|
-
return obj;
|
|
55
|
-
}
|
|
56
|
-
function _get_prototype_of(o) {
|
|
57
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
58
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
59
|
-
};
|
|
60
|
-
return _get_prototype_of(o);
|
|
61
|
-
}
|
|
62
|
-
function _inherits(subClass, superClass) {
|
|
63
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
64
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
65
|
-
}
|
|
66
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
67
|
-
constructor: {
|
|
68
|
-
value: subClass,
|
|
69
|
-
writable: true,
|
|
70
|
-
configurable: true
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
74
|
-
}
|
|
11
|
+
const _easywithstyle = /*#__PURE__*/ _interop_require_default(require("easy-with-style"));
|
|
12
|
+
const _splitter = /*#__PURE__*/ _interop_require_default(require("../splitter"));
|
|
13
|
+
const _cursor = require("../../cursor");
|
|
75
14
|
function _interop_require_default(obj) {
|
|
76
15
|
return obj && obj.__esModule ? obj : {
|
|
77
16
|
default: obj
|
|
78
17
|
};
|
|
79
18
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
function _set_prototype_of(o, p) {
|
|
87
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
88
|
-
o.__proto__ = p;
|
|
89
|
-
return o;
|
|
19
|
+
class HorizontalSplitter extends _splitter.default {
|
|
20
|
+
startDragCustomHandler = (event, element)=>{
|
|
21
|
+
const sizeableDiv = this.getSizeableDiv(), sizeableDivHeight = sizeableDiv.getHeight(), previousSizeableDivHeight = sizeableDivHeight; ///
|
|
22
|
+
this.setPreviousSizeableDivHeight(previousSizeableDivHeight);
|
|
23
|
+
this.setCursor();
|
|
90
24
|
};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (!raw) {
|
|
95
|
-
raw = strings.slice(0);
|
|
96
|
-
}
|
|
97
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
98
|
-
raw: {
|
|
99
|
-
value: Object.freeze(raw)
|
|
100
|
-
}
|
|
101
|
-
}));
|
|
102
|
-
}
|
|
103
|
-
function _type_of(obj) {
|
|
104
|
-
"@swc/helpers - typeof";
|
|
105
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
106
|
-
}
|
|
107
|
-
function _is_native_reflect_construct() {
|
|
108
|
-
try {
|
|
109
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
110
|
-
} catch (_) {}
|
|
111
|
-
return (_is_native_reflect_construct = function() {
|
|
112
|
-
return !!result;
|
|
113
|
-
})();
|
|
114
|
-
}
|
|
115
|
-
function _templateObject() {
|
|
116
|
-
var data = _tagged_template_literal([
|
|
117
|
-
"\n\n height: 1rem;\n\n"
|
|
118
|
-
]);
|
|
119
|
-
_templateObject = function _templateObject() {
|
|
120
|
-
return data;
|
|
25
|
+
dragCustomHandler = (event, element, relativeMouseTop, relativeMouseLeft)=>{
|
|
26
|
+
const direction = this.getDirection(), sizeableDiv = this.getSizeableDiv(), previousSizeableDivHeight = this.getPreviousSizeableDivHeight(), sizeableDivHeight = previousSizeableDivHeight - direction * relativeMouseTop, height = sizeableDivHeight; ///
|
|
27
|
+
sizeableDiv.setHeight(height);
|
|
121
28
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
29
|
+
mouseOverHandler = (event, element)=>{
|
|
30
|
+
this.setCursor();
|
|
31
|
+
};
|
|
32
|
+
setCursor() {
|
|
33
|
+
const disabled = this.isDisabled();
|
|
34
|
+
if (!disabled) {
|
|
35
|
+
(0, _cursor.rowResizeCursor)();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
getPreviousSizeableDivHeight() {
|
|
39
|
+
const { previousSizeableDivHeight } = this.getState();
|
|
40
|
+
return previousSizeableDivHeight;
|
|
41
|
+
}
|
|
42
|
+
setPreviousSizeableDivHeight(previousSizeableDivHeight) {
|
|
43
|
+
this.updateState({
|
|
44
|
+
previousSizeableDivHeight
|
|
138
45
|
});
|
|
139
|
-
return _this;
|
|
140
46
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
key: "setPreviousSizeableDivHeight",
|
|
160
|
-
value: function setPreviousSizeableDivHeight(previousSizeableDivHeight) {
|
|
161
|
-
this.updateState({
|
|
162
|
-
previousSizeableDivHeight: previousSizeableDivHeight
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
key: "setInitialState",
|
|
168
|
-
value: function setInitialState() {
|
|
169
|
-
var previousSizeableDivHeight = null;
|
|
170
|
-
this.setState({
|
|
171
|
-
previousSizeableDivHeight: previousSizeableDivHeight
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
]);
|
|
176
|
-
return HorizontalSplitter;
|
|
177
|
-
}(_splitter.default);
|
|
178
|
-
_define_property(HorizontalSplitter, "defaultProperties", {
|
|
179
|
-
className: "horizontal"
|
|
180
|
-
});
|
|
181
|
-
var _default = (0, _easywithstyle.default)(HorizontalSplitter)(_templateObject());
|
|
47
|
+
setInitialState() {
|
|
48
|
+
const previousSizeableDivHeight = null;
|
|
49
|
+
this.setState({
|
|
50
|
+
previousSizeableDivHeight
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
static defaultProperties = {
|
|
54
|
+
className: "horizontal"
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const _default = (0, _easywithstyle.default)(HorizontalSplitter)`
|
|
58
|
+
|
|
59
|
+
height: 1rem;
|
|
60
|
+
|
|
61
|
+
`;
|
|
182
62
|
|
|
183
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIj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