@kep-platform/basic-component 1.0.15 → 1.0.19
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/dist/Button/Button.js +12 -14
- package/dist/Tree/MainProperties.d.ts +1 -1
- package/dist/ViewPort/ViewPortWindow.d.ts +1 -0
- package/dist/ViewPort/ViewPortWindow.js +17 -0
- package/dist/Window/Window.d.ts +2 -1
- package/dist/Window/Window.js +42 -4
- package/dist/Window/WindowOption.js +2 -2
- package/dist/Window/WindowStore.d.ts +3 -0
- package/dist/Window/WindowStore.js +25 -1
- package/package.json +89 -88
package/dist/Button/Button.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
var _excluded = ["type", "size"];
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
3
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); }
|
4
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
5
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."); }
|
@@ -21,33 +21,31 @@ var StyledButton = styled('button').withConfig({
|
|
21
21
|
shouldForwardProp: function shouldForwardProp(prop) {
|
22
22
|
return !['isActive'].includes(prop);
|
23
23
|
}
|
24
|
-
})(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
25
|
-
return
|
26
|
-
}, function (
|
27
|
-
return
|
28
|
-
}, function (props) {
|
29
|
-
if (props.theme.buttonBorderRadius) return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-radius: ", ";\n "])), props.theme.buttonBorderRadius);else return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: var(--kep-platform-border-radius);\n "])));
|
24
|
+
})(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\tfont-weight: ", ";\n\toutline: none;\n\tborder-width: ", ";\n\tborder-style: solid;\n\tpadding: var(--kep-platform-padding-block) var(--kep-platform-padding-inline);\n\tfont-size: var(--kep-platform-font-size);\n\tword-break: normal;\n\twhite-space: nowrap;\n\tborder-radius: var(--kep-platform-border-radius);\n\n\t/* type \u63A7\u5236 */\n\t", "\n\t/* \u662F\u5426\u70B9\u51FBactive */\n ", "\n /* size\u63A7\u5236 */\n ", "\n &:hover {\n\t\topacity: 0.7;\n\t}\n"])), function () {
|
25
|
+
return theme.fontWeight;
|
26
|
+
}, function () {
|
27
|
+
return theme.borderWidth;
|
30
28
|
}, function (props) {
|
31
29
|
switch (props.type) {
|
32
30
|
case 'danger':
|
33
|
-
return css(
|
31
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t\t\t\t\tcolor: var(--kep-platform-color-white);\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t\tbackground-color: var(--kep-platform-red);\n\t\t\t\t"])));
|
34
32
|
case 'default':
|
35
|
-
return css(
|
33
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\tborder-color: var(--kep-platform-color-border);\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t&:hover {\n\t\t\t\t\t\tborder-color: var(--kep-platform-color-primary);\n\t\t\t\t\t\tcolor: var(--kep-platform-color-primary);\n\t\t\t\t\t}\n\t\t\t\t"])), theme.color, theme.backgroundColor);
|
36
34
|
case 'primary':
|
37
|
-
return css(
|
35
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t"])), theme.backgroundColor, theme.primaryColor);
|
38
36
|
}
|
39
37
|
}, function (props) {
|
40
38
|
if (props.isActive) {
|
41
|
-
if (props.type === 'danger') return css(
|
42
|
-
return css(
|
39
|
+
if (props.type === 'danger') return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\t\t\t\t\tanimation: ", " 0.5s linear;\n\t\t\t\t"])), dangerShadowAnimation);else {
|
40
|
+
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n\t\t\t\t\tanimation: ", " 0.5s linear;\n\t\t\t\t"])), defaultShadowAnimation);
|
43
41
|
}
|
44
42
|
}
|
45
43
|
}, function (props) {
|
46
44
|
switch (props.size) {
|
47
45
|
case 'small':
|
48
|
-
return css(
|
46
|
+
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n\t\t\t\t\tpadding: var(--kep-platform-padding-block-sm) var(--kep-platform-padding-inline-sm);\n\t\t\t\t\tfont-size: var(--kep-platform-font-size-sm);\n\t\t\t\t\tborder-radius: var(--kep-platform-border-radius-sm);\n\t\t\t\t"])));
|
49
47
|
case 'large':
|
50
|
-
return css(
|
48
|
+
return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n\t\t\t\t\tpadding: var(--kep-platform-padding-block-lg) var(--kep-platform-padding-inline-lg);\n\t\t\t\t\tfont-size: var(--kep-platform-font-size-lg);\n\t\t\t\t\tborder-radius: var(--kep-platform-border-radius-lg);\n\t\t\t\t"])));
|
51
49
|
}
|
52
50
|
});
|
53
51
|
var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { ReactNode } from 'react';
|
2
|
-
export declare const MainArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("../Flex").FlexItemProps
|
2
|
+
export declare const MainArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HtmlHTMLAttributes<HTMLDivElement> | keyof import("../Flex").FlexItemProps> & import("../Flex").FlexItemProps & React.HtmlHTMLAttributes<HTMLDivElement>, "ref"> & {
|
3
3
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
4
4
|
}, never>> & string;
|
5
5
|
type MainPropertyProps = {
|
@@ -35,6 +35,7 @@ export declare class ViewPortWindowStore extends WindowStore {
|
|
35
35
|
centerDisplay(): void;
|
36
36
|
fullscreenWindow(func?: () => void): void;
|
37
37
|
toggleWindow(): void;
|
38
|
+
onSplitWindowHandler(arr: string[], index: number): void;
|
38
39
|
constructor(id: string, viewPort: ViewPortStore, onClosedHandler?: (id: string) => void);
|
39
40
|
get disabled(): boolean;
|
40
41
|
}
|
@@ -30,6 +30,7 @@ export var ViewPortWindowStore = /*#__PURE__*/function (_WindowStore) {
|
|
30
30
|
_this = _super.call(this, id, onClosedHandler);
|
31
31
|
_defineProperty(_assertThisInitialized(_this), "viewPortStore", void 0);
|
32
32
|
_this.viewPortStore = viewPort;
|
33
|
+
_this.fullscreenPos = viewPort.viewPortRect;
|
33
34
|
makeObservable(_assertThisInitialized(_this), {
|
34
35
|
style: override,
|
35
36
|
controll: override,
|
@@ -163,6 +164,7 @@ export var ViewPortWindowStore = /*#__PURE__*/function (_WindowStore) {
|
|
163
164
|
key: "fullscreenWindow",
|
164
165
|
value: function fullscreenWindow(func) {
|
165
166
|
this.resetState();
|
167
|
+
this.focus();
|
166
168
|
this.fullscreen = true;
|
167
169
|
func === null || func === void 0 || func();
|
168
170
|
this.fullscreenPos = this.viewPortStore.viewPortRect;
|
@@ -190,6 +192,21 @@ export var ViewPortWindowStore = /*#__PURE__*/function (_WindowStore) {
|
|
190
192
|
break;
|
191
193
|
}
|
192
194
|
}
|
195
|
+
}, {
|
196
|
+
key: "onSplitWindowHandler",
|
197
|
+
value: function onSplitWindowHandler(arr, index) {
|
198
|
+
var _this2 = this;
|
199
|
+
this.restoreWindow();
|
200
|
+
this.splitPanelVisible = false;
|
201
|
+
var leftPieces = arr.slice(0, index);
|
202
|
+
var leftWidth = leftPieces.reduce(function (acc, cur) {
|
203
|
+
return acc + _this2.calculatePercentageValue(cur, _this2.viewPortStore.viewPortRect.width);
|
204
|
+
}, 0);
|
205
|
+
this.left = leftWidth;
|
206
|
+
this.top = 0;
|
207
|
+
this.width = this.calculatePercentageValue(arr[index], this.viewPortStore.viewPortRect.width);
|
208
|
+
this.height = this.viewPortStore.viewPortRect.height;
|
209
|
+
}
|
193
210
|
}, {
|
194
211
|
key: "disabled",
|
195
212
|
get: function get() {
|
package/dist/Window/Window.d.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import React, { ReactNode } from 'react';
|
2
|
+
import { ViewPortWindowStore } from '../ViewPort';
|
2
3
|
import WindowStore from './WindowStore';
|
3
4
|
export type WindowProps = {
|
4
|
-
window: WindowStore;
|
5
|
+
window: WindowStore | ViewPortWindowStore;
|
5
6
|
children: ReactNode;
|
6
7
|
title: ReactNode;
|
7
8
|
onFullscreenHandler?: () => void;
|
package/dist/Window/Window.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
3
|
-
import { BorderOutlined, CloseOutlined, CompressOutlined, MinusOutlined, ShareAltOutlined } from '@ant-design/icons';
|
3
|
+
import { BorderOutlined, CloseOutlined, CompressOutlined, MinusOutlined, ShareAltOutlined, SplitCellsOutlined } from '@ant-design/icons';
|
4
|
+
import { Popover } from 'antd';
|
4
5
|
import { runInAction } from 'mobx';
|
5
6
|
import { observer } from 'mobx-react-lite';
|
6
7
|
import React, { useEffect, useRef } from 'react';
|
@@ -9,7 +10,7 @@ import WindowController from "./WindowController";
|
|
9
10
|
import WindowOption from "./WindowOption";
|
10
11
|
var WindowContainer = styled.div.withConfig({
|
11
12
|
shouldForwardProp: function shouldForwardProp(prop) {
|
12
|
-
return !['isMinimize'].includes(prop);
|
13
|
+
return !['isMinimize', 'isFullscreen'].includes(prop);
|
13
14
|
}
|
14
15
|
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tbox-shadow: ", ";\n\tposition: absolute;\n\tpadding: 0px;\n\tborder-radius: ", ";\n\tbackground-color: #fff;\n\toverflow: hidden;\n\tborder: 1px solid rgba(50, 58, 67, 0.15);\n"])), function (props) {
|
15
16
|
return props.isFullscreen ? 'none' : 'var(--kep-platform-box-shadow)';
|
@@ -32,6 +33,15 @@ var WindowControllerLeftTop = styled(WindowController)(_templateObject10 || (_te
|
|
32
33
|
var WindowControllerLeftBottom = styled(WindowController)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n\tposition: absolute;\n\twidth: 6px;\n\theight: 6px;\n\tleft: 0;\n\tbottom: 0;\n\tcursor: nesw-resize;\n\tz-index: 2;\n"])));
|
33
34
|
var WindowControllerRightTop = styled(WindowController)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n\tposition: absolute;\n\twidth: 6px;\n\theight: 6px;\n\tright: 0;\n\ttop: 0;\n\tcursor: nesw-resize;\n\tz-index: 2;\n"])));
|
34
35
|
var WindowControllerRightBottom = styled(WindowController)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n\tposition: absolute;\n\twidth: 6px;\n\theight: 6px;\n\tright: 0;\n\tbottom: 0;\n\tcursor: nwse-resize;\n\tz-index: 2;\n"])));
|
36
|
+
var WindowSplitPanelContainer = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n\twidth: 324px;\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 12px;\n"])));
|
37
|
+
var WindowSplitPanel = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n\twidth: 100px;\n\theight: 55px;\n\ttransition: all 0.3s;\n\tdisplay: flex;\n\tgap: 2px;\n\n\t&:hover > div {\n\t\tborder-color: var(--kep-platform-color-primary);\n\t}\n"])));
|
38
|
+
var WindowSplitPanelItem = styled.div.withConfig({
|
39
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
40
|
+
return !['width'].includes(prop);
|
41
|
+
}
|
42
|
+
})(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n\twidth: ", ";\n\theight: 100%;\n\tborder: 2px solid #b4b4b6;\n\tborder-radius: 4px;\n\ttransition: all 0.3s;\n\tbox-sizing: border-box;\n\tbackground-color: #d7d7d9;\n\tcursor: pointer;\n\n\t&:hover {\n\t\tbackground-color: var(--kep-platform-color-primary);\n\t}\n"])), function (props) {
|
43
|
+
return props.width;
|
44
|
+
});
|
35
45
|
var Window = observer(function (props) {
|
36
46
|
var window = props.window,
|
37
47
|
title = props.title,
|
@@ -81,6 +91,21 @@ var Window = observer(function (props) {
|
|
81
91
|
(_windowContainerRef$c6 = windowContainerRef.current) === null || _windowContainerRef$c6 === void 0 || _windowContainerRef$c6.removeEventListener('transitionend', stopTransition);
|
82
92
|
};
|
83
93
|
}, []);
|
94
|
+
var renderPanelItem = function renderPanelItem(arr) {
|
95
|
+
return arr.map(function (item, index) {
|
96
|
+
return /*#__PURE__*/React.createElement(WindowSplitPanelItem, {
|
97
|
+
key: index,
|
98
|
+
width: item,
|
99
|
+
onClick: function onClick() {
|
100
|
+
runInAction(function () {
|
101
|
+
var _window$onSplitWindow;
|
102
|
+
(_window$onSplitWindow = window.onSplitWindowHandler) === null || _window$onSplitWindow === void 0 || _window$onSplitWindow.call(window, arr, index);
|
103
|
+
});
|
104
|
+
}
|
105
|
+
});
|
106
|
+
});
|
107
|
+
};
|
108
|
+
var SplitPanel = /*#__PURE__*/React.createElement(WindowSplitPanelContainer, null, /*#__PURE__*/React.createElement(WindowSplitPanel, null, renderPanelItem(['50%', '50%'])), /*#__PURE__*/React.createElement(WindowSplitPanel, null, renderPanelItem(['66%', '34%'])), /*#__PURE__*/React.createElement(WindowSplitPanel, null, renderPanelItem(['34%', '66%'])), /*#__PURE__*/React.createElement(WindowSplitPanel, null, renderPanelItem(['33%', '34%', '33%'])), /*#__PURE__*/React.createElement(WindowSplitPanel, null, renderPanelItem(['25%', '50%', '25%'])), /*#__PURE__*/React.createElement(WindowSplitPanel, null, renderPanelItem(['50%', '25%', '25%'])));
|
84
109
|
|
85
110
|
/* style 的原因是因为性能问题 */
|
86
111
|
return /*#__PURE__*/React.createElement(WindowContainer, {
|
@@ -145,7 +170,20 @@ var Window = observer(function (props) {
|
|
145
170
|
}, /*#__PURE__*/React.createElement(WindowOption, {
|
146
171
|
icon: /*#__PURE__*/React.createElement(ShareAltOutlined, null),
|
147
172
|
onClick: onShareWindow
|
148
|
-
}), /*#__PURE__*/React.createElement(
|
173
|
+
}), 'viewPortStore' in window && window.viewPortStore && /*#__PURE__*/React.createElement(Popover, {
|
174
|
+
open: window.splitPanelVisible,
|
175
|
+
onOpenChange: function onOpenChange(open) {
|
176
|
+
runInAction(function () {
|
177
|
+
window.splitPanelVisible = open;
|
178
|
+
});
|
179
|
+
},
|
180
|
+
placement: "bottom",
|
181
|
+
arrow: false,
|
182
|
+
color: "#EFEFF1",
|
183
|
+
content: SplitPanel
|
184
|
+
}, /*#__PURE__*/React.createElement(WindowOption, {
|
185
|
+
icon: /*#__PURE__*/React.createElement(SplitCellsOutlined, null)
|
186
|
+
})), /*#__PURE__*/React.createElement(WindowOption, {
|
149
187
|
icon: /*#__PURE__*/React.createElement(MinusOutlined, null),
|
150
188
|
onClick: function onClick() {
|
151
189
|
if (window.disabled) return;
|
@@ -14,9 +14,9 @@ import React, { useState } from 'react';
|
|
14
14
|
import styled from 'styled-components';
|
15
15
|
var WindowOptionContainer = styled.span.withConfig({
|
16
16
|
shouldForwardProp: function shouldForwardProp(prop) {
|
17
|
-
return !['active'].includes(prop);
|
17
|
+
return !['active', 'danger'].includes(prop);
|
18
18
|
}
|
19
|
-
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
19
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\theight: 100%;\n\tdisplay: flex;\n\tpadding: 0 16px;\n\tcursor: pointer;\n\t& svg {\n\t\ttransition: transform 0.5s;\n\t}\n\n\t&:hover {\n\t\t& svg {\n\t\t\tcolor: ", ";\n\t\t}\n\n\t\tbackground-color: ", ";\n\t}\n"])), function (props) {
|
20
20
|
if (props.danger) {
|
21
21
|
return '#fff';
|
22
22
|
}
|
@@ -29,6 +29,7 @@ export default class WindowStore {
|
|
29
29
|
};
|
30
30
|
isMinimize: boolean;
|
31
31
|
isClosed: boolean;
|
32
|
+
splitPanelVisible: boolean;
|
32
33
|
onClosedHandler: ((id: string) => void) | undefined;
|
33
34
|
constructor(id: string, onClosedHandler?: (id: string) => void);
|
34
35
|
fullscreenWindow(func?: () => void): void;
|
@@ -46,6 +47,8 @@ export default class WindowStore {
|
|
46
47
|
restoreWindow(): void;
|
47
48
|
closeWindow(): void;
|
48
49
|
focus(): void;
|
50
|
+
calculatePercentageValue(percentageStr: string, baseValue: number): number;
|
51
|
+
onSplitWindowHandler(arr: string[], index: number): void;
|
49
52
|
get status(): WindowStatus;
|
50
53
|
get style(): CSSProperties;
|
51
54
|
get info(): string;
|
@@ -32,6 +32,7 @@ var WindowStore = /*#__PURE__*/function () {
|
|
32
32
|
});
|
33
33
|
_defineProperty(this, "isMinimize", false);
|
34
34
|
_defineProperty(this, "isClosed", false);
|
35
|
+
_defineProperty(this, "splitPanelVisible", false);
|
35
36
|
_defineProperty(this, "onClosedHandler", void 0);
|
36
37
|
makeObservable(this, {
|
37
38
|
width: observable,
|
@@ -60,7 +61,8 @@ var WindowStore = /*#__PURE__*/function () {
|
|
60
61
|
resetState: action,
|
61
62
|
focus: action,
|
62
63
|
info: computed,
|
63
|
-
disabled: computed
|
64
|
+
disabled: computed,
|
65
|
+
splitPanelVisible: observable
|
64
66
|
});
|
65
67
|
this.id = id;
|
66
68
|
this.onClosedHandler = onClosedHandler;
|
@@ -166,6 +168,28 @@ var WindowStore = /*#__PURE__*/function () {
|
|
166
168
|
value: function focus() {
|
167
169
|
this.zIndex++;
|
168
170
|
}
|
171
|
+
}, {
|
172
|
+
key: "calculatePercentageValue",
|
173
|
+
value: function calculatePercentageValue(percentageStr, baseValue) {
|
174
|
+
// 移除空格和百分号,转换为数值
|
175
|
+
var num = parseFloat(percentageStr.replace(/\s+|%/g, '')) || 0;
|
176
|
+
return Math.round(num / 100 * baseValue);
|
177
|
+
}
|
178
|
+
}, {
|
179
|
+
key: "onSplitWindowHandler",
|
180
|
+
value: function onSplitWindowHandler(arr, index) {
|
181
|
+
var _this2 = this;
|
182
|
+
this.restoreWindow();
|
183
|
+
this.splitPanelVisible = false;
|
184
|
+
var leftPieces = arr.slice(0, index);
|
185
|
+
var leftWidth = leftPieces.reduce(function (acc, cur) {
|
186
|
+
return acc + _this2.calculatePercentageValue(cur, _this2.fullscreenPos.width);
|
187
|
+
}, 0);
|
188
|
+
this.left = leftWidth;
|
189
|
+
this.top = 0;
|
190
|
+
this.width = this.calculatePercentageValue(arr[index], this.fullscreenPos.width);
|
191
|
+
this.height = this.fullscreenPos.height;
|
192
|
+
}
|
169
193
|
}, {
|
170
194
|
key: "status",
|
171
195
|
get: function get() {
|
package/package.json
CHANGED
@@ -1,90 +1,91 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
2
|
+
"name": "@kep-platform/basic-component",
|
3
|
+
"version": "1.0.19",
|
4
|
+
"description": "A react library developed with dumi",
|
5
|
+
"license": "MIT",
|
6
|
+
"module": "dist/index.js",
|
7
|
+
"types": "dist/index.d.ts",
|
8
|
+
"files": [
|
9
|
+
"dist"
|
10
|
+
],
|
11
|
+
"scripts": {
|
12
|
+
"build": "father build",
|
13
|
+
"build:watch": "father dev",
|
14
|
+
"dev": "dumi dev",
|
15
|
+
"docs:build": "dumi build",
|
16
|
+
"docs:preview": "dumi preview",
|
17
|
+
"doctor": "father doctor",
|
18
|
+
"lint": "npm run lint:es && npm run lint:css",
|
19
|
+
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
20
|
+
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
21
|
+
"prepare": "dumi setup",
|
22
|
+
"prepublishOnly": "npm run build",
|
23
|
+
"start": "npm run dev"
|
24
|
+
},
|
25
|
+
"commitlint": {
|
26
|
+
"extends": [
|
27
|
+
"@commitlint/config-conventional"
|
28
|
+
]
|
29
|
+
},
|
30
|
+
"lint-staged": {
|
31
|
+
"*.{md,json}": [
|
32
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
33
|
+
],
|
34
|
+
"*.{css,less}": [
|
35
|
+
"stylelint --fix",
|
36
|
+
"prettier --write"
|
37
|
+
],
|
38
|
+
"*.{js,jsx}": [
|
39
|
+
"eslint --fix",
|
40
|
+
"prettier --write"
|
41
|
+
],
|
42
|
+
"*.{ts,tsx}": [
|
43
|
+
"eslint --fix",
|
44
|
+
"prettier --parser=typescript --write"
|
45
|
+
]
|
46
|
+
},
|
47
|
+
"dependencies": {
|
48
|
+
"@ant-design/icons": "^5.3.7",
|
49
|
+
"@kep-platform/hooks": "^1.0.2",
|
50
|
+
"antd": "^5.8.3",
|
51
|
+
"color": "^4.2.3",
|
52
|
+
"rc-pagination": "^4.1.0"
|
53
|
+
},
|
54
|
+
"devDependencies": {
|
55
|
+
"@babel/runtime": "^7.24.6",
|
56
|
+
"@commitlint/cli": "^17.1.2",
|
57
|
+
"@commitlint/config-conventional": "^17.1.0",
|
58
|
+
"@types/color": "^3.0.6",
|
59
|
+
"@types/react": "^18.0.0",
|
60
|
+
"@types/react-dom": "^18.0.0",
|
61
|
+
"@umijs/lint": "^4.0.0",
|
62
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
63
|
+
"dumi": "^2.3.0",
|
64
|
+
"eslint": "^8.23.0",
|
65
|
+
"father": "^4.1.0",
|
66
|
+
"husky": "^8.0.1",
|
67
|
+
"lint-staged": "^13.0.3",
|
68
|
+
"prettier": "^2.7.1",
|
69
|
+
"prettier-plugin-organize-imports": "^3.0.0",
|
70
|
+
"prettier-plugin-packagejson": "^2.2.18",
|
71
|
+
"react": "^18.0.0",
|
72
|
+
"react-dom": "^18.0.0",
|
73
|
+
"stylelint": "^14.9.1"
|
74
|
+
},
|
75
|
+
"peerDependencies": {
|
76
|
+
"@dnd-kit/core": ">=6.0.0",
|
77
|
+
"@dnd-kit/utilities": ">=3.0.1",
|
78
|
+
"mobx": "^6.12.3",
|
79
|
+
"mobx-react-lite": "^4.0.7",
|
80
|
+
"react": ">=16.9.0",
|
81
|
+
"react-dom": ">=16.9.0",
|
82
|
+
"styled-components": "^6.1.11"
|
83
|
+
},
|
84
|
+
"publishConfig": {
|
85
|
+
"access": "public"
|
86
|
+
},
|
87
|
+
"authors": [
|
88
|
+
"less-step-jss 1599925910@qq.com"
|
89
|
+
],
|
90
|
+
"gitHead": "9e52ed5f84aa43275a2c1107e6a9de9c96ab3a2b"
|
90
91
|
}
|