@kep-platform/basic-component 0.0.44 → 0.0.45
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BoxShadowBox/BoxShadowBox.js +3 -4
- package/dist/Button/Button.js +13 -14
- package/dist/Columns/Columns.js +13 -17
- package/dist/Flex/flex.js +7 -11
- package/dist/Grid/Col.js +3 -4
- package/dist/Grid/Row.js +3 -4
- package/dist/Indent/Indent.js +3 -4
- package/dist/Input/Input.js +3 -4
- package/dist/List/List.js +5 -9
- package/dist/Menu/Menu.js +5 -9
- package/dist/Pagination/Pagination.js +3 -4
- package/dist/PopupBox/PopupBox.js +4 -5
- package/dist/Select/Select.js +12 -28
- package/dist/Space/Space.js +4 -8
- package/dist/Spin/Spin.js +4 -8
- package/dist/Table/Table.js +15 -46
- package/dist/Tag/Tag.js +3 -4
- package/dist/Tree/MainProperties.js +4 -8
- package/dist/Tree/Tree.js +7 -14
- package/dist/Tree/TreeNode.js +10 -20
- package/dist/Tree/test.js +3 -4
- package/dist/ViewPort/Ripple.js +4 -5
- package/dist/ViewPort/ViewPort.js +4 -8
- package/dist/ViewPort/test.js +3 -4
- package/dist/Window/Window.js +16 -54
- package/dist/Window/WindowController.js +3 -4
- package/dist/Window/WindowOption.js +4 -5
- package/dist/Window/test.js +18 -46
- package/dist/__styles/GlobalStyles.js +3 -1
- package/package.json +7 -7
package/dist/Table/Table.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
2
|
var _excluded = ["render"];
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
3
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
5
6
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
@@ -18,6 +19,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
18
19
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
19
20
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
20
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
22
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
21
23
|
import CaretDownOutlined from '@ant-design/icons/CaretDownOutlined';
|
22
24
|
import CaretUpOutlined from '@ant-design/icons/CaretUpOutlined';
|
23
25
|
import FilterOutlined from '@ant-design/icons/FilterOutlined';
|
@@ -32,59 +34,32 @@ import { List, ListItem } from "../List";
|
|
32
34
|
import { Pagination } from "../Pagination";
|
33
35
|
import { Popup } from "../PopupBox";
|
34
36
|
import { Space } from "../Space";
|
35
|
-
var TableContainer = styled.div
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
var
|
40
|
-
displayName: "TableTitle",
|
41
|
-
componentId: "basic-component-347b__sc-12r61fm-1"
|
42
|
-
})(["font-weight:600;padding:var(--kep-platform-padding-sm);"]);
|
43
|
-
var TableToolbar = styled.div.withConfig({
|
44
|
-
displayName: "TableToolbar",
|
45
|
-
componentId: "basic-component-347b__sc-12r61fm-2"
|
46
|
-
})(["text-align:right;padding:var(--kep-platform-padding-sm);"]);
|
47
|
-
var TableHeaderRow = styled(Columns).withConfig({
|
48
|
-
displayName: "TableHeaderRow",
|
49
|
-
componentId: "basic-component-347b__sc-12r61fm-3"
|
50
|
-
})(["border-bottom:var(--kep-platform-line-width) solid var(--kep-platform-color-table-border);position:sticky;top:0;left:0;z-index:calc(var(--kep-platform-z-index-fixed) + 5);& ", "{background-color:var(--kep-platform-header-bg);font-weight:600;position:sticky;&:not(:last-child):after{content:'';width:1px;height:calc(100% - 2 * var(--kep-platform-padding-xs));position:absolute;top:var(--kep-platform-padding-xs);right:0;background-color:var(--kep-platform-color-border-secondary);}}"], Column);
|
51
|
-
var TableBody = styled(List).withConfig({
|
52
|
-
displayName: "TableBody",
|
53
|
-
componentId: "basic-component-347b__sc-12r61fm-4"
|
54
|
-
})([""]);
|
37
|
+
var TableContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
|
38
|
+
var TableTitle = styled.h5(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-weight: 600;\n padding: var(--kep-platform-padding-sm);\n"])));
|
39
|
+
var TableToolbar = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-align: right;\n padding: var(--kep-platform-padding-sm);\n"])));
|
40
|
+
var TableHeaderRow = styled(Columns)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-bottom: var(--kep-platform-line-width) solid var(--kep-platform-color-table-border);\n position: sticky;\n top: 0;\n left: 0;\n z-index: calc(var(--kep-platform-z-index-fixed) + 5);\n & ", " {\n background-color: var(--kep-platform-header-bg);\n font-weight: 600;\n position: sticky;\n &:not(:last-child):after {\n content: '';\n width: 1px;\n height: calc(100% - 2 * var(--kep-platform-padding-xs));\n position: absolute;\n top: var(--kep-platform-padding-xs);\n right: 0;\n background-color: var(--kep-platform-color-border-secondary);\n }\n }\n"])), Column);
|
41
|
+
var TableBody = styled(List)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral([""])));
|
55
42
|
var TableBodyRow = styled(ListItem).withConfig({
|
56
43
|
shouldForwardProp: function shouldForwardProp(prop) {
|
57
44
|
return !['isActive'].includes(prop);
|
58
45
|
}
|
59
|
-
})
|
60
|
-
displayName: "TableBodyRow",
|
61
|
-
componentId: "basic-component-347b__sc-12r61fm-5"
|
62
|
-
})(["& ", "{", "}"], Column, function (props) {
|
46
|
+
})(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n & ", " {\n ", "\n }\n"])), Column, function (props) {
|
63
47
|
if (props.isActive) {
|
64
|
-
return css(["background-color:var(--kep-platform-color-bg-active) !important
|
48
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background-color: var(--kep-platform-color-bg-active) !important;\n "])));
|
65
49
|
}
|
66
50
|
});
|
67
|
-
var TableContent = styled.div
|
68
|
-
displayName: "TableContent",
|
69
|
-
componentId: "basic-component-347b__sc-12r61fm-6"
|
70
|
-
})(["position:relative;overflow:auto;border-radius:var(--kep-platform-border-radius);box-shadow:var(--kep-platform-box-shadow-tertiary);", ""], function (props) {
|
51
|
+
var TableContent = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: relative;\n overflow: auto;\n border-radius: var(--kep-platform-border-radius);\n box-shadow: var(--kep-platform-box-shadow-tertiary);\n ", "\n"])), function (props) {
|
71
52
|
var _props$scroll;
|
72
53
|
if ((_props$scroll = props.scroll) !== null && _props$scroll !== void 0 && _props$scroll.y) {
|
73
|
-
return css(["height:", "px
|
54
|
+
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n height: ", "px;\n "])), props.scroll.y);
|
74
55
|
}
|
75
56
|
});
|
76
|
-
var SortIconList = styled(List)
|
77
|
-
displayName: "SortIconList",
|
78
|
-
componentId: "basic-component-347b__sc-12r61fm-7"
|
79
|
-
})([""]);
|
57
|
+
var SortIconList = styled(List)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral([""])));
|
80
58
|
var SortIconListItem = styled(ListItem).withConfig({
|
81
59
|
shouldForwardProp: function shouldForwardProp(prop) {
|
82
60
|
return !['active'].includes(prop);
|
83
61
|
}
|
84
|
-
})
|
85
|
-
displayName: "SortIconListItem",
|
86
|
-
componentId: "basic-component-347b__sc-12r61fm-8"
|
87
|
-
})(["height:10px;line-height:10px;font-size:10px;cursor:pointer;user-select:none;color:", ";"], function (props) {
|
62
|
+
})(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n height: 10px;\n line-height: 10px;\n font-size: 10px;\n cursor: pointer;\n user-select: none;\n color: ", ";\n"])), function (props) {
|
88
63
|
return props.active ? 'var(--kep-platform-color-primary)' : 'currentColor';
|
89
64
|
});
|
90
65
|
var SortIconGroup = function SortIconGroup(_ref) {
|
@@ -115,14 +90,8 @@ var SortIconGroup = function SortIconGroup(_ref) {
|
|
115
90
|
active: sorter === 'desc'
|
116
91
|
}, /*#__PURE__*/React.createElement(CaretDownOutlined, null)));
|
117
92
|
};
|
118
|
-
var ColumnTitle = styled.div
|
119
|
-
|
120
|
-
componentId: "basic-component-347b__sc-12r61fm-9"
|
121
|
-
})([""]);
|
122
|
-
var FilterValue = styled.span.withConfig({
|
123
|
-
displayName: "FilterValue",
|
124
|
-
componentId: "basic-component-347b__sc-12r61fm-10"
|
125
|
-
})(["color:var(--kep-platform-color-primary);cursor:pointer;padding:var(--kep-platform-padding-xxs);border-radius:var(--kep-platform-border-radius-sm);&:hover{background-color:var(--kep-platform-color-bg-active);}"]);
|
93
|
+
var ColumnTitle = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral([""])));
|
94
|
+
var FilterValue = styled.span(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n color: var(--kep-platform-color-primary);\n cursor: pointer;\n padding: var(--kep-platform-padding-xxs);\n border-radius: var(--kep-platform-border-radius-sm);\n &:hover {\n background-color: var(--kep-platform-color-bg-active);\n }\n"])));
|
126
95
|
var ColumnTitleController = function ColumnTitleController(_ref2) {
|
127
96
|
var onSorterChange = _ref2.onSorterChange,
|
128
97
|
title = _ref2.title,
|
package/dist/Tag/Tag.js
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
var _excluded = ["children"];
|
2
|
+
var _templateObject;
|
2
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
3
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
5
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
4
6
|
import React from 'react';
|
5
7
|
import styled from 'styled-components';
|
6
8
|
import theme from "../__consts/theme";
|
7
|
-
var StyledTag = styled.span.
|
8
|
-
displayName: "StyledTag",
|
9
|
-
componentId: "basic-component-347b__sc-14fuyeq-0"
|
10
|
-
})(["background-color:", ";color:1px soild ", ";"], theme.defaultTagBackgroundColor, theme.defaultTagColor);
|
9
|
+
var StyledTag = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n color: 1px soild ", ";\n"])), theme.defaultTagBackgroundColor, theme.defaultTagColor);
|
11
10
|
var Tag = function Tag(_ref) {
|
12
11
|
var children = _ref.children,
|
13
12
|
rest = _objectWithoutProperties(_ref, _excluded);
|
@@ -1,14 +1,10 @@
|
|
1
|
+
var _templateObject, _templateObject2;
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
1
3
|
import React, { forwardRef } from 'react';
|
2
4
|
import styled from 'styled-components';
|
3
5
|
import { Flex, FlexItem } from "../Flex";
|
4
|
-
export var MainArea = styled(FlexItem)
|
5
|
-
|
6
|
-
componentId: "basic-component-347b__sc-u1pspr-0"
|
7
|
-
})(["overflow:hidden;position:sticky;left:0;z-index:20;align-self:stretch;display:flex;align-items:center;border-right:var(--kep-platform-line-width) var(--kep-platform-line-type) var(--kep-platform-color-border-secondary);border-bottom:var(--kep-platform-line-width) var(--kep-platform-line-type) var(--kep-platform-color-border-secondary);"]);
|
8
|
-
var PropertiesArea = styled(FlexItem).withConfig({
|
9
|
-
displayName: "PropertiesArea",
|
10
|
-
componentId: "basic-component-347b__sc-u1pspr-1"
|
11
|
-
})([""]);
|
6
|
+
export var MainArea = styled(FlexItem)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n position: sticky;\n left: 0;\n z-index: 20;\n align-self: stretch;\n display: flex;\n align-items: center;\n border-right: var(--kep-platform-line-width) var(--kep-platform-line-type)\n var(--kep-platform-color-border-secondary);\n border-bottom: var(--kep-platform-line-width) var(--kep-platform-line-type)\n var(--kep-platform-color-border-secondary);\n"])));
|
7
|
+
var PropertiesArea = styled(FlexItem)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([""])));
|
12
8
|
/* 有属性就渲染属性,没有属性就不处理 */
|
13
9
|
export var MainProperty = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
14
10
|
var mainWidth = _ref.mainWidth,
|
package/dist/Tree/Tree.js
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
2
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
4
5
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
6
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
5
7
|
import { observer } from 'mobx-react-lite';
|
6
8
|
import React, { useCallback, useMemo, useRef } from 'react';
|
7
9
|
import styled, { css } from 'styled-components';
|
@@ -15,29 +17,20 @@ var TreeContainer = styled('div').withConfig({
|
|
15
17
|
shouldForwardProp: function shouldForwardProp(prop) {
|
16
18
|
return !['bordered'].includes(prop);
|
17
19
|
}
|
18
|
-
})
|
19
|
-
displayName: "TreeContainer",
|
20
|
-
componentId: "basic-component-347b__sc-n4lkq9-0"
|
21
|
-
})(["position:relative;overflow-x:auto;border:1px solid var(--kep-platform-color-border-secondary);border-width:", ";"], function (props) {
|
20
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n overflow-x: auto;\n border: 1px solid var(--kep-platform-color-border-secondary);\n border-width: ", ";\n"])), function (props) {
|
22
21
|
return props.bordered ? '1px' : 0;
|
23
22
|
});
|
24
|
-
var TreeBody = styled(List)
|
25
|
-
displayName: "TreeBody",
|
26
|
-
componentId: "basic-component-347b__sc-n4lkq9-1"
|
27
|
-
})([""]);
|
23
|
+
var TreeBody = styled(List)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([""])));
|
28
24
|
var TreeHeader = styled('div').withConfig({
|
29
25
|
shouldForwardProp: function shouldForwardProp(prop) {
|
30
26
|
return !['width', 'isFlex'].includes(prop);
|
31
27
|
}
|
32
|
-
})
|
33
|
-
displayName: "TreeHeader",
|
34
|
-
componentId: "basic-component-347b__sc-n4lkq9-2"
|
35
|
-
})(["", " background-color:var(--kep-platform-header-bg);& ", ",& ", "{background-color:var(--kep-platform-header-bg);font-weight:600;position:sticky;}"], function (props) {
|
28
|
+
})(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n background-color: var(--kep-platform-header-bg);\n & ", ",& ", " {\n background-color: var(--kep-platform-header-bg);\n font-weight: 600;\n position: sticky;\n }\n"])), function (props) {
|
36
29
|
if (props.isFlex) {
|
37
|
-
return css(["width:100
|
30
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
|
38
31
|
}
|
39
32
|
if (props.width) {
|
40
|
-
return css(["width:", "px
|
33
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: ", "px;\n "])), props.width);
|
41
34
|
}
|
42
35
|
}, Column, MainArea);
|
43
36
|
var rootLevel = -1;
|
package/dist/Tree/TreeNode.js
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
1
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
4
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
4
5
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
6
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
8
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
7
9
|
import { CaretRightOutlined } from '@ant-design/icons';
|
8
10
|
import { observer } from 'mobx-react-lite';
|
9
11
|
import React, { useCallback, useMemo, useState } from 'react';
|
@@ -18,36 +20,24 @@ var ExpandedIcon = styled(CaretRightOutlined).withConfig({
|
|
18
20
|
shouldForwardProp: function shouldForwardProp(prop) {
|
19
21
|
return !['expanded'].includes(prop);
|
20
22
|
}
|
21
|
-
}).
|
22
|
-
displayName: "ExpandedIcon",
|
23
|
-
componentId: "basic-component-347b__sc-tzoomn-0"
|
24
|
-
})(["transition:transform 0.5s;display:block;user-select:none;", ";font-size:var(--kep-platform-font-size-sm);&:hover{color:var(--kep-platform-color-primary);}"], function (props) {
|
23
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n transition: transform 0.5s;\n display: block;\n user-select: none;\n ", ";\n font-size: var(--kep-platform-font-size-sm);\n &:hover {\n color: var(--kep-platform-color-primary);\n }\n"])), function (props) {
|
25
24
|
if (props.expanded) {
|
26
|
-
return css(["transform:rotate(90deg)
|
25
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transform: rotate(90deg);\n "])));
|
27
26
|
}
|
28
27
|
});
|
29
|
-
var TitleArea = styled(FlexItem)
|
30
|
-
|
31
|
-
componentId: "basic-component-347b__sc-tzoomn-1"
|
32
|
-
})([""]);
|
33
|
-
var TreeNode = styled(ListItem).withConfig({
|
34
|
-
displayName: "TreeNode",
|
35
|
-
componentId: "basic-component-347b__sc-tzoomn-2"
|
36
|
-
})(["", " & ", ",& ", "{background-color:var(--kep-platform-color-bg-base);}&:hover{background-color:var(--kep-platform-color-bg-hover);& ", ",& ", "{background-color:var(--kep-platform-color-bg-hover);}& ", "{overflow-x:auto;& > ", "{width:auto;}}& ", "{overflow-x:auto;}}", ""], function (props) {
|
28
|
+
var TitleArea = styled(FlexItem)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral([""])));
|
29
|
+
var TreeNode = styled(ListItem)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n & ", ",& ", " {\n background-color: var(--kep-platform-color-bg-base);\n }\n /* \u5904\u7406\u9F20\u6807\u79FB\u5165 */\n &:hover {\n background-color: var(--kep-platform-color-bg-hover);\n & ", ", & ", " {\n background-color: var(--kep-platform-color-bg-hover);\n }\n & ", " {\n overflow-x: auto;\n & > ", " {\n width: auto;\n }\n }\n & ", " {\n overflow-x: auto;\n }\n }\n /* \u5904\u7406\u8282\u70B9\u9009\u4E2D */\n ", "\n"])), function (props) {
|
37
30
|
if (props.width) {
|
38
|
-
return css(["width:", "px
|
31
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: ", "px;\n "])), props.width);
|
39
32
|
}
|
40
33
|
}, Column, MainArea, Column, MainArea, MainArea, Flex, TitleArea, function (props) {
|
41
34
|
if (props.selected) {
|
42
|
-
return css(["background-color:var(--kep-platform-color-bg-active) !important
|
35
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background-color: var(--kep-platform-color-bg-active) !important;\n color: var(--kep-platform-color-text-active) !important;\n & ", ", & ", " {\n background-color: var(--kep-platform-color-bg-active) !important;\n color: var(--kep-platform-color-text-active) !important;\n }\n & ", " {\n overflow-x: auto;\n & > ", " {\n width: auto;\n }\n }\n & ", " {\n overflow-x: auto;\n }\n "])), Column, MainArea, MainArea, Flex, TitleArea);
|
43
36
|
}
|
44
37
|
});
|
45
|
-
var TreeNodeGroupNode = styled.li
|
46
|
-
displayName: "TreeNodeGroupNode",
|
47
|
-
componentId: "basic-component-347b__sc-tzoomn-3"
|
48
|
-
})(["height:40px;line-height:40px;background-color:var(--kep-platform-color-primary);color:var(--kep-platform-color-white);& span{color:var(--kep-platform-color-white) !important;}cursor:pointer;", ""], function (props) {
|
38
|
+
var TreeNodeGroupNode = styled.li(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n height: 40px;\n line-height: 40px;\n background-color: var(--kep-platform-color-primary);\n color: var(--kep-platform-color-white);\n & span {\n color: var(--kep-platform-color-white) !important;\n }\n cursor: pointer;\n ", "\n"])), function (props) {
|
49
39
|
if (props.width) {
|
50
|
-
return css(["width:", "px
|
40
|
+
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: ", "px;\n "])), props.width);
|
51
41
|
}
|
52
42
|
});
|
53
43
|
var TreeNodeGroup = function TreeNodeGroup(props) {
|
package/dist/Tree/test.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
var _templateObject;
|
1
2
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
3
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -5,6 +6,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
5
6
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
6
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
7
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
9
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
8
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9
11
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
10
12
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
@@ -110,10 +112,7 @@ var mystore = new MyStore([{
|
|
110
112
|
count: 2
|
111
113
|
}]
|
112
114
|
}]);
|
113
|
-
var Title = styled.div
|
114
|
-
displayName: "Title",
|
115
|
-
componentId: "basic-component-347b__sc-bc9b32-0"
|
116
|
-
})(["width:100%;text-align:center;"]);
|
115
|
+
var Title = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n text-align: center;\n"])));
|
117
116
|
export default (function () {
|
118
117
|
var _useState = useState([]),
|
119
118
|
_useState2 = _slicedToArray(_useState, 2),
|
package/dist/ViewPort/Ripple.js
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
var _templateObject, _templateObject2;
|
2
3
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
3
4
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
4
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
5
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
7
8
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
9
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
8
10
|
import { makeAutoObservable } from 'mobx';
|
9
11
|
import React from 'react';
|
10
12
|
import styled, { keyframes } from 'styled-components';
|
11
|
-
var rippleAnimation = keyframes(["from{transform:scale(1)
|
12
|
-
export var Ripple = styled.div
|
13
|
-
displayName: "Ripple",
|
14
|
-
componentId: "basic-component-347b__sc-zqrqyo-0"
|
15
|
-
})(["position:absolute;border-radius:50%;width:10px;height:10px;background-color:#fff0;& > div{position:absolute;left:0;top:0;width:10px;height:10px;background-color:#fff;border-radius:50%;margin-left:-5px;margin-top:-5px;transform:scale(0);animation:", " 500ms linear;}& .first{}& .second{animation-delay:150ms;}"], rippleAnimation);
|
13
|
+
var rippleAnimation = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from {\n transform: scale(1);\n }\n to {\n\n transform: scale(4);\n opacity: 0;\n }\n"])));
|
14
|
+
export var Ripple = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: #fff0;\n & > div {\n position: absolute;\n left: 0;\n top: 0;\n width: 10px;\n height: 10px;\n background-color: #fff;\n border-radius: 50%;\n margin-left: -5px;\n margin-top: -5px;\n transform: scale(0);\n animation: ", " 500ms linear;\n }\n & .first {\n }\n & .second {\n animation-delay: 150ms;\n }\n"])), rippleAnimation);
|
16
15
|
export var RippleManagerStore = /*#__PURE__*/function () {
|
17
16
|
function RippleManagerStore() {
|
18
17
|
_classCallCheck(this, RippleManagerStore);
|
@@ -1,22 +1,18 @@
|
|
1
1
|
var _excluded = ["children", "viewPortStore", "onScroll", "onScale"],
|
2
2
|
_excluded2 = ["children", "viewPortStore"];
|
3
|
+
var _templateObject, _templateObject2;
|
3
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
5
6
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
7
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
6
8
|
import { DndContext, useDraggable } from '@dnd-kit/core';
|
7
9
|
import { observer } from 'mobx-react-lite';
|
8
10
|
import React, { useEffect, useRef } from 'react';
|
9
11
|
import styled from 'styled-components';
|
10
12
|
import { RippleManagerStore } from "./Ripple";
|
11
13
|
import { ViewPortWindow } from "./ViewPortWindow";
|
12
|
-
var Container = styled.div
|
13
|
-
|
14
|
-
componentId: "basic-component-347b__sc-1qpmpop-0"
|
15
|
-
})(["position:relative;border:1px solid #eee;box-shadow:0 0 7px 0 inset #fefefe;"]);
|
16
|
-
var Content = styled.div.withConfig({
|
17
|
-
displayName: "Content",
|
18
|
-
componentId: "basic-component-347b__sc-1qpmpop-1"
|
19
|
-
})(["position:absolute;"]);
|
14
|
+
var Container = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n border: 1px solid #eee;\n box-shadow: 0 0 7px 0 inset #fefefe;\n"])));
|
15
|
+
var Content = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n"])));
|
20
16
|
var rippleManagerStore = new RippleManagerStore();
|
21
17
|
var ViewPortEntity = observer(function (props) {
|
22
18
|
var children = props.children,
|
package/dist/ViewPort/test.js
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
var _templateObject;
|
1
2
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
3
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
2
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
3
5
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
4
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
@@ -43,10 +45,7 @@ var WindowManager = /*#__PURE__*/function () {
|
|
43
45
|
return WindowManager;
|
44
46
|
}();
|
45
47
|
var windowManager = new WindowManager();
|
46
|
-
var StyledViewPort = styled(ViewPort)
|
47
|
-
displayName: "StyledViewPort",
|
48
|
-
componentId: "basic-component-347b__sc-1b1xrkc-0"
|
49
|
-
})(["border:1px solid #eee;"]);
|
48
|
+
var StyledViewPort = styled(ViewPort)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: 1px solid #eee;\n"])));
|
50
49
|
export default observer(function Test() {
|
51
50
|
useEffect(function () {
|
52
51
|
function setWidthHeight() {
|
package/dist/Window/Window.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
1
3
|
import { CloseCircleOutlined, FullscreenExitOutlined, FullscreenOutlined, MinusCircleOutlined } from '@ant-design/icons';
|
2
4
|
import { observer } from 'mobx-react-lite';
|
3
5
|
import React, { useEffect, useRef } from 'react';
|
@@ -9,68 +11,29 @@ var WindowContainer = styled.div.withConfig({
|
|
9
11
|
shouldForwardProp: function shouldForwardProp(prop) {
|
10
12
|
return !['isMinimize'].includes(prop);
|
11
13
|
}
|
12
|
-
})
|
13
|
-
displayName: "WindowContainer",
|
14
|
-
componentId: "basic-component-347b__sc-7yonmq-0"
|
15
|
-
})(["box-shadow:var(--kep-platform-box-shadow);position:absolute;padding:", ";border-radius:4px;background-color:#fff;overflow:hidden;"], function (props) {
|
14
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-shadow: var(--kep-platform-box-shadow);\n position: absolute;\n padding: ", ";\n border-radius: 4px;\n background-color: #fff;\n overflow: hidden;\n"])), function (props) {
|
16
15
|
return props.isMinimize ? '0px' : '6px';
|
17
16
|
});
|
18
|
-
var WindowEntity = styled.div
|
19
|
-
displayName: "WindowEntity",
|
20
|
-
componentId: "basic-component-347b__sc-7yonmq-1"
|
21
|
-
})(["width:100%;height:100%;"]);
|
17
|
+
var WindowEntity = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n"])));
|
22
18
|
var WindowHeader = styled.div.withConfig({
|
23
19
|
shouldForwardProp: function shouldForwardProp(prop) {
|
24
20
|
return !['isDragging'].includes(prop);
|
25
21
|
}
|
26
|
-
}).
|
27
|
-
displayName: "WindowHeader",
|
28
|
-
componentId: "basic-component-347b__sc-7yonmq-2"
|
29
|
-
})(["height:40px;padding:6px;border-radius:4px;line-height:26px;font-size:16px;background-color:var(--kep-platform-color-primary);transition:margin 0.35s,opacity 0.7s,box-shadow 0.7s;position:relative;color:#fff;cursor:move;& > h5{color:#fff;}&:hover{opacity:0.9;}", ""], function (props) {
|
22
|
+
})(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 40px;\n padding: 6px;\n border-radius: 4px;\n line-height: 26px;\n font-size: 16px;\n background-color: var(--kep-platform-color-primary);\n transition: margin 0.35s, opacity 0.7s, box-shadow 0.7s;\n position: relative;\n color: #fff;\n cursor: move;\n & > h5 {\n color: #fff;\n }\n &:hover {\n opacity: 0.9;\n }\n ", "\n"])), function (props) {
|
30
23
|
if (props.isDragging) {
|
31
|
-
return css(["margin:0 4px
|
24
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin: 0 4px;\n "])));
|
32
25
|
}
|
33
26
|
});
|
34
|
-
var WindowHeaderOptions = styled.div
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
var
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
var
|
43
|
-
|
44
|
-
componentId: "basic-component-347b__sc-7yonmq-5"
|
45
|
-
})(["position:absolute;width:6px;left:0;top:0;bottom:0;cursor:e-resize;"]);
|
46
|
-
var WindowControllerRight = styled(WindowController).withConfig({
|
47
|
-
displayName: "WindowControllerRight",
|
48
|
-
componentId: "basic-component-347b__sc-7yonmq-6"
|
49
|
-
})(["position:absolute;width:6px;height:100%;right:0;top:0;bottom:0;cursor:e-resize;"]);
|
50
|
-
var WindowControllerTop = styled(WindowController).withConfig({
|
51
|
-
displayName: "WindowControllerTop",
|
52
|
-
componentId: "basic-component-347b__sc-7yonmq-7"
|
53
|
-
})(["position:absolute;width:100%;height:6px;left:0;right:0;top:0;cursor:n-resize;"]);
|
54
|
-
var WindowControllerBottom = styled(WindowController).withConfig({
|
55
|
-
displayName: "WindowControllerBottom",
|
56
|
-
componentId: "basic-component-347b__sc-7yonmq-8"
|
57
|
-
})(["position:absolute;width:100%;height:6px;left:0;right:0;bottom:0;cursor:n-resize;"]);
|
58
|
-
var WindowControllerLeftTop = styled(WindowController).withConfig({
|
59
|
-
displayName: "WindowControllerLeftTop",
|
60
|
-
componentId: "basic-component-347b__sc-7yonmq-9"
|
61
|
-
})(["position:absolute;width:6px;height:6px;left:0;top:0;cursor:nwse-resize;"]);
|
62
|
-
var WindowControllerLeftBottom = styled(WindowController).withConfig({
|
63
|
-
displayName: "WindowControllerLeftBottom",
|
64
|
-
componentId: "basic-component-347b__sc-7yonmq-10"
|
65
|
-
})(["position:absolute;width:6px;height:6px;left:0;bottom:0;cursor:nesw-resize;"]);
|
66
|
-
var WindowControllerRightTop = styled(WindowController).withConfig({
|
67
|
-
displayName: "WindowControllerRightTop",
|
68
|
-
componentId: "basic-component-347b__sc-7yonmq-11"
|
69
|
-
})(["position:absolute;width:6px;height:6px;right:0;top:0;cursor:nesw-resize;"]);
|
70
|
-
var WindowControllerRightBottom = styled(WindowController).withConfig({
|
71
|
-
displayName: "WindowControllerRightBottom",
|
72
|
-
componentId: "basic-component-347b__sc-7yonmq-12"
|
73
|
-
})(["position:absolute;width:6px;height:6px;right:0;bottom:0;cursor:nwse-resize;"]);
|
27
|
+
var WindowHeaderOptions = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n right: 6px;\n top: 6px;\n"])));
|
28
|
+
var WindowBody = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: auto;\n padding: 12px;\n flex: 1;\n"])));
|
29
|
+
var WindowControllerLeft = styled(WindowController)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n position: absolute;\n width: 6px;\n left: 0;\n top: 0;\n bottom: 0;\n cursor: e-resize;\n"])));
|
30
|
+
var WindowControllerRight = styled(WindowController)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: absolute;\n width: 6px;\n height: 100%;\n right: 0;\n top: 0;\n bottom: 0;\n cursor: e-resize;\n"])));
|
31
|
+
var WindowControllerTop = styled(WindowController)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n position: absolute;\n width: 100%;\n height: 6px;\n left: 0;\n right: 0;\n top: 0;\n cursor: n-resize;\n"])));
|
32
|
+
var WindowControllerBottom = styled(WindowController)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n position: absolute;\n width: 100%;\n height: 6px;\n left: 0;\n right: 0;\n bottom: 0;\n cursor: n-resize;\n"])));
|
33
|
+
var WindowControllerLeftTop = styled(WindowController)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: absolute;\n width: 6px;\n height: 6px;\n left: 0;\n top: 0;\n cursor: nwse-resize;\n"])));
|
34
|
+
var WindowControllerLeftBottom = styled(WindowController)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n position: absolute;\n width: 6px;\n height: 6px;\n left: 0;\n bottom: 0;\n cursor: nesw-resize;\n"])));
|
35
|
+
var WindowControllerRightTop = styled(WindowController)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n position: absolute;\n width: 6px;\n height: 6px;\n right: 0;\n top: 0;\n cursor: nesw-resize;\n"])));
|
36
|
+
var WindowControllerRightBottom = styled(WindowController)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n position: absolute;\n width: 6px;\n height: 6px;\n right: 0;\n bottom: 0;\n cursor: nwse-resize;\n"])));
|
74
37
|
var Window = observer(function (props) {
|
75
38
|
var window = props.window,
|
76
39
|
title = props.title,
|
@@ -82,7 +45,6 @@ var Window = observer(function (props) {
|
|
82
45
|
var _windowContainerRef$c;
|
83
46
|
function stopWheel(e) {
|
84
47
|
e.stopPropagation();
|
85
|
-
e.preventDefault();
|
86
48
|
}
|
87
49
|
(_windowContainerRef$c = windowContainerRef.current) === null || _windowContainerRef$c === void 0 || _windowContainerRef$c.addEventListener('wheel', stopWheel);
|
88
50
|
return function () {
|
@@ -1,14 +1,13 @@
|
|
1
1
|
var _excluded = ["type", "window", "children"];
|
2
|
+
var _templateObject;
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
4
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
5
7
|
import { useDraggable } from '@dnd-kit/core';
|
6
8
|
import React, { useEffect } from 'react';
|
7
9
|
import styled from 'styled-components';
|
8
|
-
var WindowControllerContainer = styled.div
|
9
|
-
displayName: "WindowControllerContainer",
|
10
|
-
componentId: "basic-component-347b__sc-1rv6ocd-0"
|
11
|
-
})(["&:active,&:focus{outline:none;}"]);
|
10
|
+
var WindowControllerContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &:active,\n &:focus {\n outline: none;\n }\n"])));
|
12
11
|
export default function WindowController(props) {
|
13
12
|
var type = props.type,
|
14
13
|
window = props.window,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
var _excluded = ["icon"];
|
2
|
+
var _templateObject, _templateObject2;
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -8,20 +9,18 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
8
9
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
9
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
10
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
12
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
11
13
|
import React, { useState } from 'react';
|
12
14
|
import styled, { css } from 'styled-components';
|
13
15
|
var WindowOptionContainer = styled.span.withConfig({
|
14
16
|
shouldForwardProp: function shouldForwardProp(prop) {
|
15
17
|
return !['active'].includes(prop);
|
16
18
|
}
|
17
|
-
}).
|
18
|
-
displayName: "WindowOptionContainer",
|
19
|
-
componentId: "basic-component-347b__sc-1ebf27x-0"
|
20
|
-
})(["cursor:pointer;& svg{transition:transform 0.5s;color:", ";}&:hover{& svg{transform:scale(1.2);}}", ""], function (props) {
|
19
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n & svg {\n transition: transform 0.5s;\n color: ", ";\n }\n &:hover {\n & svg {\n transform: scale(1.2);\n }\n }\n ", "\n"])), function (props) {
|
21
20
|
return props.color || 'auto';
|
22
21
|
}, function (props) {
|
23
22
|
if (props.active) {
|
24
|
-
return css(["& svg{transform:scale(0.9) !important
|
23
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n & svg {\n transform: scale(0.9) !important;\n }\n "])));
|
25
24
|
}
|
26
25
|
});
|
27
26
|
export default function WindowOption(props) {
|
package/dist/Window/test.js
CHANGED
@@ -1,55 +1,27 @@
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
3
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
4
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
5
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
7
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
-
import { DndContext } from '@dnd-kit/core';
|
9
|
-
import { makeAutoObservable } from 'mobx';
|
10
1
|
import { observer, useLocalObservable } from 'mobx-react-lite';
|
11
2
|
import React from 'react';
|
12
|
-
import { ViewPort, ViewPortStore } from "../ViewPort";
|
13
3
|
import { GlobalStyles } from "../__styles";
|
14
4
|
import Window from "./Window";
|
15
5
|
import { WindowStore } from "./index";
|
16
|
-
var WindowManager = /*#__PURE__*/function () {
|
17
|
-
function WindowManager() {
|
18
|
-
_classCallCheck(this, WindowManager);
|
19
|
-
_defineProperty(this, "windows", [new WindowStore('jss', this.closeWindowHanlder.bind(this)), new WindowStore('jx', this.closeWindowHanlder.bind(this)), new WindowStore('jiangxin', this.closeWindowHanlder.bind(this)), new WindowStore('xixi', this.closeWindowHanlder.bind(this))]);
|
20
|
-
makeAutoObservable(this);
|
21
|
-
}
|
22
|
-
_createClass(WindowManager, [{
|
23
|
-
key: "closeWindowHanlder",
|
24
|
-
value: function closeWindowHanlder(id) {
|
25
|
-
this.windows = this.windows.filter(function (window) {
|
26
|
-
return window.id !== id;
|
27
|
-
});
|
28
|
-
}
|
29
|
-
}, {
|
30
|
-
key: "report",
|
31
|
-
get: function get() {
|
32
|
-
return this.windows.map(function (window) {
|
33
|
-
return window.id;
|
34
|
-
}).join(',');
|
35
|
-
}
|
36
|
-
}]);
|
37
|
-
return WindowManager;
|
38
|
-
}();
|
39
|
-
var windowManager = new WindowManager();
|
40
6
|
export default observer(function Test() {
|
41
|
-
var
|
42
|
-
return new
|
7
|
+
var windowStore = useLocalObservable(function () {
|
8
|
+
return new WindowStore('jss');
|
43
9
|
});
|
44
|
-
return /*#__PURE__*/React.createElement(
|
10
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GlobalStyles, {
|
45
11
|
$css: []
|
46
|
-
}), /*#__PURE__*/React.createElement(
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
12
|
+
}), /*#__PURE__*/React.createElement("div", {
|
13
|
+
style: {
|
14
|
+
position: 'relative',
|
15
|
+
height: '1000px'
|
16
|
+
}
|
17
|
+
}, /*#__PURE__*/React.createElement(Window, {
|
18
|
+
window: windowStore,
|
19
|
+
key: windowStore.id,
|
20
|
+
title: 'xixi'
|
21
|
+
}, /*#__PURE__*/React.createElement("div", {
|
22
|
+
style: {
|
23
|
+
backgroundColor: 'pink',
|
24
|
+
width: '1000px'
|
25
|
+
}
|
26
|
+
}, "121asdjklfjikasdhujikfh awkldjnfhb qweuijfklasdbnhuifwoqnf jkhweuof jkhwuifhqwdh jknwjkd klfhwdujih fuoqwjn klnfkmsdhnajikfh jklasdkl jdklajkl jfklasdjkl jkldjiof1huihfklnsdjklf2", /*#__PURE__*/React.createElement("br", null), "asdjklfjasdklj kljasdkldjf iawhjio jkldjnsajhnfujihnfffffffffffffffffffffffffffffffffffffffffffffffffklasdnmkdlf djkafljkdlfjkl;asdf fjklasdjkl;fjdaskl;jfk;asdf asdjfkasdjkf;f asjfiko;djaskl;fjas fjikasdjfk;asd", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "djklasdjkl;jaksdjkl; askdjkl jaksdjk l;asd"))));
|
55
27
|
});
|