@zat-design/sisyphus-react 3.4.4 → 3.4.5-beta.1
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/babel.config.js +3 -0
- package/coverage/lcov-report/src/.umi/core/devScripts.ts.html +241 -0
- package/coverage/lcov-report/src/.umi/core/history.ts.html +148 -0
- package/coverage/lcov-report/src/.umi/core/index.html +206 -0
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +109 -0
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +160 -0
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +97 -0
- package/coverage/lcov-report/src/.umi/core/routes.ts.html +26050 -0
- package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +112 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +6340 -0
- package/coverage/lcov-report/src/.umi/dumi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +109 -0
- package/coverage/lcov-report/src/.umi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +172 -0
- package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +94 -0
- package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +106 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/index.html +161 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +268 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +778 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +115 -0
- package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +202 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +142 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +121 -0
- package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +298 -0
- package/coverage/lcov-report/src/.umi/plugin-request/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +919 -0
- package/coverage/lcov-report/src/.umi/umi.ts.html +268 -0
- package/dist/index.esm.css +63 -18
- package/dist/less.esm.css +63 -18
- package/es/ProEditTable/components/RenderField/index.js +3 -2
- package/es/ProEditTable/index.js +13 -2
- package/es/ProEditTable/propsType.d.ts +1 -0
- package/es/ProEditTable/utils/index.js +7 -1
- package/es/ProEnum/components/Group.js +7 -1
- package/es/ProEnum/style/index.less +3 -2
- package/es/ProForm/components/combination/FormList/index.js +5 -5
- package/es/ProForm/components/combination/GroupCopy/component/ComRender.d.ts +14 -0
- package/es/ProForm/components/combination/GroupCopy/component/ComRender.js +36 -0
- package/es/ProForm/components/combination/GroupCopy/index.d.ts +10 -0
- package/es/ProForm/components/combination/GroupCopy/index.js +84 -0
- package/es/ProForm/components/combination/GroupCopy/propsType.d.ts +47 -0
- package/es/ProForm/components/combination/GroupCopy/propsType.js +1 -0
- package/es/ProForm/components/combination/GroupCopy/style/index.less +131 -0
- package/es/ProForm/components/combination/GroupCopy/utils.d.ts +53 -0
- package/es/ProForm/components/combination/GroupCopy/utils.js +180 -0
- package/es/ProForm/components/combination/ProModalSelect/index.js +22 -18
- package/es/ProForm/components/index.js +1 -0
- package/es/ProForm/components/render/Render.js +2 -2
- package/es/ProForm/components/render/propsType.d.ts +1 -1
- package/es/ProIcon/config/index.d.ts +14 -0
- package/es/ProIcon/config/index.js +17 -1
- package/es/ProIcon/index.js +102 -20
- package/es/ProIcon/propsTypes.d.ts +19 -0
- package/es/ProIcon/utils/index.d.ts +1 -0
- package/es/ProIcon/utils/index.js +23 -0
- package/es/ProLayout/components/ProCollapse/index.js +6 -3
- package/es/ProStep/components/Step/index.js +5 -4
- package/es/ProStep/style/index.less +20 -0
- package/es/ProThemeTools/component/PrdTools/index.js +20 -0
- package/es/ProThemeTools/component/PrdTools/style/index.less +56 -48
- package/es/ProTreeModal/index.js +11 -15
- package/es/ProWaterMark/__snapshots__/index.test.tsx.snap +7 -0
- package/es/global.less +38 -2
- package/jest.config.js +8 -0
- package/lib/ProEditTable/components/RenderField/index.js +3 -2
- package/lib/ProEditTable/index.js +13 -2
- package/lib/ProEditTable/propsType.d.ts +1 -0
- package/lib/ProEditTable/utils/index.js +7 -1
- package/lib/ProEnum/components/Group.js +6 -0
- package/lib/ProEnum/style/index.less +3 -2
- package/lib/ProForm/components/combination/FormList/index.js +5 -5
- package/lib/ProForm/components/combination/GroupCopy/component/ComRender.d.ts +14 -0
- package/lib/ProForm/components/combination/GroupCopy/component/ComRender.js +44 -0
- package/lib/ProForm/components/combination/GroupCopy/index.d.ts +10 -0
- package/lib/ProForm/components/combination/GroupCopy/index.js +91 -0
- package/lib/ProForm/components/combination/GroupCopy/propsType.d.ts +47 -0
- package/lib/ProForm/components/combination/GroupCopy/propsType.js +5 -0
- package/lib/ProForm/components/combination/GroupCopy/style/index.less +131 -0
- package/lib/ProForm/components/combination/GroupCopy/utils.d.ts +53 -0
- package/lib/ProForm/components/combination/GroupCopy/utils.js +187 -0
- package/lib/ProForm/components/combination/ProModalSelect/index.js +23 -19
- package/lib/ProForm/components/render/Render.js +2 -2
- package/lib/ProForm/components/render/propsType.d.ts +1 -1
- package/lib/ProIcon/config/index.d.ts +14 -0
- package/lib/ProIcon/config/index.js +18 -2
- package/lib/ProIcon/index.js +99 -19
- package/lib/ProIcon/propsTypes.d.ts +19 -0
- package/lib/ProIcon/utils/index.d.ts +1 -0
- package/lib/ProIcon/utils/index.js +29 -0
- package/lib/ProLayout/components/ProCollapse/index.js +6 -3
- package/lib/ProStep/components/Step/index.js +5 -4
- package/lib/ProStep/style/index.less +20 -0
- package/lib/ProThemeTools/component/PrdTools/index.js +20 -0
- package/lib/ProThemeTools/component/PrdTools/style/index.less +56 -48
- package/lib/ProTreeModal/index.js +11 -15
- package/lib/ProWaterMark/__snapshots__/index.test.tsx.snap +7 -0
- package/lib/global.less +38 -2
- package/package.json +6 -2
- package/test/__mocks__/fileMock.js +0 -0
- package/test/__mocks__/styleMock.js +0 -0
package/lib/ProIcon/index.js
CHANGED
|
@@ -12,12 +12,18 @@ var _ahooks = require("ahooks");
|
|
|
12
12
|
var _antd = require("antd");
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
14
|
var _lodash = require("lodash");
|
|
15
|
+
var _reactSvg = require("react-svg");
|
|
16
|
+
var _react = require("react");
|
|
15
17
|
var _ProConfigProvider = require("../ProConfigProvider");
|
|
16
18
|
var _config2 = require("./config");
|
|
19
|
+
var _utils = require("./utils");
|
|
17
20
|
var _locale = _interopRequireDefault(require("../locale"));
|
|
18
|
-
var _excluded = ["type", "onClick", "size", "color", "className", "style", "spin", "rotate", "theme", "disabled", "mode", "buttonProps", "children", "mapList"];
|
|
21
|
+
var _excluded = ["type", "onClick", "size", "color", "className", "style", "spin", "rotate", "theme", "disabled", "mode", "buttonProps", "children", "mapList", "src", "actionMap"];
|
|
19
22
|
var ProIcon = function ProIcon(props) {
|
|
20
|
-
var
|
|
23
|
+
var _useProConfig = (0, _ProConfigProvider.useProConfig)(),
|
|
24
|
+
state = _useProConfig.state;
|
|
25
|
+
var config = state.ProIcon,
|
|
26
|
+
antdTheme = state.theme;
|
|
21
27
|
var _config = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), props !== null && props !== void 0 ? props : {});
|
|
22
28
|
var _config$type = _config.type,
|
|
23
29
|
type = _config$type === void 0 ? null : _config$type,
|
|
@@ -41,14 +47,17 @@ var ProIcon = function ProIcon(props) {
|
|
|
41
47
|
children = _config.children,
|
|
42
48
|
_config$mapList = _config.mapList,
|
|
43
49
|
mapList = _config$mapList === void 0 ? [] : _config$mapList,
|
|
50
|
+
src = _config.src,
|
|
51
|
+
actionMap = _config.actionMap,
|
|
44
52
|
reset = (0, _objectWithoutProperties2.default)(_config, _excluded);
|
|
53
|
+
// 主题色
|
|
54
|
+
var _ref = antdTheme !== null && antdTheme !== void 0 ? antdTheme : {},
|
|
55
|
+
_ref$primaryColor = _ref.primaryColor,
|
|
56
|
+
primaryColor = _ref$primaryColor === void 0 ? '#006AFF' : _ref$primaryColor;
|
|
45
57
|
// 语言
|
|
46
58
|
var language = _locale.default.ProIcon.language;
|
|
47
59
|
// 加载内部icon
|
|
48
|
-
|
|
49
|
-
if (status !== 'ready') {
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
60
|
+
(0, _ahooks.useExternal)('https://at.alicdn.com/t/c/font_4063056_jmnz9g5uycp.js');
|
|
52
61
|
var rotateStyle = rotate ? {
|
|
53
62
|
msTransform: "rotate(".concat(rotate, "deg)"),
|
|
54
63
|
transform: "rotate(".concat(rotate, "deg)")
|
|
@@ -70,6 +79,8 @@ var ProIcon = function ProIcon(props) {
|
|
|
70
79
|
var mergedMapList = (0, _lodash.uniqBy)(mapList.concat(_config2.iconMap), targetTextFill);
|
|
71
80
|
var _type = type;
|
|
72
81
|
var _text = children;
|
|
82
|
+
// svg图标对应文本
|
|
83
|
+
var iconText = '';
|
|
73
84
|
var typeIsExistAndIncludeEnglish = _type && /[a-zA-Z]/.test(_type);
|
|
74
85
|
// 模式为icon下,对传入的text进行指定语言-icon 映射
|
|
75
86
|
if (isIconMode && !type) {
|
|
@@ -79,6 +90,7 @@ var ProIcon = function ProIcon(props) {
|
|
|
79
90
|
});
|
|
80
91
|
if (target) {
|
|
81
92
|
_type = target === null || target === void 0 ? void 0 : target.type;
|
|
93
|
+
iconText = target[targetTextFill];
|
|
82
94
|
}
|
|
83
95
|
}
|
|
84
96
|
}
|
|
@@ -93,27 +105,95 @@ var ProIcon = function ProIcon(props) {
|
|
|
93
105
|
}
|
|
94
106
|
}
|
|
95
107
|
}
|
|
108
|
+
var svgProps = {
|
|
109
|
+
className: proIconClassNames,
|
|
110
|
+
fill: 'currentColor',
|
|
111
|
+
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
112
|
+
width: size,
|
|
113
|
+
height: size
|
|
114
|
+
}, rotateStyle), style)
|
|
115
|
+
};
|
|
96
116
|
var RenderIcon = (0, _jsxRuntime.jsx)("span", (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
97
117
|
className: "anticon",
|
|
98
118
|
style: {
|
|
99
119
|
color: color
|
|
100
120
|
}
|
|
101
121
|
}, reset), {}, {
|
|
102
|
-
children: (0, _jsxRuntime.jsx)(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
122
|
+
children: (0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
123
|
+
title: iconText,
|
|
124
|
+
children: !src ? (0, _jsxRuntime.jsx)("svg", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, svgProps), {}, {
|
|
125
|
+
onClick: onClick,
|
|
126
|
+
"aria-hidden": "true",
|
|
127
|
+
children: (0, _jsxRuntime.jsx)("use", {
|
|
128
|
+
xlinkHref: "#icon-".concat(_type)
|
|
129
|
+
})
|
|
130
|
+
})) : (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, svgProps), {}, {
|
|
131
|
+
// @ts-ignore
|
|
132
|
+
onClick: onClick,
|
|
133
|
+
"aria-hidden": "true",
|
|
134
|
+
src: src,
|
|
135
|
+
beforeInjection: function beforeInjection(svg) {
|
|
136
|
+
if (actionMap && svg) {
|
|
137
|
+
var _actionMap$themeMap, _actionMap$themeFillM, _actionMap$gradation, _actionMap$fill;
|
|
138
|
+
// 项目内置的四种主题匹配渐变色
|
|
139
|
+
var mergeThemeMap = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _config2.themeMap), (_actionMap$themeMap = actionMap.themeMap) !== null && _actionMap$themeMap !== void 0 ? _actionMap$themeMap : {});
|
|
140
|
+
// 项目内置的四种双色匹配fill
|
|
141
|
+
var mergeFillThemeMap = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _config2.themeFillMap), (_actionMap$themeFillM = actionMap.themeFillMap) !== null && _actionMap$themeFillM !== void 0 ? _actionMap$themeFillM : {});
|
|
142
|
+
var _gradList = mergeThemeMap[primaryColor];
|
|
143
|
+
var _fillList = mergeFillThemeMap[primaryColor];
|
|
144
|
+
// 渐变操作序列
|
|
145
|
+
var gradList = (_actionMap$gradation = actionMap === null || actionMap === void 0 ? void 0 : actionMap.gradation) !== null && _actionMap$gradation !== void 0 ? _actionMap$gradation : _gradList;
|
|
146
|
+
// 填充操作序列
|
|
147
|
+
var fillList = (_actionMap$fill = actionMap === null || actionMap === void 0 ? void 0 : actionMap.fill) !== null && _actionMap$fill !== void 0 ? _actionMap$fill : _fillList;
|
|
148
|
+
// 节点收集
|
|
149
|
+
var nodeMap = {
|
|
150
|
+
// 渐变色节点收集
|
|
151
|
+
gradation: [],
|
|
152
|
+
// 具有fill属性的节点收集
|
|
153
|
+
fill: []
|
|
154
|
+
};
|
|
155
|
+
// 目前只支持处理渐变及fill填充
|
|
156
|
+
var types = Reflect.ownKeys(nodeMap !== null && nodeMap !== void 0 ? nodeMap : {});
|
|
157
|
+
types.forEach(function (typeKey) {
|
|
158
|
+
(0, _utils.recurseGetNodes)(typeKey, svg, nodeMap[typeKey]);
|
|
159
|
+
});
|
|
160
|
+
if ((gradList === null || gradList === void 0 ? void 0 : gradList.length) > 0) {
|
|
161
|
+
nodeMap.gradation.forEach(function (item, index) {
|
|
162
|
+
// 下一步准备替换的
|
|
163
|
+
var nextStr = gradList[index];
|
|
164
|
+
// 属性原本的值
|
|
165
|
+
var originStr = item.getAttribute('stop-color');
|
|
166
|
+
if (nextStr && originStr !== nextStr) {
|
|
167
|
+
item.setAttribute('stop-color', nextStr);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
if ((fillList === null || fillList === void 0 ? void 0 : fillList.length) > 0) {
|
|
172
|
+
nodeMap.fill.forEach(function (item, index) {
|
|
173
|
+
// 默认接收的
|
|
174
|
+
var receiveStr = fillList[index];
|
|
175
|
+
// 下一步准备替换的
|
|
176
|
+
var nextFillStr = receiveStr === 'theme' ? primaryColor : receiveStr;
|
|
177
|
+
// 属性原本的值
|
|
178
|
+
var originFill = item.getAttribute('fill');
|
|
179
|
+
// 如果包含url(则是内链,不作替换处理
|
|
180
|
+
if (!(originFill && originFill.includes('url(')) && nextFillStr) {
|
|
181
|
+
// 不同才替换
|
|
182
|
+
if (originFill !== nextFillStr) {
|
|
183
|
+
item.setAttribute('fill', nextFillStr);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}))
|
|
114
191
|
})
|
|
115
192
|
}));
|
|
116
|
-
|
|
193
|
+
var _RenderIcon = (0, _react.useMemo)(function () {
|
|
194
|
+
return RenderIcon;
|
|
195
|
+
}, [primaryColor]);
|
|
196
|
+
return !isExtendButtonMode ? _RenderIcon : (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
117
197
|
type: isIconMode ? 'text' : (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.type) || 'link',
|
|
118
198
|
className: proIconClassNames,
|
|
119
199
|
disabled: disabled,
|
|
@@ -6,7 +6,21 @@ interface iconMap {
|
|
|
6
6
|
'text-cn'?: string;
|
|
7
7
|
'text-en'?: string;
|
|
8
8
|
}
|
|
9
|
+
interface themeMap {
|
|
10
|
+
[key: string]: string[];
|
|
11
|
+
}
|
|
12
|
+
interface actionMap {
|
|
13
|
+
themeMap?: themeMap;
|
|
14
|
+
themeFillMap?: themeMap;
|
|
15
|
+
gradation?: string[];
|
|
16
|
+
fill?: string[];
|
|
17
|
+
}
|
|
9
18
|
export interface ProIconProps {
|
|
19
|
+
/**
|
|
20
|
+
* @description 本地import引入
|
|
21
|
+
* @default ""
|
|
22
|
+
*/
|
|
23
|
+
src?: string;
|
|
10
24
|
/**
|
|
11
25
|
* @description 图标的名称
|
|
12
26
|
* @default -
|
|
@@ -75,5 +89,10 @@ export interface ProIconProps {
|
|
|
75
89
|
* @default 项目内认默映射
|
|
76
90
|
*/
|
|
77
91
|
mapList?: iconMap[];
|
|
92
|
+
/**
|
|
93
|
+
* @description svg变更操作表 请到 ProThemeTools 主题配置查看示例
|
|
94
|
+
* @default
|
|
95
|
+
*/
|
|
96
|
+
actionMap?: actionMap;
|
|
78
97
|
}
|
|
79
98
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const recurseGetNodes: (type: any, node: any, queue: any) => void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.recurseGetNodes = void 0;
|
|
7
|
+
var recurseGetNodes = exports.recurseGetNodes = function recurseGetNodes(type, node, queue) {
|
|
8
|
+
switch (type) {
|
|
9
|
+
// 渐变
|
|
10
|
+
case 'gradation':
|
|
11
|
+
if (node.nodeName === 'stop' && node.getAttribute('stop-color')) {
|
|
12
|
+
queue.push(node);
|
|
13
|
+
}
|
|
14
|
+
break;
|
|
15
|
+
// 填充
|
|
16
|
+
case 'fill':
|
|
17
|
+
if (node.getAttribute && node.getAttribute('fill')) {
|
|
18
|
+
queue.push(node);
|
|
19
|
+
}
|
|
20
|
+
break;
|
|
21
|
+
default:
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
if (node.childNodes) {
|
|
25
|
+
for (var i = 0; i < node.childNodes.length; i++) {
|
|
26
|
+
recurseGetNodes(type, node.childNodes[i], queue);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -12,9 +12,9 @@ var _react = require("react");
|
|
|
12
12
|
var _antd = require("antd");
|
|
13
13
|
var _icons = require("@ant-design/icons");
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
var _reactSvg = require("react-svg");
|
|
16
15
|
var _lodash = require("lodash");
|
|
17
16
|
var _fold = _interopRequireDefault(require("../../../assets/fold.svg"));
|
|
17
|
+
var _index = _interopRequireDefault(require("../../../ProIcon/index"));
|
|
18
18
|
var Panel = _antd.Collapse.Panel;
|
|
19
19
|
var ProCollapse = function ProCollapse(props) {
|
|
20
20
|
var title = props.title,
|
|
@@ -79,8 +79,11 @@ var ProCollapse = function ProCollapse(props) {
|
|
|
79
79
|
align: "center",
|
|
80
80
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
81
81
|
className: "pro-collapse-icon",
|
|
82
|
-
children: (0, _lodash.isBoolean)(icon) ? (0, _jsxRuntime.jsx)(
|
|
83
|
-
src: _fold.default
|
|
82
|
+
children: (0, _lodash.isBoolean)(icon) ? (0, _jsxRuntime.jsx)(_index.default, {
|
|
83
|
+
src: _fold.default,
|
|
84
|
+
actionMap: {
|
|
85
|
+
fill: []
|
|
86
|
+
}
|
|
84
87
|
}) : icon
|
|
85
88
|
}), title]
|
|
86
89
|
});
|
|
@@ -11,7 +11,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _lodash = require("lodash");
|
|
14
|
-
var
|
|
14
|
+
var _index = _interopRequireDefault(require("../../../ProIcon/index"));
|
|
15
15
|
var _catalog = _interopRequireDefault(require("../../../assets/catalog.svg"));
|
|
16
16
|
var _Anchor = _interopRequireDefault(require("../Anchor"));
|
|
17
17
|
var _locale = _interopRequireDefault(require("../../../locale"));
|
|
@@ -67,10 +67,11 @@ var Step = exports.Step = function Step(_ref) {
|
|
|
67
67
|
onMouseLeave: handleMouseLeave,
|
|
68
68
|
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
69
69
|
className: "step-menu",
|
|
70
|
-
children: [(0, _jsxRuntime.jsx)(
|
|
70
|
+
children: [(0, _jsxRuntime.jsx)(_index.default, {
|
|
71
|
+
src: _catalog.default,
|
|
71
72
|
className: "menu-icon",
|
|
72
|
-
|
|
73
|
-
}),
|
|
73
|
+
actionMap: {}
|
|
74
|
+
}), true && (0, _jsxRuntime.jsx)("div", {
|
|
74
75
|
children: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProStep = _locale.default.ProStep) === null || _locale$ProStep === void 0 ? void 0 : _locale$ProStep.catalogue
|
|
75
76
|
})]
|
|
76
77
|
}), options.map(function (item) {
|
|
@@ -27,6 +27,26 @@
|
|
|
27
27
|
height: 48px;
|
|
28
28
|
font-size: var(--zaui-font-size-lg, 16px);
|
|
29
29
|
border-bottom: 1px solid var(--zaui-line, #dddddd);
|
|
30
|
+
> .anticon {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
width: 48px;
|
|
35
|
+
height: 24px;
|
|
36
|
+
> .menu-icon {
|
|
37
|
+
width: auto !important;
|
|
38
|
+
height: auto !important;
|
|
39
|
+
font-size: var(--zaui-font-size-lg-title, 24px);
|
|
40
|
+
fill: var(--zaui-brand, #006aff);
|
|
41
|
+
> div {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
width: 48px;
|
|
46
|
+
height: 24px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
30
50
|
|
|
31
51
|
> .menu-icon {
|
|
32
52
|
font-size: var(--zaui-font-size-lg-title, 24px);
|
|
@@ -46,6 +46,9 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
46
46
|
}, {
|
|
47
47
|
color: '#A00F20',
|
|
48
48
|
active: false
|
|
49
|
+
}, {
|
|
50
|
+
color: '#31AF96',
|
|
51
|
+
active: false
|
|
49
52
|
}]),
|
|
50
53
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
51
54
|
active = _useState2[0],
|
|
@@ -65,8 +68,17 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
65
68
|
};
|
|
66
69
|
});
|
|
67
70
|
setActive(newArray);
|
|
71
|
+
dispatch({
|
|
72
|
+
type: 'set',
|
|
73
|
+
payload: {
|
|
74
|
+
theme: {
|
|
75
|
+
primaryColor: zauiBrand
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
68
79
|
}
|
|
69
80
|
}, []);
|
|
81
|
+
console.log('我看看zg', active);
|
|
70
82
|
return (0, _jsxRuntime.jsxs)(NewDrawer, {
|
|
71
83
|
className: "pro-theme-prd-tools-drawer",
|
|
72
84
|
width: 400,
|
|
@@ -105,6 +117,14 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
105
117
|
(0, _index.setThemes)({
|
|
106
118
|
'zaui-brand': item.color
|
|
107
119
|
});
|
|
120
|
+
dispatch({
|
|
121
|
+
type: 'set',
|
|
122
|
+
payload: {
|
|
123
|
+
theme: {
|
|
124
|
+
primaryColor: item.color
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
108
128
|
},
|
|
109
129
|
children: item.active ? (0, _jsxRuntime.jsx)(_icons.CheckOutlined, {}) : null
|
|
110
130
|
}, item.color);
|
|
@@ -16,20 +16,20 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
p {
|
|
19
|
-
|
|
20
|
-
position : relative;
|
|
19
|
+
position: relative;
|
|
21
20
|
margin-bottom: var(--zaui-space-size-md, 16px);
|
|
22
|
-
|
|
21
|
+
padding-left: 12px;
|
|
22
|
+
font-size: var(--zaui-font-size, 14px);
|
|
23
23
|
|
|
24
24
|
&:before {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
left
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
background : var(--zaui-brand, #006aff);
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 4px;
|
|
27
|
+
left: 0;
|
|
28
|
+
width: 4px;
|
|
29
|
+
height: 14px;
|
|
30
|
+
background: var(--zaui-brand, #006aff);
|
|
32
31
|
border-radius: var(zaui-border-radius-card, 4px);
|
|
32
|
+
content: '';
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
display: flex;
|
|
38
38
|
|
|
39
39
|
li {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
border-radius : 50%;
|
|
43
|
-
background : #fff;
|
|
44
|
-
display : flex;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
45
42
|
justify-content: center;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
width: 38px;
|
|
44
|
+
height: 38px;
|
|
45
|
+
margin-right: 34px;
|
|
46
|
+
color: #fff;
|
|
47
|
+
background: #fff;
|
|
48
|
+
border: 6px solid #fff;
|
|
49
|
+
border-radius: 50%;
|
|
50
50
|
|
|
51
51
|
span {
|
|
52
|
-
font-size
|
|
52
|
+
font-size: var(--zaui-font-size, 14px);
|
|
53
53
|
vertical-align: -7px;
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -81,8 +81,16 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&:nth-child(4) {
|
|
84
|
+
background: #a00f20;
|
|
85
|
+
|
|
86
|
+
&.active,
|
|
87
|
+
&:hover {
|
|
88
|
+
border-color: #f2dbdb;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
&:nth-child(5) {
|
|
84
92
|
margin-right: 0;
|
|
85
|
-
background
|
|
93
|
+
background: #31af96;
|
|
86
94
|
|
|
87
95
|
&.active,
|
|
88
96
|
&:hover {
|
|
@@ -98,16 +106,16 @@
|
|
|
98
106
|
|
|
99
107
|
.copy-btn {
|
|
100
108
|
position: absolute;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
bottom: 20px;
|
|
110
|
+
left: 32px;
|
|
111
|
+
z-index: 10;
|
|
112
|
+
width: calc(100% - 64px);
|
|
105
113
|
}
|
|
106
114
|
|
|
107
115
|
.pro-theme-tools-box {
|
|
108
|
-
display
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-wrap: wrap;
|
|
109
118
|
justify-content: space-between;
|
|
110
|
-
flex-wrap : wrap;
|
|
111
119
|
}
|
|
112
120
|
|
|
113
121
|
.pro-theme-tools-space {
|
|
@@ -129,22 +137,22 @@
|
|
|
129
137
|
}
|
|
130
138
|
|
|
131
139
|
.pro-drawer-close {
|
|
132
|
-
position
|
|
133
|
-
top
|
|
134
|
-
left
|
|
135
|
-
display
|
|
136
|
-
align-items
|
|
140
|
+
position: absolute;
|
|
141
|
+
top: 6px;
|
|
142
|
+
left: -37px;
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
137
145
|
justify-content: center;
|
|
138
|
-
width
|
|
139
|
-
height
|
|
140
|
-
color
|
|
141
|
-
cursor
|
|
146
|
+
width: 32px;
|
|
147
|
+
height: 38px;
|
|
148
|
+
color: #fff;
|
|
149
|
+
cursor: pointer;
|
|
142
150
|
|
|
143
151
|
.close-icon {
|
|
144
|
-
position
|
|
145
|
-
left
|
|
146
|
-
z-index
|
|
147
|
-
color
|
|
152
|
+
position: relative;
|
|
153
|
+
left: 4px;
|
|
154
|
+
z-index: 1;
|
|
155
|
+
color: var(--zaui-text, #343434);
|
|
148
156
|
font-size: var(--zaui-font-size-lg, 16px);
|
|
149
157
|
transform: translateZ(100px);
|
|
150
158
|
|
|
@@ -155,14 +163,14 @@
|
|
|
155
163
|
}
|
|
156
164
|
|
|
157
165
|
.pro-drawer-close::after {
|
|
158
|
-
position
|
|
159
|
-
top
|
|
160
|
-
right
|
|
161
|
-
bottom
|
|
162
|
-
left
|
|
166
|
+
position: absolute;
|
|
167
|
+
top: 0;
|
|
168
|
+
right: 0;
|
|
169
|
+
bottom: 0;
|
|
170
|
+
left: 0;
|
|
163
171
|
background-color: #fff;
|
|
164
|
-
border-radius
|
|
165
|
-
transform
|
|
166
|
-
content
|
|
172
|
+
border-radius: 4px 0px 0px 4px;
|
|
173
|
+
transform: perspective(0.15em) rotateY(-2deg);
|
|
174
|
+
content: '';
|
|
167
175
|
}
|
|
168
176
|
}
|
|
@@ -207,10 +207,11 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
207
207
|
setState({
|
|
208
208
|
checkedValues: checkedValues,
|
|
209
209
|
checkAll: checkedValues.length === allKeys.length,
|
|
210
|
-
treeViewData: treeViewData
|
|
210
|
+
treeViewData: treeViewData,
|
|
211
|
+
beforeClearAllValues: checkedValues
|
|
211
212
|
});
|
|
212
213
|
}
|
|
213
|
-
}, [value, state.allKeys]);
|
|
214
|
+
}, [value, state.allKeys, state.open]);
|
|
214
215
|
var handleClick = function handleClick() {
|
|
215
216
|
setState({
|
|
216
217
|
open: true
|
|
@@ -277,24 +278,19 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
277
278
|
treeViewData: [],
|
|
278
279
|
checkAll: false
|
|
279
280
|
});
|
|
280
|
-
|
|
281
|
+
/* ******** fix:3.4.4-beta.4 点击清空全部不应该回调、所有的都是应该走统一的确定 ********* */
|
|
282
|
+
// onChange?.(_checkedValues);
|
|
281
283
|
};
|
|
282
284
|
/**
|
|
283
285
|
* Drawer close
|
|
284
286
|
*/
|
|
285
287
|
var handleClose = function handleClose() {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
});
|
|
293
|
-
} else {
|
|
294
|
-
setState({
|
|
295
|
-
open: false
|
|
296
|
-
});
|
|
297
|
-
}
|
|
288
|
+
setState({
|
|
289
|
+
open: false,
|
|
290
|
+
checkedValues: state.beforeClearAllValues,
|
|
291
|
+
beforeClearAllValues: []
|
|
292
|
+
});
|
|
293
|
+
// onChange?.(state.beforeClearAllValues);
|
|
298
294
|
openChange === null || openChange === void 0 ? void 0 : openChange(false);
|
|
299
295
|
};
|
|
300
296
|
/**
|
package/lib/global.less
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import './style/index.less';
|
|
2
2
|
|
|
3
|
-
pre
|
|
3
|
+
pre {
|
|
4
4
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
* {
|
|
8
|
+
// 火狐浏览器
|
|
9
|
+
scrollbar-width: thin;
|
|
10
|
+
scrollbar-color: #d2d3d7 transparent;
|
|
11
|
+
// ie浏览器
|
|
12
|
+
scrollbar-face-color: #d2d3d7;
|
|
13
|
+
scrollbar-highlight-color: #979797;
|
|
14
|
+
scrollbar-3dlight-color: #979797;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
::-webkit-scrollbar {
|
|
18
|
+
width: 16px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// // 滑块
|
|
22
|
+
::-webkit-scrollbar-thumb {
|
|
23
|
+
background-color: #d2d3d7;
|
|
24
|
+
background-clip: padding-box;
|
|
25
|
+
border-color: transparent;
|
|
26
|
+
border-style: dashed;
|
|
27
|
+
border-width: 4px;
|
|
28
|
+
border-radius: 10px;
|
|
29
|
+
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// 轨道
|
|
33
|
+
::-webkit-scrollbar-track {
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
border-radius: 10px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 悬浮轨道
|
|
39
|
+
::-webkit-scrollbar-thumb:hover {
|
|
40
|
+
background-color: #979797;
|
|
41
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zat-design/sisyphus-react",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.5-beta.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@dnd-kit/sortable": "^7.0.2",
|
|
59
59
|
"@dnd-kit/utilities": "^3.2.1",
|
|
60
60
|
"@pansy/react-watermark": "^3.1.13",
|
|
61
|
-
"@zat-design/utils": "1.1.16",
|
|
61
|
+
"@zat-design/utils": "^1.1.16",
|
|
62
62
|
"ahooks": "3.7.4",
|
|
63
63
|
"antd": "4.24.8",
|
|
64
64
|
"big.js": "^6.2.1",
|
|
@@ -77,7 +77,10 @@
|
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@commitlint/cli": "^12.1.1",
|
|
79
79
|
"@commitlint/config-conventional": "^12.1.1",
|
|
80
|
+
"@testing-library/jest-dom": "6.2.0",
|
|
81
|
+
"@testing-library/react": "12.1.5",
|
|
80
82
|
"@types/classnames": "^2.3.1",
|
|
83
|
+
"@types/jest": "^29.5.11",
|
|
81
84
|
"@types/lodash": "^4.14.171",
|
|
82
85
|
"@types/mockjs": "^1.0.6",
|
|
83
86
|
"@types/react": "^17.0.53",
|
|
@@ -104,6 +107,7 @@
|
|
|
104
107
|
"father-build": "^1.18.1",
|
|
105
108
|
"gh-pages": "^3.0.0",
|
|
106
109
|
"husky": "^4.0.7",
|
|
110
|
+
"jest-canvas-mock": "^2.5.2",
|
|
107
111
|
"lint-staged": "^10.0.0",
|
|
108
112
|
"mockjs": "^1.1.0",
|
|
109
113
|
"prettier": "^2.5.0",
|
|
File without changes
|
|
File without changes
|