xh-lab-rc 0.17.2 → 0.17.4

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.
@@ -9,6 +9,7 @@ interface ILabDGTreeSelectProps {
9
9
  onSelect?: (value: any, node: any) => void;
10
10
  selectDisabledProp?: string;
11
11
  selectDisabledArr?: string[];
12
+ showAll?: boolean;
12
13
  }
13
- declare const LabDGTreeSelect: ({ defaultValue, placeholder, style, treeData, dropdownStyle, onSelect, selectDisabledProp, selectDisabledArr, }: ILabDGTreeSelectProps) => React.JSX.Element;
14
+ declare const LabDGTreeSelect: ({ defaultValue, placeholder, style, treeData, dropdownStyle, onSelect, selectDisabledProp, selectDisabledArr, showAll, }: ILabDGTreeSelectProps) => React.JSX.Element;
14
15
  export default LabDGTreeSelect;
@@ -31,7 +31,9 @@ var LabDGTreeSelect = function LabDGTreeSelect(_ref) {
31
31
  _ref$selectDisabledPr = _ref.selectDisabledProp,
32
32
  selectDisabledProp = _ref$selectDisabledPr === void 0 ? 'NODE_TYPE' : _ref$selectDisabledPr,
33
33
  _ref$selectDisabledAr = _ref.selectDisabledArr,
34
- selectDisabledArr = _ref$selectDisabledAr === void 0 ? [] : _ref$selectDisabledAr;
34
+ selectDisabledArr = _ref$selectDisabledAr === void 0 ? [] : _ref$selectDisabledAr,
35
+ _ref$showAll = _ref.showAll,
36
+ showAll = _ref$showAll === void 0 ? false : _ref$showAll;
35
37
  var _useState = useState(defaultValue || undefined),
36
38
  _useState2 = _slicedToArray(_useState, 2),
37
39
  value = _useState2[0],
@@ -54,7 +56,7 @@ var LabDGTreeSelect = function LabDGTreeSelect(_ref) {
54
56
  return data.map(function (item) {
55
57
  // NODE_TYPE:'1'检验专业组,'2'管理专业组,'4'科室
56
58
  // 如果子节点非科室、专业组,就清空
57
- var clearChild = item.CHILDREN && item.CHILDREN.length > 0 && ['1', '2', '4'].indexOf(item.CHILDREN[0].NODE_TYPE) < 0;
59
+ var clearChild = !showAll && item.CHILDREN && item.CHILDREN.length > 0 && ['1', '2', '4'].indexOf(item.CHILDREN[0].NODE_TYPE) < 0;
58
60
  var SOURCE_ID = item.SOURCE_ID,
59
61
  NAME = item.NAME,
60
62
  NODE_TYPE = item.NODE_TYPE,
@@ -82,7 +84,6 @@ var LabDGTreeSelect = function LabDGTreeSelect(_ref) {
82
84
 
83
85
  // 将得到的树数据,处理成需要的数据
84
86
  var newTreeData = useMemo(function () {
85
- console.log(getNewTreeData(treeData));
86
87
  return getNewTreeData(treeData);
87
88
  }, [treeData]);
88
89
  useEffect(function () {
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
6
  * @Author: xqy
7
7
  * @Date: 2024-04-10 11:04:12
8
8
  * @LastEditors: xqy
9
- * @LastEditTime: 2024-11-28 17:42:47
9
+ * @LastEditTime: 2024-12-24 10:50:48
10
10
  * @Description: 文件预览(支持pdf切换预览)
11
11
  */
12
12
  import { LeftOutlined, RightOutlined, RotateLeftOutlined, RotateRightOutlined, ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons';
@@ -98,7 +98,7 @@ var LabFilePreview = function LabFilePreview(props) {
98
98
  var carouselClick = function carouselClick(type) {
99
99
  setScale(1); //重置初始的缩放比例
100
100
  setRotatinNum(0); //重置初始的缩放比例
101
- if (type === 'lt') {
101
+ if (type === 'l') {
102
102
  //向左切换
103
103
  if (curIndex === 0) {
104
104
  //当前的索引为0,获取最后一张图片
@@ -148,7 +148,7 @@ var LabFilePreview = function LabFilePreview(props) {
148
148
  updatedList[curIndex].roteAngle = newRotateNum * 90;
149
149
  setList(updatedList);
150
150
  setRotatinNum(newRotateNum);
151
- getRotateAngle === null || getRotateAngle === void 0 || getRotateAngle(newRotateNum * 90);
151
+ getRotateAngle === null || getRotateAngle === void 0 || getRotateAngle(newRotateNum * 90, direction);
152
152
  // //旋转之后,利用canvas生成新的图片(formData类型,供传参使用)
153
153
  // if (isCanvasImg) {
154
154
  // const newFiles = await labCanvasToFile(canvasRef, {
@@ -208,7 +208,7 @@ var LabFilePreview = function LabFilePreview(props) {
208
208
  }
209
209
  }, [imgList]);
210
210
  useEffect(function () {
211
- setCurIndex(curImgIndex);
211
+ setCurIndex(curImgIndex !== null && curImgIndex !== void 0 ? curImgIndex : 0);
212
212
  }, [curImgIndex]);
213
213
  useEffect(function () {
214
214
  var newBtns = _toConsumableArray(footerBtns);
@@ -256,14 +256,14 @@ var LabFilePreview = function LabFilePreview(props) {
256
256
  }, /*#__PURE__*/React.createElement(LeftOutlined, {
257
257
  className: "footer-icon",
258
258
  onClick: function onClick() {
259
- return carouselClick('lt');
259
+ return carouselClick('l');
260
260
  }
261
261
  }), /*#__PURE__*/React.createElement("span", {
262
262
  className: "page-text"
263
263
  }, curIndex + 1, "/", imgList === null || imgList === void 0 ? void 0 : imgList.length), /*#__PURE__*/React.createElement(RightOutlined, {
264
264
  className: "footer-icon",
265
265
  onClick: function onClick() {
266
- return carouselClick('rt');
266
+ return carouselClick('r');
267
267
  },
268
268
  title: "\u4E0B\u4E00\u5F20"
269
269
  })), (imgList === null || imgList === void 0 ? void 0 : imgList.length) > 1 && /*#__PURE__*/React.createElement(Divider, {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import './style.less';
3
3
  import type { IGtreeProps } from './typing';
4
- declare const LabGroupTree: ({ treeData, GBeforeIcon, showIcon, isShowNum, isCustomTree, treeProperties, onExpand, onSelect, childTitleNode, titleSuffix, extraNodeProps, ...restProps }: IGtreeProps) => React.JSX.Element;
4
+ declare const LabGroupTree: ({ treeData, GBeforeIcon, showIcon, isShowNum, isCustomTree, treeProperties, onExpand, onSelect, childTitleNode, titleSuffix, extraNodeProps, fieldNames, ...restProps }: IGtreeProps) => React.JSX.Element;
5
5
  export default LabGroupTree;
@@ -3,13 +3,13 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
3
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
4
4
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
- var _excluded = ["treeData", "GBeforeIcon", "showIcon", "isShowNum", "isCustomTree", "treeProperties", "onExpand", "onSelect", "childTitleNode", "titleSuffix", "extraNodeProps"];
7
- /*
8
- * @Author: xqy
9
- * @Date: 2024-03-18 16:23:10
10
- * @LastEditors: xqy
11
- * @LastEditTime: 2024-12-13 15:19:51
12
- * @Description:专业组树形
6
+ var _excluded = ["treeData", "GBeforeIcon", "showIcon", "isShowNum", "isCustomTree", "treeProperties", "onExpand", "onSelect", "childTitleNode", "titleSuffix", "extraNodeProps", "fieldNames"];
7
+ /*
8
+ * @Author: xqy
9
+ * @Date: 2024-03-18 16:23:10
10
+ * @LastEditors: xqy
11
+ * @LastEditTime: 2025-01-11 10:08:02
12
+ * @Description:专业组树形
13
13
  */
14
14
  import { Iconfont } from "../components";
15
15
  import { IconTypes } from "../constants";
@@ -43,6 +43,12 @@ var LabGroupTree = function LabGroupTree(_ref) {
43
43
  titleSuffix = _ref.titleSuffix,
44
44
  _ref$extraNodeProps = _ref.extraNodeProps,
45
45
  extraNodeProps = _ref$extraNodeProps === void 0 ? [] : _ref$extraNodeProps,
46
+ _ref$fieldNames = _ref.fieldNames,
47
+ fieldNames = _ref$fieldNames === void 0 ? {
48
+ title: 'NAME',
49
+ key: 'SOURCE_PATH',
50
+ children: 'CHILDREN'
51
+ } : _ref$fieldNames,
46
52
  restProps = _objectWithoutProperties(_ref, _excluded);
47
53
  // const [treeList, setTreeList] = useState([]);
48
54
  //构造标题的结构
@@ -64,7 +70,11 @@ var LabGroupTree = function LabGroupTree(_ref) {
64
70
  className: "num"
65
71
  }, NUM)))));
66
72
  } else {
67
- return childTitleNode === null || childTitleNode === void 0 ? void 0 : childTitleNode(nodeData);
73
+ return childTitleNode ? childTitleNode === null || childTitleNode === void 0 ? void 0 : childTitleNode(nodeData) : /*#__PURE__*/React.createElement("div", {
74
+ className: "tree-item-text tree-first"
75
+ }, /*#__PURE__*/React.createElement("span", {
76
+ className: "txt"
77
+ }, NAME));
68
78
  }
69
79
  };
70
80
 
@@ -73,7 +83,7 @@ var LabGroupTree = function LabGroupTree(_ref) {
73
83
  var resultKeys = keys;
74
84
  childNode.forEach(function (item) {
75
85
  resultKeys = resultKeys.filter(function (i) {
76
- return i !== (item === null || item === void 0 ? void 0 : item.SOURCE_PATH);
86
+ return i !== (item === null || item === void 0 ? void 0 : item[fieldNames.key]);
77
87
  });
78
88
  if (item.CHILDREN && item.CHILDREN.length) {
79
89
  removeChildNode(item.CHILDREN, resultKeys);
@@ -97,7 +107,7 @@ var LabGroupTree = function LabGroupTree(_ref) {
97
107
  }
98
108
  //折叠收起展开节点
99
109
  newKeys = newKeys.filter(function (i) {
100
- return i !== (node === null || node === void 0 ? void 0 : node.SOURCE_PATH);
110
+ return i !== (node === null || node === void 0 ? void 0 : node[fieldNames.key]);
101
111
  }); //移除收起的节点
102
112
  if (!(node !== null && node !== void 0 && node.CHILDREN && node.CHILDREN.length)) {
103
113
  _context.next = 8;
@@ -174,11 +184,7 @@ var LabGroupTree = function LabGroupTree(_ref) {
174
184
  return props !== null && props !== void 0 && props.expanded ? /*#__PURE__*/React.createElement(MinusSquareOutlined, null) : /*#__PURE__*/React.createElement(PlusSquareOutlined, null);
175
185
  },
176
186
  titleRender: customTitle,
177
- fieldNames: {
178
- title: 'NAME',
179
- key: 'SOURCE_PATH',
180
- children: 'CHILDREN'
181
- },
187
+ fieldNames: fieldNames,
182
188
  onExpand: handleExpand
183
189
  }, treeProperties, restProps));
184
190
  };
@@ -2,6 +2,7 @@
2
2
  width: 100%;
3
3
  height: 100%;
4
4
  background-color: #fff;
5
+ overflow-y: auto;
5
6
 
6
7
  .tree-first {
7
8
  width: calc(100% - 1rem);
@@ -22,23 +23,11 @@
22
23
  font-size: 13px;
23
24
  font-weight: normal;
24
25
  overflow: hidden;
25
-
26
- .txt {
27
- width: 100%;
28
- display: inline-block;
29
- padding: 0 4px;
30
- max-width: 85%;
31
- height: 24px;
32
- overflow: hidden;
33
- text-overflow: ellipsis;
34
- white-space: nowrap;
35
- box-sizing: border-box;
36
- }
26
+ justify-content: space-between;
37
27
  }
38
28
 
39
29
  .sufix {
40
- position: absolute;
41
- right: 0;
30
+ margin-right: 4px;
42
31
  }
43
32
 
44
33
  .num {
@@ -46,6 +35,18 @@
46
35
  }
47
36
  }
48
37
 
38
+ .txt {
39
+ width: 100%;
40
+ display: inline-block;
41
+ padding: 0 4px;
42
+ max-width: 85%;
43
+ height: 24px;
44
+ overflow: hidden;
45
+ text-overflow: ellipsis;
46
+ white-space: nowrap;
47
+ box-sizing: border-box;
48
+ }
49
+
49
50
  .ant-tree-title {
50
51
  width: 100% !important;
51
52
  }
@@ -8,14 +8,18 @@ export interface IGtreeProps {
8
8
  /**默认展开所有树节点 */
9
9
  defaultExpandAll?: boolean;
10
10
  /** 自定义节点 title、key、children 的字段*/
11
- fieldNames?: object;
11
+ fieldNames?: {
12
+ title: string;
13
+ key: string;
14
+ children: string;
15
+ };
12
16
  /**是否展示连接线,用法同ant-desgin tree */
13
17
  showLine?: any;
14
18
  /**是否展示title前的图标,需要自行定义图标相关样式 */
15
19
  showIcon?: boolean;
16
20
  /**异步加载数据 */
17
21
  loadData?: (node: any) => Promise<any>;
18
- /**构造除检/管专业组的标题样式 */
22
+ /**子节点标题自定义 */
19
23
  childTitleNode?: (node: any) => React.ReactNode;
20
24
  /**专业组前的图标*/
21
25
  GBeforeIcon?: (type: string) => React.ReactNode;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import './style.less';
3
+ export interface ILabOperateTree {
4
+ disableSelectedByNodeType?: string[];
5
+ loadingElement?: React.ReactElement;
6
+ loading?: boolean;
7
+ treeData: any;
8
+ leafOperateListElement?: React.ReactElement;
9
+ onSelect?: (node: any) => void;
10
+ iconElementByNodeType?: {
11
+ '2'?: React.ReactElement;
12
+ '4'?: React.ReactElement;
13
+ '10'?: React.ReactElement;
14
+ '11'?: React.ReactElement;
15
+ '15'?: React.ReactElement;
16
+ };
17
+ operateElementByNodeType?: {
18
+ '2'?: React.ReactElement;
19
+ '4'?: React.ReactElement;
20
+ '10'?: React.ReactElement;
21
+ '11'?: React.ReactElement;
22
+ '15'?: React.ReactElement;
23
+ };
24
+ }
25
+ export interface ILabOperateTreeRef {
26
+ getParentItemList: (sourcePath: string) => Array<any>;
27
+ getChildItemList: (sourcePath: any, nodeType?: string, filterCb?: (node: any) => boolean) => Array<any>;
28
+ setSelectItemById: (sourcePath: string) => void;
29
+ getChildById: (sourcePath: string) => any;
30
+ }
31
+ declare const _default: React.ForwardRefExoticComponent<ILabOperateTree & React.RefAttributes<ILabOperateTreeRef>>;
32
+ export default _default;
@@ -0,0 +1,164 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ import { treeToArray } from "../utils/utils";
5
+ import { MoreOutlined } from '@ant-design/icons';
6
+ import { Popover, Spin, Tree } from 'antd';
7
+ import React, { useImperativeHandle, useMemo, useState } from 'react';
8
+ import "./style.less";
9
+ var openMarkData = {};
10
+ var LabOperateTree = function LabOperateTree() {
11
+ var _leafItemTreeList$, _leafItemTreeList$2;
12
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
13
+ treeData: []
14
+ };
15
+ var ref = arguments.length > 1 ? arguments[1] : undefined;
16
+ var allItemTreeList = treeToArray(props.treeData);
17
+ var leafItemTreeList = allItemTreeList.filter(function (v) {
18
+ return v.SOURCE !== null;
19
+ });
20
+ var treeItemIdList = leafItemTreeList === null || leafItemTreeList === void 0 || (_leafItemTreeList$ = leafItemTreeList[0]) === null || _leafItemTreeList$ === void 0 ? void 0 : _leafItemTreeList$.SOURCE_PATH.split('/');
21
+ var expandKeysList = treeItemIdList === null || treeItemIdList === void 0 ? void 0 : treeItemIdList.map(function (v, i) {
22
+ return treeItemIdList.slice(0, i + 1).join('/');
23
+ });
24
+ var _useState = useState(expandKeysList),
25
+ _useState2 = _slicedToArray(_useState, 2),
26
+ expandKeys = _useState2[0],
27
+ setExpandKeys = _useState2[1];
28
+ var _useState3 = useState([leafItemTreeList === null || leafItemTreeList === void 0 || (_leafItemTreeList$2 = leafItemTreeList[0]) === null || _leafItemTreeList$2 === void 0 ? void 0 : _leafItemTreeList$2.SOURCE_PATH]),
29
+ _useState4 = _slicedToArray(_useState3, 2),
30
+ selectedKeys = _useState4[0],
31
+ setSelectedKeys = _useState4[1];
32
+ var _useState5 = useState([]),
33
+ _useState6 = _slicedToArray(_useState5, 2),
34
+ operateTreeData = _useState6[0],
35
+ setOperateTreeData = _useState6[1];
36
+ // 获取父级
37
+ var getParentItemList = function getParentItemList(sourcePath) {
38
+ var filterList = allItemTreeList.filter(function (v) {
39
+ return sourcePath.indexOf(v.SOURCE_PATH) > -1;
40
+ });
41
+ filterList.pop();
42
+ return filterList;
43
+ };
44
+
45
+ // 获取子级
46
+ var getChildItemList = function getChildItemList(sourcePath, nodeType, filterCb) {
47
+ var filterList = allItemTreeList.filter(function (v) {
48
+ if (sourcePath === '') return true;
49
+ return v.SOURCE_PATH.indexOf(sourcePath) > -1;
50
+ }).filter(function (v) {
51
+ if (nodeType) {
52
+ if (nodeType === '') return true;
53
+ return nodeType === v.NODE_TYPE;
54
+ }
55
+ return v.SOURCE !== null;
56
+ }).filter(function (v) {
57
+ if (filterCb) {
58
+ return filterCb(v);
59
+ }
60
+ return true;
61
+ });
62
+ return filterList || [];
63
+ };
64
+ var getChildById = function getChildById(sourcePath) {
65
+ var filterList = allItemTreeList.filter(function (v) {
66
+ return v.SOURCE_PATH === sourcePath;
67
+ });
68
+ return filterList === null || filterList === void 0 ? void 0 : filterList[0];
69
+ };
70
+
71
+ // 选中
72
+ var setSelectItemById = function setSelectItemById(sourcePath) {
73
+ var treeItemIdList = sourcePath.split('/');
74
+ var expandKeysList = treeItemIdList.map(function (v, i) {
75
+ return treeItemIdList.slice(0, i + 1).join('/');
76
+ });
77
+ setSelectedKeys([sourcePath]);
78
+ setExpandKeys(expandKeysList);
79
+ };
80
+
81
+ // 给树节点绑定一组按钮
82
+ var initOperateTree = function initOperateTree(treeData, openMarkData) {
83
+ var dfs = function dfs(treeData) {
84
+ treeData.map(function (v) {
85
+ var _props$iconElementByN, _props$operateElement, _props$disableSelecte, _v$CHILDREN;
86
+ v.key = v.SOURCE_PATH;
87
+ v.children = v.CHILDREN;
88
+ v.title = /*#__PURE__*/React.createElement("div", {
89
+ className: 'title-box'
90
+ }, /*#__PURE__*/React.createElement("div", {
91
+ className: 'l'
92
+ }, /*#__PURE__*/React.createElement("div", null, v.iconElement || (props === null || props === void 0 || (_props$iconElementByN = props.iconElementByNodeType) === null || _props$iconElementByN === void 0 ? void 0 : _props$iconElementByN[v === null || v === void 0 ? void 0 : v.NODE_TYPE]) || ''), /*#__PURE__*/React.createElement("div", null, v === null || v === void 0 ? void 0 : v.NAME)), /*#__PURE__*/React.createElement("div", {
93
+ className: 'r',
94
+ onClick: function onClick(e) {
95
+ e.stopPropagation();
96
+ }
97
+ }, /*#__PURE__*/React.createElement(Popover, {
98
+ arrow: false,
99
+ overlayClassName: 'my-popover-box',
100
+ content: /*#__PURE__*/React.createElement("div", {
101
+ className: 'popover-box',
102
+ onClick: function onClick() {
103
+ initOperateTree(_toConsumableArray(props.treeData), {});
104
+ }
105
+ }, props.leafOperateListElement),
106
+ open: openMarkData[v.SOURCE_PATH],
107
+ onOpenChange: function onOpenChange(newOpen) {
108
+ initOperateTree(_toConsumableArray(props.treeData), _defineProperty({}, v.SOURCE_PATH, newOpen));
109
+ },
110
+ trigger: "click",
111
+ destroyTooltipOnHide: true
112
+ }, v.operateElement || (props === null || props === void 0 || (_props$operateElement = props.operateElementByNodeType) === null || _props$operateElement === void 0 ? void 0 : _props$operateElement[v === null || v === void 0 ? void 0 : v.NODE_TYPE]) || /*#__PURE__*/React.createElement(MoreOutlined, null))));
113
+ if (props !== null && props !== void 0 && (_props$disableSelecte = props.disableSelectedByNodeType) !== null && _props$disableSelecte !== void 0 && _props$disableSelecte.includes(v === null || v === void 0 ? void 0 : v.NODE_TYPE)) {
114
+ v.selectable = v.selectable === undefined ? false : v.selectable;
115
+ } else {
116
+ v.selectable = v.selectable === undefined ? true : v.selectable;
117
+ }
118
+ if (!((_v$CHILDREN = v.CHILDREN) !== null && _v$CHILDREN !== void 0 && _v$CHILDREN.length)) {
119
+ return v;
120
+ } else {
121
+ return dfs(v.CHILDREN);
122
+ }
123
+ });
124
+ return treeData;
125
+ };
126
+ var newTreeData = dfs(treeData);
127
+ setOperateTreeData(newTreeData);
128
+ };
129
+ useMemo(function () {
130
+ var _leafItemTreeList$3, _props$onSelect;
131
+ initOperateTree(props.treeData, openMarkData);
132
+ setSelectedKeys([leafItemTreeList === null || leafItemTreeList === void 0 || (_leafItemTreeList$3 = leafItemTreeList[0]) === null || _leafItemTreeList$3 === void 0 ? void 0 : _leafItemTreeList$3.SOURCE_PATH]);
133
+ props === null || props === void 0 || (_props$onSelect = props.onSelect) === null || _props$onSelect === void 0 || _props$onSelect.call(props, leafItemTreeList === null || leafItemTreeList === void 0 ? void 0 : leafItemTreeList[0]);
134
+ setExpandKeys(expandKeysList);
135
+ }, [props.treeData]);
136
+ useImperativeHandle(ref, function () {
137
+ return {
138
+ getParentItemList: getParentItemList,
139
+ getChildItemList: getChildItemList,
140
+ setSelectItemById: setSelectItemById,
141
+ getChildById: getChildById
142
+ };
143
+ });
144
+ return /*#__PURE__*/React.createElement("div", {
145
+ className: 'lab-operate-tree'
146
+ }, props !== null && props !== void 0 && props.loading || operateTreeData <= 0 ? /*#__PURE__*/React.createElement("div", {
147
+ className: 'loading-box'
148
+ }, props.loadingElement || /*#__PURE__*/React.createElement(Spin, {
149
+ size: "large"
150
+ })) : /*#__PURE__*/React.createElement(Tree, {
151
+ showLine: true,
152
+ showIcon: true,
153
+ expandedKeys: expandKeys,
154
+ selectedKeys: selectedKeys,
155
+ treeData: operateTreeData,
156
+ onExpand: setExpandKeys,
157
+ onSelect: function onSelect(keys, e) {
158
+ var _props$onSelect2;
159
+ setSelectedKeys(keys);
160
+ props === null || props === void 0 || (_props$onSelect2 = props.onSelect) === null || _props$onSelect2 === void 0 || _props$onSelect2.call(props, e.node);
161
+ }
162
+ }));
163
+ };
164
+ export default /*#__PURE__*/React.forwardRef(LabOperateTree);
@@ -0,0 +1,105 @@
1
+ .lab-operate-tree {
2
+ height: 100%;
3
+
4
+ .title-box {
5
+ display: flex;
6
+ width: 100%;
7
+ flex-direction: row;
8
+ justify-content: space-between;
9
+
10
+ .l {
11
+ padding: 0 4px;
12
+ display: flex;
13
+
14
+ > div:nth-child(1) {
15
+ padding: 0 4px;
16
+ }
17
+
18
+ :nth-child(2) {
19
+ padding: 0 4px;
20
+ }
21
+ }
22
+
23
+ .r {
24
+ display: none;
25
+ }
26
+
27
+ &:hover {
28
+ background-color: transparent;
29
+
30
+ .l {
31
+ background-color: #bfe2ff;
32
+ }
33
+
34
+ .r {
35
+ display: block;
36
+ }
37
+ }
38
+ }
39
+
40
+ .loading-box {
41
+ height: 100%;
42
+ width: 100%;
43
+ display: flex;
44
+ justify-content: center;
45
+ align-items: center;
46
+ }
47
+
48
+ .ant-tree {
49
+ .ant-tree-treenode {
50
+ width: 100%;
51
+
52
+ .ant-tree-node-content-wrapper {
53
+ display: flex;
54
+ flex: 1;
55
+ border-radius: 2px;
56
+
57
+ &:hover {
58
+ background-color: transparent;
59
+ }
60
+
61
+ .ant-tree-title {
62
+ flex: 1;
63
+ }
64
+ }
65
+
66
+ .ant-tree-node-content-wrapper.ant-tree-node-selected {
67
+ background-color: transparent;
68
+
69
+ .title-box {
70
+ .l {
71
+ background-color: #fee8d9;
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+
79
+ .popover-box {
80
+ padding: 4px;
81
+
82
+ div {
83
+ cursor: pointer;
84
+ padding: 4px 8px;
85
+ display: flex;
86
+ flex-direction: row;
87
+
88
+ :nth-child(2) {
89
+ padding: 0 4px;
90
+ margin-left: 4px;
91
+ }
92
+
93
+ &:hover {
94
+ color: #1677ff;
95
+ background-color: #bfe2ff;
96
+ }
97
+ }
98
+ }
99
+
100
+ .my-popover-box {
101
+ .ant-popover-inner {
102
+ padding: unset;
103
+ border-radius: 4px;
104
+ }
105
+ }
@@ -61,7 +61,7 @@ var LabPdfView = function LabPdfView(_ref) {
61
61
  }
62
62
  // 加上书签id,和tree一致
63
63
  function addItemId(t, j) {
64
- t.forEach(function (e, i) {
64
+ t === null || t === void 0 || t.forEach(function (e, i) {
65
65
  e.id = j + '-' + i;
66
66
  if (e.items.length > 0) {
67
67
  addItemId(e.items, e.id);
@@ -65,7 +65,7 @@ var LabPdfViewMobile = function LabPdfViewMobile(_ref) {
65
65
 
66
66
  // 编排树形id
67
67
  function addItemId(t, j) {
68
- t.forEach(function (e, i) {
68
+ t === null || t === void 0 || t.forEach(function (e, i) {
69
69
  e.id = j + '-' + i;
70
70
  if (e.items.length > 0) {
71
71
  addItemId(e.items, e.id);
@@ -7,7 +7,7 @@ interface IndexProps {
7
7
  visible?: boolean;
8
8
  isShowTitle?: boolean;
9
9
  fileField?: object;
10
- getRotateAngle?: (Angle?: number, direction?: string) => void;
10
+ getRotateAngle?: (direction?: string, curFile?: object) => void;
11
11
  }
12
12
  declare const LabPictureCarousel: FC<IndexProps>;
13
13
  export default LabPictureCarousel;
@@ -1,14 +1,16 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
2
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
3
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
4
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
5
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
- /*
6
- * @Author: xqy
7
- * @Date: 2024-04-10 11:04:12
8
- * @LastEditors: xqy
9
- * @LastEditTime: 2024-11-28 17:44:24
10
- * @Description:图片轮播切换组件(支持pdf切换预览)
6
+ /*
7
+ * @Author: xqy
8
+ * @Date: 2024-04-10 11:04:12
9
+ * @LastEditors: xqy
10
+ * @LastEditTime: 2024-12-30 10:58:58
11
+ * @Description:图片轮播切换组件(支持pdf切换预览)
11
12
  */
13
+ // import { throttle } from '@/utils/utils';
12
14
  import { CloseOutlined, LeftOutlined, RightOutlined, RotateLeftOutlined, RotateRightOutlined, ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons';
13
15
  import { Divider } from 'antd';
14
16
  import cn from 'classnames';
@@ -49,10 +51,36 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
49
51
  _useState10 = _slicedToArray(_useState9, 2),
50
52
  rotatinNum = _useState10[0],
51
53
  setRotatinNum = _useState10[1]; //旋转次数
54
+ var _useState11 = useState(false),
55
+ _useState12 = _slicedToArray(_useState11, 2),
56
+ dragging = _useState12[0],
57
+ setDragging = _useState12[1]; //拖拽状态
58
+ var _useState13 = useState({
59
+ left: 'auto',
60
+ top: 'auto'
61
+ }),
62
+ _useState14 = _slicedToArray(_useState13, 2),
63
+ position = _useState14[0],
64
+ setPosition = _useState14[1]; // 用于存储图片位置的状态
65
+ var _useState15 = useState({
66
+ left: 0,
67
+ top: 0
68
+ }),
69
+ _useState16 = _slicedToArray(_useState15, 2),
70
+ initialPosition = _useState16[0],
71
+ setInitialPosition = _useState16[1]; //(被点击元素相对于页面偏移量))
72
+ var _useState17 = useState({
73
+ x: 0,
74
+ y: 0
75
+ }),
76
+ _useState18 = _slicedToArray(_useState17, 2),
77
+ initialMousePosition = _useState18[0],
78
+ setInitialMousePosition = _useState18[1]; //鼠标按下的坐标
79
+
52
80
  var canvasRef = useRef(null);
53
81
 
54
82
  //底部操作按钮
55
- var _useState11 = useState([{
83
+ var _useState19 = useState([{
56
84
  type: 'enlarge',
57
85
  typeName: '放大(+)',
58
86
  icon: /*#__PURE__*/React.createElement(ZoomInOutlined, {
@@ -83,13 +111,12 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
83
111
  }),
84
112
  disabled: false
85
113
  }]),
86
- _useState12 = _slicedToArray(_useState11, 2),
87
- footerBtns = _useState12[0],
88
- setFooterBtns = _useState12[1];
114
+ _useState20 = _slicedToArray(_useState19, 2),
115
+ footerBtns = _useState20[0],
116
+ setFooterBtns = _useState20[1];
89
117
 
90
118
  /**鼠标滚轮实现图片的放大缩小 */
91
119
  var handleWheel = function handleWheel(event) {
92
- // event.preventDefault() //阻止默认的滚动行为,防止浏览器默认进行页面滚动
93
120
  var scaleChange = event.deltaY > 0 ? -0.1 : 0.1;
94
121
  //计算缩放比例,限制缩放比例在(0.5到4之间),防止过大或过小
95
122
  var newScale = Math.min(Math.max(0.2, scale + scaleChange), 4);
@@ -169,7 +196,8 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
169
196
  updatedList[curIndex].roteAngle = newRotateNum * 90;
170
197
  setList(updatedList);
171
198
  setRotatinNum(newRotateNum);
172
- getRotateAngle(newRotateNum * 90, direction, direction);
199
+ console.log('updatedList', updatedList[curIndex], curIndex);
200
+ getRotateAngle === null || getRotateAngle === void 0 || getRotateAngle(direction, updatedList[curIndex]);
173
201
  //旋转之后,利用canvas生成新的图片(formData类型,供传参使用)
174
202
  // if (isCanvasImg) {
175
203
  // const newFiles = await labCanvasToFile(canvasRef, {
@@ -178,7 +206,7 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
178
206
  // });
179
207
  // getRotateImg?.(newFiles);
180
208
  // }
181
- case 7:
209
+ case 8:
182
210
  case "end":
183
211
  return _context.stop();
184
212
  }
@@ -189,6 +217,44 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
189
217
  };
190
218
  }();
191
219
 
220
+ //图片拖拽(鼠标按下,开始拖拽)
221
+ var handleMouseDown = function handleMouseDown(event) {
222
+ event.preventDefault();
223
+ setDragging(true);
224
+ // 鼠标按下开始坐标
225
+ setInitialMousePosition({
226
+ x: event.clientX,
227
+ y: event.clientY
228
+ });
229
+ //被点击元素相对于页面的偏移量
230
+ setInitialPosition({
231
+ left: event.currentTarget.offsetLeft,
232
+ top: event.currentTarget.offsetTop
233
+ });
234
+ };
235
+
236
+ //图片拖拽(拖拽移动中)
237
+ var handleMouseMove = function handleMouseMove(event) {
238
+ if (dragging) {
239
+ //计算拖拽移动距离
240
+ var dx = event.clientX - initialMousePosition.x;
241
+ var dy = event.clientY - initialMousePosition.y;
242
+ setPosition({
243
+ left: "".concat(initialPosition.left + dx, "px"),
244
+ top: "".concat(initialPosition.top + dy, "px")
245
+ });
246
+ }
247
+ };
248
+
249
+ // 图片拖拽(鼠标松开,结束拖拽)
250
+ var handleMouseUp = function handleMouseUp() {
251
+ setDragging(false);
252
+ setPosition({
253
+ left: 'auto',
254
+ top: 'auto'
255
+ });
256
+ };
257
+
192
258
  //底部按钮点击事件(enlarge - 放大,narrow - 缩小,turnLeft - 左转, turnRight - 右转)
193
259
  var clickHandle = function clickHandle(type) {
194
260
  switch (type) {
@@ -217,14 +283,14 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
217
283
  var _i$filePath, _i$filePath2;
218
284
  var name = i[fileName] ? i[fileName] : (_i$filePath = i[filePath]) === null || _i$filePath === void 0 ? void 0 : _i$filePath.split('/').pop();
219
285
  var type = (_i$filePath2 = i[filePath]) === null || _i$filePath2 === void 0 ? void 0 : _i$filePath2.substring(i[filePath].lastIndexOf('.') + 1);
220
- return {
286
+ return _objectSpread(_objectSpread({}, i), {}, {
221
287
  fileType: type === null || type === void 0 ? void 0 : type.toLowerCase(),
222
288
  filePath: i[filePath] + '?v=' + Date.now(),
223
289
  // 加时间戳:解决图片地址没改,造成浏览器缓存,图片不更新的问题。
224
290
  fileName: name,
225
291
  scale: 1,
226
292
  roteAngle: 0
227
- };
293
+ });
228
294
  });
229
295
  setList(arr);
230
296
 
@@ -285,19 +351,27 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
285
351
  className: cn('imgContainer', list[curIndex].fileType === 'pdf' && 'pdfStyle')
286
352
  }, list[curIndex].fileType === 'pdf' ? /*#__PURE__*/React.createElement(LabPdf, {
287
353
  src: list[curIndex].filePath
288
- }) : /*#__PURE__*/React.createElement("img", {
354
+ }) : /*#__PURE__*/React.createElement("div", {
355
+ className: "img-part"
356
+ }, /*#__PURE__*/React.createElement("img", {
289
357
  style: {
290
358
  maxWidth: '100%',
291
359
  maxHeight: '100%',
292
- transform: "rotate(".concat(list[curIndex].roteAngle, "deg) scale3d(").concat(list[curIndex].scale, ", ").concat(list[curIndex].scale, ", 1)"),
293
- transition: 'transform 0.25s ease',
360
+ transform: "rotate(".concat(list[curIndex].roteAngle, "deg) \n scale3d(").concat(list[curIndex].scale, ", ").concat(list[curIndex].scale, ", 1)"),
361
+ transition: 'transform ease-in-out 0.2s',
294
362
  // 添加平滑的缩放过渡效果
295
- cursor: 'grab'
363
+ cursor: dragging ? 'grabbing' : 'grab',
364
+ position: 'absolute',
365
+ left: "".concat(position === null || position === void 0 ? void 0 : position.left),
366
+ top: "".concat(position === null || position === void 0 ? void 0 : position.top)
296
367
  },
297
368
  src: list[curIndex].filePath,
298
369
  onWheel: handleWheel,
299
- key: list[curIndex].filePath
300
- }))), list.length > 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
370
+ key: list[curIndex].filePath,
371
+ onMouseDown: handleMouseDown,
372
+ onMouseMove: handleMouseMove,
373
+ onMouseUp: handleMouseUp
374
+ })))), list.length > 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
301
375
  onClick: function onClick() {
302
376
  return carouselClick('lt');
303
377
  },
@@ -64,6 +64,16 @@
64
64
  align-items: center;
65
65
  justify-content: center;
66
66
  height: 100%;
67
+ width: 100%;
68
+
69
+ .img-part {
70
+ width: 100%;
71
+ height: 100%;
72
+ position: relative;
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ }
67
77
 
68
78
  img {
69
79
  height: 100vh;
@@ -1,10 +1,3 @@
1
- /*
2
- * @Author: xqy
3
- * @Date: 2024-04-01 14:07:41
4
- * @LastEditors: xqy
5
- * @LastEditTime: 2024-12-12 09:57:48
6
- * @Description:
7
- */
8
1
  import { createFromIconfontCN } from '@ant-design/icons';
9
2
  var ICONFONT_URL = '//at.alicdn.com/t/c/font_4487114_sryj061ptfs.js';
10
3
  // 生产环境使用本地的iconfont.js,开发环境使用线上环境以方便开发
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  export { default as LabAltimeter } from './LabAltimeter';
2
2
  export { default as LabDGTreeSelect } from './LabDGTreeSelect';
3
3
  export { default as LabFilePreview } from './LabFilePreview';
4
- export { default as LabGTreeSelect } from './LabGTreeSelect';
5
4
  export { default as LabGroupTree } from './LabGroupTree';
6
5
  export * from './LabGroupTree/typing';
6
+ export { default as LabGTreeSelect } from './LabGTreeSelect';
7
7
  export { default as LabMultipleSelect } from './LabMultipleSelect';
8
- export { default as LabPSwitchPreview } from './LabPSwitchPreview';
9
8
  export { default as LabPdf } from './LabPdf';
10
9
  export { default as LabPdfPrint } from './LabPdfPrint';
11
10
  export { default as LabPdfView } from './LabPdfView';
12
11
  export { default as LabPdfViewMobile } from './LabPdfViewMobile';
13
12
  export { default as LabPictureCarousel } from './LabPictureCarousel';
13
+ export { default as LabPSwitchPreview } from './LabPSwitchPreview';
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  export { default as LabAltimeter } from "./LabAltimeter";
2
2
  export { default as LabDGTreeSelect } from "./LabDGTreeSelect";
3
3
  export { default as LabFilePreview } from "./LabFilePreview";
4
- export { default as LabGTreeSelect } from "./LabGTreeSelect";
5
4
  export { default as LabGroupTree } from "./LabGroupTree";
6
5
  export * from "./LabGroupTree/typing";
6
+ export { default as LabGTreeSelect } from "./LabGTreeSelect";
7
7
  export { default as LabMultipleSelect } from "./LabMultipleSelect";
8
- export { default as LabPSwitchPreview } from "./LabPSwitchPreview";
9
8
  export { default as LabPdf } from "./LabPdf";
10
9
  export { default as LabPdfPrint } from "./LabPdfPrint";
11
10
  export { default as LabPdfView } from "./LabPdfView";
12
11
  export { default as LabPdfViewMobile } from "./LabPdfViewMobile";
13
- export { default as LabPictureCarousel } from "./LabPictureCarousel";
12
+ export { default as LabPictureCarousel } from "./LabPictureCarousel";
13
+ export { default as LabPSwitchPreview } from "./LabPSwitchPreview";
@@ -23,4 +23,5 @@ declare function stringToByte(str: any): any[];
23
23
  * @param files //原图片信息
24
24
  */
25
25
  declare const labCanvasToFile: (canvasRef: any, files: any) => Promise<unknown>;
26
- export { LabBase64ToFile, Uint8ArrayToString, byteToString, formatDate, labCanvasToFile, stringToByte, };
26
+ declare const treeToArray: (tree: any) => any;
27
+ export { LabBase64ToFile, Uint8ArrayToString, byteToString, formatDate, labCanvasToFile, stringToByte, treeToArray, };
@@ -1,3 +1,5 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
+ var _excluded = ["CHILDREN"];
1
3
  import { message } from 'antd';
2
4
 
3
5
  /**
@@ -145,4 +147,11 @@ var labCanvasToFile = function labCanvasToFile(canvasRef, files) {
145
147
  };
146
148
  });
147
149
  };
148
- export { LabBase64ToFile, Uint8ArrayToString, byteToString, formatDate, labCanvasToFile, stringToByte };
150
+ var treeToArray = function treeToArray(tree) {
151
+ return tree.reduce(function (res, item) {
152
+ var CHILDREN = item.CHILDREN,
153
+ i = _objectWithoutProperties(item, _excluded);
154
+ return res.concat(i, CHILDREN && CHILDREN.length ? treeToArray(CHILDREN) : []);
155
+ }, []);
156
+ };
157
+ export { LabBase64ToFile, Uint8ArrayToString, byteToString, formatDate, labCanvasToFile, stringToByte, treeToArray };
package/package.json CHANGED
@@ -1,83 +1,83 @@
1
- {
2
- "name": "xh-lab-rc",
3
- "version": "0.17.2",
4
- "description": " A react library for xinhelab",
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
- "doctor": "father doctor",
17
- "lint": "npm run lint:es && npm run lint:css",
18
- "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
19
- "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
20
- "prepare": "husky install && dumi setup",
21
- "prepublishOnly": "father doctor && npm run build",
22
- "start": "npm run dev"
23
- },
24
- "commitlint": {
25
- "extends": [
26
- "@commitlint/config-conventional"
27
- ]
28
- },
29
- "lint-staged": {
30
- "*.{md,json}": [
31
- "prettier --write --no-error-on-unmatched-pattern"
32
- ],
33
- "*.{css,less}": [
34
- "stylelint --fix",
35
- "prettier --write"
36
- ],
37
- "*.{js,jsx}": [
38
- "eslint --fix",
39
- "prettier --write"
40
- ],
41
- "*.{ts,tsx}": [
42
- "eslint --fix",
43
- "prettier --parser=typescript --write"
44
- ]
45
- },
46
- "dependencies": {
47
- "@ant-design/icons": "^5.3.5",
48
- "@babel/runtime": "^7.24.6",
49
- "antd": "^5.15.3",
50
- "antd-mobile": "^5.36.1",
51
- "antd-mobile-icons": "^0.3.0",
52
- "axios": "^1.7.2",
53
- "classnames": "^2.5.1",
54
- "dayjs": "^1.11.10",
55
- "pdfjs-dist": "2.0.550"
56
- },
57
- "devDependencies": {
58
- "@commitlint/cli": "^17.1.2",
59
- "@commitlint/config-conventional": "^17.1.0",
60
- "@types/react": "^18.0.0",
61
- "@types/react-dom": "^18.0.0",
62
- "@umijs/lint": "^4.0.0",
63
- "dumi": "^2.4.12",
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
- "react": "^16.3.0 || ^17.0.0 || ^18.0.0",
77
- "react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0"
78
- },
79
- "publishConfig": {
80
- "access": "public"
81
- },
82
- "authors": []
83
- }
1
+ {
2
+ "name": "xh-lab-rc",
3
+ "version": "0.17.4",
4
+ "description": " A react library for xinhelab",
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
+ "doctor": "father doctor",
17
+ "lint": "npm run lint:es && npm run lint:css",
18
+ "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
19
+ "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
20
+ "prepare": "husky install && dumi setup",
21
+ "prepublishOnly": "father doctor && npm run build",
22
+ "start": "npm run dev"
23
+ },
24
+ "commitlint": {
25
+ "extends": [
26
+ "@commitlint/config-conventional"
27
+ ]
28
+ },
29
+ "lint-staged": {
30
+ "*.{md,json}": [
31
+ "prettier --write --no-error-on-unmatched-pattern"
32
+ ],
33
+ "*.{css,less}": [
34
+ "stylelint --fix",
35
+ "prettier --write"
36
+ ],
37
+ "*.{js,jsx}": [
38
+ "eslint --fix",
39
+ "prettier --write"
40
+ ],
41
+ "*.{ts,tsx}": [
42
+ "eslint --fix",
43
+ "prettier --parser=typescript --write"
44
+ ]
45
+ },
46
+ "dependencies": {
47
+ "@ant-design/icons": "^5.3.5",
48
+ "@babel/runtime": "^7.24.6",
49
+ "antd": "^5.15.3",
50
+ "antd-mobile": "^5.36.1",
51
+ "antd-mobile-icons": "^0.3.0",
52
+ "axios": "^1.7.2",
53
+ "classnames": "^2.5.1",
54
+ "dayjs": "^1.11.10",
55
+ "pdfjs-dist": "2.0.550"
56
+ },
57
+ "devDependencies": {
58
+ "@commitlint/cli": "^17.1.2",
59
+ "@commitlint/config-conventional": "^17.1.0",
60
+ "@types/react": "^18.0.0",
61
+ "@types/react-dom": "^18.0.0",
62
+ "@umijs/lint": "^4.0.0",
63
+ "dumi": "^2.4.12",
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
+ "react": "^16.3.0 || ^17.0.0 || ^18.0.0",
77
+ "react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0"
78
+ },
79
+ "publishConfig": {
80
+ "access": "public"
81
+ },
82
+ "authors": []
83
+ }