@elliemae/ds-resizeable-container 2.2.0-alpha.1 → 2.2.0-alpha.5
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/cjs/Resizable.js +204 -213
- package/cjs/Resizable.js.map +7 -0
- package/cjs/defaultProps.js +34 -6
- package/cjs/defaultProps.js.map +7 -0
- package/cjs/index.js +36 -11
- package/cjs/index.js.map +7 -0
- package/cjs/props.js +40 -22
- package/cjs/props.js.map +7 -0
- package/esm/Resizable.js +166 -190
- package/esm/Resizable.js.map +7 -0
- package/esm/defaultProps.js +5 -2
- package/esm/defaultProps.js.map +7 -0
- package/esm/index.js +7 -1
- package/esm/index.js.map +7 -0
- package/esm/props.js +11 -18
- package/esm/props.js.map +7 -0
- package/package.json +3 -3
package/cjs/index.js
CHANGED
|
@@ -1,11 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var src_exports = {};
|
|
29
|
+
__export(src_exports, {
|
|
30
|
+
default: () => import_Resizable.default
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
__reExport(src_exports, require("./Resizable"));
|
|
34
|
+
var import_Resizable = require("./Resizable");
|
|
35
|
+
module.exports = __toCommonJS(src_exports);
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './Resizable';\nexport { default } from './Resizable';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,uBAAwB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/props.js
CHANGED
|
@@ -1,24 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var props_exports = {};
|
|
29
|
+
__export(props_exports, {
|
|
30
|
+
props: () => props
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react_desc = require("react-desc");
|
|
7
34
|
const props = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/** horizontal resizing */
|
|
15
|
-
horizontal: reactDesc.PropTypes.bool.description('horizontal resizing'),
|
|
16
|
-
|
|
17
|
-
/** Row layout cells */
|
|
18
|
-
rows: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.number, reactDesc.PropTypes.string])).description('Row layout cells'),
|
|
19
|
-
|
|
20
|
-
/** Column layout cells */
|
|
21
|
-
cols: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.number, reactDesc.PropTypes.string])).description('Column layout cells')
|
|
35
|
+
children: import_react_desc.PropTypes.node.description("Grid item content"),
|
|
36
|
+
vertical: import_react_desc.PropTypes.bool.description("vertical resizing"),
|
|
37
|
+
horizontal: import_react_desc.PropTypes.bool.description("horizontal resizing"),
|
|
38
|
+
rows: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string])).description("Row layout cells"),
|
|
39
|
+
cols: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string])).description("Column layout cells")
|
|
22
40
|
};
|
|
23
|
-
|
|
24
|
-
|
|
41
|
+
module.exports = __toCommonJS(props_exports);
|
|
42
|
+
//# sourceMappingURL=props.js.map
|
package/cjs/props.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/props.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from 'react-desc';\n\nexport const props = {\n /** grid item content */\n children: PropTypes.node.description('Grid item content'),\n /** vertical resizing */\n vertical: PropTypes.bool.description('vertical resizing'),\n /** horizontal resizing */\n horizontal: PropTypes.bool.description('horizontal resizing'),\n /** Row layout cells */\n rows: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n ).description('Row layout cells'),\n /** Column layout cells */\n cols: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n ).description('Column layout cells'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAEnB,MAAM,QAAQ;AAAA,EAEnB,UAAU,4BAAU,KAAK,YAAY;AAAA,EAErC,UAAU,4BAAU,KAAK,YAAY;AAAA,EAErC,YAAY,4BAAU,KAAK,YAAY;AAAA,EAEvC,MAAM,4BAAU,QACd,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,UACjD,YAAY;AAAA,EAEd,MAAM,4BAAU,QACd,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,UACjD,YAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/Resizable.js
CHANGED
|
@@ -1,137 +1,138 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import 'core-js/modules/esnext.iterator.map.js';
|
|
10
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
11
|
-
import 'core-js/modules/esnext.async-iterator.every.js';
|
|
12
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
13
|
-
import 'core-js/modules/esnext.iterator.every.js';
|
|
14
|
-
import React, { useRef, useState, useEffect } from 'react';
|
|
15
|
-
import { describe } from 'react-desc';
|
|
16
|
-
import styled from 'styled-components';
|
|
17
|
-
import { mapGap } from '@elliemae/ds-system';
|
|
18
|
-
import { Grid } from '@elliemae/ds-grid';
|
|
19
|
-
import { props } from './props.js';
|
|
20
|
-
import { defaultProps } from './defaultProps.js';
|
|
21
|
-
import { jsx } from 'react/jsx-runtime';
|
|
22
|
-
|
|
23
|
-
const _excluded = ["innerRef"],
|
|
24
|
-
_excluded2 = ["children", "cols", "rows", "vertical", "horizontal"];
|
|
25
|
-
|
|
26
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
-
|
|
28
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2, { useRef, useState, useEffect } from "react";
|
|
3
|
+
import { describe } from "react-desc";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import { mapGap } from "@elliemae/ds-system";
|
|
6
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
7
|
+
import { props as rprops } from "./props";
|
|
8
|
+
import { defaultProps } from "./defaultProps";
|
|
29
9
|
const safeDifference = 15;
|
|
30
10
|
const minDifference = 8;
|
|
31
|
-
const EVENT_TYPE = {
|
|
32
|
-
MOUSE: 'mouse',
|
|
33
|
-
KEY: 'arrows'
|
|
34
|
-
};
|
|
11
|
+
const EVENT_TYPE = { MOUSE: "mouse", KEY: "arrows" };
|
|
35
12
|
const DIRECTION = {
|
|
36
|
-
L:
|
|
37
|
-
R:
|
|
38
|
-
U:
|
|
39
|
-
D:
|
|
13
|
+
L: "left",
|
|
14
|
+
R: "right",
|
|
15
|
+
U: "up",
|
|
16
|
+
D: "down"
|
|
40
17
|
};
|
|
41
|
-
|
|
42
18
|
function calcPosition(arrow, position) {
|
|
43
19
|
let offset;
|
|
44
|
-
|
|
45
20
|
switch (arrow) {
|
|
46
21
|
case DIRECTION.U:
|
|
47
22
|
offset = position - 3;
|
|
48
23
|
break;
|
|
49
|
-
|
|
50
24
|
case DIRECTION.D:
|
|
51
25
|
offset = position + 3;
|
|
52
26
|
break;
|
|
53
|
-
|
|
54
27
|
case DIRECTION.L:
|
|
55
28
|
offset = position - 3;
|
|
56
29
|
break;
|
|
57
|
-
|
|
58
30
|
case DIRECTION.R:
|
|
59
31
|
offset = position + 3;
|
|
60
32
|
break;
|
|
61
|
-
|
|
62
33
|
default:
|
|
63
34
|
offset = position;
|
|
64
35
|
}
|
|
65
|
-
|
|
66
36
|
return offset;
|
|
67
37
|
}
|
|
68
|
-
|
|
69
38
|
function cursorResolver(nextPx, px, isVertical) {
|
|
70
39
|
const orientation = {
|
|
71
|
-
vertical:
|
|
72
|
-
horizontal:
|
|
73
|
-
left:
|
|
74
|
-
right:
|
|
75
|
-
up:
|
|
76
|
-
down:
|
|
40
|
+
vertical: "row-resize",
|
|
41
|
+
horizontal: "col-resize",
|
|
42
|
+
left: "w-resize",
|
|
43
|
+
right: "e-resize",
|
|
44
|
+
up: "n-resize",
|
|
45
|
+
down: "s-resize"
|
|
77
46
|
};
|
|
78
|
-
if (isVertical && nextPx && nextPx <= safeDifference + 1)
|
|
79
|
-
|
|
80
|
-
if (isVertical && px
|
|
81
|
-
|
|
82
|
-
if (
|
|
83
|
-
|
|
47
|
+
if (isVertical && nextPx && nextPx <= safeDifference + 1)
|
|
48
|
+
return orientation.up;
|
|
49
|
+
if (isVertical && px > safeDifference + 1)
|
|
50
|
+
return orientation.vertical;
|
|
51
|
+
if (isVertical && px <= safeDifference + 1)
|
|
52
|
+
return orientation.down;
|
|
53
|
+
if (!isVertical && nextPx && nextPx <= safeDifference + 1)
|
|
54
|
+
return orientation.left;
|
|
55
|
+
if (!isVertical && px <= safeDifference + 1)
|
|
56
|
+
return orientation.right;
|
|
57
|
+
if (!isVertical && px > safeDifference + 1)
|
|
58
|
+
return orientation.horizontal;
|
|
84
59
|
return isVertical ? orientation.vertical : orientation.horizontal;
|
|
85
60
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
p = _objectWithoutProperties(_ref, _excluded);
|
|
92
|
-
|
|
93
|
-
return /*#__PURE__*/jsx(Grid, _objectSpread({
|
|
94
|
-
ref: innerRef
|
|
95
|
-
}, p));
|
|
61
|
+
function ResizableItemComponent({ innerRef, ...p }) {
|
|
62
|
+
return /* @__PURE__ */ React2.createElement(Grid, {
|
|
63
|
+
ref: innerRef,
|
|
64
|
+
...p
|
|
65
|
+
});
|
|
96
66
|
}
|
|
97
|
-
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
})(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
})(["position:absolute;cursor:", ";", ""], _ref2 => {
|
|
107
|
-
let {
|
|
108
|
-
container,
|
|
109
|
-
nextContainer,
|
|
110
|
-
v
|
|
111
|
-
} = _ref2;
|
|
112
|
-
return cursorResolver(nextContainer, container, v);
|
|
113
|
-
}, props => {
|
|
67
|
+
const ResizableGrid = styled(Grid)``;
|
|
68
|
+
const ResizableItem = styled(ResizableItemComponent)`
|
|
69
|
+
position: relative;
|
|
70
|
+
`;
|
|
71
|
+
const ResizableBar = styled.div`
|
|
72
|
+
position: absolute;
|
|
73
|
+
cursor: ${({ container, nextContainer, v }) => cursorResolver(nextContainer, container, v)};
|
|
74
|
+
|
|
75
|
+
${(props) => {
|
|
114
76
|
if (props.v) {
|
|
115
|
-
return
|
|
77
|
+
return `
|
|
78
|
+
bottom: calc(${mapGap(props.gutter)} * -0.5);
|
|
79
|
+
left: 0;
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 10px;
|
|
82
|
+
margin-bottom: -5px;
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
justify-content:space-around;
|
|
86
|
+
align-items: center;
|
|
87
|
+
&:after{
|
|
88
|
+
width: 100%;
|
|
89
|
+
height: 1px;
|
|
90
|
+
display: block;
|
|
91
|
+
background: ${props.theme.colors.neutral["300"]};
|
|
92
|
+
content: '';
|
|
93
|
+
}
|
|
94
|
+
&:hover{
|
|
95
|
+
&:after{
|
|
96
|
+
background: ${props.theme.colors.brand["600"]};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`;
|
|
116
100
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
101
|
+
return `
|
|
102
|
+
top: 0;
|
|
103
|
+
right: calc(${mapGap(props.gutter)} * -0.5);
|
|
104
|
+
height: 100%;
|
|
105
|
+
width: 10px;
|
|
106
|
+
margin-right: -5px;
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: row;
|
|
109
|
+
justify-content:space-around;
|
|
110
|
+
align-items: center;
|
|
111
|
+
&:after{
|
|
112
|
+
height: 100%;
|
|
113
|
+
width: 1px;
|
|
114
|
+
display: block;
|
|
115
|
+
background: ${props.theme.colors.neutral["300"]};
|
|
116
|
+
content: '';
|
|
117
|
+
}
|
|
118
|
+
&:hover{
|
|
119
|
+
&:after{
|
|
120
|
+
background: ${props.theme.colors.brand["600"]};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
`;
|
|
124
|
+
}}
|
|
125
|
+
`;
|
|
126
|
+
const getWidths = (list) => list.map((l) => l.clientWidth);
|
|
127
|
+
const getHeights = (list) => list.map((l) => l.clientHeight);
|
|
128
|
+
function ResizableContainer({
|
|
129
|
+
children,
|
|
130
|
+
cols,
|
|
131
|
+
rows,
|
|
132
|
+
vertical,
|
|
133
|
+
horizontal,
|
|
134
|
+
...rest
|
|
135
|
+
}) {
|
|
135
136
|
const refs = useRef([]);
|
|
136
137
|
const [containers, setContainers] = useState(cols);
|
|
137
138
|
const [blocks, setBlocks] = useState(rows);
|
|
@@ -139,22 +140,18 @@ function ResizableContainer(_ref3) {
|
|
|
139
140
|
const [start, setStartPoint] = useState(0);
|
|
140
141
|
const [resetPoint, setResetPoint] = useState();
|
|
141
142
|
useEffect(() => {
|
|
142
|
-
if (horizontal)
|
|
143
|
-
|
|
143
|
+
if (horizontal)
|
|
144
|
+
setContainers(getWidths(refs.current));
|
|
145
|
+
if (vertical)
|
|
146
|
+
setBlocks(getHeights(refs.current));
|
|
144
147
|
}, [refs.current, horizontal, vertical]);
|
|
145
|
-
|
|
146
|
-
const addRef = node => {
|
|
148
|
+
const addRef = (node) => {
|
|
147
149
|
refs.current.push(node);
|
|
148
150
|
};
|
|
149
|
-
|
|
150
|
-
const resizePanels = function () {
|
|
151
|
-
let diff = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
152
|
-
let v = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
151
|
+
const resizePanels = (diff = 1, v = false) => {
|
|
153
152
|
const index = parseInt(start.index, 10);
|
|
154
|
-
|
|
155
153
|
if (!v) {
|
|
156
154
|
const newContainers = [...containers];
|
|
157
|
-
|
|
158
155
|
if (newContainers[index + 1] && newContainers[index + 1] > minDifference) {
|
|
159
156
|
newContainers[index + 1] = newContainers[index + 1] - diff;
|
|
160
157
|
newContainers[index] = diff + newContainers[index];
|
|
@@ -162,11 +159,10 @@ function ResizableContainer(_ref3) {
|
|
|
162
159
|
newContainers[index - 1] = newContainers[index - 1] - diff;
|
|
163
160
|
newContainers[index] = diff + newContainers[index];
|
|
164
161
|
}
|
|
165
|
-
|
|
166
|
-
|
|
162
|
+
if (newContainers.every((c) => c > safeDifference))
|
|
163
|
+
setContainers(newContainers);
|
|
167
164
|
} else {
|
|
168
165
|
const newBlocks = [...blocks];
|
|
169
|
-
|
|
170
166
|
if (newBlocks[index + 1] && newBlocks[index + 1] > minDifference) {
|
|
171
167
|
newBlocks[index + 1] = newBlocks[index + 1] - diff;
|
|
172
168
|
newBlocks[index] = diff + newBlocks[index];
|
|
@@ -174,14 +170,11 @@ function ResizableContainer(_ref3) {
|
|
|
174
170
|
newBlocks[index - 1] = newBlocks[index - 1] - diff;
|
|
175
171
|
newBlocks[index] = diff + newBlocks[index];
|
|
176
172
|
}
|
|
177
|
-
|
|
178
|
-
|
|
173
|
+
if (newBlocks.every((c) => c > safeDifference))
|
|
174
|
+
setBlocks(newBlocks);
|
|
179
175
|
}
|
|
180
176
|
};
|
|
181
|
-
|
|
182
|
-
const startResize = function (event, index) {
|
|
183
|
-
let v = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
184
|
-
let type = arguments.length > 3 ? arguments[3] : undefined;
|
|
177
|
+
const startResize = (event, index, v = false, type) => {
|
|
185
178
|
setDragging(type);
|
|
186
179
|
setStartPoint({
|
|
187
180
|
x: event.clientX,
|
|
@@ -189,41 +182,30 @@ function ResizableContainer(_ref3) {
|
|
|
189
182
|
index,
|
|
190
183
|
v
|
|
191
184
|
});
|
|
192
|
-
setResetPoint({
|
|
193
|
-
containers,
|
|
194
|
-
blocks
|
|
195
|
-
});
|
|
185
|
+
setResetPoint({ containers, blocks });
|
|
196
186
|
};
|
|
197
|
-
|
|
198
187
|
const moveResize = (event, type) => {
|
|
199
188
|
if (isDragging && isDragging === type && !start.v) {
|
|
200
189
|
const diff = event.clientX - start.x;
|
|
201
|
-
if (diff === 0)
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
index: start.index
|
|
205
|
-
});
|
|
190
|
+
if (diff === 0)
|
|
191
|
+
return;
|
|
192
|
+
setStartPoint({ x: event.clientX, index: start.index });
|
|
206
193
|
resizePanels(diff);
|
|
207
194
|
} else if (isDragging && isDragging === type && start.v) {
|
|
208
195
|
const diff = event.clientY - start.y;
|
|
209
|
-
if (diff === 0)
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
index: start.index
|
|
213
|
-
}));
|
|
196
|
+
if (diff === 0)
|
|
197
|
+
return;
|
|
198
|
+
setStartPoint({ ...start, y: event.clientY, index: start.index });
|
|
214
199
|
resizePanels(diff, true);
|
|
215
200
|
}
|
|
216
201
|
};
|
|
217
|
-
|
|
218
|
-
const endResize = type => {
|
|
202
|
+
const endResize = (type) => {
|
|
219
203
|
if (isDragging === type) {
|
|
220
204
|
setDragging(false);
|
|
221
205
|
setStartPoint();
|
|
222
206
|
}
|
|
223
207
|
};
|
|
224
|
-
|
|
225
|
-
const handleKeyDown = function (e, index) {
|
|
226
|
-
let v = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
208
|
+
const handleKeyDown = (e, index, v = false) => {
|
|
227
209
|
const keyCodes = {
|
|
228
210
|
37: DIRECTION.L,
|
|
229
211
|
Left: DIRECTION.L,
|
|
@@ -238,72 +220,66 @@ function ResizableContainer(_ref3) {
|
|
|
238
220
|
Down: DIRECTION.D,
|
|
239
221
|
ArrowDown: DIRECTION.D
|
|
240
222
|
};
|
|
241
|
-
|
|
242
223
|
if (keyCodes[e.key || e.keyCode]) {
|
|
243
224
|
e.preventDefault();
|
|
244
|
-
const {
|
|
245
|
-
top: y,
|
|
246
|
-
left: x
|
|
247
|
-
} = e.target.getBoundingClientRect();
|
|
248
|
-
|
|
225
|
+
const { top: y, left: x } = e.target.getBoundingClientRect();
|
|
249
226
|
if (!start) {
|
|
250
|
-
startResize({
|
|
251
|
-
clientX: x,
|
|
252
|
-
clientY: y
|
|
253
|
-
}, index, v, EVENT_TYPE.KEY);
|
|
227
|
+
startResize({ clientX: x, clientY: y }, index, v, EVENT_TYPE.KEY);
|
|
254
228
|
} else {
|
|
255
229
|
const clientX = keyCodes[e.keyCode] === DIRECTION.L || keyCodes[e.keyCode] === DIRECTION.R ? calcPosition(keyCodes[e.keyCode], x) : x;
|
|
256
230
|
const clientY = keyCodes[e.keyCode] === DIRECTION.U || keyCodes[e.keyCode] === DIRECTION.D ? calcPosition(keyCodes[e.keyCode], y) : y;
|
|
257
|
-
moveResize({
|
|
258
|
-
clientX,
|
|
259
|
-
clientY
|
|
260
|
-
}, EVENT_TYPE.KEY);
|
|
231
|
+
moveResize({ clientX, clientY }, EVENT_TYPE.KEY);
|
|
261
232
|
}
|
|
262
233
|
}
|
|
263
234
|
};
|
|
264
|
-
|
|
265
|
-
const onLeave = type => {
|
|
235
|
+
const onLeave = (type) => {
|
|
266
236
|
if (isDragging === type) {
|
|
267
237
|
setDragging(false);
|
|
268
|
-
if (resetPoint && resetPoint.blocks)
|
|
269
|
-
|
|
238
|
+
if (resetPoint && resetPoint.blocks)
|
|
239
|
+
setBlocks(resetPoint.blocks);
|
|
240
|
+
if (resetPoint && resetPoint.containers)
|
|
241
|
+
setContainers(resetPoint.containers);
|
|
270
242
|
}
|
|
271
243
|
};
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
244
|
+
const count = React2.Children.count(children);
|
|
245
|
+
return /* @__PURE__ */ React2.createElement(ResizableGrid, {
|
|
246
|
+
...rest,
|
|
275
247
|
cols: containers,
|
|
276
248
|
onKeyUp: () => endResize(EVENT_TYPE.KEY),
|
|
277
249
|
onMouseLeave: () => onLeave(EVENT_TYPE.MOUSE),
|
|
278
|
-
onMouseMove: e => moveResize(e, EVENT_TYPE.MOUSE),
|
|
250
|
+
onMouseMove: (e) => moveResize(e, EVENT_TYPE.MOUSE),
|
|
279
251
|
onMouseUp: () => endResize(EVENT_TYPE.MOUSE),
|
|
280
|
-
rows: blocks
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}));
|
|
252
|
+
rows: blocks
|
|
253
|
+
}, React2.Children.map(children, (child, index) => /* @__PURE__ */ React2.createElement(ResizableItem, {
|
|
254
|
+
"data-index": index,
|
|
255
|
+
innerRef: addRef
|
|
256
|
+
}, child, count - 1 !== index && horizontal && /* @__PURE__ */ React2.createElement(ResizableBar, {
|
|
257
|
+
container: containers[index],
|
|
258
|
+
"data-index": index,
|
|
259
|
+
gutter: rest.gutter,
|
|
260
|
+
nextContainer: containers[index + 1],
|
|
261
|
+
onKeyDown: (e) => handleKeyDown(e, index, false),
|
|
262
|
+
onMouseDown: (e) => startResize(e, index, false, EVENT_TYPE.MOUSE),
|
|
263
|
+
tabIndex: 0
|
|
264
|
+
}), count - 1 !== index && vertical && /* @__PURE__ */ React2.createElement(ResizableBar, {
|
|
265
|
+
container: blocks[index],
|
|
266
|
+
"data-index": index,
|
|
267
|
+
gutter: rest.gutter,
|
|
268
|
+
nextContainer: blocks[index + 1],
|
|
269
|
+
onKeyDown: (e) => handleKeyDown(e, index, true),
|
|
270
|
+
onMouseDown: (e) => startResize(e, index, true, EVENT_TYPE.MOUSE),
|
|
271
|
+
tabIndex: 0,
|
|
272
|
+
v: true
|
|
273
|
+
}))));
|
|
303
274
|
}
|
|
304
|
-
|
|
275
|
+
ResizableContainer.propTypes = rprops;
|
|
305
276
|
ResizableContainer.defaultProps = defaultProps;
|
|
306
277
|
const DSResizableContainerWithSchema = describe(ResizableContainer);
|
|
307
|
-
DSResizableContainerWithSchema.propTypes =
|
|
308
|
-
|
|
309
|
-
export {
|
|
278
|
+
DSResizableContainerWithSchema.propTypes = rprops;
|
|
279
|
+
var Resizable_default = ResizableContainer;
|
|
280
|
+
export {
|
|
281
|
+
DSResizableContainerWithSchema,
|
|
282
|
+
ResizableContainer,
|
|
283
|
+
Resizable_default as default
|
|
284
|
+
};
|
|
285
|
+
//# sourceMappingURL=Resizable.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/Resizable.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport React, { useRef, useState, useEffect } from 'react';\nimport { describe } from 'react-desc';\nimport styled from 'styled-components';\nimport { mapGap } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { props as rprops } from './props';\nimport { defaultProps } from './defaultProps';\n\nconst safeDifference = 15;\nconst minDifference = 8;\nconst EVENT_TYPE = { MOUSE: 'mouse', KEY: 'arrows' };\nconst DIRECTION = {\n L: 'left',\n R: 'right',\n U: 'up',\n D: 'down',\n};\n\nfunction calcPosition(arrow, position) {\n let offset;\n switch (arrow) {\n case DIRECTION.U:\n offset = position - 3;\n break;\n case DIRECTION.D:\n offset = position + 3;\n break;\n case DIRECTION.L:\n offset = position - 3;\n break;\n case DIRECTION.R:\n offset = position + 3;\n break;\n default:\n offset = position;\n }\n return offset;\n}\n\nfunction cursorResolver(nextPx, px, isVertical) {\n const orientation = {\n vertical: 'row-resize',\n horizontal: 'col-resize',\n left: 'w-resize',\n right: 'e-resize',\n up: 'n-resize',\n down: 's-resize',\n };\n\n if (isVertical && nextPx && nextPx <= safeDifference + 1)\n return orientation.up;\n if (isVertical && px > safeDifference + 1) return orientation.vertical;\n if (isVertical && px <= safeDifference + 1) return orientation.down;\n\n if (!isVertical && nextPx && nextPx <= safeDifference + 1)\n return orientation.left;\n if (!isVertical && px <= safeDifference + 1) return orientation.right;\n if (!isVertical && px > safeDifference + 1) return orientation.horizontal;\n\n return isVertical ? orientation.vertical : orientation.horizontal;\n}\n\nfunction ResizableItemComponent({ innerRef, ...p }) {\n return <Grid ref={innerRef} {...p} />;\n}\n\nconst ResizableGrid = styled(Grid)``;\nconst ResizableItem = styled(ResizableItemComponent)`\n position: relative;\n`;\nconst ResizableBar = styled.div`\n position: absolute;\n cursor: ${({ container, nextContainer, v }) =>\n cursorResolver(nextContainer, container, v)};\n\n ${(props) => {\n if (props.v) {\n return `\n bottom: calc(${mapGap(props.gutter)} * -0.5);\n left: 0;\n width: 100%;\n height: 10px;\n margin-bottom: -5px;\n display: flex;\n flex-direction: column;\n justify-content:space-around;\n align-items: center;\n &:after{\n width: 100%;\n height: 1px;\n display: block;\n background: ${props.theme.colors.neutral['300']};\n content: '';\n }\n &:hover{\n &:after{\n background: ${props.theme.colors.brand['600']};\n } \n }\n `;\n }\n return `\n top: 0;\n right: calc(${mapGap(props.gutter)} * -0.5);\n height: 100%;\n width: 10px;\n margin-right: -5px;\n display: flex;\n flex-direction: row;\n justify-content:space-around;\n align-items: center;\n &:after{\n height: 100%;\n width: 1px;\n display: block;\n background: ${props.theme.colors.neutral['300']};\n content: '';\n }\n &:hover{\n &:after{\n background: ${props.theme.colors.brand['600']};\n } \n }\n `;\n }}\n`;\nconst getWidths = (list) => list.map((l) => l.clientWidth);\nconst getHeights = (list) => list.map((l) => l.clientHeight);\n\nfunction ResizableContainer({\n children,\n cols,\n rows,\n vertical,\n horizontal,\n ...rest\n}) {\n const refs = useRef([]);\n const [containers, setContainers] = useState(cols);\n const [blocks, setBlocks] = useState(rows);\n const [isDragging, setDragging] = useState(false);\n const [start, setStartPoint] = useState(0);\n const [resetPoint, setResetPoint] = useState();\n\n useEffect(() => {\n if (horizontal) setContainers(getWidths(refs.current));\n if (vertical) setBlocks(getHeights(refs.current));\n }, [refs.current, horizontal, vertical]);\n const addRef = (node) => {\n refs.current.push(node);\n };\n const resizePanels = (diff = 1, v = false) => {\n const index = parseInt(start.index, 10);\n if (!v) {\n const newContainers = [...containers];\n if (\n newContainers[index + 1] &&\n newContainers[index + 1] > minDifference\n ) {\n newContainers[index + 1] = newContainers[index + 1] - diff;\n newContainers[index] = diff + newContainers[index];\n } else if (\n newContainers[index - 1] &&\n newContainers[index - 1] > minDifference\n ) {\n newContainers[index - 1] = newContainers[index - 1] - diff;\n newContainers[index] = diff + newContainers[index];\n }\n if (newContainers.every((c) => c > safeDifference))\n setContainers(newContainers);\n } else {\n const newBlocks = [...blocks];\n if (newBlocks[index + 1] && newBlocks[index + 1] > minDifference) {\n newBlocks[index + 1] = newBlocks[index + 1] - diff;\n newBlocks[index] = diff + newBlocks[index];\n } else if (newBlocks[index - 1] && newBlocks[index - 1] > minDifference) {\n newBlocks[index - 1] = newBlocks[index - 1] - diff;\n newBlocks[index] = diff + newBlocks[index];\n }\n if (newBlocks.every((c) => c > safeDifference)) setBlocks(newBlocks);\n }\n };\n const startResize = (event, index, v = false, type) => {\n setDragging(type);\n setStartPoint({\n x: event.clientX,\n y: event.clientY,\n index,\n v,\n });\n setResetPoint({ containers, blocks });\n };\n const moveResize = (event, type) => {\n if (isDragging && isDragging === type && !start.v) {\n const diff = event.clientX - start.x;\n if (diff === 0) return;\n setStartPoint({ x: event.clientX, index: start.index });\n resizePanels(diff);\n } else if (isDragging && isDragging === type && start.v) {\n const diff = event.clientY - start.y;\n if (diff === 0) return;\n setStartPoint({ ...start, y: event.clientY, index: start.index });\n resizePanels(diff, true);\n }\n };\n const endResize = (type) => {\n if (isDragging === type) {\n setDragging(false);\n setStartPoint();\n }\n };\n const handleKeyDown = (e, index, v = false) => {\n const keyCodes = {\n 37: DIRECTION.L,\n Left: DIRECTION.L,\n ArrowLeft: DIRECTION.L,\n 38: DIRECTION.U,\n Up: DIRECTION.U,\n ArrowUp: DIRECTION.U,\n 39: DIRECTION.R,\n Right: DIRECTION.R,\n ArrowRight: DIRECTION.R,\n 40: DIRECTION.D,\n Down: DIRECTION.D,\n ArrowDown: DIRECTION.D,\n };\n\n if (keyCodes[e.key || e.keyCode]) {\n e.preventDefault();\n const { top: y, left: x } = e.target.getBoundingClientRect();\n if (!start) {\n startResize({ clientX: x, clientY: y }, index, v, EVENT_TYPE.KEY);\n } else {\n const clientX =\n keyCodes[e.keyCode] === DIRECTION.L ||\n keyCodes[e.keyCode] === DIRECTION.R\n ? calcPosition(keyCodes[e.keyCode], x)\n : x;\n const clientY =\n keyCodes[e.keyCode] === DIRECTION.U ||\n keyCodes[e.keyCode] === DIRECTION.D\n ? calcPosition(keyCodes[e.keyCode], y)\n : y;\n\n moveResize({ clientX, clientY }, EVENT_TYPE.KEY);\n }\n }\n };\n\n const onLeave = (type) => {\n if (isDragging === type) {\n setDragging(false);\n\n if (resetPoint && resetPoint.blocks) setBlocks(resetPoint.blocks);\n if (resetPoint && resetPoint.containers)\n setContainers(resetPoint.containers);\n }\n };\n const count = React.Children.count(children);\n\n return (\n <ResizableGrid\n {...rest}\n cols={containers}\n onKeyUp={() => endResize(EVENT_TYPE.KEY)}\n onMouseLeave={() => onLeave(EVENT_TYPE.MOUSE)}\n onMouseMove={(e) => moveResize(e, EVENT_TYPE.MOUSE)}\n onMouseUp={() => endResize(EVENT_TYPE.MOUSE)}\n rows={blocks}\n >\n {React.Children.map(children, (child, index) => (\n <ResizableItem data-index={index} innerRef={addRef}>\n {child}\n {count - 1 !== index && horizontal && (\n <ResizableBar\n container={containers[index]}\n data-index={index}\n gutter={rest.gutter}\n nextContainer={containers[index + 1]}\n onKeyDown={(e) => handleKeyDown(e, index, false)}\n onMouseDown={(e) =>\n startResize(e, index, false, EVENT_TYPE.MOUSE)\n }\n tabIndex={0}\n />\n )}\n {count - 1 !== index && vertical && (\n <ResizableBar\n container={blocks[index]}\n data-index={index}\n gutter={rest.gutter}\n nextContainer={blocks[index + 1]}\n onKeyDown={(e) => handleKeyDown(e, index, true)}\n onMouseDown={(e) => startResize(e, index, true, EVENT_TYPE.MOUSE)}\n tabIndex={0}\n v\n />\n )}\n </ResizableItem>\n ))}\n </ResizableGrid>\n );\n}\n\nResizableContainer.propTypes = rprops;\nResizableContainer.defaultProps = defaultProps;\n\nconst DSResizableContainerWithSchema = describe(ResizableContainer);\nDSResizableContainerWithSchema.propTypes = rprops;\n\nexport { ResizableContainer, DSResizableContainerWithSchema };\nexport default ResizableContainer;\n"],
|
|
5
|
+
"mappings": "AAAA;ACGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,iBAAiB;AACvB,MAAM,gBAAgB;AACtB,MAAM,aAAa,EAAE,OAAO,SAAS,KAAK;AAC1C,MAAM,YAAY;AAAA,EAChB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA;AAGL,sBAAsB,OAAO,UAAU;AACrC,MAAI;AACJ,UAAQ;AAAA,SACD,UAAU;AACb,eAAS,WAAW;AACpB;AAAA,SACG,UAAU;AACb,eAAS,WAAW;AACpB;AAAA,SACG,UAAU;AACb,eAAS,WAAW;AACpB;AAAA,SACG,UAAU;AACb,eAAS,WAAW;AACpB;AAAA;AAEA,eAAS;AAAA;AAEb,SAAO;AAAA;AAGT,wBAAwB,QAAQ,IAAI,YAAY;AAC9C,QAAM,cAAc;AAAA,IAClB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,OAAO;AAAA,IACP,IAAI;AAAA,IACJ,MAAM;AAAA;AAGR,MAAI,cAAc,UAAU,UAAU,iBAAiB;AACrD,WAAO,YAAY;AACrB,MAAI,cAAc,KAAK,iBAAiB;AAAG,WAAO,YAAY;AAC9D,MAAI,cAAc,MAAM,iBAAiB;AAAG,WAAO,YAAY;AAE/D,MAAI,CAAC,cAAc,UAAU,UAAU,iBAAiB;AACtD,WAAO,YAAY;AACrB,MAAI,CAAC,cAAc,MAAM,iBAAiB;AAAG,WAAO,YAAY;AAChE,MAAI,CAAC,cAAc,KAAK,iBAAiB;AAAG,WAAO,YAAY;AAE/D,SAAO,aAAa,YAAY,WAAW,YAAY;AAAA;AAGzD,gCAAgC,EAAE,aAA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